]> git.saurik.com Git - bison.git/blame - ChangeLog
Make yyparser::error public.
[bison.git] / ChangeLog
CommitLineData
49572920
AD
12009-02-19 Akim Demaille <demaille@gostai.com>
2
3 Make yyparser::error public.
4 * data/lalr1.cc: here.
5 There is no good reason to keep it private (and it is convenient
6 to use it from the scanner for instance). It is already public in
7 glr.cc.
8
88654b47
AD
92009-02-19 Akim Demaille <demaille@gostai.com>
10
11 Comment changes.
12 * data/glr.cc: here.
13
4524c55b
AD
142009-02-19 Akim Demaille <demaille@gostai.com>
15
16 Remove trailing blanks.
17 The epilogue has its own ending
18 , no need to add another.
19
20 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
21 epilogue.
22 * data/glr.cc: dnl when extending the epilogue.
23 Remove stray "private:".
24
6ceccee8
AD
252009-02-19 Akim Demaille <demaille@gostai.com>
26
27 Use b4_c_modern.
28 * data/c.m4 (b4_c_function_decl): Here.
29
9c6a8966
AD
302009-02-19 Akim Demaille <demaille@gostai.com>
31
32 Comment changes.
33 * data/lalr1.cc: here.
34
507aa0e2
AD
352009-02-19 Akim Demaille <demaille@gostai.com>
36
37 Extract variant.hh
38 * data/variant.hh: New, extracted from...
39 * data/lalr1.cc: here.
40 Adjust.
41 * data/local.mk: Adjust.
42
51bacae6
AD
432009-02-19 Akim Demaille <demaille@gostai.com>
44
45 Extract stack.hh from lalr1.cc.
46 * data/stack.hh: New.
47 * data/lalr1.cc: Extract from here.
48 * data/local.mk: Adjust.
49
06c3084f
JD
502009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
51
52 Add reminder about uploading public key to keys.gnupg.net.
53 * HACKING (Release Procedure): Here.
54
0ea583d2
AD
552009-01-28 Akim Demaille <demaille@gostai.com>
56
57 * NEWS: Update information about 2.4.1 and 2.4.2.
58
402b123d
AD
592008-11-04 Akim Demaille <demaille@gostai.com>
60
61 Reformat NEWS.
62 * NEWS: Use more outline-mode markup.
63 Suggested by Jim Meyering.
64
74553c98
AD
652009-01-08 Akim Demaille <demaille@gostai.com>
66
67 Fix grep portability issues.
68 Grep on Solaris does not support -q.
69 Reported by Summum Bonum.
70
71 * NEWS: Add a stub for 2.4.2.
72 * THANKS: Add Summum Bonum.
73 * tests/atlocal.in (EGREP): New.
74 (CC, CXX, XSLTPROC): Make it possible to override them via
75 envvars.
76 * tests/java.at: Use $EGREP instead of egrep.
77 Use AT_CHECK's ignore instead of grep's -q.
78
84eedf86
AD
792008-12-11 Akim Demaille <demaille@gostai.com>
80
81 Pass the token type to yysyntax_error.
82 * data/yacc.c (yysyntax_error): Take the transated token instead
83 of the raw number.
84 Adjust callers.
85 * TODO: Update.
86
5860cc8c
AD
872008-12-11 Akim Demaille <demaille@gostai.com>
88
89 Formatting changes.
90 * data/glr.c: Formatting changes.
91
2b008529
AD
922008-12-11 Akim Demaille <demaille@gostai.com>
93
94 Propagate i18n changes into glr.c.
95 * TODO: Update.
96 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
97 building the error message format dynamically.
98 * data/lalr1.java: Formatting changes.
99
2cd1af95
AD
1002008-12-11 Akim Demaille <demaille@gostai.com>
101
102 Use testsuite -C.
103 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
104 Solves problems when top_srcdir is an absolute path.
105 Suggested by Eric Blake.
106 * configure.ac: Require Autoconf 2.62.
107
eeb29422
AD
1082008-12-11 Akim Demaille <demaille@gostai.com>
109
110 Simplify the i18n of the error messages.
111 * data/lalr1.cc: Comment changes.
112 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
113 lalr1.cc instead of building dynamically the format string.
114
6617622c
AD
1152008-12-08 Akim Demaille <demaille@gostai.com>
116
117 Fix portability issue in the test suite.
118 * tests/local.at (AT_MATCHES_CHECK): New.
119 Based on Perl instead of Sed. Sed has too many portability
120 pitfalls, not ever Sed is GNU Sed.
121 * tests/actions.at (Fix user actions without a trailing semicolon):
122 Use it.
123
2ca1136c
AD
1242008-12-08 Akim Demaille <demaille@gostai.com>
125
126 Update data/README.
127 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
128
6c63b895
AD
1292008-12-08 Akim Demaille <demaille@gostai.com>
130
131 Install autoconf as a submodule to get m4sugar.
132 * .gitmodules: Add submodules/autoconf.
133 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
134 submodules/autoconf.
135
417e31d2
AD
1362008-12-08 Akim Demaille <demaille@gostai.com>
137
138 Test token.prefix in all the skeletons.
139 * data/java.m4 (b4_token_enum): Use the token.prefix.
140 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
141 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
142 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
143 * tests/java.at: Comment changes.
144 (AT_CHECK_JAVA_MINIMAL): Define the END token.
145 (Java parser class and package names): Add token.prefix check.
146
97abf544
AD
1472008-12-08 Akim Demaille <demaille@gostai.com>
148
149 Fix regeneration of atconfig.
150 * tests/local.mk (tests/atconfig): The rule was incorrect, but
151 remove it: now that there is no tests/Makefile.am, the top-level
152 Makefile properly updates atconfig when needed.
153
e8cd1ad6
DJ
1542008-12-07 Di-an Jan <dianj@freeshell.org>
155
156 Implement the FIXME that ends an user action with a semicolon
157 if it seems necessary.
158 * src/scan-code.l (flex rules section): Flag cpp directive from
159 any `#' to the first unescaped end-of-line. Semicolon is not
160 needed after `;', `{', '}', or cpp directives and is needed after
161 any other token (whitespaces and comments have no effect).
162 * tests/actions.at (Fix user actions without a trailing semicolon):
163 New test.
164 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
165 to make user actions complete statements.
166 Adjust column numbers in error messages.
167 * tests/regression.at (Fix user actions without a trailing semicolon):
168 Remove. Covered by new test.
169
ce9447fc
AD
1702008-12-07 Akim Demaille <demaille@gostai.com>
171
172 Update gnulib.
173 * gnulib: Update from master.
174
d333175f
EB
1752008-12-05 Eric Blake <ebb9@byu.net>
176
177 Avoid compiler warning.
178 * src/output.c (muscle_insert_item_number_table): Delete unused
179 function.
180
215b40ac
EB
1812008-12-02 Eric Blake <ebb9@byu.net>
182
183 Build testsuite with newer autoconf.
184 * tests/output.at (m4_expand): Don't override in newer autoconf,
185 where the underlying implementation changed.
186 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
187 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
188 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
189 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
190 since some of them contain unbalanced ')'.
191
3bb21113
AD
1922008-12-01 Akim Demaille <demaille@gostai.com>
193
194 Use b4_symbol for printers and destructors everywhere.
195 * data/bison.m4 (b4_symbol_action_location): New.
196 * data/c.m4 (b4_symbol_actions): Remove.
197 Adjust all callers to use by b4_symbol_foreach and the corresponding
198 b4_symbol_printer/destructor macro.
199 * data/glr.cc: Adjust.
200 * data/lalr1.java: Adjust the %destructor sanity check.
201 * src/output.c (symbol_code_props_output): Remove, we no longer
202 need the b4_symbol_printers/destructors tables.
203
fb7c5b1f
AD
2042008-12-01 Akim Demaille <demaille@gostai.com>
205
206 Use b4_symbol_case_.
207 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
208 b4_symbol_case_.
209
cf6fb222
AD
2102008-12-01 Akim Demaille <demaille@gostai.com>
211
212 Move b4_symbol based macro to bison.m4.
213 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
214 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
215 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
216 (b4_type_foreach): Move to...
217 * data/bison.m4: Here.
218 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
219 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 220
e3c52a63
AD
2212008-12-01 Akim Demaille <demaille@gostai.com>
222
223 b4_symbol/type_foreach.
224 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
225 Use them.
226
2bde9113
AD
2272008-12-01 Akim Demaille <demaille@gostai.com>
228
229 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
230 Instead of defining complex list of tuples to define various
231 properties of the symbols, we now prefer to define symbols as
232 "structs" in m4: using the symbol key (its number), and the
233 property name, b4_symbol gives it value. Use this to handle
234 destructors and printers.
235
2bde9113
AD
236 * src/output.c (CODE_PROP): New.
237 (prepare_symbol_definitions): Use it to define the printer and
238 destructor related attributes of the symbols.
239 * data/lalr1.cc (b4_symbol_actions): Rename as...
240 (b4_symbol_action): this.
241 Use b4_symbol instead of 6 arguments.
242 (b4_symbol_printer, b4_symbol_destructor): New.
243 Use them instead of b4_symbol_actions.
244
44494bf6
AD
2452008-12-01 Akim Demaille <demaille@gostai.com>
246
247 Avoid capturing variables too easily.
248 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
249 v__ and p__ instead of v and p.
250
fad814bd
AD
2512008-12-01 Akim Demaille <demaille@gostai.com>
252
253 Remove spurious empty line before syncline.
254 * data/bison.m4 (b4_syncline): Don't output an empty line before
255 the output.
256
feda5527
AD
2572008-11-26 Akim Demaille <demaille@gostai.com>
258
259 Convert lib/Makefile.am into lib/local.mk.
260 The real problem is rather gnulib.mk, which itself is extracted
261 from a Makefile.am that gnulib expects to the "recursive". The
262 tool prefix-gnulib-mk converts such a gnulib.mk to be
263 non-recursive. Also, some AC_SUBST variables need to be adjusted.
264
265 * etc/prefix-gnulib-mk: New.
266 * bootstrap (slurp): Use it to convert further gnulib.mk.
267 No longer try to avoid re-creation of lib/gnulib.mk as the changes
268 are deeper.
269 * lib/Makefile.am: Rename as...
270 * lib/local.mk: this.
271 Adjust to be prefixed.
272 * Makefile.am, configure.ac: Adjust.
273 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
274
56ddee7f
AD
2752008-11-26 Akim Demaille <demaille@gostai.com>
276
277 s/_FLAGS/FLAGS/.
278 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
279 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
280 Reported by Eric Blake.
281
728e89a0
AD
2822008-11-26 Akim Demaille <demaille@gostai.com>
283
284 Use b4_parser_tables_define in glr.cc.
285 * data/glr.c: Use b4_parser_tables_define instead of defining the
286 (deterministic integral) tables by hand.
287
2c1bf9bd
AD
2882008-11-26 Akim Demaille <demaille@gostai.com>
289
290 Use b4_parser_tables_define in Java.
291 * data/java.m4 (b4_typed_parser_table): Rename as...
292 (b4_typed_parser_table_define): this, for consistency.
293 Accept a comment as $4.
294 Move $2 into yy*_.
295 (b4_integral_parser_table): Rename as...
296 (b4_integral_parser_table_define): this.
297 * data/lalr1.java: Adjust all uses.
298 Use b4_parser_tables_define instead of generation by hand.
299
ba206cf4
AD
3002008-11-26 Akim Demaille <demaille@gostai.com>
301
302 Prepare the convergence bw C style and Java table generation.
303 * data/bison.m4 (b4_tables_map, b4_tables_declare)
304 (b4_tables_define): Rename as...
305 (b4_integral_parser_tables_map, b4_parser_tables_declare)
306 (b4_parser_tables_define): these.
307 * data/c.m4 (b4_table_define): Rename as...
308 (b4_integral_parser_table_define): this.
309 * data/lalr1.cc: Adjust.
310 (b4_table_define, b4_table_declare): Rename as...
311 (b4_integral_parser_table_define)
312 (b4_integral_parser_table_declare): these.
313 (yyrline_): Move the comment where it is actually used.
314 * data/yacc.c: Adjust.
315 (yyrline): Use b4_integral_parser_table_define.
316
d12f8e49
AD
3172008-11-26 Akim Demaille <demaille@gostai.com>
318
319 Regen.
320 * src/parse-gram.h, src/parse-gram.c: Regen.
321
0991e29b
AD
3222008-11-26 Akim Demaille <demaille@gostai.com>
323
324 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
325 * data/lalr1.cc (b4_tables_map): Move to...
326 * data/bison.m4: here.
327 Update the comment for yytable during the flight.
328 (b4_tables_declare, b4_tables_define): New.
329 * data/lalr1.cc: Use them.
330 * data/c.m4 (b4_table_define): New.
331 * data/yacc.c: Use b4_tables_define instead of output the tables
332 by hand.
333 * tests/regression.at (Web2c Actions): Adjust the expected output,
334 the order of the tables changed.
335
3d3bc1fe
AD
3362008-11-26 Akim Demaille <demaille@gostai.com>
337
338 Get rid of (yy)rhs and (yy)prhs.
339 These tables are no longer needed in the parsers, and they don't seem to
340 be useful. They are not documented either.
feda5527 341
3d3bc1fe
AD
342 * src/output.c (prepare_rules): Get rid of rhs and prhs.
343 Adjust the computation of (yy)r2.
344
08c81469
AD
3452008-11-26 Akim Demaille <demaille@gostai.com>
346
347 Rule length is unsigned.
348 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
349
932b0c96
AD
3502008-11-26 Akim Demaille <demaille@gostai.com>
351
352 Get rid of lalr1-split.cc.
353 It was no longer maintainer.
feda5527 354
932b0c96
AD
355 * data/lalr1-split.cc: Remove.
356 * etc/bench.pl.in (bench_fusion_parser): Remove.
357 Adjust.
358
8452c667
AD
3592008-11-26 Akim Demaille <demaille@gostai.com>
360
361 Use yy* consistently.
362 * data/glr.c: Now that yyrhs no longer exists as a global
363 variable, rename local "rhs" variables into "yyrhs" for
364 consistency.
365
783aa653
AD
3662008-11-25 Akim Demaille <demaille@gostai.com>
367
368 Get rid of yyrhs and yyprhs in glr.c.
369 * data/glr.c (yyrhs, yyprhs): Remove.
370 Instead, use the state stack and yystos.
371
6130b755
AD
3722008-11-25 Akim Demaille <demaille@gostai.com>
373
374 Flag glr tests.
375 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
376 as an Autotest keyword.
377
95a7b1c9
AD
3782008-11-25 Akim Demaille <demaille@gostai.com>
379
380 Prefer TESTSUITE_FLAGS.
381 TESTSUITEFLAGS is barely readable.
feda5527 382
95a7b1c9
AD
383 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
384 for backward compatibility.
385 Use the former instead of the latter.
386
b4f18401
AD
3872008-11-25 Akim Demaille <demaille@gostai.com>
388
389 Get rid of yyrhs and yyprhs in larl1.java.
390 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
391 (yy_reduce_print): Rather, use yystos_ and the state stack.
392
c265fd6b
AD
3932008-11-25 Akim Demaille <demaille@gostai.com>
394
395 Formatting changes.
396
68dbdee8
AD
3972008-11-25 Akim Demaille <demaille@gostai.com>
398
399 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
400 They were used to get the symbol types, given a rule number, when
401 displaying the top of the stack before a reduction. But the
402 symbol type is available from the state stack. This has two be
403 benefits: two tables less in the parser (making it smaller), and a
404 more consistent use of the three stacks which will help to fuse
405 them.
feda5527 406
68dbdee8
AD
407 * data/yacc.c (yyprhs, yyrhs): Remove.
408 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
409 (yy_reduce_print): Take yyssp as argument.
410 Use it, together with yystos, to get the symbol type.
411 * tests/regression.at (Web2c Report): Remove these tables from the
412 expected output.
413
6ab1adbe
AD
4142008-11-25 Akim Demaille <demaille@gostai.com>
415
416 b4_tables_map.
417 The point is to factor the generation of the tables across skeletons.
418 This is language dependant.
feda5527 419
6ab1adbe
AD
420 * data/c.m4 (b4_comment_): New.
421 Should be usable to define how to generate tables independently of
422 the language.
423 (b4_c_comment): New.
424 (b4_comment): Bounce to b4_c_comment.
425 Now support $2 = [PREFIX] for indentation.
426 * data/lalr1.cc (b4_table_declare): Don't output a comment if
427 there is no comment.
428 Indent it properly when there is one.
429 Output the ending semicolon.
430 (b4_table_define): Space changes.
431 Output the ending semicolon.
432 (b4_tables_map): New.
433 Use it twice instead of declaring and defining the (integral)
434 tables by hand.
435
0fddb3d5
AD
4362008-11-25 Akim Demaille <demaille@gostai.com>
437
438 b4_table_declare.
439 * data/lalr1.cc (b4_table_declare): New.
440 Use it to declare the tables defined with b4_table_define.
441 (b4_table_define): Declare a third arg to match b4_table_declare
442 signature.
443 Move all the comments around invocations of b4_table_define into
444 the invocations itselves.
445 Move things around to have the order for declarations and
446 definitions.
447
c4ddc0fb
AD
4482008-11-25 Akim Demaille <demaille@gostai.com>
449
450 Formatting changes.
451 * data/lalr1.java: here.
452
e0c653e7
AD
4532008-11-25 Akim Demaille <demaille@gostai.com>
454
455 b4_args is more general than only C++.
456 * data/lalr1.cc (b4_args, _b4_args): Move to...
457 * data/bison.m4: here.
458
4182a0a1
DJ
4592008-11-21 Di-an Jan <dianj@freeshell.org>
460
461 Implement no-XXX arguments for --warnings, --report, --trace.
462 * src/getargs.c (flags_argmatch): Handles no-XXX.
463 Fix typo in doxygen comment.
464
01466c3e
AD
4652008-11-21 Akim Demaille <demaille@gostai.com>
466
467 Display the changes in cross-options.texi.
468 * build-aux/cross-options.pl ($sep): New, to separate items.
469 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
470 changes.
471
a7c09cba
DJ
4722008-11-20 Di-an Jan <dianj@freeshell.org>
473
474 Improves options in the manual.
475 * doc/bison.texinfo (-g, -x): Add space before argument.
476 (Option Cross Key): Implement FIXME: listing directives also.
477 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
478 (Short Option): Special case -d. Put arguments inside @option.
feda5527 479 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
480 src/scan-gram.l (actual name passed as the first argument)
481 with special case for %define.
482 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
483 to build-aux/cross-options.pl.
484 * src/getargs.c (usage): Document limitations of cross-options.pl.
485 * src/scan-gram.l: Likewise.
486
6c88b51e
JD
4872008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
488
489 Fix unexpanded macros in GLR defines file.
490 Reported by Csaba Raduly at
491 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
492 * THANKS (Csaba Raduly): Add.
493 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
494 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
495 lexer in a separate module that includes the defines file.
496 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
497 source.
498 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
499 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
500 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
501 (AT_DATA_SOURCE_PROLOGUE): New.
502 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
503 (AT_DATA_SOURCE): New.
504 (AT_FULL_COMPILE): Extend to support an additional source file.
505
1e034807
AD
5062008-11-18 Akim Demaille <demaille@gostai.com>
507
508 More TODO.
509 * TODO: More short term issues.
510
e3dda35c
AD
5112008-11-18 Akim Demaille <demaille@gostai.com>
512
513 Regen.
514 * src/parse-gram.h, src/parse-gram.c: Regen.
515
bd187d7b
AD
5162008-11-18 Akim Demaille <demaille@gostai.com>
517
518 Use b4_subtract where possible.
519 * data/lalr1.cc (b4_subtract): Move to...
520 * data/bison.m4: here.
521 * data/glr.c (b4_rhs_data): Use it.
522 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
523
6085ab0d
AD
5242008-11-18 Akim Demaille <demaille@gostai.com>
525
526 Remove incorrect mode specification.
527 * data/glr.cc: Don't pretend it's C code.
528
9ce405ce
JD
5292008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
530
531 Simplify last patch slightly.
532 * src/getargs.c (getargs): Here.
533
a8beef7e
JD
5342008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
535
536 Fix last warning from --enable-gcc-warnings.
537 * src/getargs.c (getargs): Don't assign const address to non-const
538 pointer.
539
d50eea6d
JD
5402008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
541
542 Don't let maintainer-*-check targets force a version update.
543 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
544 handled.
545
f5f419de
DJ
5462008-11-17 Di-an Jan <dianj@freeshell.org>
547
548 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
549 Align menus. Adjust word wrapping. Use node names for menu names.
550 (Examples): Don't abbreviate node names.
551 (LocalWords): Remove abbreviations.
552 (Copying): Make description a sentence.
d50eea6d 553 (Java Action Features): Remove period to match the rest of menu.
f5f419de 554
d73e55e0
DJ
5552008-11-17 Di-an Jan <dianj@freeshell.org>
556
557 Handles several --enable-gcc-warnings.
558 * src/getargs.c (command_line_location): Set parameters to void.
559 * src/output.c (symbol_type_name_cmp): Make static.
560 (symbols_by_type_name): Set parameters to void.
561 (symbol_definitions_output): Remove unused parameter. Rename as...
562 (prepare_symbol_definitions): this.
563 (muscles_output): Move symbol_definitions_output to...
564 (output): here as prepare_symbol_definitions.
565 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 566 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 567
68c989de
DJ
5682008-11-17 Di-an Jan <dianj@freeshell.org>
569
570 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
571 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
572
23ce6f4c
AD
5732008-11-16 Akim Demaille <demaille@gostai.com>
574
575 Add missing $(EXEEXT).
576 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
577 "src/bison$(EXEEXT)".
578 Reported by Di-an Jan.
579
dd704c35
AD
5802008-11-15 Akim Demaille <demaille@gostai.com>
581
582 * TODO: Update.
583
dab244d5
AD
5842008-11-15 Akim Demaille <demaille@gostai.com>
585
586 Formatting changes.
587 * tests/input.at: here.
588
4b4da9fb
AD
5892008-11-15 Akim Demaille <demaille@gostai.com>
590
591 Remove duplicate header inclusion.
592 * src/LR0.c: here.
593
4ea3f53d
AD
5942008-11-15 Akim Demaille <demaille@gostai.com>
595
596 * src/parse-gram.h, src/parse-gram.c: Regen.
597
cb823b6f
AD
5982008-11-15 Akim Demaille <demaille@gostai.com>
599
600 Support parametric types.
b06df3c2
AD
601
602 There are two issues to handle: first scanning nested angle
603 bracket pairs to support types such as std::pair< std::string,
604 std::list<std::string> > >.
605
606 Another issue is to address idiosyncracies of C++: do not glue two
607 closing angle brackets together (otherwise it's operator>>), and
608 avoid sticking blindly a TYPE to the opening <, as it can result
609 in '<:' which is a digraph for '['.
610
cb823b6f
AD
611 * src/scan-gram.l (brace_level): Rename as...
612 (nesting): this.
613 (SC_TAG): New.
614 Implement support for complex tags.
b06df3c2 615 (tag): Accept
cb823b6f
AD
616 , but not <.
617 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
618 (b4_symbol_variant): Leave space around types as parameters.
619 * examples/variant.yy: Use nested template types and leading ::.
620 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
621 Rename as...
622 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
623 * tests/c++.at: Test parametric types.
624
7b6e6753
AD
6252008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
626
627 Test token.prefix.
628 This is not sufficient, but we test at least that the make_SYMBOL
629 interface is not affected by token.prefix. A more general test
630 will be implemented when the support of token.prefix is generalized
631 to more skeletons.
b06df3c2 632
7b6e6753
AD
633 * tests/c++.at: One more variant test, using token.prefix.
634
dddec537
AD
6352008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
636
637 Test the make_TOKEN interface.
638 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
639 Factor the common code in yylex.
640 Use it to test "%define lex_symbol".
641
7d3e21ba
AD
6422008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
643
644 Formatting change.
645
4fc55348
AD
6462008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
647
648 Simplify code for variants bench marks.
649 * etc/bench.pl.in (&generate_grammar_list): Define and use
650 location_type.
651 Factor the common code in yylex.
652
070e6509
AD
6532008-11-15 Akim Demaille <demaille@gostai.com>
654
655 Better error message.
656 * bootstrap (find_tool): Fix the error message.
657
0078681b
AD
6582008-11-15 Akim Demaille <demaille@gostai.com>
659
660 Update variant.yy to newest interface.
661 * examples/variant.yy: Define lex_symbol.
662 Adjust.
663
ff084799
AD
6642008-11-15 Akim Demaille <demaille@gostai.com>
665
666 Don't use locations in variant.yy.
667 * examples/variant.yy: Adjust to not using locations.
668
b0d79ec6
AD
6692008-11-15 Akim Demaille <demaille@gostai.com>
670
671 Comment changes.
672 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
673 comments for the license.
674
d4977ce3
AD
6752008-11-15 Akim Demaille <demaille@gostai.com>
676
677 Remove tests/Makefile.am.
678 * tests/Makefile.am: Rename as...
679 * tests/local.mk: this.
680 * Makefile.am, configure.ac: Adjust.
681 * Makefile.am (DISTCLEANFILES): Define.
682 (maintainer-check, maintainer-xml-check, maintainer-push-check):
683 Remove, we no longer need to bounce to the real targets.
684
87f1149a
AD
6852008-11-15 Akim Demaille <demaille@gostai.com>
686
687 Comment changes.
688
36415906
AD
6892008-11-15 Akim Demaille <demaille@gostai.com>
690
691 djgpp/local.mk.
692 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
693 * djgpp/local.mk: this new file.
694
e2c2f696
AD
6952008-11-15 Akim Demaille <demaille@gostai.com>
696
697 Remove doc/Makefile.am.
698 * doc/Makefile.am: Rename as...
699 * doc/local.mk: this.
700 Adjust paths
701 * Makefile.am, configure.ac: Adjust.
702 * Makefile.am (MOSTLYCLEANFILES): New.
703 * src/local.mk: Adjust.
704
2ead32e6
AD
7052008-11-15 Akim Demaille <demaille@gostai.com>
706
707 Move sc_tight_scope into maint.mk.
b06df3c2
AD
708 It does not work, and I don't know how it was supposed to work: it
709 seems to be looking for sources in the build tree. I just moved
710 it at a better place, fixing it is still required.
711
2ead32e6
AD
712 * src/local.mk (echo): Remove.
713 (sc_tight_scope): Move to...
714 * maint.mk: here.
715
2df9ec37
AD
7162008-11-15 Akim Demaille <demaille@gostai.com>
717
718 Regen.
719 * src/parse-gram.h, src/parse-gram.h: Regen.
720
0305d25e
AD
7212008-11-15 Akim Demaille <demaille@gostai.com>
722
723 Remove src/Makefile.am.
724 * src/Makefile.am: Rename as...
725 * src/local.mk: this.
726 Prefix all the paths with src/.
727 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
728 (AM_CPPFLAGS): Find find in builddir/src.
729 (YACC): Move the flags into...
730 (AM_YFLAGS): here.
731 * maint.mk (sc_tight_scope): Disable.
732 It used to bounce to the version in src/Makefile.am which is now
733 part of this very Makefile.
734 * Makefile.am, configure.ac: Adjust.
735 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
736 include "..." to find files "here": we are no longer in src/, so
737 qualify the includes with src/.
738 * doc/Makefile.am (PREPATH): No longer include the top_builddir
739 prefix.
740 (.x.1): Adjust to be able to create src/foo from the top level
741 Makefile, instead of going bounce to src/Makefile the creation of
742 foo.
743
5277c0a3
AD
7442008-11-15 Akim Demaille <demaille@gostai.com>
745
746 Remove useless variable.
747 * doc/Makefile.am (srcsrcdir): Remove.
748
6a5aa0cd
AD
7492008-11-15 Akim Demaille <demaille@gostai.com>
750
751 Remove data/Makefile.am.
752 * data/Makefile.am: Rename as...
753 * data/local.mk: this.
754 Adjust paths.
755 * Makefile.am, configure.ac: Adjust.
756
7cb794dc
AD
7572008-11-15 Akim Demaille <demaille@gostai.com>
758
759 Remove etc/Makefile.am.
760 * etc/Makefile.am: Rename as...
761 * etc/local.mk: this.
762 Adjust.
763 * Makefile.am, configure.ac: Adjust.
764
cd409e3b
AD
7652008-11-15 Akim Demaille <demaille@gostai.com>
766
767 Remove examples/local.mk.
768 examples/calc++/Makefile.am might be interesting to keep as is, since
769 it is an example in itself.
2df9ec37 770
cd409e3b
AD
771 * examples/Makefile.am: Rename as...
772 * examples/local.mk: this.
773 Adjust.
774 * Makefile.am, configure.ac: Adjust.
775
9a1e4214
AD
7762008-11-15 Akim Demaille <demaille@gostai.com>
777
778 Remove build-aux/Makefile.am.
779 Recursive Makefiles are really way too slow, let's get rid of some of
780 them.
2df9ec37 781
9a1e4214
AD
782 * build-aux/Makefile.am: Rename as...
783 * build-aux/local.mk: this.
784 Adjust paths.
785 * Makefile.am, configure.ac: Adjust.
786
0634493c
AD
7872008-11-15 Akim Demaille <demaille@gostai.com>
788
789 Provide convenience constructors for locations and positions.
790 * data/location.cc (position::position): Accept file, line and
791 column as arguments with default values.
792 Always qualify initial line and column literals as unsigned.
793 (location::location): Provide convenience constructors.
794
fe1b448a
AD
7952008-11-15 Akim Demaille <demaille@gostai.com>
796
b06df3c2
AD
797 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
798 token type.
fe1b448a
AD
799 Using template buys us nothing, and makes it uselessly complex to
800 construct a symbol. Besides, it could not be generalized to other
801 languages, while make_FOO would work in C/Java etc.
2df9ec37 802
fe1b448a
AD
803 * data/lalr1.cc (b4_symbol_): New.
804 (b4_symbol): Use it.
805 (b4_symbol_constructor_declaration_)
806 (b4_symbol_constructor_definition_): Instead of generating
807 specializations of an overloaded template function, just generate
808 several functions whose names are forged from the token names
809 without the token.prefix.
810 (b4_symbol_constructor_declarations): Generate them for all the
811 symbols, not just by class of symbol type, now that instead of
812 specializing a function template by the token, we generate a
813 function named after the token.
814 (b4_symbol_constructor_specialization_)
815 (b4_symbol_constructor_specializations): Remove.
816 * etc/bench.pl.in: Adjust to this new API.
817
5679f311
AD
8182008-11-13 Akim Demaille <demaille@gostai.com>
819
820 %define token.prefix.
b06df3c2
AD
821 Provide a means to add a prefix to the name of the tokens as
822 output in the generated files. Because of name clashes, it is
823 good to have such a prefix such as TOK_ that protects from names
824 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 825
5679f311
AD
826 * data/bison.m4 (token.prefix): Empty by default.
827 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
828 * data/lalr1.cc (b4_symbol): Ditto.
829
3204049e
AD
8302008-11-13 Akim Demaille <demaille@gostai.com>
831
832 Compute at M4 time some of the subtractions.
90290ce5 833 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
834 (b4_rhs_data): Use it.
835
202598d3
AD
8362008-11-13 Akim Demaille <demaille@gostai.com>
837
838 symbol::token.
b06df3c2 839 This allows the user to get the type of a token returned by yylex.
2df9ec37 840
202598d3
AD
841 * data/lalr1.cc (symbol::token): New.
842 (yytoknum_): Define when %define lex_symbol, independently of
843 %debug.
844 (yytoken_number_): Move into...
845 (symbol::token): here, since that's the only use.
846 The other one is YYPRINT which was not officially supported
847 by lalr1.cc, and anyway it did not work since YYPRINT uses this
848 array under a different name (yytoknum).
849
fc2476c7
AD
8502008-11-13 Akim Demaille <demaille@gostai.com>
851
852 YYERRCODE.
853 * TODO (YYERRCODE): Mention the case of $undef.
854
865f1e9f
AD
8552008-11-13 Akim Demaille <demaille@gostai.com>
856
857 TODO: YYPRINT.
858 * TODO (YYPRINT): New.
859
cb0b136a
AD
8602008-11-13 Akim Demaille <demaille@gostai.com>
861
862 Comment changes.
863 * data/lalr1.cc, data/yacc.c: Fix the description of the
864 yytranslate and yytoknum tables.
865
2c086d29
AD
8662008-11-13 Akim Demaille <demaille@gostai.com>
867
868 Define make_symbol in the header.
b06df3c2
AD
869 To reach good performances these functions should be inlined (yet
870 this is to measure precisely). To this end they must be available
871 to the caller.
2df9ec37 872
2c086d29
AD
873 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
874 location_type with the class name.
875 Since will now be output in the header, declare "inline".
876 No longer use b4_symbol_constructor_specializations, but
877 b4_symbol_constructor_definitions in the header.
878 Don't call it in the *.cc file.
879
1c4af381
AD
8802008-11-13 Akim Demaille <demaille@gostai.com>
881
882 Define yytranslate in the header for lex_symbol.
883 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
884 into the header file when using %define lex_symbol.
885 (yytranslate_): Declare inline.
886
e51b0a82
AD
8872008-11-13 Akim Demaille <demaille@gostai.com>
888
b06df3c2
AD
889 Define the constructors of symbol_type in
890 b4_symbol_constructor_definitions.
e51b0a82 891 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
892 forthcoming patch will move elsewhere. Hence the interest of
893 putting them together.
2df9ec37 894
b06df3c2
AD
895 The stack_symbol_type does not need to be moved, it is used only
896 by the parser.
2df9ec37 897
e51b0a82
AD
898 * data/lalr1.cc: Move symbol_type and symbol_base_type
899 constructors into...
900 (b4_symbol_constructor_definitions): here.
901 Adjust.
902
78835571
AD
9032008-11-13 Akim Demaille <demaille@gostai.com>
904
905 Make it easier to move the definition of yytranslate_.
906 Forthcoming changes will make it possible to use yytranslate_
907 from outside the parser implementation file.
2df9ec37 908
78835571
AD
909 * data/lalr1.cc (b4_yytranslate_definition): New.
910 Use it.
911
c1e6c88c
AD
9122008-11-13 Akim Demaille <demaille@gostai.com>
913
914 Remove useless class specification.
915 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
916 to refer to the class name to use a type defined by the class for
917 arguments of member functions.
918
4654b0c0
AD
9192008-11-13 Akim Demaille <demaille@gostai.com>
920
921 Finer input type for yytranslate.
922 This patch is debatable: the tradition expects yylex to return an int
923 which happens to correspond to token_number (which is an enum). This
924 allows for instance to return characters (such as '*' etc.). But this
925 goes against the stronger typing I am trying to have with the new
926 lex interface which return a symbol_type. So in this case, feed
927 yytranslate_ with a token_type.
2df9ec37 928
4654b0c0
AD
929 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
930 expect a token_type.
931
dd735e4e
AD
9322008-11-13 Akim Demaille <demaille@gostai.com>
933
934 Honor lex-params in %define lex_symbol mode.
935 * data/lalr1.cc: Use b4_lex_param.
936
6659366c
AD
9372008-11-13 Akim Demaille <demaille@gostai.com>
938
939 Simplify names.
940 * src/output.c (symbol_definitions_output): Rename symbol
941 attributes type_name and has_type_name as type and has_type.
942 * data/lalr1.cc: Adjust uses.
943
e9805e57
AD
9442008-11-13 Akim Demaille <demaille@gostai.com>
945
946 Use b4_type_names for the union type.
b06df3c2
AD
947 The union used to compute the size of the variant used to iterate
948 over the type of all the symbols, with a lot of redundancy. Now
949 iterate over the lists of symbols having the same type-name.
2df9ec37 950
e9805e57
AD
951 * data/lalr1.cc (b4_char_sizeof_): New.
952 (b4_char_sizeof): Use it.
953 Adjust to be called with a list of numbers instead of a single
954 number.
955 Adjust its caller for new-line issues.
956
aea10ef4
AD
9572008-11-13 Akim Demaille <demaille@gostai.com>
958
959 Define the "identifier" of a symbol.
b06df3c2
AD
960 Symbols may have several string representations, for instance if
961 they have an alias. What I call its "id" is a string that can be
962 used as an identifier. May not exist.
2df9ec37 963
b06df3c2
AD
964 Currently the symbols which have the "tag_is_id" flag set are
965 those that don't have an alias. Look harder for the id.
2df9ec37 966
aea10ef4
AD
967 * src/output.c (is_identifier): Move to...
968 * src/symtab.c (is_identifier): here.
969 * src/symtab.h, src/symtab.c (symbol_id_get): New.
970 * src/output.c (symbol_definitions_output): Use it to define "id"
971 and "has_id".
972 Remove the definition of "tag_is_id".
973 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
974 "tag_is_id" were used to produce code.
975 We still use "tag" for documentation.
976
2ea7730c
AD
9772008-11-11 Akim Demaille <demaille@gostai.com>
978
979 Locations are no longer required by lalr1.cc.
980 * data/lalr1.cc (_b4_args, b4_args): New.
981 Adjust all uses of locations to make them optional.
982 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
983 (AT_CHECK_NAMESPACE): Check the use of locations.
984 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
985 without locations with lalr1.cc.
986 Test these cases.
987 * tests/output.at: Check lalr1.cc with and without location
988 support.
989 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
990 Don't use locations.
991
7ca2266a
AD
9922008-11-11 Akim Demaille <demaille@gostai.com>
993
994 AT_FULL_COMPILE.
995 * tests/local.at (AT_FULL_COMPILE): New.
996 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
997
1a7a65f9
AD
9982008-11-11 Akim Demaille <demaille@gostai.com>
999
1000 Support parens in calc++.
1001 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1002 * examples/calc++/test (run): Check the expected output.
1003 Adjust callers.
1004 Check parens too.
1005
c944f7f2
AD
10062008-11-11 Akim Demaille <demaille@gostai.com>
1007
1008 Simplify lalr1.cc since %defines is mandatory.
1009 * data/lalr1.cc: Remove useless calls to b4_defines_if.
1010
dada3cd1
AD
10112008-11-11 Akim Demaille <demaille@gostai.com>
1012
1013 TODO: yyfmt.
1014 * TODO (yysyntax_error): New item.
1015
422c18f4
AD
10162008-11-11 Akim Demaille <demaille@gostai.com>
1017
1018 Prefer M4 to CPP.
1019 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1020 YYERROR_VERBOSE.
1021
a0ffc175
AD
10222008-11-11 Akim Demaille <demaille@gostai.com>
1023
1024 Support i18n of the parse error messages.
1025 * TODO (lalr1.cc/I18n): Remove.
1026 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1027 error messages, as done in yacc.c.
1028 Stay within the yy* pseudo namespace.
1029
00a8a083
AD
10302008-11-11 Akim Demaille <demaille@gostai.com>
1031
1032 More TODO.
1033 * TODO (single stack, yysyntax_error): New.
1034
09277875
AD
10352008-11-11 Akim Demaille <demaille@gostai.com>
1036
1037 Make it possible to return a symbol_type from yylex.
1038 * data/lalr1.cc (b4_lex_symbol_if): New.
1039 (parse): When lex_symbol is defined, expected yylex to return the
1040 complete lookahead.
1041 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1042 yylex interface.
1043 (bench_variant_parser): Exercise it.
1044
64c1b92a
AD
10452008-11-11 Akim Demaille <demaille@gostai.com>
1046
1047 Remove useless bench case.
1048 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1049 no longer used.
1050
2722aa42
AD
10512008-11-11 Akim Demaille <demaille@gostai.com>
1052
1053 Improve display of directives.
1054 * etc/bench.pl.in (parse_term): Don't add useless eol.
1055
918eb7c5
AD
10562008-11-11 Akim Demaille <demaille@gostai.com>
1057
1058 Use string_cast in the bench.
1059 * etc/bench.pl.in (generate_grammar_list): Define and use
1060 string_cast.
1061
39be9022
AD
10622008-11-11 Akim Demaille <demaille@gostai.com>
1063
1064 Replace yychar with a Boolean.
1065 * data/lalr1.cc (parse::yychar): Replace by...
1066 (parse::yyempty): this.
1067
a2e3fa77
AD
10682008-11-11 Akim Demaille <demaille@gostai.com>
1069
1070 Factor the tables.
1071 * TODO: New item.
1072
aba12ad1
AD
10732008-11-11 Akim Demaille <demaille@gostai.com>
1074
1075 Let yytranslate handle the eof case.
1076 * data/lalr1.cc (yytranslate_): Handle the EOF case.
1077 Adjust callers.
1078 No longer expect yychar to be equal to yyeof_, rather, test the
1079 lookahead's (translated) kind.
1080
27cb5b59
AD
10812008-11-11 Akim Demaille <demaille@gostai.com>
1082
1083 yychar cannot be empty in yyerrlab.
1084 * TODO (yychar == yyempty_): New.
1085 * data/lalr1.cc: Remove the handling of this case.
1086 This eases forthcoming changes related to yychar and yytranslate.
1087
fce629c0
AD
10882008-11-11 Akim Demaille <demaille@gostai.com>
1089
1090 Bench: syntactic sugar for %define/#define.
1091 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1092 (&bench_push_parser, bench_variant_parser): Use this feature.
1093 (&eat): New.
1094 Use it.
1095
ce671960
AD
10962008-11-11 Akim Demaille <demaille@gostai.com>
1097
1098 Less memory pressure on the "list" bench.
1099 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1100 the values, to limit memory pressure.
1101
2873fdf8
AD
11022008-11-11 Akim Demaille <demaille@gostai.com>
1103
1104 Introduce make_symbol.
b06df3c2
AD
1105 make_symbol provides a means to construct a full symbol (kind,
1106 value, location) in a single shot. It is meant to be a Symbol
1107 constructor, parameterized by the symbol kind so that overloading
1108 would prevent incorrect kind/value pairs. Unfortunately
1109 parameterized constructors do not work well in C++ (unless the
1110 parameter also appears as an argument, which is not acceptable),
1111 hence the use of a function instead of a constructor.
2df9ec37 1112
2873fdf8
AD
1113 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1114 (b4_symbol_constructor_declarations)
1115 (b4_symbol_constructor_specialization_)
1116 (b4_symbol_constructor_specializations)
1117 (b4_symbol_constructor_definition_)
1118 (b4_symbol_constructor_definitions): New.
1119 Use them where appropriate to generate declaration, declaration of
1120 the specializations, and implementations of the templated
1121 overloaded function "make_symbol".
1122 (variant::variant): Always define a default ctor.
1123 Also provide a copy ctor.
1124 (symbol_base_type, symbol_type): New ctor overloads for value-less
1125 symbols.
1126 (symbol_type): Now public, so that functions such as yylex can use
1127 it.
1128
8be046d7
AD
11292008-11-11 Akim Demaille <demaille@gostai.com>
1130
1131 Inform m4 whether a tag is a valid id.
1132 * src/output.c (is_identifier): New.
1133 (symbol_definitions_output): Use it to define tag_is_id.
1134 But maybe this should be done at m4 level?
1135
de62edee
AD
11362008-11-11 Akim Demaille <demaille@gostai.com>
1137
1138 Test 214 was failing: it greps with a pattern containing [ ]*
1139 which obviously meant to catch spaces and tabs, but contained only
1140 spaces. Tabulations in sources are a nuisance, so to simplify the
1141 matter, get rid of all the tabulations in the Java sources. The
1142 other skeletons will be treated equally later.
1143
1144 * data/java.m4, data/lalr1.java: Untabify.
1145 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1146 tabulations are no longer generated.
1147
905f0697
PB
11482008-11-11 Paolo Bonzini <bonzini@gnu.org>
1149
1150 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1151 * configure.ac: Adjust usage.
1152 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1153 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1154 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1155
09ccae9b
DJ
11562008-11-10 Di-an Jan <dianj@freeshell.org>
1157
1158 Workaround Java's ``code too large'' problem for parser tables
1159 in most cases, by using one function per initialization.
1160 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1161 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1162 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1163 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1164 (yytname_): Use b4_typed_parser_table.
1165 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1166 ``code too large'' error.
1167
1979121c
DJ
11682008-11-10 Di-an Jan <dianj@freeshell.org>
1169
1170 * NEWS: Document them.
de62edee 1171
1979121c
DJ
1172 General Java skeleton improvements.
1173 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1174 using gcj < 4.3 in the testsuite, according to comments in
1175 gnulib/m4/javacomp.m4.
1176 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1177 location_type, position_type): Remove extraneous brackets from
1178 b4_percent_define_default.
1179 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1180 m4_define and m4_define_default.
1181 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1182 which marks the end of user code with appropriate syncline, like all
1183 the other skeletons.
1184 (b4_user_post_prologue): Add. Don't silently drop.
1185 (yylex): Remove.
1186 (parse): Inline yylex.
1187 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1188 (%{...%}): Fix typo of %code imports.
1189 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1190
1191 Support annotations on parser class with %define annotations.
1192 * data/lalr1.java (annotations): Add to parser class modifier.
1193 * doc/bison.texinfo (Java Parser Interface): Document
1194 %define annotations.
1195 (Java Declarations Summary): Document %define annotations.
1196 * tests/java.at (Java parser class modifiers): Test annotations.
1197
1198 Do not generate code for %error-verbose unless requested.
1199 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1200 Make private. Make conditional on %error-verbose.
1201 (getErrorVerbose, setErrorVerbose): New.
1202 (yytnamerr_): Make conditional on %error-verbose.
1203 (yysyntax_error): Make some code conditional on %error-verbose.
1204 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1205 about %error-verbose having no effect.
1206 (getErrorVerbose, setErrorVerbose): Document.
1207
1208 Move constants for token names to Lexer interface.
1209 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1210 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1211 (parse): Qualify EOF to Lexer.EOF.
1212 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1213 EOF and token names to Java Lexer Interface.
1214 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1215
1216 Make yyerror public.
1217 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1218 (yyerror): Change to public. Add Javadoc comments. Use longer
1219 parameter names. Make the body rather than the declarator
1220 conditional on %locations.
1221 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1222
1223 Allow user to add code to the constructor with %code init.
1224 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1225 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1226 Add %code init to the front of the constructor body.
1227 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1228 and %define init_throws.
1229 (Java Declarations Summary): Document %code init and
1230 %define init_throws.
1231 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1232 (Java constructor init and init_throws): Add tests.
de62edee 1233
42f832d6
AD
12342008-11-10 Akim Demaille <demaille@gostai.com>
1235
1236 Update TODO.
1237 * TODO (-D): is implemented.
1238 (associativity): Same precedence must have the same associativity.
1239 For instance, how can a * b / c be parsed if * is %left and / is
1240 %right?
1241 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1242
247efe34
AD
12432008-11-10 Akim Demaille <demaille@gostai.com>
1244
1245 Formatting changes.
1246
5d731440
AD
12472008-11-10 Akim Demaille <demaille@gostai.com>
1248
1249 More information about the symbols.
1250 * src/output.c (type_names_output): Document all the symbols,
1251 including those that don't have a type-name.
1252 (symbol_definitions_output): Define "is_token" and
1253 "has_type_name".
1254 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1255 type-name, now that they are defined too in b4_type_names.
1256
21db118b
AD
12572008-11-10 Akim Demaille <demaille@gostai.com>
1258
1259 Regen.
1260
6ed15cde
AD
12612008-11-10 Akim Demaille <demaille@gostai.com>
1262
1263 Make parser::yytranslate static.
b06df3c2
AD
1264 Small speedup (1%) on the list grammar. And makes yytranslate_
1265 available in non member functions.
de62edee 1266
6ed15cde
AD
1267 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1268 function.
1269
30bb2edc
AD
12702008-11-10 Akim Demaille <demaille@gostai.com>
1271
1272 Avoid trailing spaces.
1273 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1274 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1275 they can be empty, and anyway this incorrectly indents the first
1276 action.
1277
b3a28fd4
AD
12782008-11-10 Akim Demaille <demaille@gostai.com>
1279
1280 Comment changes.
1281
914202bd
AD
12822008-11-10 Akim Demaille <demaille@gostai.com>
1283
1284 Use "enum" for integral constants.
1285 This is just nicer to read, I observed no speedup.
de62edee 1286
914202bd
AD
1287 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1288 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1289 (yyuser_token_number_max_, yyundef_token_): Move into...
1290 (yytranslate_): here.
1291
c17f9a4a
AD
12922008-11-10 Akim Demaille <demaille@gostai.com>
1293
1294 Shortcuts in bench directives.
1295 * etc/bench.pl.in (parse_dirs): New.
1296 Use it.
1297 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1298 Create the benches in "benches/".
1299
b9855ea5
AD
13002008-11-10 Akim Demaille <demaille@gostai.com>
1301
1302 Formatting changes.
1303 * data/lalr1.cc: here.
1304
6e097787
AD
13052008-11-10 Akim Demaille <demaille@gostai.com>
1306
1307 Adjust verbose message to using emacs.
1308 * etc/bench.pl.in: Inform compilation-mode when we change the
1309 directory.
1310 (generate_grammar_list): Recognize %define "variant" in addition
1311 to %define variant.
1312
4c3cc7da
AD
13132008-11-10 Akim Demaille <demaille@gostai.com>
1314
1315 Classify symbols by type-name.
1316 * src/uniqstr.h (UNIQSTR_CMP): New.
1317 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1318 (type_names_output): New.
1319 (muscles_output): Use it.
1320 * data/lalr1.cc (b4_symbol_action_): Remove.
1321 (b4_symbol_case_, b4_type_action_): New.
1322 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1323
d69c9694
AD
13242008-11-10 Akim Demaille <demaille@gostai.com>
1325
1326 Change the handling of the symbols in the skeletons.
1327 Before we were using tables which lines were the symbols and which
1328 columns were things like number, tag, type-name etc. It is was
1329 difficult to extend: each time a column was added, all the numbers had
1330 to be updated (you asked for colon $2, not for "tag"). Also, it was
1331 hard to filter these tables when only a subset of the symbols (say the
1332 tokens, or the nterms, or the tokens that have and external number
1333 *and* a type-name) was of interest.
de62edee 1334
d69c9694
AD
1335 Now instead of monolithic tables, we define one macro per cell. For
1336 instance "b4_symbol(0, tag)" is a macro name which contents is
1337 self-decriptive. The macro "b4_symbol" provides easier access to
1338 these cells.
de62edee 1339
d69c9694
AD
1340 * src/output.c (type_names_output): Remove.
1341 (symbol_numbers_output, symbol_definitions_output): New.
1342 (muscles_output): Call them.
1343 (prepare_symbols): Define b4_symbols_number.
1344
5263bea9
AD
13452008-11-10 Akim Demaille <demaille@gostai.com>
1346
1347 --trace=muscles
1348 * src/getargs.h, src/getargs.c (trace_muscle): New.
1349 (trace_types, trace_args): Support it.
1350 * src/output.c (output_skeleton): Use it.
1351
4175f6bb
AD
13522008-11-10 Akim Demaille <demaille@gostai.com>
1353
1354 muscles_output.
1355 * src/output.c (muscles_output): New, extracted from...
1356 (output_skeleton): here.
1357 Adjust.
1358
1de69d6a
AD
13592008-11-10 Akim Demaille <demaille@gostai.com>
1360
1361 Formatting changes.
1362
36db78a7
AD
13632008-11-10 Akim Demaille <demaille@gostai.com>
1364
1365 Update the variant example.
1366 * examples/variant.yy: Formatting changes.
1367 One stage build.
1368
e5eb92e7
AD
13692008-11-10 Akim Demaille <demaille@gostai.com>
1370
1371 Support constructor with an argument.
1372 This improves the "list" bench by 2%.
de62edee 1373
e5eb92e7
AD
1374 * data/lalr1.cc (variant::build): Add an overloaded version with
1375 an argument.
1376 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1377
76307410
AD
13782008-11-10 Akim Demaille <demaille@gostai.com>
1379
1380 Test variants.
1381 * tests/c++.at (AT_CHECK_VARIANTS): New.
1382 Use it with and without %define assert.
1383
d78f0ac9
AD
13842008-11-10 Akim Demaille <demaille@gostai.com>
1385
1386 Add %precedence support.
1387 Unfortunately it is not possible to reuse the %prec directive. This
1388 is because to please POSIX, we do not require to end the rules with a
1389 semicolon. As a result,
de62edee 1390
d78f0ac9 1391 foo: bar %prec baz
de62edee 1392
d78f0ac9
AD
1393 is ambiguous: either a rule which precedence is that of baz, or a rule,
1394 and then a declaration of the precedence of the token baz.
de62edee 1395
d78f0ac9
AD
1396 * doc/bison.texinfo: Document %precedence.
1397 (Precedence Only): New.
1398 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1399 * src/conflicts.c (resolve_sr_conflict): Support it.
1400 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1401 Parse it.
1402 * tests/calc.at: Use %precedence for NEG.
1403 * tests/conflicts.at (%precedence does not suffice)
1404 (%precedence suffices): New tests.
1405
c85be41a
AD
14062008-11-09 Akim Demaille <demaille@gostai.com>
1407
1408 Make benches in a sub dirs.
1409 * etc/bench.pl.in ($dir): New.
1410 Use it.
1411 Check the use of constructors with an argument.
1412 (bench_variant_parser): Fix.
1413
db65ca1f
AD
14142008-11-09 Akim Demaille <demaille@gostai.com>
1415
1416 fix eof condition
1417
9b0efa5b
AD
14182008-11-09 Akim Demaille <demaille@gostai.com>
1419
1420 Fix --help.
1421
432ac57a
AD
14222008-11-09 Akim Demaille <demaille@gostai.com>
1423
1424 Require the generation of parse-gram.output.
1425 * src/Makefile.am (YACC): Pass --report=all.
1426
deef2a0a
AD
14272008-11-09 Akim Demaille <demaille@gostai.com>
1428
1429 Formatting changes.
1430
df72984a
AD
14312008-11-09 Akim Demaille <demaille@gostai.com>
1432
1433 Update TODO.
1434 * TODO: Remove obsolete items.
1435 Update others.
1436
f10e19fd
AD
14372008-11-09 Akim Demaille <demaille@gostai.com>
1438
1439 Enhance bench.pl.
1440 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1441 (@token, $grammar, $bench): New.
1442 (generate_grammar_variant): Rename as...
1443 (generate_grammar_list): this.
1444 (generate_grammar): Adjust.
1445 (bench_grammar): Rename as...
1446 (bench): this.
1447 Use it in the various bench-marking routines.
1448 (-b, -g): New options.
1449
5de9c593
AD
14502008-11-09 Akim Demaille <demaille@gostai.com>
1451
1452 Use a static hierarchy for symbols in the C++ parser.
1453 * data/lalr1.cc (symbol_base_type, symbol_type)
1454 (stack_symbol_type): Make it a static hierarchy.
1455 Adjust dependencies.
1456
757f8f98
AD
14572008-11-09 Akim Demaille <demaille@gostai.com>
1458
1459 bench.pl -d, --directive.
1460 * etc/bench.pl.in (@directive): New.
1461 (&bench_grammar): Use it.
1462 (&bench_list_grammar): New, to provide access to the "variant"
1463 grammar.
1464 Use it.
1465 (getopts): Support -d, --directive.
1466
d3be4f6d
AD
14672008-11-09 Akim Demaille <demaille@gostai.com>
1468
1469 Use inline for small operations.
1470 * data/lalr1.cc (symbol_base_type, symbol_type)
1471 (stack_symbol_type): Declare constructor and other operations as
1472 inline.
1473 (yy_destroy_): Inline.
1474
1f7d007b
AD
14752008-11-09 Akim Demaille <demaille@gostai.com>
1476
1477 Introduce a hierarchy for symbols.
1478 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1479 (data_type): Rename as...
1480 (stack_symbol_type): this.
1481 Derive from symbol_base_type.
1482 (yy_symbol_value_print_): Merge into...
1483 (yy_symbol_print_): this.
1484 Rename as...
1485 (yy_print_): this.
1486 (yydestruct_): Rename as...
1487 (yy_destroy_): this.
1488 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1489 (parser::parse): yyla is now of symbol_type.
1490 Use its type member instead of yytoken.
1491
bc0b0477
AD
14922008-11-09 Akim Demaille <demaille@gostai.com>
1493
1494 Rename data_type and stack_symbol_type.
1495 * data/lalr1.cc (data_type): Rename as...
1496 (stack_symbol_type): this.
1497
57295d14
AD
14982008-11-09 Akim Demaille <demaille@gostai.com>
1499
1500 Handle semantic value and location together.
1501 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1502 yydata.value and yydata.location.
1503 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1504 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1505 single arg.
1506 Adjust all callers.
1507 (yydestruct_): New overload for a stack symbol.
1508
e9b0834e
AD
15092008-11-09 Akim Demaille <demaille@gostai.com>
1510
1511 Push a complete symbol, not connected parts.
1512 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1513 state, value and location.
1514 Adjust callers.
1515
6082531a
AD
15162008-11-09 Akim Demaille <demaille@gostai.com>
1517
1518 Agregate yylval and yylloc.
1519 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1520 (parser::yyla): this.
1521
33c195cc
AD
15222008-11-09 Akim Demaille <demaille@gostai.com>
1523
1524 Rely on the state stack to display reduction traces.
b06df3c2
AD
1525 To display rhs symbols before a reduction, we used information
1526 about the rule reduced, which required the tables yyrhs and
1527 yyprhs. Now use rely only on the state stack to get the same
1528 information.
de62edee 1529
33c195cc
AD
1530 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1531 Use them.
1532 (parser::yyrhs_, parser::yyprhs_): Remove.
1533 (parser::yy_reduce_print_): Use the state stack.
1534
e1f93869
AD
15352008-11-09 Akim Demaille <demaille@gostai.com>
1536
1537 Fuse yyval and yyloc into yylhs.
1538 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1539 yylhs.
1540 (parse): Replace yyval and yyloc with yylhs.value and
1541 yylhs.location.
1542 After a user action, compute yylhs.state earlier.
1543 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1544 fresh error_token.
1545
2935744b
DJ
15462008-11-09 Di-an Jan <dianj@freeshell.org>
1547
1548 Remove unused variable.
1549 * src/output.c (type_names_output): Remove unused variable sep.
1550
bbf9ca37
PB
15512008-11-09 Paolo Bonzini <bonzini@gnu.org>
1552
1553 Change tests/output.at quoting.
1554 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1555 expanding arguments.
1556
d9a9b96b
JD
15572008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1558
1559 Don't add a semicolon to actions for %skeleton or %language.
1560 It breaks Java test cases as reported by Akim Demaille.
1561 * src/scan-code.l: Implement.
1562
51365192
JD
15632008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1564
1565 Clean up %skeleton and %language priority implementation.
1566 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1567 remove static qualifier because others will soon need to see it.
1568 (language_prio): Likewise.
1569 (getargs): Use command_line_prio rather than 0.
1570 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1571 enum fields.
1572 (skeleton_prio): Extern it.
1573 (language_prio): Extern it.
1574 * src/parse-gram.y: Use grammar_prio rather than 1.
1575
9380cfd0
AD
15762008-11-07 Akim Demaille <demaille@gostai.com>
1577
1578 Moving push traces into yypush_.
1579 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1580 Adjust all uses.
1581
8901f32e
AD
15822008-11-07 Akim Demaille <demaille@gostai.com>
1583
1584 The single-stack C++ parser is now the standard one.
1585 * data/lalr1.cc: Rename as...
1586 * data/lalr1-split.cc: this.
1587 * data/lalr1-fusion.cc: Rename as...
1588 * data/lalr1.cc: this.
1589 * etc/bench.pl.in: Adjust.
1590
8cdabf02
AD
15912008-11-07 Akim Demaille <demaille@gostai.com>
1592
1593 Avoid empty-if warnings.
1594 Reported by Quentin Hocquet.
de62edee 1595
8cdabf02
AD
1596 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1597 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1598
5a893c2b
AD
15992008-11-07 Akim Demaille <demaille@gostai.com>
1600
1601 Pass command line location to skeleton_arg and language_argmatch.
1602 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1603 The location argument is now mandatory.
1604 Adjust all dependencies.
1605 (getargs): Use command_line_location.
1606
58697c6d
AD
16072008-11-07 Akim Demaille <demaille@gostai.com>
1608
1609 -D, --define.
1610 * src/getargs.c (usage): Document -D.
1611 Fix help string for --locations.
1612 (command_line_location): New.
1613 (short_options, long_options, getargs): Support -D, --define.
1614 (getargs): Move -d support at the right place.
1615 * doc/bison.texinfo (Bison Options): Update.
1616 * tests/input.at (%define, --define): New.
1617
9fe5a457
AD
16182008-11-07 Akim Demaille <demaille@gostai.com>
1619
1620 Initialize the muscle table before parsing the command line.
1621 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1622 (getargs): Define file_name.
1623 * src/main.c (main): Initialize muscle_tab before calling
1624 getargs.
1625 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1626 its value is not available yet.
1627
56c5eca9
AD
16282008-11-07 Akim Demaille <demaille@gostai.com>
1629
1630 Locations without columns for command line arguments.
1631 * src/location.c (location_print): Don't display negative columns.
1632 * src/location.h: Document this.
1633
9b9e0a7d
AD
16342008-11-07 Akim Demaille <demaille@gostai.com>
1635
1636 Fix --help.
1637 * src/getargs.c (usage): Fix help string for -W.
1638
74eae918
AD
16392008-11-07 Akim Demaille <demaille@gostai.com>
1640
1641 Handle more general types of option arguments.
1642 * build-aux/cross-options.pl: The argument ends at the first
1643 space, not the first non-symbol character.
1644 Use @var for each word appearing the argument description.
1645
a3d4c6fb
AD
16462008-11-07 Akim Demaille <demaille@gostai.com>
1647
1648 Destroy the variants that remain on the stack in case of error.
1649 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1650 destructor.
1651 Display the value only if yymsg is nonnull.
1652 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1653
2d32fc9f
AD
16542008-11-07 Akim Demaille <demaille@gostai.com>
1655
1656 Add "%define assert" to variants.
1657 This is used to help the user catch cases where some value gets
1658 ovewritten by a new one. This should not happen, as this will
1659 probably leak.
de62edee 1660
2d32fc9f
AD
1661 Unfortunately this uncovered a bug in the C++ parser itself: the
1662 lookahead value was not destroyed between two calls to yylex. For
1663 instance if the previous lookahead was a std::string, and then an int,
1664 then the value of the std::string was correctly taken (i.e., the
1665 lookahead was now an empty string), but std::string structure itself
1666 was not reclaimed.
de62edee 1667
2d32fc9f
AD
1668 This is now done in variant::build(other&) (which is used to take the
1669 value of the lookahead): other is not only stolen from its value, it
1670 is also destroyed. This incurs a new performance penalty of a few
1671 percent, and union becomes faster again.
de62edee 1672
2d32fc9f
AD
1673 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1674 (b4_variant_if): New.
1675 (variant::built): New.
1676 Use it whereever the status of the variant changes.
1677 * etc/bench.pl.in: Check the penalty of %define assert.
1678
f6038cb8
AD
16792008-11-07 Akim Demaille <demaille@gostai.com>
1680
1681 Use "%define variant" in bench.pl.
1682 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1683 just use %define variants.
1684
ccde1f98
AD
16852008-11-07 Akim Demaille <demaille@gostai.com>
1686
1687 Regen.
1688 * src/parse-gram.h, src/parse-gram.c: Regen.
1689
58bd33b7
JD
16902008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1691
1692 Fix user actions without a trailing semicolon.
1693 Reported by Sergei Steshenko at
1694 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1695 * THANKS (Sergei Steshenko): Add.
1696 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1697 * tests/regression.at (Fix user actions without a trailing semicolon):
1698 New test case.
1699
639867b5
AD
17002008-11-04 Akim Demaille <demaille@gostai.com>
1701
1702 Use b4_copyright_years.
1703 * data/yacc.c (b4_copyright_years): New.
1704 Fix its value according to the comments in the file.
1705 Use it and undefine it.
1706
3c262606
AD
17072008-11-04 Akim Demaille <demaille@gostai.com>
1708
1709 Formatting changes.
1710 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1711
a2b93d52
AD
17122008-11-04 Akim Demaille <demaille@gostai.com>
1713
1714 Formatting changes.
1715 * data/lalr1-fusion.cc: here.
1716
3a2803df
AD
17172008-11-04 Akim Demaille <demaille@gostai.com>
1718
1719 Use strict on bench.pl.
1720 * etc/bench.pl.in (&run, &generate_grammar): New.
1721 Rename the grammar generating functions for consistency.
1722 Change the interface so that the list of benches to run is passed
1723 as (optionless) arguments.
1724 (&compile): Use &run.
1725
a0d4650a
AD
17262008-11-04 Akim Demaille <demaille@gostai.com>
1727
1728 Remove spurious initial empty lines.
1729 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1730 * data/yacc.c: End the @output lines with an @.
1731
cac9e09b
AD
17322008-11-04 Akim Demaille <demaille@gostai.com>
1733
1734 Improve the display of sizes.
1735 * etc/bench.p.in: Higher precision.
1736 Sort by decreasing size.
1737
4af4348a
AD
17382008-11-04 Akim Demaille <demaille@gostai.com>
1739
1740 Don't memcpy C++ structures.
1741 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1742 arguments.
1743 (variant::build): New overload for
1744 copy-construction-that-destroys.
1745 (variant::swap): New.
1746 (parser::yypush_): Use it in variant mode.
1747
ef05c4d6
AD
17482008-11-04 Akim Demaille <demaille@gostai.com>
1749
1750 Better defaults for bench.pl.
1751 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1752 default values.
1753 Adjust &verbose uses.
1754 (-q, --quiet): New.
1755
9718cfa9
AD
17562008-11-04 Akim Demaille <demaille@gostai.com>
1757
1758 Make variant.yy more complex.
1759 std::list cannot be copied via memcpy, they are more demanding than
1760 std::string. Use one std::list to strengthen the test.
de62edee 1761
9718cfa9
AD
1762 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
1763 Adjust.
1764 Create a list of strings, instead of a single large string.
1765
a6df593d
AD
17662008-11-04 Akim Demaille <demaille@gostai.com>
1767
1768 bench.pl --bench.
1769 * etc/bench.pl.in (--bench, $bench): New.
1770
006a0303
AD
17712008-11-04 Akim Demaille <demaille@gostai.com>
1772
1773 Sort methods.
1774 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
1775 Define it after as().
1776
faef3466
AD
17772008-11-04 Akim Demaille <demaille@gostai.com>
1778
1779 Useless parens.
1780 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
1781
2141aded
AD
17822008-11-04 Akim Demaille <demaille@gostai.com>
1783
1784 Issue missing synclines after user actions.
1785 * data/c.m4 (b4_case): Issue synclines on the output file.
1786
e426d17b
AD
17872008-11-04 Akim Demaille <demaille@gostai.com>
1788
1789 Remove trailing empty line.
1790 * data/lalr1-fusion.cc: Don't add an empty line after the user's
1791 epilogue.
1792
a9ce3f54
AD
17932008-11-04 Akim Demaille <demaille@gostai.com>
1794
1795 Fix output of copyright years.
1796 * data/bison.m4 (b4_copyright): Fix the indentation of the
1797 copyright year paragraph.
1798 Use b4_copyright_years when no years are given.
1799 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
1800 (b4_copyright_years): New.
1801 Use it.
1802
59c544c2
AD
18032008-11-04 Akim Demaille <demaille@gostai.com>
1804
1805 Avoid the spurious initial empty line.
1806 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
1807 the end of @output request to suppress the empty line that
1808 results.
1809
96b15448
AD
18102008-11-04 Akim Demaille <demaille@gostai.com>
1811
1812 Remove parser::rhs_number_type.
1813 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
1814 (yyrhs_): Use b4_table_define.
1815
f0633174
AD
18162008-11-04 Akim Demaille <demaille@gostai.com>
1817
1818 Fix iteration type.
1819 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
1820
417b8004
AD
18212008-11-04 Akim Demaille <demaille@gostai.com>
1822
1823 Factor the declaration of the integer tables.
1824 * data/lalr1-fusion.cc (b4_table_define): New.
1825 Use it.
1826
1a5246c6
AD
18272008-11-03 Akim Demaille <demaille@gostai.com>
1828
1829 Fix indentation of tables in lalr1.cc
1830 * data/lalr1-fusion.cc: Fix the indentation.
1831
f8a95c9c
AD
18322008-11-03 Akim Demaille <demaille@gostai.com>
1833
1834 Destroy the lhs symbols after reduction.
1835 * data/lalr1-fusion.cc (parse): After the user action, when in
1836 variant mode, destroy the lhs symbols.
1837
d7f4d823
AD
18382008-11-03 Akim Demaille <demaille@gostai.com>
1839
1840 Simplify yysyntax_error_ use.
1841 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
1842 type, but make it unnamed in the declaration when it is not used.
1843
8b9c89fb
AD
18442008-11-03 Akim Demaille <demaille@gostai.com>
1845
1846 Let yy::variant::build return an lvalue.
1847 * data/lalr1-fusion.cc (variant::build): Return a reference to the
1848 object.
1849
83243c24
AD
18502008-11-03 Akim Demaille <demaille@gostai.com>
1851
1852 Define yy::variant only when needed.
1853 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
1854 used.
1855
429b4848
AD
18562008-11-03 Akim Demaille <demaille@gostai.com>
1857
1858 Bench the three-stack lalr1.cc.
1859 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
1860 one-stack one.
1861
414c76a4
AD
18622008-11-03 Akim Demaille <demaille@gostai.com>
1863
1864 Fail on parse error in calc++.
1865 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
1866 status.
1867 * examples/calc++/test ($me, $number, $exit, run): New.
1868 Use them to propagate errors to the exit status.
1869
8a5783fd
AD
18702008-11-03 Akim Demaille <demaille@gostai.com>
1871
1872 Don't specify the skeleton twice in the example.
1873 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
1874 file does what is needed.
1875
0cc5bead
AD
18762008-11-03 Akim Demaille <demaille@gostai.com>
1877
1878 bench: Improve output.
1879 * etc/bench.pl.in (bench_grammar): Tune the printf format.
1880
5b421a4e
AD
18812008-11-03 Akim Demaille <demaille@gostai.com>
1882
1883 bench: check impact of %debug on variants.
1884 * etc/bench.pl.in (variant_grammar): Fix the computation of
1885 $variant.
1886 Generate a grammar file that can work with or without %debug.
1887 Do use the @directive.
1888 (bench_variant_parser): Check impact of %debug.
1889 (@directives): Rename all the occurrences to...
1890 (@directive): this, for consistency.
1891
d11ee647
AD
18922008-11-03 Akim Demaille <demaille@gostai.com>
1893
1894 bench: report the size too.
1895 * etc/bench.pl.in ($iterations): Defaults to -3.
1896 (&bench_grammar): Require hireswallclock.
1897 Compute and display the size of the result.
1898 More comments.
1899
e1b74b92
AD
19002008-11-03 Akim Demaille <demaille@gostai.com>
1901
1902 bench: More use of the verbosity level.
1903 * etc/bench.pl.in ($verbose, &verbose): New.
1904 Use them.
1905 More POD documentation.
1906
7e5f9c54
AD
19072008-11-03 Akim Demaille <demaille@gostai.com>
1908
1909 bench.pl: a command line interface
1910 * etc/bench.pl.in: More doc.
1911 Some fixes in the documentation.
1912 ($cflags, $iterations, &help, &getopt): New.
1913 Use them.
1914 (&variant_grammar): Let the number of stages be 10 times what is
1915 specified.
1916
7109a18d
AD
19172008-11-03 Akim Demaille <demaille@gostai.com>
1918
1919 Bench the use of Boost.Variants.
1920 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
1921 New.
1922 (&compile): Be ready to compile C++ parsers.
1923 (&bench_push_parser): Move debug information to the outermost
1924 level.
1925 * THANKS: Add Michiel De Wilde.
1926
922730fe
AD
19272008-11-03 Akim Demaille <demaille@gostai.com>
1928
1929 bench.pl: Pass directives as a list instead of as a string.
1930 * etc/bench.pl.in (&directives): New.
1931 (&triangular_grammar, &calc_grammar): Use it to format the Bison
1932 directives.
1933 (&triangular_grammar): Do use the directives (were ignored).
1934 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
1935 directives.
1936
7484f1d4
AD
19372008-11-03 Akim Demaille <demaille@gostai.com>
1938
1939 Improve genericity of bench.pl.
1940 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
1941 argument.
1942 (&bench_push_parser): New.
1943 Call it.
1944
15129f25
AD
19452008-11-03 Akim Demaille <demaille@gostai.com>
1946
1947 Add documentation to bench.pl.
1948 * etc/bench.pl.in: Comment changes.
1949
0e0ed236
AD
19502008-11-03 Akim Demaille <demaille@gostai.com>
1951
1952 Fuse the three stacks into a single one.
de62edee 1953
b06df3c2
AD
1954 In order to make it easy to perform benchmarks to ensure that
1955 there are no performance loss, lalr1.cc is forked into
1956 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
1957 lalr1.cc.
1958
1959 Meanwhile, to make sure that lalr1-fusion.cc is correctly
1960 exercized by the test suite, the user must install a symbolic link
1961 from lalr1.cc to it.
de62edee 1962
b06df3c2
AD
1963 Instead of having three stacks (state, value, location), use a
1964 stack of triples. This considerably simplifies the code (and it
1965 will be easier not to require locations as currently does the C++
1966 parser), and also gives a 10% speedup according to
1967 etc/bench (probably mainly since memory allocation is done once
1968 instead of three times).
de62edee 1969
0e0ed236
AD
1970 Another motivation is to make it easier to destruct properly
1971 semantic values: now that they are bound to their state (hence
1972 symbol type) it will be easier to call the appropriate destructor.
de62edee 1973
0e0ed236 1974 These changes should probably benefit the C parser too.
de62edee 1975
b06df3c2
AD
1976 * data/lalr1.cc: Copy as...
1977 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
1978 (b4_rhs_value, b4_rhs_location): New definitions overriding those
1979 from c++.m4.
1980 (state_stack_type, semantic_stack_type, location_stack_type)
1981 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
1982 (data_type, stack_type, yystack_): New.
1983 (YYLLOC_DEFAULT, yypush_): Adjust.
1984 (yyerror_range): Now based on data_type, not location_type.
1985
7dedf26e
AD
19862008-11-03 Akim Demaille <demaille@gostai.com>
1987
1988 Push the state, value, and location at the same time.
1989 This is needed to prepare a forthcoming patch that fuses the three
1990 stacks into one.
de62edee 1991
7dedf26e
AD
1992 * data/lalr1.cc (parser::yypush_): New.
1993 (parser::yynewstate): Change the semantics: instead of arriving to
1994 this label when value and location have been pushed, but yystate
1995 is to be pushed on the state stack, now the three of them must
1996 have been pushed before. yystate still must be the new state.
1997 This allows to use yypush_ everywhere instead of individual
1998 handling of the stacks.
1999
c4585f1e
AD
20002008-11-03 Akim Demaille <demaille@gostai.com>
2001
2002 Prefer references to pointers.
2003 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2004 definition to use references instead of pointers.
2005 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2006 Take the value and location as references.
2007 Adjust callers.
2008
56017c17
AD
20092008-11-03 Akim Demaille <demaille@gostai.com>
2010
2011 stack::size instead of stack::height.
2012 * data/lalr1.cc (stack::height): Rename as...
2013 (stack::size): this.
2014 Fix the output type.
2015 Comment changes.
2016
5ab8c47b
AD
20172008-11-03 Akim Demaille <demaille@gostai.com>
2018
2019 Use variants to support objects as semantic values.
b06df3c2
AD
2020 This patch was inspired by work by Michiel De Wilde. But he used
2021 Boost variants which (i) requires Boost on the user side, (ii) is
2022 slow, and (iii) has useless overhead (the parser knows the type of
2023 the semantic value there is no reason to duplicate this
2024 information as Boost.Variants do).
2025
2026 This implementation reserves a buffer large enough to store the
2027 largest objects. yy::variant implements this buffer. It was
2028 implemented with Quentin Hocquet.
de62edee 2029
5ab8c47b
AD
2030 * src/output.c (type_names_output): New.
2031 (output_skeleton): Invoke it.
2032 * data/c++.m4 (b4_variant_if): New.
2033 (b4_symbol_value): If needed, provide a definition for variants.
2034 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2035 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2036 (b4_char_sizeof, yy::variant): New.
2037 (parser::parse): If variants are requested, define
2038 parser::union_type, parser::variant, change the definition of
2039 semantic_type, construct $$ before running the user action instead
2040 of performing a default $$ = $1.
2041 * examples/variant.yy: New.
2042 Based on an example by Michiel De Wilde.
2043
1fa5d8bb
AD
20442008-11-03 Akim Demaille <demaille@gostai.com>
2045
2046 Parameterize the extraction of semantic values.
2047 To make future changes easier, no longer rely on ".TYPE" being the
2048 way to get a semantic value.
de62edee 2049
1fa5d8bb
AD
2050 * data/c.m4 (b4_symbol_value): New.
2051 Use it.
2052 * data/c++.m4, data/yacc.c: Use it.
2053 * data/glr.c: Use b4_symbol_value.
2054 (b4_rhs_data): New.
2055 Use it.
2056
91ba8a55
AD
20572008-11-03 Akim Demaille <demaille@gostai.com>
2058
2059 Prepare easier M4 changes.
2060 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2061 future changes.
2062
c9ba9e59
JD
20632008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2064
2065 Initiate further development.
2066 * NEWS: Create an empty section for new entries.
2067 * gnulib: Update submodule to HEAD.
2068
bfb40910
JD
20692008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2070
2071 * NEWS: Version 2.4.
2072
241fda7a
JD
20732008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2074
2075 Prepare for next release.
2076 * NEWS: Briefly mention changes since 2.3b.
2077 * README: Say GNU m4 1.4.6, which we've been requiring in release
2078 announcements already, not 1.4.3, which breaks the build.
2079
ed4d67dc
JD
20802008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2081
2082 Say %language is experimental.
2083 We're thinking of extending it's effect on output file naming. See the
2084 thread at
2085 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2086 * NEWS: Say it's experimental.
2087 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2088 recommend it over %skeleton for now.
2089 (Bison Options): Likewise.
2090 (C++ Bison Interface): Use %skeleton not %language.
2091 (Calc++ Parser): Use %skeleton not %language.
2092 * src/getargs.c (usage): Say it's experimental.
2093
e254a580
DJ
20942008-11-01 Di-an Jan <dianj@freeshell.org>
2095 Paolo Bonzini <bonzini@gnu.org>
2096
2097 Support all Java parser class modifiers.
2098 * data/java.m4 (b4_percent_define_get3): New.
2099 (b4_final_if, b4_strictfp_if): New.
2100 * data/lalr1.java (final, strictfp, extends, implements): Support.
2101 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2102 documentation.
2103 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2104 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2105 (AT_CHECK_JAVA_GREP): New.
2106 (Java parser class modifiers): New test.
2107 (Java parser class extends and implements): New test.
2108
2109 Model exception propagation better with throws and lex_throws.
2110 * data/java.m4 (b4_list2): New.
2111 (throws): Change default.
2112 * data/lalr1.java (yyaction): Add throws.
2113 (parse): Add lex_throws in addition to throws.
2114 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2115 * tests/java.at (Java throws specifications): New test.
2116
2117 Improve documentation for Java parsers.
2118 * doc/bison.texinfo (Java Parsers): Add subsections.
2119 Don't quote first argument of %define.
2120 (Java Bison Interface): Document output files. Move documentation
2121 of parser class and merge into Java Parser Interface. Document
2122 features that error out. Document directives with no effect.
2123 Move note about Javadoc higher.
2124 (Java Semantic Values): Explicitly mention stype.
2125 Document that generic types cannot be used.
2126 (Java Location Values): Use @deftypeivar. Document constructors.
2127 Correct return value for toString.
2128 (Java Parser Interface): List undocumented constants/fields.
2129 Move documentation of fields added by %parse-param closer to list
2130 of members. Document that token names are added as fields.
2131 Document constructors accurately. Remove error method.
2132 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2133 Interface. Describe %code lexer and yylex accutately.
2134 Remove documentation that does not match the code.
2135 (Java Action Features): New.
2136 (Java Differences): Add reference. Add item on semantic values.
2137 Add note about @{ ... @}. Clarify %% epilogue placement.
2138 (Java Declarations Summary): New.
2139
2140 Fix Java skeleton.
2141 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2142 (b4_remove_comma): Quote test argument.
2143 (b4_identification): Remove "bison" field.
2144 * tests/java.at (Java parser class and package names): New test.
2145 (Java %parse-param and %lex-param): New test.
2146 (Java stype, position_class and location_class): New test.
2147
f259e4e6
PB
21482008-10-31 Di-an Jan <dianj@freeshell.org>
2149
2150 * data/lalr1.jave: Update copyright years.
2151 (YYParser): Correct name of "generated from" file in Javadoc:
2152 use b4_file_name instead of @ofile@.
2153 (Location constructor): Correct Javadoc parameter name.
2154 (yylloc): Add missing opening m4 quote after b4_location_if.
2155 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2156 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2157 (YYParser constructor): Correct Javadoc parameter name.
2158
cae5057f
JD
21592008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2160
2161 Always put auxiliary code files in the same dir as other output files.
2162 * src/files.c (compute_file_name_parts): When the user specifies
2163 --output but not --file-prefix, extract the directory prefix from the
2164 file prefix not from the grammar file name. This affects the location
2165 of files like location.hh generated by the C++ skeleton. The includes
2166 in the other output files require this fix.
2167 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2168 for expected output files.
2169 (Output files): Add a test for the above.
2170
4af432ba
JD
21712008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2172
2173 * gnulib: Update submodule to HEAD.
2174
e26d4e43
JD
21752008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2176
2177 Update copyright year.
2178 * src/files.c: Here.
2179
c0ee9e21
DJ
21802008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2181
2182 Don't overwrite the input file.
2183 * src/files.c (output_file_name_check): Fatal error if using input file
2184 for output.
2185 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2186 argument.
2187 (Conflicting output files): Add test.
2188
482dc52f
AD
21892008-10-28 Akim Demaille <demaille@gostai.com>
2190
2191 Space changes.
2192 * data/lalr1.cc: Formatting changes.
2193
52cbbe84
AD
21942008-10-28 Akim Demaille <demaille@gostai.com>
2195
2196 Don't define debugging functions when !YYDEBUG.
2197 * data/lalr1.cc (debug_stream, set_debug_stream)
2198 (debug_level_type, debug_level, set_debug_level): Don't
2199 declare them when YYDEBUG is not defined.
2200 The implementation are already YYDEBUG-aware.
2201
0925d5bf
AD
22022008-10-28 Akim Demaille <demaille@gostai.com>
2203
2204 Prefer "continue" for empty loop bodies.
2205 * etc/bench.pl.in: Use "continue" instead of {}.
2206
cf98343c
AD
22072008-10-28 Akim Demaille <demaille@gostai.com>
2208
2209 Space and comments changes.
2210 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2211 * data/c.m4, data/lalr1.cc: Space changes.
2212
9f467b7d
AD
22132008-10-28 Akim Demaille <demaille@gostai.com>
2214
2215 Make gnulib a submodule.
2216 * gnulib: New.
2217 * .gitmodules (gnulib): New.
2218
0f0e1ace
JD
22192008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2220
2221 Fix yyerror_range for user-defined location type in C++. Reported by
2222 Georg Sauthoff at
2223 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2224 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2225 * THANKS (Georg Sauthoff): Add.
2226
548e2104
JD
22272008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2228
2229 Update several administrative files mainly to facilitate releasing.
2230 * HACKING (Administrivia): Make the git-merge-changelog notes more
2231 helpful.
2232 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2233 (Release Procedure): Update for git and add numerous details that were
2234 previously missing.
2235 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2236 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2237 that announcements don't claim we bootstrapped with whatever bison
2238 happened to be in PATH. Add flex as a bootstrap tool.
2239 * Makefile.maint: Remove, previously replaced by maint.mk.
2240 * Makefile.cfg: Remove, and migrate settings to...
2241 * cfg.mk: ... here for the sake of `make announcement'.
2242 * bootstrap.conf (gnulib_modules): Add announce-gen.
2243 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2244 Berry.
2245
ddf17a6e
PB
22462008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2247
2248 Small but important bugfixes for the Java skeleton.
2249 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2250 (yy_symbol_print): Call toString on yyvaluep.
2251
e1145ad8
AD
22522008-08-29 Akim Demaille <demaille@gostai.com>
2253
2254 Clarify UPDATED use.
215b40ac 2255 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 2256 not to the release date of Bison.
215b40ac 2257 Reported by Joel E. Denny.
e1145ad8 2258
0df72d78
AD
22592008-08-29 Akim Demaille <demaille@gostai.com>
2260
2261 * README: Update FAQ pointer.
2262 Reported by Joel E. Denny.
2263
9a90b6bb
EB
22642008-08-27 Eric Blake <ebb9@byu.net>
2265
2266 Resync m4sugar from autoconf.
2267 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2268 (m4_init): Adjust to latest m4.git changes.
2269 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2270 effects.
2271 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2272 (_m4_list_cmp): Reduce side effects.
2273
65015668
AD
22742008-08-27 Akim Demaille <demaille@gostai.com>
2275
2276 Check yyerrok in calc.at.
215b40ac
EB
2277 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2278 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2279 expected.
65015668 2280
98e26a92
AD
22812008-08-27 Akim Demaille <demaille@gostai.com>
2282
2283 Support yyerrok in lalr1.cc.
2284 YYBACKUP is still to import back into lalr1.cc.
215b40ac 2285 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 2286
86c0e784
JD
22872008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2288
2289 For maintainer-check*, don't recompile for a $(VERSION) update.
2290 * cfg.mk: New file.
2291 (_is-dist-target): Override the one in GNUmakefile.
2292 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2293
88511166
JD
22942008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2295
2296 Update for recent change to gnulib.
2297 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2298 string.h now.
2299
6bbb2ed5
EB
23002008-08-15 Eric Blake <ebb9@byu.net>
2301
d67c52e8
EB
2302 Remaining m4sugar merge from autoconf.
2303 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2304 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2305 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2306 * src/output.c (output_skeleton): Tell m4 how to find it.
2307
6bbb2ed5
EB
2308 Partial m4sugar merge from autoconf: m4_map.
2309 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2310 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2311 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2312 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2313 for empty list.
2314 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2315 Likewise.
2316 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2317 declares it.
2318
8dce3875
JD
23192008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2320
2321 Keep .version and PACKAGE_VERSION in sync.
2322 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2323 dependency, and add comments justifying this in more detail. Discussed
2324 starting at
2325 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2326
882a1fbf
EB
23272008-08-06 Eric Blake <ebb9@byu.net>
2328
a3764451
EB
2329 Partial m4sugar merge from autoconf: m4_shiftn.
2330 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2331 (m4_shift2, m4_shift3): New macros.
2332 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2333 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2334 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2335 * data/java.m4 (b4_remove_comma): Likewise.
2336
882a1fbf
EB
2337 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2338 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2339 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2340 (m4_init): Consolidate wrapped text into single m4_wrap.
2341 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2342 in wrapped text.
2343
a30e920d
EB
23442008-08-05 Eric Blake <ebb9@byu.net>
2345
dfcc5959
EB
2346 Partial m4sugar merge from autoconf: builtins, version.m4.
2347 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2348 (m4_prepend): Remove, as it is unused and inherently quadratic,
2349 whereas m4_append is linear in newer m4.
2350 (m4_mkstemp): New builtin.
2351 (m4_symbols): Make rename conditional.
2352 (m4_version_prereq): Ensure fatal error if used in bison, which
2353 intentionally lacks version.m4.
2354
a30e920d
EB
2355 Fix comments in m4sugar.
2356 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2357
445b7470
JD
23582008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2359
2360 Update for recent .gitignore fix in Gnulib.
2361 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2362 anchored .gitignore entries.
2363
a1e50014
JD
23642008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2365
2366 Set gnu or gnits strictness.
2367 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2368 development and gnits strictness for releases. Based on Eric Blake's
2369 suggestion at
2370 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2371
d43f77e7
PB
23722008-07-31 Paolo Bonzini <bonzini@gnu.org>
2373
2374 * NEWS: Clarify documentation of %language.
2375
fee2ed87
PB
23762008-07-31 Paolo Bonzini <bonzini@gnu.org>
2377
2378 Support usage of git-merge-changelog.
2379 * .gitattributes: New.
2380 * HACKING: Document usage of git-merge-changelog.
2381 * bootstrap: Install git-merge-changelog entries in .git/config
2382 if appropriate.
2383
78029cd5
JD
23842008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2385
2386 Remove remaining dependence on CVS Id keyword.
2387 * ChangeLog: For the sake of people still using CVS, don't use dollars
2388 when mentioning Id.
2389 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2390 unusual anyway.
2391 * data/xslt/xml2dot.xsl: Likewise.
2392 * data/xslt/xml2text.xsl: Likewise.
2393 * data/xslt/xml2xhtml.xsl: Likewise.
2394 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2395 * doc/Makefile.am (neutralize): Remove, no longer needed.
2396 (.x.1): Don't use neutralize.
2397 (edit): Don't substitute for ID.
2398 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2399
c53d18b1
JD
24002008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2401
2402 Fix dependence on computed configure variables.
2403 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2404 $(top_srcdir)/configure.ac so that changes to computed variables, such
2405 as PACKAGE_VERSION, are seen.
2406 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2407
5523ac79
JD
24082008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2409
2410 Update copyright dates for recent changes.
2411 * Makefile.am: Here.
2412 * src/Makefile.am: Here.
2413 * src/reduce.c: Here.
2414 * tests/reduce.at: Here.
2415
8fa36911
JD
24162008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2417
2418 Use git-version-gen for version names between releases.
2419 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2420 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2421 * .prev-version: New.
2422 * .version.in: Remove.
78029cd5 2423 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
2424 revision.
2425 * GNUmakefile: Remove, now copied from Gnulib.
2426 * Makefile.am: Add code suggested by comments in
2427 build-aux/git-version-gen.
2428 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2429 .prev-version, and .version.
2430 * NEWS (2.3b+): Rename to...
2431 (?.?): ... this because we're dropping the "+" version naming scheme,
2432 but, in general, we still can't be sure of our next release name.
2433 * bootstrap: Add a quick hack to remove from .gitignore the
2434 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2435 entry. This should really be fixed in gnulib instead.
2436 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2437 * configure.ac (AC_INIT): Set version name by invoking
2438 build-aux/git-version-gen.
2439 (AC_CONFIG_FILES): Remove .version, now generated by
2440 build-aux/git-version-gen.
2441 * maint.mk: New, copied from coreutils.
2442 * doc/.cvsignore (bison.1): Add.
2443 * doc/.gitignore (/bison.1): Add.
2444 * doc/bison.1: Remove, generated.
2445 * src/.cvsignore (revision.c): Remove.
2446 * src/.gitignore (/revision.c): Remove.
2447 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2448 (BUILT_SOURCES): Remove revision.c.
2449 (revision.c): Remove.
2450 * src/getargs.c (version): Don't print revision after the VERSION.
2451 * src/revision.h: Remove.
2452
bcf07cb7
JD
24532008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2454
2455 Fix untranslatable composition of sentences. Reported by Goran
2456 Uddeborg at
2457 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2458 * THANKS (Goran Uddeborg): Add.
2459 * src/reduce.c (reduce_print): Report the number of nonterminals and
2460 rules useless in the grammar in separate sentences.
2461 * tests/reduce.at (Useless Rules): Update output.
2462 (Reduced Automaton): Likewise.
2463 (Underivable Rules): Likewise.
2464 (Empty Language): Likewise.
2465
9aacab9a
JD
24662008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2467
2468 Fix some .gitignore and .cvsignore problems.
2469 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2470 (insert_vc_ignore): ... this new function, which prepends `/' to all
2471 .gitignore entries before passing them to insert_sorted_if_absent.
2472 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2473 .cvsignore files are maintained even though Bison developers run
2474 bootstrap while using Git.
2475 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2476 unneeded by Bison.
2477 (gnulib): Add.
2478 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2479 unneeded. Reported by Eric Blake.
2480 * lib/.gitignore (/*~): Add.
2481 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2482 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2483 Blake.
2484 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2485
a9fc7990
JD
24862008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2487
2488 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2489 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2490 * bootstrap.conf (gnulib_modules): Add unsetenv.
2491 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2492 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2493 (/setenv.m4): Add.
2494 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2495 the first argument because it may become position-dependent, and unset
2496 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2497 Add comments explaining these issues in more detail.
2498
0f1d6f10
JD
24992008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2500
2501 Add .gitignore everywhere based on .cvsignore.
2502 * .gitignore: New.
2503 * build-aux/.gitignore: New.
2504 * data/.gitignore: New.
2505 * doc/.gitignore: New.
2506 * etc/.gitignore: New.
2507 * examples/.gitignore: New.
2508 * examples/calc++/.gitignore: New.
2509 * lib/.gitignore: New.
2510 * m4/.gitignore: New.
2511 * po/.gitignore: New.
2512 * runtime-po/.gitignore: New.
2513 * src/.gitignore: New.
2514 * tests/.gitignore: New.
2515
7bd1665a
JD
25162008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2517
2518 * NEWS (2.3b+): New section, empty for now.
2519 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2520
72c5b982
JD
25212008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2522
2523 * NEWS (2.3b): Update release date since there has been a delay in
2524 getting the announcements and tarballs out.
2525
bd02cd5d
JD
25262008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2527
2528 * NEWS: Version 2.3b.
2529 * configure.ac (AC_INIT): Likewise.
2530 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2531
9126263e
JD
25322008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2533
2534 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2535 been doing it for years.
2536 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2537 (Release Procedure): Add FIXME about make alpha being unmaintained.
2538
fa6aa7b3
JD
25392008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2540
2541 * data/yacc.c: Reformat m4 a little for readability.
2542 * src/lalr.c (build_relations): Correct comment.
2543
d30b312d
JMG
25442008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2545
2546 DJGPP specific issue.
2547 * djgpp/config.sed: Fixes required to run configure scripts generated
2548 by autoconf 2.62.
2549
138d4cd9
JD
25502008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2551
2552 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2553 coordinator@translationproject.org.
2554
8f7e2e1f
JD
25552008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2556
2557 * THANKS: Add Eric Blake.
2558
f55efa38
JD
25592008-04-23 Eric Blake <ebb9@byu.net>
2560
2561 Revert prior patch, by working around autoconf regression.
2562 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2563 ("Output file name: ("): Uncomment test.
2564 ("Output file name: )"): Likewise.
2565 Based on an idea from Noah Misch.
2566
096c9f9d
JD
25672008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2568
2569 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2570 2.61. Reported by Juan Manuel Guerrero at
2571 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2572 * tests/output.at ("Output file name: ("): Comment out test case for
2573 now.
2574 ("Output file name: )"): Likewise.
2575
0f664b89
JD
25762008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2577
2578 * GNUmakefile: Update git-version-gen invocation so make dist
2579 succeeds.
2580
1cfe6375
JD
25812008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2582
2583 Update to the current gnulib CVS repository, and fix trigraph handling
2584 in Bison.
2585 * bootstrap: Update gnulib CVS repository URL.
2586 (symlink_to_dir): Encapsulate the code that guarantees the destination
2587 directory exists into...
2588 (check_dst_dir): ... this new function, and...
2589 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2590 fail when copying files into lib/uniwidth/.
2591 * src/output.c (prepare_symbols): When writing yytname muscles, where
2592 symbol names will be encoded in C-string literals, tell quotearg to
2593 escape trigraphs. This used to be the default in gnulib.
2594 * tests/regression.at (Token definitions): Because of the change in
2595 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2596 escapes trigraphs in symbol names. Thus, yytname no longer has
2597 trigraphs unnecessarily doubly escaped. Update test case output.
2598 Extend test case to be sure Bison's own error messages will no longer
2599 have trigraphs in symbol names unnecessarily escaped once.
2600
74c52fc8
JD
26012008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2602
2603 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2604 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2605 * .cvsignore: Add .version.
2606 * .version.in: New.
2607 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2608 * configure.ac (AC_CONFIG_FILES): Add .version.
2609 * build-aux/.cvsignore: Add git-version-gen.
2610
8e55b3aa
JD
26112008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2612
2613 * NEWS (2.3a+): Mention that -g now takes an argument.
2614 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2615 consistency. Update the -g and -x entries now that they take
2616 arguments. Use brackets to indicate optional arguments.
2617 * src/getargs.c (usage): Explain the relationship between arguments of
2618 long and short options more completely. Document --defines and -d
2619 separately since the former takes an argument but, for POSIX Yacc, the
2620 latter does not.
2621 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 2622 (getargs): Sort cases.
8e55b3aa 2623
59c5ac72
AD
26242008-02-28 Akim Demaille <demaille@gostai.com>
2625
2626 * doc/bison.texinfo: Fix a few typos.
2627
118d4978
AD
26282008-02-28 Akim Demaille <akim@epita.fr>
2629
2630 * doc/bison.texinfo (Bison Options): Document -W.
2631 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2632
7020f1e9
AD
26332008-02-28 Akim Demaille <akim@epita.fr>
2634
2635 * src/getargs.c (short_options): Split and sort for readability.
2636 -g and -x take optional arguments, just like their long options.
2637 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2638 understand.
2639 Fix the handling of $opt which resulted in all the argument to be
2640 considered as optional.
2641
59da312b
JD
26422008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2643
2644 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2645 say its interface is experimental.
2646 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2647 Java.
2648 (Bison Options): In the -L and --language entry, mention Java.
2649 (Java Bison Interface): Say the interface is experimental.
2650 * src/getargs.c (usage): Mention -L and --language.
2651
2652 * NEWS (2.3a+): Say the push parsing interface is experimental.
2653 * doc/bison.texinfo (Push Decl): Likewise.
2654 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2655 (Push Parser Function): Likewise.
2656 (Pull Parser Function): Likewise.
2657 (Parser Create Function): Likewise.
2658 (Parser Delete Function): Likewise.
2659 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2660 yypull_parse, and yypush_parse entries.
2661
2662 * NEWS (2.3a+): Mention XML support, and say the schema is
2663 experimental.
2664 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2665 * src/getargs.c (usage): Say the XML schema is experimental.
2666
2667 * NEWS (2.3a+): Say option instead of flag.
2668
2bb3ebec
WP
26692008-02-21 Wojciech Polak <polak@gnu.org>
2670
2671 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2672 text.
2673
333e670c
JD
26742008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2675
2676 Fix impure push parser compile error reported by Bob Rossi at
2677 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2678 * data/yacc.c: Clean up whitespace in the output a little.
2679 (yypstate_allocated): Define for impure push parsers regardless of
2680 whether the pull interface is also requested.
2681 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2682 check impure push parsers without the pull interface.
2683
2684 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2685 yyerror takes arguments specified by %parse-param while yypstate_new
2686 does not.
2687 * doc/bison.texinfo (Parser Create Function): Document that
2688 yypstate_new returns 0 for multiple impure parser instances.
2689 * tests/push.at (Push Parsing: Multiple impure instances): Update
2690 expected stderr output.
2691
798096e1
JD
26922008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2693
2694 * runtime-po/POTFILES.in (push.c): Remove.
2695
9ca7f077
JD
26962008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2697
2698 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2699 * data/push.c: Rename to...
2700 * data/yacc.c: ... this, overwriting it.
2701 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2702 `%push-pull-parser' -> `%define api.push_pull "both"'.
2703 Remove old yacc.c tests, and update push.c tests to yacc.c.
2704
42ee26bb
JD
27052008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2706
2707 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2708 `"%code top" blocks' instead of `%code "top" blocks'.
2709 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2710 Clean up whitespace in the output a little.
2711
b1cc23c4
JD
27122008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2713
2714 Fix documentation problems reported by Tim Josling at
2715 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2716 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2717 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2718 integers. Explain the effect of literal string aliases on error
2719 messages. Copy token 0 documentation from the C++ skeleton
2720 documentation.
2721
ab7f29f8
JD
27222008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2723
2724 Accept a token number in a %left, %right, or %nonassoc for POSIX
2725 conformance. Reported by Tim Josling at
2726 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2727 * NEWS (2.3a+): Mention.
2728 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2729 and code numbers are treated by precedence declarations.
2730 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2731 of symbols.1.
2732 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2733 of symbol.
2734 (symbol.prec): New, just like symbol but allows INT.
2735 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2736 longer holds.
2737 * tests/regression.at (Token number in precedence declaration): New
2738 test case.
2739
a924ef36
JMG
27402008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2741
2742 DJGPP specific issues.
2743 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2744 be changed. Copyright timestamp adjusted.
2745 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2746 be changed. Copyright timestamp adjusted.
2747 * djgpp/config.site: Copyright timestamp adjusted.
2748 * djgpp/config_h.sed: Copyright timestamp adjusted.
2749 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2750 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2751 filename translation list.
2752 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2753 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2754 files shall be created. Before trying to use the temp dir where the
2755 environment variable points to check that the dir really exists. If
2756 not default to the cwd as temp dir. Copyright timestamp adjusted.
2757 * djgpp/subpipe.h: Copyright timestamp adjusted.
2758 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2759
389c8cfd
PE
27602008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2761
2762 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2763
5d1cfef4
PE
27642008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2765
2766 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2767 Problem reported by Claudio Saavedra in
2768 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2769
e2dcf996
WP
27702008-01-05 Wojciech Polak <polak@gnu.org>
2771
2772 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2773 document's title with the input grammar file name.
2774
da730230
JD
27752007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2776
2777 Automate regression testing of the XML/XSLT implementation. Discussed
2778 starting at
2779 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2780 * configure.ac (XSLTPROC): New substitution.
2781 * Makefile.am (maintainer-xml-check): New phony target invoking...
2782 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2783 invoking make maintainer-check with BISON_TEST_XML=1.
2784 * tests/atlocal.in (XSLTPROC): New.
2785 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2786 not to report reachable memory when Bison is expected to have a
2787 non-zero exit status and (2) to compare XML/XSLT output with --graph
2788 and --report=all output for every working grammar when
2789 BISON_TEST_XML=1.
2790 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2791 (AT_BISON_CHECK_XML): New.
2792 (AT_QUELL_VALGRIND): New.
2793 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2794 (AT_CHECK): ... don't redefine this since this was the old way to
2795 quell Valgrind.
2796 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2797 AT_BISON_CHECK invocations.
2798 * tests/c++.at: Likewise.
2799 * tests/calc.at: Likewise.
2800 * tests/conflicts.at: Likewise.
2801 * tests/cxx-type.at: Likewise.
2802 * tests/existing.at: Likewise.
2803 * tests/glr-regression.at: Likewise.
2804 * tests/headers.at: Likewise.
2805 * tests/input.at: Likewise.
2806 * tests/java.at: Likewise.
2807 * tests/output.at: Likewise.
2808 * tests/push.at: Likewise.
2809 * tests/reduce.at: Likewise.
2810 * tests/regression.at: Likewise.
2811 * tests/sets.at: Likewise.
2812 * tests/skeletons.at: Likewise.
2813 * tests/synclines.at: Likewise.
2814 * tests/torture.at: Likewise.
2815 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2816 tends to hang xsltproc.
2817 (Big horizontal): Likewise.
2818
408476bc
JD
28192007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2820
2821 In XML output, remove redundant class attribute on symbol element.
2822 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2823 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2824 look up a symbol to determine whether it's a nonterminal or terminal.
2825 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2826 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2827
2828 Add prec/assoc information to XML output.
2829 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2830 %prec, add a percent_prec attribute.
2831 * src/print-xml.c (print_grammar): For each terminal that has a
2832 precedence or associativity, add a prec or assoc attribute.
2833 (xml_indent): New.
2834 (xml_puts): Use xml_indent.
2835 (xml_printf): Use xml_indent.
2836 * src/print-xml.h (xml_indent): Prototype.
2837
2838 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2839 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2840
d4a26c48
JD
28412007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2842
2843 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2844 (bison:ruleByNumber): ... this for clarity.
2845 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2846 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2847 (xsl:template match="reduction"): Update.
2848 (xsl:template match="item"): Update.
2849 (xsl:template match="reduction"): Update.
2850
2851 In the XML output, don't print the list of rules where symbols appear.
2852 Compute it in XSLT instead. Discussed at
2853 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2854 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2855 (bison:ruleByRhs): New.
2856 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2857 bison:ruleByRhs.
2858 (xsl:template match="terminal/rule"): Remove.
2859 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2860 bison:ruleByRhs.
2861 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2862 Remove.
2863 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2864 bison:ruleByRhs and mode="number-link" for rule template.
2865 (xsl:template match="terminal/rule"): Remove.
2866 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2867 bison:ruleByRhs and mode="number-link" for rule template.
2868 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2869 Rewrite as...
2870 (xsl:template match="rule" mode="number-link"): ... this.
2871 * src/print-xml.c (print_grammar): Don't print the list of rules.
2872
ef1b4273
JD
28732007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2874
2875 Don't let --report affect XML output; always print all information.
2876 Discussed at
2877 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2878 * src/conflicts.c (log_resolution): Implement.
2879 * src/print-xml.c (print_core): Implement.
2880 (print_state): Implement.
2881 (print_xml): Implement.
2882
2883 * NEWS (2.3a+): Fix quotes.
2884 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2885 don't let %verbose clear the list specified by --report.
2886
0f6cd9e3
AD
28872007-11-26 Akim Demaille <akim@epita.fr>
2888
2889 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2890
d80fb37a
JD
28912007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2892
2893 In the XML output, list useless and unused symbols and rules with the
2894 useful ones and add a "usefulness" attribute. Discussed starting at
2895 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2896 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2897 (grammar_rules_print_xml): Print all rules instead of just those
2898 useful in the grammar, and add a "usefulness" attribute.
2899 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2900 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2901 (print_grammar): Print all nonterminals instead of just useful ones,
2902 and add a "usefulness" attribute to nonterminals and terminals.
2903 (print_xml): Don't print a separate "reductions" or
2904 "rules-useless-in-parser" element.
2905 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2906 (reduce_xml): Remove.
2907 (reduce_token_unused_in_grammar): New.
2908 (reduce_nonterminal_useless_in_grammar): New.
2909 * src/reduce.h (reduce_xml): Remove prototype.
2910 (reduce_token_unused_in_grammar): Add prototype.
2911 (reduce_nonterminal_useless_in_grammar): Add prototype.
2912 * data/xslt/xml2text.xsl: Update for XML changes.
2913 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2914 * tests/reduce.at (Useless Terminals): Update output.
2915 (Useless Rules): Update output.
2916 (Reduced Automaton): Update output.
2917
2918 Say "Terminals unused in grammar" instead of "Unused terminals".
2919 * NEWS (2.3a+): Update.
2920 * doc/bison.texinfo (Understanding): Update example output.
2921 * src/reduce.c (reduce_output): Implement.
2922 * data/xslt/xml2text.xsl: Implement.
2923 * data/xslt/xml2xhtml.xsl: Implement.
2924
1bb2bd75
JD
29252007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2926
2927 Accept --report-file=FILE to override the default `.output' filename.
2928 * NEWS (2.3a+): Mention.
2929 * doc/bison.texinfo (Bison Options): Add an entry.
2930 * src/files.c (compute_output_file_names): Don't override
2931 spec_verbose_file if already set.
2932 * src/getargs.c (usage): Document --report-file.
2933 (REPORT_FILE_OPTION): New anonymous enum member.
2934 (long_options): Add entry for it.
2935 (getargs): Add case for it setting spec_verbose_file.
2936
2937 * build-aux/cross-options.pl: Don't record a short option just because
2938 there's an arg.
2939 * doc/.cvsignore: Add yacc.1.
2940
a005a9c4
AD
29412007-11-14 Akim Demaille <akim@epita.fr>
2942
2943 * doc/yacc.1.in: New.
2944 * configure.ac, doc/Makefile.am: Adjust.
2945 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2946 config.h symbol.
2947 Use AC_SUBST for assignments too.
2948 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2949
cff03fb2
JD
29502007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2951
2952 * src/gram.c: Remove comments that duplicate comments in gram.h.
2953
2954 When reporting useless rules and nonterminals, say "useless in grammar"
2955 instead of "useless", and say "useless in parser" instead of "never
2956 reduced". Discussed starting at
2957 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2958 * NEWS (2.3a+): Mention this change.
2959 * data/xslt/xml2text.xsl: Update output text and expected input XML
2960 element names to match changes below.
2961 * data/xslt/xml2xhtml.xsl: Likewise.
2962 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2963 Contents: "Rules useless in parser due to conflicts".
2964 * doc/bison.texinfo (Decl Summary): Reword a little.
2965 (Understanding): Update example output for changes below.
2966 * src/gram.c: (rule_useful_p): Rename to...
2967 (rule_useful_in_grammar_p): ... this.
2968 (rule_useless_p): Rename to...
2969 (rule_useless_in_grammar_p): ... this.
2970 (rule_never_reduced_p): Rename to...
2971 (rule_useless_in_parser_p): ... this.
2972 (grammar_rules_print): Update for renames.
2973 (grammar_rules_print_xml): Update for renames.
2974 (grammar_rules_never_reduced_report): Rename to...
2975 (grammar_rules_useless_report): ... this since it is used for either
2976 kind of useless rule.
2977 * src/gram.h: Reword comments and update function names in prototypes.
2978 * src/main.c (main): Say "rule useless in parser due to conflicts".
2979 * src/print-xml.c (print_rules_never_reduced): Rename to...
2980 (print_rules_useless_in_parser): ... this, and rename output XML
2981 element "rules-never-reduced" to "rules-useless-in-parser".
2982 (print_xml): Update for rename.
2983 * src/print.c (print_results): Say "Rules useless in parser due to
2984 conflicts".
2985 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2986 (nonterminals_reduce): Say "nonterminal useless in grammar".
2987 (reduce_output): Say "Nonterminals useless in grammar".
2988 Say "Rules useless in grammar".
2989 (reduce_xml): Rename output XML element "useless" to
2990 "useless-in-grammar".
2991 (reduce_print): Don't report the count of grammatically useless rules
2992 as "rules never reduced" just because %yacc is specified.
2993 In the correct report of this count, say nonterminal(s) and rule(s)
2994 "useless in grammar".
2995 * tests/conflicts.at (S/R in initial): Update expected output.
2996 (Defaulted Conflicted Reduction): Likewise.
2997 (Unreachable States After Conflict Resolution): Likewise.
2998 * tests/existing.at (GNU pic Grammar): Likewise.
2999 * tests/reduce.at (Useless Nonterminals): Likewise.
3000 (Useless Rules): Likewise.
3001 (Reduced Automaton): Likewise.
3002 (Underivable Rules): Likewise.
3003 (Empty Language): Likewise.
3004
66f0441d
JD
30052007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3006
3007 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3008 here document and before the EOF so that BSD's implementation of Bourne
3009 shell doesn't parse the delimiter as part of the here document.
3010 * doc/.cvsignore: Add cross-options.texi.
3011 * src/getargs.c (usage): Add a blank line after the warning categories.
3012
d0ee4105
PB
30132007-11-08 Paolo Bonzini <bonzini@gnu.org>
3014
3015 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3016
e8b1fb9b
AD
30172007-11-05 Akim Demaille <akim@epita.fr>
3018
3019 Remove Id: from bison.1.
3020 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3021 (perl -0777 -pi -e 's/\.PP\nId): New.
3022 (.x.1): Use it to ignore the version control revision.
3023
2f7a96b5
AD
30242007-11-05 Akim Demaille <demaille@gostai.com>
3025
3026 * build-aux/Makefile.am: Ship cross-options.pl.
3027 * doc/Makefile.am: Always refer to cross-options.texi with
3028 $(srcdir).
3029 (MAINTAINERCLEANFILES): Add it.
3030
f4101aa6
AD
30312007-11-04 Akim Demaille <demaille@gostai.com>
3032
3033 Generate the long/short option cross-table.
3034 * build-aux/cross-options.pl: New.
3035 * doc/Makefile.am (cross-options.texi): New.
3036 * doc/bison.texinfo: Use it.
3037
727a1401
AD
30382007-11-04 Akim Demaille <demaille@gostai.com>
3039
3040 Generate bison.1 using help2man.
3041 * doc/common.x, doc/bison.x: New.
3042 * doc/Makefile.am (bison.1, .x.1): New.
3043 The code is taken from autoconf-2.61/man/Makefile.am.
3044 * configure.ac: Look for help2man.
3045
6aeb9c57
AD
30462007-11-04 Akim Demaille <demaille@gostai.com>
3047
3048 Complete --help.
3049 * src/getargs.c (usage): Document -W, make it clear that -d,
3050 -g and -x have optional arguments.
3051
d7be4085
AD
30522007-11-04 Akim Demaille <demaille@gostai.com>
3053
3054 Find sha1sum when named gsha1sum.
3055 * bootstrap (find_tool): New.
3056 ($SHA1SUM): New.
3057
d9df47b6
JD
30582007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3059
3060 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3061 at
3062 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3063 * NEWS (2.3a+): Mention.
3064 * data/bison.m4 (b4_pure_if): Don't define it here.
3065 * data/c.m4 (b4_identification): Depend on individual skeletons to
3066 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3067 values of the %define variables api.pure or api.push_pull. Define
3068 YYPURE, YYPUSH, and YYPULL accordingly.
3069 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3070 glr.cc has already defined b4_pure_flag.
3071 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3072 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 3073 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
3074 * doc/bison.texinfo (Pure Decl): Update.
3075 (Push Decl): Update.
3076 (Decl Summary): Add api.pure to %define entry.
3077 In %pure-parser entry, say it's deprecated and reference %define.
3078 (Pure Calling): Update.
3079 (Error Reporting): Update.
3080 (C++ Scanner Interface): Update.
3081 (How Can I Reset the Parser): Update.
3082 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3083 reference %define.
3084 * src/getargs.c (pure_parser): Remove global variable.
3085 * src/getargs.h (pure_parser): Remove extern.
3086 * src/output.c (prepare): Don't define pure_flag muscle.
3087 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3088 wrapper around `%define api.pure'.
3089 * tests/calc.at (Simple LALR Calculator): Update.
3090 (Simple GLR Calculator): Update.
3091 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3092 Update.
3093 (GLR: Resolve ambiguity, pure, locations): Update.
3094 (GLR: Merge conflicting parses, pure, no locations): Update.
3095 (GLR: Merge conflicting parses, pure, locations): Update.
3096 * tests/glr-regression.at (Uninitialized location when reporting
3097 ambiguity): Update
3098 * tests/input.at (Unused %define api.pure): New test case.
3099 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3100 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3101 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3102
c373bf8b
JD
31032007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3104
3105 %define push_pull -> %define api.push_pull. Discussed starting at
3106 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3107 * data/push.c: Expect the new name.
3108 * data/yacc.c: Likewise.
3109 * doc/bison.texinfo (Push Decl): Update.
3110 (Decl Summary): Update %define entry.
3111 (Push Parser Function): Update.
3112 (Pull Parser Function): Update.
3113 (Parser Create Function): Update.
3114 (Parser Delete Function): Update.
3115 * tests/calc.at (Simple LALR Calculator): Update.
3116 * tests/input.at (%define enum variables): Update.
3117 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3118 (Push Parsing: Multiple impure instances): Update.
3119 (Push Parsing: Unsupported Skeletons): Update.
3120 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3121 (Exploding the Stack Size with Malloc): Update.
3122
3123 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3124 other entries some.
3125
32f19b6b
JD
31262007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3127
3128 For the XML output's terminal element, rename @number to @token-number,
3129 and add @symbol-number. In the nonterminal element, rename @number to
3130 @symbol-number. Discussed starting at
3131 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3132 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3133 renames.
3134 (xsl:template match="nonterminal"): Likewise.
3135 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3136 (xsl:template match="nonterminal"): Likewise.
3137 * src/print-xml.c (print_grammar): Implement.
3138
255a6b90
JD
31392007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3140
3141 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3142 2007-10-11 change, the child elements here are items not rules.
408476bc 3143 (xsl:template match="item"): New.
255a6b90
JD
3144 (xsl:template match="rule"): Update for new reduced itemset.
3145 (xsl:template match="point"): Remove.
3146 (xsl:template match="empty"): For consistency with --graph, don't
3147 output "/* empty */".
3148 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3149 line-wrap, don't pass a negative value as first-line-length since this
3150 won't work with the following changes.
3151 (xsl:template name="line-wrap"): Simplify slightly.
3152 (xsl:template name="ws-search"): Eliminate recursion.
3153 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3154 set next to an item whose dot is not at the end of the RHS even if it
3155 happens to be associated with the same rule.
3156
88c78747
JD
31572007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3158
31984206
JD
3159 Add %define lr.keep_unreachable_states.
3160 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3161 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3162 * src/main.c (main): Implement it.
3163 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3164 Extend to test it, and fix a typo.
3165
31662007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3167
3168 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
3169 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3170 the example .output text.
3171 * tests/regression.at (Extra lookahead sets in report): Improve wording
3172 of comments.
3173
b7a70162
WP
31742007-10-17 Wojciech Polak <polak@gnu.org>
3175
3176 * src/print-xml.c (print_grammar): Renamed
3177 <terminal> and <nonterminal> attributes:
3178 "type" to "number" and "symbol" to "name".
3179 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3180 Use new attribute names.
3181 (xsl:template match="nonterminal"): Likewise.
3182 * data/xslt/xml2xhtml.xsl: Likewise.
3183
a0de5091
JD
31842007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3185
3186 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3187 (Option Cross Key): Likewise.
3188
3189 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3190 next to an item whose dot is not at the end of the RHS even if it
3191 happens to be associated with the same rule.
3192 * src/print.c (print_core): Likewise.
3193 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3194 (Resolved SR Conflicts): Update output.
3195 * tests/regression.at (Extra lookahead sets in report): New test case.
3196
4c20d18d
WP
31972007-10-11 Wojciech Polak <polak@gnu.org>
3198
3199 * src/print-xml.c (print_core): Remove item set
3200 redundancy.
3201 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3202 Improve processing time. Suggested by Joel E. Denny.
3203 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3204 Write xsl:param "required" attribute as comment.
3205 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3206 (xsl:template match="rule"): Support new reduced itemset.
3207 (xsl:template match="point"): Remove.
3208 * data/xslt/xml2xhtml.xsl: Likewise.
3209
f506ad1c
JD
32102007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3211
3212 * src/getargs.c (version): Update copyright year.
3213
21f1b063
JD
32142007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3215
3216 Make xml2dot.xsl and --graph produce the same output.
3217 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3218 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3219 escaped later.
3220 (xsl:template name="output-node"): Use the new escape template instead
3221 of the string-replace template directly.
3222 (xsl:template name="output-edge"): Likewise.
3223 (xsl:template name="escape"): New, escapes backslashes and newlines in
3224 addition to quotation marks.
3225 * src/graphviz.c (start_graph, output_node, output_edge): Add
3226 whitespace to output for legibility.
3227
3228 Make xml2text.xsl and --report produce the same output, and remove the
3229 XML "conflicts" element since a conflict summary is easily extracted
3230 from the automaton.
3231 * data/xslt/bison.xsl: New.
3232 (xsl:template match="state" mode="bison:count-conflicts): New.
3233 * data/xslt/xml2text.xsl: Import bison.xsl.
3234 (xsl:template match="bison-xml-report"): Instead of styling the
3235 "conflicts" element, style the "automaton" element with mode
3236 "conflicts". Unlike the former, the latter lists S/R and R/R
3237 conflicts for a state on the same line.
3238 (xsl:template match="conflicts"): Remove.
3239 (xsl:template match="conflict"): Remove.
3240 (xsl:template match="terminal"): Line-wrap the list of rules in which
3241 the terminal is used.
3242 (xsl:template match="nonterminal"): Likewise for nonterminals.
3243 (xsl:template match="automaton" mode="conflicts"): New.
3244 (xsl:template match="state" mode="conflicts"): New.
3245 (xsl:template name="line-wrap"): New.
3246 (xsl:template name="ws-search"): New.
3247 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3248 (xsl:template match="bison-xml-report"): Instead of styling the
3249 "conflicts" element, style the "automaton" element with mode
3250 "conflicts."
3251 (xsl:template match="conflicts"): Remove.
3252 (xsl:template match="conflict"): Remove.
3253 (xsl:template match="automaton" mode="conflicts"): New.
3254 (xsl:template match="state" mode="conflicts): New.
3255 * src/conflicts.c (conflicts_output_xml): Remove.
3256 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3257 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3258 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3259 the corresponding XSLT is easier. Also, never wrap between a word and
3260 the comma that follows it.
3261
793fbca5
JD
32622007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3263
3264 Improve C++ namespace support. Discussed starting at
3265 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3266 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3267 b4_namespace_close): New macros that interpret the %define variable
3268 "namespace" so its value can contain "::" to indicate nested
3269 namespaces.
3270 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3271 the above macros.
3272 * data/lalr1.cc (b4_namespace): Likewise.
3273 * data/location.cc (b4_namespace): Likewise.
3274 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3275 inside a new table in the general %define entry. Document `%define
3276 namespace' there as well. Point the %name-prefix entry to it since it
3277 explains it more completely in the case of C++.
3278 (C++ Bison Interface): Mention `%define namespace' instead of
3279 %name-prefix.
3280 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3281 entry suffices.
3282 * tests/c++.at (Relative namespace references): New test case.
3283 (Absolute namespace references): New test case.
3284 (Syntactically invalid namespace references): New test case.
3285 * tests/input.at (C++ namespace reference errors): New test case.
3286
35b8730d
JD
32872007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3288
3289 Add syncline support and location accessor to internal %define
3290 interfaces.
3291 * data/bison.m4 (b4_percent_define_get_loc): New.
3292 (b4_percent_define_get_syncline): New.
3293 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3294 (b4_percent_define_default): Record defining location as line 1 rather
3295 than 0 for the sake of synchronizing #line's, and define
3296 b4_percent_define_syncline(VARIABLE).
3297 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3298 * src/muscle_tab.c (muscle_syncline_grow): New.
3299 (muscle_code_grow): Use muscle_syncline_grow.
3300 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3301 define b4_percent_define_syncline(VARIABLE).
3302 (muscle_percent_define_get_loc): New.
3303 (muscle_percent_define_get_syncline): New.
3304 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3305 remove some unused variables.
3306 (muscle_percent_define_default): Record defining location as line 1
3307 rather than 0 for the sake of synchronizing #line's, and define
3308 b4_percent_define_syncline(VARIABLE).
3309 (muscle_percent_define_check_values): Use
3310 muscle_percent_define_get_loc.
3311 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3312 (muscle_percent_define_get_syncline): Prototype.
3313 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3314 defaults): Update output for location change.
3315 (Complaining during macro argument expansion): Extend to test
3316 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3317
7dc4a694
JD
33182007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3319
3320 Fix some error-reporting macro bugs.
3321 * data/bison.m4 (b4_cat): New.
3322 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3323 to stdout so they don't become arguments to other macros. Update
3324 comments and add examples.
3325 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3326 add examples.
3327 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3328 after printing the error directive so that M4 doesn't report subsequent
3329 problems that are induced by this problem.
3330 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3331 instead of just in them. Recognize @\n in both places. Both expand to
3332 the empty string. Needed by b4_cat.
3333 * tests/skeletons.at (Complaining during macro argument expansion):
3334 New test case.
3335 (Fatal errors make M4 exit immediately): New test case.
3336
d4bd2295
JD
33372007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3338
3339 Implement --print-datadir.
3340 * src/getargs.c (usage): Mention.
3341 (PRINT_DATADIR_OPTION): New anonymous enum member.
3342 (long_options): Add entry for it.
3343 (getargs): Add case for it calling compute_pkgdatadir.
3344 * src/output.c (output_skeleton): Encapsulate data directory
3345 computation from here...
3346 (prepare): ... and from here...
3347 (compute_pkgdatadir): ... into this new function.
3348 * src/output.h (compute_pkgdatadir): Prototype.
3349
34cdeddf
JD
33502007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3351
3352 * src/print-xml.c (escape_bufs): New static global variable
3353 replacing...
3354 (xml_escape_n): ... the static local variable buf here.
3355 (print_xml): Free memory for escape_bufs.
3356 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3357
d782395d
JD
33582007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3359
3360 Replace `%push-parser' and `%push-pull-parser' with
3361 `%define push_pull "push"' and `%define push_pull "both"'.
3362 `%define push_pull "pull"' is the default.
3363 * doc/bison.texinfo (Push Decl, Push Parser Function,
3364 Pull Parser Function, Parser Create Function, Parser Delete Function):
3365 Update declarations.
3366 (Decl Summary, Table of Symbols): Replace %push-parser and
3367 %push-pull-parser entries with a %define push_pull entry.
3368 * data/bison.m4 (b4_percent_define_check_values): New macro.
3369 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3370 definitions...
3371 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3372 definitions...
3373 * data/push.c: ... to here and compute them from the value of the
3374 %define variable push_pull.
3375 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3376 parsing requests here...
3377 * data/yacc.c: ... hack this to switch to push.c any time
3378 b4_use_push_pull_flag or the %define variable push_pull is set. This
3379 will go away when we mv push.c yacc.c.
3380 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3381 push parsing is not supported since unused %define variables are
3382 reported anyway.
3383 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3384 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3385 comments for consistency with b4_percent_define_check_values.
3386 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3387 muscles.
3388 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3389 Remove.
3390 (prologue_declaration): Remove %push-parser and %push-pull-parser
3391 rules.
3392 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3393 * tests/calc.at: Update declarations.
3394 * tests/input.at (%define enum variables): New test case.
3395 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3396 declaration.
3397 (Push Parsing: Multiple impure instances): Update declaration.
3398 (Push Parsing: Unsupported Skeletons): New test case.
3399 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3400 declaration.
3401 (Exploding the Stack Size with Malloc): Update declaration.
3402
3f999f78
WP
34032007-09-24 Wojciech Polak <polak@gnu.org>
3404
3405 Add XSLT transformations.
3406
3407 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3408 * data/xslt/xml2text.xsl: Transform XML into plain text.
3409 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3410 * data/Makefile.am (xsltdir): New variable.
3411 (dist_xslt_DATA): Add xslt/*.xsl files.
3412
a4f75309
PE
34132007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3414
3415 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3416 Problem reported by Wojciech Polak.
3417 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3418 (xml_printf): Undo change I made on 21 September; that is,
3419 indent 2 spaces, not 1.
3420
ad5feac4
JD
34212007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3422
3423 Pacify ./configure --enable-gcc-warnings.
3424 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3425 `char const *' instead of `char *'.
3426 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3427 local variable `sep'.
3428
41d7a5f2
PE
34292007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3430
3431 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3432 elsewhere.
3433 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3434 (xml_printf): Indent just 1 space for level.
3435 (e_char, xlate_char): Remove.
3436 (xml_escape_string): Rewrite to avoid undefined behavior (used
3437 storage that was freed from the stack).
3438 (xml_escape_n): Don't bother checking for subscript error.
3439
3f999f78
WP
34402007-09-21 Wojciech Polak <polak@gnu.org>
3441
3442 Add Bison XML Automaton Report.
41d7a5f2
PE
3443
3444 Add support for an -x option to generate an XML report.
3445 It is not documented yet.
3446 * src/print-xml.c: New file.
3447 * src/print-xml.h: Likewise.
3448 * lib/timevar.def (TV_XML): New var.
3449 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3450 * src/conflicts.c: Include print-xml.h.
3451 (solved_conflicts_xml_obstack): New var.
3452 (log_resolution, conflicts_solve, conflicts_free):
3453 Add support for XML report.
3454 (conflicts_output_val): New function.
3455 * src/conflicts.h (conflicts_output_val): New decl.
3456 * src/files.c (spec_xml_file): New var.
3457 (compute_output_file_names, output_file_names_free): Add XML support.
3458 * src/files.h (spec_xml_file): New decl.
3459 * src/getargs.c (xml_flag): New var.
3460 (usage, short_options, long_options, getargs): Add XML support.
3461 * src/getargs.h (xml_flag): New decl.
3462 * src/gram.c: Include print-xml.h.
3463 (rule_lhs_print_xml, rule_rhs_print_xml):
3464 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3465 New functions.
3466 * src/gram.h: Declare external ones.
3467 * src/main.c: Include print-xml.h.
3468 (main): Add XML support.
3469 * src/reduce.c: Include print-xml.h.
3470 (reduce_xml): New function.
3471 * src/reduce.h: Declare it.
3472 * src/state.c: Include print-xml.h.
3473 (state_new): Add XML support.
3474 (state_rule_lookahead_tokens_print_xml): New function.
3475 * src/state.h: Declare it.
3476 (struct state): New member solved_conflicts_xml.
3477 * src/symtab.c (symbol_class_get_string): New function.
3478 * src/symtab.h: Declare it.
3479
6d8e724d
PE
34802007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3481
3482 * GNUmakefile: Switch to coreutils's version.
3483 * bootstrap: Likewise.
3484 * Makefile.cfg: Adjust to new GNUmakefile.
3485 * README-hacking: Likewise.
3486
3487 Import from gnulib:
3488
3489 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3490 Bruno Haible <bruno@clisp.org>
3491
3492 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3493 and is a script that invokes bison. Tighten the code. Add comments.
3494
922bdd7f
JD
34952007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3496
3497 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3498 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3499 * doc/bison.texinfo (Decl Summary): Fix.
3500 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3501 * tests/input.at (Boolean %define variables): Update output.
3502 * tests/skeletons.at (%define boolean variables: invalid skeleton
3503 defaults): Rename to...
3504 (%define Boolean variables: invalid skeleton defaults): ... this and
3505 update output.
3506
1b17b01d
JD
35072007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3508
3509 In impure push mode, don't allow more than one yypstate to be allocated
3510 since multiple impure parsers would corrupt yynerrs.
3511 * data/push.c (yypstate_allocated): New static global variable
3512 initialized to 0.
3513 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3514 exhaustion if yypstate_allocated is 1, but still return 2.
3515 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3516 already 1. Otherwise, set it to 1.
3517 (yypstate_delete): Set it to 0.
3518 * tests/push.at (Push Parsing: Multiple impure instances): New test
3519 case.
3520
9987d1b3
JD
35212007-08-17 Bob Rossi <bob@brasko.net>
3522
3523 * doc/bison.texinfo (Push Decl): Document the push parser.
3524 (Table of Symbols): Ditto.
3525 (Pure Decl): Ditto.
3526 (Decl Summary): Ditto.
3527 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3528 Parser Create Function, Parser Delete Function):
3529 Add new push parser symbols.
3530 (Table of Symbols): Document push-parser, push-pull-parser,
3531 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3532
f16b0819
PE
35332007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3534
3535 Update to GPLv3.
3536 * doc/gpl-3.0.texi: New file.
3537 * doc/gpl.texi: Remove.
3538 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3539 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3540 * README-hacking, TODO, bootstrap, bootstrap.conf:
3541 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3542 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3543 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3544 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3545 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3546 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3547 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3548 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3549 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3550 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3551 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3552 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3553 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3554 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3555 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3556 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3557 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3558 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3559 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3560 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3561 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3562 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3563 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3564 * src/complain.c, src/complain.h, src/conflicts.c:
3565 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3566 * src/files.h, src/flex-scanner.h, src/getargs.c:
3567 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3568 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3569 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3570 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3571 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3572 * src/print.c, src/print.h, src/print_graph.c:
3573 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3574 * src/reduce.h, src/relation.c, src/relation.h:
3575 * src/revision.h, src/scan-code.h, src/scan-code.l:
3576 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3577 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3578 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3579 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3580 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3581 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3582 * tests/existing.at, tests/glr-regression.at:
3583 * tests/headers.at, tests/input.at, tests/java.at:
3584 * tests/local.at, tests/output.at, tests/push.at:
3585 * tests/reduce.at, tests/regression.at, tests/sets.at:
3586 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3587 * tests/torture.at:
3588 Update to GPLv3.
3589
728c4be2
JD
35902007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3591
3592 Get rid of broken %no-parser, -n, and --no-parser implementation and
3593 documentation.
3594 * TODO: Don't mention them.
3595 * doc/bison.1: Likewise.
3596 * doc/bison.texinfo (Decl Summary): Likewise.
3597 (Bison Options): Likewise.
3598 (Option Cross Key): Likewise.
3599 * src/getargs.c (no_parser_flag): Remove global variable.
3600 (usage): Don't print description of -n and --no-parser.
3601 (long_options): Remove --no-parser entry here.
3602 (getargs): Remove -n case in the switch here.
3603 * src/getargs.h (no_parser_flag): Remove extern.
3604 * tests/regression.at (Web2c Actions): Remove comment that mentions
3605 --no-parser.
3606
5d31a216
JD
36072007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3608
3609 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3610 name user variables starting with `yy'. Just pass NULL instead of a
3611 dummy local &yylval to yypush_parse.
3612 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3613 starting with `yy'.
3614
a2ea208d
JD
36152007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3616
3617 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3618 true since it's then always used regardless of whether yyoverflow is
3619 defined. Reported by Christian Burger at
3620 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3621 * THANKS: Add Christian Burger.
3622
91661ebb
JD
3623 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3624 node names: say "Decl Summary" not "Bison Declaration Summary".
3625
cbd50549
JD
36262007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3627
3628 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3629 determine whether this function has already complained about an invalid
3630 value for a %define boolean variable, don't check whether Bison has
3631 ever examined the value. As written, the check was a tautology.
3632 Instead, record and check for this complaint using a separate muscle.
3633
eb1b0740
JD
36342007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3635
3636 Fix push parsing memory leak reported by Brandon Lucia at
3637 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3638 * THANKS: Add Brandon Lucia.
3639 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3640 but the parse never completed and thus freed it.
3641 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3642 * tests/testsuite.at: Include push.at.
3643 * test/push.at: New.
3644 (Push Parsing: Memory Leak for Early Deletion): New test case.
3645
9d774aff
JD
36462007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3647
3648 Improve handling of multiple S/R conflicts in the same state and of S/R
3649 conflicts involving multiple reductions.
3650 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3651 set for a state here or Bison will abort if it is reassigned on a
3652 later conflicted reduction in the same state.
3653 Similarly, don't finalize and assign the solved conflicts report here
3654 or it will be lost if it is reassigned on a later conflicted reduction
3655 in the same state.
3656 (set_conflicts): Instead, assign them both here after all S/R conflicts
3657 in the state have been fully examined.
3658 * src/print.c (shift_set): Rename to...
3659 (no_reduce_set): ... this.
3660 (print_reductions): Update for rename, and add %nonassoc error action
3661 tokens to no_reduce_set so that, when printing the first remaining
3662 reduction on an error action token, the reduction is enclosed in
3663 brackets.
3664 (print_results): Update for rename.
3665 * tests/conflicts.at (Solved conflicts report for multiple reductions
3666 in a state): New test case.
3667 (%nonassoc error actions for multiple reductions in a state): New test
3668 case.
3669
3670 * src/main.c (main): Don't depend on C99 features.
3671
10159d2a
JD
36722007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3673
3674 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
3675 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3676 uniwidth.
10159d2a 3677
953b3935
JD
36782007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3679
3680 * bootstrap (slurp): Create target directories that don't exist.
3681 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3682
6ce2d93a
JD
36832007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3684
3685 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3686 than item number.
3687 * closure.c (closure): Likewise.
3688 * state.h (reductions): Comment sorting of rules.
3689 (state): Comment sorting of items.
3690
ce3448d5
JD
36912007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3692
3693 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3694 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3695 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3696 definition in order to avoid Gnulib headers since we don't use config.h
3697 here.
3698 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3699 rather than AT_DATA so that config.h is included.
3700
8a86eef0
JD
37012007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3702
3703 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3704 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3705 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3706 and so that YYFPRINTF is guaranteed to be defined here.
3707
b1a81613
JD
37082007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3709
3710 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3711 with...
3712 (muscle_percent_define_check_values): ... this more helpful function.
3713 Again, it's not used yet, but it will be.
3714 * src/muscle_tab.h: Likewise.
3715
71b61d4d
JD
3716 Improve some comments in parser table construction.
3717 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3718 (generate_states): Don't mention ruleset, which is internal to closure.
3719 * src/closure.c (closure): Explain sorting of core and itemset, which
3720 is required for this function to behave correctly.
3721 * src/closure.h (closure): Mention sorting.
3722
2a6b783d
JD
37232007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3724
3725 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3726 move the check for disabled transitions to an aver since conflict
3727 resolution hasn't happened yet.
3728
3729 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3730 labels a state as inconsistent just because it has error transitions.
3731 The original form of this check appeared in revision 1.1 of lalr.c,
3732 which was committed on 1991-12-21. Now (at least), changing the
3733 consistency label on such a state appears to have no useful effect in
3734 any of the places it is examined, which I enumerate below. The key
3735 point to understanding each item in this enumeration is that a state
3736 with an error transition is labelled consistent in the first place only
3737 if it has no rules, so the check cannot matter for states that have
3738 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3739 to try to identify its conflicts, and a state must have *rules* to have
3740 conflicts. (2) Labelling a state as inconsistent will affect how
3741 action_row sets the default *rule* for the state. (3) Labelling a
3742 state as inconsistent will cause build_relations to add lookback edges
3743 to *rules* in that state.
3744 * src/state.h (struct state): Word the comment for member consistent
3745 more carefully.
3746
14462c2b
JD
37472007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3748
3749 Don't depend on C99 features.
3750 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3751 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3752 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3753 * src/state.c (state_mark_reachable_states): Fix for-loop.
3754 (state_remove_unreachable_states): Fix for-loop.
3755
3756 Don't widen struct state with member reachable just to temporarily
3757 record reachability. Instead, use a local bitset.
3758 * src/state.h (struct state): Remove member.
3759 * src/state.c (state_new): Don't initialize it.
3760 (state_mark_reachable_states): Rename to...
3761 (state_record_reachable_states): ... this, and use bitset.
3762 (state_remove_unreachable_states): Use bitset.
3763
5a43d418
JD
37642007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3765
3766 * src/Makefile.am (yacc): Quote target action commands properly so
3767 that the yacc script isn't corrupt. Reported by Hans Aberg at
3768 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3769
0c650a20
JD
3770 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3771 the case of pure parsers. Reported by Frans Englich at
3772 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3773 * THANKS: Add Frans Englich.
3774
61fee93e
JD
3775 * NEWS (2.3a+): In the %code entry, reference section `Bison
3776 Declaration Summary' from the manual now since the %code summary has
3777 moved there.
3778 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3779 in the rules section must be terminated by semicolons.
3780
f124d423
JD
37812007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3782
3783 Extend the front-end API for %define variables to more completely
3784 mirror the back-end. This will be useful in the future.
3785 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3786 Update comments to mention the new front-end counterparts of these
3787 macros.
3788 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3789 for muscle_string_decode and muscle_location_decode.
3790 (muscle_string_decode): New static function.
3791 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3792 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3793 functions.
3794 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3795 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3796 implementation more closely.
3797 (muscle_percent_define_invalid_value): New function.
3798 * src/muscle_tab.h (muscle_percent_define_get,
3799 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3800 Prototype.
3801
75ad86ee
JD
38022007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3803
3804 * NEWS (2.3a+): Mention yesterday's state-removal change.
3805 (2.3a): Remove the %language entry, which was added after 2.3a.
3806 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3807 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3808 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3809 tests/existing.at: Update copyright date.
3810
5967f0cf
JD
38112007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3812
3813 If conflict resolution makes states unreachable, remove those states,
3814 report rules that are then unused, and don't report conflicts in those
3815 states.
3816 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3817 New global function.
3818 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3819 function.
3820 * src/main.c (main): After conflict resolution, remove the unreachable
3821 states and update all data structures that reference states by number.
3822 * src/state.c (state_new): Initialize each state's reachable member to
3823 false.
3824 (state_mark_reachable_states): New static function.
3825 (state_remove_unreachable_states): New global function.
3826 * src/state.h (struct state): Add member bool reachable.
3827 (state_remove_unreachable_states): Prototype.
3828 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3829 New test case.
3830 * tests/existing.at (GNU pic Grammar): Update test case output now that
3831 an unused rule is discovered.
3832
b09f4f48
JD
38332007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3834
3835 Minor code cleanup in parser table construction.
3836 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3837 (new_itemsets, save_reductions): Update for rename to nitemset.
3838 * src/closure.c (nritemset): Rename to...
3839 (nitemset): ... this since the "r" appears to meaningless and isn't
3840 used in the comments.
3841 (closure): Update for rename.
3842 * src/closure.h (nritemset): Update extern to...
3843 (nitemset): ... this.
3844 * src/lalr.c (LA): Fix a typo in comments.
3845 * src/print.c (print_core): Update for rename to nitemset.
3846 * src/print_graph.c (print_graph): Likewise.
3847 * src/state.h: Fix some typos in header comments.
3848
bbb44d83
PE
38492007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3850
9b33de72
PE
3851 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3852 still sticks to ASCII. Sorry!
3853
bbb44d83
PE
3854 * README-hacking: New file, taken mostly from coreutils, with changes
3855 for Bison. Contains much of the contents of:
3856 * README-cvs: Remove.
3857 * bootstrap: Sync from gnulib.
3858 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3859 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3860
29553547
JD
38612007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3862
3863 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3864 Setzer.
3865 (Java Differences): Fix some typos.
3866 * THANKS: Add Sebastian Setzer.
3867
01b477c6
PB
38682007-03-07 Paolo Bonzini <bonzini@gnu.org>
3869
730739e4
AD
3870 * data/java.m4 (b4_single_class_if): Remove.
3871 (b4_abstract_if): Look at "%define abstract".
3872 (b4_lexer_if): New.
3873 (b4_union_name): Rename...
3874 (b4_yystype): ... to this. Map to "%define stype".
3875 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3876 b4_maybe_throws): Fix quoting.
3877 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3878 * data/lalr1.java (Lexer interface): Always define.
3879 (Lexer interface within parser class): Remove.
3880 (YYLexer class): New, used when "%code lexer" is present.
3881 (constructor): When "%code lexer" is used, pass %lex-param
3882 to the lexer constructor.
3883 (yylex, yyparse): Remove %lex-param from method invocations
3884 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3885
3886 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3887 abstract". Rename "%define union_name" to "%define stype".
3888 Rename method names according to previous patch.
3889 (Java Scanner Interface): Describe "%code lexer" instead of
3890 "%pure-parser" and "%define single_class".
3891 (Java Differences): Mention "%code lexer".
3892
3893 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3894 Include scanner here, using macros from tests/local.at.
3895 (AT_DATA_CALC_Y): Remove final argument.
3896 (_AT_CHECK_JAVA_CALC): Likewise.
3897 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3898 of %locations and %error-verbose.
3899 (main): Test with and without %lex-param.
3900 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3901 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 3902
122bea3a
JMG
39032007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3904
3905 DJGPP spefic issue. Inhibit the use of disallowed characters for
3906 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3907 and concern testsuite case 46.
3908 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3909 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3910 * djgpp/config.bat: Inhibit the use of disallowed characters.
3911
9611cfa2
JD
39122007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3913
3914 Miscellaneous %define and %code cleanup.
3915 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3916 values are interpreted.
3917 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3918 documentation a little more.
3919 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3920 muscle_percent_define_insert, muscle_percent_code_grow): New
3921 functions/macros.
3922 * src/muscle_tab.h (muscle_percent_define_insert,
3923 muscle_percent_code_grow): Prototype.
3924 * src/parse-gram.y (prologue_declaration): Use
3925 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3926 %define and %code directives.
3927
3928 Make it easy to share %define boolean variables between the front-end
3929 and back-end. Though not used yet, this will be useful in the future.
3930 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3931 Bison uses of names rather than just skeleton uses of names.
3932 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3933 b4_percent_define_skeleton_variables(VARIABLE) to
3934 b4_percent_define_bison_variables(VARIABLE).
3935 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3936 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3937 b4_percent_code_bison_qualifiers(QUALIFIER).
3938 (b4_check_user_names_wrap): Update for renames.
3939 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3940 muscle_percent_define_default): New functions mimicking
3941 b4_percent_define_flag_if and b4_percent_define_default.
3942
3943 For %define variables, report locations for invalid values and
bbb44d83 3944 redefinitions.
9611cfa2
JD
3945 * data/bison.m4 (b4_percent_define_flag_if): Read
3946 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3947 value for VARIABLE.
3948 (b4_percent_define_default): Save a special location in
3949 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3950 must later be reported as invalid.
3951 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3952 functions.
3953 (muscle_percent_define_insert): Record the location of VARIABLE in
3954 muscle percent_define_loc(VARIABLE), and use it to report the previous
3955 location for a redefinition.
3956 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3957 (muscle_percent_define_default): Update like b4_percent_define_default.
3958 (muscle_grow_user_name_list): Rename to...
3959 (muscle_user_name_list_grow): ... this for consistency and use
3960 muscle_location_grow.
3961 * src/muscle_tab.h (muscle_location_grow): Prototype.
3962 * tests/input.at (%define errors): Update expected output.
3963 * tests/skeletons.at (%define boolean variables: invalid skeleton
3964 defaults): New test case.
3965
0bf92491
JD
39662007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3967
3968 * src/print.c (lookahead_set, state_default_rule): Remove.
3969 (print_reductions): Replace state_default_rule invocation with
3970 equivalent use of yydefact, which was computed in token_actions in
3971 tables.c.
3972 (print_results): Don't allocate lookahead_set.
3973
d3b12988
PB
39742007-02-27 Paolo Bonzini <bonzini@gnu.org>
3975
3976 * data/lalr1.java: Prefix all private members with yy.
3977
f57a7536
JD
39782007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3979
3980 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 3981 Sebastien Fricker at
f57a7536 3982 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 3983 * THANKS: Add Sebastien Fricker.
f57a7536
JD
3984 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3985 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3986 accept a variable number of arguments.
3987
6404a5bf
JD
39882007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3989
3990 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3991
e4e09639
JMG
39922007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3993
3994 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3995 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3996 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3997
d7e0a1a7
PE
39982007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3999
4000 Undo my 2007-02-07 change, switching back to the c-strcase module
4001 introduced in the 2007-02-03 change. Bruno Haible reported that
4002 the 2007-02-07 change would be dangerous in Turkish if we add a
4003 language whose name contains "i", since "i" is not lowercase "I"
4004 in Turkish.
4005 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4006 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4007 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4008 * m4/.cvsignore: Remove strcase.m4.
4009 * src/getargs.c: Revert 2007-02-07 change, as follows.
4010 Include c-strcase.h.
4011 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4012
deee93a1
JD
40132007-02-11 Bruno Haible <bruno@clisp.org>
4014
4015 Enable the Java related testsuite tests when the only Java compiler
4016 found is a gcj < 4.3. Discussed at
4017 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4018 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4019
574add85
JD
40202007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4021
4022 * data/Makefile.am: Update copyright date.
4023 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4024 yypstate_new returns NULL.
4025 (yypstate_new): Return NULL if malloc does.
4026 * src/reader.c (packgram): Move translation of rule actions from the
4027 beginning of packgram to...
4028 (check_and_convert_grammar): ... here right before packgram is invoked
4029 so it's easier to write more complete comments, and remove redundant
4030 code.
4031
e785ccf7
JD
40322007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4033
4034 As in semantic actions, make @$ in %initial-action, %destructor, and
4035 %printer imply %locations.
4036 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4037 scanning @$.
4038 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4039 (@$ in %initial-action implies %locations,
4040 @$ in %destructor implies %locations,
4041 @$ in %printer implies %locations): ... these new test cases.
4042
1cfe1ed7
PE
40432007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4044
4045 Undo most of the 2007-02-03 change, switching to the strcase module
4046 now that gnulib strcase has been fixed.
4047 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4048 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4049 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4050 * m4/.cvsignore: Add strcase.m4.
4051 * src/getargs.c: Revert 2007-02-03 change, as follows.
4052 Don't include c-strcase.h.
4053 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4054 strcasecmp has "unspecified behavior" outside the POSIX locale,
4055 but it works fine in practice if at least one argument is ASCII,
4056 as is the case in Bison.
4057
0049ec86
PB
40582007-02-07 Paolo Bonzini <bonzini@gnu.org>
4059
4060 * tests/java.at: Skip tests if only one of javac/java is present.
4061 Reported by Joel E. Denny.
4062 * tests/atlocal.in: Adjust copyright years.
4063
40642007-02-05 Paolo Bonzini <bonzini@gnu.org>
4065
4066 * data/lalr1.java (Stack): Work around old verifiers that disallow
4067 access to the private fields of an inner class, from the outer class.
4068 We can make Stack's fields public because user code doesn't have access
4069 to the instance of Stack used by parse(). Reported by Paul Eggert.
4070
2c2b7220
PE
40712007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4072
4073 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4074 the right spot for these files?
4075 * bootstrap.conf (gnulib_modules): Add c-strcase.
4076 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4077 c-strncasecmp.c.
4078 * src/getargs.c: Include c-strcase.h.
4079 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4080 to avoid unspecified behavior.
4081
b2b81dae
JD
40822007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4083
4084 * doc/bison.texinfo (Decl Summary): Correct typo.
4085
c1d19e10
PB
40862007-01-30 Paolo Bonzini <bonzini@gnu.org>
4087
4088 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4089 Complain if the value does not match empty, "true" or "false".
4090 * data/c++.m4: Adjust default definitions of %define variables.
4091 * data/java.m4: Adjust default definitions of %define variables.
4092 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4093 to above behavior.
4094 * tests/input.at (Boolean %define variables): Test new behavior.
4095
8405b70c
PB
40962007-01-29 Paolo Bonzini <bonzini@gnu.org>
4097
4098 * NEWS: Mention java.
4099 * TODO: Remove things that are done.
4100 * bootstrap.conf: Add javacomp-script and javaexec-script.
4101 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4102
4103 * data/Makefile.am: Add new files.
4104 * data/java-skel.m4: New.
4105 * data/java.m4: New.
4106 * data/lalr1.java: New.
4107
4108 * doc/bison.texinfo: Put "A Complete C++ Example" under
4109 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4110 under Other Languages.
4111
4112 * src/getargs.c (valid_languages): Add Java.
4113 * src/getargs.h (struct bison_language): Update size of string fields.
4114
4115 * tests/Makefile.am: Add java.at.
4116 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4117 * tests/java.at: New.
4118 * tests/testsuite.at: Include it.
4119
3eb82471
JD
41202007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4121
4122 Clean up.
4123 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4124 at_directive_argv arguments so these no longer have to be global
4125 variables. Also, update the implementation for the following changes.
4126 (fail_for_at_directive_too_many_args,
4127 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4128 (at_directive_name): Remove as at_directive_argv[0] will be used for
4129 this now.
4130 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4131 for the directive name.
4132 (at_directive_argc, at_directive_argv): Make these local within
4133 skel_lex instead of global.
4134 (INITIAL): Update directive start action for above changes.
4135 (SC_AT_DIRECTIVE_ARG): Rename to...
4136 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4137 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4138 (scan_skel): Move yylex_destroy to...
4139 (skel_scanner_free): ... here.
4140 * tests/skeletons.at (installed skeleton file name): Rename to...
4141 (installed skeleton file names): ... this.
4142
148d66d8
JD
41432007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4144
4145 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4146 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4147 Summary" not "Directives".
4148 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4149 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4150 since the former is now the more complete one.
4151 (Prologue Alternatives): Likewise and do the same for %defines.
4152 (Table of Symbols): Add summary of %code, add summary of %define, and
4153 move full %code documentation to...
4154 (Decl Summary): ... here for consistency with other entries in these
4155 sections.
4156 Move %define entry in order to keep this list alphabetized.
4157 Reword %define entry a little to put less emphasis on the skeleton
4158 concept, which most users shouldn't have to think about.
4159
665f0c24
PE
41602007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4161
4162 Adjust to recent gnulib changes.
4163 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4164 Add string.h, string_.h, unistd_.h, wchar_.h.
4165 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4166 * src/system.h: Don't include <stpcpy.h>; this is now done by
4167 <string.h>.
4168
592d0b1e
PB
41692007-01-23 Paolo Bonzini <bonzini@gnu.org>
4170
4171 Simplify implementation of unqualified %code, implement macros for
4172 uniform treatment of boolean %define flags. Document %define.
4173 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4174 b4_percent_code_ifdef): New.
4175 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4176 * data/c++.m4: Define default value for global_tokens_and_yystype.
4177 * data/glr.cc: Likewise.
4178 * data/location.cc: Use b4_percent_define_flag_if.
4179
148d66d8 4180 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
4181
4182 * src/parse-gram.y (Unqualified %code): Change muscle name to
4183 b4_percent_code().
4184 (content.opt): Default to empty.
4185
a7867f53
JD
41862007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4187
4188 Implement support for relative and absolute skeleton file names.
4189 Discussed starting at
4190 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4191 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4192 (Bison Options): Document in --skeleton entry.
4193 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4194 full_skeleton can't necessarily hold all of pkgdatadir.
4195 If the specified skeleton file name contains a `/', don't prepend
4196 pkgdatadir.
4197 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4198 file name contains a `/', prepend the grammar file directory.
4199 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4200 * skeletons.at: New file.
4201 (relative skeleton file names): New test case.
4202 (installed skeleton file names): New test case.
4203 * tests/testsuite.at: Include skeletons.at.
4204
4205 * bootstrap: Update copyright to 2007.
4206
830c9b18
PB
42072007-01-17 Paolo Bonzini <bonzini@gnu.org>
4208
4209 * bootstrap: Remove occurrences of .#bootmp from the files.
4210
a8c2e813
AD
42112007-01-17 Akim Demaille <akim@epita.fr>
4212
4213 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4214 nonterminals.
4215 Use per-type %printer.
4216
279cabb6
JD
42172007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4218
4219 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4220 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4221 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4222 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4223 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4224 tests/glr-regression.at, tests/input.at, tests/local.at,
4225 tests/output.at, tests/torture.at: Update copyright to 2007.
4226
bb32f4f2
AD
42272007-01-16 Akim Demaille <akim@epita.fr>
4228
4229 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4230 error code.
4231 (Calc++ Scanner): Exit with failure if we can't open the input
4232 file.
4233 Accept "-" standing for stdin.
4234 (Calc++ Top Level): Print the result only if the parsing was
4235 successful.
4236
7cff04b5
AD
42372007-01-16 Akim Demaille <akim@epita.fr>
4238
4239 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4240
a4e25e1d
JD
42412007-01-15 Paolo Bonzini <bonzini@gnu.org>
4242 and Joel E. Denny <jdenny@ces.clemson.edu>
4243
4244 Clean up %define and %code implementation in M4 some. Most
4245 importantly, rename all related macros to be in the b4_percent_define
4246 and b4_percent_code namespaces. Also, complete support for `.' in
4247 %define variable names and %code qualifiers.
4248 * data/bison.m4 (b4_check_user_names): Check for special
4249 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4250 m4_foreach loops.
4251 (b4_get_percent_define, b4_get_percent_code): Rename to...
4252 (b4_percent_define_get, b4_percent_code_get): ... these.
4253 Extend documentation with examples.
4254 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4255 b4_percent_define_skeleton_variables and
4256 b4_percent_code_skeleton_qualifiers.
4257 Expect any value for the %define variable `foo' to be stored in the
4258 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4259 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4260 expect any unqualified %code blocks to be stored in a macro named
4261 `b4_percent_code_unqualified'.
4262 Use m4_indir so that %define variable names and %code qualifiers can
4263 contain `.', which is allowed by the grammar parser.
4264 (b4_percent_define_default): New macro to set a default value for a
4265 %define variable.
4266 (m4_wrap): Update wrapped code, and fix some underquoting.
4267 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4268 Expect grammar uses of %define variables and %code qualifiers to be
4269 defined in b4_percent_define_user_variables and
4270 b4_percent_code_user_qualifiers.
4271 * data/c++.m4: Use b4_percent_define_default rather than
4272 m4_define_default. Fix some underquoting. Skeleton usage of %define
4273 variable define_location_comparison now implies skeleton usage of
4274 %define variable filename_type.
4275 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4276 data/push.c, data/yacc.c: Update macro names.
4277 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4278 muscle names.
4279
e37c665c
JMG
42802007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4281
4282 DJGPP specific issues.
4283
4284 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4285 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4286
7d2d521f
JD
42872007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4288
4289 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4290 run parsers in all tests so that Valgrind is invoked during
4291 maintainer-check-valgrind.
4292 (Duplicate representation of merged trees): Free all semantic values.
4293 (Duplicated user destructor for lookahead): Likewise.
4294
e0ac9b4b
JD
42952007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4296
4297 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4298 command-line prefix.
4299 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4300 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4301 miss Valgrind messages.
4302 (Exploding the Stack Size with Malloc): Likewise.
4303
78143faa
JD
43042007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4305
4306 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4307 locals. Reported by Juan Manuel Guerrero at
4308 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4309 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4310 Fix some indentation also.
4311 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4312 explaining this issue.
4313
7ecec4dd
JD
43142007-01-09 Paolo Bonzini <bonzini@gnu.org>
4315 and Joel E. Denny <jdenny@ces.clemson.edu>
4316
4317 Simplify union and prologue handling, and escape union and lex/parse
4318 params with digraphs.
4319 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4320 values to the empty string since these are no longer guaranteed
4321 initialized by the front-end.
4322 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4323 braces around b4_user_stype since this is no longer done by the
4324 front-end.
4325 * src/files.c, src/files.h (pre_prologue_obstack,
4326 post_prologue_obstack): Remove.
4327 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4328 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4329 with digraphs. This fixes lex params and parse params.
4330 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4331 * src/output.c (prepare): Remove muscle insertion of the prologues.
4332 (output): Remove freeing of pre_prologue_obstack and
4333 post_prologue_obstack.
4334 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4335 than prologue_augment for prologue parsing so you don't need prologue
4336 obstacks.
5c80250c
JD
4337 (grammar_declaration): For %union RHS, use `braceless' instead of
4338 "{...}" so that braces are already stripped and code is escaped with
4339 digraphs.
7ecec4dd
JD
4340 * src/reader.c (prologue_augment): Remove.
4341 (reader): Remove initialization of pre_prologue_obstack and
4342 post_prologue_obstack.
4343 * src/reader.h (prologue_augment): Remove.
4344
4345 * data/c.m4: Remove stray parenthesis.
4346
16dc6a9e
JD
43472007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4348
4349 Remove quotes from variables names in %define directives and from
4350 qualifiers in %code directives, and restrict the characters that are
4351 allowed in them to M4-friendly ones. For %define, continue to support
4352 the quoted form as a deprecated feature. Discussed starting at
4353 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4354 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4355 %code.
4356 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
4357 (Decl Summary): In %defines entry, update mention of `%code requires'
4358 and `%code provides'.
16dc6a9e
JD
4359 (C++ Location Values): Update %define uses.
4360 (Calc++ Parser Interface): Likewise.
4361 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 4362 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
4363 * src/parse-gram.y (prologue_declaration): For %define variables, use
4364 `variable' instead of `STRING'.
4365 (grammar_declaration): For %code qualifiers, use `ID' instead of
4366 `STRING'.
4367 (variable): New nonterminal that takes an `ID' or a `STRING'.
4368 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4369 and %define uses.
4370 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4371 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4372 (%define errors): Update %define uses.
4373
e9813cd4
JD
43742007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4375
4376 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4377 instead of muscle_insert for %define values so that M4-special
4378 characters are replaced with digraphs.
4379 * tests/input.at (%define errors): Extend to check weird values.
4380
6afc30cc
JD
43812007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4382
4383 Instead of having skeletons declare all valid %define variables and
4384 %code qualifiers, provide macros that retrieve the associated values
4385 and build these lists automatically. Thus Bison will now warn when a
4386 variable or qualifier is not used by the skeleton in the current
4387 invocation regardless of whether it might sometimes be used by that
4388 skeleton in other invocations. Also, move all %define value macros to
4389 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4390 form, which is replaced by %code.
4391 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4392 (b4_check_user_names): ... this, and change the series of valid name
4393 arguments to a single list argument for names used in the skeleton
4394 similar to the existing list argument for names used in the grammar.
4395 Warn instead of complaining.
4396 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4397 values and %code code, to format %code code properly, and to build
4398 lists of all %define variables and %code qualifiers used in the
4399 skeleton: b4_skeleton_percent_define_variables and
4400 b4_skeleton_percent_code_qualifiers.
4401 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4402 Remove, and...
4403 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4404 the skeleton names lists can finish building first. In place of
4405 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4406 expect the lists b4_user_percent_define_variables and
4407 b4_user_percent_code_qualifiers.
4408 * data/c++.m4: Where setting default values for b4_parser_class_name,
4409 b4_location_type, b4_filename_type, b4_namespace, and
4410 b4_define_location_comparison, update their names to the
4411 b4_percent_define_ namespace.
4412 * data/glr.c: Don't use b4_check_percent_define_variables and
4413 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4414 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4415 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 4416 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
4417 * data/location.cc: Use b4_get_percent_define.
4418 * data/push.c: Don't use b4_check_percent_define_variables and
4419 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4420 * data/yacc.c: Likewise, and don't call m4_exit in
4421 b4_use_push_for_pull_if or m4_wrap code will never execute.
4422 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4423 Rename to...
4424 (muscle_grow_user_name_list): ... this for consistency with the
4425 terminology used in bison.m4.
4426 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4427 %define variable names, and rename muscle used_percent_define_variables
4428 to user_percent_define_variables.
4429 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4430 user_percent_code_qualifiers.
4431 (content): Remove.
4432 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4433 {CODE} form is no longer accepted.
4434 * tests/input.at (Reject bad %code qualifiers): Rename to...
4435 (Reject unused %code qualifiers): ... this, and update test output.
4436 (%define error): Update test output.
4437
7eb8a0bc
JD
44382007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4439
4440 Check for unrecognized %define variables similar to checking for
4441 unrecognized %code qualifiers. Check for redefined %define variables.
4442 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4443 generalizes...
4444 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4445 (b4_check_percent_define_variables): New, also wraps it.
4446 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4447 variables using b4_check_percent_define_variables.
4448 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4449 all those exercised in the test suite and all those listed in the
4450 `Default values' section of c++.m4. Are there others?
4451 * data/push.c, data/yacc.c: Declare no valid %define variables.
4452 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4453 similar to muscle_find, but it works even when the muscle stores a
4454 const value.
4455 (muscle_grow_used_name_list): New function for constructing the used
4456 name list muscles that b4_check_for_unrecognized_names requires.
4457 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4458 %define'd more than once. Define the b4_used_percent_define_variables
4459 muscle with muscle_grow_used_name_list.
4460 (grammar_declaration): Abbreviate %code code with
4461 muscle_grow_used_name_list.
4462 * tests/input.at (%define errors): New.
4463
3fc65ead
JD
44642007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4465
4466 Provide warn_at, complain_at, and fatal_at function callbacks to the
4467 skeletons, and use this for %code qualifier complaints.
4468 * data/bison.m4 (b4_error_at): New, invoked by...
4469 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4470 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4471 @fatal_at(...@) directives.
4472 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4473 qualifiers in b4_used_percent_code_qualifiers and to use
4474 b4_complain_at.
4475 * src/location.c, src/location.h (boundary_set_from_string): New global
4476 function.
4477 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4478 function.
4479 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4480 to b4_used_percent_code_qualifiers.
4481 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4482 function.
4483 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4484 (lineno): Rename to...
4485 (out_lineno): ... this so I don't misunderstand it again.
4486 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4487 here; these newlines are in the input but not the output file.
4488 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4489 (at_directive_perform): ... this new static function, and add handling
4490 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4491 directives.
4492 * tests/input.at (Reject bad %code qualifiers): Update test output with
4493 locations and extend.
4494
4495 * tests/output.at (Output file name: [, Output file name: ]): Remove
4496 bogus comment about these tests failing.
4497
1c7b7e1d
JD
44982007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4499
4500 Clean up b4_check_percent_code_qualifiers a little.
4501 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4502 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4503 documentation and add examples.
4504 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4505 qualifiers here.
4506
08af01c2
JD
45072007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4508
4509 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4510 unreliable -- especially when they're hidden inside another macro.
4511 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4512 data/c.m4: Remove m4_divert(-1).
4513 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4514 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4515 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 4516 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
4517 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4518 pushed and popped by m4sugar, should be first on the stack.
4519
4520 Provide warn, complain, and fatal function callbacks to the skeletons.
4521 This provides more flexibility than m4_fatal, improves the error
4522 message format, and captures messages for translation. Discussed
4523 starting at
4524 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4525 * data/bison.m4 (b4_error): New, invoked by...
4526 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4527 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4528 directives. Because these M4 macros might be called when the current
4529 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4530 the previous removal of uses of m4_divert, which caused trouble.
4531 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4532 m4_fatal to report unrecognized %code qualifiers.
4533 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4534 push parser requests.
4535 * data/glr.c: Use b4_complain instead of m4_fatal to report
4536 non-deterministic push parser requests.
4537 Update @output usage to @output(...@) form.
4538 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4539 report missing %defines. Update @output usage to @output(...@) form.
4540 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4541 @output(...@) form.
4542 * src/main.c (main): Invoke skel_scanner_free.
4543 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4544 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4545 obstack_for_string from flex-scanner.h.
4546 (YY_DECL): Use to declare skel_lex static.
4547 (decode_at_digraphs): Remove; now handled in the new
4548 SC_AT_DIRECTIVE_ARG start condition.
4549 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4550 functions.
4551 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4552 at_directive_argv): New static globals.
4553 (INITIAL): Use fail_for_invalid_at.
4554 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4555 recognize the start of a generalized `@directive(...@)' form and
4556 start...
4557 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4558 directive args (using the new obstack_for_string), to decode the
4559 contained @ diagraphs, and to perform the directive. It recognizes
4560 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4561 @output(...@).
4562 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4563 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4564 `@,'.
4565 (scan_skel): Initialize obstack_for_string on the first call.
4566 (skel_scanner_free): New function to free obstack_for_string.
4567 * tests/input.at (Reject bad %code qualifiers): Update test output.
4568
8e0a5e9e
JD
45692007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4570
4571 Consolidate the 4 prologue alternative directives (%code, %requires,
4572 %provides, and %code-top) into a single %code directive with an
4573 optional qualifier field. Discussed at
4574 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4575 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4576 alternatives.
4577 * doc/bison.texinfo (Prologue Alternatives): Update.
4578 (Decl Summary): Update to %code "requires" and %code "provides".
4579 (Calc++ Parser): Update to %code "requires".
148d66d8 4580 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
4581 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4582 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4583 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4584 which are skeleton-specific.
4585 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4586 declare what %code qualifiers it supports and to complain if any other
4587 qualifiers were used in the grammar.
4588 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4589 and b4_user_code([b4_percent_code_provides]) in place of
4590 b4_user_requires and b4_user_provides.
4591 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4592 Add b4_user_code([b4_percent_code_top]) and
4593 b4_user_code([b4_percent_code]).
4594 Invoke b4_check_percent_code_qualifiers.
4595 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4596 PERCENT_REQUIRES): Remove.
4597 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4598 %requires. Rewrite the %code RHS as the unqualified form defining the
4599 muscle b4_percent_code. Add another RHS for the qualified %code form,
4600 which defines muscles of the form b4_percent_code_QUALIFIER and the
4601 b4_used_percent_code_qualifiers muscle.
4602 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4603 PERCENT_REQUIRES): Remove.
4604 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4605 %code "requires" and %code "provides".
4606 * tests/input.at (Reject bad %code qualifiers): New.
4607
95021767
JD
46082007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4609
4610 Use the new code_props interface for destructors and printers.
4611 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4612 printer_location members, and change the type of the destructor and
4613 printer members to code_props.
4614 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4615 symbol_printer_get, semantic_type_destructor_set,
4616 semantic_type_printer_set, default_tagged_destructor_set,
4617 default_tagless_destructor_set, default_tagged_printer_set,
4618 default_tagless_printer_set): Use code_props in arguments and return
4619 types in place of char const * and location.
4620 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4621 since the locations are now contained in the return of
4622 symbol_destructor_get and symbol_printer_get.
4623 * src/output.c (symbol_destructors_output, symbol_printers_output):
4624 Replace with...
4625 (symbol_code_props_output): ... this to eliminate duplicate code.
4626 (output_skeleton): Update to use symbol_code_props_output.
4627 * src/reader.c (symbol_should_be_used): Update use of
4628 symbol_destructor_get.
4629 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4630 Update uses of the various _destructor_set and _printer_set functions.
4631 * src/symtab.c: (default_tagged_destructor_location,
4632 default_tagless_destructor_location, default_tagged_printer_location,
4633 default_tagless_printer_location): Remove since we...
4634 (default_tagged_destructor, default_tagless_destructor,
4635 default_tagged_printer, default_tagless_printer): ... change the type
4636 of these to code_props.
4637 (symbol_new, semantic_type_new, symbol_destructor_set,
4638 semantic_type_destructor_set, symbol_destructor_get,
4639 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4640 symbol_check_alias_consistency, default_tagged_destructor_set,
4641 default_tagless_destructor_set, default_tagged_printer_set,
4642 default_tagless_printer_set): Update.
4643 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4644 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4645 code_props members.
4646 (symbol_print): Use SYMBOL_CODE_PRINT.
4647
f6857bbf
JD
46482007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4649
4650 Use the new code_props interface for rule actions.
4651 * src/symlist.h (symbol_list): Replace action, action_location, and
4652 used members with a code_props action_props member.
4653 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4654 grammar_midrule_action, grammar_current_rule_merge_set,
4655 grammar_current_rule_symbol_append, packgram): Update.
4656 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4657 * src/scan-code.l (handle_action_dollar): Update.
4658 (translate_rule_action): Remove, no longer used.
4659 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4660
7c0c6181
JD
46612007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4662
4663 Use the new code_props interface in parse-gram.y.
4664 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4665 Update all uses of translate_* functions to use the new code_props
4666 interface and to use gram_scanner_last_string_free and
4667 code_scanner_last_string_free where possible.
4668 (grammar_declaration): symbol_list_destructor_set and
4669 symbol_list_printer_set now perform the translation, so don't do it
4670 here. Use gram_scanner_last_string_free where possible.
4671 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4672 translate_code): Remove, no longer used.
4673 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4674 symbol_list_printer_set): Perform code translation here rather than
4675 depending on the caller to do so.
4676
4677 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4678 * src/scan-gram.h (gram_last_string): Remove declaration.
4679 * src/scan-gram.l (last_string): Declare it static.
4680
28e52c0d
JD
46812007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4682
4683 Encapsulate code properties and related functionality for the various
4684 destructors, printers, and actions into a code_props structure and
4685 interface. This patch merely implements code_props in scan-code.h and
4686 scan-code.l. Future patches will rewrite other modules to use it.
4687 Discussed starting at
4688 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4689 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4690 consistently initialize const structs that have an empty location
4691 field.
4692 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4693 to ensure consistency.
4694 * src/scan-code.h (code_props): New structure.
4695 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4696 function, macro, and const global variable for initializing a
4697 code_props with no code.
4698 (code_props_plain_init, code_props_symbol_action_init,
4699 code_props_rule_action_init, code_props_translate_code): The rest of
4700 the new code_props functional interface. Among other things, the init
4701 functions set the code_props kind field so that
4702 code_props_translate_code will know whether to behave like
4703 translate_symbol_action, translate_rule_action, or translate_code.
4704 These old translate functions must remain until all other modules are
4705 updated to use the new code_props interface.
4706 (code_scanner_last_string_free): New function similar to
4707 gram_scanner_last_string_free.
4708 (code_scanner_free): Add documentation.
4709 * src/scan-code.l: Implement the new interface.
4710 (code_lex): Make it static, add a code_props* argument, and remove the
4711 rule argument.
4712 (last_string): New static global similar to the one in scan-gram.l.
4713 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4714 instead of rule.
4715 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4716 code_props since Bison may one day use this information for destructors
4717 and printers.
4718 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4719 (handle_action_dollar): Use symbol_list_n_get and set used flag
4720 directly since symbol_list_n_used_set is removed.
4721 (translate_action): Add a code_props* argument and remove the rule,
4722 action, and location arguments. Pass the code_props* on to code_lex.
4723 (translate_rule_action, translate_symbol_action, translate_code):
4724 Rewrite as wrappers around the new code_props interface.
4725 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4726 it would eventually need to break the encapsulation of code_props.
4727
96034983
JD
47282007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4729
4730 * etc/.cvsignore: New.
4731
945e396c
JD
47322007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4733
4734 Add maintainer-push-check to run maintainer-check using push parsing in
4735 place of pull parsing where available.
4736 * Makefile.am (maintainer-push-check): New.
4737 * data/bison.m4 (b4_use_push_for_pull_if): New.
4738 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4739 appropriately based on their existing values.
4740 (yypush_parse): Don't print push-parser-specific diagnostics if push
4741 parsing is being used in place of pull parsing.
4742 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4743 push.c.
4744 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4745 variable, and insert b4_use_push_for_pull_flag into muscles.
4746 * tests/Makefile.am (maintainer-push-check): New.
4747
7d596384
JD
47482006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4749
4750 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4751 (whether successful or failed) so that yypush_parse can be invoked
4752 again to start a new parse using the same yypstate.
4753 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4754 check multiple yypull_parse invocations on the same yypstate. For pull
4755 mode, extend to check multiple yyparse invocations.
4756 (Exploding the Stack Size with Alloca): Extend to try with
4757 %push-pull-parser.
4758 (Exploding the Stack Size with Malloc): Likewise.
4759
4760 * tests/calc.at (Simple LALR Calculator): Don't specify
4761 %skeleton "push.c" since %push-pull-parser implies that now.
4762 * tests/headers.at (export YYLTYPE): Don't check for the push
4763 declarations. Otherwise, this test case can't be used to see if push
4764 mode can truly emulate pull mode.
4765 * tests/input.at (Torturing the Scanner): Likewise.
4766 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4767 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4768 AT_YACC_IF, which now includes the case of push mode since %skeleton
4769 need not be used for push mode. This will be more intuitive once
4770 push.c is renamed to yacc.c.
4771
7172e23e
JD
47722006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4773
4774 For push mode, convert yyparse from a macro to a function, invoke yylex
4775 instead of passing a yylexp argument to yypull_parse, and don't
4776 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4777 Discussed starting at
4778 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4779 * data/bison.m4 (b4_pull_if): New.
4780 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4781 * data/push.c: Improve M4 quoting a little.
4782 (b4_generate_macro_args, b4_parenthesize): Remove.
4783 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4784 any time a pull parser is requested.
4785 Don't #define this as a wrapper around yypull_parse. Instead, when
4786 both push and pull are requested, make it a function that does that
4787 same thing.
4788 (yypull_parse): If there's a b4_prefix, #define this to
4789 b4_prefix[pull_parse] when both push and pull are requested.
4790 Don't define this as a function unless both push and pull are
4791 requested.
4792 Remove the yylexp argument and hard-code yylex invocation instead.
4793 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4794 %push-parser.
4795 * src/getargs.c (pull_parser): New global initialized to true.
4796 * getargs.h (pull_parser): extern it.
4797 * src/output.c (prepare): Insert pull_flag muscle.
4798 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4799 (prologue_declaration): Set both push_parser and pull_parser = true for
4800 %push-pull-parser. Set push_parser = true and pull_parser = false for
4801 %push-parser.
4802 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4803 %push-parser since there's no backward-compatibility concern here.
4804 Scan %push-pull-parser.
4805 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4806 instead of %push-parser.
4807 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4808 prototype it in the module that calls yyparse.
4809 * tests/input.at (Torturing the Scanner): Likewise.
4810 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4811
2e7944cb
JD
48122006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4813
4814 Update etc/bench.pl. Optimize push mode a little (the yyn change
4815 deserves most of the credit).
4816 * Makefile.am (SUBDIRS): Add etc subdirectory.
4817 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4818 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4819 yytoken, yyval, and yyloc declarations to...
4820 (yyparse or yypush_parse): ... here to improve performance. For
4821 yypush_parse invocations after the first, be sure to assign yyn its old
4822 value again.
4823 (yypstate_new): Don't bother initializing the yyresult field since the
4824 initial value isn't used.
4825 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4826 remove the #define that, in push mode, set it to yyps->NAME.
4827 * etc/Makefile.am: New.
4828 * etc/bench.pl: Remove and build it instead from...
4829 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4830 "tests/bison" from the build directory by default rather than just
4831 invoking "bison" from $PATH.
4832 (calc_grammar): Update push parser code: don't declare yylval globally,
4833 don't define yyparse_wrapper, and don't #define yyparse.
4834 (bench_grammar): Update to check all working combinations of yacc.c,
4835 push.c, impure, pure, pull, and push.
4836
c3d50342
JD
48372006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4838
4839 For push mode, add pull wrappers around yypush_parse.
4840 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4841 (yypull_parse): New function wrapping yypush_parse.
4842 (yyparse): New #define wrapping yypull_parse.
4843 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4844 is declared.
4845 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4846 prototype yylex in the module that calls yyparse, and don't prototype
4847 yyparse there. Otherwise, the yyparse expansion won't compile.
4848 * tests/input.at (Torturing the Scanner): Likewise.
4849
94ebeba5
JD
48502006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4851
4852 Enable push parsers to operate in impure mode. Thus, %push-parser no
4853 longer implies %pure-parser. The point of this change is to move
4854 towards being able to test the push parser code by running the entire
4855 test suite as if %push-parser had been declared.
4856 * data/push.c (yypush_parse): For impure mode, remove the
4857 yypushed_char, yypushed_val, and yypushed_loc arguments.
4858 Instead, declare these as local variables initialized to the global
4859 yychar, yylval, and yylloc.
4860 For the first yypush_parse invocation only, restore the initial values
4861 of these global variables when it's time to read a token since they
4862 have been overwritten.
4863 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4864 %push-parser.
4865 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4866 %pure-parser along with %push-parser since this test case was designed
4867 for pure push parsers.
4868 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4869 (AT_YACC_OR_PUSH_IF): New.
4870 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4871 add a note that it's still wrong for some cases (as it has been for a
4872 while).
4873 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4874 %push-parser no longer implies %pure-parser.
4875
a0633178
JD
48762006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4877
4878 Remove some unnecessary differences between the pull parser code and
4879 the push parser code. This patch enables yynerrs in push mode.
4880 * data/push.c: Reformat M4 a little.
4881 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4882 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4883 because push mode is on. Instead, if pure mode is on, move yynerrs
4884 to...
4885 (b4_declare_parser_state_variables): ... here.
4886 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4887 to yyps->NAME so it can be used in yypush_parse.
4888 (yypush_parse): Don't omit uses of yynerrs in push mode.
4889
8646b6a3
JD
48902006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4891
4892 Fix bug such that the first pushed token's value and location are
4893 sometimes overwritten (sometimes by %initial-action) before being used.
4894 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4895 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4896 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4897 more closely mimic the pull parser logic.
4898 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4899 time to read a token, which is after any initialization of yylval and
4900 yylloc.
4901 (gottoken): Rename label to...
4902 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4903 user namespace.
4904
9baf4d74
JD
49052006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4906
4907 Rearrange initialization of the parser state variables so that the
4908 skeleton doesn't have to have a copy for pull mode and another for push
4909 mode. This patch also fixes at least a bug such that yylloc was not
4910 initialized (with b4_location_initial_line and
4911 b4_location_initial_column) upon calling yypush_parse. However, that
4912 initialization now overwrites the first token's location;
4913 %initial-action assigning @$ already did the same thing, and both bugs
4914 will be fixed in a later patch.
4915 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4916 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4917 yyss, yyvs, yyls, and yystacksize.
4918 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4919 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4920 yylsp.
4921 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4922 yyps->NAME so it can be used in yypush_parse.
4923 (yyparse or yypush_parse): For yypush_parse, don't print the
4924 "Starting parse" diagnostic for invocations after the first.
4925 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4926 yypush_parse, only do it for the first invocation.
4927 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4928 initialization to occur in yypush_parse but only on the first
4929 invocation.
4930
23522164
JD
49312006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4932
4933 * data/push.c: Add CPP guards around push parser declarations in both
4934 the header and the code file.
4935 In the code file, move the push parser declarations to the same place
4936 they appear in the header file.
4937 Clean up the M4 some, especially the inconsistent underquoting in
4938 some b4_c_function_def and b4_c_function_decl uses.
4939
bb010fe5
JD
49402006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4941
4942 Encapsulate the push parser state variables into an M4 macro so the
4943 push skeleton doesn't have to list them again for pull mode's yyparse.
4944 For push mode, remove yypush_parse's local equivalents of these
4945 variables to eliminate unnecessary copying between the two sets at
4946 run-time. This patch also fixes at least a bug related to multiple
4947 %initial-action invocations in push mode.
4948 * data/push.c (b4_declare_parser_variables): Rename to...
4949 (b4_declare_scanner_communication_variables): ... this for clarity and
4950 update both uses.
4951 (b4_declare_yyparse_variables): Remove and move its contents to the one
4952 spot where it was invoked.
4953 (b4_declare_parser_state_variables): New macro containing the parser
4954 state variables required by push mode.
4955 (struct yypstate): Replace all fields but yynew with
4956 b4_declare_parser_state_variables.
4957 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4958 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4959 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4960 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4961 parser state variable declarations with
4962 b4_declare_parser_state_variables.
4963 Don't initialize parser state variables when calling yypush_parse since
4964 yypstate_new already does that.
4965 Invoke the user's initial action only upon the first yypush_parse
4966 invocation.
4967 Remove all code that copies between the local parser state variables
4968 and the yypstate.
4969
2d212f8c
JD
49702006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4971
4972 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4973 prevent a name collision in a future patch where these names will
4974 sometimes be #define'd.
4975 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4976 since it no longer has the same name as the existing argument.
4977 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4978
e6e704dc
JD
49792006-12-19 Paolo Bonzini <bonzini@gnu.org>
4980 and Joel E. Denny <jdenny@ces.clemson.edu>
4981
4982 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4983 that the argument is case-insensitive, and there's no `=' here.
4984 For the %skeleton entry, mention that %language is better.
4985 (Bison Options): Likewise for --language and --skeleton. Move the
4986 --skeleton entry so that the `Tuning the parser' section is sorted
4987 alphabetically on long options.
4988 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4989 %language directive in detail here; cross-reference the %language
4990 documentation instead.
4991 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4992 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 4993 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
4994 * examples/extexi (normalize): Instead of replacing every %require
4995 argument with the current Bison version, just substitute for
4996 `@value{VERSION}'. This guarantees that we're testing what actually
4997 appears in the documentation.
4998 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4999 rather than `@VERSION@'.
5000
0e021770
PE
50012006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5002
fd575f05
PE
5003 * NEWS: Reword the %language news a bit, and put it earlier.
5004
0e021770
PE
5005 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5006 Rewrite to simplify the logic.
5007 (language_argmatch): Likewise.
fd575f05
PE
5008 (program_name): We now own this var.
5009 * src/getargs.h (struct bison_language): Use char[] rather than
5010 const char *.
0e021770
PE
5011
5012 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5013 Java is supported.
5014 * src/complain.c (program_name): Remove decl; no longer needed.
5015 * src/main.c (program_name): Remove; now belongs to getargs.
5016
50172006-12-18 Paolo Bonzini <bonzini@gnu.org>
5018
5019 * NEWS: Document %language.
5020
5021 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5022
5023 * data/c-skel.m4, data/c++-skel.m4: New files.
5024 * data/glr.c: Complain on push parsers.
5025
5026 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5027 over %skeleton.
148d66d8 5028 (Decl Summary): Document %language and %skeleton.
0e021770
PE
5029 (Command line): Document -L.
5030
5031 * examples/extexi: Rewrite %require directive.
5032 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5033
5034 * src/files.c (compute_exts_from_gc): Look in language structure
5035 for .y extension.
5036 (compute_file_name_parts): Check whether .tab should be added.
5037 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5038 (language, skeleton_arg, language_argmatch): New.
5039 (long_options): Add --language.
5040 (getargs): Use skeleton_arg, add -L/--language.
5041 * src/getargs.h: Include location.h.
5042 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5043 * src/output.c (prepare): Pick default skeleton from struct language.
5044 Don't dispatch C skeletons here.
5045 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5046 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5047 * src/scan-gram.l ("%language"): New rule.
5048
5049 * tests/calc.at: Test %skeleton and %language.
5050 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5051 (AT_GLR_IF): Look for %skeleton "glr.cc".
5052 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5053 (AT_YACC_IF): Reject %language.
5054
5691bf57
PE
50552006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5056
db06f0ce
PE
5057 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5058 since it wasn't used; only the typedef name 'semantic_type' is needed.
5059 Also, omit trailing white space.
5060
5691bf57
PE
5061 * bootstrap: Sync from coreutils.
5062 (gnulib_extra_files): Add build-aux/announce.gen.
5063 (slurp): Adjust .gitignore files like .cvsignore files.
5064 * build-aux/announce-gen: Remove from CVS, since bootstrap
5065 now creates this.
5066
791934e4
JD
50672006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5068
5069 Make %push-parser imply %pure-parser. This fixes several bugs; see
5070 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5071 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5072 pure_parser = true.
5073 * data/push.c: Don't bother testing b4_push_if when deciding whether
5074 to expand b4_declare_parser_variables globally.
5075 (yypush_parse): Likewise in here.
5076
5077 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5078 (yy_reduce_print): Reformat M4 for readability.
5079
ee5abb37
JD
50802006-12-15 Bob Rossi <bob@brasko.net>
5081 and Joel Denny <jdenny@ces.clemson.edu>
5082
5083 * data/push.c (yypstate): Add typedef, and update all uses of
5084 struct yypstate to just yypstate.
5085 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5086
16ca01f9
JD
50872006-12-14 Bob Rossi <bob@brasko.net>
5088
5089 * data/push.c (yypush_parse): Declare prototype regardless of
5090 %locations option.
5091
ab8e7e1a
JD
50922006-12-14 Bob Rossi <bob@brasko.net>
5093
5094 * data/push.c (yyparse): Remove the prototype and the #define when in
5095 push-parser mode.
5096
9bf32be3
JD
50972006-12-13 Bob Rossi <bob@brasko.net>
5098
5099 * data/push.c (yypstate_init): Rename to...
5100 (yypstate_new): ... this and use b4_c_function_def.
5101 (yypstate_delete): New.
5102 (yypush_parse): Change parameters yynval and yynlloc to be const.
5103 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5104 yypstate_delete functions.
5105
f02e2948
JD
51062006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5107
5108 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5109 strange test case titles. Reported by Bob Rossi.
5110
38eb7751
PE
51112006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5112
5113 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5114 of potential ambiguities in GLR grammers.
5115
bd9d212b
JD
51162006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5117
5118 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5119 `bison ', use m4_index instead of m4_substr since chopping up a string
5120 containing M4-special characters causes problems here.
5121
5122 Fix a couple of bugs related to special characters in user-specified
5123 file names, and make it easier for skeletons to compute output file
5124 names with the same file name prefix as Bison-computed output file
5125 names.
5126 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5127 b4_parser_file_name and b4_spec_defines_file instead of
5128 @output_parser_name@ and @output_header_name@, which are now redundant.
5129 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5130 b4_parser_file_name, b4_spec_defines_file, and the new
5131 @basename(FILENAME@) instead of @output_parser_name@ and
5132 @output_header_name@, which inappropriately escaped the file names as
5133 C string literals.
5134 * src/files.c (all_but_ext): Remove static qualifier.
5135 (compute_output_file_names): Move `free (all_but_ext)' to...
5136 (output_file_names_free): ... here since all_but_ext is needed later.
5137 * src/files.h (all_but_ext): Extern.
5138 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5139 exactly what MUSCLE_INSERT_STRING used to do.
5140 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5141 characters are escaped properly.
5142 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5143 all_but_ext.
5144 For pkgdatadir muscle, maintain previous functionality by using
5145 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5146 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5147 digraphs would never be expanded. Hopefully no one has M4-special
5148 characters in his Bison installation path.
5149 * src/scan-skel.l: Don't parse @output_header_name@ and
5150 @output_parser_name@ anymore since they're now redundant.
5151 In @output, use decode_at_digraphs.
5152 Parse a new @basename command that invokes last_component.
5153 (decode_at_digraphs): New.
5154 (BASE_QPUTS): Remove unused.
5155 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5156 (Output file name): New tests.
5157
3f7ca628
JD
51582006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5159
5160 Warn about output files that are generated by the skeletons and that
5161 conflict with other output files.
5162 * data/glr.c: Don't generate the header file here when glr.cc does.
5163 * src/files.c (file_names, file_names_count): New static globals.
5164 (compute_output_file_names): Invoke output_file_name_check for files
5165 not generated by the skeletons and remove existing checks.
5166 (output_file_name_check): New function that warns about conflicting
5167 output file names.
5168 (output_file_names_free): Free file_names.
5169 * src/files.h (output_file_name_check): Declare.
5170 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5171 the skeletons.
5172 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5173 (Conflicting output files): New tests.
5174
178e123e
PE
51752006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5176
5177 * doc/bison.texinfo: Fix a couple of typos.
5178
51792006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
5180
5181 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5182 Rename to...
5183 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5184 update all uses.
5185 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5186 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5187 local pv.
5188 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5189 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5190
ea17f233
JD
51912006-12-07 Bob Rossi <bob@brasko.net>
5192 and Joel Denny <jdenny@ces.clemson.edu>
5193
5194 * data/push.c (yypvarsinit): Change return type from void* to struct
5195 yypvars*. No longer cast to void* on return.
5196 (struct yypvars): Remove yylen since it need not be remembered between
5197 yypushparse invocations.
5198 (yypushparse): Don't copy between yylen and pv->yylen.
5199
55a30bda
JD
52002006-12-05 Bob Rossi <bob@brasko.net>
5201
5202 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5203 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5204 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5205 (struct yypvars): Remove b4_declare_parser_variables.
5206 (yypvarsinit): Remove init code for removed variables.
5207 (global scope): Do not declare b4_declare_parser_variables if
5208 push or pure mode.
5209 (yypushparse): Add b4_declare_parser_variables.
5210 Init new local variables, and remove init code for removed
5211 yypvars variables.
5212 (yyparse): Delete.
5213 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5214 and yyparse for other modes.
5215 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5216 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5217 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5218 (AT_PURE_LEX_IF): True if pure or push parser.
5219
85894313
JD
52202006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5221
5222 Document Yacc prologue alternatives and default %destructor's and
5223 %printer's as experimental. Don't mention Java yet. Discussed at
5224 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5225 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5226 (2.3a): Annotate this entry to say the old forms of these features were
5227 also experimental.
5228 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 5229 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
5230 of Java (we'll want this back eventually).
5231
02975b9a
JD
52322006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5233
5234 Support a file name argument to %defines. Deprecate `=' in
5235 %file-prefix, %name-prefix, and %output. Discussed at
5236 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5237 * NEWS (2.3a+): Mention.
148d66d8 5238 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
5239 form of %defines, and remove `=' from entries for %file-prefix,
5240 %name-prefix, and %output.
5241 * src/parse-gram.y (prologue_declaration): Implement.
5242 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5243 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5244 all but one occurrence of %name-prefix.
5245 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5246 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5247 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5248 occurrence of each of %file-prefix and %output. Add check for %defines
5249 with argument.
5250 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5251 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5252 Remove the `=' from %output.
5253
287b314e
JD
52542006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5255
5256 Don't escape $ in test case titles since Autoconf 2.61 now does that
5257 correctly.
5258 * tests/actions.at (Default %printer and %destructor are not for error
5259 or $undefined): Here.
5260 (Default %printer and %destructor are not for $accept): Here.
5261 * tests/input.at (Invalid $n and @n): Here.
5262
3ebecc24
JD
52632006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5264
5265 Rename <!> to <>. Discussed starting at
5266 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5267 * NEWS (2.3a+): Update.
148d66d8 5268 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
5269 Update.
5270 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5271 * src/scan-gram.l (INITIAL): Implement.
5272 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5273 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5274 comment.
5275 * tests/actions.at (Default tagless %printer and %destructor,
5276 Default tagged and per-type %printer and %destructor,
5277 Default %printer and %destructor are not for error or $undefined,
5278 Default %printer and %destructor are not for $accept,
5279 Default %printer and %destructor for mid-rule values): Update.
5280 * tests/input.at (Default %printer and %destructor redeclared,
5281 Unused values with default %destructor): Update.
5282
26b8a438
JD
52832006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5284
5285 Don't let %prec take a nonterminal.
5286 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5287 token.
5288 * tests/input.at (%prec takes a token): New test checking that %prec
5289 won't take a nonterminal.
5290
07c39ae9
JD
52912006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5292
405d53b7
JD
5293 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5294 it was double-quoted.
07c39ae9
JD
5295 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5296 grammar is maintained with Bison's highest standards.
5297 * src/getargs.c: Fix some typos in Doxygen comments.
5298
580b8926
JD
52992006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5300
5301 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5302 later. Reported by Paul Eggert in
5303 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5304 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5305 * src/scan-code.l (translate_action): Don't bother invoking
5306 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5307 (code_scanner_free): Instead of invoking
5308 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5309 which frees more.
5310 * src/scan-gram.l (gram_scanner_free): Likewise.
5311 * src/scan-skel.l (scan_skel): Likewise.
5312
4502eadc
JD
53132006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5314
5315 * src/files.c (tr): Change return type to void.
5316 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5317 has been called previously for the same key.
5318 (muscle_find): Return storage instead of value so that
5319 --enable-gcc-warnings doesn't produce warnings that the return discards
5320 const. aver that the value and storage are the same since storage
5321 could potentially be NULL when value is not.
5322 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5323 same as 0.
5324
7746c8f6
PE
53252006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5326
5327 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5328 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5329 us a slightly cleaner distribution, and also works.
5330 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5331 gnulib changes.
5332
eb095650
PE
53332006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5334 and Paul Eggert <eggert@cs.ucla.edu>
5335
5336 Don't let Bison leak memory except when it complains.
5337 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5338 (spec_defines_file, dir_prefix): Now char *, not const char *,
5339 since they are freed.
5340 * src/files.c: Likewise.
5341 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5342 Likewise.
5343 (tr): Now operates in-place. All uses changed.
5344 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5345 values.
5346 (compute_file_name_parts, compute_output_file_names): Don't store
5347 read-only data in variables that will be freed.
5348 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5349 src_extension, and header_extension.
5350 (output_file_names_free): New public function to free
5351 spec_verbose_file, spec_graph_file, spec_defines_file,
5352 parser_file_name, and dir_prefix.
5353 * src/getargs.c (getargs): Don't store read-only data in variables that
5354 will be freed.
5355 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5356 (which previously existed but was unused), and quotearg_free.
5357 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5358 * src/muscle_tab.c: Likewise.
5359 (muscle_entry): Make the value char const *,
5360 and add a new storage member that is char * and can be freed.
5361 (muscle_entry_free): New private function.
5362 (muscle_init): Use it instead of free.
5363 (muscle_insert, muscle_grow): Update and use new storage member.
5364 (muscle_code_grow): Free the string passed to muscle_grow
5365 since it's not needed anymore.
5366 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5367 add a new `char *code' member.
5368 ("{...}"): Declare semantic type as code.
5369 * src/scan-code.h (translate_rule_action):
5370 (translate_symbol_action, translate_code, translate_action): Return
5371 `char const *' rather than `char *' since external code should not free
5372 these strings.
5373 * src/scan-code.l: Likewise.
5374 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5375 which is "{...}" in the parser.
5376 * tests/Makefile.am (maintainer-check-valgrind): Set
5377 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5378 Valgrind.
5379 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5380 complain.
5381 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5382 expecting a non-zero exit status sets --leak-check=summary and
5383 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5384 this case, and we don't want to hear about it.
5385
ac564be4
PE
53862006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5387
5388 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5389 instead of from the template, to simplify configuration a bit.
5390 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5391 and m4/wint_t.m4, as they are needed with the latest gnulib.
5392
17bd8a73
JD
53932006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5394
5395 Disable unset/unused mid-rule value warnings by default, and recognize
5396 --warnings=midrule-values to enable them. Discussed starting at
5397 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5398 * NEWS (2.3a+): Mention.
5399 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5400 warnings): Add entry for midrule-values subargument.
5401 * src/reader.c (symbol_should_be_used): Don't return true just because
5402 the value is a set/used mid-rule value unless
5403 --warnings=midrule-values was specified.
5404 * tests/input.at (Unused values, Unused values before symbol
5405 declarations): Run tests with and without --warnings=midrule-values.
5406
5407 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5408 than LIST_FREE directly.
5409
89eb3c76
JD
54102006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5411
5412 Finish implementing --warnings=error, which should not be implied by
5413 --warnings=all (or by its synonyms -W and --warnings without
5414 subarguments).
5415 * src/complain.c (set_warning_issued): New function to report that
5416 warnings are being treated as errors and to record an error if so.
5417 Invoke...
5418 (warn_at, warn): ... here.
5419 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5420 "error - warnings are errors" does not appear above "all - all of the
5421 above".
5422 (getargs): For -W and --warnings without subarguments, don't let
5423 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5424 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5425
ba7560e2
JD
54262006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5427
5428 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5429 empty subargument list. For example: `bison --warnings= parser.y'.
5430
31283fc3
JD
54312006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5432
5433 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5434 the parser header file so that gcc doesn't warn.
5435
12e35840
JD
54362006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5437
5438 Split the default %destructor/%printer into two kinds: <*> and <!>.
5439 Discussed starting at
5440 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5441 * NEWS (2.3a+): Mention.
5442 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5443 previous change today related to mid-rules.
148d66d8 5444 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 5445 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
5446 (TYPE_TAG_ANY): Add as <*>.
5447 (TYPE_TAG_NONE): Add as <!>.
5448 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5449 for <*> and <!>.
5450 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5451 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5452 * src/symlist.c (symbol_list_default_new): Split into tagged and
5453 tagless versions.
5454 (symbol_list_destructor_set, symbol_list_printer_set): Split
5455 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5456 SYMLIST_DEFAULT_TAGLESS.
5457 * src/symlist.h: Update symbol_list_default*_new prototypes.
5458 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5459 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5460 * src/symtab.c (default_destructor, default_destructor_location,
5461 default_printer, default_printer_location): Split each into tagged and
5462 tagless versions.
5463 (symbol_destructor_get, symbol_destructor_location_get,
5464 symbol_printer_get, symbol_printer_location_get): Implement tagged
5465 default and tagless default cases.
5466 (default_destructor_set, default_printer_set): Split each into tagged
5467 and tagless versions.
5468 * src/symtab.h: Update prototypes.
5469 * tests/actions.at (Default %printer and %destructor): Rename to...
5470 (Default tagless %printer and %destructor): ... this, and extend.
5471 (Per-type %printer and %destructor): Rename to...
5472 (Default tagged and per-type %printer and %destructor): ... this, and
5473 extend.
5474 (Default %printer and %destructor for user-defined end token): Extend.
5475 (Default %printer and %destructor are not for error or $undefined):
5476 Update.
5477 (Default %printer and %destructor are not for $accept): Update.
5478 (Default %printer and %destructor for mid-rule values): Extend.
5479 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5480 (Unused values with default %destructor): Extend.
5481
f91b1629
JD
54822006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5483
5484 Don't apply the default %destructor/%printer to an unreferenced midrule
5485 value. Mentioned at
5486 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5487 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5488 like $@n instead of just @n so that the default %destructor/%printer
5489 logic doesn't see them as user-defined symbols.
5490 (symbol_is_dummy): Check for both forms of the name.
5491 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5492 name for which the midrule value is referenced in any action.
5493 * tests/actions.at (Default %printer and %destructor for mid-rule
5494 values): New test.
5495 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5496 for change to dummy symbol names.
5497
519d0004
JD
54982006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5499
5500 Warn about unset midrule $$ if the corresponding $n is used.
5501 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5502 $n usage.
5503 (packgram): Before invoking grammar_rule_check on any rule, make sure
5504 all actions have already been scanned in order to set `used' flags.
5505 Otherwise, checking that a midrule's $$ is set will not always work
5506 properly because the midrule check must forward-reference the midrule's
5507 parent rule.
5508 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5509 warning.
5510
a501eca9
JD
55112006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5512
5513 More improvements to the documentation of the prologue alternatives:
5514 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5515 Bison manual.
5516 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5517 some text to clarify the relative importance of the new directives and
5518 to show how these directives may be viewed as code labels.
5519
2cbe6b7f
JD
55202006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5521
5522 Similar to the recently removed %before-header, add %code-top as the
5523 alternative to the pre-prologue. Mentioned at
5524 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5525 Also, let the prologue alternatives appear in the grammar section.
5526 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5527 (prologue_declaration): Move the existing prologue alternatives to...
5528 (grammar_declaration): ... here and add %code-top.
5529 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5530
5531 Clean up and extend documentation for the prologue alternatives.
5532 * NEWS (2.3a+): Describe prologue alternatives.
5533 * doc/bison.texinfo (Prologue): Move discussion of prologue
5534 alternatives to...
5535 (Prologue Alternatives): ... this new section, and extend it to discuss
5536 all 4 directives in detail.
148d66d8
JD
5537 (Table of Symbols): Clean up discussion of prologue alternatives and
5538 add %code-top.
2cbe6b7f 5539
e557d3ea
JMG
55402006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5541
5542 DJGPP specific issues.
5543
5544 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5545 config.bat accordingly.
5546 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5547 * djgpp/config.site: Likewise.
5548
136a0f76
PB
55492006-10-16 Paolo Bonzini <bonzini@gnu.org>
5550
27bd5d67
PB
5551 Replace %*-header with %provides, %requires, %code. See discussion at
5552 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5553
136a0f76
PB
5554 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5555 (b4_user_start_header): Remove.
5556 * data/glr.c: Use new macros instead of b4_*start_header
5557 and b4_*end_header.
5558 * data/glr.cc: Likewise.
5559 * data/lalr1.cc: Likewise.
5560 * data/push.c: Likewise.
5561 * data/yacc.c: Likewise.
5562
5563 * doc/bison.texinfo: Remove %before-header, rename
5564 %{start,end,after}-header to %requires, %provides, %code.
5565
5566 * src/parse-gram.y: Likewise (also rename token names accordingly).
5567 * src/scan-gram.l: Likewise.
5568 * tests/actions.at: Likewise.
5569
10f429ef
PE
55702006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5571
5572 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5573 Problem reported by Joel E. Denny.
5574
55752006-10-14 Jim Meyering <jim@meyering.net>
5576
5577 (Sync from coreutils.)
5578 Work also when the working directory (with e.g. coreutils sources)
5579 is version controlled with git, rather than CVS.
5580 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5581 rather than CVS.
5582 In messages and comments, say e.g., "checked-out sources",
5583 rather than "CVS sources".
5584 (version_controlled_file): New function. Work for git as well as
5585 for CVS. Don't use grep's -q option.
5586 (slurp): Call it here, in place of CVS-specific code.
5587
c4bd5bf7
JD
55882006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5589
5590 Fix testsuite for ./configure --enable-gcc-warnings:
5591 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5592 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5593 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5594 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5595 * test/regression.at (Diagnostic that expects two alternatives):
5596 Likewise.
5597
46356ea4
PE
55982006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5599
231ed89a
PE
5600 * bootstrap.conf (gnulib_modules): Add config-h.
5601 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5602 worry about HAVE_CONFIG_H.
5603 * lib/abitset.c: Likewise.
5604 * lib/bitset.c: Likewise.
5605 * lib/bitset_stats.c: Likewise.
5606 * lib/bitsetv-print.c: Likewise.
5607 * lib/bitsetv.c: Likewise.
5608 * lib/ebitset.c: Likewise.
5609 * lib/get-errno.c: Likewise.
5610 * lib/lbitset.c: Likewise.
5611 * lib/subpipe.c: Likewise.
5612 * lib/timevar.c: Likewise.
5613 * lib/vbitset.c: Likewise.
5614 * lib/bitset.c: Include "bitset.h" first, to test interface.
5615 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5616 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5617 * lib/bitsetv.c: Include "bitsetv.h" first.
5618 * lib/get-errno.c: Include "get-errno.h" first.
5619 * m4/.cvsignore: Add config-h.m4.
5620 * tests/actions.at (Default %printer and %destructor for ...):
5621 Adjust expected line numbers in output to reflect removal of #if
5622 HAVE_CONFIG_H lines.
5623 * tests/glr-regression.at (Missed %merge type warnings when ...):
5624 Likewise.
5625 * tests/regression.at (Braced code in declaration in rules section):
5626 Likewise.
5627 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5628 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5629 Include <config.h> unconditionally.
5630
46356ea4
PE
5631 * bootstrap: Sync from coreutils, as follows:
5632
5633 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5634
5635 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5636 variable was sometimes used without being initialized. This
5637 messed up the installation of the INSTALL file in some cases.
5638
5639 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5640
5641 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5642 --copy. Inspired by a suggestion from Bruno Haible.
5643
5644 2006-10-03 Jim Meyering <jim@meyering.net>
5645
5646 * bootstrap: Undo last change to this file, since now gnulib-tool
5647 sticks with the automake default in generating dependencies.
5648
dd4bf078
PE
56492006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5650
cf2a5f7c
PE
5651 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5652 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5653
5654 * doc/bison.1: Add copyright notice.
5655
5656 * data/glr.c: Don't include <stdarg.h>; not used.
5657
35fe0834
PE
5658 * NEWS: The -g and --graph options now output graphs in Graphviz
5659 DOT format, not VCG format.
5660 * doc/bison.1: Likewise.
5661 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
5662 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5663 of this change in
5664 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
5665 * TODO: Remove Graphviz entry.
5666 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5667 remove vcg.c, vcg.h, vcg_defaults.h.
5668 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5669 * src/graphviz.c, src/graphviz.h: New files.
5670 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5671 * src/files.h: Make comment more generic.
5672 * src/main.c (main): Likewise.
5673 * src/print_graph.h: Likewise.
5674 * src/getargs.c (usage): Make usage description more generic.
5675 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5676 (static_graph, fgraph): Remove. All uses changed to pass
5677 arguments instead of sharing a static var.
5678 (print_core, print_actions, print_state, print_graph):
5679 Output graphviz format rather than VCG format.
5680 * tests/.cvsignore: Remove *.vcg; add *.dot.
5681 * tests/output.at: Expect *.dot files, not *.vcg files.
5682
dd4bf078
PE
5683 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5684 accommodates the 2006-10-08 change.
5685
efdd7421
PE
56862006-10-11 Bob Rossi <bob@brasko.net>
5687
5688 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5689 (b4_yyssa, b4_yyerror_range): New macros.
5690 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5691 (yypvarsinit): Remove init of removed fields.
5692 (yypushparse): Remove use of removed fields; use new macros instead.
5693
96a1981a
PE
56942006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5695
5696 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5697 in a push parser. Reindent slightly to match yacc.c better.
5698
56992006-10-11 Bob Rossi <bob@brasko.net>
5700
46356ea4
PE
5701 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5702 yymsg_alloc fields.
5703 (yypvarsinit, yypushparse): Remove init of removed fields.
5704 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 5705
c1630a8b
PE
57062006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5707
5708 * THANKS: Add Paolo Bonzini and Bob Rossi.
5709
90b9908d
PB
57102006-10-08 Paolo Bonzini <bonzini@gnu.org>
5711
5712 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5713 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5714 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5715 b4_define_user_cde and uses): Remove.
5716 (b4_comment, b4_prefix, b4_sync_start): New.
5717 * data/bison.m4: New file, with most of the content removed from c.m4.
5718 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5719 * src/output.c (output_skeleton): Pass bison.m4.
5720 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5721 only if specified.
5722
cf806753
PE
57232006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5724
5725 Fix test failure reported by Tom Lane in
5726 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5727 and try to make such failures easier to catch in the future.
5728 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5729 that's now the caller's responsibility.
5730 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5731 Set yychar = YYEOF if it's negative.
5732 * tests/actions.at (yylex): Abort if asked to read past EOF.
5733 * tests/conflicts.at (yylex): Likewise.
5734 * tests/cxx-type.at (yylex): Likewise.
5735 * tests/glr-regression.at (yylex): Likewise.
5736 * tests/input.at (yylex): Likewise.
5737 * tests/regression.at (yylex): Likewise.
5738 * tests/torture.at (yylex): Likewise.
5739
0e2f006a
PE
57402006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5741
5742 Fix problems with translating English-language diagnostics.
5743 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5744 respect to bison-runtime pot generation. The YY_ stuff
5745 wasn't being captured.
5746 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5747 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5748 * runtime-po/POTFILES.in: Add data/push.c.
5749
e3ddc1e3
PE
57502006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5751
5752 Merge bootstrap changes from coreutils.
5753
5754 2006-09-28 Jim Meyering <jim@meyering.net>
5755
5756 Automatically generated dependencies are important even
5757 when all of the sources in a directory come from gnulib.
5758 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5759 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5760
5761 2006-09-23 Jim Meyering <jim@meyering.net>
5762
5763 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5764
5765 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5766
5767 * bootstrap: Add support for --force.
5768 (usage): New function. Describe usage less tersely.
5769 (CVS_only_file): New var.
5770
01e972b3
PE
57712006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5772
5773 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5774 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5775 Adjust white space and comments to match GNU style better.
5776
c63d3e90
PE
57772006-09-20 Bob Rossi <bob@brasko.net>
5778
5779 * data/push.c (yyresult_get): Remove function.
5780 (YYPUSH_MORE): Add #define.
5781 (yypushparse): Modify return value.
5782
e70f46d1
PE
57832006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5784
5785 * stamp-h.in: Remove; no longer needed.
5786 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5787 Remove config.h, config.hin, intl (no longer created).
5788 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5789 stamp-h1.
5790
5791 Sync bootstrap from coreutils, as follows:
5792
5793 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5794
5795 * bootstrap (symlink_to_gnulib): New function.
5796 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5797 to copies-of-gnulib.
5798 (cp_mark_as_generated, slurp, gnulib_files):
5799 Avoid making a copy if it's the same as the old version.
5800 (gnulib_files): Add support for this variable (used by Bison).
5801
a92be413
PE
58022006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5803
5804 * src/getargs.c (usage): Rework to use conventions similar to
5805 coreutils, to make translation a bit easier and the code a bit
5806 smaller. Problem reported by Tim Van Holder.
5807
4f82b42a
PE
58082006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5809
3b2942e6
PE
5810 Use some of gnulib's new modules, taken from coreutils.
5811
5812 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5813 * bootstrap.conf: New file.
5814 (gnulib_modules): Add configmake, inttypes, unistd.
5815 (XGETTEXT_OPTIONS): Add complain, complain_at,
5816 fatal, fatal_at, warn, warn_at, unexpected_end.
5817 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5818 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5819 (gl_EARLY): Add.
5820 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5821 (gl_INIT): Add
5822 (GNULIB_AUTOCONF_SNIPPET): Remove.
5823 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5824 the pickiest.
5825 * lib/.cvsignore: Add inttypes_.h.
5826 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5827 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5828 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5829 no-longer-necessary initializations.
5830 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5831 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5832 use the unistd module.
5833 * src/system.h: Likewise.
5834 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5835 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5836 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5837 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5838 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5839 * src/system.h: Include inttypes.h unconditionally, now that we
5840 use the inttypes module. Don't bother to include stdint.h, since
5841 inttypes.h now does that for us.
5842 (LOCALEDIR): Remove, now that we use the configmake module.
5843 * src/getargs.c: Include configmake.h.
5844 * src/main.c: Likewise.
5845 * src/output.c: Likewise.
5846 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5847 not from $abs_top_builddir, since config.h moved.
5848
5849
4f82b42a
PE
5850 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5851 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5852
5853 * src/parse-gram.y (symbol_declaration): Don't put statements
5854 before declarations; it's not portable to C89.
5855 * src/scan-code.l (handle_action_at): Likewise.
5856
5857 * src/scan-code.l: Always initialize braces_level; the old code
5858 left it uninitialized and therefore had undefined behavior.
5859
5860 Don't attempt to redefine 'assert', since it runs afoul of
5861 systems where standard headers (mistakenly) include <assert.h>.
5862 Instead, define and use our own alternative, called 'aver'.
5863 * src/reader.c: Don't include assert.h, since we no longer
5864 use assert.
5865 * src/scan-code.l: Likewise.
5866 * src/system.h (assert): Remove, replacing with....
5867 (aver): New function, taking a bool arg. All uses changed.
5868 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5869 not merely an integer.
5870
31c10e38
PE
58712006-09-15 Bob Rossi <bob@brasko.net>
5872
5873 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5874 * data/c.m4 (YYPUSH): New.
5875 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5876 * src/getargs.c (push_parser): New var.
5877 * src/getargs.h (push_parser): New declaration.
5878 * src/output.c (prepare): Add macro insertion of `push_flag'.
5879 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5880 (prologue_declaration): Parse %push-parser.
5881 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5882 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5883 list of removed lines from the traces observed.
5884 (AT_CHECK_CALC_LALR): Added push parser tests.
5885
fa7b79c0
PE
58862006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5887
21fe08ca
PE
5888 * NEWS: Version 2.3a.
5889 * configure.ac (AC_INIT): Likewise.
5890
e8ec4d9b
PE
5891 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5892 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5893 due to header ordering dependencies. I don't know why the #define
5894 was there.
5895
fa7b79c0
PE
5896 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5897 runtime cost when YYDEBUG is not defined, and so that some tests
5898 that used to fail now work. Problem and initial suggestion by
5899 Paolo Bonzini.
5900 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5901 * data/glr.cc (b4_parser_class_name):
5902 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5903 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5904 (yydebug_) [YYDEBUG]: New member.
5905 (yycdebug_): Now defined only if YYDEBUG.
5906 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5907 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5908 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5909 if YYYDEBUG.
5910 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5911 Define only if YYDEBUG.
5912 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5913 set_debug_level.
5914 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5915 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5916 AT_CHECK_CALC_GLR_CC that are working now.
5917
4ec13d60
PE
59182006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5919
5920 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5921 We don't need them in glr.cc, and glr.c defines them.
5922 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5923 assumes that defining it to anything is the same as defining
5924 it to 1. Problem reported by Paolo Bonzini.
5925
8e1687ae
PE
59262006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5927
5928 * data/c.m4 (b4_null, b4_case): Define.
5929 * src/output.c (prepare_symbols): Use b4_null.
5930 (user_actions_output): Use b4_case.
5931
3dc5e96b
PE
59322006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5933
aef3da86
PE
5934 * data/glr.c (b4_shared_declarations): Put start-header first,
5935 before any #includes that we generate, so that feature-test
5936 macros work. Problem reported by Michael Deutschmann in
5937 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5938 * data/lalr1.cc: Likewise.
5939 * doc/bison.texinfo (Prologue): Document that feature-test macros
5940 should be defined before any Bison declarations.
5941 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5942 that depend on location.hh after, not before, Bison decls, since
5943 we now include location.hh after the first user prologue.
5944
3dc5e96b
PE
5945 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5946 Sander Brandenburg in
5947 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5948 Also, fix minor white space and comment issues.
aef3da86
PE
5949 (Prologue): Mention that it's better to define feature-test macros
5950 before Bison declarations. Problem reported by Michael Deutschmann.
5951
5952 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5953 by Jim Meyering.
5954 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5955 This adjusts to recent gnulib changes.
3dc5e96b 5956
b2a0b7ca
JD
59572006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5958
5959 Finish implementation of per-type %destructor/%printer. Discussed
5960 starting at
5961 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5962 and
5963 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5964 * NEWS (2.3+): Add a description of this feature to the default
5965 %destructor/%printer description.
5966 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5967 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5968 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5969 list node contains a semantic type.
5970 * src/symtab.c, src/symtab.h: Extend with a table that associates
5971 semantic types with their %destructor's and %printer's.
5972 (semantic_type_from_uniqstr, semantic_type_get,
5973 semantic_type_destructor_set, semantic_type_printer_set): New functions
5974 composing the public interface of that table.
5975 (symbol_destructor_get, symbol_destructor_location_get,
5976 symbol_printer_get, symbol_printer_location_get): If there's no
5977 per-symbol %destructor/%printer, look up the per-type before trying
5978 the default.
5979 * tests/actions.at (Per-type %printer and %destructor): New test case.
5980 * tests/input.at (Default %printer and %destructor redeclared):
5981 Extend to check that multiple occurrences of %symbol-default in a
5982 single %destructor/%printer declaration is an error.
5983 (Per-type %printer and %destructor redeclared, Unused values with
5984 per-type %destructor): New test cases.
5985
3be03b13
JD
59862006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5987
5988 Require default %destructor/%printer to be declared using
5989 %symbol-default instead of an empty symbol list, and start working on
5990 new per-type %destructor/%printer. Discussed at
5991 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5992 * NEWS (2.3+): Add %symbol-default to example.
5993 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 5994 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
5995 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5996 (generic_symlist, generic_symlist_item): New nonterminals for creating
5997 a list in which each item is a symbol, semantic type, or
5998 %symbol-default.
5999 (grammar_declaration): Use generic_symlist in %destructor and %printer
6000 declarations instead of symbols.1 or an empty list.
6001 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6002 for changes to symbol_list.
6003 * src/reader.c: Update for changes to symbol_list.
6004 * src/scan-code.l: Likewise.
6005 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6006 * src/symlist.c, src/symlist.h: Extend such that a list node may
6007 represent a semantic type or a %symbol-default in addition to just an
6008 ordinary symbol. Add switched functions for setting %destructor's and
6009 %printer's.
6010 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6011 %destructor/%printer declarations.
6012
3508ce36
JD
60132006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6014
6015 Whether the default %destructor/%printer applies to a particular symbol
6016 isn't a question of whether the user *declares* that symbol (in %token,
6017 for example). It's a question of whether the user by any means
6018 *defines* the symbol at all (by simply using a char token, for
6019 example). $end is defined by Bison whereas any other token with token
6020 number 0 is defined by the user. The error token is always defined by
6021 Bison regardless of whether the user declares it with %token, but we
6022 may one day let the user define error as a nonterminal instead.
6023 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6024 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6025 the meaning of "user-defined".
6026 * tests/actions.at (Default %printer and %destructor for user-declared
6027 end token): Rename to...
6028 (Default %printer and %destructor for user-defined end token): ...
6029 this.
6030
6031 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6032 computation of whether to apply the default, don't maintain a list of
6033 every Bison-defined symbol. Instead, just check for a first character
6034 of '$', which a user symbol cannot have, and check for the error token.
6035
9350499c
JD
60362006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6037
6038 Don't apply the default %destructor or %printer to the error token,
6039 $undefined, or $accept. This change fits the general rule that the
6040 default %destructor and %printer are only for user-declared symbols,
6041 and it solves several difficulties that are described in the new test
6042 cases listed below.
6043 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6044 * tests/actions.at (Default %printer and %destructor are not for error
6045 or $undefined, Default %printer and %destructor are not for $accept):
6046 New test cases.
6047
4d7370cb
JD
60482006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6049
6050 Allow %start after the first rule.
6051 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6052 when parsing the first rule.
6053 (check_and_convert_grammar): Search for it here after all grammar
6054 declarations have been parsed. Skip midrules, which have dummy LHS
6055 nonterminals.
6056 * src/symtab.c (symbol_is_dummy): New function.
6057 * src/symtab.h (symbol_is_dummy): Declare it.
6058 * tests/input.at (%start after first rule): New test.
6059
6d0ef4ec
JD
60602006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6061
6062 Redo some of the previous commit: add back the ability to use
6063 non-aliased/undeclared string literals since it might be useful to
6064 those declaring %token-table.
6065 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6066 commit: don't worry about complaints from symbols_pack.
6067 * src/symtab.c (symbol_new, symbol_class_set,
6068 symbol_check_alias_consistency): Undo changes in previous commit: count
6069 each string literal as a new symbol and token, assign it a symbol
6070 number, and don't complain about non-aliased string literals.
6071 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6072 and token counts but does still set aliased tokens to the same number,
6073 symbol_pack_processor now leaves empty slots in the symbols array.
6074 Remove those slots.
6075 * tests/regression.at (Undeclared string literal): Remove test case
6076 added in previous commit since non-aliased string literals are allowed
6077 again.
6078 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6079 remove unnecessary string literal declarations.
6080 * tests/sets.at (Firsts): Likewise.
6081
965537bc
JD
60822006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6083
6084 Don't allow an undeclared string literal, but allow a string literal to
6085 be used before its declaration.
6086 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6087 symbols_pack complained.
6088 * src/symtab.c (symbol_new): Don't count a string literal as a new
6089 symbol.
6090 (symbol_class_set): Don't count a string literal as a new token, and
6091 don't assign it a symbol number since symbol_make_alias does that.
6092 (symbol_make_alias): It's not necessary to decrement the symbol and
6093 token counts anymore. Don't assume that an alias declaration occurs
6094 before any uses of the identifier or string, and thus don't assert that
6095 one of them has the highest symbol number so far.
6096 (symbol_check_alias_consistency): Complain if there's a string literal
6097 that wasn't declared as an alias.
6098 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6099 symbol_pack asserts that every token has been assigned a symbol number
6100 although undeclared string literals have not.
6101 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 6102 string literal): New test cases.
965537bc
JD
6103 (Characters Escapes, Web2c Actions): Declare string literals as
6104 aliases.
6105 * tests/sets.at (Firsts): Likewise.
6106
47aee066
JD
61072006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6108
6109 In the grammar scanner, STRING_FINISH unclosed constructs and return
6110 them to the parser in order to improve error messages.
6111 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6112 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6113 * tests/input.at (Unclosed constructs): New test case.
6114 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6115 seen.
6116
6117 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6118 unused global.
6119
1f6b3679
JD
61202006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6121
6122 Handle string aliases for character tokens correctly.
6123 * src/symtab.c (symbol_user_token_number_set): If the token has an
6124 alias, check and set its alias's user token number instead of its own,
6125 which is set to indicate the alias. Previously, every occurrence of
6126 the character token in the grammar overwrote that alias indicator with
6127 the character code.
6128 * tests/input.at (String aliases for character tokens): New test.
6129
219741d8
JD
61302006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6131
6132 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6133
11daa4e7
PE
61342006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6135
6136 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6137 to prevent failures when building on older platforms.
6138 Check for autopoint failure.
6139 Set XGETTEXT_OPTIONS to values that check for C format strings,
6140 so that translators are warned about them (this also helps
6141 prevent core dumps).
6142
6143 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6144 function, since it simplifies our code a bit.
6145
6146 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6147 rather than -W, so we don't get bogus warnings about sign comparisons.
6148 Add -Wpointer-arith, since that warning is useful (it reports code
6149 that does not conform to C89 and that some compilers reject).
6150 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6151 since it's no longer needed.
6152
f9bfc42a
JD
61532006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6154
6155 Clean up scanners a bit.
6156 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6157 definitions so gcc won't warn when obstack_for_string is unused.
6158 * src/scan-code.l: config.h and system.h are already #include'd by
6159 scan-code-c.c, so get rid of them here.
6160 * src/scan-gram.l: Likewise.
6161 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6162 definitions rather than duplicating the rest of it.
6163 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6164
06e8700a
JD
61652006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6166
6167 Suppress signed/unsigned comparison warnings for yycheck.
6168 * data/c.m4 (b4_safest_int_type): New macro.
6169 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6170 a signed int type, cast it to b4_safest_int_type first.
6171 * data/yacc.c: Likewise.
6172 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6173 also overwritten.
6174
9c437126
PE
61752006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6176
6177 * doc/bison.texinfo: Fix some typos.
6178
284d8a13
PE
61792006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6180
6181 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6182 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6183
6184 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6185 the latest gnulib does this a different way.
6186 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6187 translation was patched, so stop omitting it.
6188
ec5479ce
JD
61892006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6190
6191 Enable declaration of default %printer/%destructor. Make the parser
6192 use these for all user-declared grammar symbols for which the user does
6193 not declare a specific %printer/%destructor. Thus, the parser uses it
6194 for token 0 if the user declares it but not if Bison generates it as
6195 $end. Discussed starting at
6196 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6197 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6198 and
6199 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6200 * NEWS (2.3+): Mention.
6201 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6202 declare a %destructor for a mid-rule's semantic value. It's just
6203 impossible to declare one specific to it.
6204 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6205 code. Describe default %destructor form.
6206 * src/parse-gram.y (grammar_declaration): Parse default
6207 %printer/%destructor declarations.
6208 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6209 and symbol_destructor_location_get rather than accessing the destructor
6210 and destructor_location members of struct symbol.
6211 (symbol_printers_output): Likewise but for %printer's.
6212 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6213 again.
6214 * src/symtab.c (default_destructor, default_destructor_location,
6215 default_printer, default_printer_location): New static global
6216 variables to record the default %destructor and %printer.
6217 (symbol_destructor_get, symbol_destructor_location_get,
6218 symbol_printer_get, symbol_printer_location_get): New functions to
6219 compute the appropriate %destructor and %printer for a symbol.
6220 (default_destructor_set, default_printer_set): New functions to set the
6221 default %destructor and %printer.
6222 * src/symtab.h: Prototype all those new functions.
6223 * tests/actions.at (Default %printer and %destructor): New test to
6224 check that the right %printer and %destructor are called, that they're
6225 not called for $end, and that $$ and @$ work correctly.
6226 (Default %printer and %destructor for user-declared end token): New
6227 test to check that the default %printer and %destructor are called for
6228 a user-declared end token.
6229 * tests/input.at (Default %printer and %destructor redeclared, Unused
6230 values with default %destructor): New tests to check related grammar
6231 warnings and errors.
6232
868d2d96
JD
62332006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6234
6235 Clean up handling of %destructor for the end token (token 0).
6236 Discussed starting at
6237 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6238 and
6239 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6240
6241 Make the skeletons consistent in how they pop the end token and invoke
6242 its %destructor.
6243 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6244 state, which has token number 0, since this would invoke the
6245 %destructor for the end token.
6246 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6247 until after shifting the end token, or else it won't be popped.
6248 * data/yacc.c (yyparse): Likewise.
6249
6250 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6251 it's the end token. Upon termination, destroy an unshifted lookahead
6252 even when it's the end token.
6253 * data/lalr1.cc (yy::parser::parse): Likewise.
6254 * data/yacc.c (yyparse): Likewise.
6255
6256 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6257 value warnings for the end token when the user gives the end token a
6258 %destructor.
6259
6260 * tests/actions.at (Printers and Destructors): Test all the above.
6261
62a9592d
PE
62622006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6263
6264 Update to latest gnulib and gettext versions.
6265 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6266 Add fopen-safer.
6267 (gnulib_files): Add m4/warning.m4. Don't worry about files
6268 overwritten by autopoint.
6269 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6270 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6271 rejects them.
6272 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6273 so that we can remove the intl files at a better time.
6274 (intl_files_to_remove): Remove aclocal.m4, since it gets
6275 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6276 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6277 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6278 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6279 Remove datarootdir hack; no longer needed.
6280 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6281 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6282 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6283 strdup.h.
6284 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6285 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6286
10d6970f
PE
62872006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6288
6289 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6290 it with --assume-autoconf='latest-stable'.
6291
50a33993
JD
62922006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6293
6294 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6295 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6296 YYSTYPE' and `{'.
6297 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6298 those from muscle_tab.c since the old ones are misleading.
6299
2ce4ed68
AD
63002006-07-13 Akim Demaille <akim@epita.fr>
6301
6302 Support %define "KEY" {VALUE}.
6303 * src/scan-code.h, src/scan-code.l (translate_action)
6304 (translate_rule_action, translate_symbol_action, translate_code):
6305 Return char *, not const char *.
6306 * src/parse-gram.y (declaration): Rename as...
6307 (prologue_declaration): this.
6308 (string_content): Remove this nonterminal, use STRING.
6309 (braceless, content, content.opt): New nonterminal.
6310 Use them.
6311 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6312 as value.
6313 * src/scan-gram.l (getargs.h): Don't include it.
6314
db7e5eb5
PE
63152006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6316
6317 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6318 rather than a for-loop that declares a local bool variable. This
6319 should work around a compatibility problem with a Cray x1e C++
6320 compiler reported by Hung Nguyen in
6321 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6322 The for-loop was introduced in the 2004-11-17 change but I don't
6323 know why it was needed.
6324
a5d80ba5
AD
63252006-07-12 Akim Demaille <akim@epita.fr>
6326
6327 * data/c.m4: Comment changes.
6328
23eb2a69
AD
63292006-07-10 Akim Demaille <akim@lrde.epita.fr>
6330
6331 * src/complain.c (error_message, ERROR_MESSAGE): New.
6332 To factor...
6333 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6334 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6335
ddc8ede1
PE
63362006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6337
6338 * NEWS: Instead of %union, you can define and use your own union type
6339 YYSTYPE if your grammar contains at least one <type> tag.
6340 Your YYSTYPE need not be a macro; it can be a typedef.
6341 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6342 (Union Decl, Decl Summary): Document this.
6343 * data/glr.c (YYSTYPE): Implement this.
6344 * data/glr.cc (YYSTYPE): Likewise.
6345 * data/lalr1.cc (YYSTYPE): Likewise.
6346 * data/yacc.c (YYSTYPE): Likewise.
6347 * src/output.c (prepare): Output tag_seen_flag.
6348 * src/parse-gram.y (declaration, grammar_declaration):
6349 Use 'union_seen' rather than 'typed' to determine whether
6350 %union has been seen, since grammars can now be typed without
6351 %union.
6352 (symbol_declaration, type.opt, symbol_def):
6353 Keep track of whether a tag has been seen.
6354 * src/reader.c (union_seen, tag_seen): New vars.
6355 (typed): remove.
6356 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6357 * src/scan-code.l (untyped_var_seen): New variable.
6358 (handle_action_dollar): Adjust to above changes.
6359 (handle_action_dollar, handle_action_at):
6360 Improve overflow checking for outlandish numbers.
6361 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6362 avoid new diagnostics generated by above changes.
6363 * tests/regression.at (YYSTYPE typedef): Add test to check
6364 for type tags without %union.
6365
6366 * src/symlist.c (symbol_list_length): Return int, not unsigned
6367 int, since callers expect int. This may need to get revisited
6368 once we have proper integer overflow checking.
6369
6370 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6371 object is now static.
6372
6373 * src/getargs.c (flags_argmatch): Return void, not int,
6374 to pacify ./configure --enable-gcc-warnings.
6375
6376 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6377 since last_string is already defined to FLEX_PREFIX (last_string).
6378
7b42569e
AD
63792006-07-09 Akim Demaille <akim@lrde.epita.fr>
6380
6381 Implement --warnings/-W.
6382 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6383 replaced by...
6384 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6385 Adjust callers.
6386 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6387 (warnings_args, warnings_types): New.
6388 (getargs, short_options, long_options): Accept -W/--warnings.
6389 Sort the options by alphabetical order, upper case letter right
6390 before its lower case.
6391
3b452f4e
JD
63922006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6393
6394 Change %merge result type clash warnings to errors. Discussed at
6395 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6396 * src/reader.c (record_merge_function_type): Use complain_at.
6397 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6398 declared later): Update test case results.
6399
b8a41559
AD
64002006-07-09 Akim Demaille <akim@lrde.epita.fr>
6401
6402 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6403 to be in alphabetical order.
6404 (trace_args): Spelling fixes.
6405
cd9e1ba2
PE
64062006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6407
6408 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6409 so they don't collide with user-defined macros.
6410 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6411 this was never guaranteed, and now that we're using gnulib stdint,
6412 which defines int_fast16_t to long int, the problem is exposed.
6413
cb48f191
PE
64142006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6415
b8445a15
PE
6416 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6417 need the full POSIX semantics (and weren't implementing them
6418 anyway).
6419
cb48f191
PE
6420 Adjust to Autoconf 2.60 and today's gnulib.
6421 * bootstrap (gnulib_modules): Add stdint.
6422 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6423 no longer copies it.
6424 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6425 since stdint needs the former and wcwidth (which is now required
6426 by mbswidth) needs the latter.
6427 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6428 work around a compatibility glitch between gettext 0.14.6 and
6429 Autoconf 2.60.
6430 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6431 Do not check for uintptr_t, since new stdint module does the right
6432 thing.
6433 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6434 Add stdint.h, stdint_.h, wcwidth.h.
6435 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6436 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6437 stdint.m4, wchar_t.m4, wcwidth.m4.
6438 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6439 usual order for ../lib/*.h files.
6440 (file_name_split): Use last_component, not base_name, to adjust
6441 to gnulib changes.
6442 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6443 for ../lib/*.h files.
6444 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6445 Define unconditionally, since we now assume the stdint module.
6446 * src/scan-skel.l: Include <dirname.h>.
6447 (BASE_QPUTS): Use last_component, not base_name.
6448 * src/system.h: Include <unlocked-io.h> in the usual order
6449 for ../lib/*.h files. Include <stdint.h> unconditionally,
6450 since we now use the stdint module.
6451 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6452 HAVE_UINTPTR_T, since we now use the stdint module.
6453 (base_name): Remove decl, since files now include <dirname.h>
6454 to get the decl.
6455
cd48d21d
AD
64562006-07-08 Akim Demaille <akim@lrde.epita.fr>
6457
6458 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6459 New, default to 1.
6460 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6461 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6462 default.
6463 * tests/calc.at: Adjust.
6464
8ec0a172
AD
64652006-07-08 Akim Demaille <akim@lrde.epita.fr>
6466
b8445a15 6467 * data/c.m4 (b4_basename): New.
8ec0a172
AD
6468 (b4_syncline): Also output the location of its invocation (from
6469 the skeleton).
6470 (b4_user_action, b4_define_user_action, b4_user_actions)
6471 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6472 (b4_user_stype): New.
6473 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6474
4a678af8
JD
64752006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6476
6477 In the grammar file, the first column is 1 not 0 on the first line as
6478 on every other line.
6479 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6480 * tests/input.at (Torturing the Scanner): Update output.
6481
6482 * src/scan-gram.l (scanner_cursor): Declare it static.
6483
dd60572a
JD
64842006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6485
6486 In warnings, say "previous declaration" rather than "first
6487 declaration".
6488 * src/symtab.c (redeclaration): Do that here.
6489 * src/reader.c (record_merge_function_type): In the case of a result
6490 type clash, report the previous declaration rather than the very first
6491 one in the grammar file.
6492 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6493 declared later): Add a third declaration to check this behavior.
6494 * tests/input.at (Incompatible Aliases): Update output.
6495
2073e1b6
AD
64962006-06-27 Akim Demaille <akim@epita.fr>
6497
6498 * doc/Doxyfile.in: New.
6499 * doc/Makefile.am: Use it.
6500 * src/lalr.h, src/symtab.h: Initial doxygenation.
6501
8ee5b538
JD
65022006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6503
6504 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
6505 declared after the %merge. This continues the effort of the previous
6506 patch.
8ee5b538
JD
6507 * src/reader.c (get_merge_function): Don't set the merger type yet.
6508 (record_merge_function_type): New function for setting the merger type
6509 and checking for clashes.
6510 (grammar_current_rule_merge_set): Set the location of the %merge for
6511 the current rule.
6512 (packgram): Invoke record_merge_function_type for each rule now that
6513 all symbol type declarations have been parsed.
6514 * src/reader.h (merger_list.type_declaration_location): New member
6515 storing the location of the first %merge from which the type for this
6516 merging function was derived.
6517 * src/symlist.h (symbol_list.merger_declaration_location): New member
6518 storing the location of a rule's %merge, if any.
6519 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6520 declared later): New test to catch the error fixed by the above patch.
6521
ffa4ba3a
JD
65222006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6523
6524 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
6525 declarations appear after the rules. Discussed at
6526 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6527 and
6528 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6529 Don't mistake the type of $$ in a midrule to be that of its parent
6530 rule's $$.
ffa4ba3a
JD
6531 * src/reader.c (grammar_current_rule_end): Don't invoke
6532 grammar_rule_check yet since not all symbol declarations may have been
6533 parsed yet.
6534 (grammar_midrule_action): Likewise.
6535 Don't record whether the midrule's $$ has been used yet since actions
6536 haven't been translated yet.
6537 Record the midrule's parent rule and its RHS index within the parent
6538 rule.
6539 (grammar_current_rule_action_append): Don't translate the action yet
6540 since not all symbol declarations may have been parsed yet and, thus,
6541 warnings about types for $$, $n, @$, and @n can't be reported yet.
6542 (packgram): Translate the action and invoke grammar_rule_check now that
6543 all symbol declarations have been parsed.
6544 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6545 after parsing the entire grammar file, the symbol list here in the case
6546 of a midrule is actually the midrule's empty RHS, so reference its
6547 parent rule's RHS where necessary.
6548 On the other hand, now that you can already know it's a midrule, you
6549 aren't forced to think $$ has the same type as its parent rule's $$.
6550 (handle_action_at): In the case of a midrule, reference the parent rule
6551 where necessary.
6552 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6553 members.
6554 (symbol_list_length): Now that this is invoked after all rules have
6555 been parsed, a NULL symbol (rather than a NULL symbol list node)
6556 terminates a rule. symbol_list_print already does this correctly.
6557 * src/symlist.h (symbol_list.midrule_parent_rule,
6558 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6559 remember their relationships with their parents.
6560 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6561 fixed by the above patch.
6562 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6563 implementing...
6564 (Unused values): ... this old test case and...
6565 (Unused values before symbol declarations): ... this new test case.
6566 This one is the same as `Unused values' except that all symbol
6567 declarations appear after the rules in order to catch the rest of the
6568 errors fixed by the above patch.
6569
e256e17f
JD
65702006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6571
300a1930
JD
6572 More cleanup.
6573 * src/reader.c (current_rule): Declare it static since it's no longer
6574 used outside this file.
6575 (grammar_current_rule_action_append): Remove redundant arguments from
6576 translate_rule_action invocation.
6577 * src/reader.h (current_rule): Remove this unused extern.
6578 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6579 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 6580
381ecb06
JD
65812006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6582
6583 Clean up yesterday's patch.
6584 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6585 to...
6586 * src/reader.c (grammar_current_rule_action_append): ... here for
6587 consistency with grammar_current_rule_symbol_append.
6588 * tests/regression.at (Braced code in declaration in rules section):
6589 Make yyerror and yylex static as usual.
6590
4210cd0b
JD
65912006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6592
6593 Fix bug that mistakes braced code in a declaration in the rules section
6594 to be a rule action. Mentioned at
6595 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6596 * src/scan-gram.l: Move midrule action detection from the start of the
6597 scanning of any braced code to...
6598 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6599 action. For readability, use $2 and @2 rather than the equivalent
6600 global variables.
6601 * tests/regression.at (Braced code in declaration in rules section):
6602 New test to catch the error fixed by the above patch.
6603
6604 Work on code readability some.
6605 * src/scan-code.l (current_rule): Get rid of this misleading and
6606 redundant declaration: it's actually extern'ed in reader.h.
6607 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6608 translate_action): Add a rule argument and use it instead of the global
6609 current_rule.
6610 (translate_rule_action): This already receives current_rule through an
6611 argument, so pass it on to translate_action instead of assigning
6612 current_rule to current_rule.
6613 (translate_symbol_action, translate_code): Pass rule = NULL to
6614 translate_action.
6615
34f98f46
JD
66162006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6617
6618 Rename %before-definitions to %start-header and %after-definitions to
6619 %end-header. Don't use these declarations to separate pre-prologue
6620 blocks from post-prologue blocks. Add new order-independent
6621 declarations %before-header and %after-header as alternatives to the
6622 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6623 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6624 * NEWS (2.3+): Update for these changes.
6625 * data/glr.c (b4_before_definitions): Update to...
6626 (b4_start_header): ... this.
6627 (b4_after_definitions): Update to...
6628 (b4_end_header): ... this.
6629 * data/glr.cc: Likewise.
6630 * data/lalr1.cc: Likewise.
6631 * data/yacc.c: Likewise.
6632 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6633 prologue blocks with %*-header declarations.
6634 (Calc++ Parser): Likewise.
91661ebb 6635 (Decl Summary): Update names.
148d66d8 6636 (Table of Symbols): Update description.
34f98f46
JD
6637 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6638 (PERCENT_END_HEADER): ... this.
6639 (PERCENT_BEFORE_DEFINITIONS): Update to...
6640 (PERCENT_START_HEADER): ... this.
6641 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6642 (declaration): Update token names and m4 macro names.
6643 When parsing %end-header and %start-header, invoke translate_code
6644 before muscle_code_grow, and no longer set global booleans to remember
6645 whether these declarations have been seen.
6646 Parse new %after-header and %before-header.
6647 * src/reader.c (before_definitions, after_definitions): Remove.
6648 (prologue_augment): Accept a new bool argument to specify whether to
6649 augment the pre-prologue or post-prologue.
6650 * src/reader.h (before_definitions, after_definitions): Remove these
6651 extern's.
6652 (prologue_augment): Add new bool argument.
6653 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6654 (PERCENT_END_HEADER): ... this.
6655 (PERCENT_BEFORE_DEFINITIONS): Update to...
6656 (PERCENT_START_HEADER): ... this.
6657 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6658 * tests/actions.at (Printers and Destructors): Update names.
6659
31b2b07e
JD
66602006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6661
6662 Add comparison operators for C++ location classes. Discussed at
6663 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6664 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6665 declaration indicating whether filename_type has an operator==. If
6666 filename_type is `std::string', it defaults to `1', `0' otherwise.
6667 * data/location.cc: Iff b4_define_location_comparison is `1', add
6668 operator== and operator!= for class position and for class location.
6669
6670 Some minor fixes.
6671 * src/scan-action.l: Remove unused file.
6672 * src/symtab.c (symbol_printer_set): Use printer_location not
6673 destructor_location.
6674 * src/symtab.h (struct symbol): Replace incorrect source comment for
6675 printer members.
6676 * tests/input.at (Incompatible Aliases): Update output with correct
6677 printer location.
6678
9bc0dd67
JD
66792006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6680
6681 Don't put the pre-prologue in the header file. For the yacc.c code
6682 file and the glr.c header and code files, move the pre-prologue before
6683 the token definitions. Add new %before-definitions and
6684 %after-definitions to declare code that will go in both the header file
6685 and code file. Discussed at
6686 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6687 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6688 and
6689 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6690 * NEWS (2.3+): Describe these changes.
6691 * data/glr.c (b4_pre_prologue): Move from within to before...
6692 (b4_shared_declarations): ... this.
6693 Add new b4_before_definitions before b4_token_enums.
6694 Add new b4_after_definitions at the end.
6695 * data/glr.cc (b4_pre_prologue): Replace with...
6696 (b4_before_definitions): ... this in the header file.
6697 (b4_after_definitions): New near the end of the header file.
6698 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6699 code file right before including the header file.
6700 (b4_before_definitions): New in the previous position of
6701 b4_pre_prologue in the header file.
6702 (b4_after_definitions): New near the end of the header file.
6703 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6704 (b4_token_enums_defines): In the code file, move to right before
6705 YYSTYPE for consistency with the header file.
6706 (b4_before_definitions): New right before b4_token_enums_defines in
6707 both the header and code file.
6708 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6709 header and code file.
6710 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6711 of prologues for %union dependencies.
91661ebb
JD
6712 (Decl Summary): In %defines description, mention the effect of
6713 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
6714 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6715 than in the pre-prologue so that make check succeeds.
148d66d8 6716 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
6717 %after-definitions.
6718 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6719 %before-definitions.
6720 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6721 (declaration): Parse those declarations and append to
6722 b4_before_definitions and b4_after_definitions, respectively.
6723 * src/reader.c (before_definitions, after_definitions): New bools to
6724 track whether those declarations have been seen.
6725 (prologue_augment): Add to the post-prologue if %union,
6726 %before-definitions, or %after-definitions has been seen.
6727 * src/reader.h (before_definitions, after_definitions): New extern's.
6728 * src/scan-gram.l: Scan the new declarations.
6729 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6730 prologue block in a %before-definitions or a %after-definitions based
6731 on whether the %union is declared.
6732 * tests/regression.at (Early token definitions with --yacc, Early token
6733 definitions without --yacc): Move tests for token definitions into the
6734 post-prologue since token names are no longer defined in the
6735 pre-prologue.
6736
203b9274
AD
67372006-06-20 Akim Demaille <akim@epita.fr>
6738
6739 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6740 (symbol_get): Use it.
6741 * src/parse-gram.y: Use it.
6742
a7ee59cf
JD
67432006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6744
6745 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6746 build succeeds when configured with --enable-gcc-warnings.
6747
5a2baae7
PE
67482006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6749
33ad1a9c
PE
6750 * src/parse-gram.y (char_name): New function.
6751 (CHAR, STRING, string_content): For %printer, properly escape.
6752 (ID): Prefer fputs to fprintf.
6753 (id): Reindent to be consistent with other rules.
6754 Properly quote char.
6755
5a2baae7
PE
6756 The Translation Project changed its way of publishing translations
6757 to maintainers. I haven't received any responses to my request
6758 for supporting the old way, or for documenting the new way. I
6759 have modified 'bootstrap' to use screen scraping
6760 (in this case, HTML scraping). This is unreliable and inelegant,
6761 but I don't see any better way. Yuck.
6762 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6763 (get_translations): New function, which uses HTML scraping to
6764 deduce locations of latest translations.
6765 Use this function to grab both bison and bison-runtime .po files.
6766 Don't bother priming the pump for the runtime-po domain any more,
6767 as it's now translated better than bison is.
6768
58d7a1a1
AD
67692006-06-19 Akim Demaille <akim@epita.fr>
6770
6771 * src/scan-gram.l: No longer "parse" things after `%union' until
6772 `{'. Rather, return a single "%union" token.
6773 No longer make symbols: return strings, and leave the conversion
6774 to symbols to the parser.
6775 (SC_PRE_CODE, token_type): Remove.
6776 * src/parse-gram.y (%union): New field `character'.
6777 Sort tokens.
6778 (CHAR): New token.
6779 (ID, ID_COLON): Now that the scanner no longer makes them
6780 identifiers, adjust all uses to invoke symbol_get.
6781 (id_colon): New, wraps the conversion from string to symbol.
6782 (%union): Accept a possible union_name.
6783 (symbol): Now can be a char.
6784 * data/c.m4 (b4_union_name): Leave a default value.
6785 * data/glr.c, data/yacc.c: Use it.
6786
b931235e
JD
67872006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6788
6789 For associating token numbers with token names for "yacc.c", don't use
6790 #define statements unless `--yacc' is specified; always use enum
6791 yytokentype. Most important discussions start at:
6792 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6793 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6794 and
6795 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6796 * NEWS (2.3+): Mention.
6797 * data/c.m4 (b4_yacc_if): New.
6798 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6799 token #define's.
6800 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6801 on token name definitions.
6802 * src/getargs.c (usage): Capitalize `Yacc' in English.
6803 * src/output.c (prepare): Define b4_yacc_flag.
6804 * tests/regression.at (Early token definitions): Test that tokens names
6805 are defined before the pre-prologue not just before the post-prologue.
6806 Remove this test case and copy to...
6807 (Early token definitions with --yacc): ... this to test #define's.
6808 (Early token definitions without --yacc): ... and this to test enums.
6809
9e6e7ed2
PE
68102006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6811
6812 * NEWS: Reword the post-2.3 change to not be so optimistic about
6813 removing the old "look-ahead" spelling.
6814 Update previous look-ahead/lookahead change reports.
6815 * REFERENCES: look-ahead -> lookahead (since that's
6816 what he actually wrote).
6817 * doc/refcard.tex: look ahead -> lookahead,
6818 look-ahead -> lookahead
6819
742e4900
JD
68202006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6821
6822 For consistency, use `lookahead' instead of `look-ahead' or
6823 `look_ahead'. Discussed starting at
6824 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6825 and then at
6826 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6827 * NEWS: For the next release, note the change to `--report'.
6828 * TODO, doc/bison.1: Update English.
6829 * doc/bison.texinfo: Update English.
6830 (Understanding Your Parser, Bison Options): Document as
6831 `--report=lookahead' rather than `--report=look-ahead'.
6832 * src/conflicts.c: Update English in comments.
6833 (lookahead_set): Rename from look_ahead_set.
6834 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6835 (resolve_sr_conflict): Rename local look_ahead_tokens to
6836 lookahead_tokens, and update other uses.
6837 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6838 count_rr_conflicts, conflicts_free): Update uses.
6839 * src/getargs.c (report_args): Move "lookahead" before alternate
6840 spellings.
6841 (report_types): Update uses.
6842 (usage): For `--report' usage description, state `lookahead' spelling
6843 rather than `look-ahead'.
6844 * src/getargs.h (report.report_lookahead_tokens): Rename from
6845 report_look_ahead_tokens.
6846 * src/lalr.c: Update English in comments.
6847 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6848 (state_lookahead_tokens_count): Rename from
6849 state_look_ahead_tokens_count.
6850 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6851 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6852 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6853 Update other uses.
6854 Update English in output.
6855 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6856 * src/print.c: Update English in comments.
6857 (lookahead_set): Rename from look_ahead_set.
6858 (print_reduction): Rename argument lookahead_token from
6859 look_ahead_token.
6860 (print_core, state_default_rule, print_reductions, print_results):
6861 Update uses.
6862 * src/print_graph.c: Update English in comments.
6863 (print_core): Update uses.
6864 * src/state.c: Update English in comments.
6865 (reductions_new): Update uses.
6866 (state_rule_lookahead_tokens_print): Rename from
6867 state_rule_look_ahead_tokens_print, and update other uses.
6868 * src/state.h: Update English in comments.
6869 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6870 (state_rule_lookahead_tokens_print): Rename from
6871 state_rule_look_ahead_tokens_print.
6872 * src/tables.c: Update English in comments.
6873 (conflict_row, action_row): Update uses.
6874 * tests/glr-regression.at
6875 (Incorrect lookahead during deterministic GLR,
6876 Incorrect lookahead during nondeterministic GLR): Rename
6877 print_look_ahead to print_lookahead.
6878 * tests/torture.at: Update English in comments.
6879 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6880 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6881 (Many lookahead tokens): Update uses.
6882 * data/glr.c: Update English in comments.
6883 * lalr1.cc: Likewise.
6884 * yacc.c: Likewise.
6885 * src/conflicts.h: Likewise.
6886 * src/lalr.h: Likewise.
6887 * src/main.c: Likewise.
6888 * src/output.c: Likewise.
6889 * src/parse-gram.c: Likewise.
6890 * src/tables.h: Likewise.
6891 * tests/calc.at: Likewise.
6892
3c40d0b5
JD
68932006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6894
6895 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6896
5d278082
PE
68972006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6898
6899 * TODO: Add request from Nelson H. F. Beebe to be able to install
6900 Bison without installing the yacc script.
6901
9e668899
JD
69022006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6903
6904 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6905 and yytext if they're already #define'd.
6906 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6907 * src/scan-code-c.c: ... here.
6908 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6909 <config.h>.
6910
0c8e079f
JD
69112006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6912
6913 Get Bison to build again when configured with --enable-gcc-warnings.
6914 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6915 missing #include's.
6916 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6917 loc argument as it shadows a global.
6918 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6919 invocation.
6920
6921 * src/.cvsignore: Add scan-code.c.
6922
2346344a
AD
69232006-06-07 Akim Demaille <akim@epita.fr>
6924
6925 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6926 to...
6927 * src/scan-code.l: here.
6928 * tests/input.at (Torturing the Scanner): Fix another location
6929 error.
6930
4862bdfd
AD
69312006-06-07 Akim Demaille <akim@epita.fr>
6932
6933 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6934
e9071366
AD
69352006-06-06 Akim Demaille <akim@epita.fr>
6936
6937 Extract the parsing of user actions from the grammar scanner.
6938 As a consequence, the relation between the grammar scanner and
6939 parser is much simpler. We can also split "composite tokens" back
6940 into simple tokens.
6941 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6942 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6943 rename as...
6944 * src/location.h, src/location.c (add_column_width)
6945 (location_compute): these.
6946 Fix the column count: the initial column is 0.
6947 (location_print): Be robust to ending column being 0.
6948 * src/location.h (boundary_set): New.
6949 * src/main.c: Adjust to scanner_free being renamed as
6950 gram_scanner_free.
6951 * src/output.c: Include scan-code.h.
6952 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6953 Use boundary_set.
6954 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6955 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6956 which is now, again, a separate token.
6957 Adjust all dependencies.
6958 Whereever actions with $ and @ are used, use translate_code.
6959 (action): Remove this nonterminal which is now useless.
6960 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6961 (grammar_current_rule_action_append): Use translate_code.
6962 (packgram): Bound check ruleno, itemno, and rule_length.
6963 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6964 (last_string, last_braced_code_loc, max_left_semantic_context)
6965 (scanner_initialize, scanner_free, scanner_last_string_free)
6966 (gram_out, gram_lineno, YY_DECL_): Move to...
6967 * src/scan-gram.h: this new file.
6968 (YY_DECL): Rename as...
6969 (GRAM_DECL): this.
6970 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6971 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6972 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6973 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6974 Move these declarations, and...
6975 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6976 these to...
6977 * src/flex-scanner.h: this new file.
6978 * src/scan-gram.l (rule_length, rule_length_overflow)
6979 (increment_rule_length): Remove.
6980 (last_braced_code_loc): Rename as...
6981 (gram_last_braced_code_loc): this.
6982 Adjust to the changes of the parser.
6983 Move all the handling of $ and @ into...
6984 * src/scan-code.l: here.
6985 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6986 (handle_action_dollar, handle_action_at): Move to...
6987 * src/scan-code.l: here.
6988 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6989 scan-code.h, scan-code-c.c, scan-gram.h.
6990 (EXTRA_bison_SOURCES): Add scan-code.l.
6991 (BUILT_SOURCES): Add scan-code.c.
6992 (yacc): Be robust to white spaces.
6993
6994 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6995 * tests/regression.at: Adjust the column numbers.
6996 * tests/regression.at: Adjust the error message.
7891a7c4 6997
184e42f0
JD
69982006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6999
7000 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7001 Use Akim's wording from
7002 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7003
7891a7c4
JD
70042006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7005
7006 Between Bison releases, manually append `+' to the previous Bison
7007 release number, and use that as a signal to automatically print the
7008 ChangeLog's CVS Id keyword from --version. Discussed starting at
7009 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7010 * ChangeLog: Add Id header.
7011 * configure.ac (AC_INIT): Append `+' to `2.3'.
7012 * src/.cvsignore: Add revision.c.
7013 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7014 (BUILT_SOURCES): Add revision.c.
7015 (revision.c): New target rule. This file defines a new global variable
7016 named revision. It initializes it with either the Id from ChangeLog
7017 or, if VERSION doesn't contain `+', with the empty string.
7018 * src/getargs.c (version): Print the value of revision.
7019 * src/revision.h: Extern revision.
7020
4ad3ed84
PE
70212006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7022
7023 * NEWS: Version 2.3.
7024 * configure.ac (AC_INIT): Likewise.
7025
02103984
PE
70262006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7027
7028 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7029 with no arguments, not as an object-like macro. This is for
7030 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7031 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7032 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7033 Document this.
7034
2c08afa5
JD
70352006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7036
7037 * src/getargs.c (usage): Back out yesterday's modification of the
7038 --help output so that we don't have to wait for translation before
7039 releasing 2.3.
7040
6077da58
PE
70412006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7042
7043 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7044 Problem reported by Akim Demaille.
7045
2a26b6c2
JD
70462006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7047
7048 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7049
aefef0d6
PE
70502006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7051
7052 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7053 generated source code. Problem reported by Frans Englich in
7054 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7055
fcd8e201
PE
70562006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7057
7058 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7059 shell, not within 'make', so that 'make' by an ordinary builder
7060 (using GNU make) does not worry about configuring gzip. This also
7061 works around a bug reported independently by Keith Thompson and by
7062 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7063 stderr rather than stdout, messing up the build logs.
7064
7b5cdcbd
JD
70652006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7066
7067 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7068 to make sure that YYID will never be unused. This fixes a 'make
7069 maintainer-check' failure caused by the recent changes to the 'Trivial
7070 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7071 not used.
7072 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7073
5ad0a449
JD
70742006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7075
7076 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7077 state before an empty RHS is always resolved here. Only the location
7078 of that state is guaranteed to be resolved, and that's enough. This
7079 fixes the remaining bug reported by Derek M. Jones in
7080 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7081 * tests/glr-regression.at (Uninitialized location when reporting
7082 ambiguity): Test the above case.
7083 Also, the embedded comments in this test case claim it checks the case
7084 of an empty RHS that has inherited the initial location. However, the
7085 corresponding LHS was already resolved, so yyresolveLocations didn't
7086 actually have reason to modify it. Fix this by forcing
7087 nondeterministic operation at the beginning of the parse.
7088
50cce58e
PE
70892006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7090
7091 * data/c.m4 (b4_yy_symbol_print_generate):
7092 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7093 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7094 of the bugs reported today by Derek M Jones in
7095 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7096 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7097 defined to be a type name without parens or brackets.
7098 (Location Type): Similarly for YYLTYPE.
7099 * tests/regression.at (Trivial grammars): Put in a test for this
7100 bug that will be caught by 'make maintainer-check' (though not,
7101 alas, by 'make check' unless your compiler is picky).
7102
ab8d9dc5
PE
71032006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7104
0d2c8934 7105 * NEWS: Version 2.2.
ab8d9dc5
PE
7106 * configure.ac (AC_INIT): Likewise.
7107
9138c575
JD
71082006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7109
7110 * data/glr.c (yyreportTree): Make room in yystates for the state
7111 preceding the RHS. This fixes the segmentation fault reported by Derek
7112 M. Jones in
7113 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7114 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7115 to the user. Reported for yyreportTree by Derek M. Jones later in the
7116 same thread.
7117 * THANKS: Add Derek M. Jones.
7118 Update my email address.
7119 Fix typo in Steve Murphy's name.
7120
276f48df
PE
71212006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7122
d6645148
PE
7123 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7124 checking against YYLAST that caused the parser to miss a potential
7125 alternative in its diagnostic.
7126 Problem reported by Maria Jose Moron Fernandez in
7127 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7128 * data/lalr1.cc (yysyntax_error_): Likewise.
7129 * data/yacc.c (yysyntax_error): Likewise.
7130 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7131 tokens, in case we run into an older C compiler.
7132 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7133 Use them to check for the off-by-one error fixed above.
7134
276f48df
PE
7135 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7136 YYSIZE_T, not size_t.
7137 * tests/regression.at (Trivial grammars): New test, to catch
7138 the error fixed by the above patch.
7139
cd8b5791
AD
71402006-05-14 Akim Demaille <akim@lrde.epita.fr>
7141
7142 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7143 scheme.
7144 Reported by Steve Murphy.
7145
34376418
AD
71462006-05-14 Akim Demaille <akim@lrde.epita.fr>
7147
7148 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7149 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7150
327afc7c
AD
71512006-05-14 Akim Demaille <akim@lrde.epita.fr>
7152
7153 Implement --trace=m4.
7154 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7155 * src/output.c (output_skeleton): When set, pass -dV to m4.
7156
7157 Factor the handling of flags in m4.
7158 * src/output.c (prepare): Rename the muscle names debug, defines,
7159 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7160 * data/c.m4: Adjust.
7161 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7162 Use b4_define_flag_if to define other b4_FLAG_if macros.
7163 (b4_location_if): As a consequence, rename as...
7164 (b4_locations_if): this, for consistency.
7165 Adjust all the skeletons.
7166
ba9ecd19
AD
71672006-05-14 Akim Demaille <akim@lrde.epita.fr>
7168
7169 * etc/bench.pm: Shorten bench names.
7170
4e83ea15
AD
71712006-05-14 Akim Demaille <akim@lrde.epita.fr>
7172
7173 * src/output.h, src/output.c (error_verbose): Move to...
7174 * src/getargs.h, src/getargs.c: here.
7175 Sort the flags.
7176 Adjust dependencies.
7177
6e93d810
PE
71782006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7179
7180 * data/c.m4 (b4_copyright): Put the special exception for Bison
7181 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
7182 uses changed. Suggested by Akim Demaille. Also, wrap the
7183 copyright notice, in case it is longer than 80 columns. Replace
7184 comma by newline after title.
6e93d810 7185
eaea13f5
PE
71862006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7187
7188 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7189 incompatibility, not a bug. Mention that it wasn't fixed as of
7190 flex 2.5.33.
7191
3cf084ec
AD
71922006-05-11 Akim Demaille <akim@lrde.epita.fr>
7193
7194 * examples/extexi: Enforce the precedence of concatenation over
7195 >>.
0a9f1c7d 7196 Reported by Tommy Nordgren.
3cf084ec 7197
32c96bd7
AD
71982006-05-11 Akim Demaille <akim@lrde.epita.fr>
7199
7200 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7201 with the member "token".
f94705b2 7202 Reported by Martin Nylin.
32c96bd7 7203
eaea13f5
PE
72042006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7205
7206 * data/glr.c: Switch to Bison 2.2 special-exception language in
7207 the copyright notice. Use more-regular format for titles and
7208 copyright notices.
7209 * data/glr.cc: Likewise.
7210 * data/location.cc: Likewise.
7211 * data/yacc.cc: Likewise.
7212 * doc/bison.texinfo (Conditions): Document this.
7213 * NEWS: likewise. Upgrade version to 2.2.
7214
6e2d1146
AD
72152006-04-27 Akim Demaille <akim@lrde.epita.fr>
7216
7217 * data/glr.cc: Remove dead code.
7218
47671055
PE
72192006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7220
7221 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7222 that variable and the line breaks the bootstrap. Problem reported
7223 by Juan M. Guerrero.
7224
ed2e6384
AD
72252006-04-24 Akim Demaille <akim@lrde.epita.fr>
7226
7227 * doc/bison.texinfo (Multiple start-symbols): New.
7228
3cedc2dc
AD
72292006-04-24 Akim Demaille <akim@lrde.epita.fr>
7230
7231 * etc/README, etc/bench.pl: New.
7232
b2ddc3f3
AD
72332006-04-03 Akim Demaille <akim@lrde.epita.fr>
7234
7235 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7236 rule.
7237 Reported by Mickael Labau.
7238 * tests/input.at (Torturing the Scanner): Test it.
7239
91e3ac9a
PE
72402006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7241
7242 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7243 Problem reported by Bob Rossi.
7244
72452006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7246
7247 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7248 and didn't really work.
7249 For the index, use @ifnotinfo, not @iftex.
7250 Minor cleanups of spacing and terminology.
7251
5cf61e93
AD
72522006-03-12 Akim Demaille <akim@lrde.epita.fr>
7253
7254 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7255 of AT_NAME_PREFIX when %name-prefix is not used.
7256
aa08666d
AD
72572006-03-12 Akim Demaille <akim@lrde.epita.fr>
7258
7259 Apply --prefix to C++ skeletons too: they change the namespace.
7260 The test suite already exercize these cases.
7261 * data/c++.m4 (b4_namespace): New.
7262 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7263 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7264 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7265 * doc/bison.texinfo: Document it.
7266 (Option Cross Key): Use @multitable in all formats. It looks
7267 nicer, even in TeX outputs.
7268 (Rules): Use the same code whatever the output type is.
7269 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7270 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7271 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 7272
45567173
AD
72732006-03-10 Akim Demaille <akim@lrde.epita.fr>
7274
7275 * TODO: Remove dead items.
7276
e9d8f881 72772006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
7278
7279 * doc/FAQ: Remove, merged into...
7280 * doc/bison.texinfo (FAQ): this.
7281 * doc/Makefile.am (EXTRA_DIST): Adjust.
7282
c095d689
AD
72832006-03-10 Akim Demaille <akim@lrde.epita.fr>
7284
7285 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7286 even if empty.
7287 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7288 * doc/bison.texinfo (Calc++ Scanner): Use it.
7289
6e0f8287
PE
72902006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7291
7292 Fix two nits reported by twlevo, plus one more that I discovered.
7293
7294 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7295 this is the usual Bison style.
7296 * src/location.h (location_print): Likewise.
7297
7298 * src/reader.h (token_name): Likewise.
7299
d6b771c3
PE
73002006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7301
7302 Fix some nits reported by twlevo.
7303 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7304 and "POSIX". Use more-modern syntax for URLs. Mention C++
7305 and ask for Java. Don't hardwire OS version numbers. Add
7306 copyright notice.
7307 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7308 * src/conflicts.c (solved_conflicts_obstack): Now static.
7309
1e137b71
JD
73102006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7311
7312 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7313 page. Say "you can use it" not "you may use it" as on the web page;
7314 we're describing capabilities not granting permission.
7315
73f2e47e
PE
73162006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7317
6d05403d
PE
7318 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7319 shadowing warnings. Use usual patter for iterating through RHS.
7320 * tests/glr-regression.at
7321 (Uninitialized location when reporting ambiguity):
7322 Modify yylex so that it uses its argument, rather than trying
7323 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7324 const char -> char const.
7325
73f2e47e
PE
7326 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7327 Don't use tabs inside commands; it messes up 'ps'.
7328 Problem reported by twlevo.
7329
8710fc41
JD
73302006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7331
7332 * tests/glr-regression.at (Uninitialized location when reporting
7333 ambiguity): New test case.
7334 * data/glr.c (yyresolveLocations): New function, which uses
7335 YYLLOC_DEFAULT.
7336 (yyresolveValue): Invoke yyresolveLocations before reporting an
7337 ambiguity.
7338 * doc/bison.texinfo (Default Action for Locations): Note
7339 YYLLOC_DEFAULT's usage for ambiguity locations.
7340 (GLR Semantic Actions): Cross-reference those notes.
7341
ae952af2
JD
73422006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7343
7344 * tests/glr-regression.at (Leaked semantic values when reporting
7345 ambiguity): Remove unnecessary union and type declarations.
7346 (Leaked lookahead after nondeterministic parse syntax error): New test
7347 case.
7348 * data/glr.c (yyparse): Check for zero stacks remaining before
7349 attempting to shift the lookahead so that you don't lose it.
7350
35ee866a
JD
73512006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7352
7353 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7354 * tests/glr-regression.at (Leaked semantic values when reporting
7355 ambiguity): New test case.
7356 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7357 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7358 now unnecessary yystackp parameter.
7359 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7360 destructors can be called.
7361
7362 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7363 in existing testcases.
7364
520181ab
JD
73652006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7366
7367 Don't leak semantic values for parent RHS when a user action cuts the
7368 parser, and clean up related code a bit.
7369 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
7370 cuts parse): Rename to...
7371 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
7372 for leaked parent RHS values.
7373 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7374 between an unresolved state (non-empty chain of semantic options) and
7375 an incomplete one (signaled by an empty chain).
ae952af2 7376 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
7377 successfully or unsuccessfully resolved yyGLRState to...
7378 (yyresolveValue): ... here so that yyresolveValue always leaves a
7379 yyGLRState with consistent data and thus is easier to understand.
7380 Remove the yyvalp and yylocp parameters since they are always just
7381 taken from the yys parameter. When reporting a discarded merged value
7382 in debugging output, note that it is incompletely merged. Document the
7383 interface.
7384 (yyresolveAction): If resolving any of the RHS states fails, destroy
7385 them all rather than leaking them. Thus, as long as user actions are
7386 written to clean up the RHS correctly, yyresolveAction always cleans up
7387 the RHS of a semantic option. Document the interface.
7388
18d9185c
PE
73892006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7390
7391 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7392 led to a segmentation fault in GNU Pascal. Problem reported
7393 by Waldek Hebisch.
7394
841a7737
JD
73952006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7396
7397 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7398 mid-rule action inside a nonterminal symbol in order to declare a
7399 destructor for its semantic value.
7400
fc3f467f
PE
74012006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7402
7403 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7404 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7405 __cplusplus && ! defined _STDLIB_H && !
7406 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7407 defined free))]: Include <stdlib.h> rather than rolling our own
7408 declarations of malloc and free, to avoid problems with
7409 incompatible declarations (using 'throw') C++'s stdlib.h. This
7410 should fix Debian bug 340012
7411 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7412 reported by Guillaume Melquiond.
7413
a3af26dd
PE
74142006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7415
4d7bc38c
PE
7416 * NEWS: Clarify symbols versus types in unused-value warnings.
7417
a3af26dd
PE
7418 * configure.ac (AC_INIT): Bump version number.
7419
4e26c69e
PE
74202006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7421
7422 * NEWS: Version 2.1a.
7423 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7424 since C99 requires this.
7425
498e897c
PE
74262006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7427
7428 * m4/c-working.m4: New file.
7429 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7430
57bb17ca
PE
74312006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7432
7433 * Makefile.maint: Merge from coreutils.
7434
0be105dc
PE
74352006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7436
7437 More portability fixes for problems summarized by Nelson H. F. Beebe.
7438
7439 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7440 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7441 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7442 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7443 messes up because C++ code is compiled in 32-bit mode but linked
7444 in 64-bit mode.
7445
6fc0c024
PE
74462006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7447
7448 More portability fixes for problems summarized by Nelson H. F. Beebe.
7449
7870f699
PE
7450 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7451 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7452
6fc0c024
PE
7453 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7454 nodist_PROGRAMS, since we don't need to actually compile the
7455 example if we're just doing a plain 'make'. This avoids bothering
7456 the installer unnecessarily about problems due to weird C++
7457 compilers.
7458
fe6c2fde
PE
74592006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7460
7461 More portability fixes for problems summarized by Nelson H. F. Beebe.
7462
7463 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7464 than #include "...", and compile with -I'.'. The old method was
7465 not portable, according to Posix and the C standard, and it does
7466 not work with Sun C 5.7, where previous #line directives affect
7467 the working directory used in later #include "..." directives.
7468
927b425b
JMG
74692006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7470
7471 Various DJGGP specific issues in /djgpp
7472
d9735e9e
PE
74732006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7474
7475 More portability fixes for problems summarized by Nelson H. F. Beebe.
7476
7477 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7478 '#include <map>' works and that you can apply ++ to iterators.
7479
5a6755af
PE
74802006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7481
67a0dc4f
PE
7482 Work around portability problems summarized by Nelson H. F. Beebe in
7483 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7484
8c86f0ef
PE
7485 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7486 that '#include <string>' works.
7487
de35dd59
PE
7488 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7489 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7490 "warning: sorry: semantics of inline function static data `const
7491 unsigned char translate_table[262]' are wrong (you'll wind up with
7492 multiple copies)".
7493
67a0dc4f
PE
7494 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7495 or, xor to not_, and_, or_, and xor_, respectively. This works
7496 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7497 random system header somewhere that includes the equivalent of
7498 <iso646.h>.
7499
5a6755af
PE
7500 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7501 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 7502 Suite Version 2.0.
5a6755af 7503
3f001415
JD
75042006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7505
7506 During deterministic GLR operation, user actions should be able to
7507 influence the parse by changing yychar. To make this easier to fix and
7508 to make glr.c easier to evolve in general, don't maintain yytoken in
7509 parallel with yychar; just compute yytoken when needed.
7510 * tests/glr-regression.at (Incorrect lookahead during deterministic
7511 GLR): Check that setting yychar in a user action has the intended
7512 effect.
7513 * data/glr.c (yyGLRStack): Remove yytokenp member.
7514 (yyclearin): Don't set *yytokenp.
7515 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7516 yychar rather than *yytokenp to determine the current lookahead.
7517 Compute yytoken locally when needed.
7518 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7519 point to.
7520
7521 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7522 after `--report' documentation.
7523
e2a8c0f5
PE
75242006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7525
7526 * src/parse-gram.y (grammar_declaration): Location of printer
7527 symbol is @1, not list->location. Bug reported by twlevo.
7528 * tests/input.at (Incompatible Aliases): Adjust to above change.
7529
6b702268
PE
75302006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7531
27622431
PE
7532 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7533 all the test at once. This makes the output easier to read in the
7534 normal case.
7535
6b702268
PE
7536 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7537 got from <http://bro-ids.org/download.html>. The bug is that
7538 when two actions appeared in succession, the second one was
7539 scanned before the first one was added to the grammar rule
7540 as a midrule action. Bison then output the incorrect warning
7541 "parse.y:905.17-906.36: warning: unused value: $3".
7542 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7543 associated with a value.
7544 (rhs): Don't invoke grammar_current_rule_action_append.
7545 (action): Invoke it here instead.
7546 * src/reader.c (grammar_midrule_action): Now extern.
7547 (grammar_current_rule_action_append): Don't invoke
7548 grammar_midrule_action; that is now the scanner's job.
7549 * src/reader.h (last_string, last_braced_code_loc):
7550 (grammar_midrule_action): New decls.
7551 * src/scan-gram.l (last_string): Now extern, sigh.
7552 (last_braced_code_loc): New extern variable.
7553 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7554 rule already has an action.
7555 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7556 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7557 Add some tests to check that the above changes fixed the bug.
7558
d40ba6c2
PE
75592006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7560
7561 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7562 All used changed. Check whether the symbol has a destructor,
7563 not whether it is typed.
7564 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7565 that the values are still reported as unused. All line numbers
7566 adjusted.
7567
401aace6
PE
75682006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7569
7570 Work around a bug in bro 0.8, which underparenthesizes its
7571 definition of YYLLOC_DEFAULT.
7572 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7573 their arguments.
7574 * data/lalr1.cc: Likewise.
7575 * data/yacc.cc: Likewise.
7576
06f01bc4
PE
75772006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7578
401aace6
PE
7579 Work around a bug in Pike 7.0, and give the Pike folks a
7580 better way to override the usual int widths.
7581 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7582 user can override the types.
7583 (short): #undef, to work around a bug in Pike 7.0.
7584 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7585 (union yyalloc.yyss): Use yytype_int16 rather than short.
7586 All uses changed.
7587 (yysigned_char): Remove.
7588 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7589 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7590 * tests/regression.at (Web2c Actions): Adjust to above changes.
7591
7592 * src/reader.c (check_and_convert_grammar): New function.
7593 (reader): Close the input file even if something went wrong during
7594 parsing. Minor file descriptor leak reported by twlevo.
7595
06f01bc4
PE
7596 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7597 to pacify gcc -Wswitch-default.
7598 * src/scan-gram.l (adjust_location): Use a default: break; case
7599 to pacify gcc -Wswitch-default.
7600 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7601 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7602 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7603 Move these decls to scan-skel.l, since they don't need to be
7604 visible elsewhere.
7605 * src/scan-skel.l: Accept the above decls.
7606 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7607 is used.
7608
02650b7f
PE
76092006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7610
7611 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7612 since we don't want to insist on a version number at the start
7613 of the changelog every time.
7614 * Makefile.maint: Sync from coreutils a bit better.
7615 (sc_trailing_blank): Renamed from sc_trailing_space.
7616 All uses changed.
7617 (sc_no_if_have_config_h, sc_require_config_h):
7618 (sc_prohibit_assert_without_use): New rules.
7619 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7620 (sc_dd_max_sym_length): Fix leading spaces in rule.
7621 (sc_system_h_headers): Prefix with @.
7622 (sc_useless_cpp_parens, m4-check): Output line numbers.
7623 (changelog-check): Allow version only in head.
7624 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7625 satisfy new Makefile.maint rule.
7626 * data/glr.c: Likewise.
7627 * data/glr.cc: Likewise.
7628 * data/lalr1.cc: Likewise.
7629 * data/yacc.c: Likewise.
7630 * lib/ebitsetv.c: Likewise.
7631 * lib/lbitset.c: Likewise.
7632 * lib/subpipe.c: Likewise.
7633 * lib/timevar.c: Likewise.
7634 * src/system.h: Likewise.
7635 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7636 * djgpp/Makefile.maint: Add copyright notice.
7637 * djgpp/README.in: Likewise.
7638 * djgpp/config.bat: Likewise.
7639 * djgpp/config.site: Likewise.
7640 * djgpp/config_h.sed: Likewise.
7641 * djgpp/djunpack.bat: Likewise.
7642 * djgpp/config.sed: Fix copyright notice to match standard format.
7643 * djgpp/subpipe.h: Likewise.
7644 * lib/bitsetv-print.c: Likewise.
7645 * lib/bitsetv.c: Likewise.
7646 * lib/subpipe.h: Likewise.
7647 * lib/timevar.c: Likewise.
7648 * lib/timevar.h: Likewise.
7649 * djgpp/subpipe.c: Use standard recipe for config.h.
7650 * lib/abitset.c: Likewise.
7651 * lib/bitset.c: Likewise.
7652 * lib/bitset_stats.c: Likewise.
7653 * lib/bitsetv-print.c: Likewise.
7654 * lib/bitsetv.c: Likewise.
7655 * lib/ebitsetv.c: Likewise.
7656 * lib/get-errno.c: Likewise.
7657 * lib/lbitset.c: Likewise.
7658 * lib/subpipe.c: Likewise.
7659 * lib/timevar.c: Likewise.
7660 * lib/vbitset.c: Likewise.
7661 * tests/local.at: Likewise.
7662 * src/scan-gram.l: Don't include verify.h, since system.h does
7663 that for us.
7664 * .x-sc_require_config_h: New file.
7665 * .x-sc_unmarked_diagnostics: New file.
7666
287c78f6
PE
76672006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7668
287c78f6
PE
7669 Be a bit more systematic about using 'abort'.
7670 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7671 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7672 Put 'default: abort ();' before some other case, to satisfy older
7673 pedantic compilers.
7674 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7675 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7676 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7677 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
7678 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7679 (get_decision_str, get_orientation_str, get_node_alignment_str):
7680 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7681 (get_linestyle_str, get_arrowstyle_str): Likewise.
7682 * src/conflicts.c (resolve_sr_conflict):
7683 Use a default case rather than one for the one remaining enum
7684 value, to catch invalid enum values as well.
7685 * src/lalr.c (set_goto_map, map_goto):
7686 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7687 * src/nullable.c (nullable_compute, token_definitions_output):
7688 Likewise.
7689 * src/reader.c (packgram, reader): Likewise.
7690 * src/state.c (transitions_to, state_new, state_reduction_find):
7691 Likewise.
7692 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7693 (symbol_pack): Likewise.
7694 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
7695 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7696 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
7697 * src/system.h: Don't include <assert.h>.
7698 (assert): New macro.
7699
7700 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7701 (Destructor Decl, Parser Function, Pure Calling):
7702 Describe rules for braces inside C code more carefully.
287c78f6 7703
c66dfadd
PE
77042006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7705
c21493b8
PE
7706 Fix some porting glitches found by Nelson H. F. Beebe.
7707 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7708 compilers that don't understand that abort () does not return.
7709 * src/state.c (transitions_to): Likewise.
7710 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7711 that '#include <cstdlib>' works.
7712 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7713 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7714 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7715 for the benefit of some pre-C99 compilers.
7716
b6e3facf
PE
7717 * bootstrap: Undo changes to gnulib files that autoreconf made.
7718
c66dfadd
PE
7719 Minor fixups to get 'make maintainer-check' to work.
7720 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7721 with the new verify.h implementation.
7722 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7723 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7724 * data/yacc.c (YYUSE): Likewise.
7725 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7726 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7727 * src/parse-gram.y (declaration): Don't pass a string constant
7728 to a function that expects char *, since GCC might complain
7729 about the constant value.
7730 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7731 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7732 before #defining them.
7733 * tests/glr-regression.at
7734 (Incorrectly initialized location for empty right-hand side in GLR):
7735 In yyerror, use the msg arg.
7736 (Corrupted semantic options if user action cuts parse):
7737 (Incorrect lookahead during deterministic GLR):
7738 (Incorrect lookahead during nondeterministic GLR):
7739 Don't name a local var 'index'; it shadows string.h's 'index'.
7740
ed94ef2a
AD
77412006-01-19 Akim Demaille <akim@epita.fr>
7742
7743 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7744 location, not just parts of it.
7745
e9ad4aec
PE
77462006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7747
d6ca7905
PE
7748 * NEWS: Document the fact that multiple %unions are now allowed.
7749 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
7750 * TODO: This feature is now implemented, so remove it from
7751 the wishlist.
d6ca7905 7752
ef1b70e0
PE
7753 * Makefile.maint: Merge with coreutils Makefile.maint.
7754 (CVS_LIST): Use build-aux version if available.
7755 (VERSION_REGEXP): New macro.
7756 (syntax-check-rules): Add sc_no_if_have_config_h,
7757 sc_prohibit_assert_without_use, sc_require_config_h,
7758 sc_useless_cpp_parens.
7759 (sc_obsolete_symbols): Check for O_NDELAY.
7760 (sc_dd_max_sym_length): Track coreutils.
7761 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7762 (sc_useless_cpp_parens): New rule.
7763 (news-date-check): Look for version or today's date.
7764 (changelog-check): Don't require version number near head.
7765 (copyright-check): Use current year instead of hardwiring 2005.
7766 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7767 (announcement): Add --gpg-key-ID.
7768
7769 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7770 with "file system".
7771
2073ce56 7772 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
7773 array. Problem reported by twlevo.
7774 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7775 * src/lalr.c (build_relations): Rely on new sentinel.
7776 * src/gram.c (gram_free): Adjust to new sentinel.
7777
b7691f15
JD
77782006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7779
7780 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7781 yylookaheadNeeds. All uses updated.
7782 (yysplitStack): Rename local yynewLookaheadStatuses to
7783 yynewLookaheadNeeds.
7784 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7785 GLR): In comments, change `lookahead status' to `lookahead need'.
7786
ddee1b06
PH
77872006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7788
7789 * data/glr.c (yysplitStack): A little stylistic rewrite.
7790
12f4614d
PH
77912006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7792
7793 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7794
32c29292
JD
77952006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7796
7797 * doc/bison.texinfo: Fix some typos.
7798 (GLR Semantic Actions): New subsection discussing special
7799 considerations because GLR semantic actions might be deferred.
7800 (Actions): Mention look-ahead usage of yylval.
7801 (Actions and Locations): Mention look-ahead usage of yylloc.
7802 (Special Features for Use in Actions): Add YYEOF entry and mention it
7803 in the yychar entry.
7804 In the yychar entry, remove mention of the local yychar case (pure
7805 parser) since this is irrelevant information when writing semantic
148d66d8 7806 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
7807 yychar is otherwise described as an external variable.
7808 In the yychar entry, don't call it the `current' look-ahead since it
7809 isn't when semantic actions are deferred.
7810 In the yychar and yyclearin entries, add note about deferred semantic
7811 actions.
7812 Add yylloc and yylval entries discussing look-ahead usage.
7813 (Look-Ahead Tokens): When discussing yychar, don't call it the
7814 `current' look-ahead, and do mention yylval and yylloc.
7815 (Error Recovery): Cross-reference `Action Features' when mentioning
7816 yyclearin.
148d66d8 7817 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
7818 look-ahead.
7819 In the yylloc and yylval entries, mention look-ahead usage.
7820
de366a2f 78212006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
7822
7823 * tests/glr-regression.at: Update copyright year to 2006.
7824
bf70fa87
JD
78252006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7826
7827 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7828 use during nondeterministic operation to track which stacks have
7829 actually needed the current lookahead.
7830 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7831 Allocate, deallocate, resize, and otherwise shuffle space for
7832 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7833 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7834 appropriately during nondeterministic operation.
7835 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7836 members to store the current lookahead to be used by the deferred
7837 user action.
7838 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7839 from which the RHS is taken. Set the lookahead members of the new
7840 yySemanticOption according to the lookahead status for stack yyk.
7841 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7842 yyaddDeferredAction.
7843 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7844 members of yySemanticOption before invoking yyuserAction, and then set
7845 them back to their current values afterward.
7846 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7847 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7848 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7849 titles for consistency.
7850 (Leaked merged semantic value if user action cuts parse): In order to
7851 suppress lint warnings, use arguments in merge function, and assign
7852 char value < 128 in main.
7853 (Incorrect lookahead during deterministic GLR): New test case.
7854 (Incorrect lookahead during nondeterministic GLR): New test case.
7855
05449a2c
JD
78562006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7857
de366a2f 7858 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
7859 !yyvaluep as signal that no semantic value is available to print.
7860 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7861 to print a semantic value.
7862
4158e0a1 78632006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 7864
4158e0a1
JD
7865 * tests/glr-regression.at: For consistency with my newer test cases,
7866 don't thank myself.
7867
d659304d
JD
78682006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7869
7870 * data/glr.c (yyresolveValue): When merging semantic options, if at
7871 least one user action succeeds but a later one cuts the parse, then
7872 destroy the semantic value before returning rather than leaking it.
7873 (yyresolveStates): If a user action cuts the parse and thus
7874 yyresolveValue fails, ignore the (unset) semantic value rather than
7875 corrupting the yyGLRState, and empty the semantic options list since
7876 the user actions should have called all necessary destructors.
7877 Simplify code with YYCHK.
7878 * tests/glr-regression.at (Corrupted semantic options if user action
7879 cuts parse): New test case.
7880 (Undesirable destructors if user action cuts parse): New test case.
7881 Before applying any of this patch, this test case never actually failed
7882 for me... but only because the corrupted semantic options usually
7883 masked this bug.
7884 (Leaked merged semantic value if user action cuts parse): New test
7885 case.
7886
6ec2c0f2
AD
78872006-01-05 Akim Demaille <akim@epita.fr>
7888
7889 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7890
1b9c21fb
PE
78912006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7892
7893 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7894 _MSC_VER. Problem reported by Cenzato Marco.
7895 (b4_c_function_def): Use it.
7896 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7897 b4_c_modern.
7898 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7899 than rolling our own.
7900
84866159
AD
79012006-01-04 Akim Demaille <akim@epita.fr>
7902
7903 Also warn about non-used mid-rule values.
7904 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7905 member.
7906 (symbol_list_new): Adjust.
7907 * src/reader.c (symbol_typed_p): New.
7908 (grammar_rule_check): Use it.
7909 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7910 Check its rule.
7911 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7912 Use it.
7913 * tests/actions.at (Exotic Dollars): Adjust.
7914
378f4bd8
AD
79152006-01-04 Akim Demaille <akim@epita.fr>
7916
7917 * src/reader.c (grammar_midrule_action): If $$ is set in a
7918 mid-rule, move the `used' bit to its lhs.
7919 * tests/input.at (Unused values): New.
7920 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7921
e2a21b6f
PE
79222006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7923
54662697
PE
7924 * doc/bison.texinfo (Bison Options): Say more accurately what
7925 --yacc does.
7926 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7927 about declarations in the grammar when in Yacc mode, as POSIX does
7928 not require a diagnostic when the grammar uses extensions.
7929
7930 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7931
073f9288
PE
7932 Warn about dubious constructions like "%token T T".
7933 Reported by twlevo.
7934 * src/symtab.h (struct symbol.declared): New member.
7935 * src/symtab.c (symbol_new): Initialize it to false.
7936 (symbol_class_set): New arg DECLARING, specifying whether
7937 this is a declaration that we want to warn about, if there
7938 is more than one of them. All uses changed.
7939
1221b78a
PE
7940 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7941 Allow multiple %union directives, whose contents concatenate.
7942 * src/parse-gram.y (grammar_declaration): Likewise.
7943 Use muscle_code_grow, so that we don't need stype_line any more.
7944 All uses changed.
7945
7946 * src/muscle_tab.c (muscle_grow): Fix comment.
7947
e2a21b6f
PE
7948 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7949 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7950 Update copyright year to 2006.
7951
8f7e3cf9
AD
79522006-01-03 Akim Demaille <akim@epita.fr>
7953
7954 Have glr.cc pass (some of) the calc.at tests.
7955 * data/glr.cc (b4_parse_param_orig): New.
7956 (b4_parse_param): Improve its definition, and bound it more
7957 clearly in the skeleton.
7958 (b4_epilogue): Append, instead of prepending, in order to keep
7959 #line consistency.
7960 Simplify the generation of auxiliary functions: locations and
7961 purity are mandated.
7962 (b4_global_tokens_and_yystype): Honor it.
7963 * data/location.cc (c++.m4): Don't include it.
7964 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7965 and AT_SKEL_CC_IF.
7966 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7967 AT_LALR1_CC_IF.
7968 Be sure to initialize the first position's filename.
7969 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7970 mandated anyway.
7971 (AT_CHECK_CALC_GLR_CC): New.
7972 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7973
3953ed88
AD
79742006-01-02 Akim Demaille <akim@epita.fr>
7975
7976 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7977 c.m4.
0a96ba81 7978 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
7979 * data/glr.cc: Do not include stack.hh.
7980
9ecafbbf
AD
79812006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7982
7983 * data/glr.c: Reformat whitespace with tabs.
7984 (b4_lpure_formals): Remove this unused m4 macro.
7985 * tests/cxx-type.at: Reformat whitespace with tabs.
7986 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7987 since it's a member. Rename type to isNterm for clarity.
7988
c4d497a0
AD
79892005-12-29 Akim <akim@sulaco.local>
7990
7991 Let glr.cc catch up with symbol_value_print.
7992 * data/glr.cc (b4_yysymprint_generate): Replace by...
7993 (b4_yy_symbol_print_generate): this.
7994 (yy_symbol_print, yy_symbol_value_print): Declare them.
7995
4517da37
PE
79962005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7997
7998 * src/location.h (boundary): Note that a line or column equal
7999 to INT_MAX indicates an overflow.
8000 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8001 (rule_length_overflow, increment_rule_length, add_column_width):
8002 New functions.
8003 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8004 (<SC_BRACED_CODE>"}"):
8005 Use increment_rule_length rather than incrementing it by hand.
8006 (adjust_location, handle_syncline): Diagnose overflow.
8007 (handle_action_dollar, handle_action_at):
8008 Fix bug with monstrosities like $-2147483648.
8009 Remove now-unnecessary checks.
8010 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8011 (convert_ucn_to_byte): Verify assumptions.
8012 (handle_syncline): New arg LOC. All callers changed.
8013 Don't store through a value derived from char const * pointer.
8014
8015 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8016 GCC warnings.
8017
e3233bf6
PE
80182005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8019
8020 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8021 Remove unnecessary forward static decls.
8022
8f3596a6
AD
80232005-12-27 Akim Demaille <akim@epita.fr>
8024
8025 * src/reader.c (grammar_current_rule_check): Also check that $$
8026 is used.
8027 Take the rule to check as argument, hence rename as...
8028 (grammar_rule_check): this.
8029 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8030 Rename as...
8031 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8032 (grammar_midrule_action, grammar_symbol_append): Now static.
8033 * tests/torture.at (input): Don't rely on the default action
8034 being always performed.
8035 * tests/calc.at: "Set" $$ even when the action is "cut" with
8036 YYERROR or other.
8037 * tests/actions.at (Exotic Dollars): Instead of using unused
8038 values, check that the warning is issued.
8039
721be13c
PE
80402005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8041
8042 * NEWS: Improve wording for unused-value warnings.
8043
a0af42fc
AD
80442005-12-22 Akim Demaille <akim@epita.fr>
8045
8046 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8047 (b4_yysymprint_generate): Rename as...
8048 (b4_yy_symbol_print_generate): this.
8049 Generate yy_symbol_print instead of yysymprint.
8050 Generate also yy_symbol_value_print, and use it.
8051
affac613
AD
80522005-12-22 Akim Demaille <akim@epita.fr>
8053
721be13c 8054 * NEWS: Warn about unused values.
affac613
AD
8055 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8056 a `used' member.
8057 (symbol_list_n_get, symbol_list_n_used_set): New.
8058 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8059 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8060 * src/reader.c (grammar_current_rule_check): Check that values are
8061 used.
8062 * src/symtab.c (symbol_print): Accept 0.
8063 * tests/existing.at: Remove the type information.
8064 Empty the actions.
8065 Remove useless actions (beware of mid-rule actions: perl -000
8066 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8067 * tests/actions.at (Exotic Dollars): Use unused values.
8068 * tests/calc.at: Likewise.
8069 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8070 Likewise.
8071
8072 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8073 rule_useful_p.
8074
9d9b8b70
PE
80752005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8076
8bb4c753
PE
8077 Undo 2005-12-01 tentative license wording change. The wording is
8078 still being reviewed by the lawyers, and we don't want to wait for
8079 them before publishing a test release. For now, revert to the
8080 previous wording.
8081 * NEWS: Undo 2005-12-01 change.
8082 * data/glr.c: Revert to previous license wording.
8083 * data/glr.cc: Likewise.
8084 * data/lalr1.cc: Likewise.
8085 * data/location.cc: Likewise.
8086 * data/yacc.c: Likewise.
8087
9d9b8b70
PE
8088 * NEWS: Reword %destructor vs YYABORT etc.
8089 * data/glr.c: Use American spacing, for consistency.
8090 * data/glr.cc: Likewise.
8091 * data/lalr1.cc: Likewise.
8092 * data/yacc.c: Likewise.
8093 * data/yacc.c: Reformat comments slightly.
8094 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8095 for consistency. Fix some spelling errors and reword recently-included
8096 text slightly.
8097 * tests/cxx-type.at: Cast results of malloc, for C++.
8098
2c3b392a
AD
80992005-12-21 Joel E. Denny <address@hidden>
8100
8101 * tests/cxx-type.at: Construct a tree, count the parents of shared
8102 nodes, and free each node once and only once. Previously, the memory
8103 for semantic values was leaked instead.
8104
d6cff4dc
AD
81052005-12-21 Joel E. Denny <address@hidden>
8106
8107 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8108 (yylval, yylloc): If pure, #define to yystackp->yyval and
8109 yystackp->yyloc similar to yychar and yynerrs.
8110 (yyparse): If pure, remove local yylval and yylloc. Add local
8111 yystackp to accommodate pure definitions of yylval and yylloc.
8112 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8113 yylvalp and yyllocp to &yylval and &yylloc.
8114 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8115 namespace. Previously, nerrs and char were missing, but lval and lloc
8116 weren't necessary.
8117 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8118 yylvalp and yyllocp parameters since, if pure, these are now always
8119 accessible through yystackp. If not pure, they are still accessible
8120 globally.
8121 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8122 `if (YYID (N))' to pacify lint.
8123
a85284cf
AD
81242005-12-21 Akim Demaille <akim@epita.fr>
8125
8126 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8127 destroy the RHS symbols of a rule.
8128 * data/yacc.c (yylen): Initialize to 0.
8129 Keep its value to the number of items to possibly shift.
8130 In particular, a regular successful parse that ends on YYFINAL by
8131 a (internal) YYACCEPT must not have yylen != 0.
8132 (yyerrorlab, yyreturn): Pop the RHS.
8133 Reorder a bit to emphasize the `shifting' bits of code.
8134 (YYPOPSTACK): Now accept a number of items to pop.
8135 * data/lalr1.cc: Likewise.
8136 * data/glr.c: Formatting changes.
8137 Use goto instead of fall through.
8138 * doc/bison.texinfo (Destructor Decl): Complete.
8139
d508c281
JMG
81402005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8141
8142 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8143 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8144 * djgpp/config.bat: Replace every occurence of the file name
8145 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8146 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8147 * djgpp/config.sed: Replace every occurence of the file name
8148 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8149 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8150 * djgpp/djunpack.bat: DJGPP specific file.
8151 * djgpp/fnchange.lst: DJGPP specific file.
8152 * djgpp/README.in: Add new information about how to unpack the bison
8153 source on MSDOS and other systems which have 8.3 file name restrictions
8154 using djunpack.bat and fnchange.lst.
8155
3e7a2cd9
PE
81562005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8157
8158 * bootstrap (build_cvs_prefix): Remove; unused.
8159 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8160 when getting gnulib.
8161
81622005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8163
8164 * data/glr.c: Reorder typedef declarations for structs to match order
8165 of struct declarations.
8166 Rename yystack everywhere to yystackp except in yyparse where it's not
8167 a pointer.
8168 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8169 consistency.
8170 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8171 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8172 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8173 lint.
8174
877519f8
PE
81752005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8176
0eca5a39
PE
8177 * tests/sets.at (Accept): Fix typos in regular expression used to
8178 sed out the final state number.
8179
2cec9080
PE
8180 Work around portability problem on Solaris 10: flex-generated
8181 files include <stdio.h> before <config.h>, which messes up
8182 because the latter defines __EXTENSIONS__. Address the problem
8183 by creating two new little files that include <config.h> first,
8184 then include the flex-generated files. Rewrite everyone else
8185 to include <config.h> first, as well.
8186 * lib/timevar.c: Always include "config.h".
8187 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8188 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8189 (EXTRA_bison_SOURCES): New macro.
8190 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8191 * src/system.h: Don't include config.h.
8192 * src/LR0.c: Include <config.h> first.
8193 * src/assoc.c: Likewise.
8194 * src/closure.c: Likewise.
8195 * src/complain.c: Likewise.
8196 * src/conflicts.c: Likewise.
8197 * src/derives.c: Likewise.
8198 * src/files.c: Likewise.
8199 * src/getargs.c: Likewise.
8200 * src/gram.c: Likewise.
8201 * src/lalr.c: Likewise.
8202 * src/location.c: Likewise.
8203 * src/main.c: Likewise.
8204 * src/muscle_tab.c: Likewise.
8205 * src/nullable.c: Likewise.
8206 * src/output.c: Likewise.
8207 * src/parse-gram.y: Likewise.
8208 * src/print.c: Likewise.
8209 * src/print_graph.c: Likewise.
8210 * src/reader.c: Likewise.
8211 * src/reduce.c: Likewise.
8212 * src/relation.c: Likewise.
8213 * src/state.c: Likewise.
8214 * src/symlist.c: Likewise.
8215 * src/symtab.c: Likewise.
8216 * src/tables.c: Likewise.
8217 * src/uniqstr.c: Likewise.
8218 * src/vcg.c: Likewise.
8219
877519f8
PE
8220 * src/parse-gram.y: Fix minor problems uncovered by lint.
8221 (current_lhs, current_lhs_location): Now static.
8222 (current_assoc): Remove unused variable.
8223
8224 Cleanups so that Bison-generated parsers have less lint.
8225 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8226 Prepend /*ARGSUSED*/, for lint's sake.
8227 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8228 definition if 'lint' is defined.
8229 (YYID): New macro (or function, if lint).
8230 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8231 * data/yacc.c: Likewise.
8232 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8233 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8234 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8235 is C++ only.
8236 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8237 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8238 Use YYID(0) rather than 0, for lint.
8239 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8240 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8241
f5228370
PE
82422005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8243
8244 * tests/glr-regression.at
8245 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8246 Close memory leak reported by twlevo.
8247
69ce078b
PE
82482005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8249
6ff99711
PE
8250 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8251 all stacks.
8252 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
8253 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8254 New test case.
8255 (Duplicated user destructor for lookahead): This test now is expected
8256 to succeed.
8257
af3412cd
PE
82582005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8259
32b5b719 8260 * NEWS: Document the following change.
af3412cd
PE
8261 * data/yacc.c: Say "parser skeleton" rather than "file", since
8262 it's no longer just a file.
8263 * data/glr.c: Grant a special exception for C GLR parsers, that
8264 reads like the already-existing exception for C LALR(1) parsers.
8265 * data/glr.cc: Likewise.
8266 * data/lalr1.cc: Likewise.
8267 * data/location.cc: Likewise.
8268 * data/yacc.c: Reword the "written by" statement to clarify that
8269 it was the parser skeleton, not the entire output file.
8270 * data/glr.c: Written by Paul Hilfinger.
8271 * data/glr.cc: Written by Akim Demaille.
8272 * data/lalr1.cc: Likewise.
8273
035aa4a0
PE
82742005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8275
d9963c85
PE
8276 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8277 Fix typos in previous change that broke 'make check'.
8278 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8279 supported in C.
8280 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8281 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8282 We can revert this once things settle down.
8283
035aa4a0
PE
8284 * src/conflicts.c (conflicts_print): Don't print file name twice
8285 when %expect fails because there were no conflicts.
8286 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8287 change.
8288 * tests/conflicts.at (%expect not enough, %expect too much):
8289 (%expect with reduce conflicts): Adjust to new behavior.
8290
82912005-11-18 Akim Demaille <akim@epita.fr>
8292
8293 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8294 errors.
8295 * NEWS: Document this.
8296 * doc/bison.texinfo (Expect Decl): Likewise.
8297
d1ff7a7c
AD
82982005-11-16 Akim Demaille <akim@epita.fr>
8299
8300 Generalize the display of semantic values and locations in traces.
8301 * data/glr.c (yy_reduce_print): Fix indices (again).
8302 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8303 literal integers.
8304 * data/lalr1.cc (yyreduce_print): Rename as...
8305 (yy_reduce_print): this.
8306 Display values and locations.
8307 * data/yacc.c (yy_reduce_print): Likewise.
8308 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8309 (yysymprint): Move higher to be visible from yy_reduce_print).
8310 (yyparse): Adjust.
8311 * tests/calc.at: Adjust the expected length of the traces.
8312
6de5398d
AD
83132005-11-14 Akim Demaille <akim@epita.fr>
8314
8315 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8316 from 1 to N, while values and location start at 0.
8317 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8318
a1373f55
AD
83192005-11-14 Akim Demaille <akim@epita.fr>
8320
8321 * data/glr.c (yy_reduce_print): Fix the $ number.
8322
613d8952
AD
83232005-11-14 Akim Demaille <akim@epita.fr>
8324
8325 "Use" parse parameters.
8326 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8327 * data/glr.c, data/glr.cc: Use them.
8328 * data/glr.c (YYUSE): Have a C++ definition that supports
8329 non-pointer types.
8330
b2741627
AD
83312005-11-14 Akim Demaille <akim@epita.fr>
8332
8333 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8334
5059b5c8
AD
83352005-11-14 Akim Demaille <akim@epita.fr>
8336
42249483
AD
8337 * data/glr.cc: New.
8338 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 8339
4626a15d
AD
83402005-11-12 Akim Demaille <akim@epita.fr>
8341
8342 Let position and location be PODs.
8343 * data/location.cc (position::initialize, location::initialize): New.
8344 (position::position, location::location): Define only if
8345 b4_location_constructors is defined.
8346 * data/lalr1.cc (b4_location_constructors): Define it for backward
8347 compatibility.
8348 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8349
83502005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
8351
8352 * data/lalr1.cc: Move the body of the ctor and dtor into the
8353 parser file (instead of the header).
8354 Wrap the implementations in a "namespace yy".
8355
83562005-11-12 Akim Demaille <akim@epita.fr>
8357
8358 Have glr.c include its header file when created.
8359 * data/glr.c (b4_shared_declarations): New.
8360 Output them verbatim in the parser if !%defines, otherwise
8361 output then in the header file, and include it instead.
8362
1989d947
AD
83632005-11-11 Akim Demaille <akim@epita.fr>
8364
8365 * data/glr.c: Comment changes.
8366
83672005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
8368
8369 When yydebug, report semantic and location values for reductions.
8370 * data/glr.c (yy_reduce_print): Report the semantic values and the
8371 locations.
8372 (YY_REDUCE_PRINT): Adjust.
8373 (yyglrReduce): Use them.
8374 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8375 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8376 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8377 traces.
8378
02998094
AD
83792005-11-10 Akim Demaille <akim@epita.fr>
8380
8381 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8382 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8383 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8384
5210672f
PE
83852005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8386
8387 * m4/cxx.m4, examples/Makefile.am: Don't build
8388 examples/calc++ if no C++ compiler is available. (trivial change)
8389
a8991a1d
AD
83902005-11-09 Akim Demaille <akim@epita.fr>
8391
8392 * src/scan-skel.l: Use a couple of asserts.
8393
36b5e963
AD
83942005-11-03 Akim Demaille <akim@epita.fr>
8395
8396 In some (weird) cases, the final state number is incorrect.
8397 Reported by Alexandre Duret-Lutz.
8398 * src/LR0.c (state_list_append): Remove the computation of
8399 final_state.
8400 (save_reductions): Do it here.
8401 (get_state): Alpha conversion.
8402 (generate_states): Use a for loop.
8403 * src/gram.h (item_number_is_rule_number)
8404 (item_number_is_symbol_number): New.
8405 * src/state.c: Use assert.
8406 * src/system.h: Include assert.h.
8407 * tests/sets.at (Accept): New.
8408
44e7ead1
PH
84092005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8410
8411 * data/glr.c (yyfill): Adjust comment.
36b5e963 8412 (yyresolveAction): Initialize default location properly
44e7ead1
PH
8413 for empty right-hand sides.
8414 (yydoAction): Ditto.
8415 Add comment explaining apparently dead code.
36b5e963
AD
8416 * tests/glr-regression.at
8417 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 8418 New test.
36b5e963 8419
e10a80ee
PE
84202005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8421
8422 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8423 gnulib when interrupted. This fixes some race conditions and
8424 works around some portability problems (one noted by Paul
8425 Hilfinger).
8426
067b32ee
AD
84272005-10-22 Akim <akim@epita.fr>
8428
8429 * Makefile.cfg: Adjust to config -> build-aux.
8430 Reported by twledo.
8431
4b367315
AD
84322005-10-21 Akim Demaille <akim@epita.fr>
8433
8434 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8435 the %parse-params.
8436 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8437 * data/yacc.c (b4_Pure_if): Rename as...
8438 (b4_yacc_pure_if): this.
8439 (YY_SYMBOL_PRINT, yyparse): Adjust.
8440 * doc/bison.texinfo: Formatting changes.
8441
24cc23d9
AD
84422005-10-21 Akim Demaille <akim@epita.fr>
8443
8444 Finish the transition config -> build-aux.
8445 * configure.ac, Makefile.am: Use build-aux.
8446 * config/prev-version, config/announce-gen, config/Makefile.am:
8447 Move to...
8448 * build-aux/prev-version, build-aux/announce-gen,
8449 * build-aux/Makefile.am: here.
8450
d4476375
AD
84512005-10-14 Akim Demaille <akim@epita.fr>
8452
8453 * examples/calc++/test: Use set -x only when VERBOSE.
8454
302c0aee
PE
84552005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8456
8457 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8458 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8459
7625ec2c
AD
84602005-10-13 Akim Demaille <akim@epita.fr>
8461
8462 * src/scan-skel.l: Output the base name parts of the parser and
8463 header file names.
302c0aee 8464 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
8465 additional checks.
8466 Use this to exercise C++ outputs in subdirs.
8467 Reported by Oleg Smolsky.
8468
ba0fe3c7
PE
84692005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8470
8471 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8472 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8473 Problem reported by John P. Hartmann.
8474 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8475 already defined it.
8476
9b8a5ce0
AD
84772005-10-12 Akim Demaille <akim@epita.fr>
8478
8479 * src/parse-gram.y (version_check): Exit 63 to please missing
8480 (stands for "version mismatch).
8481 * tests/input.at, doc/bison.texinfo: Adjust.
8482
4f6e011e
PE
84832005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8484
8485 Work around portability problems with Visual Age C compiler
8486 (xlc and xlC_r) reported by John P. Hartmann.
8487 * data/location.cc (initial_column, initial_line): Remove.
8488 All uses replaced by 0 and 1.
8489 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8490 that xlc complains about.
8491 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 8492 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 8493 as __STDC__.
4d7aa45e
PE
8494 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8495 __STDC_VERSION__. Use it everywhere instead of looking at
8496 __STDC__ and __cplusplus.
4f6e011e 8497
a1b3bf8c
AD
84982005-10-10 Akim Demaille <akim@epita.fr>
8499
8500 * examples/calc++/test: Be quiet unless VERBOSE.
8501
412e44aa
PE
85022005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8503
2a4647a3
PE
8504 * data/c.m4 (yydestruct, yysymprint):
8505 Use YYUSE instead of casting to void.
8506 * data/glr.c (YYUSE): New macro.
8507 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8508 Use it instead of rolling our own.
8509 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8510 (YYCHK1):
8511 Use /*CONSTCOND*/ to suppress lint warnings.
8512 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8513 (YY_STACK_PRINT): Use 'false' not '0'.
8514 (YYUSE): New macro.
8515 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8516 * data/yacc.c (YYUSE): New macro.
8517 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8518 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8519 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8520
8521
412e44aa
PE
8522 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8523 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8524
88c6637f
PE
85252005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8526
2f4f028d
PE
8527 Undo the parts of the unlocked-I/O change that substituted
8528 putc or puts for printf. This might hurt performance a bit,
8529 but some people prefer the printf style.
8530 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8531 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8532 All uses replaced by YYFPRINTF and YYDPRINTF.
8533 * data/yacc.c: Likewise.
8534 * lib/bitset.c (bitset_print): Likewise.
8535 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8536 putc and puts.
8537 * lib/lbitset.c (debug_lbitset): Likewise.
8538 * src/closure.c (print_firsts, print_fderives): Likewise.
8539 * src/gram.c (grammar_dump): Likewise.
8540 * src/lalr.c (look_ahead_tokens_print): Likewise.
8541 * src/output.c (escaped_output): Likewise.
8542 (user_actions_output): Break apart two printfs.
8543 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8544 * src/reduce.c (reduce_print): Likewise.
8545 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8546 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8547
88c6637f
PE
8548 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8549 Use assignments rather than casts-to-void to suppress
8550 unused-variable warnings. This pacifies 'lint'.
8551 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8552 unused-variable warnings.
8553
fb32e373
JMG
85542005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8555
8556 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8557
edb8f44f
PE
85582005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8559
fb9c0b33
PE
8560 Use unlocked I/O for a minor performance improvement on hosts like
8561 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8562 is to use the gnlib unlocked-io module, and to prefer putc and
8563 puts to printf when either will work (since the latter doesn't
8564 come in an unlocked flavor).
8565 * bootstrap (gnulib_modules): Add unlocked-io.
8566 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8567 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8568 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8569 and similarly for puts and putc and printf.
8570 * data/yacc.c: Likewise.
8571 * lib/bitset.c (bitset_print): Likewise.
8572 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8573 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8574 to printf.
8575 * lib/lbitset.c (debug_lbitset): Likewise.
8576 * src/closure.c (print_firsts, print_fderives): Likewise.
8577 * src/gram.c (grammar_dump): Likewise.
8578 * src/lalr.c (look_ahead_tokens_print): Likewise.
8579 * src/output.c (escaped_output): Likewise.
8580 (user_actions_output): Coalesce two printfs.
2f4f028d 8581 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
8582 * src/reduce.c (reduce_print): Likewise.
8583 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 8584 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 8585
edb8f44f
PE
8586 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8587 this confuses xgettext.
8588
b50d2359
AD
85892005-10-02 Akim Demaille <akim@epita.fr>
8590
8591 * bootstrap (gnulib_modules): Add strverscmp.
8592 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8593 * m4/.cvsignore: Add strverscmp.m4.
8594 * src/parse-gram.y (%require): New token, new rule.
8595 (version_check): New.
8596 * src/scan-gram.l (%require): Adjust.
8597 * tests/input.at (AT_REQUIRE): New.
8598 Use it.
8599 * doc/bison.texinfo (Require Decl): New.
8600 (Calc++ Parser): Use %require.
8601
21667f64
AD
86022005-10-02 Akim Demaille <akim@epita.fr>
8603
8604 * data/location.cc: New.
8605
2b81e969
AD
86062005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8607 Akim Demaille <akim@epita.fr>
8608
8609 Make sure -odir/foo.cc creates dir/location.hh etc.
8610 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8611 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8612 (spec_defines_file): Now const.
8613 (dir_prefix): New.
8614 (short_base_name): Remove.
8615 * src/files.c: Adjust.
8616 (dirname.h): Include.
8617 (base_name): Don't prototype it.
8618 (finput): Remove, duplicates gram_in.
8619 (full_base_name, short_base_name): Replace by...
8620 (all_but_ext, all_but_tab_ext): these.
8621 (compute_base_names): Rename as...
8622 (compute_file_name_parts): this.
8623 Update to compute the new variables, including dir_prefix.
8624 Adjust dependencies.
8625 * src/output.c (prepare): Output them.
8626 * src/reader.c: Adjust to use gram_in, not finput.
8627 * src/scan-skel.l (@dir_prefix@): New.
8628
ad6a9b97
JMG
86292005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8630
8631 * lib/subpipe.c: New function end_of_output_subpipe() added
8632 to allow support for non-posix systems. This is a no-op function
8633 for posix systems.
8634
8635 * lib/subpipe.h: New function end_of_output_subpipe() added
8636 to allow support for non-posix systems. This is a no-op function
8637 for posix systems.
8638
8639 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8640 handle the lack of pipe/fork functionality on non-posix systems.
8641
8642 * djgpp/Makefile.maint: DJGPP specific file.
8643
8644 * djgpp/README.in: DJGPP specific file.
8645
8646 * djgpp/config.bat: DJGPP specific configuration file.
8647
8648 * djgpp/config.sed: DJGPP specific configuration file.
8649
8650 * djgpp/config.site: DJGPP specific configuration file.
8651
8652 * djgpp/config_h.sed: DJGPP specific configuration file.
8653
8654 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8655
8656 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8657
fc695704
AD
86582005-10-02 Akim Demaille <akim@epita.fr>
8659
8660 * data/location.cc: New, extract from...
8661 * data/lalr1.cc: here.
8662 (location.hh): Include it after the user prologue, in case the
8663 filename type is defined by the user.
8664 Forward declation location and position before the pre-prologue.
8665 (yyresult_): Rename as...
8666 (yyresult): this, it's a local variable, not an attribute.
8667 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8668
86692005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
8670
8671 * examples/extexi: Restore the #line generation.
8672
fb9712a9
AD
86732005-09-30 Akim Demaille <akim@epita.fr>,
8674 Alexandre Duret-Lutz <adl@gnu.org>
8675
8676 Move the token type and YYSTYPE in the parser class.
8677 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8678 (parser::token): New, from the moved free definition of tokens.
8679 (parser::semantic_value): Now a full definition instead of an
8680 indirection to YYSTYPE.
8681 (b4_post_prologue): No longer included in the header file, but
8682 in the implementation file.
8683 * doc/bison.texi (C+ Language Interface): Update.
8684 * src/parse-gram.y: Support unary %define.
8685 * tests/actions.at: Define global_tokens_and_yystype for backward
8686 compatibility until we update the tests.
8687 * tests/calc.at: Idem.
8688 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8689 to simplify the code.
8690
55f0c7b1
PE
86912005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8692
8693 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8694 Ah, the good old days! Problem reported by Peter Klein.
8695 * bootstrap (gnulib_modules): Add strerror, strtoul.
8696 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8697 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8698
fb9712a9 86992005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
8700
8701 * data/c.m4 (b4_error_verbose_if): New.
8702 * data/lalr1.cc: Use it.
8703 (YYERROR_VERBOSE_IF): Remove.
8704 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8705 parser members, replaced by...
8706 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8707 local variables.
8708 (yysyntax_error_): Takes the state number as argument.
8709 (yyreduce_print_): Use the argument yyrule, not the former
8710 attribute yyn_.
8711
8a6f72f3
PE
87122005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8713
8714 * bootstrap (gnulib_modules): Add verify.
8715 * lib/.cvsignore: Add verify.h.
8716 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8717 * src/system.h (verify): Remove.
8718 Include verify.h instead.
8719 * src/tables.c (tables_generate): Use new API for 'verify'.
8720
0d50976f
PE
87212005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8722
ebc3737e
PE
8723 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8724 local variables whose names begin with 'yy'.
8725 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8726 Trivial changes from Joel E. Denny.
8727
0d50976f
PE
8728 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8729 it itself.
8730 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8731 don't use alloca any more.
8732
8733 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8734 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 8735 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
8736 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8737 to match yacc.c, to test more hosts.
8738
a05b79df
PE
87392005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8740
55289366
PE
8741 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8742 doesn't affect behavior.
8743 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8744 Solaris, AIX, MSC.
8745 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8746 This works a bit better with glibc, if user code has already included
8747 stdlib.h.
8748 * doc/bison.texinfo (Bison Parser): Document that users can't
8749 arbitrarily use malloc and free for other purposes. Document
8750 that <alloca.h> and <malloc.h> might be included.
8751 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8752 user must declare alloca.
8753
a05b79df
PE
8754 * HACKING (release): Forwarn the Translation Project about
8755 stable releses.
8756
3ab2ca22
AD
87572005-09-20 Akim Demaille <akim@epita.fr>
8758
8759 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8760
a9739e7c
PE
87612005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8762
a702593e
PE
8763 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8764 (YYSTACK_ALLOC_MAXIMUM): Use it.
8765 (yysyntax_error): New function.
8766 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8767 multiple syntax errors are reported, and alloca is being used.
8768 Instead, reallocate buffers twice as big each time, so that
8769 we waste at most half the allocated memory. Start with a small
8770 (128-byte) buffer that will suffice in most cases anyway.
8771 Use yysyntax_error to do most of the work.
8772
8773 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8774 yynerrs is the number of errors reported, not the number of
8775 errors encountered.
8776
a9739e7c
PE
8777 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8778 Mark it as expected to fail.
8779 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8780 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8781 Don't start user-code symbols with "yy", to avoid name space problems.
8782
f479c6c6
AD
87832005-09-19 Akim Demaille <akim@epita.fr>
8784
8785 Remove the traits, failed experiment.
8786 It never proved useful, and anyway because of the current
8787 definition, it was not possible to have several specialization of
8788 this traits, making it useless.
8789 * data/lalr1.cc (yy:traits): Remove.
8790 Inline its definitions in the parser class.
8791
e2586f82
AD
87922005-09-19 Akim Demaille <akim@epita.fr>
8793
8794 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8795 least Mac OSX with a /usr/local install of gettext.
8796
2e8cf949
AD
87972005-09-19 Akim Demaille <akim@epita.fr>
8798
8799 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8800 and yytoken for similarity with the other skeletons.
8801
c7fb0b90
AD
88022005-09-19 Akim Demaille <akim@epita.fr>
8803
4e26c69e 8804 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 8805
1bd0deda
PE
88062005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8807
8808 * NEWS: Version 2.1.
8809
8810 * NEWS: Remove notice of yytname change, since it was never in an
8811 official release.
8812 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8813 diagnostic.
8814 * src/output.c (prepare): Likewise.
8815 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8816 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8817 is not defined. This is an awful hack, but it's enough for now.
8818 All callers changed.
8819 * tests/glr-regression-at (make_value): Args are const pointers now,
8820 to avoid GCC warning.
8821 (Duplicated user destructor for lookahead): New test. Currently
8822 skipped. It fails on my host but I'm not sure it'll always fail.
8823
88242005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
8825
8826 * src/symtab.h (struct symbol): Declare the printer and destructor
8827 as const, to avoid accidental calls to free.
8828 (symbol_destructor_set, symbol_printer_set): Adjust.
8829 * src/symtab.c: Adjust.
8830
1bd0deda 88312005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
8832
8833 * data/c.m4 (b4_token_enums): New.
8834 (b4_token_defines): Rename as...
8835 (b4_token_enums_defines): this.
8836 (b4_token_defines): New, output only the #defines.
8837 * data/yacc.c, data/glr.c: Adjust.
8838 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8839 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8840 as default values.
8841
dbcdae2d
AD
88422005-09-16 Akim Demaille <akim@epita.fr>
8843
8844 * data/lalr1.cc (yylex_): Remove, inline its code.
8845 (yyreport_syntax_error_): Remove, replaced by...
8846 (yysyntax_error_): this which returns a string and leaves to the
8847 caller the call to the users' error function.
8848 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8849 Move from members of the parser object...
8850 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8851 to local variables of the parse function.
8852
70d8f291
AD
88532005-09-16 Akim Demaille <akim@epita.fr>
8854
8855 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8856 since it's in Bison's name space.
8857
b47dbebe
PE
88582005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8859
ae199bf1
PE
8860 * data/glr.c (yyresolveValue): Add default case to pacify
8861 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8862
b47dbebe
PE
8863 * NEWS: Document when yyparse started to return 2.
8864 * doc/bison.texinfo (Parser Function): Document when yyparse
8865 returns 2.
8866
8867 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8868 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8869 changed.
8870 (class position): file_name -> filename (reverting). All uses changed.
8871
88722005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8873
8874 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8875 do anything if $@ exists. This reverts part of the 2005-07-07
8876 patch.
8877
00292f66
PE
88782005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8879
8880 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8881 contains obsolete information and isn't worth distributing as a
8882 separate file anyway.
8883 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8884 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8885 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8886 (yyparse): Abort if user code uses longjmp to throw an unexpected
8887 value.
8888
a420f962
PE
88892005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8890
00292f66
PE
8891 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8892 Suggested by twlevo@xs4all.nl.
8893
127287e9
PE
8894 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8895 This avoids a diagnostic from gcc -Wswitch-enum.
8896 Problem reported by twlevo@xs4all.nl.
8897
a420f962
PE
8898 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8899 standards. Use "file name" or "file" or "name", depending on
8900 the context.
8901 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8902 not to hack/foo.tab.c.
8903 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
8904 * data/glr.c: b4_filename -> b4_file_name.
8905 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8906 All uses changed.
8907 (class position): filename -> file_name. All uses changed.
8908 * data/yacc.c: b4_filename -> b4_file_name.
8909 * lib/bitset.h: filename -> file_name in local vars.
8910 * lib/bitset_stats.c: Likewise.
8911 * src/files.c: Likewise.
8912 * src/scan-skel.l ("@output ".*\n): Likewise.
8913 * src/files.c (file_name_split): Renamed from filename_split.
8914 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
8915
89162005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8917
8918 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8919 to accommodate latest gnulib.
8920
8921 * tests/glr-regression.at (Duplicate representation of merged trees):
8922 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8923
8924 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8925 needed.
8926
42a6501d
PE
89272005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8928
8929 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8930 All uses changed. Invoke user destructor after an error during a
8931 split parse (trivial change from Joel E. Denny).
8932
8933 * tests/glr-regression.at
8934 (User destructor after an error during a split parse): New test case.
8935 Problem reported by Joel E. Denny in:
8936 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8937
ef9a1faf
PE
89382005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8939
5b4aaf78
PE
8940 * README-cvs: Give URLs for recommended tools.
8941 Mention Gzip version problem, and bootstrapping issues.
8942 Remove troubleshooting section, as it's somewhat obsolete.
8943
b5240ba5
PE
8944 * bootstrap (no_cache): New var, to accommodate different wget
8945 variants. Use it instead of '-C off'. Problem reported by
8946 twlevo@xs4all.nl.
8947
ef9a1faf
PE
8948 * data/glr.c (yydestroyStackItem): New function.
8949 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8950 debugging information. Problem reported by Joel E. Denny.
8951
e6efa9da
AD
89522005-08-25 Akim Demaille <akim@epita.fr>
8953
8954 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8955
adc90f13
PE
89562005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8957
8958 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8959 Don't invoke destructor on unresolved entries.
8960 * tests/glr-regression.at
8961 (User destructor for unresolved GLR semantic value): New test case.
8962 Problem reported by Joel E. Denny in:
8963 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8964
f9315de5
PE
89652005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8966
15d29c1f
PE
8967 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8968 Add strnlen.c.
8969 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8970 lib-prefix.m4, po.m4.
8971
dd5f2af2
PE
8972 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8973 in yydestruct diagnostic, since it might not be an error.
8974 Problem reported by Joel Denny near end of
8975 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 8976 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
8977 * data/yacc.c (yyreturn): Likewise.
8978 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8979
8980 * src/files.c: Remove obsolete FIXME comment.
8981
8982 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8983 with the other templates, and to fix bogus run-on messages such
8984 as the one reported at the end of
8985 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8986 All callers changed to avoid the newline.
8987 (yyprocessOneStack): Output two lines rather than one, to accommodate
8988 the above change. This changes the debug output format slightly.
8989
f9315de5
PE
8990 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8991 reported by Joel E. Denny in
8992 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8993 (trivial change).
8994 * tests/glr-regression.at (Duplicate representation of merged trees):
8995 New test, from Joel E. Denny in:
8996 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8997 * THANKS: Add Joel E. Denny.
8998
8999 * configure.ac (AC_INIT): Bump to 2.0c.
9000
04098407
PE
90012005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9002
9003 * NEWS: Version 2.0b.
9004
ca5d2013
PE
9005 * Makefile.am (SUBDIRS): Put examples before tests, so that
9006 "make check" doesn't finish with "All 1 tests passed".
9007
3d54b576
PE
9008 * tests/regression.at (Token definitions): Don't rely on
9009 AT_PARSER_CHECK for data that contains backslashes. It currently
9010 uses 'echo', and 'echo' isn't portable if its argument contains
9011 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9012 that the byte '\0xff' is not printable in the C locale; it is,
9013 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9014 not printable, so use '\0x81' to test.
9015
d53ae497
PE
9016 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9017 version of GCC, since the macro is used with non-GCC compilers.
9018
fc01665e
PE
9019 Fix core dump reported by Pablo De Napoli in
9020 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9021 * tests/regression.at (Invalid inputs with {}): New test.
9022 * src/parse-gram.y (token_name): Translate type before using
9023 it as an index.
9024
04098407
PE
9025 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9026 the user's name space. All uses changed to __attribute__
9027 ((__unused__)).
9028 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9029 Add __attribute__ ((__noreturn__)).
9030
9031 * etc/clcommit: Remove. We weren't using it, and it failed
9032 "make maintainer-distcheck".
9033 * Makefile.maint: Merge from coreutils.
9034 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9035 (syntax-check-rules): Change list of rules as described below.
9036 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9037 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9038 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9039 (sc_trailing_space): New rules.
9040 (sc_xalloc_h_in_src): Remove.
9041 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9042 (sc_space_tab, sc_error_exit_success, sc_changelog):
9043 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9044 (makefile-check, po-check, author_mark_check):
9045 (makefile_path_separator_check, copyright-check):
9046 Use grep -n, to make it easier to find violations.
9047 Use CVS_LIST and CVS_LIST_EXCEPT.
9048 (header_regexp, h_re): Remove.
9049 (dd_c): New macro.
9050 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9051 (my-distcheck): Use more-modern GCC flags.
9052 (signatures, %.asc): Remove.
9053 (rel-files, announcement): Remove signatures.
9054 Restore old updating code, even though we don't use it, so
9055 that we're the same as coreutils.
9056 (alpha, beta, major): Depend on news-date-check.
9057 Make the upload commands.
9058
9059 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9060 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9061 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9062 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9063 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9064 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9065 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9066 * tests/sets.at: Likewise.
9067
9068 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9069 we comment out the Autoconf version number.
9070 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9071 it's error-prone and "make maintainer-distcheck" rejects it.
9072
9073 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9074 Indent calls to "error" to pacify "make maintainer-distcheck",
9075 when the calls are not intended to be translated.
9076 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9077
9078 * src/Makefile.am (DEFS): Use +=, to pacify
9079 "make maintainer-distcheck".
9080 (bison_SOURCES): Add scan-skel.h.
9081 (sc_tight_scope): New rule, from coreutils.
9082
9083 * src/files.c (src_extension, header_extension):
9084 Now static, not extern.
9085 * src/getargs.c (short_options): Likewise.
9086 * src/muscle_tab.c (muscle_table): Likewise.
9087 * src/parse-gram.y (current_class, current_type, current_prec):
9088 Likewise.
9089 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9090 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9091 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9092 void, to avoid warning when NLS is disabled.
9093 * src/output.c: Include scan-skel.h.
9094 (scan_skel): Remove decl, since scan-skel.h does this.
9095 (output_skeleton):
9096 Indent calls to "error" to pacify "make maintainer-distcheck".
9097 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9098 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9099 "make maintainer-distcheck".
9100 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9101 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9102 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9103 (skel_lex_destroy, scan_skel): Move these decls to...
9104 * src/scan-skel.h: New file.
9105 * src/uniqstr.c (uniqstr_assert):
9106 Indent calls to "error" to pacify "make maintainer-distcheck".
9107
9108 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9109 not @VAR@.
9110
9111 * tests/torture.at: Revamp to avoid misuse of atoi that
9112 "make maintainer-distcheck" complained about.
9113
9114 * examples/extexi (message): Don't print a message more than once,
9115 and omit line-number decoration that makes Emacs compile think
9116 that informative messages are worth worrying about.
9117
91182005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9119
9120 * configure.ac: Update version number.
9121
9122 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9123 accidentally.
9124 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9125 autogenerated by the maintainer.
9126 * examples/calc++/.cvsignore: Add *.yy.
9127
9128 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9129 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9130 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9131
9132 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9133
9134 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9135 from maintainer-distcheck about casting the argument of 'free'.
9136
9137 * NEWS: Mention recent yytname changes.
9138 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9139
9140 * bootstrap: For translations that have not yet been upgraded to
9141 the new runtime-po domain, prime the pump by extracting the
9142 relevant strings from the obsolete translations. This code can be
9143 removed once the bison-runtime domain has been translated by each
9144 team.
9145
9146 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9147 now that token names are already quoted.
9148
9149 Fix problem reported by Anthony Heading.
9150 * data/glr.c (YYTOKEN_TABLE): New macro.
9151 (yytname): Define if YYTOKEN_TABLE.
9152 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9153 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9154 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9155 * src/output.c (prepare_symbols): Output token_table_flag.
9156
0ffda363
PE
91572005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9158
9159 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9160 again if the first call fails.
9161
9162 * data/glr.c (yytnamerr): New function.
9163 (yyreportSyntaxError): Use it to dequote most string literals.
9164 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9165 with other skeletons. All uses changed.
9166 (yytnameerr_): New function.
9167 (yyreport_syntax_error): Use it to dequote most string literals.
9168 * data/yacc.c (yytnamerr): New function.
9169 (yyerrlab): Use it to decode most string literals.
9170 * doc/bison.texinfo (Decl Summary, Calling Convention):
9171 Clarify quoting convention of yytname.
9172 * src/output.c (prepare_symbols): Quote all names. This undoes
9173 the 2005-04-17 change, which is now accomplished (mostly) via
9174 changes in the parsers as described above.
9175 * tests/regression.at (Token definitions, Web2c Actions):
9176 Undo most 2005-04-17 change here, too.
9177
91782005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9179
9180 Fix more problems reported by twlevo@xs4all.nl.
9181 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9182 remove trailing spaces. This loses the exit status of ./types,
9183 and isn't needed since ./types shouldn't be emitting trailing
9184 spaces.
9185 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9186 as the stack isn't valid in that case.
9187
9188 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9189 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9190 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9191 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9192 is used.
9193 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9194 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9195 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9196 Likewise.
9197
9198 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9199 overly-picky compilers that reject 'char *foo = "bar";'.
9200
9201 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9202 to FILE * parameter, not to stderr. This fixes a typo introduced
9203 in the 2005-07-12 change.
9204
9205 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9206 warnings from GCC 4.
9207
9208 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9209 (yyglrShiftDefer, yysplitStack):
9210 Remove unused parameters b4_pure_formals. All uses changed.
9211 (yyglrShift): Remove unused parameters b4_user_formals.
9212 All uses changed.
9213 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9214
6100a9aa
PE
92152005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9216
258b75ca
PE
9217 Destructor cleanups and regularization among the three skeletons.
9218 * NEWS: Document the behavior changes.
9219 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9220 stack before failing, as the cleanup code will do it for us now.
9221 * data/lalr1.cc (yyerrlab): Likewise.
9222 * data/glr.c (yyparse): Pop everything off the stack before
9223 freeing it, so that destructors get called properly.
9224 * data/lalr1.cc (yyreturn): Likewise.
9225 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9226 This is more consistent.
9227 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9228 why destructors might be called. 1.875 -> 2.1.
9229 (Destructor Decl, Decl Summary, Table of Symbols):
9230 Some English-language cleanups for %destructor.
9231 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9232 Add output line for destructor of start symbol.
9233 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9234 because of that same extra output line.
9235
1a059451
PE
9236 * NEWS: Document minor wording changes in diagnostics of
9237 Bison-generated parsers.
9238 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9239 Remove unused formals. All uses changed.
9240 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9241 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9242 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9243 Rename yyoverflowab to yyexhaustedlab.
9244 When memory exhaustion occurs during syntax-error reporting,
9245 report it separately rather than in a single diagnostic; this
9246 eases translation.
9247 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9248 (Memory Exhausted): Renamed from Parser Stack Overflow.
9249 Revamp wording slightly to prefer "memory exhaustion".
9250 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9251
97460c78
PE
9252 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9253
30757c8c
PE
9254 Add i18n support to the GLR skeleton. Partially fix the C++
9255 skeleton; a C++ expert needs to finish this. Remove debugging
9256 msgids; there's little point to having them translated, since they
9257 can be understood only by someone who can read the
9258 (English-language) source code.
9259
9260 Generate runtime-po/bison-runtime.pot automatically, so that we
9261 don't have to worry about garbage getting in that file. We'll
9262 make sure after the next official release that old msgids don't
9263 get lost. See
9264 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9265
9266 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9267 Now auto-generated.
9268 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9269 Fix typos in explanations of the runtime file.
9270 * bootstrap: Change gettext keyword from YYI18N to YY_.
9271 Use standard Makefile.in.in in runtime-po, since we'll arrange
9272 for backward-compatible bison-runtime.po files in a different way.
9273 * data/glr.c (YY_): New macro, from yacc.c.
9274 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9275 Translate messages intended for users.
9276 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9277 the wording in the other skeletons. We don't know that the memory
9278 is virtual.
9279 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9280 Use same method that yacc.c uses.
9281 Don't translate debugging messages.
9282 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9283 it doesn't work (yet), and requires C++ expertise to fix.
9284 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9285 Move defn to a more logical place, to be consistent with other
9286 skeletons.
9287 Don't translate debugging messages.
9288 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9289 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9290 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9291 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9292
ac8c5689
PE
9293 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9294 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9295 void, not int.
9296 * tests/glr-regression.at (Badly Collapsed GLR States):
9297 Likewise.
9298 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9299 yylex should return 0 at EOF rather than aborting.
9300
6100a9aa
PE
9301 Improve tests for stack overflow in GLR parser.
9302 Problem reported by twlevo@xs4all.nl.
9303 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9304 All uses removed.
9305 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9306 can handle the problem.
9307 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9308 (yyparse): New local variable yyresult to record the result.
9309 Use result of setjmp to set it, rather than storing itinto
9310 struct.
9311 (yyDone): Remove label.
9312 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9313 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9314 if YYABORT is used).
9315 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9316 yyparse status; put status > 1 into diagnostic.
9317 Check that status==2 works.
9318 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9319 Use exit status 3 for failure to open (which shouldn't happen).
9320
15f40952
PE
93212005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9322
67fd79c4
PE
9323 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9324 1 on syntax error; just let yyparse do its thing.
9325 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9326 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9327 (Exploding the Stack Size with Alloca):
9328 (Exploding the Stack Size with Malloc):
9329 Expect exit status 2, not 1, since the parser is supposed to blow
9330 its stack. Problem reported by twlevo@xs4all.nl.
9331
15f40952
PE
9332 * data/glr.c (yyparse): Don't assume that the initial calls
9333 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9334 Print a stack-overflow message and fail instead.
9335 Initialize the line-number information before creating the stack,
9336 so that the stack-overflow message can report line zero safely.
9337
f32c66b5
PE
93382005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9339
a22ff96f 9340 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
9341 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9342 (yyuserMerge): Provide a default case if b4_mergers is empty.
9343 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9344 * tests/glr-regression.at
9345 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 9346 Add casts to pacify C++ compilers.
1beb0b24
PE
9347 * tests/glr-regression.at (Improper merging of GLR delayed action
9348 sets): Declare yylex before using it.
f32c66b5 9349 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
9350 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9351 test for valgrind; valgrind is independent of g++.
9352 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9353 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9354 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9355 Use a destructor, so that we can expand the stack. Change
9356 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 9357
d741bd1b
PE
93582005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9359
9360 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9361 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9362
0410a6e0
PE
93632005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9364
9365 * PACKAGING: New file, suggested by Bruno Haible and taken from
9366 similar wording in gettext's PACKAGING file.
9367 * NEWS: Mention PACKAGING.
9368 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9369
f7ab6a50
PE
93702005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9371
baf785db 9372 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
9373 * bootstrap: Get runtime translations into runtime-po.
9374 Create runtime-po files automatically, if possible.
9375 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9376 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9377 does not infringe on the user's name space.
9378 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9379 * doc/bison.texinfo (Internationalization): Revamp the English
9380 and Texinfo syntax a bit, to try to make it clearer.
9381 (Bison Options, Option Cross Key): Mention --print-localedir.
9382 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9383 YYENABLE_NLS. Quote a bit more.
9384 * runtime-po/.cvsignore: New file.
9385 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9386 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9387 * runtime-po/quot.sed: Likewise.
9388 * runtime-po/boldquot.sed: Likewise.
9389 * runtime-po/en@quot.header: Likewise.
9390 * runtime-po/en@boldquot.header: Likewise.
9391 * runtime-po/insert-header.sin: Likewise.
9392 * runtime-po/remove-potcdate.sin: Likewise.
9393 * runtime-po/Makevars: Likewise.
9394 * runtime-po/LINGUAS: Likewise.
9395 * runtime-po/de.po: Likewise; we will rely on the translation project
9396 to maintain this, so "bootstrap" should get it.
0410a6e0 9397 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
9398 its value.
9399 * src/main.c (main): Bind the bison-runtime domain, too.
9400
94012005-07-12 Bruno Haible <bruno@clisp.org>
9402
9403 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9404 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9405 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9406 * runtime-po: New directory.
9407 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9408 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9409 * runtime-po/Rules-quot: New file, copied from po/.
9410 * runtime-po/quot.sed: Likewise.
9411 * runtime-po/boldquot.sed: Likewise.
9412 * runtime-po/en@quot.header: Likewise.
9413 * runtime-po/en@boldquot.header: Likewise.
9414 * runtime-po/insert-header.sin: Likewise.
9415 * runtime-po/remove-potcdate.sin: Likewise.
9416 * runtime-po/Makevars: New file.
9417 * runtime-po/POTFILES.in: New file.
9418 * runtime-po/LINGUAS: New file.
9419 * runtime-po/bison-runtime.pot: New file.
9420 * runtime-po/de.po: New file.
9421 * m4/bison.m4: New file.
9422 * Makefile.am (SUBDIRS): Add runtime-po.
9423 (aclocaldir, aclocal_DATA): New variables.
9424 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9425 Define aclocaldir.
9426 * src/getargs.c (usage): Document --print-localedir option.
9427 (PRINT_LOCALEDIR_OPTION): New enum item.
9428 (long_options): Add --print-localedir option.
9429 (getargs): Handle --print-localedir option.
9430 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9431 (Internationalization): New section.
9432
22dda0f0
AD
94332005-07-12 Akim Demaille <akim@epita.fr>
9434
9435 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9436 for consistency with the rest of the code.
9437 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9438 Add separators.
9439
82b248ad
AD
94402005-07-12 Akim Demaille <akim@epita.fr>
9441
9442 * src/parse-gram.y: Use %printer instead of YYPRINT.
9443
fa0e9314
AD
94442005-07-12 Akim Demaille <akim@epita.fr>
9445
867a3e00
AD
9446 * src/symtab.h, src/symtab.c (symbol_print): New.
9447 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9448 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9449
94502005-07-12 Akim Demaille <akim@epita.fr>
9451
9452 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
9453 b4_at_dollar and b4_dollar_dollar.
9454
e054b190
PE
94552005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9456
9457 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9458 and Pennello's paper.
9459
34160ec4
PE
94602005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9461
407d4a75
PE
9462 * data/yacc.c (yyparse): Undo previous patch. Instead,
9463 set yylsp[0] and yyvsp[0] only if the initial action
9464 sets yylloc and yylval, respectively.
9465
34160ec4
PE
9466 * data/yacc.c (yyparse): In the initial action, set
9467 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9468 This avoids the use of undefined variables if the initial
9469 action does not set yylloc and/or yylval.
9470
c3d5a4a7
PE
94712005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9472
b34d96c1
PE
9473 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9474 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9475 Remove from CVS. These files are automatically generated.
9476 * examples/extexi: Clarify that this file is now part of Bison,
9477 not GNU M4, and that it works with any POSIX-compatible Awk.
9478 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9479 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9480 so that we also get calc++-parser.yy. Geneate it.
9481 Use $(AWK), not gawk, since any conforming Awk will do.
9482 Put comment before action, since older 'make' can't handle comment
9483 in action.
9484 $(BUILT_SOURCES): List all built sources, not just some of them.
9485 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9486 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9487 $($(calc_sources_generated)): Remove unnecessary test for existence
9488 of target. (This had a shell syntax error anyway; a stray "x".)
9489 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9490 calc++-parser.yy.
9491 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9492
c3d5a4a7
PE
9493 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9494 implied by the other modules.
9495
828c373b
AD
94962005-07-06 Akim Demaille <akim@epita.fr>
9497
9498 Bind examples/calc++ to the package.
9499 * examples/calc++/Makefile: Remove, replaced by...
9500 * examples/calc++/Makefile.am: ... this new file.
9501 * examples/calc++/test: Remove input.
9502 * examples/calc++/compile: Remove.
9503 * examples/Makefile.am: New.
9504 * configure.ac, Makefile.am: Adjust.
9505 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9506
63cb01d6
PE
95072005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9508
fd2df2ed
PE
9509 * data/glr.c (yyFail): Drastically simplify; since the format argument
9510 never had any % directives, we can simply pass it to yyerror.
9511 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9512 be modified later, as that is the usual style in glr.c.
9513 Problems reported by Paul Hilfinger.
9514
63cb01d6
PE
9515 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9516 and size overflow errors.
9517 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9518 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9519 (YYSIZEMAX): New macro.
9520 (yystpcpy): New function, taken from yacc.c.
9521 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9522 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9523 so that we don't have to maintain their signatures.
9524 (yyFail): Check for buffer overflow, by using vsnprintf rather
9525 than vsprintf. Allocate a bigger buffer if possible.
9526 Report an error if buffer allocation fails.
9527 (yyStackOverflow): New function.
9528 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9529 the initialization was successful. It might fail if storage was
9530 exhausted.
9531 (yyexpandGLRStack): Add more checks for storage allocation failure.
9532 Use yyStackOverflow to report failures.
9533 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9534 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9535 Don't assume stack number fits in int.
9536 (yysplitStack): Check for storage allocation failure.
9537 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9538 can print diagnostics on storage allocation failure. All callers
9539 changed.
9540 (yyresolveValue): Use yybool for boolean.
9541 (yyreportSyntaxError): Check for size-calculation overflow.
9542 This code is taken from yacc.c.
9543 (yyparse): Check for storage allocation errors when allocating
9544 the initial stack.
9545
1c59e0a1
AD
95462005-07-05 Akim Demaille <akim@epita.fr>
9547
9548 Extract calc++ from the documentation.
9549 * doc/bison.texinfo (Calc++): Add the extraction marks.
9550 * examples/extexi: New, from the aborted GNU Programming 2E.
9551 Separate the different paragraph of a file with empty lines.
9552 * examples/Makefile: Use it to extract the whole calc++ example.
9553
8a0adb01
AD
95542005-06-24 Akim Demaille <akim@epita.fr>
9555
9556 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9557 class typedefs.
9558
12545799
AD
95592005-06-22 Akim Demaille <akim@epita.fr>
9560
9561 * doc/bison.texinfo (C++ Language Interface): First stab.
9562 (C++ Parsers): Remove.
9563
99be0235
AD
95642005-06-22 Akim Demaille <akim@epita.fr>
9565
9566 * data/lalr1.cc (yylex_): Honor %lex-param.
9567
0ffd4fd1
AD
95682005-06-22 Akim Demaille <akim@epita.fr>
9569
9570 Start a set of simple examples.
9571 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9572 * examples/calc++/calc++-driver.hh,
9573 * examples/calc++/calc++-parser.yy,
9574 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9575 * examples/calc++/compile, examples/calc++/test: New.
9576
0925ebb4
PE
95772005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9578
9579 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9580 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9581 which stems from the 2005-05-27 patch.
9582
43d3b664
PH
95832005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9584
9585 * data/glr.c: Modify treatment of unused parameters to permit use
9586 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9587
3062864d
PE
95882005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9589
9590 Fix infringement on user name space reported by Janos Zoltan Szabo.
9591 * data/yacc.c (yyparse): strlen -> yystrlen.
9592
989b5b8e
AD
95932005-05-30 Akim Demaille <akim@epita.fr>
9594
9595 * data/lalr1.cc (_): New.
9596 Translate the various messages.
9597
bedf57f5
PE
95982005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9599
9600 Fix infringement on user name space reported by Bruno Haible.
9601 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9602 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9603 the user's name space.
9604 (alloca): Include <stdlib.h> to get it, if it's not built in.
9605 (YYMALLOC, YYFREE): Define only if needed.
9606 (malloc, free): Declare, but only if needed, as this infringes on
9607 the user name space.
9608
4d1801f1
PE
96092005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9610
9611 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9612 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9613 with %d format.
9614 * lib/ebitset.c (min, max): Undef before defining.
9615 * lib/vbitset.c (min, max): Likewise.
9616 * lib/subpipe.c (create_subpipe): Save local variables in case
9617 vfork clobbers them.
9618
96192005-05-24 Bruno Haible <bruno@clisp.org>
9620
9621 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9622 error message syntax used by gcc-4.0.
9623
b94a9e1e
PE
96242005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9625
85ac3861
PE
9626 * README: Mention m4 1.4.3. Remove obsolete advice about
9627 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9628
b94a9e1e
PE
9629 * bootstrap: Remove workaround for problem I encountered with
9630 gettext 0.14.1; it seems to be fixed now.
9631
51c30d21
PE
96322005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9633
009ce67d
PE
9634 * NEWS: Version 2.0a.
9635
f2a97c62
PE
9636 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9637 the previous change.
9638
c8775f93
PE
9639 Various maintainer cleanups.
9640 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9641 conftest*, for benefit of CVS commands run at the same time as
9642 "configure". Add build-aux, since "bootstrap" now creates it and
9643 its subfiles.
9644 * Makefile.cfg (move_if_change): Remove.
9645 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9646 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9647 (po_repo, do-po-update, po-update, wget_files, get-targets):
9648 (config.guess-url_prefix, config.sub-url_prefix):
9649 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9650 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9651 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9652 Remove.
9653 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9654 this is now the recommended name.
9655 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9656 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9657 ylwrap. These files now go into build-aux.
9658 * config/move-if-change: Remove.
9659 * config/prev-version.txt: Bump from 1.75 to 2.0.
9660
3ea5f0ec
PE
9661 * bootstrap: Add stdio-safer, unistd-safer modules.
9662 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9663 we don't need it).
9664 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9665 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9666 * lib/subpipe.c: Include "unistd-safer.h".
9667 (create_subpipe): Make sure all the newly-created
9668 file descriptors are > 2, so that diagnostics don't
9669 get sent down them (which might cause Bison to hang, in theory).
9670 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9671 * src/files.c (xfopen): Use fopen_safer, not fopen.
9672
51c30d21
PE
9673 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9674 yesterday's yacc.c fix.
9675
cea1469d
PE
96762005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9677
3ea5f0ec
PE
9678 * data/glr.c, data/lalr1.cc: Update copyright date.
9679
cea1469d
PE
9680 Fix a destructor bug reported by Wolfgang Spraul in
9681 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9682 * data/yacc.c (yyabortlab): Don't call destructor, and
9683 don't set yychar to EMPTY.
9684 (yyoverflowlab): Don't call destructor.
9685 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9686 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9687 since we no longer output the message "discarding lookahead token
9688 end of input ()".
9689
5e6f62f2
PH
96902005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9691
9692 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9693 fix a small glitch in debugging output.
9694 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9695 after YY_SYMBOL_PRINT where needed.
9696
9697 (struct yyGLRState): Add some comments.
9698 (struct yySemanticOption): Add some comments.
9699 (union yyGLRStackItem): Add comment.
9700
9701 (yymergeOptionSets): Correct this to properly perform the union,
9702 avoiding infinite reported by Michael Rosien.
9703 Update comment.
9704
9705 * tests/glr-regression.at: Add test for GLR merging error reported
9706 by M. Rosien.
cea1469d 9707
0fb669f9
PE
97082005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9709
9710 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9711 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9712 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9713 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9714 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9715 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9716 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9717 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9718 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9719 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9720 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9721 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9722 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9723 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9724 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9725 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9726 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9727 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9728 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9729 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9730 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9731 src/output.h, src/parse-gram.c, src/parse-gram.h,
9732 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9733 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9734 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9735 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9736 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9737 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9738 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9739 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9740 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9741 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9742 tests/reduce.at, tests/regression.at, tests/sets.at,
9743 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9744 Update FSF postal mail address.
9745
51f4735e
PE
97462005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9747
9748 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9749 Problem reported by Ralf Menzel.
9750
80ce3401
PE
97512005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9752
9753 * tests/actions.at: Test that stack overflow invokes destructors.
9754 From Marcus Holland-Moritz.
9755 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9756 from here....
9757 (yyreturn): to here. That way, destructors are called properly
9758 even if the stack overflows, or the user calls YYACCEPT or
9759 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9760 (yyoverflowlab): Destroy the lookahead.
9761
97622005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9763
9764 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9765
72f000b0
PE
97662005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9767
9768 * NEWS: Bison-generated C parsers no longer quote literal strings
9769 associated with tokens.
9770 * src/output.c (prepare_symbols): Don't escape strings,
9771 since users don't want to see C escapes.
9772 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9773 in diagnostics.
c19683bb 9774 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
9775 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9776
1094323f
PE
97772005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9778
9779 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9780 the data size is known to be too small and we can't increase it.
9781 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9782
ca407bdf
PE
97832005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9784
9785 * src/parse-gram.y: Include quotearg.h.
9786 (string_as_id): Quote $1 before using it as a key, since the
9787 lexer no longer quotes it for us.
9788 (string_content): Don't strip quotes, since lexer no longer
9789 quotes it for us.
9790 * src/scan-gram.l: Include quotearg.h.
9791 ("\""): Omit quote.
9792 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9793 a key, since the rest of the lexer doesn't quote it.
9794 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9795 * tests/regression.at (Token definitions): Check for backslashes
9796 in token strings.
9797
9798 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9799 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9800 (yyparse): Revamp code to generate long syntax error message, to
9801 make it easier to translate, and to avoid problems with arithmetic
9802 overflow. Change "virtual memory" to "memory" in diagnostic, since
9803 we don't know whether the memory is virtual.
9804
1ce59070
PE
98052005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9806
9807 * NEWS: Bison-generated C parsers now use the _ macro to
9808 translate strings.
9809 * data/yacc.c (_) [!defined _]: New macro.
9810 All English strings wrapped inside this macro.
9811 * doc/bison.texinfo (Bison Parser): Document _.
9812 * po/POTFILES.in: Include src/parse-gram.c, since it now
9813 includes translateable strings that parse-gram.y doesn't.
9814
a749a695
PE
98152005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9816
9817 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9818 reverting the 2004-10-11 change to this function.
9819 (symbol_check_alias_consistency): Don't call symbol_type_set
9820 if the type name is already correct.
9821 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9822
8fb1053b
PE
98232005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9824
9825 * tests/regression.at (Token definitions): Don't use a token named
9826 c, as that generates a "#define c ..." that runs afoul of buggy
9827 stdlib.h that uses the identifier c as a member of struct
9828 drand48_data. Problem reported by Horst Wente.
9829
ff498c4a
PE
98302005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9831
9832 * bootstrap: Change translation URL from
9833 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9834 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9835 redirection glitches. Problem reported by twlevo@xs4all.nl.
9836
65211d70
PE
98372005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9838
9839 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9840 after operands; POSIX says this isn't portable for the c99 command.
9841
9577fb1f
PE
98422005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9843
9844 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9845 immediately if a data overrun has occurred; this may help us track
9846 down what may be a spurious failure on MacOS.
9847
78b178f7
PE
98482005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9849
a2599d0f
PE
9850 Respond to problems reported by twlevo@xs4all.nl.
9851
9852 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9853
78b178f7
PE
9854 * src/vcg.h: Comment fix.
9855 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9856 (G_CMAX): Change to -1 instead of INT_MAX.
9857
9858 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 9859
7296e729
PE
98602005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9861
9862 * src/tables.c (state_number_to_vector_number): Put it inside an
9863 "#if 0", since it's not currently used. Problem reported by
9864 Roland McGrath.
9865
05ac60f3
PE
98662005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9867
9868 * src/output.c (escaped_output): Renamed from
9869 escaped_file_name_output, since we now use it for symbol tags as
9870 well. All uses changed.
9871 (symbol_destructors_output, symbol_printers_output):
9872 Escape symbol tags too.
9873 Problem reported by Matyas Forstner in
9874 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9875
9876 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9877 not needed.
9878 * src/output.c (user_actions_output, token_definitions_output,
9879 symbol_destructors_output, symbol_printers_output): Likewise.
9880 * src/reader.c (prologue_augment): Likewise.
9881 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9882
9883 * src/vcg.c (output_edge): Don't quote linestyle arg.
9884 Problem reported by twlevo@xs4all.nl.
9885
7eb453ac
PE
98862005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9887
9888 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9889 example, reported by Derek M Jones. Also, make the example even
9890 more outrageous, to better illustrate how bad the problem is.
9891
4c04c52a
PE
98922005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9893
9894 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9895 putsym. Typo reported by Sebastian Piping.
9896
a61e1620
PE
98972005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9898
9899 * doc/bison.texinfo (Language and Grammar): some -> same
9900 (Epilogue): int he -> in the
9901 Typos reported by Sebastian Piping via Justin Pence.
9902
9ec93868
PE
99032005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9904
9905 * tests/glr-regression.at (Improper handling of embedded actions
9906 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9907 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9908 with dollar signs in test names.
9909 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9910 for a similar reason.
9911
73ce7e7e
PE
99122005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9913
9914 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9915 wants to redefine G_VIEW.
9916
2e72b98e
PE
99172005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9918
9919 * src/vcg.c (get_view_str): Remove case for normal_view.
9920 Problem reported by twlevo@xs4all.nl.
9921
e0d634e5
PE
99222005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9923
ccf830a4
PE
9924 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9925 Problem reported by twlevo@xs4all.nl.
9926
e0d634e5
PE
9927 * doc/bison.texinfo: Change @dircategory from "GNU programming
9928 tools" to "Software development". Requested by Richard Stallman
9929 via Karl Berry.
9930
7bbc8cb0
PE
99312005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9932
9933 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9934 Problem reported by twlevo@xs4all.nl.
9935
08b770bc
PE
99362005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9937
9938 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9939 keyword; it's not needed with modern compilers, and it doesn't
9940 affect correctness with older compilers. Suggested by
9941 twlevo@xs4all.nl.
9942
95f22ad2
PE
99432005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9944
9945 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9946 gcc -Wswitch-default.
9947 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9948 * data/yacc.c (yyparse): Likewise.
9949
d229d15c
PE
99502005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9951
9952 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9953 already. Let config.h define any nonstandard values.
9954
ecadd90f
PE
99552005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9956
9957 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9958 for the benefit of slower hosts. Problem reported by
9959 Nelson H. F. Beebe.
9960
213744b5
PE
99612005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9962
9963 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9964 being defined and not used.
9965 * data/lalr1.cc (yyparse): Likewise.
9966 Use "if (false)" rather than "if (0)".
9967
249d3236
PE
99682005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9969
9970 * TODO: Mention that we should allow NUL bytes in tokens.
9971
987cc1fb
PE
99722005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9973
9974 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9975 Problem reported by Hans Aberg.
9976
08fe02d9
PE
99772005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9978
9979 * src/getargs.c (version): Happy new year; update overall
9980 program copyright date from 2004 to 2005.
9981
9982 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9983 Problem reported by Hans Aberg.
9984 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9985 (Output file names.): Add a test for the case when standard output
9986 is closed.
9987
010c0266
PE
99882004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9989
9990 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9991 to fix an oversight in the Bison 2.0 manual.
9992
da12206a
PE
99932004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9994
9995 * NEWS: Version 2.0. Reformat the existing news items since
9996 1.875, so that related items are grouped together.
3a4734aa 9997 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
9998 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9999
c935d934
PE
10000 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10001 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10002 otherwise, we're not testing alloca. Unfortunately there's no
10003 simple way to consult HAVE_ALLOCA here.
10004
da12206a
PE
10005 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10006 for yymsg, too.
10007
10008 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10009 hand. This avoids a warning about comparing int to size_t when
10010 GCC warnings are enabled.
10011
0a2c5137
PE
100122004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10013
d7e14fc0
PE
10014 * NEWS: Bison-generated parsers no longer default to using the
10015 alloca function (when available) to extend the parser stack, due
10016 to widespread problems in unchecked stack-overflow detection.
10017 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10018 responsibility to set it to a positive value. This lets the user
10019 specify a value that is not a preprocessor constant.
10020 * data/yacc.c (YYMAXDEPTH): Likewise.
10021 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10022 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10023 to be a compile-time constant. However, explain the constraints on it.
10024 Also, explain the constraints on YYINITDEPTH.
10025 (Table of Symbols): Explain that alloca is no longer the default.
10026 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10027 to 1.
10028
0a2c5137
PE
10029 * doc/bison.texinfo (Location Default Action): Mention that n must
10030 be zero when k is zero. Suggested by Frank Heckenbach.
10031
e019c247
AD
100322004-12-22 Akim Demaille <akim@epita.fr>
10033
10034 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10035 (parser::state_type, parser::semantic_type, parser::location_type):
10036 Private, not public.
10037 (parser::parse): Return ints, not bool.
10038 Returning a bool introduces a problem: 0 corresponds to false, and
10039 it seems weird to return false on success. Returning true changes
10040 the conventions for yyparse.
10041 Alternatively we could return void and send an exception.
10042 There is no clear consensus (yet?).
10043 (state_stack, semantic_stack, location_stack): Rename as...
10044 (state_stack_type, semantic_stack_type, location_stack_type): these.
10045 Private, not public.
10046 * tests/c++.at: New.
10047 * tests/testsuite.at, tests/Makefile.am: Adjust.
10048
72731bb7
AD
100492004-12-21 Akim Demaille <akim@epita.fr>
10050
10051 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10052
9a0d8bec
AD
100532004-12-21 Akim Demaille <akim@epita.fr>
10054
10055 Don't impose std::string for filenames.
10056
10057 * data/lalr1.cc (b4_filename_type): New.
10058 (position::filename): Use it.
10059 (parser.hh): Move the inclusion of stack.hh and location.hh below
10060 the user code, so that needed headers for the filename type can be
10061 included first.
72731bb7
AD
10062 Forward declare them before the user code.
10063 * tests/Makefile.am (check-local, installcheck-local): Pass
10064 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 10065
99880de5
AD
100662004-12-20 Akim Demaille <akim@epita.fr>
10067
10068 Use more STL like names: my_class instead of MyClass.
10069
10070 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10071 (SemanticStack, SemanticType, StateStack, StateType)
10072 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10073 (Parser::value): Rename as...
10074 (location_stack, location_type, rhs_number_type, semantic_stack)
10075 (semantic_type, state_stack, state_type, token_number_type, stack)
10076 (slice, traits, parser::yylloc, parser::yylval): these.
10077
10078 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10079
9bec482e
PE
100802004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10081
10082 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10083 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10084
f6fbd3da
PE
100852004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10086
10087 Remove uses of 'short int' and 'unsigned short int'. This raises
10088 some arbitrary limits. It uses more memory but nowadays that's
10089 not much of an issue.
10090
10091 This change does not affect the generated parsers; that's a different
10092 task, as some users will want to conserve memory there.
10093
10094 Ideally we should use size_t to represent all object counts, and
10095 something like ptrdiff_t to represent signed differences of object
10096 counts; but that will require more code-cleanup than I have the
10097 time to do right now.
10098
10099 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10100 Use size_t, not int or short int, to count objects.
10101 * src/closure.c (nritemset, closure): Likewise.
10102 * src/closure.h (nritemset, closure): Likewise.
10103 * src/nullable.c (nullable_compute): Likewise.
10104 * src/print.c (print_core): Likewise.
10105 * src/print_graph.c (print_core): Likewise.
10106 * src/state.c (state_compare, state_hash): Likewise.
10107 * src/state.h (struct state): Likewise.
10108 * src/tables.c (default_goto, goto_actions): Likewise.
10109
10110 * src/gram.h (rule_number, rule): Use int, not short int.
10111 * src/output.c (prepare_rules): Likewise.
10112 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10113 errs, reductions): Likewise.
10114 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10115 Likewise.
10116 * src/tables.c (vector_number, tally, action_number,
10117 ACTION_NUMBER_MINIMUM): Likewise.
10118 * src/output.c (muscle_insert_short_int_table): Remove.
10119
efeed023
AD
101202004-12-17 Akim Demaille <akim@epita.fr>
10121
10122 * data/lalr1.cc: Extensive Doxygenation.
10123 (error_): Rename as...
10124 (error): this, since it is visible to the user.
10125 Adjust callers.
10126 (Parser::message): Now an automatic variable from...
10127 (Parser::yyreport_syntax_error_): here.
10128 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10129 Parser::error.
10130 * tests/input.at: Escape $.
10131
bc82c5a5
PE
101322004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10133
10134 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10135 Parenthesize rhs to avoid obscure problems with mistakes like
10136 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10137 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10138 b4_rhs_location): Likewise.
10139 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10140 b4_rhs_location): Likewise.
10141
fd19f271
AD
101422004-12-16 Akim Demaille <akim@epita.fr>
10143
10144 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10145 yacc.c: be sure to stay within yycheck_.
10146 * tests/actions.at: Re-enable C++ tests.
10147
10454ea4
AD
101482004-12-16 Akim Demaille <akim@epita.fr>
10149
10150 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10151 real.
10152
c5b95ccf
AD
101532004-12-16 Akim Demaille <akim@epita.fr>
10154
10155 Use #define to handle the %name-prefix.
10156
10157 * data/glr.c, data/yacc.c: Comment changes.
10158 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10159 so that one can refer to yylex in the parser file, and have it
10160 renamed, as is the case with other skeletons.
10161
617a8f12
AD
101622004-12-16 Akim Demaille <akim@epita.fr>
10163
10164 Move lalr1.cc internals into yy*.
10165
10166 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10167 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10168 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10169 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10170 (empty_, final_, terror_, errcode_, ntokens_)
10171 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10172 (looka_, ilooka_, error_range_, nerrs_):
10173 Rename as...
10174 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10175 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10176 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10177 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10178 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10179 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10180 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10181 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10182 these.
10183
1e547e6e
PE
101842004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10185
10186 Fix some problems reported by twlevo at xs4all.
10187 * src/symtab.c (symbol_new): Report an error if the input grammar
10188 contains too many symbols. This is better than calling abort() later.
10189 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10190 (struct node, struct graph):
10191 Rename member expand to stretch. All uses changed.
10192 (struct graph): Remove member layoutalgorithm. All uses removed.
10193 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10194 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10195 All uses changed.
10196 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10197
735d6bd4
AD
101982004-12-15 Akim Demaille <akim@epita.fr>
10199
10200 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10201 Add more Doxygen comments.
10202 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10203 (report_syntax_error_, translate_): Rename as...
10204 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10205 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10206
2e1f5829
AD
102072004-12-15 Akim Demaille <akim@epita.fr>
10208
10209 * data/lalr1.cc (lex_): Rename as...
10210 (yylex_): this.
10211 Move the trace here.
10212 Take the %name-prefix into account.
10213 Reported by Alexandre Duret-Lutz.
10214
a3cb6248
AD
102152004-12-15 Akim Demaille <akim@epita.fr>
10216
10217 Simplify the C++ parser constructor.
10218
10219 * data/lalr1.cc (debug_): Rename as...
10220 (yydebug_): so that the parser's internals are always in the yy*
10221 pseudo namespace.
10222 Adjust uses.
10223 (b4_parse_param_decl): Remove the leading comma as it is now only
10224 called as unique argument list.
10225 (Parser::Parser): Remove the constructor accepting a location and
10226 an initial debugging level.
10227 Remove from the other ctor the argument for the debugging level.
10228 (debug_level_type, debug_level, set_debug_level): New.
10229
10230 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10231 constructor calls.
10232
07fed891
AD
102332004-12-15 Akim Demaille <akim@epita.fr>
10234
10235 Remove b4_root related material: failure experiment
a3cb6248 10236 (which goal was to allow to derive from a class).
07fed891
AD
10237
10238 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10239 definitions and uses.
10240
e603eaa5
PE
102412004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10242
10243 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10244 not 2, since it's not portable to subtract 1 from the start of an
10245 array. The new item 0 is never set or used. All uses changed.
10246
10247 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10248 the default definition of YYLLOC_DEFAULT. Problem reported
10249 by Frank Heckenbach.
10250
fafb007d
PE
102512004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10252
10253 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10254 the normal case and one for the error case. Just use the
10255 first one uniformly. Problem reported by Frank Heckenbach.
10256 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10257 use exactly the same macro in both places.
10258 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10259 so that the normal-case YYRHSLOC works for the error case too.
10260 All uses changed.
10261 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10262 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10263 * doc/bison.texinfo (Location Default Action): Don't claim that
10264 we have an array of locations. Use the same macro for both glr
10265 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10266 the index is 0.
10267
48814dcd
PE
102682004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10269
a4e1a53b
PE
10270 * HACKING: Update email addresses to send announcements to.
10271
48814dcd
PE
10272 * configure.ac (AC_INIT): Bump version to 1.875f.
10273
337116ba
PE
102742004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10275
10276 * NEWS: Version 1.875e.
10277 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10278
10279 * src/scan-skel.l: Include "complain.h", for "fatal".
10280
10281 * src/relation.h (relation_print, relation_digraph):
10282 Relation sizes are of type relation_node, not size_t (this is
10283 merely a doc fix, since the two types are equivalent).
10284 (relation_transpose): Relation sizes are of type relation_node,
10285 not int.
10286 * src/relation.c: Likewise.
10287 (top, infinity): Now of type relation_node, not int.
10288 (traverse, relation_transpose): Use relation_node, not int.
10289
10290 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10291 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10292 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10293
10294 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 10295 specifying whether the test should be skipped. Use it tp
337116ba 10296 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 10297 fail on some hosts, and should be skipped.
337116ba 10298
da2a7671
PE
102992004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10300
10301 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10302 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10303 unless otherwise specified below.
10304
10305 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10306 to allocate kernel_base, kernel_items, kernel_size, since
10307 they needn't be initialized to 0.
10308 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10309 * src/closure.c (new_closure): Likewise, for itemset.
10310 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10311 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10312 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10313 (build_relations): Likewise for edge, states1, includes.
10314 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10315 * src/reader.c (packgram): Likewise, for ritem, rules.
10316 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10317 * src/relation.c (relation_digraph): Likewise for VERTICES.
10318 (relation_transpose): Likewise for new_R, end_R.
10319 * src/symtab.c (symbols_token_translations_init): Likewise for
10320 token_translations.
10321 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10322 (token_actions): Likewise for yydefact, actrow, conflrow,
10323 conflict_list.
10324 (save_column): Likewise for froms[symno], tos[symno].
10325 (goto_actions): Likewise for state_count.
10326 (pack_table): Likewise for base, pos, check.
10327 (tables_generate): Likewise for width.
10328
10329 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10330 for initial core. Just have a separate core, so we needn't worry
10331 about whether kernel_size and kernel_base are initialized.
10332
10333 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10334 kernel_size, kernel_items): Remove unnecessary initialization.
10335 * src/conflicts.c (conflicts): Likewise.
10336 * src/derives.c (derives): Likewise.
10337 * src/muscle_tablc (muscle_insert): Likewise.
10338 * src/relation.c (relation_digraph): Likewise.
10339 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10340 conflrow, conflict_table, conflict_list, table, check):
10341 Likewise.
10342
10343 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10344 This is because all callers pass unsigned int.
10345 * src/closure.h (new_closure): Likewise.
10346
10347 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10348 (build_relations): Initialize includes[i] in all cases.
10349 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10350 and rules[ruleno].precsym. Initialize members in order.
10351 * src/relation.c (relation_transpose): Always initialize new_R[i]
10352 and end_R[i].
10353 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10354
10355 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10356 conflict_list[0] was always 0, but now it isn't initialized.
10357
10358 * src/table.c (table_grow): When conflict_table grew, the grown
10359 area wasn't cleared. Fix this.
10360
10361 * lib/.cvsignore: Add strdup.c, strdup.h.
10362 * m4/.cvsignore: Add strdup.m4.
10363
00baeeac
PE
103642004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10365
10366 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10367 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10368 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10369 ngotos + 1 without checking for overflow.
10370 (build_relations): Use END_NODE, not -1, to denote end of edges.
10371 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10372 build_relations): Use goto_number, not int, for goto numbers.
10373 * src/tables.c (save_column, default_goto): Likewise.
10374
be3d9d42
AD
103752004-11-23 Akim Demaille <akim@epita.fr>
10376
10377 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10378 of #defining from yystype.
10379 Don't typedef yystype, C++ does not need it.
10380 This lets it possible to forward declare it as union.
10381
78e526d5
PE
103822004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10383
10384 * bootstrap (gnulib_modules): Add extensions.
10385 Problem reported by Jim Meyering.
10386
afbb696d
PE
103872004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10388
10389 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10390 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10391 src/system.h, src/tables.c: XFREE -> free, to accommodate
10392 recent change to gnulib xalloc.h.
78e526d5 10393 Problem reported by Jim Meyering.
afbb696d 10394
c1f8f16a
AD
103952004-11-17 Akim Demaille <akim@epita.fr>
10396
10397 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10398
db7e5eb5 103992004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
10400 Alexandre Duret-Lutz <adl@gnu.org>
10401
10402 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10403 changes.
10404 (YYCDEBUG): Adjust.
10405 Use it instead of cdebug_.
10406 (Parser::debug_stream, Parser::set_debug_stream): New.
10407 (Parser::symprint_): Define cdebug_ for temporary backward
10408 compatibility.
10409 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10410 debug_stream ().
10411
68e11668
AD
104122004-11-17 Akim Demaille <akim@epita.fr>
10413
10414 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10415 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10416 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10417 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10418
97cbc73e
PE
104192004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10420
10421 * data/glr.c (yyloc_default): Remove; not used.
10422 Problem reported by Frank Heckenbach.
10423
e342c3be
AD
104242004-10-25 Akim Demaille <akim@epita.fr>
10425
10426 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10427 Introduce another definition to address simple location arrays.
10428 (yyGLRStack): New member: yyerror_range.
10429 (yyrecoverSyntaxError, yyparse): Update it.
10430 (yyrecoverSyntaxError): Use it when shifting the error token to
10431 have an accurate range, equivalent to the one computed by both
10432 yacc.c and lalr1.cc.
10433 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10434 that column numbers start at column 0, as per GNU Coding
10435 Standards, the others tests, and the doc.
10436 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10437 Adjust to the above change (first column is 0).
10438 And adjust the location of the "<error>", now covering the whole
10439 line.
10440
93602feb 104412004-10-22 Akim Demaille <akim@epita.fr>
04098407 10442 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
10443
10444 Remove some arbitrary limits on goto numbers and relations.
10445 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10446 initial values, since they're never used.
10447 (set_goto_map): ngotos is now unsigned, so test for overflow
10448 by seeing whether it wraps around to zero.
10449 * src/lalr.h (goto_number): Now size_t, not short int.
10450 (GOTO_NUMBER_MAXIMUM): Remove.
10451 * src/relation.c (relation_print, traverse, relation_transpose):
10452 Check for END_NODE rather than looking at sign.
10453 * src/relation.h (END_NODE): New macro.
10454 (relation_node): Now size_t, not short int.
10455
dba08b04
PE
104562004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10457
10458 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10459 keyword, not an identifier. Problem reported by Baron Schwartz in
10460 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10461
df09ef2e
AD
104622004-10-11 Akim Demaille <akim@epita.fr>
10463
10464 * src/symtab.c (symbol_check_alias_consistency): Also check
10465 type names, destructors, and printers.
10466 Reported by Alexandre Duret-Lutz.
10467 Recode the handling of associativity and precedence in terms
10468 of symbol_precedence_set.
10469 Accept no redeclaration at all, not even equal to the previous
10470 value.
10471 (redeclaration): New.
10472 Use it to factor redeclaration complaints.
10473 (symbol_make_alias): Don't set the type of the alias, let
10474 symbol_check_alias_consistency do it as for other features.
10475 * src/symtab.h (symbol): Add new member prec_location, and
10476 type_location.
10477 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10478 * tests/input.at (Incompatible Aliases): New.
10479
146bc99d
PE
104802004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10481
10482 .cvsignore fixes to accommodate gnulib changes,
10483 and the practice of naming build directories "_build".
10484 * .cvsignore: Add "_*". Sort.
10485 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10486 * m4/.cvsignore: Add "*_gl.m4".
10487
e503aa60
AD
104882004-10-06 Akim Demaille <akim@epita.fr>
10489
10490 * src/parse-gram.y (add_param): Fix the truncation of trailing
10491 spaces.
10492
b4a20338
AD
104932004-10-05 Akim Demaille <akim@epita.fr>
10494
10495 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10496 whether the reducion was empty or not. This leaves room to
10497 improve the use of YYLLOC_DEFAULT in such a case.
10498 lalr1.cc is still experimental, so changing this is acceptable.
10499 And finally, there are probably not many users who changed the
10500 handling of locations in GLR, so changing is admissible too.
10501
10502 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10503 empty reduction, set @$ to an empty location ending the previously
10504 stacked symbol.
10505 Adjust uses to make sure the code is triggered on empty
10506 reductions.
10507 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10508 expected output: empty reductions have empty locations.
10509
f85a5e6f
AD
105102004-09-29 Akim Demaille <akim@epita.fr>
10511
10512 * data/lalr1.cc: Move towards a more standard C++ coding style
10513 for templates: Class < T > -> Class<T>.
10514
b203fc2c
AD
105152004-09-29 Akim Demaille <akim@epita.fr>
10516
10517 * data/lalr1.cc: Reinstall the former ctor, for sake of
10518 compatibility, but warn it will be removed.
10519 Move towards a more standard C++ coding style (i.e., type *var ->
10520 type* var).
10521
5b7e1e73
PE
105222004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10523
3fee967f
PE
10524 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10525 since it's less likely to work if NULs are involved in the future.
5b7e1e73 10526
0dcca5c2
AD
105272004-09-27 Akim Demaille <akim@epita.fr>
10528
10529 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10530
6dde1c82
AD
105312004-09-27 Akim Demaille <akim@epita.fr>
10532
10533 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 10534 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
10535 and argument names.
10536 (b4_cc_constructor_call): Likewise.
10537
b233d555
AD
105382004-09-24 Akim Demaille <akim@epita.fr>
10539
10540 * src/parse-gram.y (add_param): Strip the leading and trailing
10541 blanks from a formal argument declaration.
10542 (YY_LOCATION_PRINT): New.
10543
619404e3
AD
105442004-09-24 Akim Demaille <akim@epita.fr>
10545
10546 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10547 after the location.
10548
dd8d9022
AD
105492004-09-24 Akim Demaille <akim@epita.fr>
10550
10551 * doc/bison.texinfo (Table of Symbols): Sort.
10552
0092f063
AD
105532004-09-21 Akim Demaille <akim@epita.fr>
10554
10555 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10556 the useless parentheses.
10557 Suggested by Paul Eggert.
10558
451364ed
AD
105592004-09-20 Akim Demaille <akim@epita.fr>
10560
10561 Let the initial-action act on the look-ahead, and use it for the
10562 "initial push" (corresponding to an hypothetical beginning-of-file).
10563 And let lalr1.cc honor %initial-action.
10564
10565 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10566 example.
10567 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10568 (Parser::Parser): Remove the ctor that used to initialize it.
10569 (Parser::parse): Like in the other skeletons, issue the "starting
10570 parse" message before any action.
10571 Honor %initial-action.
10572 Initialize the stacks with the lookahead.
10573 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10574 look-ahead.
10575 Push them in the stacks.
10576 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10577
18d192f0
AD
105782004-09-20 Akim Demaille <akim@epita.fr>
10579
10580 * doc/bison.texinfo (Initial Action Decl): New.
10581
b8458aa5
AD
105822004-09-20 Akim Demaille <akim@epita.fr>
10583
10584 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10585 clearer criterion to define it.
10586 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10587 When reducing on an empty RHS, use the latest stacked location as
10588 location.
10589 yylloc is not always available.
10590 * data/glr.c: Likewise.
10591 Also, honor initial-actions.
10592
3fc16193
AD
105932004-09-20 Akim Demaille <akim@epita.fr>
10594
10595 * data/yacc.c (YY_LOCATION_PRINT): New.
10596 Define when we know YYLTYPE's structure, i.e., when the default
10597 YYLLOC_DEFAULT is used.
10598 * data/c.m4 (b4_yysymprint_generate): Use it.
10599 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10600 value of the result.
10601 (error_start_): Replace with...
10602 (error_range_): this location array.
10603 This allows to replace code relying on the implementation of
10604 locations by portable code.
10605 * data/yacc.c (yylerrsp): Replace with...
10606 (yyerror_range): this.
10607 Every time a token is popped, update yyerror_range[0], to have an
10608 accurate location for the error token.
10609 * data/glr.c (YY_LOCATION_PRINT): New.
10610 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10611 deference a pointer.
10612 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10613 report the location in %printers.
10614
10615 * src/scan-skel.l: Instead of abort, report error messages to ease
10616 understanding skeleton scanning failures.
10617
ecfe33e7
AD
106182004-09-16 Akim Demaille <akim@epita.fr>
10619
10620 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10621 (iterator, const_iterator): these, to be more in the C++ spirit.
10622 Also, return reverse iterators so that when displaying the stack
10623 we display its bottom first.
10624 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10625 from yacc.c.
10626 We should probably use vector here though.
10627
1576d44d
AD
106282004-09-16 Akim Demaille <akim@epita.fr>
10629
10630 Have more complete shift traces.
10631
10632 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10633 to report Shifts instead of ad hoc YYDPRINTF invocations,
10634 including for the error token.
10635 * data/lalr1.cc (symprint_): Output the location.
10636 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10637 output the location within the %printer.
10638 Activate GLR tests, at least to make sure they compile properly.
10639 They still don't pass though.
10640 * tests/calc.at: Adjust expect verbose output, since now "Entering
10641 state..." is on a different line than the "Shifting" message.
10642
9c66f418
AD
106432004-09-08 Akim Demaille <akim@epita.fr>
10644
10645 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10646 Bison directive from the Bison file to the invocation of this
10647 macro, so that these directives are passed to
10648 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10649 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10650 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10651 the extra Bison directives instead of the whole series.
10652 Change the grammar so that there are recoverable errors, and
10653 unrecoverable errors. Now we can have the parser give up before
10654 consuming the whole input. As a result we now can observe that
10655 the lookahead is freed when needed.
10656 Change the parser source to parse argv[1] instead of a hard coded
10657 string.
10658 Simplify yylex, and give a value and location to EOF.
10659 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10660 passed directives already coded in the file.
10661 Add some tests to check the location of "error".
10662 For some tests, the C++ parser is correct, and not yacc.c.
10663 For other tests, they provide different, but unsatisfying, values,
10664 so keep the C++ value so that at least one parser is "correct"
10665 according to the test suite.
10666 (Actions after errors): Remove, this is subsumed by the
10667 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10668
52d5733f
AD
106692004-09-06 Akim Demaille <akim@epita.fr>
10670
10671 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 10672 (Parser::pop): New.
52d5733f
AD
10673 Use it.
10674
a0e68930
AD
106752004-09-06 Akim Demaille <akim@epita.fr>
10676
10677 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10678 argument, an informative message.
10679 Call YY_SYMBOL_PRINT.
10680 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10681 * data/lalr1.cc (destruct_): Likewise.
10682 In addition, no longer depend on b4_yysymprint_generate and
10683 b4_yydestruct_generate to generate these functions, do it "by
10684 hand".
10685
e757bb10
AD
106862004-09-03 Akim Demaille <akim@epita.fr>
10687
10688 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10689 invoked, yydestruct the lookahead.
10690 * tests/calc.at (Calculator $1): Update the expected lengths of
10691 traces: there is an added line for the discarded lookahead.
10692 * doc/bison.texinfo (Destructor Decl): Some rewording.
10693 Define "discarded" symbols.
10694
0fe1f06d
AD
106952004-09-02 Akim Demaille <akim@epita.fr>
10696
10697 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10698
284acc8b
AD
106992004-09-02 Akim Demaille <akim@epita.fr>
10700
10701 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10702 (YYDSYMPRINTF): Rename as...
10703 (YY_SYMBOL_PRINT): this.
10704 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10705 two.
10706 Use it instead of direct symprint_ calls.
10707 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10708 one.
10709
a5eb1ed2
AD
107102004-09-02 Akim Demaille <akim@epita.fr>
10711
b7c72fe1
AD
10712 * data/lalr1.cc (b4_yysymprint_generate): New.
10713 (symprint_): New member function, defined when YYDEBUG.
10714 Use it consistently instead of token/nterm debugging output by
10715 hand.
a5eb1ed2
AD
10716 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10717 %printer calls to use cdebug_ when using lalr1.cc.
10718
417141dd
AD
107192004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10720
10721 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10722 with #ifdef YYDEBUG.
10723
2fa09258
AD
107242004-08-26 Akim Demaille <akim@epita.fr>
10725
10726 * doc/bison.texinfo (Implementing Loops): Rename as...
10727 (Implementing Gotos/Loops): this.
10728
9378b508
PE
107292004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10730
10731 Adjust to latest gnulib.
10732 * bootstrap (gnulib_modules): Add xalloc-die.
10733 Set LC_ALL=C so that file names sort consistently.
10734 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10735 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10736 uintmax_t.m4, ulonglong.m4.
10737 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10738 po.m4 since we are now using _gl.m4 instead.
10739
87a8ad5c
PE
107402004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10741
10742 * src/scan-action.l: Remove. Scanning of semantic actions is
10743 handled in scan-gram.l.
10744
dca81a78
PE
107452004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10746
10747 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10748
10749 * src/location.h (struct): The file member is a uniqstr.
10750 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10751
c9cbf7c5
PE
107522004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10753
10754 Fix bug with non-%union parsers that have printers or destructors,
10755 which led to a Bison core dump. Reported by Peter Fales in
10756 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 10757
c9cbf7c5
PE
10758 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10759 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10760 not to our own type.
10761 * src/output.c (symbol_destructors_output, symbol_printers_output):
10762 Don't assume %union.
10763 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10764 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10765 UNION-FLAG. All callers changed.
10766 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10767 Use type char, not unsigned int, when declaring an array of char;
10768 this lets us remove a cast.
10769 (Printers and Destructors): Add non-%union test cases.
10770
fa7e68c3
PE
107712004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10772
10773 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10774 GLR writeups. E.g., avoid frenchspacing and the future tense,
10775 change "lookahead" to "look-ahead", and change "wrt" to "with
10776 respect to".
2fa09258 10777
fa7e68c3
PE
107782004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10779
10780 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10781 New sections, split off from the GLR Parsers section. Put the new
10782 Simple GLR Parser near the start of the GLR section, for clarity.
10783 Rewrite connective text.
10784
99a9344e
PE
107852004-06-21 Frank Heckenbach <frank@g-n-u.de>
10786
10787 * doc/bison.texinfo (Simple GLR Parsers): New section.
10788
8dd162d3
PE
107892004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10790
10791 * NEWS, TODO, doc/bison.texinfo:
10792 Use "look-ahead" instead of "lookahead", to be consistent.
10793 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10794 while we're fixing "look-ahead".
10795 * src/conflicts.c (shift_set): Renamed from shiftset.
10796 (look_ahead_set): Renamed from lookaheadset.
10797 * src/print.c: Likewise.
10798 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10799 name for "lookahead".
10800 (report_types, usage): Likewise.
10801 * src/getargs.h (report_look_ahead_tokens): Renamed from
10802 report_lookaheads.
10803 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10804 compute_lookaheads.
10805 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10806 (look_ahead_tokens_print): Renamed from lookaheads_print.
10807 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10808 state_rule_lookaheads_print.
10809 * src/state.h: Likewise.
10810 (reductions.look_ahead_tokens): Renamed from lookaheads.
10811 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10812 AT_DATA_LOOKAHEADS_GRAMMAR.
10813
57a90331
PE
108142004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10815
10816 * README: Update location of patched M4 distribution.
10817
8ed3234a
PE
108182004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10819
10820 Don't assume the C++ compiler takes the same arguments as the C compiler
10821 (trivial change).
10822 * configure.ac (O0CXXFLAGS): New var.
10823 * tests/atlocal.in (CXXFLAGS): Use it.
10824
07971983
PE
108252004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10826
10827 Fix some "make check" problems with C++ reported by
10828 Albert Chin-A-Young for Tru64 C++ in this thread:
10829 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10830
10831 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10832 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10833 Output to a .cc file for C++, not to a .c file.
10834 * tests/calc.at (AT_CHECK_CALC): Likewise.
10835 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10836 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10837
29058652
PE
108382004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10839
10840 * tests/calc.at, tests/actions.at: Workaround for SGI
10841 C++ compiler. (trivial change)
10842
62cb8a99
PE
108432004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10844
fd418816
PE
10845 Spent a few hours checking out which prerequisite versions the
10846 current sources actually require. I went all the way back to
10847 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10848 a seemingly endless set of combinations of versions more recent
10849 than that. The bottom line is that the current sources require
10850 fairly recent versions of the build tools, and it'll be some work
10851 to change this.
10852 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10853 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10854 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10855 Add comments explaining why those particular versions are
10856 currently needed.
2fa09258 10857
62cb8a99
PE
10858 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10859 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 10860 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
10861
10862 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10863 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10864
caa52c10
PE
108652004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10866
10867 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10868 0.11.5. Suggested by Bruno Haible.
10869 * bootstrap: Remove gettext version checking.
10870
10871 * doc/bison.texinfo (Decl Summary): Also mention that %union
10872 can depend on prerequisite types. Problem reported by Tim
10873 Van Holder.
10874
4bfd5e4e
PE
108752004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10876
2cef3017
PE
10877 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10878 * README-alpha: Don't tell people not to package this.
10879
b9c85d5c
PE
10880 * bootstrap: Don't assume $(...) works; use `...` instead.
10881 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10882 gettext better.
10883
4bfd5e4e
PE
10884 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10885 put into the -d output file, and mention what to do if YYSTYPE is
10886 defined as a macro.
10887
6a36ff94
PE
108882004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10889
6712933e
PE
10890 Undo change made earlier today: it caused autopoint to not bring
10891 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10892 autopoint's.
10893
10894 * bootstrap: Check that gettext version matches what's in
10895 configure.ac. Warn users to ignore robots.txt ERROR 404.
10896 * bootstrap: Undo today's earlier change (logged below).
10897 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 10898
6a36ff94
PE
10899 The gettext version checking is causing more trouble than it's
10900 curing; remove it. Problem reported by Paul Hilfinger.
10901
10902 * bootstrap: Issue a warning that one can expect a message
10903 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10904 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10905
209ea708
PE
109062004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10907
10908 Ensure that the C++ compiler used for testing actually works on a
10909 simple test program; if not, skip the C++-related tests. Problem
10910 reported by Vin Shelton in:
161a71f3 10911 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
10912
10913 * m4/cxx.m4: New file.
10914 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10915 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10916 * tests/local.at (AT_COMPILE_CXX): Use it.
10917
41ca2549
PE
109182004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10919
383e69dc
PE
10920 * data/glr.c (yylloc): Output this macro even if locations are not
10921 being generated, as the GLR parser needs it even in that case.
10922 Problem reported by Troy A. Johnson
10923 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10924
41ca2549
PE
10925 * configure.ac (AC_INIT): Update to 1.875e.
10926
e476c87d
PE
109272004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10928
10929 * NEWS: Version 1.875d.
10930 * configure.ac (AC_INIT): Likewise.
10931 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10932
10933 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10934 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10935 lalr1.cc runs afoul of the first, and the last two are no longer
10936 supported by GCC 3.4.0.
10937 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10938 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10939
233a88ad
PE
109402004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10941
10942 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10943 unsigned int, for compatibility with latest gnulib hash module.
10944 * src/state.c (state_hash, state_hasher): Likewise.
10945 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10946 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 10947
12ffdd28
PE
109482004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10949
10950 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10951
10952 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10953 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10954 character and string literals.
10955 (unexpected_end): New function.
10956 (unexpected_eof): Use it.
10957 (unexpected_newline): New function.
10958 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10959 actions.
e476c87d 10960
12ffdd28
PE
10961 * NEWS: Document %expect-rr.
10962
10963 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10964 Fix typo by replacing $1 with $option.
10965 Remove more 'intl'-related files.
9668e2be 10966 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
10967
10968 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10969 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10970 strtoul.c.
10971 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10972 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10973 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10974 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10975 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10976 * src/.cvsignore: Add *.output.
10977
10978 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10979 gets copied to the output file.
e476c87d 10980
1f65350a
PE
109812004-04-28 Paul Eggert <eggert@twinsun.com>
10982
10983 Get files from the gnulib and po repositories, instead of relying
10984 on them being in our CVS. Upgrade to latest versions of gnulib
10985 and Automake.
10986
10987 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10988 * bootstrap: Bootstrap from gnulib and po repositories.
10989 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10990 * README-cvs: Document these changes. Remove version numbers from
10991 mentions of build tools, since they change so often. Mention Flex.
10992
10993 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10994 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
10995 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10996 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 10997 does this for us.
12ffdd28
PE
10998 (AC_ISC_POSIX): Remove; we no longer support this
10999 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
11000 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11001 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11002 Do not check for C89 headers, except for locale.h which is used
11003 by the Yacc library and must port to K&R hosts.
11004 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11005 Do not check for C89 functions, except for setlocale which is
11006 used by the Yacc library.
11007 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11008 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11009 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11010 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11011 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11012 AM_GNU_GETTEXT): Remove; now done by:
11013 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11014 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11015 for us.
11016
11017 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11018 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11019 Define to empty, as gnulib.mk will do the rest for us.
11020 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11021 for us.
11022 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11023 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11024
11025 * src/files.c: Include gnulib's xstrndup.h.
11026
11027 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11028 (REALLOC): Use xnrealloc, for likewise.
11029 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11030 (strnlen, memrchr): Remove decls; functions no longer used.
11031 Include <stpcpy.h>.
11032
11033 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11034 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11035 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11036 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11037 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11038 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11039 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11040 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11041 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11042 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11043 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11044 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11045 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11046 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11047 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11048 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11049 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11050 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11051 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11052 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11053 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11054 Remove, as these files are now generated automatically
11055 by bootstrap or automake.
11056
11057 * po/ChangeLog: Remove: all but one entry was a duplicate
11058 of this file, and I moved that 2000-11-02 entry here.
11059
11060 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11061 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11062 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11063 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11064 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11065 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11066 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11067 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11068 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11069 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11070 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11071 xstrndup.h.
11072 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11073 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11074 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11075 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11076 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11077 * src/.cvsignore: Remove *_.c.
11078
11079
11080 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11081 support it. (The latest stable gzip doesn't.)
11082
110832004-04-27 Paul Eggert <eggert@twinsun.com>
11084
11085 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11086 case, as stos_ is now used by destructors due to the 2004-02-09
11087 change.
11088
11089 Remove more K&R C support.
11090 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11091 * lib/subpipe.c (errno): Remove decl.
11092 Include <stdlib.h> unconditionally.
11093 (EXIT_FAILURE): Remove macro.
11094 * src/complain.c (vfprintf, strerror): Remove.
11095 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11096 unconditionally.
11097 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11098 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11099 (strchr, strspn, memchr): Remove decls.
11100 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11101 unconditionally. Do not declare perror.
11102 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11103 unconditionally.
11104
11105 * src/complain.c (_): Remove useless defn, as system.h defines this.
11106
11107 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11108 with latest obstack.h.
11109 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11110 to procedure types, as obstack.h now does that for us.
11111 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11112
11113 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11114 so that this include file can stand alone.
11115 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11116 does this now. Include subpipe.h first after config.h, to
11117 test whether it can stand alone.
11118
11119 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11120 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11121 unused declaration.
11122
11123 * tests/synclines.at (%union synch line): Put a dummy member in
11124 the union, because empty unions aren't allowed in C. Caught
11125 by GCC 3.4.0.
11126
4f16766c
PE
111272004-04-13 Jim Meyering <jim@meyering.net>
11128
11129 * src/conflicts.c (conflicts_print): Correct format string typo:
11130 use `%%' to produce literal `%'. (trivial change)
11131
779e7ceb
PE
111322004-03-30 Paul Eggert <eggert@twinsun.com>
11133
11134 * src/getargs.c (version): Update copyright year to 2004.
11135
11136 * data/c.m4 (b4_int_type): Use 'short int' rather than
11137 'short', and similarly for 'long', 'unsigned', etc.
11138 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11139 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11140 yy_yypstack, yydumpstack): Likewise.
11141 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11142 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11143 Likewise.
11144 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11145 yy_stack_print, yyparse): Likewise.
11146 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11147 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11148 * lib/bitset.c (bitset_print): Likewise.
11149 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11150 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11151 * lib/bitsetv.c (bitsetv_dump): Likewise.
11152 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11153 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11154 Likewise.
11155 * src/LR0.c (allocate_itemsets): Likewise.
11156 * src/gram.h (rule_number, rule): Likewise.
11157 * src/lalr.h (goto_number): Likewise.
11158 * src/nullable.c (nullable_compute): Likewise.
11159 * src/output.c (prepare_rules): Likewise.
11160 * src/relation.c (relation_print, relation_digraph): Likewise.
11161 * src/relation.h (relation_node): Likewise.
11162 * src/state.h (state_number, transitions, errs, reductions,
11163 struct state): Likewise.
11164 * src/symtab.h (symbol_number, struct symbol): Likewise.
11165 * src/tables.c (vector_number, tally, action_number,
11166 default_goto, goto_actions): Likewise.
11167 * tests/existing.at (GNU Cim Grammar): Likewise.
11168 * tests/regression.at (Web2c Actions): Likewise.
11169
11170 * src/output.c (muscle_insert_short_int_table): Renamed from
11171 muscle_insert_short_table. All uses changed.
11172
d6328241
PH
111732004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11174
11175 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11176 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11177 Add %expect-rr rule.
4f16766c 11178
d6328241
PH
11179 * src/scan-gram.l: Recognize %expect-rr.
11180
4f16766c 11181 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 11182 expected_conflicts.
4f16766c 11183 (expected_rr_conflicts): Declare.
d6328241
PH
11184
11185 * src/conflicts.c (expected_sr_conflicts): Rename from
11186 expected_conflicts.
11187 (expected_rr_conflicts): Define.
11188 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11189 for GLR parsers.
11190 Use expected_sr_conflicts in place of expected_conflicts.
11191 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 11192
d6328241 11193 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 11194
1452af69
PE
111952004-03-08 Paul Eggert <eggert@gnu.org>
11196
11197 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 11198 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
11199
11200 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11201 in lalr1.cc.
11202 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11203 * src/scan-gram.l (scan_integer): New function.
11204 ({int}): Use it.
11205 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11206 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11207 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11208 Say "long int", not "long", for uniformity with GNU style.
11209
006d217d
PE
112102004-02-25 Paul Eggert <eggert@twinsun.com>
11211
11212 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11213 compilers. This fixes a problem with Intel's C++ compiler being
11214 chatty, reported by Guido Trentalancia in
161a71f3 11215 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 11216
c2729758
ADL
112172004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11218
11219 Support %destructor and merge error locations in lalr1.cc.
11220
11221 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11222 (Parser::stos_): Define unconditionally.
11223 (Parser::destruct_): New method. Generate its body with
11224 b4_yydestruct_generate.
11225 (Parser::error_start_): New attribute.
11226 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11227 token which are discarded.
11228 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11229 error_start_ when erroneous token are discarded.
11230 (Parser::parse) <yyerrlab1>: Compute the location of the error
11231 token so that it covers all the discarded tokens.
11232 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11233 it can be called with `%skeleton "lalr1.cc"', and do that.
11234
dd0e0635
PE
112352004-02-02 Paul Eggert <eggert@twinsun.com>
11236
11237 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11238 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11239 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11240 There's no need to mention top_builddir since Automake does that
11241 for us.
11242 (INCLUDES): Remove, as Automake says it's obsolescent.
11243 Contents migrated into AM_CPPFLAGS as described above.
11244 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11245
112462004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11247
11248 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11249 (yyreportSyntaxError): Handle case where lookahead token is
11250 YYEMPTY.
11251
be16239b
PH
112522004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11253
11254 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11255 resulting parsers are compilable with C++.
11256
5fa90832
PE
112572003-12-23 Paul Eggert <eggert@twinsun.com>
11258
11259 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11260 * src/output.c (output_skeleton): Rename local var.
11261 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11262 Bison tokens, as this runs afoul of the 2003-10-07 change that
11263 disallowed NUL bytes in character constants or string literals.
11264
11265 * tests/local.at: Require Autoconf 2.59's Autotest.
11266 * tests/testsuite.at: Don't include local.at, since we now assume
11267 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11268 including it.
11269 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11270 multiple inclusion warnings.
dd0e0635 11271
b165c324
AD
112722003-12-02 Akim Demaille <akim@epita.fr>
11273
11274 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11275 conditions.
11276 From Bruno Haible.
11277
26e06a21
ADL
112782003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11279
11280 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11281
92ac3705
PE
112822003-10-07 Paul Eggert <eggert@twinsun.com>
11283
6a5ecb38
PE
11284 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11285 if testsuite doesn't exist.
11286
92ac3705
PE
11287 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11288 literals, unfortunately.
11289 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11290 Complain about NUL bytes in character constants or string literals.
11291
91d2c560
PE
112922003-10-05 Paul Eggert <eggert@twinsun.com>
11293
11294 * NEWS: Don't document %no-default-prec, as it's still
11295 too experimental.
11296 * doc/bison.texinfo: Document %no-default-prec only if
11297 the defaultprec flag is set. Normally it's not.
11298
0cc3da3a
PE
112992003-10-04 Paul Eggert <eggert@twinsun.com>
11300
11301 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11302 non-modifiable lvalue, instead of a modifiable one.
11303 * doc/bison.texinfo (Actions): Document that $$ can
11304 be assigned to. Do not claim that $$ and $N are
11305 array element references: user code should not rely on this.
11306
22fccf95
PE
113072003-10-01 Paul Eggert <eggert@twinsun.com>
11308
11309 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11310 (grammar_declaration): Use it.
11311 * src/scan-gram.l: New token %no-default-prec.
11312 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11313 * NEWS, doc/bison.texinfo: Document the above.
11314
fc8f2965
AD
113152003-10-01 Akim Demaille <akim@epita.fr>
11316
11317 VCG no longer supports long_straight_phase.
11318
11319 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11320 * src/print_graph.c (print_graph): Adjust.
11321
39a06c25
PE
113222003-09-30 Frank Heckenbach <frank@g-n-u.de>
11323 and Paul Eggert <eggert@twinsun.com>
11324
11325 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11326 Table of Symbols): Document %default-prec.
11327 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11328 (grammar_declaration): Set default_prec on %default-prec.
11329 * src/scan-gram.l (%default-prec): New token.
11330 * src/reader.h (default_prec): New flag.
11331 * src/reader.c: Likewise.
11332 (packgram): Handle it.
11333 * tests/conflicts.at (%default-prec without %prec,
11334 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 11335
39a06c25
PE
113362003-09-30 Paul Eggert <eggert@twinsun.com>
11337
11338 * tests/testsuite.at: Include local.at, not input.at, fixing
11339 a typo in the 2003-08-25 patch.
11340
62b6aef9
AD
113412003-08-27 Akim Demaille <akim@epita.fr>
11342
11343 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11344 GCC warnings.
11345
89e1cc61
AD
113462003-08-26 Akim Demaille <akim@epita.fr>
11347
11348 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11349 "<\#" to avoid magic from Gnus when posting parts of this script.
11350
a08460b0
AD
113512003-08-26 Akim Demaille <akim@epita.fr>
11352
11353 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11354 (Parser::parse): here.
11355 Adjust: nerrs and errstatus is now replaced by...
11356 (Parser::nerrs_, Parser::errstatus_): New.
11357
603f1cfd
AD
113582003-08-25 Akim Demaille <akim@epita.fr>
11359
11360 * config/announce-gen, Makefile.cfg: New.
11361 * Makefile.am: Adjust.
11362 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11363 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11364
cd3684cf
AD
113652003-08-25 Akim Demaille <akim@epita.fr>
11366
11367 When reducing initial empty rules, Bison parser read an initial
11368 location that is not defined. This results in garbage, and that
11369 affects Bison's own parser. Therefore we need (i) to extend Bison
11370 to support a means to initialize this location, and (ii) to use
11371 this CVS Bison to fix CVS Bison's parser.
11372
11373 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11374 with...
11375 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11376 * src/parse-gram.y: Adjust.
11377 (%initial-action): New.
11378 (%error-verbose): Since we require CVS Bison, there is no reason
11379 not to use it.
11380 * src/scan-gram.l: Adjust.
11381 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11382 * data/yacc.c (yyparse): Use b4_initial_action.
11383
4e03e201
AD
113842003-08-25 Akim Demaille <akim@epita.fr>
11385
11386 * doc/bison.texinfo: Don't promote stdout for error messages.
11387
8c182d05
AD
113882003-08-25 Akim Demaille <akim@epita.fr>
11389
11390 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11391 From Alexandre Duret-Lutz.
11392
6a60c4cf
PE
113932003-08-25 Akim Demaille <akim@epita.fr>
11394
11395 Version 1.875c.
11396
25f66e1a
AD
113972003-08-25 Akim Demaille <akim@epita.fr>
11398
11399 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11400 Use them.
11401
5348bfbe
AD
114022003-08-25 Akim Demaille <akim@epita.fr>
11403
11404 * data/lalr1.cc (Parser::reduce_print_): New.
11405 Use it.
11406
47301314
AD
114072003-08-25 Akim Demaille <akim@epita.fr>
11408
11409 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11410 error recovery loops. This patch is based on
161a71f3 11411 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
11412 Also, augment the similarity between lalr1.cc and yacc.c.
11413 Note: the locations of error recovery rules are not correct yet.
11414
11415 * data/lalr1.cc: Comment changes to augment the similarity between
11416 lalr1.cc and yacc.c.
11417 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11418 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11419 yyerrlab), when hitting EOF, pop the whole stack here instead of
11420 merely falling thru the default error handling mechanism.
11421 (yyerrorlab): New label, with the old contents of YYERROR,
11422 plus the following change: pop the stack of rhs corresponding
11423 to the production that invoked YYERROR. That is how Yacc
11424 behaves (required by POSIX).
11425 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11426 fail.
11427
1f7a61ff
AD
114282003-08-25 Akim Demaille <akim@epita.fr>
11429
11430 Tune local.at so that people can "autom4te -l autotest calc.at -o
11431 calc" for instance, to extract a sub test suite.
11432
11433 * tests/testsuite.at: Move the initialization, Autotest version
11434 requirement, and AT_TESTED invocation into...
11435 * tests/local.at: here.
11436 * tests/testsuite.at: Include it for compatibility with Autoconf
11437 2.57.
11438 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11439 be ignore.
11440
327b5b56
PE
114412003-08-04 Paul Eggert <eggert@twinsun.com>
11442
11443 Rework code slightly to avoid gcc -Wtraditional warnings.
11444 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11445 The returned value is now stored in *YY0. All callers changed.
11446 * src/output.c (merge_output): Adjust to the above change.
11447
0051e3ed
PE
114482003-07-26 Paul Eggert <eggert@twinsun.com>
11449
11450 * data/glr.c (YYASSERT): New macro.
11451 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11452 yyresolveStates, yyprocessOneStack):
11453 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11454 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 11455
137437c6
PE
114562003-07-25 Paul Eggert <eggert@twinsun.com>
11457
5b620e06
PE
11458 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11459 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 11460 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
11461 by Frank Heckenbach, though I have omitted the structure-initialization
11462 part of his glr-knr.diff patch since I recall that the Portable
11463 C Compiler didn't require that change.
11464
137437c6
PE
11465 Let the user specify how to allocate and free memory.
11466 Derived from a suggestion by Frank Heckenbach in
161a71f3 11467 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
11468 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11469 All uses of free, malloc, realloc changed to use these macros,
11470 and unnecessary casts removed.
11471 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11472
ddb85ca5
PE
114732003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11474
11475 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11476 use s.empty() rather than s == "" to test for empty string; see
161a71f3 11477 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
11478 (trivial change)
11479
39910e09
AD
114802003-06-25 Akim Demaille <akim@epita.fr>
11481
11482 * config/depcomp, config/install-sh: Update from masters.
11483
0ae99356
PE
114842003-06-20 Paul Eggert <eggert@twinsun.com>
11485
11486 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11487 and return properly parenthesized result.
11488 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11489 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11490 Remove unnecessary parentheses from uses.
11491 * doc/bison.texinfo (Location Default Action): Describe the
11492 conventions for parentheses.
11493
cd05d13c
PE
114942003-06-19 Paul Eggert <eggert@twinsun.com>
11495
81fd08ca
PE
11496 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11497 yyreportTree): Do not assume that size_t is the same width as int,
11498 when printing sizes. Print sizes using an unsigned format.
11499 Problem reported by Frank Heckenbach in
161a71f3 11500 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 11501
cd05d13c
PE
11502 Port to Forte Developer 7 C compiler.
11503 * data/glr.c (struct YYLTYPE): If locations are not being used,
11504 declare a single dummy member, as empty structs do not conform
11505 to the C standard.
11506 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11507 the Forte Developer 7 C compiler complains that end-of-loop
11508 code is not reached.
11509
4dcf140b
PE
115102003-06-17 Paul Eggert <eggert@twinsun.com>
11511
11512 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11513 avoid warnings from picky compilers about redefinition of PARAMS.
11514
8dd76bee
PE
115152003-06-17 Paul Eggert <eggert@twinsun.com>
11516
11517 Version 1.875b.
11518
11519 * NEWS: Document 1.875b.
11520
11521 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11522 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11523 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11524 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11525 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11526 per recent gettext manual's suggestion.
11527 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11528 Use prototypes, not old-style definitions.
11529 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11530 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11531 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11532 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11533 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11534 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11535 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11536 vbitset_or_and_cmp, vbitset_copy): Likewise.
11537
11538 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11539 Do not include <stdlib.h>.
11540 (PARAMS): Define unconditionally for C89.
11541 (ATTRIBUTE_NORETURN): Remove.
11542 (ATTRIBUTE_UNUSED): Define unconditionally.
11543
11544 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 11545 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
11546 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11547 * lib/vbitset.c, lib/vbitset.h: New files.
11548 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11549 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11550 from libbitset.
11551
11552 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11553 `How Can I Reset @code{yyparse}', since texinfo does not allow
11554 arbitrary @ in node names.
11555
11556 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11557 shouldn't be needed according to the gettext 0.12.1 documentation
11558 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 11559 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 11560 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 11561 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 11562
8dd76bee
PE
11563 * lib/.cvsignore: Add stdbool.h.
11564 * m4/.cvsignore: Add nls.m4, po.m4.
11565
11566 Upgrade to CVS gnulib.
11567 * stdbool_.h: File renamed from stdbool.h.in.
11568 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11569 AC_HEADER_STDBOOL.
11570 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11571 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11572 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11573 (MOSTLYCLEANFILES): New var.
11574 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11575 (stdbool.h): New rule.
11576 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11577 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11578 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11579 m4/quote.m4: Upgrade to today's gnulib.
11580
11581 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11582 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11583 the tests right now.
11584 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11585 yyerror are declared before use; C99 requires this.
11586
25005f6a
PH
115872003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11588
11589 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11590 first.
11591 (yyrecoverSyntaxError): Correct the logic for setting and testing
11592 yyerrState.
11593 Correct comment on handling EOF.
11594 Allow states with only a default reduction, rather than failing
8dd76bee 11595 (I can't quite reconstruct why these were not allowed before).
25005f6a 11596
137437c6 11597 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 11598 buffer overruns, corrupting state.
8dd76bee
PE
11599
11600 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
11601 definition.
11602 * src/reader.h (max_left_semantic_context): New variable declaration.
11603 * src/scan-gram.l (max_left_semantic_context): Define.
11604 (handle_action_dollar): Update max_left_semantic_context.
11605 * data/glr.c (YYMAXLEFT): New definition.
11606 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11607 (yyresolveAction): Ditto.
11608
11609 Fixes to problems with location handling in GLR parsers reported by
11610 Frank Heckenbach (2003/06/05).
11611
11612 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11613 (YYRHSLOC): Add parentheses, and define only if locations used.
11614 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11615 locations not used.
11616 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11617 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 11618
25005f6a
PH
11619 * tests/cxx-type.at: Exercise location information; update tests
11620 to differentiate output with and without locations.
8dd76bee 11621 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
11622 because default YYLTYPE not yet defined.
11623 Change semantic actions to compute strings, rather than printing
11624 them directly (to test proper passing of semantics values). Change
11625 output to prefix notation and update test data and expected results.
11626 (yylex): Track locations.
11627 (stmtMerge): Return value rather than printing, and include arguments
11628 in value.
8dd76bee 11629
711f40b7
PE
116302003-06-03 Paul Eggert <eggert@twinsun.com>
11631
11632 Avoid warnings generated by GCC 2.95.4 when Bison is
11633 configured with --enable-gcc-warnings.
11634 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11635 yy::]b4_parser_class_name[::translate_,
11636 yy::Stack::operator[] (unsigned),
11637 yy::Stack::operator[] (unsigned) const,
11638 yy::Slice::operator[] (unsigned),
11639 yy::Slice::operator[] (unsigned) const):
11640 Rename local vars to avoid warnings.
11641 * tests/glr-regression.at (Improper handling of embedded actions
11642 and $-N in GLR parsers): Remove unused local variable from yylex.
11643 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11644 (void) as arg when not pure, since we now assume C89 when building
11645 Bison. Pacify GCC by using parameter.
11646
ac695f7d
PE
116472003-06-02 Paul Eggert <eggert@twinsun.com>
11648
11649 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11650 yy::Location::lines, yy::Location::columns): Rename arguments
11651 to avoid shadowing; this removes a warning generated by GCC 3.3.
11652
26ec81e0
PE
116532003-06-01 Paul Eggert <eggert@twinsun.com>
11654
11655 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11656 to g++, as GCC 3.3 complains if you do it.
11657 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11658 everything that WARNING_CFLAGS has, except omit warnings
11659 not suitable for C++.
11660 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11661 * tests/atlocal.in (CXXFLAGS): New var.
11662 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11663
11664 Fix a GLR parser bug I reported in February; see
161a71f3 11665 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
11666 The problem was that GLR parsers did not conform to the C standard,
11667 because actions like { $1 = $2 + $3; } expanded to expressions
11668 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11669 to a local variable. The C standard says that expressions
11670 like (var = f ()) + (var = f ()) have undefined behavior.
11671 Another problem was that GCC sometimes issues warnings that
11672 yyfill and its parameters are unused.
11673
11674 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11675 as possibly unused.
11676 (yyfill): New function.
11677 (YYFILL): Use it.
11678 (yyuserAction): Change type of yynormal to bool, so that it matches
11679 the new yyfill signature. Mark it as possibly unused.
11680
11681
11682 Follow up on a bug I reported in February, where a Bison-generated
11683 parser can loop. Provide a test case and a fix for yacc.c. I
11684 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11685 The original bug report is in:
161a71f3 11686 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
11687
11688 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11689 macro's size was becoming unwieldy.
11690 (yyerrlab): Do not discard an empty lookahead symbol, as this
11691 might destroy garbage.
11692 (yyerrorlab): New label, with the old contents of YYERROR,
11693 plus the following change: pop the stack of rhs corresponding
11694 to the production that invoked YYERROR. That is how Yacc
11695 behaves, and POSIX requires this behavior.
11696 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11697 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11698 Define 'alarm' to do nothing if unistd.h is not available.
11699 Add a new rule "exp: '-' error;" to test the above change to
11700 data/yacc.c. Use 'alarm' to abort any test taking longer than
11701 10 seconds, as it's probably looping.
11702 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11703 Also, the new yacc.c generates two fewer diagnostics for an
11704 existing test.
11705
d0829076
PE
117062003-05-24 Paul Eggert <eggert@twinsun.com>
11707
c6ae27df
PE
11708 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11709 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11710 This fixes a problem reported by John Bowman when the Compaq/HP
11711 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11712 -ansi -Wall -gall).
11713 * data/yacc.c (union yyalloc): Likewise.
11714 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 11715
d0829076
PE
11716 Switch from 'int' to 'bool' where that makes sense.
11717
11718 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11719 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11720 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11721 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11722 Return or accept bool, not int. All callers changed.
11723 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11724 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11725 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11726 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11727 bitset_or_and_cmp_): Likewise.
11728 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11729 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11730 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11731 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11732 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11733 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11734 bitset_stats_or_and_cmp): Likewise.
11735 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11736 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11737 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11738 ebitset_xor_cmp): Likewise.
11739 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11740 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11741 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11742 lbitset_xor_cmp): Likewise.
11743 * lib/bbitset.h: Include <stdbool.h>.
11744 (struct bitset_vtable): The following members now return bool, not
11745 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11746 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11747 or_and_cmp).
11748 * src/conflicts.c (count_rr_conflicts): Likewise.
11749 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11750 All uses changed.
11751 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11752 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11753 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11754 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11755 graph_flag): Likewise.
11756 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11757 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11758 graph_flag): Likewise.
11759 * src/output.c (error_verbose): Likewise.
11760 * src/output.h (error_verbose): Likewise.
11761 * src/reader.c (start_flag, typed): Likewise.
11762 * src/reader.h (typed): Likewise.
11763 * src/getargs.c (LOCATIONS_OPTION): New constant.
11764 (long_options, getargs): Use it.
11765 * src/lalr.c (build_relations): Use bool, not int.
11766 * src/nullable.c (nullable_compute): Likewise.
11767 * src/print.c (print_reductions): Likewise.
11768 * src/tables.c (action_row, pack_vector): Likewise.
11769 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11770 * src/output.c (prepare): Use it.
11771 * src/output.c (token_definitions_output,
11772 symbol_destructors_output, symbol_destructors_output): Use string,
11773 not boolean integer, to keep track of whether to output separator.
11774 * src/print_graph.c (print_core): Likewise.
11775 * src/state.c (state_rule_lookaheads_print): Likewise.
11776
11777 * config/install-sh: Sync from automake 1.7.5.
11778
6b2584b7
PE
117792003-05-14 Paul Eggert <eggert@twinsun.com>
11780
11781 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11782 semicolon after a grammar declaration, in the interest of possible
11783 future changes to the Bison input language.
11784 Do not allow a stray semicolon at the start of the grammar.
11785 (rhses.1): Allow one or more semicolons after any rule, including
11786 just before "|" as required by POSIX.
11787 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11788 grammar.
11789
caf37a36
ADL
117902003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11791
11792 %parse-param support for lalr1.cc.
11793
11794 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11795 b4_cc_constructor_calls, b4_cc_constructor_call,
11796 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11797 definitions.
11798 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11799 parse-param arguments.
11800 (yy::b4_parser_class_name): Declare instance variables to
11801 hold parse-param arguments.
11802 * tests/calc.at: s/value/semantic_value/ because value clashes
11803 with a member of yy::b4_parser_class_name. Adjust C++ code
11804 to handle %parse-param. Enable %parse-param test in C++.
11805
3ab37077
PE
118062003-05-12 Paul Eggert <eggert@twinsun.com>
11807
11808 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11809 English a bit. Fix fclose typo. Change "const char" to "char
11810 const", and use ANSI C rather than K&R for "main". Suggest
11811 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11812 and suggest yy_switch_to_buffer.
11813
118142003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
11815
11816 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11817 C89. This avoids a diagnostic on compilers that define __STDC__
11818 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 11819 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 11820
e743727f
PE
118212003-05-03 Paul Eggert <eggert@twinsun.com>
11822
11823 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11824 Do not overrun array bounds.
11825 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 11826 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 11827
916708d5
AD
118282003-04-29 Akim Demaille <akim@epita.fr>
11829
11830 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11831 * src/getargs.c, src/getargs.h: here, as bool, not int.
11832 (nondeterministic_parser): New.
11833 * src/parse-gram.y, src/scan-gram.l: Support
11834 %nondeterministic-parser.
11835 * src/output.c (prepare): Use nondeterministic_parser instead
11836 of glr_parser where appropriate.
11837 * src/tables.c (conflict_row, action_row, save_row)
11838 (token_actions, token_actions, pack_vector): Ditto.
11839
a06ea4aa
AD
118402003-04-29 Akim Demaille <akim@epita.fr>
11841
11842 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11843
211074ca
AD
118442003-04-29 Akim Demaille <akim@epita.fr>
11845
11846 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11847 with %pure-parser and %locations to exercise the patch from Yakov
11848 Markovitch below.
11849
6175ffe3
PE
118502003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11851
11852 * data/yacc.c: (b4_lex_param): Corrected for the case where
11853 %lex-param is provided and %pure-parser isn't.
11854
b1e95857
PE
118552003-04-27 Paul Eggert <eggert@twinsun.com>
11856
11857 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 11858 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
11859 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11860 if it is not defined.
11861 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11862
acda9df6
PE
118632003-04-26 Paul Eggert <eggert@twinsun.com>
11864
3470c57b
PE
11865 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11866 Declare to be of type suitable for the ninf value itself, not of
11867 type suitable for the corresponding table, since the latter might
11868 be unsigned but the ninf value might be negative. This fixes a
11869 bug reported by Alexandre Duret-Lutz in
161a71f3 11870 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 11871
acda9df6
PE
11872 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11873 invokes it. We shouldn't invoke it twice because it will attempt
11874 to put error.o in the archive twice. This fixes a glitch reported
11875 by Martin Mokrejs in
161a71f3 11876 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 11877
b5250f26
PE
118782003-04-21 Paul Eggert <eggert@twinsun.com>
11879
11880 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11881 to gnulib.
11882
089ac0f1
PE
118832003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11884
11885 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11886 Fix obvious typo that results in uncompilable GLR parsers
11887 when both %pure-parser and %locations are used. (trivial change)
11888
5ededac6
PE
118892003-04-17 Paul Eggert <eggert@twinsun.com>
11890
1b8f2fff
PE
11891 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11892 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11893 Do not insert the expected token via unput, as this runs afoul
11894 of a POSIX-compatibility bug in flex 2.5.31.
11895 All uses changed to BEGIN the parent state,
11896 since we no longer insert the expected token via unput.
11897 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11898 that is no longer emitted after the above change.
11899
5ededac6
PE
11900 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11901 the first one. This change is from Paul Hilfinger, and it fixes
11902 regression reported by Werner Lemberg in
161a71f3 11903 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
11904
11905 (resolve_sr_conflict): Don't invoke state_errs_set
11906 unless one or more tokens have been explicitly made errors.
11907 Otherwise, the above change causes Bison to abort.
11908
11909 * tests/existing.at (GNU pic Grammar): New test case, taken from
11910 Lemberg's email.
11911
b8be9132
AD
119122003-03-31 Akim Demaille <akim@epita.fr>
11913
11914 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11915
d423d460
AD
119162003-03-31 Akim Demaille <akim@epita.fr>
11917
11918 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11919 output.
11920
c7e441b4
AD
119212003-03-31 Akim Demaille <akim@epita.fr>
11922
11923 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11924 From Paul Hilfinger.
11925
231897ad
AD
119262003-03-29 Akim Demaille <akim@epita.fr>
11927
11928 * m4/error.m4: Do not put under dynamic conditions some code which
11929 expansion is under static control.
11930
5b066063
AD
119312003-03-29 Akim Demaille <akim@epita.fr>
11932
11933 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11934
22a74fec
AD
119352003-03-29 Akim Demaille <akim@epita.fr>
11936
11937 * doc/bison.texinfo (Strings are Destroyed): New.
11938
0eee27e7
PE
119392003-03-13 Paul Eggert <eggert@twinsun.com>
11940
11941 * .cvsignore: Add configure.lineno.
11942 * src/.cvsignore: Add yacc.
11943 * tests/.cvsignore: Add testsuite.log.
11944 * doc/fdl.texi: Sync with latest FSF version.
11945
f61aad93
PE
119462003-03-12 Paul Eggert <eggert@twinsun.com>
11947
537636c7
PE
11948 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11949 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11950 cursor, instead of leaving it undefined. This fixes a bug
11951 reported by Tim Van Holder in
161a71f3 11952 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
11953 * tests/input.at (Torturing the Scanner): Test the scanner on
11954 an empty input file, which was Tim Van Holder's test case.
11955
11956 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11957 <sys/resource.h> can be included, include sys/time.h and
11958 sys/times.h first, if available. This works around the SunOS
11959 4.1.4 porting bug reported by Bruce Becker in
161a71f3 11960 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
11961
11962 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11963 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11964 AC_HEADER_SYS_WAIT.
11965
f61aad93
PE
11966 Merge changes from gnulib. This was prompted because the CVS
11967 snapshot didn't build on Solaris 7 due to strnlen problems.
11968
11969 These changes need to be merged back into gnulib:
11970 * lib/hash.c: Include <stdbool.h> unconditionally.
11971 * m4/onceonly.m4 (m4_quote): New macro.
11972 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11973 Quote AC_FOREACH variable-expansions properly.
11974 The 2003-01-03 obstack.h change also needs merging.
11975 {end of changes requiring merging}
5b066063 11976
f61aad93
PE
11977 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11978 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11979 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11980 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11981 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11982 New files, imported from gnulib.
11983 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11984 above.
11985
11986 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11987 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11988 gnulib sources.
11989
11990 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11991 Add.
11992 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11993 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11994 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11995 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11996 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11997 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11998 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11999 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12000 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12001 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12002 (jm_PREREQ_ARGMATCH): Remove.
12003 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12004 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12005
12006 * src/system.h: Include <stdbool.h> unconditionally.
12007
12008 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12009 assuming at least C89 in the bitset code for some time now.
12010
d2ffe116
AD
120112003-03-03 Akim Demaille <akim@epita.fr>
12012
12013 * ro.po: New.
12014
052826fd
AD
120152003-03-02 Akim Demaille <akim@epita.fr>
12016
12017 * doc/bison.texinfo (Table of Symbols): Reactivate the
12018 documentation for %lex-param, and %parse-param.
12019
c4749565
AD
120202003-03-02 Akim Demaille <akim@epita.fr>
12021
12022 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12023 generate verbose error messages.
12024 Use the number of tokens as an upper bound in yytname, as it
12025 cannot be a non terminal.
12026
d5286af1
AD
120272003-03-02 Akim Demaille <akim@epita.fr>
12028
12029 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12030 message.
12031
22e304a6
AD
120322003-03-02 Akim Demaille <akim@epita.fr>
12033
22e304a6
AD
12034 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12035 Use them to exercise yycheck overrun.
12036 Based on Andrew Suffield's grammar.
12037
67a25fed
AD
120382003-03-02 Akim Demaille <akim@epita.fr>
12039
12040 Create tests/local.at for Bison generic testing macros.
12041
12042 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12043 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12044 This new file.
12045 * tests/calc.at (AT_CHECK_CALC): Adjust.
12046 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12047 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12048 * tests/local.at: here.
12049 (AT_COMPILE_CXX): Tags the tests using it as c++.
12050 Ignore the test if CXX is not functional.
12051
9c2b381f
PE
120522003-03-01 Paul Eggert <eggert@twinsun.com>
12053
12054 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12055 not loc->end, since loc->end might contain garbage and this leads
12056 to undefined behavior on some platforms.
12057 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12058 depend on *loc, so that the reader doesn't give the the false
12059 impression that *loc is initialized.
12060 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12061 does not survive the return.
12062
0433ba88
AD
120632003-03-01 Akim Demaille <akim@epita.fr>
12064
12065 * src/scan-gram.l (code_start): Always initialize it when entering
12066 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12067 yylex invocation. An alternative would be making it static, but
12068 then it starts with the second %%'s beginning, instead of its end.
12069
b305ea69
PE
120702003-02-28 Paul Eggert <eggert@twinsun.com>
12071
12072 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12073 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 12074 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 12075
c3d25e01
PE
120762003-02-26 Paul Eggert <eggert@twinsun.com>
12077
12078 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12079 Remove Sequent/Pyramid discussion (nobody uses them any more).
12080 Merge VMS and MS-DOS discussion; these ports may well be dead
12081 but let's keep mentioning them for now. Put <> around email
12082 addresses. Add copyright notice.
12083
c267ffbc
PE
120842003-02-24 Paul Eggert <eggert@twinsun.com>
12085
12086 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12087 to avoid collision with flex use of yylineno.
12088 Problem reported by Bruce Lilly in
161a71f3 12089 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
12090 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12091 * data/yacc.c (yy_reduce_print): Likewise.
12092
12093 * config/depcomp: Sync with Automake 1.7.3.
12094
f939fc12
AD
120952003-02-21 Akim Demaille <akim@epita.fr>
12096
12097 * data/lalr1.cc: Use temporary variables instead of casts to
12098 change integer types.
12099 Suggested by Paul Eggert.
12100
95923bd6
AD
121012003-02-21 Akim Demaille <akim@epita.fr>
12102
12103 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12104 to avoid confusions with lalr1.cc's notion of Position.
12105 Suggested by Paul Eggert.
12106
2cdc240e
AD
121072003-02-20 Akim Demaille <akim@epita.fr>
12108
12109 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12110 before initial_columns.
12111 (location.hh): Use consistent variable names when defining the
12112 operator<<.
12113 Use "last" so that we subtract from Positions, not from unsigned.
12114
5d003116
AD
121152003-02-20 Akim Demaille <akim@epita.fr>
12116
12117 * data/lalr1.cc (position.hh): New subfile, including the extended
12118 and Doxygen'ed documentation of class Position.
12119 (location.hh): Use it.
12120 Document a` la Doxygen.
ba1ecc07 12121 With the help of Benoit Perrot.
5d003116 12122
d02b25f9
AD
121232003-02-20 Akim Demaille <akim@epita.fr>
12124
12125 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12126 AT_YACC_IF.
12127 Redefine AT_YYERROR_SEES_LOC_IF using it.
12128 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12129 not defined.
12130 Don't use the location in yy::Parser::error_ and
12131 yy::Parser::print_ when not %locations.
12132 Activate more lalr1.cc tests.
12133
0d1c3a04
AD
121342003-02-19 Akim Demaille <akim@epita.fr>
12135
12136 * data/lalr1.cc: When displaying a line number, be sure to make it
12137 an int.
12138
60a777aa
AD
121392003-02-19 Akim Demaille <akim@epita.fr>
12140
12141 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12142 Remove, useless.
12143 (YYABORT, YYACCEPT, YYERROR): New.
12144 * tests/calc.at: Renable the lalr1.cc test.
12145
0b86fc41
AD
121462003-02-19 Akim Demaille <akim@epita.fr>
12147
12148 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12149 error recovery, mixing with/without pops and discarding of the
12150 lookahead.
12151 Exercise YYERROR.
12152 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12153
da99a5dc
PE
121542003-02-17 Paul Eggert <eggert@twinsun.com>
12155
12156 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12157 * tests/testsuite.at (AT_COMPILE): Use them.
12158 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 12159 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 12160
93b8c255
PE
121612003-02-12 Paul Eggert <eggert@twinsun.com>
12162
12163 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12164 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 12165 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
12166 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12167 Check for malloc failure, for consistency with yacc.c.
12168 (yytname_size): Remove, for consistency with yacc.c.
12169
12170 The bug still remains in data/lalr1.cc, as I didn't have time
12171 to fix it there.
12172
7548fed2
AD
121732003-02-06 Akim Demaille <akim@epita.fr>
12174
12175 * configure.ac (GXX): Rename as...
12176 (CXX): this, to keep the original Autoconf semantics.
12177 Require 2.57.
12178 * data/lalr1.cc: Fix b4_copyright invocations.
12179 If YYDEBUG is not defined, don't depend upon name_ being defined.
12180 (location.hh): Include string and iostream.
12181 (Position::filename): New member.
12182 (Position::Position ()): New.
12183 (operator<< (Position)): New.
12184 (operator- (Position, int)): New.
12185 (Location::first, Location::last): Rename as...
12186 (Location::begin, Location::end): these, to mock the conventional
12187 iterator names.
12188 (operator<< (Location)): New.
12189 * tests/atlocal.in (CXX): New.
12190 * tests/testsuite.at (AT_COMPILE_CXX): New.
12191 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12192 locations in a more synthetic way.
12193 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12194 lalr1.cc is used.
12195 Adjust the C locations to match those from Emacs: first column is
12196 column 0.
12197 Change all the expected results.
12198 Conform to the GCS: simplify the locations when applicable.
12199 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12200 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12201 these CPP macros with the m4 macros new defined by...
12202 (AT_CHECK_PUSHDEFS): this, i.e.:
12203 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 12204 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
12205 New macros.
12206 (AT_CHECK_POPDEFS): Undefine them.
12207 (AT_CHECK_CALC_LALR1_CC): New.
12208 Use it for the first lalr1.cc test.
12209
43a176ef
AD
122102003-02-04 Akim Demaille <akim@epita.fr>
12211
12212 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12213 Location as is defined.
12214
fc049e9c
AD
122152003-02-04 Akim Demaille <akim@epita.fr>
12216
12217 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12218 name_ being defined.
12219
a737b216
PE
122202003-02-03 Paul Eggert <eggert@twinsun.com>
12221
12222 * src/gram.h (start_symbol): Remove unused decl.
12223
12224 Use more-consistent naming conventions for local vars.
12225
12226 * src/derives.c (derives_compute): Change type of local var from
12227 int to rule_number.
12228 * src/gram.c (grammar_rules_partial_print): Likewise.
12229 * src/print.c (print_core): Likewise.
12230 * src/reduce.c (reduce_grammar_tables): Likewise.
12231
12232 * src/gram.c (grammar_dump): Change name of item_number *
12233 local var from r to rp.
12234 * src/nullable.c (nullable_compute): Likewise.
12235
12236 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12237
12238 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12239 for symbol or symbol_number var.
12240 * src/reader.c (grammar_start_symbol_set): Likewise.
12241 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12242 Likewise.
12243 * src/state.c (transitions_to): Likewise.
12244 * src/state.h: Likewise.
12245 * src/tables.c (symbol_number_to_vector_number): Likewise.
12246
12247 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12248 char * var.
12249
12250 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12251 var.
12252
12253 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12254 var.
12255
12256 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12257 Use str, not s, for char * var. Use ch, not c, for character var.
12258 Use size for size var.
12259
12260 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12261 char * var.
12262 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12263 uniqstr var.
12264 * src/uniqstr.h: Likewise.
12265
12266 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12267 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12268 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12269 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12270 param to have same name as that of enum, so that we don't use
12271 "s" to stand for a non-state.
12272
68e93ad5
AD
122732003-02-02 Akim Demaille <akim@epita.fr>
12274
12275 * src/scan-skel.l: Scan more than one inert character per yylex
12276 invocation.
12277
92898986
PE
122782003-02-01 Paul Eggert <eggert@twinsun.com>
12279
12280 Version 1.875a.
12281
1d9d5d71
PE
12282 * po/LINGUAS: Add ms.
12283
0435d061
AD
122842003-01-30 Akim Demaille <akim@epita.fr>
12285
12286 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12287
6029a57f
PH
122882003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12289
12290 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12291 of $1.
0435d061
AD
12292
12293 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 12294 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 12295 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 12296
6029a57f
PH
12297 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12298 (b4_rhs_location): Ditto.
0435d061 12299 (yyfill): New function to copy from stack tree into array
6029a57f 12300 incrementally.
0435d061
AD
12301 (yyuserAction): Modify to allow incremental move of semantic values
12302 to rhs array when in GLR mode.
12303 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
12304 as needed.
12305 Remove dummy use of yystack, as there is now a guaranteed use.
12306 (yydoAction): Modify to allow incremental move of semantic values
12307 to rhs array when in GLR mode.
12308 (yyresolveAction): Ditto.
12309 (yyglrShiftDefer): Update comment.
0435d061 12310 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
12311 (yyglrReduce): Ditto.
12312 (yydoAction): Ditto
0435d061 12313
6029a57f
PH
12314 * tests/glr-regr1.at: Rename to ...
12315 * tests/glr-regression.at: Add new regression test for the problems
12316 described above (adapted from S. Eken).
12317 Update copyright notice.
12318 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12319 * tests/Makefile.am: Ditto.
12320
6cee6297
PE
123212003-01-28 Paul Eggert <eggert@twinsun.com>
12322
12323 * data/lalr1.cc: Do not use @output_header_name@ unless
12324 b4_defines_flag is set. This fixes two bugs reported by
12325 Tim Van Holder in
161a71f3
PE
12326 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12327 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 12328
b2a836b5
PE
123292003-01-21 Paul Eggert <eggert@twinsun.com>
12330
12331 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12332 we don't need to worry about yyerrlab1 being reported as an
12333 "unused label" by non-GCC C compilers. The downside is that if
12334 locations are used then a couple of statements are duplicated each
12335 time YYERROR is invoked, but the upside is that the warnings
12336 should vanish.
12337 (yyerrlab1): Move code to YERROR.
12338 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12339 This reverts some of the 2002-12-27 change.
12340
4196b931
PE
123412003-01-17 Paul Eggert <eggert@twinsun.com>
12342
12343 * src/output.c (symbol_printers_output): Fix typo that led
12344 to core dump. Problem reported by Antonio Rus in
161a71f3 12345 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 12346
3ae831b4
AD
123472003-01-13 Akim Demaille <akim@epita.fr>,
12348 Quoc Peyrot <chojin@lrde.epita.fr>,
12349 Robert Anisko <anisko_r@lrde.epita.fr>
12350
12351 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12352 when the stacks contain one element, as the loop would otherwise
12353 free the last state, and then use the top state (the one we just
12354 popped). This means that the initial elements will not be freed
12355 explicitly, as is the case in yacc.c; it is not a problem, as
12356 these elements have fake values.
12357
e3aa65c5
PE
123582003-01-11 Paul Eggert <eggert@twinsun.com>
12359
12360 * NEWS: %expect-violations are now just warnings, reverting
12361 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12362 bootstrapping problem reported by Matthias Klose; see
161a71f3 12363 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
12364 * src/conflicts.c (conflicts_print): Likewise.
12365 * tests/conflicts.at (%expect not enough, %expect too much,
12366 %expect with reduce conflicts): Likewise.
12367 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12368 that the warning is enabled if the number of conflicts changes
12369 (not necessarily increases).
12370
12371 * src/getargs.c (version): Update copyright year.
12372
f0057011
AD
123732003-01-09 Akim Demaille <akim@epita.fr>
12374
12375 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12376
1ee6d2a0
PE
123772003-01-08 Paul Eggert <eggert@twinsun.com>
12378
12379 * Makefile.maint (WGETFLAGS):
12380 New macro, containing "-C off" to disable proxy caches.
12381 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12382 (rel-check): Use $(WGET) instead of wget.
12383
d4fd77c4
PE
123842003-01-06 Paul Eggert <eggert@twinsun.com>
12385
12386 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12387 the GLR paper of Scott, Johnstone and Hussain.
12388
464c6927
PE
123892003-01-04 Paul Eggert <eggert@twinsun.com>
12390
d600ee67
PE
12391 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12392 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12393 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12394 (EXTRA_LIBRARIES): New var, for liby.a.
12395 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12396 (EXTRA_SCRIPTS): New var, for yacc.
12397
464c6927
PE
12398 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12399 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12400 Problem reported by Nelson H. F. Beebe.
12401
124022003-01-03 Paul Eggert <eggert@twinsun.com>
12403
12404 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12405 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12406 when compiling Bison 1.875's `bitset bset = obstack_alloc
12407 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12408
12409 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12410 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12411 grow to a huge size with typical invocation.
d600ee67 12412
464c6927
PE
12413 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12414 Use the pattern recommended by Autoconf 2.57, except also protect
12415 against double-definition.
12416 * src/system.h: Likewise.
12417 Portability issues reported by Nelson H. F. Beebe.
d600ee67 12418
464c6927
PE
12419 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12420 All uses changed. Provide a definition in both C and C++.
12421 (yytrue, yyfalse): Define even if defined (__cplusplus).
12422
12423 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12424 Reported by Nelson H. F. Beebe.
d600ee67 12425
464c6927
PE
12426 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12427
0f42c7d5
PE
124282003-01-02 Paul Eggert <eggert@twinsun.com>
12429
12430 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12431 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12432 Bug reported by Nelson H. F. Beebe.
12433
dc546b0f
PE
124342003-01-01 Paul Eggert <eggert@twinsun.com>
12435
12436 * Version 1.875.
12437
2c09b6a7
PE
124382002-12-30 Paul Eggert <eggert@twinsun.com>
12439
12440 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12441 Moved here from...
12442 (<INITIAL>","): Here. This causes stray "," to be treated
12443 more uniformly.
12444
dc546b0f 12445 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
12446 last brace in braced code when not in Yacc mode, for compatibility
12447 with Bison 1.35. This resurrects the 2001-12-15 patch to
12448 src/reader.c.
12449
12450 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12451 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12452
535c0f63
PE
124532002-12-28 Paul Eggert <eggert@twinsun.com>
12454
12455 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12456 that of SYM's type. This fixes Debian bug 168069, reported by
12457 Thomas Olsson.
d600ee67 12458
963fcc17
PE
124592002-12-28 Paul Eggert <eggert@twinsun.com>
12460
12461 Version 1.75f.
12462
12463 Switch back to the Yacc style of conflict reports, undoing some
12464 of the 2002-07-30 change.
12465 * doc/bison.texinfo (Understanding): Use Yacc style for
12466 conflict reports. Also, use new way of locating rules.
12467 * src/conflicts.c (conflict_report):
12468 Renamed from conflict_report_yacc, removing the old
12469 'conflict_report'. Translate the entire conflict report at once,
12470 so that we don't assume that "," has the same interpretation in
12471 all languages.
12472 (conflicts_output): Use Yacc-style conflict report for each state,
12473 instead of our more-complicated style.
12474 (conflicts_print): Use Yacc-style conflict report, except print
12475 the input file name when not emulating Yacc.
12476 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12477 Conflicted Reduction, %expect not enough, %expect too much,
12478 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12479 * tests/existing.at (GNU Cim Grammar): Likewise.
12480 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12481
12482 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12483 fatal): Don't invoke fflush; it's not needed and it might even be
12484 harmful for stdout, as stdout might not be open.
12485 * src/reduce.c (reduce_print): Likewise.
12486
b1efe548
PE
124872002-12-27 Paul Eggert <eggert@twinsun.com>
12488
12489 Fix a bug where error locations were not being recorded correctly.
12490 This problem was originally reported by Paul Hilfinger in
161a71f3 12491 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
12492
12493 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12494 top of the location stack's error locations.
12495 (yyerrlab): Set it. When discarding a token, push its location
12496 onto yylerrsp so that we don't lose track of the error's end.
12497 (yyerrlab1): Now is only the target of YYERROR, so that we can
12498 properly record the location of the action that failed. For GCC
12499 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12500 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12501 (yyerrlab2): New label, which yyerrlab now falls through to.
12502 Compute the error's location by applying YYLLOC_DEFAULT to
12503 the locations of all the symbols that went into the error.
12504 * doc/bison.texinfo (Location Default Action): Mention that
12505 YYLLOC_DEFAULT is also invoked for syntax errors.
12506 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12507 Error locations include the locations of all the tokens that were
12508 discarded, not just the last token.
d600ee67 12509
983c5c2c
PE
125102002-12-26 Paul Eggert <eggert@twinsun.com>
12511
b1efe548
PE
12512 * src/files.c: Include quote.h.
12513 (compute_output_file_names): Warn if we detect conflicting
12514 outputs to the same file. This should catch the misunderstanding
12515 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12516
12517 * src/conflicts.c (conflicts_print): If the user specifies
12518 "%expect N", report an error if there are any reduce/reduce
12519 conflicts. This is what the manual says should happen.
12520 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12521 * tests/conflicts.at (%expect with reduce conflicts): New test.
12522
983c5c2c
PE
12523 Don't use m4_include on relative file names, as it doesn't work as
12524 desired if there happens to be a file with that name under ".".
d600ee67 12525
983c5c2c
PE
12526 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12527 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12528 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12529 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12530 * src/output.c (output_skeleton): Use full path names when
12531 specifying a file to include; don't rely on include path, as
12532 it's unreliable when the working file contains a file with
12533 that name.
d600ee67 12534
983c5c2c
PE
125352002-12-25 Paul Eggert <eggert@twinsun.com>
12536
12537 Remove obsolete references to bison.simple and bison.hairy.
12538 Problem mentioned by Aubin Mahe in
161a71f3 12539 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
12540 * data/glr.c: Comment fix.
12541 * doc/bison.1: Remove references. Also, mention "yacc".
12542
12543 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12544 with -g option.
12545
12546 * src/parse-gram.y (declaration): Use enum "report_states" rather
12547 than its numeric value 1.
12548
12549 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12550 opening a new one. This fixes Debian bug 165349, reported by
12551 Bruce Stephens.
12552
23f2d9dc
PE
125532002-12-24 Paul Eggert <eggert@twinsun.com>
12554
12555 Version 1.75e.
12556
12557 * Makefile.maint (cvs-update): Don't assume that the shell
12558 supports $(...), as Solaris sh doesn't.
12559
12560 * src/parse-gram.y (lloc_default): Remove test for empty
12561 nonterminals at the end, since it didn't change the result.
12562
125632002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
12564
12565 If the user does not define YYSTYPE as a macro, Bison now declares it
12566 using typedef instead of defining it as a macro. POSIX requires this.
12567 For consistency, YYLTYPE is also declared instead of defined.
12568
12569 %union directives can now have a tag before the `{', e.g., the
12570 directive `%union foo {...}' now generates the C code
12571 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12572 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12573 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12574 instead of `yyltype'.
12575
12576 `yystype' and `yyltype' are now obsolescent macros instead of being
12577 typedefs or tags; they are no longer documented and will be
12578 withdrawn in a future release.
12579
12580 * data/glr.c (b4_location_type): Remove.
12581 (YYSTYPE): Renamed from yystype.
12582 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12583 (struct YYLTYPE): Renamed from struct yyltype.
12584 (YYLTYPE): Renamed from yyltype.
12585 (yyltype, yystype): New (and obsolescent) macros,
12586 for backward compatibility.
12587 * data/yacc.c: Likewise.
12588
12589 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12590 does not specify a union tag. This is for compatibility with
12591 Solaris 9 yacc.
12592
12593 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12594 const *, since it is now modified by stripping surrounding { }.
12595 (current_braced_code): Remove.
12596 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12597 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12598 trailing " {...}". Now of type <chars>.
12599 (grammar_declaration): Adjust to bundled tokens.
12600 (code_content): Remove; stripping is now done by add_param.
12601 (print_token_value): Print contents of bundled tokens.
12602 (token_name): New function.
12603
12604 * src/reader.h (braced_code, current_braced_code): Remove.
12605 (token_name): New decl.
12606
12607 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12608 token_type, not braced_code code_kind. All uses changed.
12609 (SC_PRE_CODE): New state, for scanning after a keyword that
12610 has (or usually has) an immediately-following braced code.
12611 (token_type): New local var, to keep track of which token type
12612 to return when scanning braced code.
12613 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 12614 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
12615 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12616 instead of returning a token type immediately.
12617 (<INITIAL>"{"): Set token type.
12618 (<SC_BRACED_CODE>"}"): Use it.
12619 (handle_action_dollar, handle_action_at): Now returns bool
12620 indicating success. Fail if ! current_rule; this prevents a core dump.
12621 (handle_symbol_code_dollar, handle_symbol_code_at):
12622 Remove; merge body into caller.
12623 (handle_dollar, handle_at): Complain in invalid contexts.
12624
12625 * NEWS, doc/bison.texinfo: Document the above.
12626 * NEWS: Fix years and program names in copyright notice.
12627
879ca4f8
PE
126282002-12-17 Paul Eggert <eggert@twinsun.com>
12629
12630 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12631 Reporting, Table of Symbols): Omit mentions of %lex-param and
12632 %parse-param from the documentation for now.
12633
1c5fe69d
PE
126342002-12-15 Paul Eggert <eggert@twinsun.com>
12635
12636 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12637 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12638 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
12639 disagreed with the Bison documentation. Bug
12640 reported by Andrew Walrond.
d600ee67 12641
1c5fe69d
PE
12642 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12643 as the caller now does that.
12644 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12645 (YYEMPTY): Parenthesize right hand side, since others use it.
12646 (yyparse): Don't assume that our generated code is the only code
12647 that sets yychar.
12648
d1de5372
PE
126492002-12-13 Paul Eggert <eggert@twinsun.com>
12650
12651 Version 1.75d.
12652
12653 POSIX requires a "yacc" command.
12654 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12655 (MOSTLYCLEANFILES): Add yacc.
12656 (yacc): New rule.
1c5fe69d 12657 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
12658 as an alias for bison y.
12659
12660 * po/LINGUAS: Add da.
d600ee67 12661
d1de5372
PE
12662 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12663 problem with latest <getopt.h>.
12664 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12665
12666 * doc/fdl.texi: Upgrade to 1.2.
12667 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12668 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12669 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12670 gnulib.
12671 * config/install-sh: Sync with autotools.
12672
12673 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 12674 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
12675 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12676 locations are requested.
12677 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12678 locations are requested.
12679
d0f3fe23
PE
126802002-12-12 Paul Eggert <eggert@twinsun.com>
12681
12682 Remove unportable casts and storage allocation tricks.
12683 While we're at it, remove almost all casts, since they
12684 usually aren't needed and are a sign of trouble.
12685
12686 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12687
12688 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12689 the pointer DSET returned by malloc; this isn't portable.
12690 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12691 Similarly for DERIVES.
12692 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12693 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12694 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12695
12696 * src/derives.c (derives_compute): Do not bother invoking
12697 int_of_rule_number, since rule numbers are integers.
12698
12699 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12700 rather than XMALLOC (char, N).
12701
12702 * src/files.c (filename_split): Rewrite to avoid cast.
12703
12704 * src/gram.h (symbol_number_as_item_number,
12705 item_number_as_symbol_number, rule_number_as_item_number,
12706 item_number_as_rule_number):
12707 Now inline functions rather than macros, to avoid casts.
12708 * src/state.h (state_number_as_int): Likewise.
12709 * src/tables.c (state_number_to_vector_number,
12710 symbol_number_to_vector_number): Likewise.
12711
12712 * src/gram.h (int_of_rule_number): Remove; no longer used.
12713
12714 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12715 since the resulting storage is always stored into.
12716
12717 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12718 where it's needed.
12719
12720 * src/muscle_tab.c (muscle_m4_output):
12721 Now inline. Return bool, not int.
12722 * src/state.c (state_compare): Likewise.
12723 * src/symtab.c (symbol_check_defined,
12724 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12725 hash_compare_symbol, hash_symbol):
12726 Likewise.
12727 * src/uniqstr.c (uniqstr_print): Likewise.
12728 * src/muscle_tab.c (muscle_m4_output_processor):
12729 New function, to avoid casts.
12730 * src/state.c (state_comparator, stage_hasher): Likewise.
12731 * src/symtab.c (symbol_check_defined_processor,
12732 symbol_check_alias_consistency_processor, symbol_pack_processor,
12733 symbol_translation_processor, hash_symbol_comparator,
12734 hash_symbol_hasher): Likewise.
12735 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12736 * src/muscle_tab.c (muscles_m4_output):
12737 Use new functions instead of casting old functions unportably.
12738 * src/state.c (state_hash_new): Likewise.
12739 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12740 symbols_token_translations_init):
12741 Likewise.
12742 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12743
12744 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12745 var instead of casting to long, to avoid casts.
12746 (prepare_states): Use MALLOC rather than alloca, so that we don't
12747 have to worry about alloca.
12748 * src/state.c (state_hash_lookup): Likewise.
12749
12750 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12751 local var instead of casting to unsigned char, to avoid casts.
12752
12753 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12754 STATE_ALLOC): Remove.
12755 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12756 rather than calloc, and use offsetof to avoid allocating slightly
12757 too much storage.
12758 (state_new): Initialize all members.
12759
12760 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12761
12762 * src/symtab.c (symbol_free): Remove; unused.
12763 (symbol_get): Remove cast in lhs of assignment.
12764 (symbols_do): Now static. Accept generic arguments, not
12765 hashing-related ones.
12766
12767 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12768 (symbol_processor): Remove.
12769 (symbols_do): Remove decl; now static.
12770
12771 * src/system.h (alloca): Remove; decl no longer needed.
12772 (<stddef.h>): Include, for offsetof.
12773 (<inttypes.>, <stdint.h>): Include if available.
12774 (uintptr_t): New type, if system lacks it.
12775 (CALLOC, MALLOC, REALLOC): New macros.
12776 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12777 new macros.
12778
12779 * src/tables.c (table_size): Now int, to pacify GCC.
12780 (table_grow, table_ninf_remap): Use signed table size.
12781 (save_row): Don't bother initializing locals when not needed.
12782 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12783 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12784
12785 * src/vcg.h: Correct misspellings.
12786
12787 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12788
12789
12790 * src/getargs.c (getargs): Don't assume EOF == -1.
12791
26b4a969
PE
127922002-12-09 Paul Eggert <eggert@twinsun.com>
12793
12794 Change identifier spellings to avoid collisions with names
12795 that are reserved by POSIX.
12796
12797 Don't use names ending in _t, since POSIX reserves them.
12798 For consistency, remove _e and _s endings -- they're weren't
12799 needed to remove ambiguity. All uses changed.
12800 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12801 turn was just renamed from struniq_t.
12802 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12803 which in turn was just renamed from struniq_processor_t.
12804 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12805 in turn was renamed from hash_compare_struniq_t.
12806 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12807 (state_list): Renamed from state_list_t.
12808 * src/assoc.h (assoc): Renamed from assoc_t.
12809 * src/conflicts.c (enum conflict_resolution): Renamed from
12810 enum conflict_resolution_e.
12811 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12812 (rule_list): Renamed from rule_list_t.
12813 * src/getargs.h (enum trace): Renamed from enum trace_e.
12814 (enum report): Renamed from enum report_e.
12815 * src/gram.h (item_number): Renamed from item_number_t.
12816 (rule_number): Renamed from rule_number_t.
12817 (struct rule_s): Remove the "rule_s" part; not used.
12818 (rule): Renamed from rule_t.
12819 (rule_filter): Renamed from rule_filter_t.
12820 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12821 (goto_list): Renamed from goto_list_t.
12822 * src/lalr.h (goto_number): Renamed from goto_number_t.
12823 * src/location.h (location): Renamed from location_t.
12824 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12825 and moved here from:
12826 * src/muscle_tab.h (muscle_entry_t): here.
12827 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12828 (rule_list): Renamed from rule_list_t.
12829 * src/print_graph.c (static_graph): Renamed from graph.
12830 * src/reader.h (braced_code): Renamed from braced_code_t.
12831 Remove brace_code_e tag.
12832 * src/relation.h (relation_node): Renamed from relation_node_t.
12833 (relation_nodes): Renamed from relation_nodes_t.
12834 (relation): Renamed from relation_t.
12835 * src/state.h (state_number): Renamed from state_number_t.
12836 (struct state): Renamed from struct state_s.
12837 (state): Renamed from state_t.
12838 (transitions): Renamed from transitions_t. Unused (and
12839 misspelled) transtion_s tag removed.
12840 (errs): Renamed from errs_t. Unused errs_s tag removed.
12841 (reductions): Renamed from reductions_t. Unused tag
12842 reductions_s removed.
12843 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12844 (struct symbol_list): Renamed from struct symbol_list_s.
12845 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12846 (struct symbol): Renamed from struct symbol_s.
12847 (symbol): Renamed from symbol_t.
12848 * src/tables.c (vector_number): Renamed from vector_number_t.
12849 (action_number): Renamed from action_t.
12850 * src/tables.h (base_number): Renamed from base_t.
12851 * src/vcg.h (enum color): Renamed from enum color_e.
12852 (enum textmode): Renamed from enum textmode_e.
12853 (enum shape): Renamed from enum shape_e.
12854 (struct colorentry): Renamed from struct colorentry_s.
12855 (struct classname): Renamed from struct classname_s.
12856 (struct infoname): Renamed from struct infoname_s.
12857 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12858 (enum decision): Renamed from enum decision_e.
12859 (enum orientation): Renamed from enum orientation_e.
12860 (enum alignment): Renamed from enum alignment_e.
12861 (enum arrow_mode): Renamed from enum arrow_mode_e.
12862 (enum crossing_type): Renamed from enum crossing_type_e.
12863 (enum view): Renamed from enum view_e.
12864 (struct node): Renamed from struct node_s.
12865 (node): Renamed from node_t.
12866 (enum linestyle): Renamed from enum linestyle_e.
12867 (enum arrowstyle): Renamed from enum arrowstyle_e.
12868 (struct edge): Renamed from struct edge.
12869 (edge): Renamed from edge_t.
12870 (struct graph): Renamed from struct graph_s.
12871 (graph): Renamed from graph_t.
12872 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12873 Rename value_t -> value.
12874 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12875 value_t_as_yystype -> value_as_yystype.
12876
12877 Don't include <errno.h> in the mainstream code, since it
12878 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12879 * lib/get-errno.c, lib/get-errno.h: New files.
12880 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12881 get-errno.c.
12882 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12883 * src/output.c (output_skeleton): Likewise.
12884 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12885 instead of errno.
12886 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12887 Likewise.
12888 (handle_action_dollar, handle_action_at): Likewise.
12889 * src/system.h: Do not include <errno.h>.
12890 (TAB_EXT): Renamed from EXT_TAB.
12891 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12892
12893 Avoid str[a-z]*, since <string.h> reserves that name space.
12894 Change all instances of "struniq" in names to "uniqstr", and
12895 likewise for "STRUNIQ" and "UNIQSTR".
12896 * src/uniqstr.c: Renamed from src/struniq.c.
12897 * src/uniqstr.h: Renamed from src/struniq.h.
12898 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12899 * src/files.c (strsuffix): Remove; unused.
12900 (concat2): Renamed from stringappend. Now static.
12901 * src/files.h (strsuffix, stringappend): Remove; unused.
12902 * src/parse-gram.y (<chars>): Renamed from <string>.
12903 (<uniqstr>): Renamed from <struniq>.
12904 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12905 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12906 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12907 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12908 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12909 (N_EXPAND): Renamed from N_STRETCH.
12910
12911 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12912 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12913 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12914 Remove; unused.
12915 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12916 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12917 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12918 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12919 (BASE_MAXIMUM): Renamed from BASE_MAX.
12920 (BASE_MINIMUM): Renamed from BASE_MIN.
12921 (ACTION_MAX): Remove; unused.
12922 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12923 Unnecessary casts removed from above defines.
12924
12925
12926 Fix misspelling in names.
12927 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12928 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12929 G_NODE_ALIGNEMENT.
12930
12931
12932 * lib/timevar.c (timevar_report): Renamed from time_report,
12933 for consistency with other names.
12934 * lib/timevar.h (timevar_report): New decl.
12935 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12936
12937
12938 Sort include-file uses.
12939
12940 Reorder all include files under src to be in the order "system.h".
12941 then the ../lib include files in angle brackets (alphabetized),
12942 then the . include files in double-quotes (alphabetized). Fix
12943 dependency breakages encountered in this process, as follows:
12944 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12945 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12946 * src/state.h: Include "symtab.h".
12947
996b1c7e
PE
129482002-12-08 Paul Eggert <eggert@twinsun.com>
12949
12950 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12951 since this causes problems when __file__ contains character
12952 sequences like "@" that are treated specially by src/scan-skel.l.
12953 Instead, just use the file's basename. This fixes the bug
12954 reported by Martin Mokrejs in
161a71f3 12955 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 12956
e19c4e5d
PE
129572002-12-06 Paul Eggert <eggert@twinsun.com>
12958
12959 Add support for rules that do not have trailing semicolons, as
12960 POSIX requires. Improve the quality of locations in Bison
12961 diagnostics.
26b4a969 12962
e19c4e5d
PE
12963 * src/location.c: Include <quotearg.h>.
12964 (empty_location): Now const.
12965 (location_print): New function. Follow the recommendation of the
12966 GNU Coding Standards for locations that span file boundaries.
12967 * src/location.h: Do not include <quotearg.h>; no longer needed.
12968 (boundary): New type.
12969 (location_t): Use it. This allows locations to span file boundaries.
12970 All member uses changed: file -> start.file or end.file (as needed),
12971 first_line -> start.line, first_column -> start.column,
12972 last_line -> end.line, last_column -> end.column.
12973 (equal_boundaries): New function.
12974 (LOCATION_RESET, LOCATION_STEP): Remove.
12975 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12976 (empty_location): Now const.
12977 (location_print): New decl.
12978 * src/parse-gram.y (lloc_default): New function, which handles
12979 empty locations more accurately.
12980 (YYLLOC_DEFAULT): Use it.
12981 (%token COLON): Remove.
12982 (%token ID_COLON): New token.
26b4a969 12983 (rules): Use it.
e19c4e5d
PE
12984 (declarations, rules): Remove trailing semicolon.
12985 (declaration, rules_or_grammar_declaration):
12986 Allow empty (";") declaration.
12987 (symbol_def): Remove empty actions; no longer needed.
12988 (rules_or_grammar_declaration): Remove trailing semicolon.
12989 (semi_colon.opt): Remove.
12990 * src/reader.h: Include location.h.
12991 (scanner_cursor): New decl.
12992 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12993 rolling our own.
12994 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12995 of *loc.
12996 (STEP): Remove. No longer needed, now that adjust_location does
12997 the work. All uses removed.
12998 (scanner_cursor): New var.
12999 (adjust_location): Renamed from extend_location. It now sets
13000 *loc and adjusts the scanner cursor. All uses changed.
13001 Don't bother testing for CR.
13002 (handle_syncline): Remove location arg; now updates scanner cursor.
13003 All callers changed.
13004 (unexpected_end_of_file): Now accepts start boundary of token or
13005 comment, not location. All callers changed. Update scanner cursor,
13006 not the location.
13007 (SC_AFTER_IDENTIFIER): New state.
13008 (context_state): Renamed from c_context. All uses changed.
13009 (id_loc, code_start, token_start): New local vars.
13010 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13011 processing of Yacc white space and equivalents here.
13012 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13013 instead of returning ID immediately, since we need to search for
13014 a subsequent colon.
13015 (<INITIAL>"'", "\""): Save token_start.
13016 (<INITIAL>"%{", "{", "%%"): Save code_start.
13017 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13018 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13019 BEGIN context_state at end, not INITIAL.
13020 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13021 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13022 Return correct token start.
13023 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13024 the start of a character, string or multiline comment is found.
13025 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13026 Reduction): Adjust reported locations to match the more-precise
13027 results now expected.
13028 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13029 * tests/reduce.at (Useless Rules, Reduced Automaton,
13030 Underivable Rules): Likewise.
13031 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13032 or "|"' now that so many other tokens are allowed by the new grammar.
13033
13034 * src/complain.h (current_file): Remove duplicate decl;
13035 current_file is now owned by files.h.
13036 * src/complain.c, src/scan-gram.l: Include files.h.
13037
130382002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 13039
e19c4e5d
PE
13040 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13041 promotes to int; it might be unsigned int.
13042 * data/yacc.c (yy_reduce_print): Likewise.
13043
13044 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13045 be #defined in the prologue, not in the Bison declarations.
13046 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 13047
b64755e3
PE
130482002-12-02 Paul Eggert <eggert@twinsun.com>
13049
13050 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13051 * lib/strtoul.c: New file, from gnulib.
13052 This fixes a porting bug reported by Peter Klein in
161a71f3 13053 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 13054
6e746484
PE
130552002-11-30 Paul Eggert <eggert@twinsun.com>
13056
b64755e3
PE
13057 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13058 and put only a forward declaration in the prologue. This is for
13059 consistency with the other scanner helper functions.
13060
6ba55592
PE
13061 Type clashes now generate warnings, not errors, since it
13062 appears that POSIX may allow some grammars with type clashes.
13063 * src/reader.c (grammar_current_rule_check): Warn about
13064 type clashes instead of complaining.
13065 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13066
6e746484
PE
13067 Add Yacc library, since POSIX requires it.
13068 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13069 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13070 * lib/main.c, lib/yyerror.c: New files.
13071
13072 gram_error can be static; it need not be extern.
13073 * src/reader.h (gram_error): Remove decl.
13074 * src/parse-gram.y (gram_error): Now static. Add static decl.
13075 (print_token_value): Omit parameter names from forward decl,
13076 for consistency.
13077
88510f9c
PE
130782002-11-29 Paul Eggert <eggert@twinsun.com>
13079
6e746484
PE
13080 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13081 be declared before being used. E.g., one should typically
13082 declare them in the prologue. Use GNU coding style in examples.
13083 Put "const" consistently after the type it modifies. Mention
13084 that C99 supports "inline". Mention that yyerror traditionally
13085 returns "int".
13086
88510f9c
PE
13087 %parse-param and %lex-param now take just one argument, the
13088 declaration; the argument name is deduced from the declaration.
13089
13090 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13091 Reporting, Table of Symbols): Document this.
13092 * src/parse-gram.y (add_param): New function.
13093 (COMMA): Remove.
13094 (declaration): Implement new rule for %parse-param and %lex-param.
13095 * src/scan-gram.l: "," now elicits a warning, rather than being
13096 a token; this is more compatible with byacc.
13097 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13098
bb92250c
PE
130992002-11-27 Paul Eggert <eggert@twinsun.com>
13100
13101 Rename identifiers to avoid real and potential collisions.
13102
13103 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13104 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 13105 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
13106 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13107 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13108 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13109 All uses changed.
13110 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13111 The name "yycontrol" violates the name space rules, and this stuff
13112 wasn't being used anyway.
13113 (input): Remove action; this stuff wasn't being used.
13114 (gram_error): Rename local variable yylloc -> loc.
13115 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13116 (YY_DECL): Don't use "yy" at start of local variables.
13117 All uses changed, e.g., yylloc -> loc.
13118 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13119 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13120 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13121 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13122
13123 * src/parse-gram.y (gram_error): loc is now const *.
13124 * src/reader.h (gram_error): Likewise.
13125
3af4feb2
PE
131262002-11-24 Paul Eggert <eggert@twinsun.com>
13127
13128 Version 1.75c.
13129
13130 * tests/actions.at (Actions after errors): Use an output format
13131 more similar to that of the Printers and Destructors test.
13132 Test the position of the ';' token too.
13133 (Printers and Destructors): Likewise.
13134 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13135 unnecessarily alarming people when the test fails.
13136
13137 * data/yacc.c (yyerrlab1): Move this label down, so that the
13138 parser does not discard the lookahead token if the user code
13139 invokes YYERROR. This change is required for POSIX conformance.
13140
13141 * lib/error.c: Sync with gnulib.
13142
131432002-11-22 Paul Eggert <eggert@twinsun.com>
13144
13145 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13146 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13147 * lib/xmalloc.c: Likewise.
26b4a969 13148
58004308
PE
131492002-11-20 Paul Eggert <eggert@twinsun.com>
13150
13151 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13152
131532002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 13154
58004308
PE
13155 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13156 should use `if (! x) abort ();' rather than `assert (x);', and
13157 anyway it's one less thing to worry about configuring.
13158
13159 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13160 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13161 and replace all instances of assert with abort.
13162 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13163 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13164
13165 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13166 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13167 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13168 hash_find_entry, hash_rehash, hash_insert): Likewise.
13169 * src/conflicts.c (resolve_sr_conflict): Likewise.
13170 * src/lalr.c (set_goto_map, map_goto): Likewise.
13171 * src/nullable.c (nullable_compute): Likewise.
13172 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13173 * src/reader.c (packgram, reader): Likewise.
13174 * src/state.c (state_new, state_free, state_transitions_set,
13175 state_reduction_find): Likewise.
13176 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13177 symbol_pack): Likewise.
13178 * src/tables.c (conflict_row, pack_vector): Likewise.
13179 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13180 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13181 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13182 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13183
13184 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13185 (ARGMATCH_CONSTRAINT): New macro.
13186 (ARGMATCH_ASSERT): Use it.
13187
13188 * src/system.h (verify): New macro.
13189 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13190 rather than assert.
13191 * src/tables.c (tables_generate): Likewise.
13192
13193 * src/struniq.c (struniq_assert): Now returns void, and aborts
13194 if the assertion is false.
13195 (struniq_assert_p): Remove.
13196 * src/struniq.h: Likewise.
13197
76ae8198
PE
131982002-11-18 Paul Eggert <eggert@twinsun.com>
13199
13200 * data/glr.c (yygetLRActions): Replace `yyindex' with
13201 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13202 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 13203 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 13204
d3c4e709
AD
132052002-11-18 Akim Demaille <akim@epita.fr>
13206
13207 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13208 space.
13209 From Tim Van Holder.
13210
8d8a7238
PE
132112002-11-17 Paul Eggert <eggert@twinsun.com>
13212
13213 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13214 to "SyntaxError" for consistency with my 2002-11-15 change.
13215
13216 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13217 not define to {}, since this breaks the common use of `YYDPRINTF
13218 ((...));' if a single statement is desired (e.g. before `else').
13219 Work around GCC warnings by surrounding corresponding calls with
13220 {} if needed.
13221 (yyhasResolvedValue): Remove unused function.
13222 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13223 loop body.
13224 (yyreportSyntaxError): Renamed from yyreportParseError.
13225 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13226 All uses changed.
13227 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13228 extern when possible. Remove unused initializations.
13229
b0937b22
AD
132302002-11-16 Akim Demaille <akim@epita.fr>
13231
13232 Augment the similarity between GLR and LALR traces.
13233
13234 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13235 (YY_REDUCE_PRINT): New.
13236 (yyparse): Use them.
13237 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13238 YYDPRINT here.
13239 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13240 state reached after the reduction/recovery, since...
13241 (yyparse, yyprocessOneStack): Report the state we are entering in.
13242
c5e3e510
AD
132432002-11-16 Akim Demaille <akim@epita.fr>
13244
13245 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13246 Add support for --trace=skeleton.
13247 * src/scan-skel.l: %option debug.
13248 Scan strings of non-@ or \n instead of character by character.
13249 (scan_skel): Handle trace_skeleton.
13250 (QPUTS): New.
13251 (@output_parser_name@, @output_header_name@): ``Restore'' their
13252 support (used to be M4 macros).
13253 * data/yacc.c: Quote larger chunks, a la glr.c.
13254 * data/lalr1.cc: Likewise.
13255 The header guards are no longer available, so use some other
13256 string than `YYLSP_NEEDED'.
13257
4c6cc1db
AD
132582002-11-16 Akim Demaille <akim@epita.fr>
13259
13260 Make the ``Printers and Destructors'' test more verbose, taking
13261 `yacc.c''s behavior as (possibly wrong) reference.
13262
13263 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13264 instead of fprint on stdout.
13265 Set and report the last_line of the symbols.
13266 Consistently display values and locations.
13267
6d9e8019
PE
132682002-11-16 Paul Eggert <eggert@twinsun.com>
13269
13270 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13271
6e649e65
PE
132722002-11-15 Paul Eggert <eggert@twinsun.com>
13273
b25d88f6
PE
13274 * tests/actions.at (Actions after errors): New test case.
13275
6e649e65
PE
13276 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13277 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13278 tests/action.at, tests/calc.at, tests/conflicts.at,
13279 tests/cxx-type.at, tests/regression.at:
13280 "parse error" -> "syntax error" for POSIX compatibility.
13281 "parsing stack overflow..." -> "parser stack overflow" so
13282 that code matches Bison documentation.
13283
0f39aab9
AD
132842002-11-15 Akim Demaille <akim@epita.fr>
13285
13286 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13287 take two BRACED_CODE, not two string_content.
13288 Free the scanner's obstack when we are done.
13289 (code_content): New.
13290 * tests/calc.at: Adjust.
13291 * doc/bison.texinfo: Adjust.
13292 Also, make sure to include the `,' for these declarations.
13293
761c1926
AD
132942002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13295
13296 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13297 definition; avoids potential autoreconf problems.
13298
b0f98b10
AD
132992002-11-15 Akim Demaille <akim@epita.fr>
13300
13301 Always check the value returned by yyparse.
13302
13303 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13304 returned by yyparse.
13305 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13306 Adjust calls.
13307 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13308 returned by yyparse.
13309
970785f1
PH
133102002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13311
13312 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13313 on input.at test.
13314
8fcc7db1
PE
133152002-11-14 Paul Eggert <eggert@twinsun.com>
13316
7ec1b48e
PE
13317 * src/output.c (output_skeleton): Call xfopen instead of
13318 duplicating xfopen's body.
13319
cfff7583 13320 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 13321 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 13322
8fcc7db1
PE
13323 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13324 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13325 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13326 file twice in the grammar, as an extra check.
13327
13328 * tests/input.at (Torturing the Scanner): Surround the
13329 backslash-newline tests with "#if 0", to make it less likely that
13330 we'll run into compiler bugs. Bring back solitary \ inside
13331 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 13332 test backslash-newline in C character constant.
8fcc7db1 13333
4e8d992c
AD
133342002-11-14 Akim Demaille <akim@epita.fr>
13335
13336 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13337 status of the compiler.
f32b346d 13338 Calling `exit 1' is no longer needed.
4e8d992c
AD
13339 Reported by Nelson H. F. Beebe.
13340
9501dc6e
AD
133412002-11-14 Akim Demaille <akim@epita.fr>
13342
13343 * tests/atlocal.in (CPPFLAGS): We have config.h.
13344 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13345 New.
13346 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13347 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13348 * tests/regression.at, tests/torture.at: Use them for all the
13349 grammars that are to be compiled.
13350 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13351 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13352 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13353
18b519c0
AD
133542002-11-14 Akim Demaille <akim@epita.fr>
13355
13356 * doc/bison.texinfo: Various formatting changes (alignments in
13357 samples, additional @group/@end group, GCS in samples.
13358 Use @deffn instead of simple @table to define the directives,
13359 macros, variables etc.
13360
9a86cdb9
PE
133612002-11-13 Paul Eggert <eggert@twinsun.com>
13362
daa33def 13363 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 13364 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 13365
daa33def 13366 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 13367 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
13368 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13369 * tests/headers.at (export YYLTYPE): Likewise.
13370
13371 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 13372 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 13373
9a86cdb9
PE
13374 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13375 comments, since they're not portable. Use GNU coding style.
13376
9c1e26bd
AD
133772002-11-13 Akim Demaille <akim@epita.fr>
13378
13379 * data/yacc.c: Leave bigger chunks of quoted text.
13380 (YYDSYMPRINTF): New.
13381 Use it to report symbol activities.
13382 * data/glr.c (YYDSYMPRINTF): New.
13383 Use it.
13384
87f721cc
PE
133852002-11-12 Paul Eggert <eggert@twinsun.com>
13386
13387 Version 1.75b.
13388
13389 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13390 (yyglrReduce): Return yyok, not 0.
13391 This should avoid the enumerated-type warnings reported
464c6927 13392 by Nelson H. F. Beebe in
161a71f3 13393 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
13394
13395 * lib/bbitset.h (BITSET_INLINE): Remove.
13396 * lib/bitset.h [! BITSET_INLINE]: Remove.
13397 (bitset_set, bitset_reset, bitset_test): Rename local vars
13398 to avoid shadowing warnings by GCC.
13399
13400 * data/glr.c (inline): Remove #define. It's the user's
13401 responsibility to #define it away, just like 'const'.
464c6927 13402 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 13403 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 13404
87f721cc
PE
13405 * Makefile.maint (po-check): Scan .l and .y files instead of the
13406 .c and the .h files that they generate. This fixes the bug
13407 reported by Tim Van Holder in:
161a71f3 13408 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
13409 Look for N_ as well as for _. Try to avoid matching #define for
13410 N_ and _.
13411 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13412 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13413 * src/scan-gram.l: Revamp regular expressions so that " and '
13414 do not confuse xgettext.
13415
13416 * src/struniq.h (struniq_new): Do not declare the return type
13417 to be 'const'; this violates the C standard.
13418 * src/struniq.c (struniq_new): Likewise.
13419
be14ade5
AD
134202002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13421
13422 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13423 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13424 linker.
13425
05291fbc
AD
134262002-11-12 Akim Demaille <akim@epita.fr>
13427
13428 * Makefile.maint: Sync with Autoconf:
13429 (local_updates): New.
13430
1f5fd52e
AD
134312002-11-12 Akim Demaille <akim@epita.fr>
13432
13433 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13434
283f1e64
AD
134352002-11-12 Akim Demaille <akim@epita.fr>
13436
13437 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13438 locations.
13439
886b69d1
AD
134402002-11-12 Akim Demaille <akim@epita.fr>
13441
13442 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13443 not yyvalue.
13444
3df37415
AD
134452002-11-12 Akim Demaille <akim@epita.fr>
13446
13447 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13448 Use it to test the GLR parser.
13449
7bd6c77e
AD
134502002-11-12 Akim Demaille <akim@epita.fr>
13451
13452 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13453 defines it.
13454 * data/glr.c (yystos): New.
13455 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13456 (YYDSYMPRINT): New.
13457 (yyval): Don't define it, it is handled via M4.
13458 (yyrecoverParseError): Free verbosely the discarded symbols.
13459 * data/yacc.c (yysymprint): Remove, rather...
13460 (b4_yysymprint_generate): invoke.
13461 * data/c.m4 (b4_yysymprint_generate): New.
13462 Accept pointers as arguments, as opposed to the version from
13463 yacc.c.
13464 (b4_yydestruct_generate): Likewise.
13465 * tests/cations.at (Printers and Destructors): Use Bison directives
13466 instead of CPP macros.
13467 Don't rely on internal details.
13468
b0400cc6
AD
134692002-11-12 Akim Demaille <akim@epita.fr>
13470
13471 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13472 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13473 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13474 it against YYEMPTY and so forth), work on yytoken (i.e., set
13475 it to YYEMPTY etc.).
13476 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13477 (b4_symbol_actions): Remove.
13478 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13479 for 0, end-of-input.
13480
72f889cc
AD
134812002-11-12 Akim Demaille <akim@epita.fr>
13482
13483 * doc/bison.texinfo (Destructor Decl): New.
13484
b1ae9233
AD
134852002-11-12 Akim Demaille <akim@epita.fr>
13486
13487 * src/tables.c (tables_generate): Use free for pointers that
13488 cannot be NULL, not XFREE.
13489 (pack_vector): Use assert, not fatal, for bound violations.
13490 * src/state.c (state_new): Likewise.
13491 * src/reader.c (reader): Likewise.
13492 * src/lalr.c (set_goto_map): Likewise.
72f889cc 13493 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
13494 the file name.
13495
7ec2d4cd
AD
134962002-11-12 Akim Demaille <akim@epita.fr>
13497
13498 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13499 Restore.
13500 * src/scan-gram.l (last_string): Is global to the file, not to
13501 yylex.
13502 * src/parse-gram.y (input): Don't append the epilogue here,
13503 (epilogue.opt): do it here, and free the scanner's obstack.
13504 * src/reader.c (epilogue_set): Rename as...
13505 (epilogue_augment): this.
13506 * data/c.m4 (b4_epilogue): Defaults to empty.
13507
573a6cd3
AD
135082002-11-12 Akim Demaille <akim@epita.fr>
13509
13510 * src/getargs.c (long_options): Remove duplicates.
13511 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13512 Remove.
13513 * doc/bison.rnh: Remove.
13514 * doc/bison.texinfo (VMS Invocation): Remove.
13515
95612cfa
AD
135162002-11-12 Akim Demaille <akim@epita.fr>
13517
13518 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13519 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13520
13521 Use struniq for symbols.
13522
13523 * src/symtab.h (symbol_t): The tag member is a struniq.
13524 (symbol_type_set): Adjust.
13525 * src/symtab.c (symbol_new): Takes a struniq.
13526 (symbol_free): Don't free the tag member.
13527 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13528 (hash_compare_symbol, hash_symbol): these.
13529 Use the fact that tags as struniqs.
13530 (symbol_get): Use struniq_new.
13531 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13532 Returns a strniq.
13533 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13534 and type members are struniqs.
13535 * src/reader.c (get_merge_function)
13536 (grammar_current_rule_merge_set): Adjust.
13537 (TYPE, current_type): Are struniq.
13538
13539 Use struniq for file names.
13540
13541 * src/files.h, src/files.c (infile): Split into...
13542 (grammar_file, current_file): these.
13543 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13544 * src/reduce.c (reduce_print): Likewise.
13545 * src/getargs.c (getargs): Likewise.
13546 * src/complain.h, src/complain.c: Likewise.
13547 * src/main.c (main): Call struniqs_new early enough to use it for
13548 file names.
13549 Don't free the input file name.
13550
3e6656f9
AD
135512002-11-12 Akim Demaille <akim@epita.fr>
13552
13553 * src/symtab.c (symbol_free): Remove dead deactivated code:
13554 type_name are properly removed.
13555 Don't use XFREE to free items that cannot be NULL.
13556 * src/struniq.h, src/struniq.c: New.
13557 * src/main.c (main): Initialize/free struniqs.
13558 * src/parse-gram.y (%union): Add astruniq member.
13559 (yyprint): Adjust.
13560 * src/scan-gram.l (<{tag}>): Return a struniq.
13561 Free the obstack bit that used to store it.
13562 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13563
7672019c
PE
135642002-11-11 Paul Eggert <eggert@twinsun.com>
13565
13566 Revamp to fix many (but not all) of the C- and M4-related quoting
13567 problems. Among other things, this fixes the Bison bug reported
13568 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 13569 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
13570
13571 Use new @ escapes consistently. Represent brackets with @{ and @}
13572 rather than @<:@ and @:>@, since this works a bit better with dumb
13573 editors like vi. Represent @ with @@, since @ is now consistently
13574 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13575 __ofile__, to avoid unexpected expansions. Similarly, use @output
13576 rather than #output.
13577
13578 * data/c.m4 (b4_copyright): Omit file name from comment, since
13579 the file name could contain "*/".
13580 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13581 be quoted. All uses changed.
13582
13583 * data/glr.c: Use new @ escapes consistently.
13584 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13585 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13586 Remove, since they couldn't handle arbitrary characters in file
13587 names.
13588 * data/lalr1.cc: Likewise.
13589 * data/yacc.c: Likewise.
13590
13591 * src/files.c (output_infix): Remove; all uses removed.
13592 * src/files.h: Likewise.
13593
13594 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13595 mishandled funny characters in file names, and anyway it isn't
13596 needed any more.
13597 * data/yacc.c: Likewise.
13598 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13599
13600 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13601 * data/yacc.c: Likewise.
13602
13603 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13604 strings now.
13605 (muscle_init): Quote filename as a C string.
13606 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13607 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13608 * src/output.c (escaped_file_name_output): New function.
13609 (prepare_symbols): Quote tokens for M4.
13610 (prepare): Don't insert output_infix, output_prefix,
13611 output_parser_name, output_header_name; this is now down by scan-skel.
13612 Insert skeleton as a C string.
13613
13614 * src/output.c (user_actions_output, symbol_destructors_output,
13615 symbol_printers_output): Quote filenames for C and M4.
13616 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13617
13618 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13619 escapes other than \\ and \'; this simplifies the code.
13620 (<SC_STRING>): Likewise, for \\ and \".
13621 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13622 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13623 Use new escapes @{ and @} for [ and ].
13624
13625 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13626 them with auto vars.
13627 Switch to new escape scheme, where @ is the escape character uniformly.
13628 Abort if a stray escape character is found. Avoid unbounded input
13629 buffer when parsing non-escaped text.
13630
13631 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13632 __oline__, #output, $@, and @{ do not have unintended meanings.
13633
acea4f3b
PE
136342002-11-09 Paul Eggert <eggert@twinsun.com>
13635
13636 Fix the test failure due to GCC warnings described in
161a71f3 13637 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
13638 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13639 evaluate to 0 if it's impossible for NINF to be in the respective
13640 table.
13641 (yygetLRActions, yyrecoverParseError): Use them.
13642
13643 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13644 counted in the token inserted at end of file. Now takes
13645 location_t *, not location_t, so that the location can be
13646 adjusted. All uses changed.
13647
13648 * tests/regression.at (Invalid inputs): Adjust wording in
13649 diagnostic to match the new behavior.
13650
13651 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13652 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13653 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13654 abort ();'. This reduces the runtime of the "Many lookaheads"
13655 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13656 GCC 3.2.
13657
20ef1ad5
PE
136582002-11-07 Paul Eggert <eggert@twinsun.com>
13659
13660 * src/parse-gram.y (CHARACTER): Remove unused token.
13661 All uses removed.
13662
13663 * src/scan-gram.l: Remove stack option. We no longer use the
13664 stack, since the stack was never deeper than 1; instead, use the
13665 new auto var c_context to record the stacked value.
13666
13667 Remove nounput option. At an unexpected end of file, we now unput
13668 the minimal input necessary to end cleanly; this simplifies the
13669 code.
13670
13671 Avoid unbounded token sizes where this is easy.
13672
13673 (unexpected_end_of_file): New function.
13674 Use it to systematize the error message on unexpected EOF.
13675 (last-string): Now auto, not static.
13676 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13677 (scanner_last_string_free): Remove; not used.
13678 (percent_percent_count): Move decl to just before use.
13679 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13680 not the (never otherwised-used) CHARACTER.
13681
93724f13
AD
136822002-11-07 Akim Demaille <akim@epita.fr>
13683
13684 Let yyerror always receive the msg as last argument, so that
13685 yyerror can be variadic.
13686
13687 * data/yacc.c (b4_yyerror_args): New.
13688 Use it when calling yyerror.
13689 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13690 Use it when calling yyerror.
13691 * doc/bison.texinfo (Error Reporting): Adjust.
13692 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13693 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13694
6e40b4eb
AD
136952002-11-06 Akim Demaille <akim@epita.fr>
13696
13697 #line should have quoted strings.
13698 Ideally, this should be done by m4_quotearg.
13699
13700 * src/scan-skel.l: Include quotearg.h.
13701 Quote __ofile__.
13702 * src/output.c (symbol_printers_output)
13703 (symbol_destructors_output): Quote the file name.
13704
2dfbfc12
AD
137052002-11-06 Akim Demaille <akim@epita.fr>
13706
13707 * tests/regression.at (Invalid inputs): Adjust to the recent
13708 messages.
13709
437c2d80
AD
137102002-11-06 Akim Demaille <akim@epita.fr>
13711
13712 Restore --no-lines.
13713 Reported by Jim Kent.
13714
13715 * data/c.m4 (b4_syncline): New.
13716 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13717 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13718 * src/output.c (user_actions_output): Likewise.
13719 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 13720 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 13721
900c5db5
AD
137222002-11-06 Akim Demaille <akim@epita.fr>
13723
13724 * src/main.c (main): Free `infile'.
13725 * src/scan-gram.l (handle_syncline): New.
13726 Recognize `#line'.
13727 * src/output.c (user_actions_output, symbol_destructors_output)
13728 (symbol_printers_output): Use the location's file name, not
13729 infile.
13730 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13731
e183b123 137322002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 13733
e183b123 13734 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 13735 either has GLR conflict entries.
e183b123 13736
193eb6b7
PE
137372002-11-05 Paul Eggert <eggert@twinsun.com>
13738
e183b123
PE
13739 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13740 "integer out of range" rather than "invalid value".
13741 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13742 accordingly.
13743
193eb6b7
PE
13744 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13745 Also, remove one static variable in the scanner.
13746
13747 * src/scan-gram.l (braces_level): Now auto, not static.
13748 Initialize to zero if the compiler is being picky.
13749 (INITIAL): Clear braces_level instead of incrementing it.
13750 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13751 as POSIX 1003.1-2001 requires.
13752 * src/system.h (IF_LINT): New macro, taken from coreutils.
13753 * configure.ac: Define "lint" if --enable-gcc-warnings.
13754
29c01725
AD
137552002-11-05 Akim Demaille <akim@epita.fr>
13756
13757 * src/scan-gram.l: When it starts with `%', complain about the
13758 whole directive, not just that `invalid character: %'.
13759
8aeac3ca
AD
137602002-11-04 Akim Demaille <akim@epita.fr>
13761
13762 * Makefile.maint: Update from Autoconf.
13763 (update, cvs-update, po-update, do-po-update): New.
13764
793a58bb
AD
137652002-11-04 Akim Demaille <akim@epita.fr>
13766
13767 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13768 and yyerror.
13769 Have yyerror `use' its arguments.
13770 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13771 returns true when location & yacc & pure & parse-param.
13772 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13773
c4d720cd
AD
137742002-11-04 Akim Demaille <akim@epita.fr>
13775
13776 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13777 clashes.
13778 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13779 font-lock-mode.
13780 Use complain_at.
13781 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13782 slot 0.
13783
613a0dc5
PE
137842002-11-03 Paul Eggert <eggert@twinsun.com>
13785
13786 * src/reader.c (get_merge_function, grammar_current_rule_check):
13787 Use consistent diagnostics for reporting type name clashes.
13788 Quote the types with <>, for consistency with Yacc.
13789 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13790
2a8d363a
AD
137912002-11-03 Akim Demaille <akim@epita.fr>
13792
13793 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13794 New.
13795 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13796 (b4_parse_param): Remove.
13797 Use b4_identification.
13798 Propagate b4_pure_args where needed to pass them to yyerror.
13799 * data/glr.m4 (b4_parse_param): Remove.
13800 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13801 (b4_lpure_formals): New.
13802 Use b4_identification.
13803 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13804 b4_user_formals and b4_user_args.
13805 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13806 (yyreportAmbiguity): When using a pure parser, also need
13807 the location, and the parse-params.
13808 Adjust callers.
13809 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13810 When using a pure parser, also need the parse-params.
13811 Adjust callers.
13812 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13813 (%pure-parser + %parse-param) LALR and GLR parsers.
13814 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13815 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13816 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13817 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13818 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13819 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13820 * doc/bison.texinfo: Untabify the whole file.
13821 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13822 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13823 (Error Reporting): Adjust to these new directives.
13824 Document %error-verbose, deprecate YYERROR_VERBOSE.
13825
9e32add8
AD
138262002-11-03 Akim Demaille <akim@epita.fr>
13827
13828 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13829 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13830 command line options.
13831 * tests/cxx-type.at: Formatting changes.
13832
b02d90a5
PE
138332002-11-03 Paul Eggert <eggert@twinsun.com>
13834
13835 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13836 to count columns correctly, and to check for invalid inputs.
9e32add8 13837
b02d90a5
PE
13838 Use mbsnwidth to count columns correctly. Account for tabs, too.
13839 Include mbswidth.h.
13840 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13841 (extend_location): New function.
13842 (YY_LINES): Remove.
13843
13844 Handle CRLF in C code rather than in Lex code.
13845 (YY_INPUT): New macro.
13846 (no_cr_read): New function.
13847
13848 Scan UCNs, even though we don't fully handle them yet.
13849 (convert_ucn_to_byte): New function.
13850
13851 Handle backslash-newline correctly in C code.
13852 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13853 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13854 all uses changed.
13855 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13856 Use {splice} wherever C allows backslash-newline.
13857 YY_STEP after space, newline, vertical-tab.
13858 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 13859
b02d90a5
PE
13860 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13861
13862 ({int}, handle_action_dollar, handle_action_at): Check for integer
13863 overflow.
9e32add8 13864
b02d90a5
PE
13865 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13866
13867 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13868 as well as \000. Check for UCHAR_MAX, not 255.
13869 Allow \x with an arbitrary positive number of digits, as in C.
13870 Check for overflow here.
13871 Allow \? and UCNs, for compatibility with C.
13872
13873 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13874 with quote slot used by complain_at.
13875
13876 * tests/input.at: Add tests for backslash-newline, m4 quotes
13877 in symbols, long literals, and funny escapes in strings.
13878
13879 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13880 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13881 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13882 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13883 * m4/mbswidth.m4: New file, from GNU coreutils.
13884
13885 * doc/bison.texinfo (Grammar Outline): Document // comments.
13886 (Symbols): Document that trigraphs have no special meaning in Bison,
13887 nor is backslash-newline allowed.
13888 (Actions): Document that trigraphs have no special meaning.
13889
13890 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13891 no longer used.
13892
138932002-11-02 Paul Eggert <eggert@twinsun.com>
13894
13895 * src/reader.c: Don't include quote.h; not needed.
13896 (get_merge_function): Reword warning to be consistent with
13897 type clash diagnostic in grammar_current_rule_check.
13898
13899 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13900 bug in trigraph handling.
13901
13902 * src/output.c (prepare_symbols): When printing token names,
13903 escape "[" as "@<:@" and likewise for "]".
13904
13905 * src/system.h (errno): Remove declaration, as we are now
13906 assuming C89 or better, and C89 guarantees errno.
13907
762b212b
PE
139082002-10-30 Paul Eggert <eggert@twinsun.com>
13909
13910 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13911 Check for close failures.
13912 * src/files.h (xfclose): Return void, not int, since it always
13913 returned zero.
13914 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13915 indicates one.
13916 * src/output.c (output_skeleton): Use xfclose rather than fclose
13917 and ferror. xfclose now checks ferror.
13918
13919 * data/glr.c (YYLEFTMOST_STATE): Remove.
13920 (yyreportTree): Use a stack-based leftmost state. This avoids
13921 our continuing battles with bogus warnings about initializers.
13922
56100c60
AD
139232002-10-30 Akim Demaille <akim@epita.fr>
13924
13925 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13926 #if.
13927
51b4a04c
PH
139282002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13929
13930 * tests/glr-regr1.at: New test for reported regressions.
13931 * tests/testsuite.at: Add glr-regr1.at test.
13932 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 13933
bf1ebda2
PE
139342002-10-24 Paul Eggert <eggert@twinsun.com>
13935
5c16c6b1
PE
13936 Version 1.75a.
13937
bf1ebda2
PE
13938 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13939 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13940 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13941 Don't assume strdup exists; POSIX says its an XSI extension.
13942 Check for buffer overflow on input.
13943
b526ee61
AD
139442002-10-24 Akim Demaille <akim@epita.fr>
13945
13946 * src/output.c (output_skeleton): Don't disable M4sugar comments
13947 too soon: it results in comments being expanded.
13948 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13949 first output.
13950
f1886bb2
AD
139512002-10-24 Akim Demaille <akim@epita.fr>
13952
13953 * data/yacc.c (m4_int_type): New.
13954 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13955 char' as only yacc.c wants K&R portability.
13956 * data/glr.c (yysigned_char): Remove.
13957 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13958 Reported by Quoc Peyrot.
13959
c5576256
PE
139602002-10-23 Paul Eggert <eggert@twinsun.com>
13961
13962 * src/main.c (main): With --trace=time, report times even if a
13963 non-fatal error occurs. Formerly, the times were reported in some
13964 such cases but not in others.
13965 * src/reader.c (reader): Just return if a complaint has been issued,
13966 instead of exiting, so that 'main' can report times.
13967
27b0ffea
AD
139682002-10-22 Akim Demaille <akim@epita.fr>
13969
13970 * src/system.h: Include sys/types.
13971 Reported by Bert Deknuydt.
13972
223a7883
PE
139732002-10-23 Paul Eggert <eggert@twinsun.com>
13974
13975 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13976 Suggested by Art Haas.
13977
139782002-10-22 Paul Eggert <eggert@twinsun.com>
13979
13980 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13981 decl; not needed any more.
13982 * src/main.c (main): Use return to exit, undoing yesterday's change.
13983 The last OS that we could find where this wouldn't work is
13984 SunOS 3.5, and that's too old to worry about now.
13985
13986 * data/glr.c (struct yyltype): Define members even when not
13987 doing locations. This is more consistent with yacc.c, and it
13988 works around the following bug reports:
161a71f3
PE
13989 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13990 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 13991
223a7883
PE
13992 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13993 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13994 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13995
8b76775a
AD
139962002-10-22 Akim Demaille <akim@epita.fr>
13997
13998 * data/README: New.
13999
6db10d14
PE
140002002-10-21 Paul Eggert <eggert@twinsun.com>
14001
14002 Be consistent about 'bool'; the old code used an enum in one
14003 module and an int in another, and this violates the C standard.
14004 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14005 * configure.ac (AC_HEADER_STDBOOL): Add.
14006 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14007 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14008 * src/symtab.c (hash_compare_symbol_t): Likewise.
14009 * src/system.h (bool, false, true): Use a definition consistent
14010 with ../lib/hash.c. All uses changed.
14011
14012 * src/complain.c (warning_issued): Renamed from warn_message_count,
14013 so that we needn't worry about integer overflow (!).
14014 Now of type bool. All uses changed.
14015 (complaint_issued): Renamed from complain_message_count; likewise.
14016
14017 * src/main.c (main): Use exit to exit with failure.
27b0ffea 14018
6db10d14
PE
14019 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14020 rather than 1 and 0.
14021 * src/main.c (main): Likewise.
14022 * src/getargs.c (getargs): Likewise.
14023 * src/reader.c (reader): Likewise.
14024
14025 * src/getarg.c (getargs): Remove duplicate code for
14026 "Try `bison --help'".
14027
14028 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14029 What was that "2" for?
14030
14031 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14032 * src/getargs.c (usage): Likewise.
14033
14034 * src/getargs.c (getargs): When there are too few operands, report
14035 the last one. When there are too many, report the first extra
14036 one. This is how diffutils does it.
14037
92a060fd
PE
140382002-10-20 Paul Eggert <eggert@twinsun.com>
14039
14040 Remove K&R vestiges.
14041 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14042 * src/complain.c (VA_START): Remove. Assume prototypes.
14043 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14044 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14045 fatal): Assume prototypes.
14046 * src/complain.h: Assume prototypes.
14047 * src/system.h (PARAMS): Remove.
14048 Include <limits.h> unconditionally, since it's guaranteeed even
14049 for a freestanding C89 compiler.
14050 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14051 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 14052
e7cb57c0
AD
140532002-10-20 Akim Demaille <akim@epita.fr>
14054
14055 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14056 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14057 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14058 (yyresolveStates, yyresolveAction, yyresolveStack)
14059 (yyprocessOneStack): Use them.
14060 (yy_reduce_print): New.
14061 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14062
0245f82d
AD
140632002-10-20 Akim Demaille <akim@epita.fr>
14064
14065 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14066 arguments and output `void'.
14067 (b4_c_function): Rename as...
14068 (b4_c_function_def): this.
14069 (b4_c_function_decl, b4_c_ansi_function_def)
14070 (b4_c_ansi_function_decl): New.
14071 Change the interpretation of the arguments: before `int, foo', now
14072 `int foo, foo'.
14073 * data/yacc.c (yyparse): Prototype and define thanks to these.
14074 Adjust b4_c_function_def uses.
14075 * data/glr.c (yyparse): Likewise, but ANSI only.
14076
39912f52
AD
140772002-10-20 Akim Demaille <akim@epita.fr>
14078
14079 * src/output.c (prepare): Move the definition of `tokens_number',
14080 `nterms_number', `undef_token_number', `user_token_number_max'
14081 to...
14082 (prepare_tokens): Here.
14083 (prepare_tokens): Rename as...
14084 (prepare_symbols): this.
14085 (prepare): Move the definition of `rules_number' to...
14086 (prepare_rules): here.
14087 (prepare): Move the definition of `last', `final_state_number',
14088 `states_number' to...
14089 (prepare_states): here.
14090 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14091
20c1e2ad
AD
140922002-10-20 Akim Demaille <akim@epita.fr>
14093
14094 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14095
21964f43
AD
140962002-10-20 Akim Demaille <akim@epita.fr>
14097
14098 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14099 * data/c.m4: here.
14100
66d30cd4
AD
141012002-10-20 Akim Demaille <akim@epita.fr>
14102
14103 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14104 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14105 `pair'.
14106 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14107 `name' to...
14108 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14109 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14110 These.
14111
95f2c9fe
PE
141122002-10-19 Paul Eggert <eggert@twinsun.com>
14113
14114 Do not create a temporary file, as that involves security and
14115 cleanup headaches. Instead, use a pair of pipes.
14116 Derived from a suggestion by Florian Krohm.
14117 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14118 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14119 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14120 (BISON_PREREQ_SUBPIPE): Add.
14121 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14122 Add subpipe.h, subpipe.c.
14123 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14124 * po/POTFILES.in: Add lib/subpipe.c.
14125 * src/output.c: Include "subpipe.h".
14126 (m4_invoke): Remove decl.
14127 (scan_skel): New decl.
14128 (output_skeleton): Use pipe rather than temporary file for m4 input.
14129 Check that m4sugar.m4 is readable, to avoid deadlock.
14130 Check for pipe I/O error.
14131 * src/scan-skel.l (readpipe): Remove decl.
14132 (scan_skel): New function, to be used in place of m4_invoke.
14133 Read from stream rather than file.
66d30cd4 14134
95f2c9fe
PE
14135 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14136 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14137 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14138 this generates a more-accurate value anyway.
14139
14140 * lib/timevar.c (timervar_accumulate): Rename locals to
14141 avoid confusion with similarly-named more-global.
14142 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14143
14144 * src/output.c (prepare): Use xstrdup to convert char const *
14145 to char *, to avoid GCC warning.
14146
c19988b7
AD
141472002-10-19 Akim Demaille <akim@epita.fr>
14148
14149 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14150 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14151 Use them to have `calc.y' ready for %pure-parser.
14152 * data/yacc.c (YYLEX): Pass a yylex return type to
14153 b4_c_function_call.
14154
ae7453f2
AD
141552002-10-19 Akim Demaille <akim@epita.fr>
14156
14157 Prototype support of %lex-param and %parse-param.
14158
14159 * src/parse-gram.y: Add the definition of the %lex-param and
14160 %parse-param tokens, plus their rules.
14161 Drop the `_' version of %glr-parser.
14162 Add the "," token.
14163 * src/scan-gram.l (INITIAL): Scan them.
14164 * src/muscle_tab.c: Comment changes.
14165 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14166 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14167 (muscle_entry_s): The `value' member is no longer const.
14168 Adjust all dependencies.
14169 * src/muscle_tab.c (muscle_init): Adjust: use
14170 MUSCLE_INSERT_STRING.
14171 Initialize the obstack earlier.
14172 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14173 (muscle_pair_list_grow): New.
14174 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14175 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14176 * tests/calc.at: Use %locations, not --locations.
14177 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14178
0e575721
AD
141792002-10-19 Akim Demaille <akim@epita.fr>
14180
14181 * src/getargs.c (usage): Take status as argument and exit
14182 accordingly.
14183 Report the traditional `Try ... --help' message when status != 0.
14184 (usage, version): Don't take a FILE * as arg, it is pointless.
14185 (getargs): When there is an incorrect number of arguments, make it
14186 an error, and report it GNUlically thanks to `usage ()'.
14187
724ce7f5
PE
141882002-10-18 Paul Eggert <eggert@twinsun.com>
14189
3a781eb2
PE
14190 * data/glr.c (yyreportParseError): Don't assume that sprintf
14191 yields the length of the printed string, as this is not true
14192 on SunOS 4.1.4. Reported by Peter Klein.
14193
724ce7f5
PE
14194 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14195 * tests/conflicts.at (%nonassoc and eof): Likewise.
14196 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14197
473d0a75
AD
141982002-10-17 Akim Demaille <akim@epita.fr>
14199
14200 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14201 * src/getargs.c (trace_types, trace_args): Adjust.
14202 * src/reader.c (grammar_current_rule_prec_set)
14203 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14204 Standardize error messages.
14205 And s/@prec/%prec/!
14206 (reader): Use trace_flag to enable scanner/parser debugging,
14207 instead of an adhoc scheme.
14208 * src/scan-gram.l: Remove trailing debugging code.
14209
e76d2469
PE
142102002-10-16 Paul Eggert <eggert@twinsun.com>
14211
93e2236a
PE
14212 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14213 MUSCLE_TAB_H.
14214
e76d2469
PE
14215 * NEWS: Officially drop support for building Bison with K&R C,
14216 since it didn't work anyway and it's not worth worrying about.
14217 * Makefile.maint (wget_files): Remove ansi2knr.c.
14218 (ansi2knr.c-url_prefix): Remove.
14219 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14220 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14221 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14222
5bd1c419
PE
142232002-10-15 Paul Eggert <eggert@twinsun.com>
14224
14225 Stop using the "enum_" trick for K&R-style function definitions;
14226 it confused me, and I was the author! Instead, assume that people
14227 who want to use K&R C compilers (when using these modules in GCC,
14228 perhaps?) will run ansi2knr.
14229
14230 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14231 All uses of "enum_" changed to "enum ".
14232 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14233 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 14234
5bd1c419
PE
14235 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14236 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14237 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14238 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14239 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14240 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14241 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14242 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14243 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14244 Use function prototypes; this removes the need for declaring
14245 static functions simply to provide their prototypes.
14246 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14247 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14248 bitset_count_, bitset_create, bitset_dump, bitset_first,
14249 bitset_free, bitset_init, bitset_last, bitset_next,
14250 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14251 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14252 bitset_print, bitset_release_memory, bitset_toggle_,
14253 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14254 debug_bitset): Likewise.
14255 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14256 * lib/bitset_stats.c (bitset_log_histogram_print,
14257 bitset_percent_histogram_print, bitset_stats_and,
14258 bitset_stats_and_cmp, bitset_stats_and_or,
14259 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14260 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14261 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14262 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14263 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14264 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14265 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14266 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14267 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14268 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14269 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14270 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14271 bitset_stats_zero): Likewise.
14272 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14273 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14274 bitsetv_dump, debug_bitsetv): Likewise.
14275 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14276 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14277 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14278 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14279 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14280 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14281 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14282 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14283 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14284 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14285 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14286 Likewise.
14287 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14288 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14289 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14290 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14291 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14292 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14293 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14294 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14295 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14296 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14297 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 14298
ae26e1f0
AD
142992002-10-14 Akim Demaille <akim@epita.fr>
14300
14301 Version 1.75.
14302
d43baf71
AD
143032002-10-14 Akim Demaille <akim@epita.fr>
14304
14305 * tests/Makefile.am (maintainer-check-posix): New.
14306
7ebc83e3
AD
143072002-10-14 Akim Demaille <akim@epita.fr>
14308
14309 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14310 member.
14311
05846dae
AD
143122002-10-14 Akim Demaille <akim@epita.fr>
14313
14314 * src/tables.c (table_ninf_remap): base -> tab.
14315 Reported by Matt Rosing.
14316
1318e37d
PE
143172002-10-14 Paul Eggert <eggert@twinsun.com>
14318
447fbb17
PE
14319 * tests/action.at, tests/calc.at, tests/conflicts.at,
14320 tests/cxx-type.at, tests/headers.at, tests/input.at,
14321 tests/regression.at, tests/synclines.at, tests/torture.at:
14322 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14323 so that the tests still work even if POSIXLY_CORRECT is set.
14324 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 14325
1318e37d
PE
14326 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14327 for portability to K&R hosts. Fix typo: signed char is guaranteed
14328 only to 127, not to 128.
14329 * data/glr.c (yysigned_char): New type.
14330 * data/yacc.c (yysigned_char): Likewise.
14331 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14332
cc0f0794
PE
143332002-10-13 Paul Eggert <eggert@twinsun.com>
14334
5038f418
PE
14335 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14336 true due to limited range of data type" warning from GCC.
14337
cc0f0794
PE
14338 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14339 by wrapping enum yytokentype's definition inside #ifndef
14340 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14341
6fed0802
AD
143422002-10-13 Akim Demaille <akim@epita.fr>
14343
14344 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14345 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14346
32f0598d
AD
143472002-10-13 Akim Demaille <akim@epita.fr>
14348
14349 * Makefile.maint: Update from Autoconf 2.54.
14350 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14351
7ea9a33f
AD
143522002-10-13 Akim Demaille <akim@epita.fr>
14353
14354 * src/print.c (print_state): Separate the list of solved conflicts
14355 from the other items.
14356 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14357
ea99527d
AD
143582002-10-13 Akim Demaille <akim@epita.fr>
14359
14360 Let nondeterministic skeletons be usable with deterministic
14361 tables.
14362
14363 With the patch, GAWK compiled by GCC without -O2 passes its test
14364 suite using a GLR parser driven by LALR tables. It fails with -O2
14365 because `struct stat' gives two different answers on my machine:
14366 88 (definition of an auto var) and later 96 (memset on this var).
14367 Hence the stack is badly corrumpted. The headers inclusion is to
14368 blame: if I move the awk.h inclusion before GLR's system header
14369 inclusion, the two struct stat have the same size.
14370
14371 * src/tables.c (pack_table): Always create conflict_table.
14372 (token_actions): Always create conflict_list.
14373 * data/glr.c (YYFLAG): Remove, unused.
14374
f377f69f
AD
143752002-10-13 Akim Demaille <akim@epita.fr>
14376
14377 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14378 (O0FLAGS): New.
14379 (VALGRIND, GXX): New.
14380 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14381 * tests/bison.in: Run $PREBISON a pre-command.
14382 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14383 (maintainer-check-g++): New.
14384 * Makefile.am (maintainer-check): New.
14385
2a1fe6ed
AD
143862002-10-13 Akim Demaille <akim@epita.fr>
14387
14388 * data/glr.c: Formatting changes.
14389 Tweak some trace messages to match yacc.c's.
14390
f50adbbd
AD
143912002-10-13 Akim Demaille <akim@epita.fr>
14392
14393 GLR parsers sometimes raise parse errors instead of performing the
14394 default reduction.
14395 Reported by Charles-Henry de Boysson.
14396
14397 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 14398 check the length of the traces when %glr.
f50adbbd
AD
14399 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14400 GLR's traces.
14401 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14402 Test GLR parsers.
14403 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14404 (yyltype): Remove the yy prefix from the member names.
14405 (yytable): Complete its comment.
14406 (yygetLRActions): Map error action number from YYTABLE from
14407 YYTABLE_NINF to 0.
14408 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14409 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14410 not satisfying as we could compare an YYACTION computed from
14411 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14412 only value for error actions.
14413 (yyreportParseError): In verbose parse error messages, don't issue
14414 `error' in the list of expected tokens.
14415 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14416 next action to perform to match glr.c's decoding.
14417 (yytable): Complete its comment.
14418
bcbad5b9
PE
144192002-10-13 Paul Eggert <eggert@twinsun.com>
14420
14421 Fix problem reported by Henrik Grubbstroem in
161a71f3 14422 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
14423 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14424 because the Bison parser reads the second action before reducing
14425 the first one.
14426 * src/scan-gram.l (rule_length): New static var.
14427 Use it to keep track of the rule length in the scanner, since
14428 we can't expect the parser to be in lock-step sync with the scanner.
14429 (handle_action_dollar, handle_action_at): Use this var.
14430 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 14431
14904b89
PE
144322002-10-12 Paul Eggert <eggert@twinsun.com>
14433
1fe611e5
PE
14434 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14435 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14436 Include <sys/time.h> when checking for clock_t and struct tms.
14437 Use same include order as source.
14438 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 14439 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 14440
1fe611e5
PE
14441 * lib/timevar.c: Update copyright date and clarify comments.
14442 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 14443
1fe611e5
PE
14444 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14445 GCC version as of today, then merge Bison's changes.
14446 Change "GCC" to "Bison" in copyright notice. timevar.def's
14447 author is Akim, so change that too.
14448
98194095
PE
14449 * src/reader.c (grammar_current_rule_check):
14450 Don't worry about the default action if $$ is untyped.
14451 Prevents bogus warnings reported by Jim Gifford in
161a71f3 14452 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 14453
14904b89
PE
14454 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14455 * data/glr.c, data/lalr1.cc, data/yacc.c:
14456 Output token definitions before the first part of user declarations.
14457 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 14458 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 14459
ff6dca18
PE
144602002-10-11 Paul Eggert <eggert@twinsun.com>
14461
14462 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14463 (yyparse): here. This undoes some of the 2002-07-25 change.
14464 Compatibility problem reported by Ralf S. Engelschall with
14465 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14466
eb714592
AD
144672002-10-11 Akim Demaille <akim@epita.fr>
14468
14469 * tests/regression.at Characters Escapes): New.
14470 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14471 characters.
14472 Reported by Jan Nieuwenhuizen.
14473
b7195100
AD
144742002-10-11 Akim Demaille <akim@epita.fr>
14475
14476 * po/id.po: New.
14477
f28a0f2d
PE
144782002-10-10 Paul Eggert <eggert@twinsun.com>
14479
14480 Portability fixes for bitsets; this also avoids several GCC
14481 warnings.
14482
14483 * lib/abitset.c: Include <stddef.h>, for offsetof.
14484 * lib/lbitset.c: Likewise.
14485
14486 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14487 properly for vectors of objects. Do not assume that adding a
14488 header size to a multiple of a word size yields a value that is
14489 properly aligned for the whole union.
14490 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14491
14492 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14493 unique names for structures.
14494 * lib/ebitset.c (ebitset_bytes): Likewise.
14495 * lib/lbitset.c (lbitset_bytes): Likewise.
14496
14497 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14498 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14499 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14500 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14501 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14502 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14503 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14504 to improve the type-checking that GCC can do.
14505 * lib/bitset.c (bitset_op4_cmp): Likewise.
14506 * lib/bitset_stats.c (bitset_stats_count,
14507 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14508 bitset_stats_copy, bitset_stats_disjoint_p,
14509 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14510 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14511 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14512 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14513 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14514 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14515 bitset_stats_or_and_cmp): Likewise.
14516 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14517 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14518 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14519 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14520
14521 * lib/abitset.h: Include bitset.h, not bbitset.h.
14522 * lib/ebitset.h: Likewise.
14523 * lib/lbitset.h: Likewise.
14524
14525 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14526 All instances of parameters of type enum bitset_opts are now of
14527 type enum_bitset_opts, to conform to the C Standard, and similarly
14528 for enum_bitset_type.
14529 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14530 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14531
14532 Do not use "struct bitset_struct" to mean different things in
14533 different modules. Not only is this confusing, it violates
14534 the C Standard, which requires that structure types in different
14535 modules must be compatible if one is to be passed to the other.
14536 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14537 All instances of "struct bitset_struct *" replaced with "bitset".
14538 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14539 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14540 struct lbitset_struct, struct bitset_stats_struct): New types.
14541 All uses of struct bitset_struct changed to union bitset_union,
14542 etc.
ba0fe3c7 14543 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
14544 struct bitset_struct): Remove.
14545 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14546 struct bitset_struct): Remove.
14547 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14548 bitset_struct): Remove.
14549 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14550 Likewise.
14551
14552 Do not call a function of type T using a call that assumes the
14553 function is of a different type U. Standard C requires that a
14554 function must be called with a type that is compatible with its
14555 definition.
14556 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14557 New decls.
14558 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14559 New functions.
14560 * lib/ebitset.c (PFV): Remove.
14561 * lib/lbitset.c (PFV): Likewise.
14562 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14563 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14564 decls.
14565 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14566 (ebitset_vtable): Use them.
14567 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14568 lbitset_xor): New functions.
14569 (lbitset_vtable): Use them.
14570
14571 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14572 Declare.
14573
14574 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14575 GCC warning.
14576 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14577 Use offsetof, for simplicity.
14578
6fbe4984
PE
145792002-10-06 Paul Eggert <eggert@twinsun.com>
14580
14581 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14582 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 14583 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
14584 which was inadvertently undone by the 2002-09-30 patch.
14585 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14586 the same width as int.
14587
420f93c8
PE
145882002-10-04 Paul Eggert <eggert@twinsun.com>
14589
14590 Version 1.50.
14591
14592 * configure.ac (AC_INIT), NEWS: Increment version number.
14593
14594 * doc/bison.texinfo: Minor spelling, grammar, and white space
14595 fixes.
14596 (Symbols): Mention that any negative value returned from yylex
14597 signifies end-of-input. Warn about negative chars. Mention
14598 the portable Standard C character set.
14599
14600 The GNU coding standard says CFLAGS and YFLAGS are reserved
14601 for the installer to set.
14602 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14603 * src/Makefile.am (AM_CFLAGS): Likewise.
14604 (AM_YFLAGS): Renamed from YFLAGS.
14605
14606 Fix some MAX and MIN problems.
14607 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14608 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14609 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14610 * src/reader.c (reader): Use it.
14611
14612 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14613 POSIX 1003.1-2001 has removed fgrep.
14614
146152002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14616
14617 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14618 interpreted as signed.
14619 * lib/ebitset.c (ebitset_list): Fix bug.
14620
ff68026d
PE
146212002-10-01 Paul Eggert <eggert@twinsun.com>
14622
14623 More fixes for 64-bit hosts and large bitsets.
14624
14625 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14626 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14627 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14628 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14629 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14630 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14631 bitset_count_): Likewise.
14632 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14633 bitset_first, bitset_last): Likewise.
14634 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14635 bitset_stats_list_reverse, bitset_stats_size,
14636 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14637 Likewise.
14638 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14639 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14640 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14641 bitsetv_reflexive_transitive_closure): Likewise.
14642 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14643 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14644 Likewise.
14645 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14646 Likewise.
420f93c8 14647
ff68026d
PE
14648 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14649 Use size_t, not unsigned int, to count bytes.
14650 * lib/abitset.h (abitset_bytes): Likewise.
14651 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14652 Likewise.
14653 * lib/bitset.h (bitset_bytes): Likewise.
14654 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14655 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14656 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14657 * lib/ebitset.c (ebitset_bytes): Likewise.
14658 * lib/ebitset.h (ebitset_bytes): Likewise.
14659 * lib/lbitset.c (lbitset_bytes): Likewise.
14660 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 14661
ff68026d
PE
14662 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14663 abitset_subset_p, abitset_disjoint_p, abitset_and,
14664 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14665 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14666 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14667 abitset_or_and, abitset_or_and_cmp):
14668 Use bitset_windex instead of unsigned int.
14669 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14670 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14671 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14672 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14673 Likewise.
14674 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 14675
ff68026d
PE
14676 * lib/bitset.c (bitset_print):
14677 Use proper printf formats for widths of integer types.
14678 * lib/bitset_stats.c (bitset_percent_histogram_print,
14679 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14680 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14681 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14682 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 14683
ff68026d
PE
14684 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14685 BITSET_SIZE_MAX): New macros.
14686 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14687 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14688 to BITSET_WINDEX_MAX.
14689
14690 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14691 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14692 since we now return the bitset_bindex type (not int).
14693
14694 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14695 when computing sizes.
14696 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14697
14698 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14699 and avoid cast to unsigned.
14700
6aa452a6
AD
147012002-09-30 Akim Demaille <akim@epita.fr>
14702
14703 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14704 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14705 Updates from Michael Hayes.
14706
927f7817
AD
147072002-09-30 Art Haas <ahaas@neosoft.com>
14708
14709 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14710 invocations.
14711 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14712 defined.
14713
9738f41e
AD
147142002-09-27 Akim Demaille <akim@epita.fr>
14715
14716 Version 1.49c.
14717
a5c75d7f
AD
147182002-09-27 Akim Demaille <akim@epita.fr>
14719
14720 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14721 (Because of AC_LIBSOURCE).
14722
8280e179
AD
147232002-09-27 Akim Demaille <akim@epita.fr>
14724
14725 Playing with Autoscan.
14726
14727 * configure.ac: Remove the old LIBOBJ tweaks.
14728 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14729 * lib/strrchr.c: New.
14730 * lib/strtol.c: New, from the Coreutils 4.5.1.
14731
ae64af35
AD
147322002-09-27 Akim Demaille <akim@epita.fr>
14733
14734 Playing with Autoscan.
14735
14736 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14737 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14738 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14739 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14740 Coreutils 4.5.1.
14741
d1a1114f
AD
147422002-09-24 Akim Demaille <akim@epita.fr>
14743
14744 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14745 (Frequently Asked Questions, Parser Stack Overflow): New.
14746
b906441c
AD
147472002-09-13 Akim Demaille <akim@epita.fr>
14748
14749 Playing with autoscan.
14750
14751 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14752 * src/files.c (skeleton_find): Remove, unused.
14753 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14754 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14755
bd701811
AD
147562002-09-13 Akim Demaille <akim@epita.fr>
14757
14758 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14759 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14760
e0a13e7b
AD
147612002-09-13 Akim Demaille <akim@epita.fr>
14762
14763 * configure.ac: Require 2.54.
14764 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14765 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14766 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14767 Remove, provided by Autoconf macros.
14768
c97011bf
AD
147692002-09-12 Akim Demaille <akim@epita.fr>
14770
14771 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14772
d862b1be
AD
147732002-09-12 Akim Demaille <akim@epita.fr>
14774
14775 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14776 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14777 Reported by Martin Mokrejs.
14778
3d38c03a
AD
147792002-09-10 Akim Demaille <akim@epita.fr>
14780
14781 * src/parse-gram.y: Associate a human readable string to each
14782 token type.
14783 * tests/regression.at (Invalid inputs): Adjust.
14784
b6347355
AD
147852002-09-10 Gary V. Vaughan <gary@gnu.org>
14786
14787 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14788 with an Autoconf-2.5x style configure.ac.
14789
09ba4ab2
PE
147902002-09-06 Paul Eggert <eggert@twinsun.com>
14791
14792 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14793 exception applies only to yacc.c. This is a modification of a
14794 patch originally suggested by Akim Demaille.
14795
21846f69
AD
147962002-09-06 Akim Demaille <akim@epita.fr>
14797
09ba4ab2
PE
14798 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14799 here to...
14800 * data/yacc.c: here.
14801
21846f69
AD
14802 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14803 LocationType.
14804 (b4_ltype): Default to yy::Location from location.hh.
14805
c0ad8bf3
AD
148062002-09-04 Jim Meyering <jim@meyering.net>
14807
14808 * data/yacc.c: Guard the declaration of yytoknum also with
14809 `#ifdef YYPRINT', so it is declared only when used.
14810
3a93251e
AD
148112002-09-04 Akim Demaille <akim@epita.fr>
14812
14813 * configure.in: Rename as...
14814 * configure.ac: this.
14815 Bump to 1.49c.
14816
427c0dda
AD
148172002-09-04 Akim Demaille <akim@epita.fr>
14818
14819 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14820 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14821 translate maintainer only messages.
14822
6a254321
PE
148232002-08-12 Paul Eggert <eggert@twinsun.com>
14824
645e30d1
PE
14825 Version 1.49b.
14826
6a254321
PE
14827 * Makefile.am (SUBDIRS): Remove intl.
14828 (DISTCLEANFILES): Remove.
14829 * NEWS: Mention that GNU M4 is now required. Clarify what is
14830 meant by "larger grammars". Mention the pt_BR translation.
14831 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14832 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14833 Bump version from 0.11.2 to 0.11.5.
14834 (BISON_PREREQ_STAGE): Remove.
14835 (AM_GNU_GETTEXT): Use external gettext.
14836 (AC_OUTPUT): Remove intl/Makefile.
14837
14838 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14839
14840 * data/glr.c: Include string.h, for strlen.
14841 (yyreportParseError): Use size_t for yysize.
14842 (yy_yypstack): No longer nested inside yypstates, as nested
14843 functions are not portable. Do not assume size_t is the
14844 same width as int.
14845 (yypstates): Do not assume that ptrdiff_t is the same width
14846 as int, and similarly for yyposn and YYINDEX.
14847
14848 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14849
14850 * lib/Makefile.am (INCLUDES): Do not include from the intl
14851 directory, which has been removed.
14852 * src/Makefile.am (INCLUDES): Likewise.
14853
14854 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14855 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14856 New vars.
14857
14858 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14859 * tests/Makefile.am (EXTRA_DIST): Likewise.
14860
14861 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14862 Do not assume that bitset_windex is the same width as unsigned.
14863
14864 * lib/abitset.c (abitset_unused_clear): Do not assume that
14865 bitset_word is the same width as int.
14866 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14867 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14868 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14869 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14870 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14871
14872 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14873 portability to one's complement hosts!).
14874 * lib/ebitset.c (ebitset_op1): Likewise.
14875 * lib/lbitset.c (lbitset_op1): Likewise.
14876
14877 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14878 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14879 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14880 Sync with fileutils.
14881 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14882 lib/gettext.h: Sync with diffutils.
14883
14884 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14885 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14886
14887 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14888 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14889 check for void *.
14890
14891 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14892 size_t; the old version tried to do this but casted improperly.
14893 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14894 (bitset_test): Now returns int, not unsigned long.
14895
14896 * lib/bitset_stats.c: Include "gettext.h".
14897 (_): New macro.
14898 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14899 name locals "index", as it generates unnecessary warnings on some
14900 hosts that have an "index" function.
14901
14902 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14903 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14904 they need translation.
14905 * src/LR0.c (state_list_append, new_itemsets, get_state,
14906 append_states, generate_states): Likewise.
14907 * src/assoc.c (assoc_to_string): Likewise.
14908 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14909 * src/gram.c (grammar_dump): Likewise.
14910 * src/injections.c (injections_compute): Likewise.
14911 * src/lalr.c (lookaheads_print): Likewise.
14912 * src/relation.c (relation_transpose): Likewise.
14913 * src/scan-gram.l: Likewise.
14914 * src/tables.c (table_grow, pack_vector): Likewise.
14915
14916 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14917 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14918 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14919 * m4/mbstate_t.m4: Sync with fileutils.
14920 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14921
14922 * po/LINGUAS: Add pt_BR.
14923 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14924 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14925 lib/timevar.c.
14926 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14927 manual recommends.
14928 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14929
14930 * src/complain.c (strerror_r): Remove decl; not needed.
14931 (strerror): Use same pattern as ../lib/error.c.
14932
14933 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14934
14935 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14936
14937 * src/main.c (main): Cast result of bindtextdomain and textdomain
14938 to void, to avoid a GCC warning when --disable-nls is in effect.
14939
14940 * src/scan-gram.l: Use strings rather than escapes when possible,
14941 to minimize the number of warnings from xgettext.
14942 (handle_action_dollar, handle_action_at): Don't use isdigit,
14943 as it mishandles negative chars and it may not work as expected
14944 outside the C locale.
14945
14946 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14947 this is a GCC extension and is not portable to other compilers.
14948
14949 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14950 Do not include <ctype.h>; no longer needed.
14951 Do not include <malloc.h>; no longer needed (and generates
14952 warnings on OpenBSD 3.0).
14953
14954 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14955 it's not portable.
14956
14957 * tests/regression.at: Do not use 'cc -c input.c -o input';
14958 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14959
14960 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14961 exit status as failure, not just exit status 1. Sun C exits
14962 with status 2 sometimes.
14963
14964 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14965 Use it for the two large tests.
14966
c8f002c7
AD
149672002-08-02 Akim Demaille <akim@epita.fr>
14968
14969 * src/conflicts.c (conflicts_output): Don't output rules never
14970 reduced here, since anyway that computation doesn't work.
14971 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14972 (rule_useless_p, rule_never_reduced_p): New.
14973 (grammar_rules_partial_print): Use a filter instead of a range.
14974 Display the title only if needed.
14975 (grammar_rules_print): Adjust.
14976 (grammar_rules_never_reduced_report): New.
14977 * src/tables.c (action_row): Move the computation of rules never
14978 reduced to...
14979 (token_actions): here.
14980 * src/main.c (main): Make the parser before making the report, so
14981 that rules never reduced are computed.
14982 Call grammar_rules_never_reduced_report.
14983 * src/print.c (print_results): Report rules never reduced.
14984 * tests/conflicts.at, tests/reduce.at: Adjust.
14985
cd08e51e
AD
149862002-08-01 Akim Demaille <akim@epita.fr>
14987
14988 Instead of attaching lookaheads and duplicating the rules being
14989 reduced by a state, attach the lookaheads to the reductions.
14990
14991 * src/state.h (state_t): Remove the `lookaheads',
14992 `lookaheads_rule' member.
14993 (reductions_t): Add a `lookaheads' member.
14994 Use a regular array for the `rules'.
14995 * src/state.c (reductions_new): Initialize the lookaheads member
14996 to 0.
14997 (state_rule_lookaheads_print): Adjust.
14998 * src/state.h, src/state.c (state_reductions_find): New.
14999 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15000 (count_rr_conflicts): Adjust.
15001 * src/lalr.c (LArule): Remove.
15002 (add_lookback_edge): Adjust.
15003 (state_lookaheads_count): New.
15004 (states_lookaheads_initialize): Merge into...
15005 (initialize_LA): this.
15006 (lalr_free): Adjust.
15007 * src/main.c (main): Don't free nullable and derives too early: it
15008 is used by --verbose.
15009 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15010
bb0027a9
AD
150112002-08-01 Akim Demaille <akim@epita.fr>
15012
15013 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15014 `rule_number_t**'.
15015 (set_derives, free_derives): Rename as...
15016 (derives_compute, derives_free): this.
15017 Adjust all dependencies.
15018 * src/nullable.c (set_nullable, free_nullable): Rename as...
15019 (nullable_compute, nullable_free): these.
15020 (rule_list_t): Store rule_t *, not rule_number_t.
15021 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15022 pointers, instead of their numbers.
15023 * src/main.c (main): Call nullable_free, and derives_free earlier,
15024 as they were lo longer used.
15025
3325ddc4
AD
150262002-08-01 Akim Demaille <akim@epita.fr>
15027
15028 * lib/timevar.c (get_time): Include children time.
15029 * src/lalr.h (LA, LArule): Don't export them: used with the
15030 state_t.
15031 * src/lalr.c (LA, LArule): Static.
15032 * src/lalr.h, src/lalr.c (lalr_free): New.
15033 * src/main.c (main): Call it.
15034 * src/tables.c (pack_vector): Check whether loc is >= to the
15035 table_size, not >.
15036 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15037 (tables_generate): do it, since that's also it which allocates
15038 them.
15039 Don't free LA and LArule, main does.
15040
c6f1a33c
AD
150412002-07-31 Akim Demaille <akim@epita.fr>
15042
15043 Separate parser tables computation and output.
15044
15045 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15046 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15047 (yydefgoto, yydefact, high): Move to...
15048 * src/tables.h, src/tables.c: here.
15049 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15050 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15051 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15052 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15053 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15054 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15055 (action_row, save_row, token_actions, save_column, default_goto)
15056 (goto_actions, sort_actions, matching_state, pack_vector)
15057 (table_ninf_remap, pack_table, prepare_actions): Move to...
15058 * src/tables.c: here.
15059 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15060 * src/output.c (token_actions, output_base, output_conflicts)
15061 (output_check): Merge into...
15062 (prepare_actions): this.
15063 (actions_output): Rename as...
15064 (user_actions_output): this.
15065 * src/main.c (main): Call tables_generate and tables_free.
15066
1509d42f
AD
150672002-07-31 Akim Demaille <akim@epita.fr>
15068
15069 Steal GCC's --time-report support.
15070
15071 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15072 stolen/adjusted from GCC.
15073 * m4/stage.m4: Remove time related checks.
15074 * m4/timevar.m4: New.
15075 * configure.in: Adjust.
15076 * src/system.h: Adjust to using timevar.h.
15077 * src/getargs.h, src/getargs.c: Support trace_time for
15078 --trace=time.
15079 * src/main.c (stage): Remove.
15080 (main): Replace `stage' invocations with timevar calls.
15081 * src/output.c: Insert pertinent timevar calls.
15082
273a74fa
AD
150832002-07-31 Akim Demaille <akim@epita.fr>
15084
15085 Let --trace have arguments.
15086
15087 * src/getargs.h (enum trace_e): New.
15088 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15089 (long_options, short_options): --trace/-T takes an optional
15090 argument.
15091 Change all the uses of trace_flag to reflect the new flags.
15092 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15093
15094 Strengthen `stage' portability.
15095
15096 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15097 * configure.in: Use it.
15098 Don't check for malloc.h and sys/times.h.
15099 * src/system.h: Include them when appropriate.
15100 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15101 times and struct tms are available.
15102
217598da
AD
151032002-07-30 Akim Demaille <akim@epita.fr>
15104
15105 In verbose parse error message, don't report `error' as an
15106 expected token.
15107 * tests/actions.at (Printers and Destructors): Adjust.
15108 * tests/calc.at (Calculator $1): Adjust.
15109 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15110 error message, do not report the parser accepts the error token in
15111 that state.
15112
52489d44
AD
151132002-07-30 Akim Demaille <akim@epita.fr>
15114
15115 Normalize conflict related messages.
15116
15117 * src/complain.h, src/complain.c (warn, complain): New.
15118 * src/conflicts.c (conflicts_print): Use them.
15119 (conflict_report_yacc): New, extracted from...
15120 (conflicts_print): here.
15121 * tests/conflicts.at, tests/existing.at: Adjust.
15122
e8832397
AD
151232002-07-30 Akim Demaille <akim@epita.fr>
15124
15125 Report rules which are never reduced by the parser: those hidden
15126 by conflicts.
15127
15128 * src/LR0.c (save_reductions): Don't make the final state too
15129 different: save its reduction (accept) instead of having a state
15130 without any action (no shift or goto, no reduce).
15131 Note: the final state is now a ``regular'' state, i.e., the
15132 parsers now contain `reduce 0' as default reduction.
15133 Nevertheless, since they decide to `accept' when yystate =
15134 final_state, they still will not reduce rule 0.
15135 * src/print.c (print_actions, print_reduction): Adjust.
15136 * src/output.c (action_row): Track reduced rules.
15137 (token_actions): Report rules never reduced.
15138 * tests/conflicts.at, tests/regression.at: Adjust.
15139
caf23d24
AD
151402002-07-30 Akim Demaille <akim@epita.fr>
15141
15142 `stage' was accidently included in a previous patch.
15143 Initiate its autoconfiscation.
15144
15145 * configure.in: Look for malloc.h and sys/times.h.
15146 * src/main.c (stage): Adjust.
15147 Report only when trace_flag.
15148
640748ee
AD
151492002-07-29 Akim Demaille <akim@epita.fr>
15150
15151 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15152 state_number_t.
15153 (errs_t): symbol_t*, not symbol_number_t.
15154 (reductions_t): rule_t*, not rule_number_t.
15155 (FOR_EACH_SHIFT): New.
15156 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15157 * src/print.c, src/print_graph.c: Adjust.
15158
88bce5a2
AD
151592002-07-29 Akim Demaille <akim@epita.fr>
15160
15161 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15162
15163 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15164 (endtoken, accept): these.
15165 * src/reader.c (reader): Set endtoken's default tag to "$end".
15166 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15167 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15168 Adjust.
15169
1bfb97db
AD
151702002-07-29 Akim Demaille <akim@epita.fr>
15171
15172 * src/reduce.c (reduce_grammar): When the language is empty,
15173 complain about the start symbol, not the axiom.
15174 Use its location.
15175 * tests/reduce.at (Empty Language): New.
15176
fc5734fe
AD
151772002-07-26 Akim Demaille <akim@epita.fr>
15178
15179 * src/reader.h, src/reader.c (gram_error): ... can't get
15180 yycontrol without making too strong assumptions on the parser
15181 itself.
15182 * src/output.c (prepare_tokens): Use the real 0th value of
15183 token_translations instead of `0'.
15184 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15185 visible here.
15186 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15187 for the time being: %locations ought to provide it to yyerror.
15188
3650b4b8
AD
151892002-07-25 Akim Demaille <akim@epita.fr>
15190
15191 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15192 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15193 * tests/regression.at (Web2c Actions): Adjust.
15194
4b3d3a8e
AD
151952002-07-25 Akim Demaille <akim@epita.fr>
15196
15197 Stop storing rules from 1 to nrules + 1.
15198
15199 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15200 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15201 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15202 Iterate from 0 to nrules.
15203 Use rule_number_as_item_number and item_number_as_rule_number.
15204 Adjust to `derive' now containing possibly 0.
15205 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15206 Handle the `- 1' part in rule numbers from/to item numbers.
15207 * src/conflicts.c (log_resolution): Fix the message which reversed
15208 shift and reduce.
15209 * src/output.c (action_row): Initialize default_rule to -1.
15210 (token_actions): Adjust.
15211 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15212 expected output.
15213 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15214
4a2a22f4
AD
152152002-07-25 Akim Demaille <akim@epita.fr>
15216
15217 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15218 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15219 (b4_c_knr_arg_decl): New.
15220 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15221 yyreport_parse_error.
15222
b8df3223
AD
152232002-07-25 Akim Demaille <akim@epita.fr>
15224
15225 * data/yacc.c (yyreport_parse_error): New, extracted from...
15226 (yyparse): here.
15227 (yydestruct, yysymprint): Move above yyparse.
15228 Be K&R compliant.
15229
a762e609
AD
152302002-07-25 Akim Demaille <akim@epita.fr>
15231
15232 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15233 replace...
15234 (b4_sint_type, b4_uint_type): these.
15235 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15236 * tests/regression.at (Web2c Actions): Adjust.
15237
12b0043a
AD
152382002-07-25 Akim Demaille <akim@epita.fr>
15239
15240 * src/gram.h (TIEM_NUMBER_MAX): New.
15241 (item_number_of_rule_number, rule_number_of_item_number): Rename
15242 as...
15243 (rule_number_as_item_number, item_number_as_rule_number): these.
15244 Adjust dependencies.
15245 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15246 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15247 (symbol_number_to_vector_number): New.
15248 (order): Of vector_number_t* type.
15249 (base_t, BASE_MAX, BASE_MIN): New.
15250 (froms, tos, width, pos, check): Of base_t type.
15251 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15252 (actrow): Of action_number_t type.
15253 (conflrow): Of unsigned int type.
15254 (table_ninf, base_ninf): New.
15255 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15256 (muscle_insert_int_table, muscle_insert_base_table)
15257 (muscle_insert_rule_number_table): New.
15258 (prepare_tokens): Output `toknum' as int_table.
15259 (action_row): Returns a rule_number_t.
15260 Use ACTION_MIN, not SHRT_MIN.
15261 (token_actions): yydefact is rule_number_t*.
15262 (table_ninf_remap): New.
15263 (pack_table): Use it for `base' and `table'.
15264 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15265 replaced with...
15266 (YYPACT_NINF, YYTABLE_NINF): these.
15267 (yypact, yytable): Compute their types instead of hard-coded
15268 `short'.
15269 * tests/regression.at (Web2c Actions): Adjust.
15270
5dde258a
AD
152712002-07-19 Akim Demaille <akim@epita.fr>
15272
15273 * src/scan-gram.l (id): Can start with an underscore.
15274
a945ec39
AD
152752002-07-16 Akim Demaille <akim@epita.fr>
15276
15277 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15278 Adjust all former `associativity' dependencies.
15279 * src/symtab.c (symbol_new): Default associativity is `undef', not
15280 `right'.
15281 (symbol_check_alias_consistence): Adjust.
15282
fae437e8
AD
152832002-07-09 Akim Demaille <akim@epita.fr>
15284
15285 * doc/bison.texinfo: Properly set the ``header'' part.
15286 Use @dircategory ``GNU programming tools'' as per Texinfo's
15287 documentation.
15288 Use @copying.
15289
1a715ef2
AD
152902002-07-09 Akim Demaille <akim@epita.fr>
15291
15292 * lib/quotearg.h: Protect against multiple inclusions.
15293 * src/location.h (location_t): Add a `file' member.
15294 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15295 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15296 `error_one_per_line' support.
15297
a5d50994
AD
152982002-07-09 Akim Demaille <akim@epita.fr>
15299
15300 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15301 * src/reader.c (lineno): Remove.
15302 Adjust all dependencies.
15303 (get_merge_function): Take a location and use complain_at.
15304 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15305 * tests/regression.at (Invalid inputs, Mixing %token styles):
15306 Adjust.
15307
b275314e
AD
153082002-07-09 Akim Demaille <akim@epita.fr>
15309
15310 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15311 recovery rule, and forbid extensions when --yacc.
15312 (gram_error): Use complain_at.
15313 * src/reader.c (reader): Exit if there were parse errors.
15314
865b9df1
AD
153152002-07-09 Akim Demaille <akim@epita.fr>
15316
15317 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15318 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15319 Reported by R Blake <blakers@mac.com>.
15320
c76e14da
AD
153212002-07-09 Akim Demaille <akim@epita.fr>
15322
15323 * data/yacc.c: Output the copyright notive in the header.
15324
7db2ed2d
AD
153252002-07-03 Akim Demaille <akim@epita.fr>
15326
15327 * src/output.c (froms, tos): Are state_number_t.
15328 (save_column): sp, sp1, and sp2 are state_number_t.
15329 (prepare): Rename `final' as `final_state_number', `nnts' as
15330 `nterms_number', `nrules' as `rules_number', `nstates' as
15331 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15332 unused.
15333 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15334 * data/lalr1.cc (nsym_): Remove, unused.
15335
e68e0410
AD
153362002-07-03 Akim Demaille <akim@epita.fr>
15337
15338 * src/lalr.h, src/lalr.c (goto_number_t): New.
15339 * src/lalr.c (goto_list_t): New.
15340 Propagate them.
15341 * src/nullable.c (rule_list_t): New.
15342 Propagate.
15343 * src/types.h: Remove.
15344
e1a4f3a4
AD
153452002-07-03 Akim Demaille <akim@epita.fr>
15346
15347 * src/closure.c (print_fderives): Use rule_rhs_print.
15348 * src/derives.c (print_derives): Use rule_rhs_print.
15349 (rule_list_t): New, replaces `shorts'.
15350 (set_derives): Add comments.
15351 * tests/sets.at (Nullable, Firsts): Adjust.
15352
536545f3
AD
153532002-07-03 Akim Demaille <akim@epita.fr>
15354
15355 * src/output.c (prepare_actions): Free `tally' and `width'.
15356 (prepare_actions): Allocate and free `order'.
15357 * src/symtab.c (symbols_free): Free `symbols'.
15358 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15359 * src/output.c (m4_invoke): Move to...
15360 * src/scan-skel.l: here.
15361 (<<EOF>>): Close yyout, and free its name.
15362
8b752b00
AD
153632002-07-03 Akim Demaille <akim@epita.fr>
15364
15365 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15366
15367 * src/LR0.c (new_state): Merge into...
15368 (state_list_append): this.
15369 (new_states): Merge into...
15370 (generate_states): here.
15371 (set_states): Don't ensure a proper `errs' state member here, do it...
15372 * src/conflicts.c (conflicts_solve): here.
15373 * src/state.h, src/state.c: Comment changes.
15374 (state_t): Rename member `shifts' as `transitions'.
15375 Adjust all dependencies.
15376 (errs_new): For consistency, also take the values as argument.
15377 (errs_dup): Remove.
15378 (state_errs_set): New.
15379 (state_reductions_set, state_transitions_set): Assert that no
15380 previous value was assigned.
15381 (state_free): New.
15382 (states_free): Use it.
15383 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15384 temporary storage: use `errs' and `nerrs' as elsewhere.
15385 (set_conflicts): Allocate and free this `errs'.
15386
613f5e1a
AD
153872002-07-02 Akim Demaille <akim@epita.fr>
15388
15389 * lib/libiberty.h: New.
15390 * lib: Update the bitset implementation from upstream.
15391 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15392 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15393 * src/main.c: Adjust bitset stats calls.
15394
26e0cadc
PE
153952002-07-01 Paul Eggert <eggert@twinsun.com>
15396
15397 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15398 char, so that negative chars don't collide with $.
15399
1154cced
AD
154002002-06-30 Akim Demaille <akim@epita.fr>
15401
15402 Have the GLR tests be `warning' checked, and fix the warnings.
15403
15404 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15405 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15406 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15407 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15408 (yyaddDeferredAction): static.
15409 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15410 (yyreportParseError): yyprefix is const.
15411 yytokenp is used only when verbose.
15412 (yy__GNUC__): Replace with __GNUC__.
15413 (yypdumpstack): yyi is size_t.
15414 (yypreference): Un-yy local variables and arguments, to avoid
15415 clashes with `yyr1'. Anyway, we are not in the user name space.
15416 (yytname_size): be an int, as is compared with ints.
15417 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15418 Use them.
15419 * tests/cxx-gram.at: Use quotation to protect $1.
15420 Use AT_COMPILE to enable warnings hunts.
15421 Prototype yylex and yyerror.
15422 `Use' argc.
15423 Include `string.h', not `strings.h'.
15424 Produce and prototype stmtMerge only when used.
15425 yylex takes a location.
15426
97650f4e
AD
154272002-06-30 Akim Demaille <akim@epita.fr>
15428
15429 We spend a lot of time in quotearg, in particular when --verbose.
15430
15431 * src/symtab.c (symbol_get): Store a quoted version of the key.
15432 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15433 Adjust all callers.
15434
d2576365
AD
154352002-06-30 Akim Demaille <akim@epita.fr>
15436
15437 * src/state.h (reductions_t): Rename member `nreds' as num.
15438 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15439 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15440
ccaf65bc
AD
154412002-06-30 Akim Demaille <akim@epita.fr>
15442
15443 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15444 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15445 (shifts_to): Rename as...
15446 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15447 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15448 (TRANSITION_IS_DISABLED, transitions_to): these.
15449
87675353
AD
154502002-06-30 Akim Demaille <akim@epita.fr>
15451
15452 * src/print.c (print_shifts, print_gotos): Merge into...
15453 (print_transitions): this.
15454 (print_transitions, print_errs, print_reductions): Align the
15455 lookaheads columns.
15456 (print_core, print_transitions, print_errs, print_state,
15457 print_grammar): Output empty lines separator before, not after.
15458 (state_default_rule_compute): Rename as...
15459 (state_default_rule): this.
15460 * tests/conflicts.at (Defaulted Conflicted Reduction),
15461 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15462 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15463
ce4ccb4b
AD
154642002-06-30 Akim Demaille <akim@epita.fr>
15465
15466 Display items as we display rules.
15467
15468 * src/gram.h, src/gram.c (rule_lhs_print): New.
15469 * src/gram.c (grammar_rules_partial_print): Use it.
15470 * src/print.c (print_core): Likewise.
15471 * tests/conflicts.at (Defaulted Conflicted Reduction),
15472 (Unresolved SR Conflicts): Adjust.
15473 (Unresolved SR Conflicts): Adjust and rename as...
15474 (Resolved SR Conflicts): this, as was meant.
15475 * tests/regression.at (Web2c Report): Adjust.
15476
bc933ef1
AD
154772002-06-30 Akim Demaille <akim@epita.fr>
15478
15479 * src/print.c (state_default_rule_compute): New, extracted from...
15480 (print_reductions): here.
15481 Pessimize, but clarify the code.
15482 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15483
53d4308d
AD
154842002-06-30 Akim Demaille <akim@epita.fr>
15485
15486 * src/output.c (action_row): Let default_rule be always a rule
15487 number.
15488
574fb2d5
AD
154892002-06-30 Akim Demaille <akim@epita.fr>
15490
15491 * src/closure.c (print_firsts, print_fderives, closure):
15492 Use BITSET_EXECUTE.
15493 * src/lalr.c (lookaheads_print): Likewise.
15494 * src/state.c (state_rule_lookaheads_print): Likewise.
15495 * src/print_graph.c (print_core): Likewise.
15496 * src/print.c (print_reductions): Likewise.
15497 * src/output.c (action_row): Likewise.
15498 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15499
05811fd7
AD
155002002-06-30 Akim Demaille <akim@epita.fr>
15501
15502 * src/print_graph.c: Use report_flag.
15503
0e4d5753
AD
155042002-06-30 Akim Demaille <akim@epita.fr>
15505
15506 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15507 to...
15508 * src/relation.h, src/relation.c (traverse, relation_digraph)
15509 (relation_print, relation_transpose): New.
15510
24c7d800
AD
155112002-06-30 Akim Demaille <akim@epita.fr>
15512
15513 * src/state.h, src/state.c (shifts_to): New.
15514 * src/lalr.c (build_relations): Use it.
15515
9222837b
AD
155162002-06-30 Akim Demaille <akim@epita.fr>
15517
15518 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15519 (item_number_of_rule_number, rule_number_of_item_number): New.
15520 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15521 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15522 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15523 Propagate their use.
15524 Much remains to be done, in particular wrt `shorts' from types.h.
15525
260008e5
AD
155262002-06-30 Akim Demaille <akim@epita.fr>
15527
15528 * src/symtab.c (symbol_new): Initialize the `printer' member.
15529
8a731ca8
AD
155302002-06-30 Akim Demaille <akim@epita.fr>
15531
15532 * src/LR0.c (save_reductions): Remove, replaced by...
15533 * src/state.h, src/state.c (state_reductions_set): New.
15534 (reductions, errs): Rename as...
15535 (reductions_t, errs_t): these.
15536 Adjust all dependencies.
15537
32e1e0a4
AD
155382002-06-30 Akim Demaille <akim@epita.fr>
15539
15540 * src/LR0.c (state_list_t, state_list_append): New.
15541 (first_state, last_state): Now symbol_list_t.
15542 (this_state): Remove.
15543 (new_itemsets, append_states, save_reductions): Take a state_t as
15544 argument.
15545 (set_states, generate_states): Adjust.
15546 (save_shifts): Remove, replaced by...
15547 * src/state.h, src/state.c (state_shifts_set): New.
15548 (shifts): Rename as...
15549 (shifts_t): this.
15550 Adjust all dependencies.
15551 * src/state.h (state_t): Remove the `next' member.
15552
e5fb6710
AD
155532002-06-30 Akim Demaille <akim@epita.fr>
15554
15555 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15556 escaped in slot 0.
15557
c7ca99d4
AD
155582002-06-30 Akim Demaille <akim@epita.fr>
15559
15560 Use hash.h for the state hash table.
15561
15562 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15563 (allocate_storage): Use state_hash_new.
15564 (free_storage): Use state_hash_free.
15565 (new_state, get_state): Adjust.
15566 * src/lalr.h, src/lalr.c (states): Move to...
15567 * src/states.h (state_t): Remove the `link' member, no longer
15568 used.
15569 * src/states.h, src/states.c: here.
15570 (state_hash_new, state_hash_free, state_hash_lookup)
15571 (state_hash_insert, states_free): New.
15572 * src/states.c (state_table, state_compare, state_hash): New.
15573 * src/output.c (output_actions): Do not free states now, since we
15574 still need to know the final_state number in `prepare', called
15575 afterwards. Do it...
15576 * src/main.c (main): here: call states_free after `output'.
15577
df0e7316
AD
155782002-06-30 Akim Demaille <akim@epita.fr>
15579
15580 * src/state.h, src/state.c (state_new): New, extracted from...
15581 * src/LR0.c (new_state): here.
15582 * src/state.h (STATE_ALLOC): Move to...
15583 * src/state.c: here.
15584 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15585 * src/state.h, src/state.c: here.
15586
39f41916
AD
155872002-06-30 Akim Demaille <akim@epita.fr>
15588
15589 * src/reader.c (gensym): Rename as...
15590 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15591 (getsym): Rename as...
15592 (symbol_get): this.
15593
d57650a5
AD
155942002-06-30 Akim Demaille <akim@epita.fr>
15595
15596 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15597 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15598 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15599 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15600
5a08f1ce
AD
156012002-06-30 Akim Demaille <akim@epita.fr>
15602
15603 Make the test suite pass with warnings checked.
15604
15605 * tests/actions.at (Printers and Destructors): Improve.
15606 Avoid unsigned vs. signed issues.
15607 * tests/calc.at: Don't exercise the scanner here, do it...
15608 * tests/input.at (Torturing the Scanner): here.
15609
720623af
PH
156102002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15611
88e7e941 15612 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
15613 reorganize first lines parallel to yacc.c.
15614
fb8135fa
AD
156152002-06-28 Akim Demaille <akim@epita.fr>
15616
15617 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15618 (b4_token_enum, b4_token_defines): New, factored from...
15619 * data/lalr1.cc, data/yacc.c, glr.c: here.
15620
41442480
AD
156212002-06-28 Akim Demaille <akim@epita.fr>
15622
15623 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15624 unused variables.
15625 * src/output.c (merger_output): static.
15626
e0e5bf84
AD
156272002-06-28 Akim Demaille <akim@epita.fr>
15628
ba0fe3c7 15629 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
15630 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15631 pacify GCC.
15632 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 15633
676385e2
PH
156342002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15635
15636 Accumulated changelog for new GLR parsing features.
15637
6a254321 15638 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
15639 conflicts_total_count.
15640 * src/conflicts.h: Ditto.
15641 * src/output.c (token_actions): Use the new name.
15642 (output_conflicts): Change conflp => conflict_list_heads, and
15643 confl => conflict_list for better readability.
15644 * data/glr.c: Use the new names.
15645 * NEWS: Add self to GLR announcement.
e0e5bf84 15646
676385e2
PH
15647 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15648
15649 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15650 Akim Demaille.
15651
15652 * data/bison.glr: Change name to glr.c
15653 * data/glr.c: Renamed from bison.glr.
15654 * data/Makefile.am: Add glr.c
e0e5bf84
AD
15655
15656 * src/getargs.c:
15657
676385e2 15658 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 15659 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 15660
676385e2
PH
15661 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15662
15663 * data/bison.glr: Be sure to restore the
15664 current #line when returning to the skeleton contents after having
15665 exposed the input file's #line.
15666
15667 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15668
15669 * data/bison.glr: Bring up to date with changes to bison.simple.
15670
15671 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15672
15673 * data/bison.glr: Correct definitions that use b4_prefix.
15674 Various reformatting.
15675 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15676 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15677 yytokenp argument; now part of stack.
15678 (yychar): Define to behave as documented.
15679 (yyclearin): Ditto.
e0e5bf84 15680
676385e2
PH
15681 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15682
15683 * src/reader.h: Add declaration for free_merger_functions.
15684
15685 * src/reader.c (merge_functions): New variable.
15686 (get_merge_function): New function.
15687 (free_merger_functions): New function.
15688 (readgram): Check for %prec that is not followed by a symbol.
15689 Handle %dprec and %merge declarations.
15690 (packgram): Initialize dprec and merger fields in rules array.
15691
15692 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15693 conflict_list_cnt, conflict_list_free): New variables.
15694 (table_grow): Also grow conflict_table.
e0e5bf84 15695 (prepare_rules): Output dprec and merger tables.
676385e2 15696 (conflict_row): New function.
e0e5bf84 15697 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
15698 default reduction in conflicted states for GLR parser so that there
15699 are spaces for the conflict lists.
15700 (save_row): Also save conflict information.
15701 (token_actions): Allocate conflict list.
15702 (merger_output): New function.
15703 (pack_vector): Pack conflict table, too.
15704 (output_conflicts): New function to output yyconflp and yyconfl.
15705 (output_check): Allocate conflict_tos.
15706 (output_actions): Output conflict tables, also.
15707 (output_skeleton): Output b4_mergers definition.
15708 (prepare): Output b4_max_rhs_length definition.
15709 Use 'bison.glr' as default skeleton for GLR parsers.
15710
15711 * src/gram.c (glr_parser): New flag.
15712 (grammar_free): Call free_merger_functions.
15713
15714 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15715 all pairs of conflicting reductions, rather than just all tokens
15716 causing conflicts. Needed to size conflict tables.
e0e5bf84 15717 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
15718 interface.
15719 (conflicts_print): Ditto.
15720 (count_total_conflicts): New function.
15721
15722 * src/reader.h (merger_list): New type.
15723 (merge_functions): New variable.
15724
15725 * src/lex.h (tok_dprec, tok_merge): New token types.
15726
15727 * src/gram.h (rule_s): Add dprec and merger fields.
15728 (glr_parser): New flag.
15729
15730 * src/conflicts.h (count_total_conflicts): New function.
15731
15732 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15733
15734 * doc/bison.texinfo (Generalized LR Parsing): New section.
15735 (GLR Parsers): New section.
15736 (Language and Grammar): Mention GLR parsing.
15737 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15738 Correct typo ("tge" -> "the").
15739
15740 * data/bison.glr: New skeleton for GLR parsing.
15741
15742 * tests/cxx-gram.at: New tests for GLR parsing.
15743
15744 * tests/testsuite.at: Include cxx-gram.at.
15745
15746 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 15747
676385e2
PH
15748 * src/parse-gram.y:
15749
15750 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15751
15752 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 15753
b5480d74 157542002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
15755
15756 * src/options.h, src/options.c: Remove.
15757 * src/getargs.c (short_options, long_options): New.
15758
60491a94
AD
157592002-06-27 Akim Demaille <akim@epita.fr>
15760
15761 * data/bison.simple, data/bison.c++: Rename as...
15762 * data/yacc.c, data/lalr1.cc: these.
15763 * doc/bison.texinfo (Environment Variables): Remove.
15764
9be0c25b
AD
157652002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15766
15767 * src/getargs.c (report_argmatch): Initialize strtok().
15768
1ae72863
AD
157692002-06-20 Akim Demaille <akim@epita.fr>
15770
15771 * data/bison.simple (b4_symbol_actions): New, replaces...
15772 (b4_symbol_destructor, b4_symbol_printer): these.
15773 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15774 user token numbers.
15775
87542d29
AD
157762002-06-20 Akim Demaille <akim@epita.fr>
15777
15778 * data/bison.simple (yydestructor): Rename as...
15779 (yydestruct): this.
15780
1a31ed21
AD
157812002-06-20 Akim Demaille <akim@epita.fr>
15782
15783 * src/symtab.h, src/symtab.c (symbol_type_set)
15784 (symbol_destructor_set, symbol_precedence_set): The location is
15785 the last argument.
15786 Adjust all callers.
15787
e776192e
AD
157882002-06-20 Akim Demaille <akim@epita.fr>
15789
15790 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15791 internals.
15792 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15793 Takes a location.
15794 * src/symtab.h, src/symtab.c (symbol_class_set)
15795 (symbol_user_token_number_set): Likewise.
15796 Adjust all callers.
15797 Promote complain_at.
15798 * tests/input.at (Type Clashes): Adjust.
15799
5c1180b3
AD
158002002-06-20 Akim Demaille <akim@epita.fr>
15801
15802 * data/bison.simple (YYLEX): Fix the declaration when
15803 %pure-parser.
15804
e3170060
AD
158052002-06-20 Akim Demaille <akim@epita.fr>
15806
15807 * data/bison.simple (yysymprint): Don't print the token number,
15808 just its name.
15809 * tests/actions.at (Destructors): Rename as...
15810 (Printers and Destructors): this.
15811 Also exercise %printer.
15812
253862fd
AD
158132002-06-20 Akim Demaille <akim@epita.fr>
15814
15815 * data/bison.simple (YYDSYMPRINT): New.
15816 Use it to remove many of the #if YYDEBUG/if (yydebug).
15817
366eea36
AD
158182002-06-20 Akim Demaille <akim@epita.fr>
15819
15820 * src/symtab.h, src/symtab.c (symbol_t): printer and
15821 printer_location are new members.
15822 (symbol_printer_set): New.
15823 * src/parse-gram.y (PERCENT_PRINTER): New token.
15824 Handle its associated rule.
15825 * src/scan-gram.l: Adjust.
15826 (handle_destructor_at, handle_destructor_dollar): Rename as...
15827 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15828 * src/output.c (symbol_printers_output): New.
15829 (output_skeleton): Call it.
15830 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15831 since there are already many grammar files with a user `yyprint'.
15832 Replace the calls to YYPRINT to calls to yysymprint.
15833 * tests/calc.at: Adjust.
15834 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15835 taking advantage of parser very internal details (stack size!).
15836
4f25ebb0
AD
158372002-06-20 Akim Demaille <akim@epita.fr>
15838
15839 * src/scan-gram.l: Complete the scanner with the missing patterns
15840 to pacify Flex.
15841 Use `quote' and `symbol_tag_get' where appropriate.
15842
93b68a0e
AD
158432002-06-19 Akim Demaille <akim@epita.fr>
15844
15845 * tests/actions.at (Destructors): Augment to test locations.
15846 * data/bison.simple (yydestructor): Pass it the current location
15847 if locations are enabled.
15848 Prototype only when __STDC__ or C++.
15849 Change the argument names to move into the yy name space: there is
15850 user code here.
15851
58612f1d
AD
158522002-06-19 Akim Demaille <akim@epita.fr>
15853
74310291
AD
15854 * data/bison.simple (b4_pure_if): New.
15855 Use it instead of #ifdef YYPURE.
15856
158572002-06-19 Akim Demaille <akim@epita.fr>
15858
15859 * data/bison.simple (b4_location_if): New.
58612f1d
AD
15860 Use it instead of #ifdef YYLSP_NEEDED.
15861
f25bfb75
AD
158622002-06-19 Akim Demaille <akim@epita.fr>
15863
15864 Prepare @$ in %destructor, but currently don't bind it in the
15865 skeleton, as %location use is not cleaned up yet.
15866
15867 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15868 (handle_action_at): New.
15869 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15870 a braced_code_t and a location as additional arguments.
15871 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15872 unquote one when outputting `b4_dollar_dollar'.
15873 Adjust callers.
15874 * data/bison.simple (b4_eval): Remove.
15875 (b4_symbol_destructor): Adjust.
15876 * tests/input.at (Invalid @n): Adjust.
15877
c732d2c6
AD
158782002-06-19 Zack Weinberg <zack@codesourcery.com>
15879
15880 * doc/bison.texinfo: Document ability to have multiple
15881 prologue sections.
15882
8c165d89
AD
158832002-06-18 Akim Demaille <akim@epita.fr>
15884
15885 * src/files.c (compute_base_names): When computing the output file
15886 names from the input file name, strip the directory part.
15887
ca98bf57
AD
158882002-06-18 Akim Demaille <akim@epita.fr>
15889
15890 * data/bison.simple.new: Comment changes.
15891 Reported by Andreas Schwab.
15892
0bfb02ff
AD
158932002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15894
15895 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15896 there are no `label `yyoverflowlab' defined but not used' warnings
15897 when yyoverflow is defined.
15898
24c0aad7
AD
158992002-06-18 Akim Demaille <akim@epita.fr>
15900
15901 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15902 new member.
15903 (symbol_destructor_set): Adjust.
15904 * src/output.c (symbol_destructors_output): Output the destructor
15905 locations.
15906 Output the symbol name.
15907 * data/bison.simple (b4_symbol_destructor): Adjust.
15908
5719c109
AD
159092002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15910 and Akim Demaille <akim@epita.fr>
15911
15912 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15913 what's left on the stack when the error recovery hits EOF.
15914 * tests/actions.at (Destructors): Complete to exercise this case.
15915
9280d3ef
AD
159162002-06-17 Akim Demaille <akim@epita.fr>
15917
15918 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15919 arguments is really empty, not only equal to `[]'.
15920 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15921 member.
15922 (symbol_destructor_set): New.
15923 * src/output.c (symbol_destructors_output): New.
15924 * src/reader.h (brace_code_t, current_braced_code): New.
15925 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15926 (handle_dollar): Rename as...
15927 (handle_action_dollar): this.
15928 (handle_destructor_dollar): New.
15929 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15930 (grammar_declaration): Use it.
15931 * data/bison.simple (yystos): Is always defined.
15932 (yydestructor): New.
15933 * tests/actions.at (Destructors): New.
15934 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15935
dafdc66f
AD
159362002-06-17 Akim Demaille <akim@epita.fr>
15937
15938 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15939 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15940 rule_length only when needed.
15941 * src/output.c (actions_output, token_definitions_output): Output
15942 the full M4 block.
15943 * src/symtab.c: Don't access directly to the symbol tag, use
15944 symbol_tag_get.
15945 * src/parse-gram.y: Use symbol_list_free.
15946
56c47203
AD
159472002-06-17 Akim Demaille <akim@epita.fr>
15948
15949 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15950 (symbol_list_prepend, get_type_name): Move to...
15951 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15952 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15953 Adjust all callers.
15954 (symbol_list_free): New.
15955 * src/scan-gram.l (handle_dollar): Takes a location.
15956 * tests/input.at (Invalid $n): Adjust.
15957
1e0bab92
AD
159582002-06-17 Akim Demaille <akim@epita.fr>
15959
15960 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15961 (symbol_list_prepend): New.
15962 * src/parse-gram.y (%union): `list' is a new member.
15963 (symbols.1): New, replaces...
15964 (terms_to_prec.1, nterms_to_type.1): these.
15965 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15966 Take a location as additional argument.
15967 Adjust all callers.
15968
04e60654
AD
159692002-06-15 Akim Demaille <akim@epita.fr>
15970
15971 * src/parse-gram.y: Move %token in the declaration section so that
15972 we don't depend upon CVS Bison.
15973
10e5b8bd
AD
159742002-06-15 Akim Demaille <akim@epita.fr>
15975
15976 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15977 * src/print.c (print_core): Use it.
15978
9801d40c
AD
159792002-06-15 Akim Demaille <akim@epita.fr>
15980
15981 * src/conflicts.c (log_resolution): Accept the rule involved in
15982 the sr conflicts instead of the lookahead number that points to
15983 that rule.
15984 (flush_reduce): Accept the current lookahead vector as argument,
15985 instead of the index in LA.
15986 (resolve_sr_conflict): Accept the current number of lookahead
15987 bitset to consider for the STATE, instead of the index in LA.
15988 (set_conflicts): Adjust.
15989 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15990
c0263492
AD
159912002-06-15 Akim Demaille <akim@epita.fr>
15992
15993 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15994 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15995 Adjust all dependencies.
15996 * src/lalr.c (initialize_lookaheads): Split into...
15997 (states_lookaheads_count, states_lookaheads_initialize): these.
15998 (lalr): Adjust.
15999
9757c359
AD
160002002-06-15 Akim Demaille <akim@epita.fr>
16001
16002 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16003 out of...
16004 (grammar_rules_print): here.
16005 * src/reduce.c (reduce_output): Use it.
16006 * tests/reduce.at (Useless Rules, Reduced Automaton)
16007 (Underivable Rules): Adjust.
16008
6b98e4b5
AD
160092002-06-15 Akim Demaille <akim@epita.fr>
16010
16011 Copy BYacc's nice way to report the grammar.
16012
16013 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16014 New.
16015 Don't print the rules' location, it is confusing and useless.
16016 (rule_print): Use grammar_rhs_print.
16017 * src/print.c (print_grammar): Use grammar_rules_print.
16018
6b98e4b5
AD
160192002-06-15 Akim Demaille <akim@epita.fr>
16020
16021 Complete and rationalize `useless thing' warnings.
16022
16023 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16024 (symbol_tag_print): New.
16025 Use them everywhere in place of accessing directly the tag member.
16026 * src/gram.h, src/gram.c (rule_print): New.
16027 Use it where a rule used to be printed `by hand'.
16028 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16029 (reduce_grammar_tables): Report the useless rules.
16030 (reduce_print): Useless things are a warning, not an error.
16031 Report it as such.
16032 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16033 (Reduced Automaton, Underivable Rules): Adjust.
16034 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16035 * tests/conflicts.at (Unresolved SR Conflicts)
16036 (Solved SR Conflicts): Adjust.
16037
ee000ba4
AD
160382002-06-15 Akim Demaille <akim@epita.fr>
16039
16040 Let symbols have a location.
16041
16042 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16043 (getsym): Adjust.
16044 Adjust all callers.
16045 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16046 Use location_t, not int.
16047 * src/symtab.c (symbol_check_defined): Take advantage of the
16048 location.
16049 * tests/regression.at (Invalid inputs): Adjust.
16050
8efe435c
AD
160512002-06-15 Akim Demaille <akim@epita.fr>
16052
16053 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16054 (input): Don't try to initialize yylloc here, do it in the
16055 scanner.
16056 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16057 * src/gram.h (rule_t): Change line and action_line into location
16058 and action_location, of location_t type.
16059 Adjust all dependencies.
16060 * src/location.h, src/location.c (empty_location): New.
16061 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16062 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16063 (grammar_current_rule_symbol_append)
16064 (grammar_current_rule_action_append): Expect a location as argument.
16065 * src/reader.c (grammar_midrule_action): Adjust to attach an
16066 action's location as dummy symbol location.
16067 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16068 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16069 the line numbers.
16070
1921f1d7
AD
160712002-06-14 Akim Demaille <akim@epita.fr>
16072
16073 Grammar declarations may be found in the grammar section.
16074
16075 * src/parse-gram.y (rules_or_grammar_declaration): New.
16076 (declarations): Each declaration may end with a semicolon, not
16077 just...
16078 (grammar_declaration): `"%union"'.
16079 (grammar): Branch to rules_or_grammar_declaration.
16080
4515534c
AD
160812002-06-14 Akim Demaille <akim@epita.fr>
16082
16083 * src/main.c (main): Invoke scanner_free.
16084
f958596b
AD
160852002-06-14 Akim Demaille <akim@epita.fr>
16086
16087 * src/output.c (m4_invoke): Extracted from...
16088 (output_skeleton): here.
16089 Free tempfile.
16090
2c569025
AD
160912002-06-14 Akim Demaille <akim@epita.fr>
16092
16093 * src/parse-gram.y (directives, directive, gram)
16094 (grammar_directives, precedence_directives, precedence_directive):
16095 Rename as...
16096 (declarations, declaration, grammar, grammar_declaration)
16097 (precedence_declaration, precedence_declarator): these.
16098 (symbol_declaration): New.
16099
592e8d4d
AD
161002002-06-14 Akim Demaille <akim@epita.fr>
16101
16102 * src/files.c (action_obstack): Remove, unused.
16103 (output_obstack): Remove it, and all its dependencies, as it is no
16104 longer needed.
16105 * src/reader.c (epilogue_set): Build the epilogue in the
16106 muscle_obstack.
16107 * src/output.h, src/output.c (muscle_obstack): Move to...
16108 * src/muscle_tab.h, src/muscle_tab.h: here.
16109 (muscle_init): Initialize muscle_obstack.
16110 (muscle_free): New.
16111 * src/main.c (main): Call it.
16112
0c15323d
AD
161132002-06-14 Akim Demaille <akim@epita.fr>
16114
16115 * src/location.h: New, extracted from...
16116 * src/reader.h: here.
16117 * src/Makefile.am (noinst_HEADERS): Merge into
16118 (bison_SOURCES): this.
16119 Add location.h.
16120 * src/parse-gram.y: Use location_t instead of Bison's.
16121 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16122 Use location_t instead of ints.
16123
e96c9728
AD
161242002-06-14 Akim Demaille <akim@epita.fr>
16125
16126 * data/bison.simple, data/bison.c++: Be sure to restore the
16127 current #line when returning to the skeleton contents after having
16128 exposed the input file's #line.
16129
75d1fe16
AD
161302002-06-12 Akim Demaille <akim@epita.fr>
16131
16132 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16133 eager.
16134 * tests/actions.at (Exotic Dollars): New.
16135
6c35d22c
AD
161362002-06-12 Akim Demaille <akim@epita.fr>
16137
16138 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16139 ['"/] too eagerly.
16140 * tests/input.at (Torturing the Scanner): New.
16141
1d6412ad
AD
161422002-06-11 Akim Demaille <akim@epita.fr>
16143
16144 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16145 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16146 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16147 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16148 * src/reader.c (reader): Use it.
16149
4cdb01db
AD
161502002-06-11 Akim Demaille <akim@epita.fr>
16151
16152 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16153 Adjust all callers.
16154 (scanner_last_string_free): New.
16155
44995b2e
AD
161562002-06-11 Akim Demaille <akim@epita.fr>
16157
16158 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16159 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16160 (last_string, YY_OBS_FREE): New.
16161 Use them when returning an ID.
16162
e9955c83
AD
161632002-06-11 Akim Demaille <akim@epita.fr>
16164
16165 Have Bison grammars parsed by a Bison grammar.
16166
16167 * src/reader.c, src/reader.h (prologue_augment): New.
16168 * src/reader.c (copy_definition): Remove.
16169
16170 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16171 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16172 (grammar_current_rule_prec_set, grammar_current_rule_check)
16173 (grammar_current_rule_symbol_append)
16174 (grammar_current_rule_action_append): Export.
16175 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16176 (symbol_list_action_append): Remove.
16177 Hook the routines from reader.
16178 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16179 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16180
16181 * src/reader.c (read_declarations): Remove, unused.
16182
16183 * src/parse-gram.y: Handle the epilogue.
16184 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16185 (grammar_start_symbol_set): this.
16186 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16187 * src/reader.c (readgram): Remove, unused.
16188 (reader): Adjust to insert eoftoken and axiom where appropriate.
16189
16190 * src/reader.c (copy_dollar): Replace with...
16191 * src/scan-gram.h (handle_dollar): this.
16192 * src/parse-gram.y: Remove `%thong'.
16193
16194 * src/reader.c (copy_at): Replace with...
16195 * src/scan-gram.h (handle_at): this.
16196
16197 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16198 New.
16199
16200 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16201 time being.
16202
16203 * src/reader.h, src/reader.c (grammar_rule_end): New.
16204
16205 * src/parse.y (current_type, current_class): New.
16206 Implement `%nterm', `%token' support.
16207 Merge `%term' into `%token'.
16208 (string_as_id): New.
16209 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16210 type name.
16211
16212 * src/parse-gram.y: Be sure to handle properly the beginning of
16213 rules.
16214
16215 * src/parse-gram.y: Handle %type.
16216 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16217
16218 * src/parse-gram.y: More directives support.
16219 * src/options.c: No longer handle source directives.
16220
16221 * src/parse-gram.y: Fix %output.
16222
16223 * src/parse-gram.y: Handle %union.
16224 Use the prologue locations.
16225 * src/reader.c (parse_union_decl): Remove.
16226
16227 * src/reader.h, src/reader.c (epilogue_set): New.
16228 * src/parse-gram.y: Use it.
16229
16230 * data/bison.simple, data/bison.c++: b4_stype is now either not
16231 defined, then default to int, or to the contents of %union,
16232 without `union' itself.
16233 Adjust.
16234 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16235
16236 * src/output.c (actions_output): Don't output braces, as they are
16237 already handled by the scanner.
16238
16239 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16240 characters to themselves.
16241
16242 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16243 that the epilogue has a proper #line.
16244
16245 * src/parse-gram.y: Handle precedence/associativity.
16246
16247 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16248 a terminal.
16249 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16250 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16251 at all to define terminals that cannot be emitted.
16252
16253 * src/scan-gram.l: Escape M4 characters.
16254
16255 * src/scan-gram.l: Working properly with escapes in user
16256 strings/characters.
16257
16258 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16259 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16260 grammar.
16261 Use more modest sizes, as for the time being the parser does not
16262 release memory, and therefore the process swallows a huge amount
16263 of memory.
16264
16265 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16266 stricter %token grammar.
16267
16268 * src/symtab.h (associativity): Add `undef_assoc'.
16269 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16270 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16271
16272 * tests/regression.at (Invalid %directive): Remove, as it is now
16273 meaningless.
16274 (Invalid inputs): Adjust to the new error messages.
16275 (Token definitions): The new grammar doesn't allow too many
16276 eccentricities.
16277
16278 * src/lex.h, src/lex.c: Remove.
16279 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16280 (copy_character, copy_string2, copy_string, copy_identifier)
16281 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16282 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16283 (parse_action): Remove.
16284 * po/POTFILES.in: Adjust.
16285
2e047461
AD
162862002-06-11 Akim Demaille <akim@epita.fr>
16287
cd05d13c 16288 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
16289 rule's action member: return the action as a string.
16290 Don't require `rule_length' as an argument: compute it.
16291 (grammar_current_rule_symbol_append)
16292 (grammar_current_rule_action_append): New, eved out from
16293 (readgram): here.
16294 Remove `action_flag', `rulelength', unused now.
16295
9af3fbce
AD
162962002-06-11 Akim Demaille <akim@epita.fr>
16297
16298 * src/reader.c (grammar_current_rule_prec_set).
16299 (grammar_current_rule_check): New, eved out from...
16300 (readgram): here.
16301 Remove `xaction', `first_rhs': useless.
16302 * tests/input.at (Type clashes): New.
16303 * tests/existing.at (GNU Cim Grammar): Adjust.
16304
1485e106
AD
163052002-06-11 Akim Demaille <akim@epita.fr>
16306
16307 * src/reader.c (grammar_midrule_action): New, Eved out from
16308 (readgram): here.
16309
da4160c3
AD
163102002-06-11 Akim Demaille <akim@epita.fr>
16311
16312 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16313 New.
16314 (readgram): Use them as replacement of inlined code, crule and
16315 crule1.
16316
f6d0f937
AD
163172002-06-11 Akim Demaille <akim@epita.fr>
16318
16319 * src/reader.c (grammar_end, grammar_symbol_append): New.
16320 (readgram): Use them.
16321 Make the use of `p' as local as possible.
16322
69078d4b
AD
163232002-06-10 Akim Demaille <akim@epita.fr>
16324
16325 GCJ's parser requires the tokens to be defined before the prologue.
16326
16327 * data/bison.simple: Output the token definition before the user's
16328 prologue.
16329 * tests/regression.at (Braces parsing, Duplicate string)
16330 (Mixing %token styles): Check the output from bison.
16331 (Early token definitions): New.
16332
5e424082
AD
163332002-06-10 Akim Demaille <akim@epita.fr>
16334
16335 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16336 assigning twice the same user number to a token, so that we can
16337 use it in...
16338 * src/lex.c (lex): here.
16339 Also use `symbol_class_set' instead of hand written code.
16340 * src/reader.c (parse_assoc_decl): Likewise.
16341
44536b35
AD
163422002-06-10 Akim Demaille <akim@epita.fr>
16343
16344 * src/symtab.c, src/symtab.c (symbol_class_set)
16345 (symbol_user_token_number_set): New.
16346 * src/reader.c (parse_token_decl): Use them.
16347 Use a switch instead of ifs.
16348 Use a single argument.
16349
8b9f2372
AD
163502002-06-10 Akim Demaille <akim@epita.fr>
16351
16352 Remove `%thong' support as it is undocumented, unused, duplicates
16353 `%token's job, and creates useless e-mail traffic with people who
16354 want to know what it is, why it is undocumented, unused, and
16355 duplicates `%token's job.
16356
16357 * src/reader.c (parse_thong_decl): Remove.
16358 * src/options.c (option_table): Remove "thong".
16359 * src/lex.h (tok_thong): Remove.
16360
3ae2b51f
AD
163612002-06-10 Akim Demaille <akim@epita.fr>
16362
16363 * src/symtab.c, src/symtab.c (symbol_type_set)
16364 (symbol_precedence_set): New.
16365 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16366 (value_components_used): Remove, unused.
16367
2f1afb73
AD
163682002-06-09 Akim Demaille <akim@epita.fr>
16369
16370 Move symbols handling code out of the reader.
16371
16372 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16373 (axiom): Move to...
16374 * src/symtab.h, src/symtab.c: here.
16375
16376 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16377 * src/reader.c (startval): Rename as...
16378 * src/symtab.h, src/symtab.c (startsymbol): this.
16379 * src/reader.c: Adjust.
16380
16381 * src/reader.c (symbol_check_defined, symbol_make_alias)
16382 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16383 (token_translations_init)
16384 Move to...
16385 * src/symtab.c: here.
16386 * src/reader.c (packsymbols): Move to...
16387 * src/symtab.h, src/symtab.c (symbols_pack): here.
16388 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16389 argument.
16390
e9bca3ad
AD
163912002-06-03 Akim Demaille <akim@epita.fr>
16392
16393 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16394 then statements.
16395
86eff183
AD
163962002-06-03 Akim Demaille <akim@epita.fr>
16397
16398 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16399 structs with non literals.
16400 * src/scan-skel.l: never-interactive.
16401 * src/conflicts.c (enum conflict_resolution_e): No trailing
16402 comma.
16403 * src/getargs.c (usage): Split long literal strings.
16404 Reported by Hans Aberg.
16405
717be197
AD
164062002-05-28 Akim Demaille <akim@epita.fr>
16407
16408 * data/bison.c++: Use C++ ostreams.
16409 (cdebug_): New member.
16410
670ddffd
AD
164112002-05-28 Akim Demaille <akim@epita.fr>
16412
16413 * src/output.c (output_skeleton): Be sure to allocate enough room
16414 for `/' _and_ for `\0' in full_skeleton.
16415
769b430f
AD
164162002-05-28 Akim Demaille <akim@epita.fr>
16417
16418 * data/bison.c++: Catch up with bison.simple:
16419 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16420 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16421 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16422 and popping traces.
16423
7067cb36
PH
164242002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16425
16426 * src/output.c (output_skeleton): Put an explicit path in front of
16427 the skeleton file name, rather than relying on the -I directory,
16428 to partially alleviate effects of having a skeleton file lying around
16429 in the current directory.
769b430f 16430
4a713ec2
PH
164312002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16432
769b430f 16433 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
16434 obstack_printf should be obstack_fgrow1.
16435
b408954b
AD
164362002-05-26 Akim Demaille <akim@epita.fr>
16437
16438 * src/state.h (state_t): `solved_conflicts' is a new member.
16439 * src/LR0.c (new_state): Set it to 0.
16440 * src/conflicts.h, src/conflicts.c (print_conflicts)
16441 (free_conflicts, solve_conflicts): Rename as...
16442 (conflicts_print, conflicts_free, conflicts_solve): these.
16443 Adjust callers.
16444 * src/conflicts.c (enum conflict_resolution_e)
16445 (solved_conflicts_obstack): New, used by...
16446 (log_resolution): this.
16447 Adjust to attach the conflict resolution to each state.
16448 Complete the description with the precedence/associativity
16449 information.
16450 (resolve_sr_conflict): Adjust.
16451 * src/print.c (print_state): Output its solved_conflicts.
16452 * tests/conflicts.at (Unresolved SR Conflicts)
16453 (Solved SR Conflicts): Exercise --report=all.
16454
a49aecd5
AD
164552002-05-26 Akim Demaille <akim@epita.fr>
16456
16457 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16458 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16459 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16460 (token_number_t, item_number_as_token_number)
16461 (token_number_as_item_number, muscle_insert_token_number_table):
16462 Rename as...
16463 (symbol_number_t, item_number_as_symbol_number)
16464 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16465 these, since it is more appropriate.
16466
5504898e
AD
164672002-05-26 Akim Demaille <akim@epita.fr>
16468
16469 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16470 `Error:' lines.
16471 * data/bison.simple (yystos) [YYDEBUG]: New.
16472 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16473 error recovery.
16474 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16475
ec3bc396
AD
164762002-05-25 Akim Demaille <akim@epita.fr>
16477
16478 * doc/bison.texinfo (Debugging): Split into...
16479 (Tracing): this new section, its former contents, and...
16480 (Understanding): this new section.
16481 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16482 by...
16483 (report_flag): this.
16484 Adjust all dependencies.
16485 (report_args, report_types, report_argmatch): New.
16486 (usage, getargs): Report/support -r, --report.
16487 * src/options.h
16488 (struct option_table_struct): Rename as..,
16489 (struct option_table_s): this.
16490 Rename the `set_flag' member to `flag' to match with getopt_long's
16491 struct.
16492 * src/options.c (option_table): Split verbose into an entry for
16493 %verbose, and another for --verbose.
16494 Support --report/-r, so remove -r from the obsolete --raw.
16495 * src/print.c: Attach full item sets and lookaheads reports to
16496 report_flag instead of trace_flag.
16497 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16498
78df8250
PE
164992002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16500 and Paul Eggert <eggert@twinsun.com>
769b430f 16501
78df8250
PE
16502 * data/bison.simple (yyparse): Correct error handling to conform to
16503 POSIX and yacc. Specifically, after syntax error is discovered,
16504 do not reduce further before shifting the error token.
16505 Clean up the code a bit by removing the labels yyerrdefault,
16506 yyerrhandle, yyerrpop.
16507 * NEWS: Document the above.
16508
c0c9ea05
PH
165092002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16510
16511 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16512 type; it isn't always big enough, since it doesn't necessarily
16513 include non-terminals.
769b430f 16514 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
16515 the latter can be removed.
16516 (yy_token_number_type): Remove, only one use.
16517 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16518 don't use TokenNumberType as element type.
769b430f 16519
c0c9ea05
PH
16520 * tests/regression.at: Modify expected output to agree with change
16521 to yyr1 and yytranslate.
769b430f 16522
6390a83f
FK
165232002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16524
16525 * src/reader.c (parse_action): Use copy_character instead of
16526 obstack_1grow.
16527
db7c8e9a
AD
165282002-05-13 Akim Demaille <akim@epita.fr>
16529
16530 * tests/regression.at (Token definitions): Prototype yylex and
16531 yyerror.
16532
fcc61800
PH
165332002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16534
158c687b 16535 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
16536 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16537 32-bit arithmetic.
16538 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16539
5683e9b2
AD
165402002-05-07 Akim Demaille <akim@epita.fr>
16541
16542 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16543 avoid GCC warnings.
16544
0c2d3f4c
AD
165452002-05-07 Akim Demaille <akim@epita.fr>
16546
16547 Kill GCC warnings.
16548
16549 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16550 over the RHS of each rule.
16551 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16552 * src/state.h (state_t): Member `nitems' is unsigned short.
16553 * src/LR0.c (get_state): Adjust.
16554 * src/reader.c (packgram): Likewise.
16555 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16556 `Type'.
16557 (muscle_insert_int_table): Remove, unused.
16558 (prepare_rules): Remove `max'.
16559
1565b720
AD
165602002-05-06 Akim Demaille <akim@epita.fr>
16561
16562 * src/closure.c (print_firsts): Display of the symbol tags.
16563 (bitmatrix_print): Move to...
16564 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16565 here.
16566 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16567
cfaee611
AD
165682002-05-06 Akim Demaille <akim@epita.fr>
16569
16570 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16571 hash_do_for_each.
16572
458be8e0
AD
165732002-05-06 Akim Demaille <akim@epita.fr>
16574
16575 * src/LR0.c (new_state, get_state): Instead of using the global
16576 `kernel_size' and `kernel_base', have two new arguments:
16577 `core_size' and `core'.
16578 Adjust callers.
16579
a900a624
AD
165802002-05-06 Akim Demaille <akim@epita.fr>
16581
16582 * src/reader.c (packgram): No longer end `ritem' with a 0
16583 sentinel: it is not used.
16584
d4e7d3a1
AD
165852002-05-05 Akim Demaille <akim@epita.fr>
16586
16587 New experimental feature: display the lookaheads in the report and
16588 graph.
16589
16590 * src/print (print_core): When --trace-flag, display the rules
16591 lookaheads.
16592 * src/print_graph.c (print_core): Likewise.
16593 Swap the arguments.
16594 Adjust caller.
16595
39ceb25b
AD
165962002-05-05 Akim Demaille <akim@epita.fr>
16597
16598 * tests/torture.at (Many lookaheads): New test.
16599
5372019f
AD
166002002-05-05 Akim Demaille <akim@epita.fr>
16601
16602 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16603 (GENERATE_MUSCLE_INSERT_TABLE): this.
16604 (output_int_table, output_unsigned_int_table, output_short_table)
16605 (output_token_number_table, output_item_number_table): Replace with...
16606 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16607 (muscle_insert_short_table, muscle_insert_token_number_table)
16608 (muscle_insert_item_number_table): these.
16609 Adjust all callers.
16610 (prepare_tokens): Don't free `translations', since...
16611 * src/reader.h, src/reader.c (grammar_free): do it.
16612 Move to...
16613 * src/gram.h, src/gram.c (grammar_free): here.
16614 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16615 b4_translate_max.
16616
5df5f6d5
AD
166172002-05-05 Akim Demaille <akim@epita.fr>
16618
16619 * src/output.c (output_unsigned_int_table): New.
16620 (prepare_rules): `i' is unsigned.
16621 `prhs', `rline', `r2' are unsigned int.
16622 Rename muscle `rhs_number_max' as `rhs_max'.
16623 Output muscles `prhs_max', `rline_max', and `r2_max'.
16624 Free rline and r1.
16625 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16626 to compute types instead of constant types.
16627 * tests/regression.at (Web2c Actions): Adjust.
16628
b87f8b21
AD
166292002-05-04 Akim Demaille <akim@epita.fr>
16630
16631 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16632 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16633 Adjust dependencies.
16634 * src/output.c (token_definitions_output): Be sure not to output a
16635 `#define 'a'' when fed with `%token 'a' "a"'.
16636 * tests/regression.at (Token definitions): New.
16637
8bb936e4
PE
166382002-05-03 Paul Eggert <eggert@twinsun.com>
16639
16640 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16641 for K&R C.
16642
166432002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16644
16645 * Makefile.am (SUBDIRS): Remove intl.
16646 (EXTRA_DIST): Add config/config.rpath.
16647
53c71a12
AD
166482002-05-03 Akim Demaille <akim@epita.fr>
16649
16650 * data/bison.simple (m4_if): Don't output empty enums.
16651 And actually, output valid enum definitions :(.
16652
289dd0cf
AD
166532002-05-03 Akim Demaille <akim@epita.fr>
16654
16655 * configure.bat: Remove, completely obsolete.
16656 * Makefile.am (EXTRA_DIST): Adjust.
16657 Don't distribute config.rpath...
16658 * config/Makefile.am (EXTRA_DIST): Do it.
16659
db85e524
AD
166602002-05-03 Akim Demaille <akim@epita.fr>
16661
16662 * configure.in (GETTEXT_VERSION): New.
16663 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16664
83ccf991
AD
166652002-05-03 Akim Demaille <akim@epita.fr>
16666
16667 * data/bison.simple (b4_token_enum): New.
16668 (b4_token_defines): Use it to output tokens both as #define and
16669 enums.
16670 Suggested by Paul Eggert.
16671 * src/output.c (token_definitions_output): Don't output spurious
16672 white spaces.
16673
1f418995
AD
166742002-05-03 Akim Demaille <akim@epita.fr>
16675
16676 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16677
45119f04
RA
166782002-05-02 Robert Anisko <robert@lrde.epita.fr>
16679
16680 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16681 Update the stack class, give a try to deque as the default container.
16682
b2d52318
AD
166832002-05-02 Akim Demaille <akim@epita.fr>
16684
16685 * data/bison.simple (yyparse): Do not implement @$ = @1.
16686 (YYLLOC_DEFAULT): Adjust to do it.
16687 * doc/bison.texinfo (Location Default Action): Fix.
16688
3a8b4109
AD
166892002-05-02 Akim Demaille <akim@epita.fr>
16690
16691 * src/reader.c (parse_braces): Merge into...
16692 (parse_action): this.
16693
84614e13
AD
166942002-05-02 Akim Demaille <akim@epita.fr>
16695
16696 * configure.in (ALL_LINGUAS): Remove.
16697 * po/LINGUAS, hr.po: New.
16698
fdbcd8e2
AD
166992002-05-02 Akim Demaille <akim@epita.fr>
16700
16701 Remove the so called hairy (semantic) parsers.
16702
16703 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16704 * src/gram.h, src/gram.c (semantic_parser): Remove.
16705 (rule_t): Remove the guard and guard_line members.
16706 * src/lex.h (token_t): remove tok_guard.
16707 * src/options.c (option_table): Remove %guard and %semantic_parser
16708 support.
16709 * src/output.c, src/output.h (guards_output): Remove.
16710 (prepare): Adjust.
16711 (token_definitions_output): Don't output the `T'
16712 tokens (???).
16713 (output_skeleton): Don't output the guards.
16714 * src/files.c, src/files.c (attrsfile): Remove.
16715 * src/reader.c (symbol_list): Remove the guard and guard_line
16716 members.
16717 Adjust dependencies.
16718 (parse_guard): Remove.
16719 * data/bison.hairy: Remove.
16720 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16721 BISON_HAIRY.
16722
82b6cb3f
AD
167232002-05-02 Akim Demaille <akim@epita.fr>
16724
16725 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16726 (parse_guard): Rename the formal argument `stack_offset' as
16727 `rule_length', which is more readable.
16728 Adjust callers.
16729 (copy_at, copy_dollar): Instead of outputting the hard coded
16730 values of $$, $n and so forth, output invocation to b4_lhs_value,
16731 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
16732 Note: this patch partially drops `semantic-parser' support: it
16733 always does `rule_length - n', where semantic parsers ought to
16734 always use `-n'.
82b6cb3f
AD
16735 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16736 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16737
6cbfbcc5
AD
167382002-05-02 Akim Demaille <akim@epita.fr>
16739
16740 * configure.in (AC_INIT): Bump to 1.49b.
16741 (AM_INIT_AUTOMAKE): Short invocation.
16742
b8548114
AD
167432002-05-02 Akim Demaille <akim@epita.fr>
16744
16745 Version 1.49a.
16746
c20cd1fa
AD
167472002-05-01 Akim Demaille <akim@epita.fr>
16748
16749 * src/skeleton.h: Remove.
16750
8a9566d4
AD
167512002-05-01 Akim Demaille <akim@epita.fr>
16752
16753 * src/skeleton.h: Fix the #endif.
16754 Reported by Magnus Fromreide.
16755
8c6d399a
PE
167562002-04-26 Paul Eggert <eggert@twinsun.com>
16757
16758 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16759 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 16760 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 16761
2b7ed18a
RA
167622002-04-25 Robert Anisko <robert@lrde.epita.fr>
16763
16764 * src/scan-skel.l: Postprocess quadrigraphs.
16765
16766 * src/reader.c (copy_character): New function, used to output
16767 single characters while replacing `[' and `]' with quadrigraphs, to
16768 avoid troubles with M4 quotes.
16769 (copy_comment): Output characters with copy_character.
16770 (read_additionnal_code): Likewise.
16771 (copy_string2): Likewise.
16772 (copy_definition): Likewise.
16773
16774 * tests/calc.at: Exercise M4 quoting.
16775
34a89c50
AD
167762002-04-25 Akim Demaille <akim@epita.fr>
16777
16778 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16779 between `!' and the command.
16780 Reported by Paul Eggert.
16781
0dd1580a
RA
167822002-04-24 Robert Anisko <robert@lrde.epita.fr>
16783
16784 * tests/calc.at: Exercise prologue splitting.
16785
16786 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16787 `b4_post_prologue' instead of `b4_prologue'.
16788
16789 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16790 muscles.
16791 (output): Free pre_prologue_obstack and post_prologue_obstack.
16792 * src/files.h, src/files.c (attrs_obstack): Remove.
16793 (pre_prologue_obstack, post_prologue_obstack): New.
16794 * src/reader.c (copy_definition): Add a parameter to specify the
16795 obstack to fill, instead of using attrs_obstack unconditionally.
16796 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16797 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16798
83c1796f
PE
167992002-04-23 Paul Eggert <eggert@twinsun.com>
16800
16801 * data/bison.simple: Remove unnecessary commentary and white
16802 space differences from 1_29-branch.
16803 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16804
16805 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16806 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16807 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16808 constructors or destructors.
16809
16810 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16811
1207eeac
AD
168122002-04-23 Akim Demaille <akim@epita.fr>
16813
16814 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16815 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16816 location with columns.
16817 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16818 All reported by Paul Eggert.
16819
78ab8f67
AD
168202002-04-22 Akim Demaille <akim@epita.fr>
16821
16822 * src/reduce.c (dump_grammar): Move to...
16823 * src/gram.h, src/gram.c (grammar_dump): here.
16824 Be sure to separate long item numbers.
16825 Don't read the members of a rule's prec if its nil.
16826
133c20e2
AD
168272002-04-22 Akim Demaille <akim@epita.fr>
16828
16829 * src/output.c (table_size, table_grow): New.
16830 (MAXTABLE): Remove, replace uses with table_size.
16831 (pack_vector): Instead of dying when the table is too big, grow it.
16832
9515e8a7
AD
168332002-04-22 Akim Demaille <akim@epita.fr>
16834
16835 * data/bison.simple (yyr1): Its type is that of a token number.
16836 * data/bison.c++ (r1_): Likewise.
16837 * tests/regression.at (Web2c Actions): Adjust.
16838
23c5a174
AD
168392002-04-22 Akim Demaille <akim@epita.fr>
16840
16841 * src/reader.c (token_translations_init): 256 is now the default
16842 value for the error token, i.e., it will be assigned another
16843 number if the user assigned 256 to one of her tokens.
16844 (reader): Don't force 256 to error.
16845 * doc/bison.texinfo (Symbols): Adjust.
16846 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16847 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16848 etc. instead of 10, 20, 30 (which was used to `jump' over error
16849 (256) and undefined (2)).
16850
5fbb0954
AD
168512002-04-22 Akim Demaille <akim@epita.fr>
16852
16853 Propagate more token_number_t.
16854
16855 * src/gram.h (token_number_as_item_number)
16856 (item_number_as_token_number): New.
16857 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16858 Use it to create output_item_number_table and
16859 output_token_number_table.
16860 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16861 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16862 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16863 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16864
4f940944
AD
168652002-04-22 Akim Demaille <akim@epita.fr>
16866
16867 * src/output.h, src/output.c (get_lines_number): Remove.
16868
3ded9a63
AD
168692002-04-19 Akim Demaille <akim@epita.fr>
16870
16871 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16872 as Lex/Flex'.
16873 (Debugging): More details about enabling the debugging features.
16874 (Table of Symbols): Describe $$, $n, @$, and @n.
16875 Suggested by Tim Josling.
16876
e0c471a9
AD
168772002-04-19 Akim Demaille <akim@epita.fr>
16878
16879 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16880
fecc10cd
AD
168812002-04-10 Akim Demaille <akim@epita.fr>
16882
16883 * src/system.h: Rely on HAVE_LIMITS_H.
16884 Suggested by Paul Eggert.
16885
51dec47b
AD
168862002-04-09 Akim Demaille <akim@epita.fr>
16887
16888 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16889 full stderr, and strip it according to the bison options, instead
16890 of composing the error message from different bits.
16891 This makes it easier to check for several error messages.
16892 Adjust all the invocations.
16893 Add an invocation exercising the error token.
16894 Add an invocation demonstrating a stupid error message.
16895 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16896 Adjust the tests.
16897 Error message are for stderr, not stdout.
16898
007a50a4
AD
168992002-04-09 Akim Demaille <akim@epita.fr>
16900
16901 * src/gram.h, src/gram.c (error_token_number): Remove, use
16902 errtoken->number.
16903 * src/reader.c (reader): Don't specify the user token number (2)
16904 for $undefined, as it uselessly prevents using it.
16905 * src/gram.h (token_number_t): Move to...
16906 * src/symtab.h: here.
16907 (state_t.number): Is a token_number_t.
16908 * src/print.c, src/reader.c: Use undeftoken->number instead of
16909 hard coded 2.
16910 (Even though this 2 is not the same as above: the number of the
16911 undeftoken remains being 2, it is its user token number which
16912 might not be 2).
16913 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16914 `user_token_number_max'.
16915 Output `undef_token_number'.
16916 * data/bison.simple, data/bison.c++: Use them.
16917 Be sure to map invalid yylex return values to
16918 `undef_token_number'. This saves us from gratuitous SEGV.
16919
16920 * tests/conflicts.at (Solved SR Conflicts)
16921 (Unresolved SR Conflicts): Adjust.
16922 * tests/regression.at (Web2c Actions): Adjust.
16923
06446ccf
AD
169242002-04-08 Akim Demaille <akim@epita.fr>
16925
16926 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16927 Adding #line.
16928 Remove the duplicate `typedefs'.
16929 (RhsNumberType): Fix the declaration and various other typos.
16930 Use __ofile__.
16931 * data/bison.simple: Use __ofile__.
16932 * src/scan-skel.l: Handle __ofile__.
16933
62a3e4f0
AD
169342002-04-08 Akim Demaille <akim@epita.fr>
16935
16936 * src/gram.h (item_number_t): New, the type of item numbers in
16937 RITEM. Note that it must be able to code symbol numbers as
16938 positive number, and the negation of rule numbers as negative
16939 numbers.
16940 Adjust all dependencies (pretty many).
16941 * src/reduce.c (rule): Remove this `short *' pointer: use
16942 item_number_t.
16943 * src/system.h (MINSHORT, MAXSHORT): Remove.
16944 Include `limits.h'.
16945 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16946 (shortcpy): Remove.
16947 (MAXTABLE): Move to...
16948 * src/output.c (MAXTABLE): here.
16949 (prepare_rules): Use output_int_table to output rhs.
16950 * data/bison.simple, data/bison.c++: Adjust.
16951 * tests/torture.at (Big triangle): Move the limit from 254 to
16952 500.
16953 * tests/regression.at (Web2c Actions): Ajust.
16954
16955 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16956 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16957 passes, but produces negative #line number, once fixed, GCC is
16958 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16959 C), it passes.
16960 * src/state.h (state_h): Code input lines on ints, not shorts.
16961
bb88b0fc
AD
169622002-04-08 Akim Demaille <akim@epita.fr>
16963
16964 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16965 and then the grammar.
16966
9a636f47
AD
169672002-04-08 Akim Demaille <akim@epita.fr>
16968
16969 * src/system.h: No longer using strndup.
16970
680e8701
AD
169712002-04-07 Akim Demaille <akim@epita.fr>
16972
16973 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16974 * src/output.c (output_table_data): Return the longest number.
16975 (prepare_tokens): Output `token_number_max').
16976 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16977 New.
16978 Use them to define yy_token_number_type/TokenNumberType.
16979 Use this type for yytranslate.
16980 * tests/torture.at (Big triangle): Push the limit from 124 to
16981 253.
16982 * tests/regression.at (Web2c Actions): Adjust.
16983
817e9f41
AD
169842002-04-07 Akim Demaille <akim@epita.fr>
16985
16986 * tests/torture.at (Big triangle): New.
16987 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16988 * tests/existing.at: here.
16989
5123689b
AD
169902002-04-07 Akim Demaille <akim@epita.fr>
16991
16992 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16993 nritems.
16994 Adjust dependencies.
16995
f3849179
AD
169962002-04-07 Akim Demaille <akim@epita.fr>
16997
16998 * src/reader.c: Normalize increments to prefix form.
16999
bd02036a
AD
170002002-04-07 Akim Demaille <akim@epita.fr>
17001
17002 * src/reader.c, symtab.c: Remove debugging code.
17003
db8837cb
AD
170042002-04-07 Akim Demaille <akim@epita.fr>
17005
17006 Rename all the `bucket's as `symbol_t'.
17007
17008 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17009 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17010 * src/symtab.c, src/symtab.h (bucket): Rename as...
17011 (symbol_t): this.
17012 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17013 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17014 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17015 (buckets_new, buckets_free, buckets_do): Rename as...
17016 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17017 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17018 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17019 (symbols_new, symbols_free, symbols_do): these.
17020
72a23c97
AD
170212002-04-07 Akim Demaille <akim@epita.fr>
17022
17023 Use lib/hash for the symbol table.
17024
17025 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17026 EOF.
17027 * src/lex.c (lex): Set the `number' member of new terminals.
17028 * src/reader.c (bucket_check_defined, bucket_make_alias)
17029 (bucket_check_alias_consistence, bucket_translation): New.
17030 (reader, grammar_free, readgram, token_translations_init)
17031 (packsymbols): Adjust.
17032 (reader): Number the predefined tokens.
17033 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17034 for predefined tokens.
17035 * src/symtab.h (bucket): Remove all the hash table related
17036 members.
17037 * src/symtab.c (symtab): Replace by...
17038 (bucket_table): this.
17039 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17040 (buckets_new, buckets_do): New.
17041
280a38c3
AD
170422002-04-07 Akim Demaille <akim@epita.fr>
17043
17044 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17045 (start_symbol, max_user_token_number, semantic_parser)
17046 (error_token_number): Initialize.
17047 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17048 Initialize.
17049 (reader): Don't.
17050 (errtoken, eoftoken, undeftoken, axiom): Extern.
17051
03b31c0c
AD
170522002-04-07 Akim Demaille <akim@epita.fr>
17053
17054 * src/gram.h (rule_s): prec and precsym are now pointers
17055 to the bucket giving the priority/associativity.
17056 Member `associativity' removed: useless.
17057 * src/reduce.c, src/conflicts.c: Adjust.
17058
8b3df748
AD
170592002-04-07 Akim Demaille <akim@epita.fr>
17060
17061 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17062 Properly escape the symbols' TAG when outputting them.
17063
e601aa1d
AD
170642002-04-07 Akim Demaille <akim@epita.fr>
17065
17066 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17067
b0299a2e
AD
170682002-04-07 Akim Demaille <akim@epita.fr>
17069
17070 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17071 (LArule): this, which is an array to rule_t*.
17072 * src/print.c, src/conflicts.c: Adjust.
17073
d7e1f00c
AD
170742002-04-07 Akim Demaille <akim@epita.fr>
17075
17076 * src/gram.h (rule_t): Rename `number' as `user_number'.
17077 `number' is a new member.
17078 Adjust dependencies.
17079 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17080
cc9305dd
AD
170812002-04-07 Akim Demaille <akim@epita.fr>
17082
17083 As a result of the previous patch, it is no longer needed
17084 to reorder ritem itself.
17085
17086 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17087
b0940840
AD
170882002-04-07 Akim Demaille <akim@epita.fr>
17089
17090 Be sure never to walk through RITEMS, but use only data related to
17091 the rules themselves. RITEMS should be banished.
17092
17093 * src/output.c (output_token_translations): Rename as...
17094 (prepare_tokens): this.
17095 In addition to `translate', prepare the muscles `tname' and
17096 `toknum', which were handled by...
17097 (output_rule_data): this.
17098 Remove, and move the remainder of its outputs into...
17099 (prepare_rules): this new routines, which also merges content from
17100 (output_gram): this.
17101 (prepare_rules): Be sure never to walk through RITEMS.
17102 (output_stos): Rename as...
17103 (prepare_stos): this.
17104 (output): Always invoke prepare_states, after all, just don't use it
17105 in the output if you don't need it.
17106
643a5994
AD
171072002-04-07 Akim Demaille <akim@epita.fr>
17108
17109 * src/LR0.c (new_state): Display `nstates' as the name of the
17110 newly created state.
17111 Adjust to initialize first_state and last_state if needed.
17112 Be sure to distinguish the initial from the final state.
17113 (new_states): Create the itemset of the initial state, and use
17114 new_state.
17115 * src/closure.c (closure): Now that the initial state has its
17116 items properly set, there is no need for a special case when
17117 creating `ruleset'.
17118
17119 As a result, now the rule 0, reducing to $axiom, is visible in the
17120 outputs. Adjust the test suite.
17121
17122 * tests/conflicts.at (Solved SR Conflicts)
17123 (Unresolved SR Conflicts): Adjust.
17124 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17125 * tests/conflicts.at (S/R in initial): New.
17126
b4c4ccc2
AD
171272002-04-07 Akim Demaille <akim@epita.fr>
17128
17129 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17130 the RHS of the rules.
17131 * src/output.c (output_gram): Likewise.
17132
bba97eb2
AD
171332002-04-07 Akim Demaille <akim@epita.fr>
17134
17135 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17136 bucket.
17137 Adjust all dependencies.
17138 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17139 `number' of the buckets too.
17140 * src/gram.h: Include `symtab.h'.
17141 (associativity): Move to...
17142 * src/symtab.h: here.
17143 No longer include `gram.h'.
17144
c3b407f4
AD
171452002-04-07 Akim Demaille <akim@epita.fr>
17146
17147 * src/gram.h, src/gram.c (rules_rhs_length): New.
17148 (ritem_longest_rhs): Use it.
17149 * src/gram.h (rule_t): `number' is a new member.
17150 * src/reader.c (packgram): Set it.
17151 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17152 the end of `rules', and count them out of `nrules'.
17153 (reduce_output, dump_grammar): Adjust.
17154 * src/print.c (print_grammar): It is no longer needed to check for
17155 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17156 * tests/reduce.at (Reduced Automaton): New test.
17157
11652ab3
AD
171582002-04-07 Akim Demaille <akim@epita.fr>
17159
17160 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17161 lacking `+ 1' to nrules, Bison reported as useless a token if it
17162 was used solely to set the precedence of the last rule...
17163
26b23c1a
AD
171642002-04-07 Akim Demaille <akim@epita.fr>
17165
17166 * data/bison.c++, data/bison.simple: Don't output the current file
17167 name in #line, to avoid useless diffs between two identical
17168 outputs under different names.
17169
18bcecb0
AD
171702002-04-07 Akim Demaille <akim@epita.fr>
17171
17172 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17173 Normalize loops to using `< nrules + 1', not `<= nrules'.
17174
fa770c86
AD
171752002-04-07 Akim Demaille <akim@epita.fr>
17176
17177 * TODO: Update.
17178
d9b739c3
AD
171792002-04-07 Akim Demaille <akim@epita.fr>
17180
17181 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17182 bucket.value as bucket.number.
17183
99013900
AD
171842002-04-07 Akim Demaille <akim@epita.fr>
17185
17186 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17187 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17188 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17189 RHS, instead of being an index in RITEMS.
17190
e966383b
PE
171912002-04-04 Paul Eggert <eggert@twinsun.com>
17192
17193 * doc/bison.texinfo: Update copyright date.
17194 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17195 (Symbols): Warn about running Bison in one character set,
17196 but compiling and/or running in an incompatible one.
17197 Warn about character code 256, too.
17198
171992002-04-03 Paul Eggert <eggert@twinsun.com>
17200
17201 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17202 YYERROR_VERBOSE is nonzero, not whether it is defined.
17203
17204 Merge changes from bison-1_29-branch.
c307773e 17205
8d6c48b9
PE
172062002-03-20 Paul Eggert <eggert@twinsun.com>
17207
17208 Merge fixes from Debian bison_1.34-1.diff.
17209
17210 * configure.in (AC_PREREQ): 2.53.
17211
e53c6322
AD
172122002-03-20 Akim Demaille <akim@epita.fr>
17213
17214 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17215
9ffbeca7
PE
172162002-03-19 Paul Eggert <eggert@twinsun.com>
17217
21db0b2a
PE
17218 * src/bison.simple (YYCOPY): New macro.
17219 (YYSTACK_RELOCATE): Use it.
17220 Remove Type arg; no longer needed. All callers changed.
17221 (yymemcpy): Remove; no longer needed.
17222
9ffbeca7
PE
17223 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17224 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17225
642cb8f8
AD
172262002-03-19 Akim Demaille <akim@epita.fr>
17227
17228 Test and fix the #line outputs.
17229
17230 * tests/atlocal.at (GCC): New.
17231 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 17232 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
17233 (Action synch line, Epilogue synch line): New tests.
17234 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17235 * data/bison.simple, data/bison.c++: Use it.
17236
3c31a486
AD
172372002-03-19 Akim Demaille <akim@epita.fr>
17238
17239 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17240 (Solved SR Conflicts, %expect not enough, %expect right)
17241 (%expect too much): Move to...
17242 * tests/conflicts.at: this new file.
17243
0d8bed56
AD
172442002-03-19 Akim Demaille <akim@epita.fr>
17245
17246 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17247 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17248 that we can move to enums for instance.
17249 * src/output.c (token_definitions_output): Output a list of
17250 `token-name, token-number' instead of the #define.
17251 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17252
9208d17f
AD
172532002-03-14 Akim Demaille <akim@epita.fr>
17254
17255 Use Gettext 0.11.1.
17256
af27eacb
RA
172572002-03-09 Robert Anisko <robert@lrde.epita.fr>
17258
17259 * data/bison.c++: Make the user able to add members to the generated
17260 parser by subclassing.
17261
9101a310
RA
172622002-03-05 Robert Anisko <robert@lrde.epita.fr>
17263
17264 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17265 a character.
17266 Reported by Nicolas Tisserand and Nicolas Burrus.
17267
fff9bf0b
RA
172682002-03-04 Robert Anisko <robert@lrde.epita.fr>
17269
17270 * src/reader.c: Warn about lacking semi-colons, do not complain.
17271
64dba31e
RA
172722002-03-04 Robert Anisko <robert@lrde.epita.fr>
17273
17274 * data/bison.c++: Remove a debug line.
17275
374f5a14
RA
172762002-03-04 Robert Anisko <robert@lrde.epita.fr>
17277
17278 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17279 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17280 provide a default implementation.
17281
bfcf1f3a
AD
172822002-03-04 Akim Demaille <akim@epita.fr>
17283
17284 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17285 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17286 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17287 * tests/semantic.at (Parsing Guards): Similarly.
17288 * src/reader.at (readgram): Complain if the last rule is not ended
17289 with a semi-colon.
17290
65ccf9fc
AD
172912002-03-04 Akim Demaille <akim@epita.fr>
17292
17293 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17294 * src/closure.c: here.
17295 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17296 RTC.
17297 * src/warshall.h, src/warshall.c: Remove.
17298 * tests/sets.at (Broken Closure): Adjust.
17299
d0039cbc
AD
173002002-03-04 Akim Demaille <akim@epita.fr>
17301
17302 * src/output.c (output_skeleton): tempdir is const.
17303 bytes_read is unused.
17304
345cea78
AD
173052002-03-04 Akim Demaille <akim@epita.fr>
17306
17307 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17308 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17309 Update.
17310 From Michael Hayes.
17311
564801f7
AD
173122002-03-04 Akim Demaille <akim@epita.fr>
17313
17314 * src/closure.c (closure): `r' is unused.
17315
e5352bc7
AD
173162002-03-04 Akim Demaille <akim@epita.fr>
17317
17318 * tests/sets.at (Broken Closure): Add the ending `;'.
17319 * src/reader.at (readgram): Complain if a rule is not ended with a
17320 semi-colon.
17321
914feea9
AD
173222002-03-04 Akim Demaille <akim@epita.fr>
17323
17324 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17325 (count_sr_conflicts): Use bitset_count.
17326 * src/reduce.c (inaccessable_symbols): Ditto.
17327 (bits_size): Remove.
17328 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17329
f0250de6
AD
173302002-03-04 Akim Demaille <akim@epita.fr>
17331
17332 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17333 * src/reduce.c: Remove the `bitset_zero's following the
17334 `bitset_create's, as now it is performed by the latter.
17335
ef017502
AD
173362002-03-04 Akim Demaille <akim@epita.fr>
17337
17338 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17339 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17340 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17341 latest sources from Michael.
17342
76514394
AD
173432002-03-04 Akim Demaille <akim@epita.fr>
17344
17345 * src/output.c (output): Don't free the grammar.
17346 * src/reader.c (grammar_free): New.
17347 * src/main.c (main): Call it and don't free symtab here.
17348
55024580
AD
173492002-03-04 Akim Demaille <akim@epita.fr>
17350
17351 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17352 before returning.
17353 Reported by Benoit Perrot.
17354
f9abaa2c
AD
173552002-03-04 Akim Demaille <akim@epita.fr>
17356
17357 Use bitset operations when possible, not loops over bits.
17358
17359 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17360 bitset_or.
17361 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17362 * src/reduce.c (useless_nonterminals): Formatting changes.
17363 * src/warshall.c (TC): Use bitset_or.
17364
0e721e75
AD
173652002-03-04 Akim Demaille <akim@epita.fr>
17366
17367 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17368 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17369 Ditto.
17370
0fb1ffb1
AD
173712002-03-04 Akim Demaille <akim@epita.fr>
17372
17373 * src/lalr.c (F): Now a bitset*.
17374 Adjust all dependencies.
17375
b86796bf
AD
173762002-03-04 Akim Demaille <akim@epita.fr>
17377
17378 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17379 Adjust all dependencies.
17380
602bbf31
AD
173812002-03-04 Akim Demaille <akim@epita.fr>
17382
17383 * src/L0.c, src/LR0.h (nstates): Be size_t.
17384 Adjust comparisons (signed vs unsigned).
17385 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17386 bitset*.
17387 Adjust all dependencies.
17388
d8a0245c
AD
173892002-03-04 Akim Demaille <akim@epita.fr>
17390
17391 * src/closure.c (firsts): Now, also a bitset.
17392 Adjust all dependencies.
17393 (varsetsize): Remove, now unused.
17394 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17395
34ba9743
AD
173962002-03-04 Akim Demaille <akim@epita.fr>
17397
17398 * src/print.c: Convert to use bitset.h, not hand coded iterations
17399 over ints.
17400
ed86e78c
AD
174012002-03-04 Akim Demaille <akim@epita.fr>
17402
17403 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17404
dfdb1797
AD
174052002-03-04 Akim Demaille <akim@epita.fr>
17406
17407 * src/closure.c (ruleset): Be a bitset.
17408 (rulesetsize): Remove.
17409
7086e707
AD
174102002-03-04 Akim Demaille <akim@epita.fr>
17411
17412 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17413 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17414 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17415 * src/closure.c (fderives): Be an array of bitsets.
17416
98254360
RA
174172002-02-28 Robert Anisko <robert@lrde.epita.fr>
17418
17419 * data/bison.c++: Merge the two generated headers. Insert a copyright
17420 notice in each output file.
17421
a75c057f
AD
174222002-02-28 Akim Demaille <akim@epita.fr>
17423
17424 * data/bison.c++: Copy the prologue of bison.simple to fetch
17425 useful M4 definitions, such as b4_header_guard.
17426
06b00abc
AD
174272002-02-25 Akim Demaille <akim@epita.fr>
17428
17429 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
17430 translator friendly scheme for the bgr
17431 copyright notice.
06b00abc 17432
70e7d534
AD
174332002-02-25 Akim Demaille <akim@epita.fr>
17434
17435 * src/output.c (header_output): Remove, now handled completely via
17436 M4.
17437
abe017f6
AD
174382002-02-25 Akim Demaille <akim@epita.fr>
17439
17440 * m4/m4.m4: New, from CVS Autoconf.
17441 * configure.in: Invoke it.
17442 * src/output.c (output_skeleton): Use its result instead of the
17443 hard coded name.
17444
381fb12e
AD
174452002-02-25 Akim Demaille <akim@epita.fr>
17446
17447 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17448 Fileutils 4.1.5.
17449 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17450 * src/output.c (output_skeleton): Use mkstemp to create a real
17451 temporary file.
17452 Move the filling of `skeleton' and its muscle to...
17453 (prepare): here.
17454 (output): Move the definition of the prologue muscle to...
17455 (prepare): here.
17456 * src/system.h (DEFAULT_TMPDIR): New.
17457
6f38107f
PE
174582002-02-14 Paul Eggert <eggert@twinsun.com>
17459
17460 Remove the support for C++ namespace cleanliness; it was
17461 causing more problems than it was curing, since it didn't work
17462 properly on some nonstandard C++ compilers. This can wait
17463 for a proper C++ parser.
17464
17465 * NEWS: Document this.
17466 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17467 of C++, as it's treated like C now.
17468 * src/bison.simple (YYSTD): Remove.
17469 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17470 Treat C++ just like Standard C instead of trying to support
17471 namespace cleanliness.
17472
80cce3da
AD
174732002-02-14 Akim Demaille <akim@epita.fr>
17474
17475 * tests/regression.at (else): Adjust to Andreas' change.
17476
842e8679
AD
174772002-02-14 Akim Demaille <akim@epita.fr>
17478
17479 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17480
4bda3f10
AD
174812002-02-13 Andreas Schwab <schwab@suse.de>
17482
17483 * src/output.c (output_rule_data): Don't output NULL, it might
17484 not be defined yet.
17485
4162fa07 174862002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 17487
4162fa07
RA
17488 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17489 (Copyright notice): Update.
b418ecd8 17490
bd16a5dc
AD
174912002-02-11 Akim Demaille <akim@epita.fr>
17492
17493 * tests/regression.at (%nonassoc and eof): Don't include
17494 nonportable headers.
17495
8d69a1a3
RA
174962002-02-08 Robert Anisko <robert@lrde.epita.fr>
17497
17498 * data/bison.c++: Correct error recovery. Make the user able to
17499 initialize the starting location.
17500
9b2d0677
AD
175012002-02-07 Akim Demaille <akim@epita.fr>
17502
17503 * tests/input.at: New.
17504
69e2658b
RA
175052002-02-07 Robert Anisko <robert@lrde.epita.fr>
17506
17507 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 17508 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
17509 directives around tables only needed for debugging.
17510
4aacc3a7
RA
175112002-02-07 Robert Anisko <robert@lrde.epita.fr>
17512
17513 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17514 C++ parsers.
17515 (yy::b4_name::parse): Use print_.
17516
762a801e
RA
175172002-02-07 Robert Anisko <robert@lrde.epita.fr>
17518
17519 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17520
4bb2bc3f
RA
175212002-02-07 Robert Anisko <robert@lrde.epita.fr>
17522
17523 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17524 C++ parsers.
17525 (yy::b4_name::parse): Build verbose error messages, and use error_.
17526
6b45a3ca
RA
175272002-02-06 Robert Anisko <robert@lrde.epita.fr>
17528
17529 * data/bison.c++: Fix m4 quoting in comments.
17530
50997c6e
RA
175312002-02-06 Robert Anisko <robert@lrde.epita.fr>
17532
17533 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17534 not expanded by m4.
17535
3f3eed27
AD
175362002-02-05 Akim Demaille <akim@epita.fr>
17537
17538 * data/bison.c++: Adjust to the M4 back end.
17539 More is certainly needed.
17540
be2a1a68
AD
175412002-02-05 Akim Demaille <akim@epita.fr>
17542
17543 Give a try to M4 as a back end.
17544
17545 * lib/readpipe.c: New, from wdiff.
17546 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17547 BISON_HAIRY.
17548 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17549 specific values. Now it is m4 that performs the lookup.
17550 * src/parse-skel.y: Remove.
17551 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17552 * src/output.c (actions_output, guards_output)
17553 (token_definitions_output): No longer keeps track of the output
17554 line number, hence remove the second argument.
17555 (guards_output): Check against the guard member of a rule, not the
17556 action member.
17557 Adjust callers.
17558 (output_skeleton): Don't look for the skeleton location, let m4 do
17559 that.
17560 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17561 file will be used.
17562 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17563 (prepare): Given that for the time being changesyntax is not
17564 usable in M4, rename the muscles using `-' to `_'.
17565 Define `defines_flag', `output_parser_name' and `output_header_name'.
17566 * src/output.h (actions_output, guards_output)
17567 (token_definitions_output): Adjust prototypes.
17568 * src/scan-skel.l: Instead of scanning the skeletons, it now
17569 processes the output of m4: `__oline__' and `#output'.
17570 * data/bison.simple: Adjust to be used by M4(sugar).
17571 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17572 to date.
17573 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17574 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17575 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17576 shamelessly stolen from CVS Autoconf.
17577
beda758b
AD
175782002-02-05 Akim Demaille <akim@epita.fr>
17579
17580 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17581 * configure.in: Check for the declarations of free and malloc.
17582 * src/muscle_tab.c: Adjust.
17583
5ece6d43
AD
175842002-02-05 Akim Demaille <akim@epita.fr>
17585
17586 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17587 which have no values.
17588
5bb18f9a
AD
175892002-02-05 Akim Demaille <akim@epita.fr>
17590
17591 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17592 * data/: here.
17593
894dd62e
PE
175942002-01-29 Paul Eggert <eggert@twinsun.com>
17595
17596 * src/bison.simple (YYSIZE_T): Do not define merely because
17597 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17598 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17599
82841af7
AD
176002002-01-27 Akim Demaille <akim@epita.fr>
17601
17602 Fix `%nonassoc and eof'.
17603
17604 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17605 which were not properly copied! Replace
17606 memcpy (res->errs, src->errs, src->nerrs);
17607 with
17608 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17609 !!!
17610 * tests/regression.at (%nonassoc and eof): Adjust to newest
17611 Autotest: `.' is not in the PATH.
17612
318b76e9
AD
176132002-01-27 Akim Demaille <akim@epita.fr>
17614
17615 * tests/sets.at (AT_EXTRACT_SETS): New.
17616 (Nullable): Use it.
17617 (Firsts): New.
17618
30d2f3d5
AD
176192002-01-26 Akim Demaille <akim@epita.fr>
17620
17621 * tests/actions.at, tests/calc.at, tests/headers.at,
17622 * tests/torture.at: Adjust to the newest Autotest which no longer
17623 forces `.' in the PATH.
17624
30f8c395
AD
176252002-01-25 Akim Demaille <akim@epita.fr>
17626
17627 * tests/regression.at (%nonassoc and eof): New.
17628 Suggested by Robert Anisko.
17629
29ae55f1
AD
176302002-01-24 Akim Demaille <akim@epita.fr>
17631
17632 Bison dumps core when trying to complain about broken input files.
17633 Reported by Cris van Pelt.
17634
17635 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17636 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17637 into...
17638 (Invalid inputs): Strengthen: exercise parse_percent_token.
17639
2b548aa6
RA
176402002-01-24 Robert Anisko <robert.anisko@epita.fr>
17641
17642 * src/Makefile.am: Add bison.c++.
17643 * src/bison.c++: New skeleton.
17644
bb0146c2
AD
176452002-01-21 Paolo Bonzini <bonzini@gnu.org>
17646
17647 * po/it.po: New.
17648
bec30531
AD
176492002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17650
17651 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17652
fc6edc45
MA
176532002-01-20 Marc Autret <marc@gnu.org>
17654
17655 * src/files.c (compute_output_file_names): Fix
17656
5e5d5415
MA
176572002-01-20 Marc Autret <marc@gnu.org>
17658
17659 * tests/output.at: New test.
17660 * src/files.c (compute_base_names): Don't map extensions when
17661 the YACC flag is set, use defaults.
17662 Reported by Evgeny Stambulchik.
17663
44ea3fbd
MA
176642002-01-20 Marc Autret <marc@gnu.org>
17665
ba0fe3c7
PE
17666 * src/system.h: Need to define __attribute__ away for non-GCC
17667 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
17668 Suggested by Albert Chin-A-Young.
17669
338963d1
TVH
176702002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17671
17672 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17673 canonical definition.
17674 * src/system.h: Use the canonical definition for PARAMS (avoids
17675 a conflict with the macro from lib/hash.h).
17676
c57b2479
AD
176772002-01-11 Akim Demaille <akim@epita.fr>
17678
17679 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 17680 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 17681
b85810ae
AD
176822002-01-09 Akim Demaille <akim@epita.fr>
17683
17684 * src/files.c, src/files.h (output_infix): New.
17685 (tab_extension): Remove.
17686 (compute_base_names): Compute the former, drop the latter.
17687 * src/output.c (prepare): Insert the muscles `output-infix', and
17688 `output-suffix'.
17689 * src/parse-skel.y (string, string.1): New.
17690 (section.header): Use it.
17691 (section.yacc): Remove.
17692 (prefix): Remove too.
17693 * src/scan-skel.l: Adjust.
17694 * src/bison.simple, src/bison.hairy: Adjust.
17695
cae60122
AD
176962002-01-09 Akim Demaille <akim@epita.fr>
17697
17698 * configure.in (WERROR_CFLAGS): Compute it.
17699 * src/Makefile.am (CFLAGS): Pass it.
17700 * tests/atlocal.in (CFLAGS): Idem.
17701 * src/files.c: Fix a few warnings.
17702 (get_extension_index): Remove, unused.
17703
ae404801
AD
177042002-01-08 Akim Demaille <akim@epita.fr>
17705
17706 * src/getargs.c (AS_FILE_NAME): New.
17707 (getargs): Use it to convert DOSish file names.
17708 * src/files.c (base_name): Rename as full_base_name to avoid
17709 clashes with `base_name ()'.
17710 (filename_split): New.
17711 (compute_base_names): N-th rewrite, using filename_split.
17712
22312b71
AD
177132002-01-08 Akim Demaille <akim@epita.fr>
17714
17715 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17716 New, stolen from the Fileutils 4.1.
17717 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17718 * configure.in: Check for the presence of memrchr, and of its
17719 prototype.
17720
a67cef01
TVH
177212002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17722
17723 * lib/hash.h (__P): Added definition for this macro.
17724 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17725 BUILT_SOURCES, to ensure they are generated first.
17726 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17727 %error-verbose to allow bootstrapping with bison 1.30x.
17728
2b25d624
AD
177292002-01-06 Akim Demaille <akim@epita.fr>
17730
17731 * src/reader.c (parse_braces): Don't fetch the next char, the
17732 convention is to fetch on entry.
17733 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17734 'switch' without a following semicolon.
17735 * tests/regression.at (braces parsing): New.
17736
3460813b
AD
177372002-01-06 Akim Demaille <akim@epita.fr>
17738
17739 Bison is dead wrong in its RR conflict reports.
17740
17741 * tests/torture.at (GNU Cim Grammar): New.
17742 * src/conflicts.c (count_rr_conflicts): Fix.
17743
73784c64
AD
177442002-01-06 Akim Demaille <akim@epita.fr>
17745
17746 Creating package.m4 from configure.ac causes too many problems.
17747
17748 * tests/Makefile.am (package.m4): Create it by hand,
17749 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17750
25d81090
AD
177512002-01-06 Akim Demaille <akim@epita.fr>
17752
17753 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17754 skeleton.h.
17755
a9b8959e
PE
177562002-01-04 Paul Eggert <eggert@twinsun.com>
17757
17758 * doc/bison.texinfo (Debugging):
17759 Remove YYSTDERR; it's no longer defined or used.
17760 Also, s/cstdio.h/cstdio/.
17761
25d81090
AD
177622002-01-03 Akim Demaille <akim@epita.fr>
17763
17764 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17765
1109455c
AD
177662002-01-03 Akim Demaille <akim@epita.fr>
17767
17768 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17769 tracing code to --trace, wait for a better --trace option, with
17770 args.
17771
7ea5e977
AD
177722002-01-03 Akim Demaille <akim@epita.fr>
17773
17774 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17775 The ISO C++ standard is extremely clear about it: stderr is
17776 considered a macro, not a regular symbol (see table 94 `Header
17777 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17778 Therefore std:: does not apply to it. It still does with fprintf.
17779 Also, s/cstdio.h/cstdio/.
17780
fab5b110
AD
177812002-01-03 Akim Demaille <akim@epita.fr>
17782
17783 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17784 for non system headers.
17785
aed7fd9b
AD
177862002-01-02 Akim Demaille <akim@epita.fr>
17787
17788 Equip the skeleton chain with location tracking, runtime trace,
17789 pure parser and scanner.
17790
17791 * src/parse-skel.y: Request a pure parser, locations, and prefix
17792 renaming.
17793 (%union): Having several members with the same type does not help
17794 type mismatches, simplify.
17795 (YYPRINT, yyprint): New.
17796 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17797 (skel_error): this.
17798 Handle locations.
17799 * src/scan-skel.l: Adjust to these changes.
17800 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17801 (LOCATION_PRINT, skel_control_t): New.
17802
24fad99e
AD
178032001-12-30 Akim Demaille <akim@epita.fr>
17804
17805 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17806 replace `gb' with BLANKS.
17807 * src/scan-skel.l: Adjust.
17808
a4b36db4
AD
178092001-12-30 Akim Demaille <akim@epita.fr>
17810
17811 * src/system.h: We don't need nor want bcopy.
17812 Throw away MS-DOS crap: we don't need getpid.
17813 * configure.in: We don't need strndup. It was even causing
17814 problems: because Flex includes the headers *before* us,
17815 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17816 not visible.
17817 * lib/xstrndup.c: New.
17818 * src/scan-skel.l: Use it.
17819 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17820 * src/parse-skel.y: Use %directives instead of #defines.
17821
1239777d
AD
178222001-12-30 Akim Demaille <akim@epita.fr>
17823
17824 * src/skeleton.h: New.
17825 * src/output.c (output_parser, output_master_parser): Remove, dead
17826 code.
17827 * src/output.h (get_lines_number, actions_output, guards_output)
17828 (token_definitions_output): Prototype them.
17829 * src/parse-skel.y: Add the license notice.
17830 Include output.h and skeleton.h.
17831 (process_skeleton): Returns void, and takes a single parameter.
17832 * src/scan-skel.l: Add the license notice.
17833 Include skeleton.h.
17834 Don't use %option yylineno: it seems that then Flex imagines
17835 REJECT has been used, and therefore it won't reallocate its
17836 buffers (which makes no other sense to me than a bug). It results
17837 in warnings for `unused: yy_flex_realloc'.
17838
9b3add5b
RA
178392001-12-30 Robert Anisko <robert.anisko@epita.fr>
17840
17841 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17842 (MUSCLE_INSERT_PREFIX): ...to there.
17843 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17844 (MUSCLE_INSERT_PREFIX): Move from here...
17845
17846 * src/bison.hairy: Add a section directive. Put braces around muscle
17847 names. This parser skeleton is still broken, but Bison should not
17848 choke on a bad muscle 'syntax'.
17849 * src/bison.simple: Add a section directive. Put braces around muscle
17850 names.
17851
17852 * src/files.h (strsuffix, stringappend): Add declarations.
17853 (tab_extension): Add declaration.
17854 (short_base_name): Add declaration.
17855
17856 * src/files.c (strsuffix, stringappend): No longer static. These
17857 functions are used in the skeleton parser.
17858 (tab_extension): New.
17859 (compute_base_names): Use the computations done in this function
fab5b110 17860 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
17861 names.
17862 (short_base_name): No longer static.
17863
17864 * src/output.c (output_skeleton): New.
17865 (output): Disable call to output_master_parser, and give a try to
17866 a new skeleton handling system.
17867 (guards_output, actions_output): No longer static.
17868 (token_definitions_output, get_lines_number): No longer static.
17869
17870 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17871
fab5b110 17872 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
17873 parse-skel.y.
17874
17875 * src/parse-skel.y: New file.
17876 * src/scan-skel.l: New file.
17877
b5b61c61
AD
178782001-12-29 Akim Demaille <akim@epita.fr>
17879
17880 %name-prefix is broken.
17881
17882 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17883 Adjust all dependencies.
17884 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17885 %name-prefix.
17886
17887 Renaming yylval but not yylloc is not consistent. Now we do.
17888
17889 * src/bison.simple: Prefix yylloc if used.
17890 * doc/bison.texinfo (Decl Summary): Document that.
17891
8c9a50be
AD
178922001-12-29 Akim Demaille <akim@epita.fr>
17893
17894 * doc/bison.texinfo: Promote `%long-directive' over
17895 `%long_directive'.
17896 Remove all references to fixed-output-files, yacc is enough.
17897
d99361e6
AD
178982001-12-29 Akim Demaille <akim@epita.fr>
17899
17900 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17901 user prologue. These are defaults.
17902 * tests/actions.at (Mid-rule actions): Make sure the user can
17903 define YYDEBUG and YYERROR_VERBOSE.
17904
b9cecb91
AD
179052001-12-29 Akim Demaille <akim@epita.fr>
17906
17907 * src/output.c (header_output): Don't forget to export YYLTYPE and
17908 yylloc.
17909 * tests/headers.at (export YYLTYPE): New, make sure it does.
17910 * tests/regression.at (%union and --defines, Invalid CPP headers):
17911 Move to...
17912 * tests/headers.at: here.
17913
aea13e97
AD
179142001-12-29 Akim Demaille <akim@epita.fr>
17915
17916 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17917
931394cb
AD
179182001-12-29 Akim Demaille <akim@epita.fr>
17919
17920 * tests/actions.at (Mid-rule actions): Output on a single line
17921 instead of several.
17922
704a47c4
AD
179232001-12-29 Akim Demaille <akim@epita.fr>
17924
17925 * doc/bison.texinfo: Formatting changes.
17926
091e20bb
AD
179272001-12-29 Akim Demaille <akim@epita.fr>
17928
17929 Don't store the token defs in a muscle, just be ready to output it
17930 on command. Now possible via `symbols'. Fixes a memory leak.
17931
17932 * src/output.c (token_definitions_output): New.
17933 (output_parser, header_output): Use it.
17934 * src/reader.c (symbols_save): Remove.
17935
cce71710
AD
179362001-12-29 Akim Demaille <akim@epita.fr>
17937
17938 * src/bison.simple: Do not provide a default for YYSTYPE and
17939 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17940 default.
17941
82c035a8
AD
179422001-12-29 Akim Demaille <akim@epita.fr>
17943
17944 Mid-rule actions are simply... ignored!
17945
17946 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17947 the empty-rule associated to the dummy symbol, not to the host
17948 rule.
17949 * tests/actions.at (Mid-rule actions): New.
17950
8419d367
AD
179512001-12-29 Akim Demaille <akim@epita.fr>
17952
17953 Memory leak.
17954
17955 * src/reader.c (reader): Free grammar.
17956
375d5806
AD
179572001-12-29 Akim Demaille <akim@epita.fr>
17958
17959 Memory leak.
17960
17961 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17962 since it allocates it for each state, although only one is needed.
17963 (allocate_storage): Do it here.
17964
f51cb8ff
AD
179652001-12-29 Akim Demaille <akim@epita.fr>
17966
17967 * src/options.h, src/options.c (create_long_option_table): Rename
17968 as...
17969 (long_option_table_new): this, with a clearer prototype.
17970 (percent_table): Remove, unused,
17971 * src/getargs.c (getargs): Adjust.
17972
29e88316
AD
179732001-12-29 Akim Demaille <akim@epita.fr>
17974
17975 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17976 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17977 as states.
17978
b9f71f19
AD
179792001-12-29 Akim Demaille <akim@epita.fr>
17980
17981 * src/lalr.c (build_relations): Rename `states' as `states1'.
17982 Sorry, I don't understand exactly what it is, no better name...
17983
1a2b5d37
AD
179842001-12-29 Akim Demaille <akim@epita.fr>
17985
17986 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17987 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17988 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17989 as rules.
17990
1cca533e
AD
179912001-12-29 Akim Demaille <akim@epita.fr>
17992
17993 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17994 ago.
17995
c03ae966
AD
179962001-12-29 Akim Demaille <akim@epita.fr>
17997
17998 * src/reader.c, src/reader.h (user_toknums): Remove.
17999 Adjust all users to use symbols[i]->user_token_number.
18000
5a670b1e
AD
180012001-12-29 Akim Demaille <akim@epita.fr>
18002
18003 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18004 Adjust all users to use symbols[i]->prec or ->assoc.
18005
ad949da9
AD
180062001-12-29 Akim Demaille <akim@epita.fr>
18007
18008 * src/reader.c, src/reader.h (tags): Remove.
18009 Adjust all users to use symbols[i]->tag.
18010
0e78e603
AD
180112001-12-29 Akim Demaille <akim@epita.fr>
18012
18013 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18014 and rule_table.
18015 * src/reader.c (packsymbols): Fill this table.
18016 Drop sprec.
18017 * src/conflicts.c (resolve_sr_conflict): Adjust.
18018 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18019 single table.
18020 Use symbols[i]->tag instead of tags[i].
18021
213e640e
AD
180222001-12-29 Akim Demaille <akim@epita.fr>
18023
18024 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18025 In addition, put a comment in there, to replace...
18026 * tests/regression.at (%union and C comments): Remove.
18027
e7b8bef1
AD
180282001-12-29 Akim Demaille <akim@epita.fr>
18029
18030 * tests/regression.at (Web2c Actions): Blindly move the actual
18031 output as expected output. The contents *seem* right to me, but I
18032 can't pretend reading perfectly parser tables... Nonetheless, all
18033 the other tests pass correctly, the table look OK, even though the
18034 presence of `$axiom' is to be noted: AFAICS it is useless (but
18035 harmless).
18036
b68e7744
AD
180372001-12-29 Akim Demaille <akim@epita.fr>
18038
18039 * src/reader.c (readgram): Don't add the rule 0 if there were no
18040 rules read. In other words, add it _after_ having performed
18041 grammar sanity checks.
18042 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18043
78d5bae9
AD
180442001-12-29 Akim Demaille <akim@epita.fr>
18045
18046 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18047 visible, and some states have now a different number.
18048
ff442794
AD
180492001-12-29 Akim Demaille <akim@epita.fr>
18050
18051 * src/reader.c (readgram): Bind the initial rule's lineno to that
18052 of the first rule.
18053 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18054 (Solved SR Conflicts): Adjust rule 0's line number.
18055
610ab194
AD
180562001-12-29 Akim Demaille <akim@epita.fr>
18057
18058 Fix the `GAWK Grammar' failure.
18059
18060 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18061 the reductions of the first state which was mistakenly confused
18062 with the final state because precisely final_state was initialized
18063 to 0.
18064 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18065 now noticed by Bison.
18066 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18067 have a reduction on $default.
18068
29d29c8f
AD
180692001-12-29 Akim Demaille <akim@epita.fr>
18070
18071 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18072 rule line numbers.
18073 * src/closure.c (print_closure): Likewise.
18074 * src/derives.c (print_derives): Likewise.
18075 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18076 now.
18077
7c6b64d0
AD
180782001-12-29 Akim Demaille <akim@epita.fr>
18079
18080 * src/lalr.c (lookaheads_print): New.
18081 (lalr): Call it when --trace-flag.
18082 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18083 are dumped.
18084
3d4daee3
AD
180852001-12-29 Akim Demaille <akim@epita.fr>
18086
18087 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18088 when walking through ritem, even via rule->rhs.
18089 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18090 (useful_production, useless_nonterminals): Likewise.
18091 (reduce_grammar_tables): Likewise, plus update nritems.
18092 * src/nullable.c (set_nullable): Likewise.
18093 * src/lalr.c (build_relations): Likewise.
18094 * tests/sets.at (Nullable): Adjust.
18095 Fortunately, now, the $axiom is no longer nullable.
18096
9e7f6bbd
AD
180972001-12-29 Akim Demaille <akim@epita.fr>
18098
18099 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18100 the 0-sentinel.
18101 * src/gram.c (ritem_longest_rhs): Likewise.
18102 * src/reduce.c (nonterminals_reduce): Likewise.
18103 * src/print_graph.c (print_graph): Likewise.
18104 * src/output.c (output_rule_data): Likewise.
18105 * src/nullable.c (set_nullable): Likewise.
18106
255ef638
AD
181072001-12-29 Akim Demaille <akim@epita.fr>
18108
18109 * src/output.c: Comment changes.
18110
0d8a7363
AD
181112001-12-27 Paul Eggert <eggert@twinsun.com>
18112
18113 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18114 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18115 Sparc, as they were causing more porting problems than the
18116 (minor) performance improvement was worth.
18117
18118 Also, catch up with 1.31's YYSTD.
18119
3db472b9
AD
181202001-12-27 Akim Demaille <akim@epita.fr>
18121
18122 * src/output.c (output_gram): Rely on nritems, not the
18123 0-sentinel. See below.
18124 Use -1 as separator, not 0.
18125 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18126 Rely on -1 as separator in yyrhs, instead of 0.
18127 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18128 twice `Now at end of input', therefore there are two lines less to
18129 expect.
18130
b365aa05
AD
181312001-12-27 Akim Demaille <akim@epita.fr>
18132
18133 * tests/regression.at (Unresolved SR Conflicts):
18134 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18135 below.
18136
30171f79
AD
181372001-12-27 Akim Demaille <akim@epita.fr>
18138
18139 * src/LR0.c (new_state): Recognize the final state by the fact it
18140 is reached by eoftoken.
18141 (insert_start_shifting_state, insert_eof_shifting_state)
18142 (insert_accepting_state, augment_automaton): Remove, since now
18143 these states are automatically computed from the initial state.
18144 (generate_states): Adjust.
18145 * src/print.c: When reporting a rule number to the user, substract
18146 1, so that the axiom rule is rule 0, and the first user rule is 1.
18147 * src/reduce.c: Likewise.
18148 * src/print_graph.c (print_core): For the time being, just as for
18149 the report, depend upon --trace-flags to dump the full set of
18150 items.
18151 * src/reader.c (readgram): Once the grammar read, insert the rule
18152 0: `$axiom: START-SYMBOL $'.
18153 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18154 number of the states has changed (the final state is no longer
18155 necessarily the last), catch up.
18156
75142d45
AD
181572001-12-27 Akim Demaille <akim@epita.fr>
18158
18159 Try to make the use of the eoftoken valid. Given that its value
18160 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18161 is used instead of > 0 where appropriate, (ii), depend upon nritems
18162 instead of the 0-sentinel.
18163
18164 * src/gram.h, src/gram.c (nritems): New.
18165 Expected to be duplication of nitems, but for the time being...
18166 * src/reader.c (packgram): Assert nritems and nitems are equal.
18167 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18168 * src/closure.c (print_closure, print_fderives): Likewise.
18169 * src/gram.c (ritem_print): Likewise.
18170 * src/print.c (print_core, print_grammar): Likewise.
18171 * src/print_graph.c: Likewise.
18172
b7c49edf
AD
181732001-12-27 Akim Demaille <akim@epita.fr>
18174
18175 * src/main.c (main): If there are complains after grammar
18176 reductions, then output the report anyway if requested, then die.
18177 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18178 * src/reader.c (eoftoken): New.
18179 (parse_token_decl): If the token being defined has value `0', it
18180 is the eoftoken.
18181 (packsymbols): No longer hack `tags' to insert `$' by hand.
18182 Be sure to preserve the value of the eoftoken.
18183 (reader): Make sure eoftoken is defined.
18184 Initialize nsyms to 0: now eoftoken is created just like the others.
18185 * src/print.c (print_grammar): Don't special case the eof token.
18186 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18187 lie anyway, albeit pleasant.
18188 * tests/calc.at: Exercise error messages with eoftoken.
18189 Change the grammar so that empty input is invalid.
18190 Adjust expectations.
18191 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18192
ec2da99f
AD
181932001-12-27 Akim Demaille <akim@epita.fr>
18194
18195 * configure.in: Check the protos of strchr ans strspn.
18196 Replace strchr if needed.
18197 * src/system.h: Provide the protos of strchr, strspn and memchr if
18198 missing.
18199 * lib/strchr.c: New.
18200 * src/reader.c (symbols_save): Use strchr.
18201
8adfa272
AD
182022001-12-27 Akim Demaille <akim@epita.fr>
18203
18204 * src/print.c, src/print_graph.c (escape): New.
18205 Use it to quote the TAGS outputs.
18206 * src/print_graph.c (print_state): Now errors are in red, and
18207 reductions in green.
18208 Prefer high to wide: output the state number on a line of its own.
18209
80dac38c
AD
182102001-12-27 Akim Demaille <akim@epita.fr>
18211
18212 * src/state.h, src/state.c (reductions_new): New.
18213 * src/LR0.c (set_state_table): Let all the states have a
18214 `reductions', even if reduced to 0.
18215 (save_reductions): Adjust.
18216 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18217 * src/print.c (print_reductions, print_actions): Adjust.
18218 * src/output.c (action_row): Adjust.
18219
2cec70b9
AD
182202001-12-27 Akim Demaille <akim@epita.fr>
18221
18222 * src/state.h, src/state.c (errs_new, errs_dup): New.
18223 * src/LR0.c (set_state_table): Let all the states have an errs,
18224 even if reduced to 0.
18225 * src/print.c (print_errs, print_reductions): Adjust.
18226 * src/output.c (output_actions, action_row): Adjust.
18227 * src/conflicts.c (resolve_sr_conflict): Adjust.
18228
13ca549a
AD
182292001-12-27 Akim Demaille <akim@epita.fr>
18230
18231 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18232
5092aba5
AD
182332001-12-27 Akim Demaille <akim@epita.fr>
18234
18235 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18236 * src/print.c: here.
18237 (lookaheadset, shiftset): New, used as additional storage by
18238 print_reductions.
18239 (print_results): Adjust.
18240 (print_shifts, print_gotos, print_errs): New, extracted from...
18241 (print_actions): here.
18242 * src/print_graph.c (print_actions): Remove dead code.
18243
11e2beca
AD
182442001-12-27 Akim Demaille <akim@epita.fr>
18245
18246 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18247 `$n' and `@n'.
18248
dac3c910
AD
182492001-12-27 Akim Demaille <akim@epita.fr>
18250
18251 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18252 (build_relations): Adjust.
18253
d0b0fefa
AD
182542001-12-27 Akim Demaille <akim@epita.fr>
18255
18256 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18257 duplication.
18258
adc8c848
AD
182592001-12-27 Akim Demaille <akim@epita.fr>
18260
18261 * src/reader.c (packgram): Catch nitems overflows.
18262
14d293ac
AD
182632001-12-27 Akim Demaille <akim@epita.fr>
18264
18265 * src/files.c, src/files.h (guard_obstack): Remove.
18266 * src/output.c (output): Adjust.
18267 * src/reader.c (parse_braces): New, factoring...
18268 (copy_action, copy_guard): these two which are renamed as...
18269 (parse_action, parse_guard): these.
18270 As a voluntary consequence, using braces around guards is now
18271 mandatory.
18272
f499b062
AD
182732001-12-27 Akim Demaille <akim@epita.fr>
18274
18275 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18276 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18277 members.
18278 (symbol_list_new): Adjust.
18279 (copy_action): action_line is the first line, not the last.
18280 (copy_guard): Just as for actions, store the `action' only, not
18281 the switch/case/break flesh.
18282 Don't parse the user action that might follow the guard, let...
18283 (readgram): do it, i.e., now, there can be an action after a
18284 guard.
18285 In other words the guard is just explicitly optional.
18286 (packgram): Adjust.
18287 * src/output.c (guards_output): New.
18288 (output_parser): Call it when needed.
18289 (output): Also free the guard and attrs obstacks.
18290 * src/files.c, src/files.h (obstack_save): Remove.
18291 (output_files): Remove.
18292 As a result, if one needs the former `.act' file, using an
18293 appropriate skeleton which requires actions and guards is now
18294 required.
18295 * src/main.c (main): Adjust.
18296 * tests/semantic.at: New.
18297 * tests/regression.at: Use `input.y' as input file name.
18298 Avoid 8+3 problems by requiring input.c when the test needs the
18299 parser.
18300
d945f5cd
AD
183012001-12-27 Akim Demaille <akim@epita.fr>
18302
18303 * src/reader.c (symbol_list_new): Be sure to initialize all the
18304 fields.
18305
d200e455
AD
183062001-12-27 Akim Demaille <akim@epita.fr>
18307
18308 All the hacks using a final pseudo state are now useless.
18309
18310 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18311 * src/lalr.c (nLA): New.
18312 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18313 instead of lookaheadsp from the pseudo state (nstate + 1).
18314
f9507c28
AD
183152001-12-27 Akim Demaille <akim@epita.fr>
18316
18317 * src/output.c (action_row, token_actions): Use a state_t instead
18318 of a integer, and nlookaheads instead of the following state's
18319 lookaheadsp.
18320
065fbd27
AD
183212001-12-27 Akim Demaille <akim@epita.fr>
18322
18323 * src/conflicts.c (log_resolution, flush_shift)
18324 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18325 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18326 (conflicts_print, print_reductions): Use a state_t instead of an
18327 integer when referring to a state.
18328 As much as possible, depend upon nlookaheads, instead of the
18329 `lookaheadsp' member of the following state (since lookaheads of
18330 successive states are successive, the difference between state n + 1
18331 and n served as the number of lookaheads for state n).
18332 * src/lalr.c (add_lookback_edge): Likewise.
18333 * src/print.c (print_core, print_actions, print_state)
18334 (print_results): Likewise.
18335 * src/print_graph.c (print_core, print_actions, print_state)
18336 (print_graph): Likewise.
18337 * src/conflicts.h: Adjust.
18338
1b177bd7
AD
183392001-12-27 Akim Demaille <akim@epita.fr>
18340
18341 * src/bison.hairy: Formatting/comment changes.
18342 ANSIfy.
18343 Remove `register' indications.
18344 Add plenty of `static'.
18345
7742ddeb
AD
183462001-12-27 Akim Demaille <akim@epita.fr>
18347
18348 * src/output.c (prepare): Drop the muscle `ntbase' which
18349 duplicates ntokens.
18350 * src/bison.simple: Formatting/comment changes.
18351 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18352 is an undocumented synonym.
18353
1fa14068
AD
183542001-12-22 Akim Demaille <akim@epita.fr>
18355
18356 * src/output.c (output_table_data): Change the prototype to use
18357 `int' for array ranges: some invocations do pass an int, not a
18358 short.
18359 Reported by Wayne Green.
18360
b9752825
AD
183612001-12-22 Akim Demaille <akim@epita.fr>
18362
18363 Some actions of web2c.y are improperly triggered.
18364 Reported by Mike Castle.
18365
18366 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18367 * tests/regression.at (Web2c): Rename as...
18368 (Web2c Report): this.
18369 (Web2c Actions): New.
18370
776209d6
AD
183712001-12-22 Akim Demaille <akim@epita.fr>
18372
18373 Reductions in web2c.y are improperly reported.
18374 Reported by Mike Castle.
18375
18376 * src/conflicts.c (print_reductions): Fix.
18377 * tests/regression.at (Web2c): New.
18378
275fc3ad
AD
183792001-12-18 Akim Demaille <akim@epita.fr>
18380
18381 Some host fail on `assert (!"foo")', which expands to
18382 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18383 Reported by Nelson Beebee.
18384
18385 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18386 `#define it_succeeded 0' and `assert (it_succeeded)'.
18387
897668ee
MA
183882001-12-17 Marc Autret <autret_m@epita.fr>
18389
18390 * src/bison.simple: Don't hard code the skeleton line and filename.
18391 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18392 New line counter 'skeleton_line' (skeleton-line muscle).
18393
ab3399e0
PE
183942001-12-17 Paul Eggert <eggert@twinsun.com>
18395
18396 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18397 YYDEBUG must be defined to a nonzero value.
18398
18399 * src/bison.simple (yytname): Do not assume that the user defines
18400 YYDEBUG to a properly parenthesized expression.
18401
3877f72b
AD
184022001-12-17 Akim Demaille <akim@epita.fr>
18403
18404 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18405 nlookaheads is a new member.
18406 Adjust all users.
18407 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18408 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18409 state.
776209d6 18410
331dbc1b
AD
184112001-12-17 Akim Demaille <akim@epita.fr>
18412
18413 * src/files.h, src/files.c (open_files, close_files): Remove.
18414 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18415 let...
18416 * src/reader.c (reader): Do it.
776209d6 18417
be750e4c
AD
184182001-12-17 Akim Demaille <akim@epita.fr>
18419
18420 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 18421
709ae8c6
AD
184222001-12-17 Akim Demaille <akim@epita.fr>
18423
18424 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18425 (flush_reduce): New.
18426 (resolve_sr_conflict): Adjust.
776209d6 18427
f87685c3
AD
184282001-12-17 Akim Demaille <akim@epita.fr>
18429
18430 * src/output.c (output_obstack): Be static and rename as...
18431 (format_obstack): this, to avoid any confusion with files.c's
18432 output_obstack.
18433 * src/reader.h (muscle_obstack): Move to...
18434 * src/output.h: here, since it's defined in output.c.
18435
837491d8
AD
184362001-12-17 Akim Demaille <akim@epita.fr>
18437
18438 * src/output.c (action_row, save_column, default_goto)
18439 (sort_actions, matching_state, pack_vector): Better variable
18440 locality.
18441
796d61fb
AD
184422001-12-17 Akim Demaille <akim@epita.fr>
18443
18444 * src/output.c: Various formatting changes.
776209d6 18445
64d15509
AD
184462001-12-17 Akim Demaille <akim@epita.fr>
18447
18448 * src/files.c (output_files): Free the output_obstack.
18449 * src/main.c (main): Call print and print_graph conditionally.
18450 * src/print.c (print): Work unconditionally.
18451 * src/print_graph.c (print_graph): Work unconditionally.
18452 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18453
fbc8ecb7
MA
184542001-12-16 Marc Autret <autret_m@epita.fr>
18455
18456 * src/output.c (actions_output): Fix. When we use %no-lines,
18457 there is one less line per action.
18458
f0440388
MA
184592001-12-16 Marc Autret <autret_m@epita.fr>
18460
18461 * src/bison.simple: Remove a useless #line directive.
18462 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18463 * src/output.c (get_lines_number): New.
776209d6 18464 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
18465 output muscles.
18466 Fix line numbering.
18467 (actions_output): Computes the number of lines taken by actions.
18468 (output_master_parser): Insert new skeleton which is the name of
18469 the output parser file name.
18470
a79986b8
MA
184712001-12-15 Marc Autret <autret_m@epita.fr>
18472
18473 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18474
4ec8e00f
MA
184752001-12-15 Marc Autret <autret_m@epita.fr>
18476
18477 * src/output.c (output_gram): Keep track of the hairy one.
18478
1a4648ff
AD
184792001-12-15 Akim Demaille <akim@epita.fr>
18480
18481 Make `make distcheck' work.
18482
18483 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18484 system.h which uses libgettext.h.
18485
9c2c67e6
AD
184862001-12-15 Akim Demaille <akim@epita.fr>
18487
18488 * src/nullable.c (set_nullable): Useless rules must be skipped,
18489 otherwise, since we range over their symbols, we might look at a
18490 nonterminal which no longer ``exists'', i.e., it is not counted in
18491 `nvars', hence we overflow our arrays.
18492
93ede233
AD
184932001-12-15 Akim Demaille <akim@epita.fr>
18494
18495 The header can also be produced directly, without any obstack!
18496 Yahoo!
18497
18498 * src/files.c, src/files.h (defines_obstack): Remove.
18499 (compute_header_macro): Global.
18500 (defines_obstack_save): Remove.
18501 * src/reader.c (parse_union_decl): No longer output to
18502 defines_obstack: its content can be found in the `stype' muscle
18503 anyway.
18504 (output_token_translations): Merge into...
18505 (symbols_output): this.
18506 Rename as...
18507 (symbols_save): this.
18508 (reader): Adjust.
18509 * src/output.c (header_output): New.
18510 (output): Call it.
18511
2666f928
AD
185122001-12-15 Akim Demaille <akim@epita.fr>
18513
18514 * src/reader.c (parse_union_decl): Instead of handling two obstack
18515 simultaneously, use one to define the `stype' muscle, and use the
18516 value of the latter to fill defines_obstack.
18517 (copy_comment): Remove.
18518 (copy_comment2): Work for a single obstack.
18519 Rename as...
18520 (copy_comment): this.
18521
428046f8
AD
185222001-12-15 Akim Demaille <akim@epita.fr>
18523
18524 * src/lex.c, src/lex.h (xgetc): No longer static.
18525 * src/reader.c (parse_union_decl): Revamp.
18526
ea52d706
AD
185272001-12-15 Akim Demaille <akim@epita.fr>
18528
18529 Still making progress in separating Bison into (i) input, (ii)
18530 process, (iii) output: now we can directly output the parser file
18531 without using table_obstack at all.
18532
18533 * src/files.c, src/files.h (table_obstack): Bye bye.
18534 (parser_file_name): New.
18535 * src/files.c (compute_output_file_names): Compute it.
18536 * src/output.c (actions_output, output_parser)
18537 (output_master_parser): To a file instead of an obstack.
18538
3f96f4dc
AD
185392001-12-15 Akim Demaille <akim@epita.fr>
18540
18541 Attach actions to rules, instead of pre-outputting them to
18542 actions_obstack.
18543
18544 * src/gram.h (rule_t): action and action_line are new members.
18545 * src/reader.c (symbol_list): Likewise.
18546 (copy_action): Save the actions within the rule.
18547 (packgram): Save them in rule_table.
18548 * src/output.c (actions_output): New.
18549 (output_parser): Use it on `%%actions'.
18550 (output_rule_data): Don't free rule_table.
18551 (output): Do it.
18552 (prepare): Don't save the `action' muscle.
18553 * src/bison.simple: s/%%action/%%actions/.
18554
51576fb3
AD
185552001-12-15 Akim Demaille <akim@epita.fr>
18556
18557 * src/reader.c (copy_action): When --yacc, don't append a `;'
18558 to the user action: let it fail if lacking.
dee049eb 18559 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 18560
2648a72d
AD
185612001-12-14 Akim Demaille <akim@epita.fr>
18562
18563 * src/lex.c (literalchar): Simply return the char you decoded, non
18564 longer mess around with obstacks and int pointers.
18565 Adjust all callers.
18566
92790e5b
AD
185672001-12-14 Akim Demaille <akim@epita.fr>
18568
18569 * src/lex.c (literalchar): Don't escape the special characters,
18570 just decode them, and keep them as char (before, eol was output as
18571 the 2 char string `\n' etc.).
18572 * src/output.c (output_rule_data): Use quotearg to output the
18573 token strings.
18574
927c1557
PE
185752001-12-13 Paul Eggert <eggert@twinsun.com>
18576
18577 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18578 Do not infringe on the global user namespace when using C++.
18579 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18580 All uses of `fprintf' and `stderr' changed.
18581
18582 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18583
ed8e1f68
AD
185842001-12-13 Akim Demaille <akim@epita.fr>
18585
18586 The computation of nullable is broken: it doesn't handle empty
18587 RHS's properly.
18588
18589 * tests/torture.at (GNU AWK Grammar): New.
18590 * tests/sets.at (Nullable): New.
18591 * src/nullable.c (set_nullable): Instead of blindly looping over
18592 `ritems', loop over the rules, and then over their rhs's.
18593
18594 Work around Autotest bugs.
18595
18596 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18597 frame, because Autotest understand lines starting with a `+' as
18598 traces from the shell. Then, they are not processed properly.
18599 Admittedly an Autotest bug, but we don't have time to wait for
18600 Autotest to catch up.
18601 * tests/regression.at (Broken Closure): Adjust to the new table
18602 frames.
18603 Move to...
18604 * tests/sets.at: here.
18605
cb581495
AD
186062001-12-13 Akim Demaille <akim@epita.fr>
18607
18608 * src/closure.c (closure): Use nrules instead of playing tricks
18609 with BITS_PER_WORD.
18610
2e729273
AD
186112001-12-13 Akim Demaille <akim@epita.fr>
18612
18613 * src/print.c (print_actions): Output the handling of `$' as the
18614 traces do: shifting the token EOF. Before EOF was treated as a
18615 nonterminal.
18616 * tests/regression.at: Adjust some tests.
18617 * src/print_graph.c (print_core): Complete the set of items via
18618 closure. The next-to-final and final states are still unsatisfying,
18619 but that's to be addressed elsewhere.
18620 No longer output the rule numbers, but do output the state number.
18621 A single loop for the shifts + gotos is enough, but picked a
18622 distinct color for each.
18623 (print_graph): Initialize and finalize closure.
18624
107f7dfb
AD
186252001-12-13 Akim Demaille <akim@epita.fr>
18626
18627 * src/reader.c (readgram): Remove dead code, an strip useless
18628 braces.
18629 (get_type): Remove, unused.
18630
9b53a24f
AD
186312001-12-12 Akim Demaille <akim@epita.fr>
18632
18633 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18634 on that of lib/error.c.
18635
dbfb6dcd
AD
186362001-12-12 Akim Demaille <akim@epita.fr>
18637
18638 Some hosts don't like `/' in includes.
18639
18640 * src/system.h: Include libgettext.h without qualifying the path.
18641 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18642 $(top_srcdir).
18643
c25fb648
MA
186442001-12-11 Marc Autret <autret_m@epita.fr>
18645
18646 * src/output.c (output_parser): Remove useless muscle.
18647
710ddc4f
MA
186482001-12-11 Marc Autret <autret_m@epita.fr>
18649
18650 * src/bison.simple: Remove #line just before %%epilogue. It
18651 is now handled in ...
18652 * src/reader.c (read_additionnal_code): Add the output of a
18653 #line for the epilogue.
18654
e83d80b8
MA
186552001-12-10 Marc Autret <autret_m@epita.fr>
18656
927c1557 18657 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
18658 replace precedent remove.
18659 * src/bison.simple: Remove #line before %%prologue because
18660 %%input-line is wrong at this time.
18661
971d5158
MA
186622001-12-10 Marc Autret <autret_m@epita.fr>
18663
18664 * src/reader.c (symbols_output): Clean up.
927c1557 18665 * src/output.c (output_gram, output): Clean up.
971d5158 18666
5edafffd
AD
186672001-12-10 Akim Demaille <akim@epita.fr>
18668
18669 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18670 * src/LR0.c (set_state_table): here.
18671 * src/lalr.c (lalr): Call it.
18672
0279f8e9
AD
186732001-12-10 Akim Demaille <akim@epita.fr>
18674
18675 * src/state.h (shifts): Remove the `number' member: shifts are
18676 attached to state, hence no longer need to be labelled with a
18677 state number.
18678
190c4f5f
AD
186792001-12-10 Akim Demaille <akim@epita.fr>
18680
18681 Now that states have a complete set of members, the linked list of
18682 shifts is useless: just fill directly the state's shifts member.
18683
18684 * src/state.h (shifts): Remove the `next' member.
18685 * src/LR0.c (first_state, last_state): Remove.
18686 Adjust the callers.
18687 (augment_automaton): Don't look for the shifts that must be added
18688 a shift on EOF: it is those of the state we looked for! But now,
18689 since shifts are attached, it is no longer needed to looking
18690 merely by its id: its number.
18691
2a73b93d
AD
186922001-12-10 Akim Demaille <akim@epita.fr>
18693
18694 * src/LR0.c (augment_automaton): Better variable locality.
18695 Remove an impossible branch: if there is a state corresponding to
18696 the start symbol being shifted, then there is shift for the start
18697 symbol from the initial state.
18698
74392f6a
AD
186992001-12-10 Akim Demaille <akim@epita.fr>
18700
18701 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18702 only when appropriate: when insert_start_shifting_state' is not
18703 invoked.
18704 * tests/regression.at (Rule Line Numbers): Adjust.
18705
37c82725
AD
187062001-12-10 Akim Demaille <akim@epita.fr>
18707
18708 * src/LR0.c (augment_automaton): Now that all states have shifts,
18709 merge the two cases addition shifts to the initial state.
18710
6a164e0c
AD
187112001-12-10 Akim Demaille <akim@epita.fr>
18712
18713 * src/lalr.c (set_state_table): Move to...
18714 * src/LR0.c: here.
18715 * src/lalr.c (lalr): Don't call it...
18716 * src/LR0.c (generate_states): do it.
18717 * src/LR0.h (first_state): Remove, only the table is used.
18718
7215de24
AD
187192001-12-10 Akim Demaille <akim@epita.fr>
18720
18721 * src/LR0.h (first_shift, first_reduction): Remove.
18722 * src/lalr.c: Don't use first_shift: find shifts through the
18723 states.
18724
80e25d4d
AD
187252001-12-10 Akim Demaille <akim@epita.fr>
18726
18727 * src/LR0.c: Attach shifts to states as soon as they are
18728 computed.
18729 * src/lalr.c (set_state_table): Instead of assigning shifts to
18730 state, just assert that the mapping was properly done.
18731
0ab3728b
AD
187322001-12-10 Akim Demaille <akim@epita.fr>
18733
18734 * src/LR0.c (insert_start_shift): Rename as...
18735 (insert_start_shifting_state): this.
18736 (insert_eof_shifting_state, insert_accepting_state): New.
18737 (augment_automaton): Adjust.
18738 Better locality of the variables.
18739 When looking if the start_symbol is shifted from the initial
18740 state, using `while (... symbol != start_symbol ...)' sounds
18741 better than `while (... symbol < start_symbol ...)': If fail
18742 to see how the order between symbols could be relevant!
18743
78af9bbc
AD
187442001-12-10 Akim Demaille <akim@epita.fr>
18745
18746 * src/getargs.h: Don't declare `spec_name_prefix' and
18747 `spec_file_prefix', declared by src/files.h.
18748 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18749 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18750 * src/output.c (prepare): Adjust.
18751 * src/reader.c (symbols_output): Likewise.
18752 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18753
bdef2a41
AD
187542001-12-10 Akim Demaille <akim@epita.fr>
18755
18756 * src/muscle_tab.c (muscle_init): NULL is a better default than
18757 `"0"'.
18758
3735969c
AD
187592001-12-10 Akim Demaille <akim@epita.fr>
18760
18761 * src/reader.c (reader): Calling symbols_output once is enough.
18762
49701457
AD
187632001-12-10 Akim Demaille <akim@epita.fr>
18764
18765 Now that states have a complete set of members, the linked list of
18766 reductions is useless: just fill directly the state's reductions
18767 member.
18768
18769 * src/state.h (struct reductions): Remove member `number' and
18770 `next'.
18771 * src/LR0.c (first_reduction, last_reduction): Remove.
18772 (save_reductions): Don't link the new reductions, store them in
18773 this_state.
18774 * src/lalr.c (set_state_table): No need to attach reductions to
18775 states, it's already done.
18776 * src/output.c (output_actions): No longer free the shifts, then
18777 the reductions, then the states: free all the states and their
18778 members.
18779
0edad749
AD
187802001-12-10 Akim Demaille <akim@epita.fr>
18781
18782 * src/options.c (OPTN, DRTV, BOTH): New.
18783 (option_table): Use them.
18784
0edad749
AD
18785 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18786 the job of system.h.
18787 * src/options.c: Don't include stdio.h and xalloc.h for the same
18788 reasons.
18789
5449dd0f
AD
187902001-12-10 Akim Demaille <akim@epita.fr>
18791
18792 * src/output.c (output, prepare): Make sure the values of the
18793 muscles `action' and `prologue' are 0-terminated.
18794
a870c567
AD
187952001-12-10 Akim Demaille <akim@epita.fr>
18796
18797 Clean up GCC warnings.
18798
18799 * src/reader.c (copy_action): `buf' is not used.
18800 (parse_skel_decl): Be static.
18801 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18802 * src/options.h (create_long_option_table): Have a real prototype.
18803 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18804 (hash_delete_at): Return const void *.
18805 Adjust casts to preserve the const.
18806
80df8768
AD
188072001-12-10 Akim Demaille <akim@epita.fr>
18808
18809 * configure.in: Require 2.52g.
18810 M4 is not needed, but AUTOM4TE is.
18811 * m4/m4.m4: Remove.
18812 * tests/Makefile.am: Adjust.
18813
f693ad14
AD
188142001-12-10 Akim Demaille <akim@epita.fr>
18815
18816 One structure for states is enough, even though theoretically
18817 there are LR(0) states and LALR(1) states.
18818
18819 * src/lalr.h (state_t): Remove.
18820 (state_table): Be state_t **, not state_t *.
18821 * src/state.h (core, CORE_ALLOC): Rename as...
18822 (state_t, STATE_ALLOC): this.
18823 Add the LALR(1) members: shifts, reductions, errs.
18824 * src/LR0.c (state_table): Rename as...
18825 (state_hash): this, to avoid name clashes with the global
18826 `state_table'.
18827 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18828 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18829
74ffbcb6
AD
188302001-12-10 Akim Demaille <akim@epita.fr>
18831
18832 Bison dumps core on bash.y.
18833 Reported by Pascal Bart.
18834
18835 * src/warshall.c (bitmatrix_print): New.
18836 (TC): Use it.
ba0fe3c7 18837 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
18838 j must be the outer loop.
18839 * tests/regression.at (Broken Closure): New.
18840
07708e19
AD
188412001-12-05 Akim Demaille <akim@epita.fr>
18842
18843 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18844 its argument.
ba1ecc07 18845 Reported by Peter Hamorsky.
07708e19 18846
92b16366
AD
188472001-12-05 Akim Demaille <akim@epita.fr>
18848
18849 * src/conflicts.c (err_table): Remove.
18850 (resolve_sr_conflict): Adjust.
18851 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18852 Rename as...
18853 (state_t.reductions, state_t.shifts): this.
18854
076ab033
AD
188552001-12-05 Akim Demaille <akim@epita.fr>
18856
18857 * src/reduce.c (reduce_grammar_tables): No longer disable the
18858 removal of useless rules via CPP but via `if (0)', so that the
18859 compiler still check the code is valid.
18860 For instance, it should have noticed `rline' no longer exists: use
18861 the `line' member of rule_t.
18862 * src/gram.c (dummy, rline): Remove, unused.
18863
3843c413
AD
188642001-12-05 Akim Demaille <akim@epita.fr>
18865
18866 * src/output.c (pack_vector): Use assert, not berror.
18867 * src/main.c (berror): Remove, unused.
18868
43168960
AD
188692001-12-05 Akim Demaille <akim@epita.fr>
18870
18871 New experimental feature: if --verbose --trace output all the
18872 items of a state, not only its kernel.
18873
18874 * src/print.c (print_core): If `trace_flag', then invoke closure
18875 before outputting the items of the state (print_core is no longer
18876 a correct name them).
18877 (print_results): Invoke new_closure/free_closure if needed.
18878
b2872512
AD
188792001-12-05 Akim Demaille <akim@epita.fr>
18880
18881 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18882 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18883 (nitemset): for consistency with the rest of the project.
18884
23cbcc6c
AD
188852001-12-05 Akim Demaille <akim@epita.fr>
18886
18887 * src/closure.c (print_closure): Improve.
18888 (closure): Use it for printing input and output.
18889
03ec521c
AD
188902001-12-05 Akim Demaille <akim@epita.fr>
18891
18892 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18893 indexed by nonterminals.
18894
3a7456dd
AD
188952001-12-05 Akim Demaille <akim@epita.fr>
18896
18897 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18898 what it was!).
18899 * src/warshall.h: Remove accidental duplication of the content.
18900
1cbcf2e7
AD
189012001-12-05 Akim Demaille <akim@epita.fr>
18902
18903 * src/closure.c (set_fderives): De-obfuscate.
18904
84182270
AD
189052001-12-05 Akim Demaille <akim@epita.fr>
18906
18907 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18908
3f6f053c
AD
189092001-12-05 Akim Demaille <akim@epita.fr>
18910
18911 * src/closure.c (set_firsts): De-obfuscate.
18912
7a5350ba
AD
189132001-12-05 Akim Demaille <akim@epita.fr>
18914
18915 * src/output.c (action_row): De-obfuscate
18916 using the good o' techniques: arrays not pointers, variable
18917 locality, BITISSET, RESETBIT etc.
18918
d954473d
AD
189192001-12-05 Akim Demaille <akim@epita.fr>
18920
18921 Pessimize the code to simplify it: from now on, all the states
18922 have a valid SHIFTS, which NSHIFTS is possibly 0.
18923
18924 * src/LR0.c (shifts_new): Be global and move to..
18925 * src/state.c, src/state.h: here.
18926 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18927 * src/print_graph: Adjust.
18928
9839bbe5
AD
189292001-12-05 Akim Demaille <akim@epita.fr>
18930
18931 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18932 * src/conflicts.c: Use it.
18933 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18934 incorrectly ``simplified''.
18935
9f136c07
AD
189362001-12-05 Akim Demaille <akim@epita.fr>
18937
18938 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18939 using the good o' techniques: arrays not pointers, variable
18940 locality, BITISSET, RESETBIT etc.
18941
b608206e
AD
189422001-12-05 Akim Demaille <akim@epita.fr>
18943
18944 * src/state.h (SHIFT_SYMBOL): New.
18945 * src/conflicts.c: Use it to deobfuscate.
18946
52afa962
AD
189472001-12-05 Akim Demaille <akim@epita.fr>
18948
18949 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18950 (print_reductions): De-obfuscate using the good o' techniques:
18951 arrays not pointers, variable locality, BITISSET.
18952
e74dc321
AD
189532001-12-05 Akim Demaille <akim@epita.fr>
18954
18955 * src/conflicts.c (print_reductions): Arrays, not pointers.
18956 Use BITISSET.
18957
768fca83
AD
189582001-12-05 Akim Demaille <akim@epita.fr>
18959
18960 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18961
a17e599f
AD
189622001-12-05 Akim Demaille <akim@epita.fr>
18963
18964 * src/conflicts.c (print_reductions): Improve variable locality.
18965
a04bc341
AD
189662001-12-05 Akim Demaille <akim@epita.fr>
18967
18968 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18969
c8ea038e
AD
189702001-12-05 Akim Demaille <akim@epita.fr>
18971
18972 * src/conflicts.c (print_reductions): Improve variable locality.
18973
aa2aab3c
AD
189742001-12-05 Akim Demaille <akim@epita.fr>
18975
18976 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18977 * src/lalr.c: Use them.
18978
b178c8cc
AD
189792001-12-05 Akim Demaille <akim@epita.fr>
18980
18981 * src/LR0.c (augment_automaton): Formatting changes.
18982 Better variable locality.
18983
f67d13aa
AD
189842001-12-05 Akim Demaille <akim@epita.fr>
18985
18986 * src/lalr.c (matrix_print): New.
18987 (transpose): Use it.
18988 Use arrays instead of pointers.
18989
c2713865
AD
189902001-12-05 Akim Demaille <akim@epita.fr>
18991
18992 * src/lalr.c (maxrhs): Move to...
18993 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18994 * src/lalr.c (build_relations): Adjust.
18995
9887c18a
AD
189962001-12-05 Akim Demaille <akim@epita.fr>
18997
18998 * src/lalr.c (transpose): Free the memory allocated to the
18999 argument, as it is replaced by the results by the unique caller.
19000 (build_relations): Merely invoke transpose: it handles the memory
19001 deallocation.
19002 Improve variable locality.
19003 Avoid variables used as mere abbreviations.
19004 (compute_lookaheads): Use arrays instead of pointers.
19005
4d4f699c
AD
190062001-12-05 Akim Demaille <akim@epita.fr>
19007
19008 * src/lalr.c (initialize_F): Improve variable locality.
19009 Avoid variables used as mere abbreviations.
19010
80a69750
AD
190112001-12-05 Akim Demaille <akim@epita.fr>
19012
19013 * src/derives.c (print_derives): Display the ruleno.
19014 * src/lalr.c (initialize_F, transpose): Better variable locality
19015 to improve readability.
19016 Avoid variables used as mere abbreviations.
19017
fe961097
AD
190182001-12-05 Akim Demaille <akim@epita.fr>
19019
19020 * src/lalr.c (traverse): Use arrays instead of pointers.
19021
e3e4e814
AD
190222001-12-05 Akim Demaille <akim@epita.fr>
19023
19024 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19025 the handling of squeue.
19026 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19027
630e182b
AD
190282001-12-05 Akim Demaille <akim@epita.fr>
19029
19030 Because useless nonterminals are now kept alive (instead of being
19031 `destroyed'), we now sometimes examine them, and store information
19032 related to them. Hence we need to know their number, and adjust
19033 memory allocations.
19034
19035 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19036 static.
19037 * src/LR0.c (allocate_itemsets): The memory allocated to
19038 `symbol_count' was used for two different purpose: once to count
19039 the number of occurrences of each symbol, and later reassigned to
19040 `shift_symbol', containing the symbol that can be shifted from a
19041 given state.
19042 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19043 only, and...
19044 (new_itemsets): Allocate `shift_symbol' here.
19045 (allocate_itemsets): symbol_count includes useless nonterminals.
19046 Make room for them.
19047 (free_storage): Use `free', not `XFREE', for pointers that cannot
19048 be null.
19049
81b51460
AD
190502001-12-05 Akim Demaille <akim@epita.fr>
19051
19052 * src/nullable.c (set_nullable): Deobfuscate the handling of
19053 ritem.
19054 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19055
3067fbef
AD
190562001-12-05 Akim Demaille <akim@epita.fr>
19057
19058 * src/gram.c, src/gram.h (ritem_print): New.
19059 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19060 (This useless function was defined only to work around VMS linkers
19061 that can't handle compilation units with variables only).
19062 * src/reduce.c (dump_grammar): Use it to trace the construction of
19063 ritem.
19064
c2bea5f9
PE
190652001-12-04 Paul Eggert <eggert@twinsun.com>
19066
7d27c823
PE
19067 * src/bison.simple (union yyalloc): Change member names
19068 to be the same as the stack names.
19069 (yyparse): yyptr is now union yyalloc *, not char *.
19070 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19071 and may generate better code on some machines.
c2bea5f9
PE
19072 (yystpcpy): Use prototype if __STDC__ is defined, not just
19073 if __cplusplus is defined.
35687a9d 19074
2c8a9dfa
AD
190752001-11-30 Akim Demaille <akim@epita.fr>
19076
19077 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19078 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19079 Gettext doesn't compile cleanly, and dies with -Werror.
19080 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19081 Include WARNING_CFLAGS here.
19082 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19083 before being defined.
19084
f4e421e6
AD
190852001-11-27 Paul Eggert <eggert@twinsun.com>
19086
19087 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19088 First arg is int, not unsigned.
19089 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19090 (SIZE_MAX, UINT_MAX): New macros.
19091 (quotearg_n_options): Abort if N is negative.
19092 Avoid overflow check on hosts where size_t is 64 bits and int
19093 is 32 bits, as overflow is impossible there.
19094 Fix off-by-one typo that caused unnecessary reallocation.
19095
7093d0f5
AD
190962001-11-29 Paul Eggert <eggert@twinsun.com>
19097
19098 Name space cleanup in generated parser.
19099
19100 * doc/bison.texinfo (Bison Parser): Discuss system headers
19101 and their effect on the user name space.
19102
19103 * src/bison.simple:
19104 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19105 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19106 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19107
19108 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19109 on user names when possible.
19110
19111 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19112 Simplify test for whather <alloca.h> exists.
19113
19114 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19115
19116 (<stdio.h>): Include if YYDEBUG.
19117
19118 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19119 ! defined (yyoverflow) && ! defined (yymemcpy).
19120
19121 (yymemcpy, yyparse): Rename local variables as needed so that
19122 they all begin with 'yy'.
19123
19124 (yystrlen, yystpcpy): New functions.
19125
19126 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19127 All uses changed.
19128
19129 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19130 instead of relying on string.h functions. Use YYSTACK_ALLOC
19131 and YYSTACK_FREE instead of malloc and free.
19132
fd51e5ff
AD
191332001-11-30 Akim Demaille <akim@epita.fr>
19134
19135 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19136 before their first uses.
19137 (YYBISON, YYPURE): Move to the top of the output.
19138
7d13ff5f
AD
191392001-11-30 Akim Demaille <akim@epita.fr>
19140
19141 * tests/reduce.at (Useless Nonterminals): Fix.
19142
892a3995
AD
191432001-11-30 Akim Demaille <akim@epita.fr>
19144
19145 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19146 if body instead of `;' to pacify GCC's warnings.
19147
68f1e3ed
AD
191482001-11-30 Akim Demaille <akim@epita.fr>
19149
19150 Instead of mapping the LHS of unused rules to -1, keep the LHS
19151 valid, but flag the rules as invalid.
19152
19153 * src/gram.h (rule_t): `useful' is a new member.
19154 * src/print.c (print_grammar): Adjust.
19155 * src/derives.c (set_derives): Likewise.
19156 * src/reader.c (packgram, reduce_output): Likewise.
19157 * src/reduce.c (reduce_grammar_tables): Likewise.
19158 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19159
d2d1b42b
AD
191602001-11-30 Akim Demaille <akim@epita.fr>
19161
19162 * src/reduce.c (reduce_output): Formatting changes.
19163 * src/print.c (print_results, print_grammar): Likewise.
19164 * tests/regression.at (Rule Line Numbers)
19165 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19166
760b53a8
AD
191672001-11-30 Akim Demaille <akim@epita.fr>
19168
19169 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19170 useless nonterminals, move them at the end of the symbol arrays.
19171 (reduce_output): Adjust.
19172 * tests/reduce.at (Useless Nonterminals): Adjust.
19173
00238958
AD
191742001-11-30 Akim Demaille <akim@epita.fr>
19175
19176 * src/reduce.c: Various comment/formatting changes.
19177 (nonterminals_reduce): New, extracted from...
19178 (reduce_grammar_tables): here.
19179 (reduce_grammar): Call nonterminals_reduce.
19180
396452de
PE
191812001-11-29 Paul Eggert <eggert@twinsun.com>
19182
19183 * src/bison.simple (YYSTACK_REALLOC): Remove.
19184 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19185 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19186 New macros.
19187 (union yyalloc): New type.
19188 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19189 an arbitrary restriction on hosts where size_t is wider than int.
19190
19191 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19192 a parser stack overflow. Allocate just one block of memory for all
19193 three stacks, instead of allocating three blocks; this typically is
19194 faster and reduces fragmentation.
19195
19196 Do not limit the number of items in the stack to a value that fits
19197 in 'int', as this is an arbitrary limit on hosts with 64-bit
19198 size_t and 32-bit int.
19199
147e184c
MA
192002001-11-29 Marc Autret <autret_m@epita.fr>
19201
19202 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19203 of defining YYERROR_VERBOSE.
19204 [AT_DATA]: $4 is now out of C declarations in the prologue.
19205
426cf563
MA
192062001-11-28 Marc Autret <autret_m@epita.fr>
19207
19208 * src/reader.c (parse_dquoted_param): New.
19209 (parse_skel_decl): Use it.
19210 * src/lex.h: Add its prototype.
19211 * src/lex.c (literalchar): Become not static.
19212
c7925b99
MA
192132001-11-28 Marc Autret <autret_m@epita.fr>
19214
19215 * src/output.h: And put its extern declaration here.
19216 * src/output.c (error_verbose): Define here.
19217 (prepare): Echo name modification.
19218 * src/getargs.h: Clean its extern declaration.
19219 * src/getargs.c (error_verbose_flag): Remove.
19220 (getargs): Remove case 'e'.
19221 * src/options.c (option_table): 'error-verbose' is now seen as simple
19222 percent option.
19223 Include output.h.
19224
19225 * src/reader.c (read_declarations): Remove case tok_include.
19226 (parse_include_decl): Remove.
19227 * src/lex.h (token_t): Remove tok_include.
19228 * src/options.c (option_table): 'include' is now a simple command line
19229 option.
19230
5b5d1929
MA
192312001-11-28 Marc Autret <autret_m@epita.fr>
19232
19233 * src/bison.simple: Adjust muscle names.
19234 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19235 * src/output.c (prepare): s/_/-/ for the muscles names.
19236 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19237
8850be4b
MA
192382001-11-28 Marc Autret <autret_m@epita.fr>
19239
19240 * src/bison.simple: Fix debug.
19241 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19242
4a38e613
AD
192432001-11-28 Akim Demaille <akim@epita.fr>
19244
19245 * src/LR0.c (shifts_new): New.
19246 (save_shifts, insert_start_shift, augment_automaton): Use it.
19247
4b35e1c1
AD
192482001-11-28 Akim Demaille <akim@epita.fr>
19249
19250 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19251 keep ruleno only.
19252
d2b04478
AD
192532001-11-28 Akim Demaille <akim@epita.fr>
19254
19255 * src/closure.c (closure): Instead of looping over word in array
19256 then bits in words, loop over bits in array.
19257
2c4c30aa
AD
192582001-11-28 Akim Demaille <akim@epita.fr>
19259
19260 * src/closure.c (closure): No longer optimize the special case
19261 where all the bits of `ruleset[r]' are set to 0, to make the code
19262 clearer.
19263
576890b7
AD
192642001-11-28 Akim Demaille <akim@epita.fr>
19265
19266 * src/closure.c (closure): `r' and `c' are new variables, used to
19267 de-obfuscate accesses to RULESET and CORE.
19268
cb487d7d
AD
192692001-11-28 Akim Demaille <akim@epita.fr>
19270
19271 * src/reduce.c (reduce_print): Use ngettext.
19272 (dump_grammar): Improve the trace accuracy.
19273
6013d43f
AD
192742001-11-28 Akim Demaille <akim@epita.fr>
19275
19276 * src/reduce.c (dump_grammar): Don't translate trace messages.
19277
cb4956ee
AD
192782001-11-28 Akim Demaille <akim@epita.fr>
19279
19280 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19281 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19282 as all tags are free'ed afterwards.
19283 From Enrico Scholz.
19284
648185ab
PE
192852001-11-27 Paul Eggert <eggert@twinsun.com>
19286
19287 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19288 use alloca when we didn't want to, and vice versa.
19289
68254a03
MA
192902001-11-27 Marc Autret <autret_m@epita.fr>
19291
9113b58f
AD
19292 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19293 initialization.
68254a03
MA
19294 * src/output.c (prepare): Remove its update.
19295
04d843a2
MA
192962001-11-27 Marc Autret <autret_m@epita.fr>
19297
19298 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19299 Use %error-verbose.
19300
d2079671 193012001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
19302
19303 * src/bison.simple: Remove YYERROR_VERBOSE using.
19304 Use %%error_verbose.
19305 (yyparse): Likewise.
19306 * src/output.c (prepare): Give its final value.
19307 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19308 * src/getargs.h: Add its extern declaration.
19309 * src/getargs.c (error_verbose_flag): New int.
19310 (getargs): Update to catch new case.
19311 * src/options.c (option_table): 'error-verbose' is a new option.
19312 (shortopts): Update.
19313
e0327bc8
AD
193142001-11-27 Akim Demaille <akim@epita.fr>
19315
19316 * src/system.h: Use intl/libgettext.h.
19317 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19318
000f1a3c
AD
193192001-11-27 Akim Demaille <akim@epita.fr>
19320
19321 * tests/torture.at (Exploding the Stack Size with Malloc):
19322 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19323
26cfe0be
AD
193242001-11-27 Akim Demaille <akim@epita.fr>
19325
19326 * src/files.c: Include error.h.
19327 Reported by Hans Aberg.
19328
f6bd5427
MA
193292001-11-26 Marc Autret <autret_m@epita.fr>
19330
d2079671 19331 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
19332 (read_declarations): Add case tok_include.
19333 * src/getargs.h (include): Add its extern definition.
19334 * src/getargs.c (include): New const char *.
19335 (getargs): Add case '-I'.
19336 * src/options.c (option_table): Add include as command line and
19337 percent option.
19338 * src/lex.h (token_t): Add tok_include.
19339
2ca209c1
AD
193402001-11-26 Akim Demaille <akim@epita.fr>
19341
19342 * src/reader.c (readgram): Make sure rules for mid-rule actions
19343 have a lineno equal to that of their host rule.
19344 Reported by Hans Aberg.
19345 * tests/regression.at (Rule Line Numbers): New.
19346
0e41b407
AD
193472001-11-26 Akim Demaille <akim@epita.fr>
19348
19349 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19350 size_ts.
19351
193522001-11-26 Akim Demaille <akim@epita.fr>
19353
19354 * src/complain.c, src/complain.h (error): Remove, provided by
19355 lib/error.[ch].
19356
e0c40012
AD
193572001-11-26 Akim Demaille <akim@epita.fr>
19358
19359 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19360 issue an error message.
19361 * tests/regression.at (Invalid %directive): New.
19362 Reported by Hans Aberg.
19363
5e147124
AD
193642001-11-26 Akim Demaille <akim@epita.fr>
19365
19366 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19367 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19368
a034c8b8
AD
193692001-11-26 Akim Demaille <akim@epita.fr>
19370
19371 * src/conflicts.c (conflicts_print): Don't complain at all when
19372 there are no reduce/reduce conflicts, and as many shift/reduce
19373 conflicts as expected.
19374 * tests/regression.at (%expect right): Adjust.
19375
c64a20f3
AD
193762001-11-23 Akim Demaille <akim@epita.fr>
19377
19378 * lib/alloca.c: Update, from fileutils.
19379
5b0d29bb
AD
193802001-11-23 Akim Demaille <akim@epita.fr>
19381
19382 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19383
722c4bfe
AD
193842001-11-23 Akim Demaille <akim@epita.fr>
19385
19386 * src/system.h: Include alloca.h.
19387 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19388
6255b435
AD
193892001-11-23 Akim Demaille <akim@epita.fr>
19390
19391 * src/print_graph.c (print_actions): Remove `rule', unused.
19392 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19393 pacify GCC's signed < unsigned warnings.
19394 * src/closure.c (itemsetsize): Likewise.
19395 * src/reader.c (symbol_list_new): Static.
19396
b29b2ed5
AD
193972001-11-23 Akim Demaille <akim@epita.fr>
19398
19399 Attaching lineno to buckets is stupid, since only one copy of each
19400 symbol is kept, only the line of the first occurrence is kept too.
19401
19402 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19403 * src/reader.c (rline_allocated): Remove, unused.
19404 (symbol_list): Have a `line' member.
19405 (symbol_list_new): New.
19406 (readgram): Use it.
19407 * src/print.c (print_grammar): Output the rule line numbers.
19408 * tests/regression.at (Solved SR Conflicts)
19409 (Unresolved SR Conflicts): Adjust.
19410 Reported by Hans Aberg.
19411
a81b1d4a
MA
194122001-11-22 Marc Autret <autret_m@epita.fr>
19413
19414 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19415
c1ecb3c1
MA
194162001-11-22 Marc Autret <autret_m@epita.fr>
19417
19418 * src/muscle_tab.c (muscle_init): Remove initialization of
19419 skeleton muscle.
19420 * src/output.c (output_master_parser): Do it here.
19421
fbe01355
AD
194222001-11-20 Akim Demaille <akim@epita.fr>
19423
19424 * po/sv.po: New.
19425 * configure.in (ALL_LINGUAS): Adjust.
19426 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19427 longer contains strings to translate.
19428
81e895c0
AD
194292001-11-19 Akim Demaille <akim@epita.fr>
19430
19431 * src/conflicts.c (conflicts_print): Add a missing \n.
19432
6bb1878b
AD
194332001-11-19 Akim Demaille <akim@epita.fr>
19434
19435 * src/nullable.c (nullable_print): New.
19436 (set_nullable): Call it when tracing.
19437 Better locality of variables.
19438
d9ec2d07
AD
194392001-11-19 Akim Demaille <akim@epita.fr>
19440
19441 * src/print.c (print_actions): Better locality of variables.
19442
720e5c1b
AD
194432001-11-19 Akim Demaille <akim@epita.fr>
19444
19445 * src/derives.c (print_derives): Fix and enrich.
19446 * src/closure.c (print_fderives): Likewise.
19447
fb908786
AD
194482001-11-19 Akim Demaille <akim@epita.fr>
19449
19450 * src/closure.c (itemsetend): Remove, replaced with...
19451 (itemsetsize): new.
19452
125ecb56
AD
194532001-11-19 Akim Demaille <akim@epita.fr>
19454
19455 * src/LR0.c (kernel_end): Remove, replaced with...
19456 (kernel_size): new.
19457
d8cf039f
AD
194582001-11-19 Akim Demaille <akim@epita.fr>
19459
19460 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19461 to clarify.
19462
7bec0760
AD
194632001-11-19 Akim Demaille <akim@epita.fr>
19464
19465 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19466
c87d4863
AD
194672001-11-19 Akim Demaille <akim@epita.fr>
19468
19469 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19470 trace messages.
19471 * src/LR0.c: Likewise.
19472 (allocate_itemsets): Use arrays instead of pointers to clarify.
19473
9bfe901c
AD
194742001-11-19 Akim Demaille <akim@epita.fr>
19475
19476 * src/getargs.c (statistics_flag): Replace with...
19477 (trace_flag): New.
19478 (longopts): Accept --trace instead of --statistics.
19479 * src/getargs.h, src/options.c: Adjust.
19480 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19481 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19482
97db7bd4
AD
194832001-11-19 Akim Demaille <akim@epita.fr>
19484
cc72668c 19485 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
19486 pointers to clarify the code.
19487 (save_reductions, save_shifts): Factor common parts of alternatives.
19488
2c5f66ed
AD
194892001-11-19 Akim Demaille <akim@epita.fr>
19490
19491 * src/LR0.c (new_state, get_state): Complete TRACE code.
19492 * src/closure.c: Include `reader.h' to get `tags', needed by the
19493 trace code.
19494 Rename the conditional DEBUG as TRACE.
19495 Output consistently TRACEs to stderr, not stdout.
19496 * src/derives.c: Likewise.
19497 * src/reduce.c: (inaccessable_symbols): Using if is better style
19498 than goto.
19499 Use `#if TRACE' instead of `#if 0' for tracing code.
19500
300f275f
AD
195012001-11-19 Akim Demaille <akim@epita.fr>
19502
19503 * src/system.h (LIST_FREE, shortcpy): New.
19504 * src/LR0.c: Use them.
19505 * src/output.c (free_itemsets, free_reductions, free_shifts):
19506 Remove, replaced by LIST_FREE.
19507
f59c437a
AD
195082001-11-19 Akim Demaille <akim@epita.fr>
19509
19510 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19511 (REDUCTIONS_ALLOC): New.
19512 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19513 allocation.
19514
6986fd9e
AD
195152001-11-19 Akim Demaille <akim@epita.fr>
19516
19517 * src/LR0.c (new_state): Complete trace code.
19518 * src/nullable.c (set_nullable): Don't translate traces.
19519
4bc30f78
AD
195202001-11-19 Akim Demaille <akim@epita.fr>
19521
19522 * src/print_graph.c (print_core): Better locality of variables.
19523 * src/print.c (print_core): Likewise.
19524
08a946e0
AD
195252001-11-19 Akim Demaille <akim@epita.fr>
19526
19527 * src/vcg.c: You do the output, so you are responsible of the
19528 handling of VCG syntax, in particular: use quotearg.
19529 * src/print_graph.c: Don't.
19530 (print_actions): Don't output the actions as part of the nodes,
19531 since that's the job of the edges.
19532 (print_state): Don't output by hand: fill the node description,
9bfe901c 19533 and ask for its output.
08a946e0 19534
f0473484
AD
195352001-11-19 Akim Demaille <akim@epita.fr>
19536
cc72668c
AD
19537 * src/bison.simple (yyparse): When verbosely reporting an error,
19538 no longer put additional quotes around token names.
f0473484
AD
19539 * tests/calc.at: Adjust.
19540
e41dc700
AD
195412001-11-19 Akim Demaille <akim@epita.fr>
19542
19543 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19544 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19545 * src/output.c: Adjust.
19546
652a871c
AD
195472001-11-19 Akim Demaille <akim@epita.fr>
19548
19549 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19550 (rule_t): this.
19551 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19552
b2ed6e58
AD
195532001-11-19 Akim Demaille <akim@epita.fr>
19554
19555 * src/gram.h (rule_t): New.
19556 (rule_table): New.
19557 (rrhs, rlhs): Remove, part of state_t.
19558 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19559 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19560 * src/reader.c, src/reduce.c: Adjust.
19561
edad7067
AD
195622001-11-19 Akim Demaille <akim@epita.fr>
19563
19564 * src/reader.c (symbols_output): New, extracted from...
19565 (packsymbols): Here.
19566 (reader): Call it.
19567
3feec034
AD
195682001-11-19 Akim Demaille <akim@epita.fr>
19569
19570 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19571 (maxrhs): this new function.
19572
ddcd5fdf
AD
195732001-11-19 Akim Demaille <akim@epita.fr>
19574
cc72668c 19575 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
19576 Adjust.
19577
bb527fc2
AD
195782001-11-19 Akim Demaille <akim@epita.fr>
19579
cc72668c 19580 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
19581 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19582 * src/lalr.c: Adjust.
19583
a845a697
AD
195842001-11-19 Akim Demaille <akim@epita.fr>
19585
19586 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19587 (set_state_table): handle the `lookaheads' members.
19588
f004bf6a
AD
195892001-11-19 Akim Demaille <akim@epita.fr>
19590
cc72668c
AD
19591 * src/lalr.h (lookaheads): Removed array, whose contents is now
19592 a member of...
f004bf6a
AD
19593 (state_t): this structure.
19594 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19595 Adjust.
19596
de326cc0
AD
195972001-11-19 Akim Demaille <akim@epita.fr>
19598
cc72668c
AD
19599 * src/lalr.h (consistent): Removed array, whose contents is now
19600 a member of...
de326cc0
AD
19601 (state_t): this structure.
19602 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19603 Adjust.
19604
90b4416b
AD
196052001-11-19 Akim Demaille <akim@epita.fr>
19606
cc72668c
AD
19607 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19608 contents are now members of...
90b4416b
AD
19609 (state_t): this structure.
19610 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19611 Adjust.
19612
9703cc49
AD
196132001-11-19 Akim Demaille <akim@epita.fr>
19614
19615 * src/lalr.h (state_t): New.
19616 (state_table): Be a state_t * instead of a core **.
19617 (accessing_symbol): Remove, part of state_t.
19618 * src/lalr.c: Adjust.
19619 (set_accessing_symbol): Merge into...
19620 (set_state_table): this.
19621 * src/print_graph.c, src/conflicts.c: Adjust.
19622
d803322e
AD
196232001-11-14 Akim Demaille <akim@epita.fr>
19624
19625 * tests/calc.at, tests/output.at, tests/regression.at,
19626 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19627 now the tests are run in private dirs, therefore AC_CLEANUP and
19628 family can be simplified to 0-ary.
19629 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19630 use abs. path to find config.h.
19631 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19632 stderr, there can be way too much random noise.
19633 Instead pass -Werror to GCC and rely on the exit status.
19634 Reported by Wolfram Wagner.
19635
3d76b07d
AD
196362001-11-14 Akim Demaille <akim@epita.fr>
19637
19638 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19639 defined only if yyoverflow is defined, to avoid `warning: unused
19640 variable `yyvs1''.
19641 Reported by The Test Suite.
19642
09b503c8
AD
196432001-11-14 Akim Demaille <akim@epita.fr>
19644
19645 * src/print.c: Include reduce.h.
19646 Reported by Hans Aberg.
19647
196482001-11-14 Akim Demaille <akim@epita.fr>
19649
19650 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19651 Revert a previous patch: these are really const.
19652 * src/conflicts.c (conflict_report): Additional useless pair of
19653 braces to pacify GCC's warnings for `if () if () {} else {}'.
19654 * src/lex.c (parse_percent_token): Replace equal_offset with
19655 arg_offset.
19656 arg is const.
19657 Be sure to strdup `arg' when used, since there is no reason for
19658 token_buffer not to change.
19659
0f37a994
AD
196602001-11-14 Akim Demaille <akim@epita.fr>
19661
19662 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19663 definition.
19664 * src/main.c (main): Use them.
19665 Suggested by Hans Aberg.
19666
d39d93b8
AD
196672001-11-12 Akim Demaille <akim@epita.fr>
19668
19669 * src/system.h (ngettext): Now that we use ngettext, be sure to
19670 provide a default definition when NLS are not used.
19671
9edcd895
AD
196722001-11-12 Akim Demaille <akim@epita.fr>
19673
19674 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19675 Use @kbd to denote user input.
19676 (Language and Grammar): ANSIfy the example.
19677 Adjust its layout for info/notinfo.
19678 (Location Tracking Calc): Output error messages to stderr.
19679 Output locations in a more GNUtically correct way.
19680 Fix a couple of Englishos.
19681 Adjust @group/@end group pairs.
19682
7da99ede
AD
196832001-11-12 Akim Demaille <akim@epita.fr>
19684
e3aa65c5 19685 %expect was not functioning at all.
7da99ede
AD
19686
19687 * src/conflicts.c (expected_conflicts): Set to -1.
19688 (conflict_report): Use ngettext.
19689 (conflicts_print): Check %expect and make its violation an error.
19690 * doc/bison.texinfo (Expect Decl): Adjust.
19691 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19692 * tests/regression.at (%expect not enough, %expect right)
19693 (%expect too much): New.
19694
ba9dda1a
AD
196952001-11-12 Akim Demaille <akim@epita.fr>
19696
19697 * tests/regression.at (Conflicts): Rename as...
19698 (Unresolved SR Conflicts): this.
19699 (Solved SR Conflicts): New.
19700
337c5bd1
AD
197012001-11-12 Akim Demaille <akim@epita.fr>
19702
19703 * src/reduce.c (print_results): Rename as...
19704 (reduce_output): This.
19705 Output to OUT, passed as argument, instead of output_obstack.
19706 (dump_grammar): Likewise.
19707 (reduce_free): New.
19708 Also free V1.
19709 (reduce_grammar): No longer call reduce_output, since...
19710 * src/print.c (print_results): do it.
19711 * src/main.c (main): Call reduce_free;
19712
c73a41af
AD
197132001-11-12 Akim Demaille <akim@epita.fr>
19714
19715 * src/conflicts.c (print_reductions): Accept OUT as argument.
19716 Output to it, not to output_obstack.
19717 * src/print.c (print_actions): Adjust.
19718
0df87bb6
AD
197192001-11-12 Akim Demaille <akim@epita.fr>
19720
19721 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19722 the result instead of using...
19723 (src_total, rrc_total, src_count, rrc_count): Remove.
19724 (any_conflicts): Remove.
19725 (print_conflicts): Split into...
19726 (conflicts_print, conflicts_output): New.
19727 * src/conflicts.h: Adjust.
19728 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 19729 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
19730 * tests/regression.at (Conflicts): New.
19731 Reported by Tom Lane.
19732
e4d3d4de
AD
197332001-11-12 Akim Demaille <akim@epita.fr>
19734
19735 * tests/regression.at (Invalid input): Remove, duplicate with
19736 ``Invalid input: 1''.
19737
6d7d248e
AD
197382001-11-12 Akim Demaille <akim@epita.fr>
19739
19740 * tests/torture.at (AT_DATA_STACK_TORTURE)
19741 (Exploding the Stack Size with Alloca)
19742 (Exploding the Stack Size with Malloc): New.
19743
e9e4c321
AD
197442001-11-12 Akim Demaille <akim@epita.fr>
19745
19746 * src/bison.simple (YYSTACK_REALLOC): New.
19747 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 19748 Reported by Per Allansson.
e9e4c321 19749
5f7e0832
AD
197502001-11-12 Pascal Bart <pascal.bart@epita.fr>
19751
19752 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19753 define CPP macro, which substitute YYSTYPE by yystype.
19754 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19755 with yyltype/YYLTYPE. This allows inclusion of the generated
19756 header within the parser if the compiler, such as GGC, accepts
19757 multiple equivalent #defines.
19758 From Akim.
19759
e3f1699f
AD
197602001-11-05 Akim Demaille <akim@epita.fr>
19761
19762 * src/reader.c (symbols_output): New, extracted from...
19763 (packsymbols): here.
19764 (reader): Adjust.
19765
65be0866
AD
197662001-11-05 Akim Demaille <akim@epita.fr>
19767
19768 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19769
e4d910bf
AD
197702001-11-05 Akim Demaille <akim@epita.fr>
19771
19772 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19773 pattern.
19774
951366c1
AD
197752001-11-05 Akim Demaille <akim@epita.fr>
19776
19777 * src/options.h (struct option_table_struct): set_flags is void*.
19778 * src/options.c (longopts): Support `--output' and `%output'.
19779 (usage): Adjust.
19780 * src/lex.h (tok_setopt): Remove, replaced with...
19781 (tok_intopt, tok_stropt): these new guys.
19782 * src/lex.c (getopt.h): Not needed.
19783 (token_buffer, unlexed_token_buffer): Not const.
19784 (percent_table): Promote `-' over `_' in directive names.
19785 Active `%name-prefix', `file-prefix', and `output'.
19786 (parse_percent_token): Accept possible arguments to directives.
19787 Promote `-' over `_' in directive names.
19788
d8988b2f
AD
197892001-11-04 Akim Demaille <akim@epita.fr>
19790
19791 * doc/bison.texinfo (Decl Summary): Split the list into
19792 `directives for grammars' and `directives for bison'.
19793 Sort'em.
19794 Add description of `%name-prefix', `file-prefix', and `output'.
19795 Promote `-' over `_' in directive names.
19796 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19797 Simplify the description of `--name-prefix'.
19798 Promote `-' over `_' in directive names.
19799 Promote `--output' over `--output-file'.
19800 Fix the description of `--defines'.
19801 * tests/output.at: Exercise %file-prefix and %output.
19802
6468d18e
AD
198032001-11-02 Akim Demaille <akim@epita.fr>
19804
19805 * doc/refcard.tex: Update.
19806
6b7e85b9
AD
198072001-11-02 Akim Demaille <akim@epita.fr>
19808
19809 * src/symtab.h (SUNDEF): New.
19810 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19811 stand for `uninitialized', instead of 0.
19812 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19813 * src/lex.c (lex): Adjust.
19814
19815 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19816 Number it 0.
19817 Let yylex return it instead of a plain 0.
19818 Reported by Dick Streefland.
19819
cd5aafcf
AD
198202001-11-02 Akim Demaille <akim@epita.fr>
19821
19822 * tests/regression.at (Mixing %token styles): New test.
19823
037ca2f1
AD
198242001-11-02 Akim Demaille <akim@epita.fr>
19825
19826 * src/reader.c (parse_thong_decl): Formatting changes.
19827 (token_translations_init): New, extracted from...
19828 (packsymbols): Here.
19829 Adjust.
19830
270a173c
AD
198312001-11-01 Akim Demaille <akim@epita.fr>
19832
19833 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19834 Check that `9foo.y' produces correct cpp guards.
19835 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19836 guards.
19837 Reported by Wwp.
19838
561f9a30
AD
198392001-11-01 Akim Demaille <akim@epita.fr>
19840
19841 * tests/regression.at (Invalid input: 2): New.
19842 * src/lex.c (unlexed_token_buffer): New.
19843 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19844 too.
19845 Reported by Wwp.
19846
f987e9d2
AD
198472001-11-01 Akim Demaille <akim@epita.fr>
19848
19849 * tests/calc.at: Catch up with 1.30.
19850 * configure.in: Bump to 1.49a.
19851 Adjust to newer Autotest.
19852
0846f581
PB
198532001-10-19 Pascal Bart <pascal.bart@epita.fr>
19854
19855 * src/conflicts.c: Move global variables rrc_total and src_total ...
19856 (print_conflicts): here.
19857 * src/output.c (output): Free global variable user_toknums.
19858 * src/lex.c (token_obstack): Become static.
19859
3c1a79b3
AD
198602001-10-18 Akim Demaille <akim@epita.fr>
19861
19862 * tests/atlocal.in (GCC): Add.
19863 * tests/calc.at: s/m4_match/m4_bmatch/.
19864 s/m4_patsubst/m4_bpatsubst/.
19865 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19866 * configure.in: AC_SUBST(GCC).
19867
5d52e7d0
MA
198682001-10-14 Marc Autret <autret_m@epita.fr>
19869
19870 * src/options.c (create_long_option_table): Fix.
19871
631aa1d3
AD
198722001-10-10 Akim Demaille <akim@epita.fr>
19873
19874 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19875
f6ec6d13
AD
198762001-10-04 Akim Demaille <akim@epita.fr>
19877
19878 * src/reader.c (parse_union_decl): Push the caracters in
19879 union_obstack, not attrs_obstack.
19880
342b8b6e
AD
198812001-10-04 Akim Demaille <akim@epita.fr>
19882
19883 Merge in the branch 1.29.
19884
19885 * src/reader.c (packsymbols): Use a temporary obstack for
19886 `%%tokendef', since output_stack is already used elsewhere.
19887
19888 2001-10-02 Akim Demaille <akim@epita.fr>
19889
19890 Bump 1.29d.
19891
19892 2001-10-02 Akim Demaille <akim@epita.fr>
19893
19894 Version 1.29c.
19895
19896 2001-10-02 Akim Demaille <akim@epita.fr>
19897
19898 * tests/regression.at (Invalid CPP headers): New.
19899 From Alexander Belopolsky.
19900 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19901
19902 2001-10-02 Akim Demaille <akim@epita.fr>
19903
19904 * tests/regression.at (Invalid input): New.
19905 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19906 Reported by Shura.
19907
19908 2001-10-02 Akim Demaille <akim@epita.fr>
19909
19910 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19911
19912 2001-10-02 Akim Demaille <akim@epita.fr>
19913
19914 * src/output.c (output_parser): Assert `skeleton'.
19915 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19916 systems.
19917 From Shura.
19918
19919 2001-10-01 Marc Autret <autret_m@epita.fr>
19920
19921 * src/lex.h: Echo modifications.
19922 * src/lex.c (unlex): Parameter is now token_t.
19923 From Hans Aberg.
19924
19925 2001-10-01 Marc Autret <autret_m@epita.fr>
19926
19927 * src/main.c: Include lex.h.
19928 From Hans Aberg.
19929
19930 2001-09-29 Akim Demaille <akim@epita.fr>
19931
19932 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19933
19934 2001-09-28 Akim Demaille <akim@epita.fr>
19935
19936 * tests/testsuite.at: Update to newer Autotest.
19937 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19938
19939 2001-09-27 Akim Demaille <akim@epita.fr>
19940
19941 Position independent wrapper.
19942
19943 * tests/bison: Remove.
19944 * tests/bison.in: New.
19945 * configure.in: Adjust.
19946
19947 2001-09-27 Paul Eggert <eggert@twinsun.com>
19948
19949 Port quotearg fixes from tar 1.13.24.
19950
19951 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19952 tm to be declared.
19953 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19954 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19955
19956 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19957 * m4/mbrtowc.m4: New file.
19958 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19959 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19960
19961 2001-09-27 Akim Demaille <akim@epita.fr>
19962
19963 Bump to 1.29c.
19964
19965 2001-09-27 Akim Demaille <akim@epita.fr>
19966
19967 Version 1.29b.
19968
19969 2001-09-25 Akim Demaille <akim@epita.fr>
19970
19971 * src/system.h: Include `xalloc.h'.
19972 Remove it from the C files.
19973 * src/files.c (output_files): Free the obstacks.
19974 * src/lex.c (init_lex): Rename as...
19975 (lex_init): this.
19976 (lex_free): New.
19977 * src/main.c (main): Use it.
19978
19979 2001-09-24 Marc Autret <autret_m@epita.fr>
19980
19981 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19982 to output informations in fout (FILE*).
19983 (open_graph, close_graph): Likewise.
19984 (output_graph, output_edge, output_node): Likewise.
19985 * src/vcg.h: Update function prototypes.
19986 * src/print_graph.c (print_graph): Open output graph file.
19987 (print_actions): Adjust.
19988 * src/files.h: Remove extern declaration.
19989 * src/files.c: Remove graph_obstack declaration.
19990 (open_files): Remove graph_obstack initialization.
19991 (output_files): Remove graph_obstack saving.
19992
19993 2001-09-24 Marc Autret <autret_m@epita.fr>
19994
19995 * src/files.c (compute_output_file_names): Fix.
19996
19997 2001-09-24 Marc Autret <autret_m@epita.fr>,
19998 Akim Demaille <akim@epita.fr>
19999
20000 * src/reader.c (reader): Remove call to free_symtab ().
20001 * src/main.c (main): Call it here.
20002 Include symtab.h.
20003 * src/conflicts.c (initialize_conflicts): Rename as...
20004 (solve_conflicts): this.
20005 * src/print.c (print_core, print_actions, print_state)
20006 (print_grammar): Dump to a file instead a `output_obstack'.
20007 (print_results): Dump `output_obstack', and then proceed with the
20008 FILE *.
20009 * src/files.c (compute_output_file_names, close_files): New.
20010 (output_files): Adjust.
20011 * src/main.c (main): Adjust.
20012
20013 2001-09-23 Marc Autret <autret_m@epita.fr>
20014
20015 * src/files.c (compute_header_macro): Computes header macro name
20016 from spec_defines_file when given.
20017
20018 2001-09-23 Marc Autret <autret_m@epita.fr>
20019
20020 * src/files.c (output_files): Add default extensions.
20021
20022 2001-09-22 Akim Demaille <akim@epita.fr>
20023
20024 * src/conflicts.c (finalize_conflicts): Rename as...
20025 (free_conflicts): this.
20026
20027 2001-09-22 Akim Demaille <akim@epita.fr>
20028
20029 * src/gram.c (gram_free): Rename back as...
20030 (dummy): this.
20031 (output_token_translations): Free `token_translations'.
20032 * src/symtab.c (free_symtab): Free the tag field.
20033
20034 2001-09-22 Akim Demaille <akim@epita.fr>
20035
20036 Remove `translations' as it is always set to true.
20037
20038 * src/gram.h: Adjust.
20039 * src/reader.c (packsymbols, parse_token_decl): Adjust
20040 * src/print.c (print_grammar): Adjust.
20041 * src/output.c (output_token_translations): Adjust.
20042 * src/lex.c (lex): Adjust.
20043 * src/gram.c: Be sure the set pointers to NULL.
20044 (dummy): Rename as...
20045 (gram_free): this.
20046
20047 2001-09-22 Akim Demaille <akim@epita.fr>
20048
20049 * configure.in: Invoke AM_LIB_DMALLOC.
20050 * src/system.h: Use dmalloc.
20051 * src/LR0.c: Be sure to have pointers initialized to NULL.
20052 (allocate_itemsets): Allocate kernel_items only if needed.
20053
20054 2001-09-22 Akim Demaille <akim@epita.fr>
20055
20056 * configure.in: Bump to 1.29b.
20057 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20058 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20059 need xmalloc.c in calc.y.
20060 From Pascal Bart.
20061
20062 2001-09-21 Akim Demaille <akim@epita.fr>
20063
20064 Version 1.29a.
20065 * Makefile.maint, config/config.guess, config/config.sub,
20066 * config/missing: Update from masters.
20067 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20068 upon package.m4.
20069 * configure.in (ALL_LINGUAS): Add `tr'.
20070
20071 2001-09-21 Akim Demaille <akim@epita.fr>
20072
20073 * tests/Makefile.am (package.m4): Move to...
20074 ($(srcdir)/$(TESTSUITE)): here.
20075
20076 2001-09-20 Akim Demaille <akim@epita.fr>
20077
20078 * src/complain.c: No longer try to be standalone: use system.h.
20079 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20080 * src/complain.h: Likewise.
20081 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20082 Remove the unused variable `n'.
20083 From Albert Chin-A-Young.
20084
20085 2001-09-18 Marc Autret <autret_m@epita.fr>
20086
20087 * doc/bison.1: Update.
20088 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20089 descriptions.
20090 (Option Cross Key): Update.
20091 Add --graph.
20092
20093 2001-09-18 Marc Autret <autret_m@epita.fr>
20094
20095 * tests/regression.at: New test (comment in %union).
20096
20097 2001-09-18 Marc Autret <autret_m@epita.fr>
20098
20099 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20100 do that.
20101 Reported by Keith Browne.
20102
20103 2001-09-18 Marc Autret <autret_m@epita.fr>
20104
20105 * tests/output.at: Add tests for --defines and --graph.
20106
20107 2001-09-18 Marc Autret <autret_m@epita.fr>
20108
20109 * tests/output.at: Removes tests of %{header,src}_extension features.
20110
20111 2001-09-18 Akim Demaille <akim@epita.fr>
20112
20113 * tests/Makefile.am (package.m4): New.
20114 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20115 (_AT_CHECK_CALC_ERROR): Likewise.
20116 Factor the `, ' part of verbose error messages.
20117
20118 2001-09-18 Marc Autret <autret_m@epita.fr>
20119
20120 * src/getargs.c (longopts): Declare --defines and --graph as options
20121 with optional arguments.
20122 * src/files.h: Add extern declarations.
20123 * src/files.c (spec_graph_file, spec_defines_file): New.
20124 (output_files): Update.
20125 Remove CPP-outed code.
20126
20127 2001-09-18 Marc Autret <autret_m@epita.fr>
20128
20129 Turn off %{source,header}_extension feature.
20130
20131 * src/files.c (compute_exts_from_gf): Update.
20132 (compute_exts_from_src): Update.
20133 (output_files): CPP-out useless code.
20134 * src/files.h: Remove {header,source}_extension extern declarations.
20135 * src/reader.c (parse_dquoted_param): CPP-out.
20136 (parse_header_extension_decl): Remove.
20137 (parse_source_extension_decl): Remove.
20138 (read_declarations): Remove cases tok_{hdrext,srcext}.
20139 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20140 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20141
20142 2001-09-10 Akim Demaille <akim@epita.fr>
20143
20144 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20145 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20146 (AT_CHECK_OUTPUT): this.
20147 Merely check ls' exit status, its output is useless.
20148
20149 2001-09-10 Akim Demaille <akim@epita.fr>
20150
20151 * tests/calc.at: Use m4_match.
20152 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20153
20154 2001-09-10 Marc Autret <autret_m@epita.fr>,
20155 Akim Demaille <akim@epita.fr>
20156
20157 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20158 enum color_e.
20159 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20160 to `normal'.
20161 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20162 * src/lex.h: Adjust prototype.
20163 (token_t): Add `tok_undef'.
20164 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20165 (parse_percent_token): Now returns token_t.
20166 Add default statement in switch.
20167 (lex): Separate `c' as an input variable, from the token_t result
20168 part.
20169 (unlexed): Is a token_t.
20170
20171 2001-09-10 Akim Demaille <akim@epita.fr>
20172
20173 * configure.in: Bump to 1.29a.
20174
20175 2001-09-07 Akim Demaille <akim@epita.fr>
20176
20177 Version 1.29.
20178
20179 2001-08-30 Akim Demaille <akim@epita.fr>
20180
20181 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20182 * m4/atconfig.m4: Remove.
20183 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20184 * tests/bison: New.
20185 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20186 m4_if, m4_patsubst, and m4_regexp.
20187 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20188 `input' file instead of echo.
20189
20190 2001-08-29 Akim Demaille <akim@epita.fr>
20191
20192 Bump to 1.28e.
20193
20194 2001-08-29 Akim Demaille <akim@epita.fr>
20195
20196 Version 1.28d.
20197
20198 2001-08-29 Paul Eggert <eggert@twinsun.com>
20199
20200 * src/bison.simple (yyparse): Don't take the address of an
20201 item before the start of an array, as that doesn't conform to
20202 the C Standard.
20203
20204 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20205
20206 * doc/bison.texinfo (Location Tracking Calc): New node.
20207
20208 2001-08-29 Paul Eggert <eggert@twinsun.com>
20209
20210 * src/output.c (output): Do not define const, as this now
20211 causes more problems than it cures.
20212
20213 2001-08-29 Akim Demaille <akim@epita.fr>
20214
20215 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20216 the nodes.
20217 Be sure to tag the `detailmenu'.
20218
20219 2001-08-29 Akim Demaille <akim@epita.fr>
20220
20221 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20222 download in a tmp dir.
20223
20224 2001-08-28 Marc Autret <autret_m@epita.fr>
20225
20226 * config/depcomp: New file.
20227
20228 2001-08-28 Marc Autret <autret_m@epita.fr>
20229
20230 * doc/bison.1 (mandoc): Adjust.
20231 From Juan Manuel Guerrero.
20232
20233 2001-08-28 Marc Autret <autret_m@epita.fr>
20234
20235 * src/print_graph.c (print_state): Fix.
20236
20237 2001-08-27 Marc Autret <autret_m@epita.fr>
20238
20239 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20240 char * members.
20241 Echo modifications to the functions prototypes.
20242 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20243
20244 2001-08-27 Marc Autret <autret_m@epita.fr>
20245
20246 * src/vcg.c: Include `xalloc.h'.
20247 (add_colorentry): New.
20248 (add_classname): New.
20249 (add_infoname): New.
20250 * src/vcg.h: Add new prototypes.
20251
20252 2001-08-27 Akim Demaille <akim@epita.fr>
20253
20254 * Makefile.maint: Sync. again with CVS Autoconf.
20255
20256 2001-08-27 Akim Demaille <akim@epita.fr>
20257
20258 * Makefile.maint: Formatting changes.
20259 (po-update, cvs-update, update): New targets.
20260 (AMTAR): Remove.
20261
20262 2001-08-27 Akim Demaille <akim@epita.fr>
20263
20264 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20265 * Makefile.maint: Sync. with CVS Autoconf.
20266
20267 2001-08-27 Marc Autret <autret_m@epita.fr>
20268
20269 * src/vcg.h (struct infoname_s): New.
20270 (struct colorentry_s): New.
20271 (graph_s): New fields {vertical,horizontal}_order in structure.
20272 Add `infoname' field.
20273 Add `colorentry' field;
20274 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20275 (G_HORIZONTAL_ORDER): New.
20276 (G_INFONAME): New.
20277 (G_COLORENTRY): New.
20278 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20279 Add output of `infoname'.
20280 Add output of `colorentry'.
20281
20282 2001-08-27 Marc Autret <autret_m@epita.fr>
20283
20284 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20285 This one shadowed a global parameter.
20286
20287 2001-08-24 Marc Autret <autret_m@epita.fr>
20288
20289 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20290 instead of `unsigned'.
20291 (print_state): Do not call obstack_object_size () in obstack_grow ()
20292 to avoid macro variables shadowing.
20293
20294 2001-08-23 Marc Autret <autret_m@epita.fr>
20295
20296 * src/lex.c (percent_table): Typo: s/naem/name/.
20297 Add graph option.
20298 Normalize new options declarations.
20299
20300 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20301
20302 * tests/suite.at: Exercise %header_extension and %source_extension.
20303
20304 2001-08-16 Marc Autret <autret_m@epita.fr>
20305
20306 * src/reader.c (parse_dquoted_param): New.
20307 (parse_header_extension_decl): Use it.
20308 (parse_source_extension_decl): Likewise.
20309
20310 2001-08-16 Marc Autret <autret_m@epita.fr>
20311
20312 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20313 (get_xxxx_str): Use assert () instead of complain ().
20314 Remove return invokations in default cases.
20315 (get_decision_str): Modify default behaviour. Remove second argument.
20316 Echo modifications on calls.
20317 (output_graph): Fix.
20318
20319 2001-08-16 Marc Autret <autret_m@epita.fr>
20320
20321 * src/getargs.c (usage): Update with ``-g, --graph''.
20322
20323 2001-08-16 Marc Autret <autret_m@epita.fr>
20324
20325 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20326 (Option Cross Key): Likewise.
20327 * doc/bison.1: Update.
20328
1c8c2190
PB
203292001-09-25 Pascal Bart <pascal.bart@epita.fr>
20330
20331 * src/output.c (output_master_parser): Don't finish action_obstack.
20332 (output_parser): Don't care about the muscle action, here.
20333 (prepare): Copy the action_obstack in the action muscle.
20334 (output): Free action_obstack.
20335
180d45ba
PB
203362001-09-23 Pascal Bart <pascal.bart@epita.fr>
20337
20338 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20339 will contain `%union' declaration.
20340 (parse_union_decl): Delete #line directive output.
20341 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20342 informations about %union.
20343 (parse_union_decl): Copy the union_obstack in the muscle stype.
20344 * src/bison.simple: Add new #line directive.
20345 Add typdef %%stype YYSTYPE.
20346
c51d1a19
PB
203472001-09-23 Pascal Bart <pascal.bart@epita.fr>
20348
20349 * src/bison.simple: Add new `#line' directive.
20350
6f9344da
PB
203512001-09-22 Pascal Bart <pascal.bart@epita.fr>
20352
20353 * src/bison.simple: New `#line' directive.
20354 * src/output.c (output_parser): Support new dynamic muscle input_line.
20355
652def80
MA
203562001-09-22 Marc Autret <autret_m@epita.fr>
20357
20358 * src/output.c (output_master_parser): New.
20359 (output_parser): Be more re-entrant.
20360
25b222fa
MA
203612001-09-21 Marc Autret <autret_m@epita.fr>
20362
20363 * src/reader.c (copy_definition, parse_union_decl): Update and use
20364 `linef' muscle.
20365 (copy_action): Likewise.
20366 Use obstack_1grow ().
20367 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20368
6bc35ae5
MA
203692001-09-21 Marc Autret <autret_m@epita.fr>
20370
20371 * src/options.c (option_table): Adjust.
20372 * src/lex.c (parse_percent_token): Fix.
20373
c0629aa1
PB
203742001-09-20 Pascal Bart <pascal.bart@epita.fr>
20375
20376 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 20377
82b6d266
PB
203782001-09-20 Pascal Bart <pascal.bart@epita.fr>
20379
20380 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20381 is now an option_table_struct*.
20382 (option_strcmp): New function option_strcmp.
20383 (parse_percent_token): Call option_strcmp.
20384 * src/getargs.c (xalloc.h, options.h): Include it.
20385 (getargs): Call create_long_option_table.
20386 (getargs): Free longopts at the end of the function.
20387 (shortopts): Move in options.c.
20388 * src/options.c (create_long_option_table): New function. Convert
20389 information from option_table to option structure.
20390 * src/reader.c (options.h): Include it.
20391
20392 * src/Makefile.am: Adjust.
20393 * src/options.c (option_table): Create from longopts and percent_table.
20394 * src/getargs.c (longopts): Delete.
20395 * src/lex.c (struct percent_table_struct): Delete.
20396 (percent_table): Delete.
20397 (options.h): Include it.
20398 * src/options.c: Create.
20399 * src/options.h: Create.
20400 Declare enum opt_access_e.
20401 Define struct option_table_struct.
20402
75f5aaea
MA
204032001-09-20 Marc Autret <autret_m@epita.fr>
20404
20405 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20406 sections of Bison.
20407
f508cb0a
PB
204082001-09-19 Pascal Bart <pascal.bart@epita.fr>
20409
20410 * src/bison.simple: s/%%filename/%%skeleton.
20411 * src/muscle_tab.c (getargs.h): Include it.
20412 (muscle_init): Insert new muscle skeleton.
20413
13105fc1
PB
204142001-09-18 Pascal Bart <pascal.bart@epita.fr>
20415
20416 * src/output.c (output_parser): Delete unused variable actions_dumped.
20417
b0c4483e
PB
204182001-09-07 Pascal Bart <pascal.bart@epita.fr>
20419
20420 * src/output.c (output): Delete call to reader_output_yylsp.
20421 * src/reader.c (reader): Likewise.
ba0fe3c7 20422 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 20423
11d82f03
MA
204242001-09-02 Marc Autret <autret_m@epita.fr>
20425
20426 * src/reader.c: Include muscle_tab.h.
20427 (parse_union_decl): Update.
20428 (parse_macro_decl): Rename parse_muscle_decl.
20429 Update to use renamed functions and variable.
20430 (read_declarations, copy_action, read_additionnal_code, : Updated
20431 with correct variables and functions names.
20432 (packsymbols, reader): Likewise.
342b8b6e 20433
11d82f03 20434 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 20435
11d82f03
MA
20436 * src/output.c: Include muscle_tab.h
20437 In all functions using macro_insert, change by using muscle_insert ().
20438 (macro_obstack): Rename muscle_obstack.
20439 Echo modifications in the whole file.
20440 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20441 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20442 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20443
20444 * src/muscle_tab.h: Update double inclusion macros.
20445 (macro_entry_s): Rename muscle_entry_s.
20446 Update prototypes.
342b8b6e 20447
11d82f03
MA
20448 * src/muscle_tab.c: Include muscle_tab.h.
20449 Rename macro_tabble to muscle_table.
20450 (mhash1, mhash2, mcmp): Use muscle_entry.
20451 (macro_init): Rename muscle_init. Update.
20452 (macro_insert): Rename muscle_insert. Update.
20453 (macro_find): Rename muscle_find. Update.
20454
20455 * src/main.c: Include muscle_tab.h.
20456 (main): Call muscle_init ().
20457 * src/Makefile.am (bison_SOURCES): Echo modifications.
20458
93a37297
MA
204592001-09-02 Marc Autret <autret_m@epita.fr>
20460
f753cd62 20461 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 20462
f753cd62
MA
20463 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20464
204652001-09-02 Marc Autret <autret_m@epita.fr>
20466
20467 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 20468
682d48cd
PB
204692001-09-01 Pascal Bart <pascal.bart@epita.fr>
20470
342b8b6e 20471 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
20472 filename.
20473
087c8fda
MA
204742001-09-01 Marc Autret <autret_m@epita.fr>
20475
20476 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20477 to an explicit value to activate the feature. We do it here.
20478
dda680cb
PB
204792001-08-31 Pascal Bart <pascal.bart@epita.fr>
20480
20481 * src/output.c (prepare): Delete the `filename' muscule insertion.
20482 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20483 (parse_union_decl): Likewise.
20484 * src/macrotab.c (macro_init): Initialize filename by infile.
20485
9e644e64
MA
204862001-08-31 Marc Autret <autret_m@epita.fr>
20487
20488 * src/bison.simple (YYLSP_NEEDED): New definition.
20489 * src/output.c (prepare): Add macro insertion of `locations_flag'
20490
17da6427
PB
204912001-08-31 Pascal Bart <pascal.bart@epita.fr>
20492
20493 * src/output.c (prepare): Delete insertion of previous muscles,
20494 and insert the `prefix' muscles.
20495 * src/macrotab.c (macro_init): Likewise.
20496 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 20497 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
20498 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20499 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 20500 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
20501 name_prefix.
20502
e8cb70b9
PB
205032001-08-31 Pascal Bart <pascal.bart@epita.fr>
20504
20505 * src/main.c (main): Standardize.
20506 * src/output.c (output_table_data, output_parser): Likewise.
20507 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20508
63c2d5de
MA
205092001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20510
342b8b6e 20511 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
20512 %%epilogue.
20513 * src/output.c (output): Rename %%declarations to %%prologue.
20514 * src/bison.simple: Echo modifications.
342b8b6e 20515
d8cb5183
MA
205162001-08-31 Marc Autret <autret_m@epita.fr>
20517
20518 * src/reader.c (readgram): CleanUp.
20519 (output_token_defines): Likewise.
20520 (packsymbols): Likewise.
20521 (reader): Likewise.
20522 * src/output.c (output): CPP-out useless code.
20523
6c686258
PB
205242001-08-31 Pascal Bart <pascal.bart@epita.fr>
20525
342b8b6e 20526 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
20527 output_trailers and output_headers.
20528 * src/output.h: Remove obsolete functions prototypes of output_headers
20529 and output_trailers.
20530
8f451ef7
PB
205312001-08-30 Pascal Bart <pascal.bart@epita.fr>
20532
20533 * src/main.c: Include macrotab.h.
342b8b6e 20534 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
20535 Adjust functions prototypes.
20536 * src/macrotab.c (macro_insert): Constify key and value.
20537 (macro_find): Constify key.
20538 (macro_insert): Include 'xalloc.h'
20539 (macro_insert): Use XMALLOC.
20540 (macro_find): Constify return value.
20541 * src/output.c (output_table_data): Rename table to table_data.
20542 (output_parser): Constify macro_key, macro_value.
20543
997b6fd0 205442001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
20545
20546 * src/reader.c (parse_skel_decl): New.
342b8b6e 20547 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
20548 * src/lex.h (token_t): New token `tok_skel'.
20549 * src/lex.c (percent_table): Add skeleton option entry.
20550 Standardize.
20551
ff48177d
MA
205522001-08-29 Marc Autret <autret_m@epita.fr>
20553
20554 * src/bison.simple: Add %%user_code directive at the end.
20555 * src/reader.c (read_additionnal_code): New.
20556 (reader): Use it.
20557 * src/output.c (output_program): Remove.
20558 (output): Update.
20559
b33160bf
MA
205602001-08-28 Marc Autret <autret_m@epita.fr>
20561
20562 * src/output.c (output_actions): Clean up.
4e5caae2 20563 (output_gram): CPP-out useless code.
b33160bf
MA
20564 * src/reader.c (reader): Clean up, CPP-out useless code.
20565
d1a2daf7
PB
205662001-08-28 Pascal Bart <pascal.bart@epita.fr>
20567
342b8b6e 20568 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 20569 directive.
d1a2daf7
PB
20570 * src/bison.simple: Add `%%definitions'.
20571
2b763dfe
MA
205722001-08-28 Marc Autret <autret_m@epita.fr>
20573
20574 * config/depcomp: New file.
20575
f1a87ef6
PE
205762001-08-27 Paul Eggert <eggert@twinsun.com>
20577
20578 * src/bison.simple (yyparse): Don't take the address of an
20579 item before the start of an array, as that doesn't conform to
20580 the C Standard.
20581
82e236e2
RA
205822001-08-27 Robert Anisko <robert.anisko@epita.fr>
20583
f1a87ef6 20584 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
20585 obstack. It was done too late here.
20586
20587 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20588 completely wrong.
20589 (reader): Initialize the macro obstack here, since we need it to grow
20590 '%define' directives.
20591
20592 * src/reader.h: Declare the macro obstack as extern.
20593
b0cfa28a
RA
205942001-08-27 Robert Anisko <robert.anisko@epita.fr>
20595
20596 * src/output.c (output_parser): Fix. Store single '%' characters in
20597 the output obstack instead of throwing them away.
20598
6fc74234
AD
205992001-08-27 Akim Demaille <akim@epita.fr>
20600
20601 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20602
9c76d118
RA
206032001-08-25 Robert Anisko <robert.anisko@epita.fr>
20604
20605 * lib/Makefile.am: Adjust.
20606
a8289c62
RA
206072001-08-25 Robert Anisko <robert.anisko@epita.fr>
20608
20609 * src/bison.simple: Update and add '%%' directives.
20610
b6610515
RA
206112001-08-25 Robert Anisko <robert.anisko@epita.fr>
20612
20613 * src/reader.c (reader): Remove calls to 'output_headers' and
20614 'output_trailers'. Remove some C output.
20615 (readgram): Disable a piece of code that was writing a default
20616 definition for 'YYSTYPE'.
20617 (reader_output_yylsp): Remove.
20618 (packsymbols): Output token defintions to a macro.
20619 (copy_definition): Disable C output.
6fc74234 20620
b6610515
RA
20621 * src/reader.c (parse_macro_decl): New function used to parse macro
20622 declarations.
20623 (copy_string2): Put the body of copy_string into this new function.
20624 Add a parameter to let the caller choose whether he wants to copy the
20625 string delimiters or not.
20626 (copy_string): Be a simple call to copy_string2 with the last argument
20627 bound to true.
20628 (read_declarations): Add case for macro definition.
20629 (copy_identifier): New.
6fc74234 20630 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
20631 rather than lex.
20632
26f609ff
RA
206332001-08-25 Robert Anisko <robert.anisko@epita.fr>
20634
20635 * src/output.c (prepare): Add prefixed names.
20636 (output_parser): Output semantic actions.
20637 (output_parser): Fix bug on '%%line' directives.
6fc74234 20638
26f609ff
RA
20639 * src/output.c (output_headers): Remove. The C code printed by this
20640 function should now be in the skeletons.
20641 (output_trailers): Remove.
20642 (output): Disable call to 'reader_output_yylsp'.
20643 (output_rule_data): Do not output tables to the table obstack.
20644
20645 * src/output.c: Remove some C dedicated output.
20646 Improve the use of macro and output obstacks.
20647 (output_defines): Remove.
6fc74234 20648
26f609ff
RA
20649 * src/output.c (output_token_translations): Associate 'translate'
20650 table with a macro. No output to the table obstack.
20651 (output_gram): Same for 'rhs' and 'prhs'.
20652 (output_stos): Same for 'stos'.
20653 (output_rule_data): Same for 'r1' and 'r2'.
20654 (token_actions): Same for 'defact'.
20655 (goto_actions): Same for 'defgoto'.
20656 (output_base): Same for 'pact' and 'pgoto'.
20657 (output_table): Same for 'table'.
20658 (output_check): Same for 'check'.
6fc74234 20659
26f609ff
RA
20660 * src/output.c (output_table_data): New function.
20661 (output_short_table): Remove.
20662 (output_short_or_char_table): Remove.
6fc74234 20663
26f609ff
RA
20664 * src/output.c (output_parser): Replace most of the skeleton copy code
20665 with something new. Skeletons are now processed character by character
20666 rather than line by line, and Bison looks for '%%' macros. This is the
20667 first step in making Bison's output process (a lot) more flexible.
20668 (output_parser): Use the macro table.
20669
6f43b113
RA
206702001-08-25 Robert Anisko <robert.anisko@epita.fr>
20671
20672 * src/main.c (main): Initialize the macro table.
20673
dd3127cf
RA
206742001-08-25 Robert Anisko <robert.anisko@epita.fr>
20675
20676 * src/lex.c (percent_table): Add tok_define.
20677 * src/lex.h: Add tok_define.
20678
aa321494
RA
206792001-08-25 Robert Anisko <robert.anisko@epita.fr>
20680
20681 * src/macrotab.c: New file.
20682 * src/macrotab.h: New file.
20683 * src/Makefile.am: Update.
20684
68bd3b6b
RA
206852001-08-25 Robert Anisko <robert.anisko@epita.fr>
20686
20687 * lib/hash.c: New file.
20688 * lib/hash.h: New file.
20689 * lib/Makefile.am: Update.
20690
45f8dd1e
AD
206912001-08-15 Akim Demaille <akim@epita.fr>
20692
20693 Version 1.28c.
20694
40a64a7a 206952001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
20696
20697 * src/reader.c (readgram): Indent output macro YYSTYPE.
20698 (packsymbols): Likewise.
20699 (output_token_defines): Likewise.
20700 * src/files.c: Standardize.
20701 (compute_header_macro): New.
20702 (defines_obstack_save): New. Use compute_header_macro.
20703 (output_files): Update. Use defines_obstack_save.
20704
f9a8293a
AD
207052001-08-15 Akim Demaille <akim@epita.fr>
20706
20707 * doc/bison.texinfo (Table of Symbols): Document
20708 YYSTACK_USE_ALLOCA.
20709
150ca7a7
AD
207102001-08-15 Akim Demaille <akim@epita.fr>
20711
20712 * missing: Update from CVS Automake.
20713 * config/config.guess, config/config.sub, config/texinfo.tex:
20714 Update from gnu.org.
20715
69b5cec4
AD
207162001-08-15 Akim Demaille <akim@epita.fr>
20717
20718 * Makefile.maint: Sync with CVS Autoconf.
20719
f2b5126e
PB
207202001-08-14 Pascal Bart <pascal.bart@epita.fr>
20721
69b5cec4 20722 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
20723 `fdl.texi'.
20724 * doc/fdl.texi: Add to package.
20725
4ecbf796
MA
207262001-08-14 Marc Autret <autret_m@epita.fr>
20727
20728 Turn on %{source,header}_extension features.
20729
69b5cec4 20730 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
20731 source_extension.
20732 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 20733 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
20734 between options.
20735
95fb5662
MA
207362001-08-14 Marc Autret <autret_m@epita.fr>
20737
20738 * src/files.c (compute_base_names): Add extensions computing when
20739 `--file-prefix' used.
20740 Standardize function calls.
20741
78d09da9
MA
207422001-08-13 Marc Autret <autret_m@epita.fr>
20743
69b5cec4 20744 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
20745 defining it (defined but null disables alloca).
20746
5a009f2c
MA
207472001-08-13 Marc Autret <autret_m@epita.fr>
20748
20749 * src/bison.simple (_yy_memcpy): CPP reformat.
20750
1e41465a
PB
207512001-08-13 Pascal Bart <pascal.bart@epita.fr>
20752
20753 * tests/atconfig.in (CPPFLAGS): Fix.
20754
c67a198d
PB
207552001-08-10 Pascal Bart <pascal.bart@epita.fr>
20756
79282c6c 20757 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
20758 `gpl.texi'.
20759 * doc/gpl.texi: Add to package.
20760
09a6de7e
MA
207612001-08-10 Marc Autret <autret_m@epita.fr>
20762
20763 * src/print_graph.h: Fix.
20764 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20765
b77b9ee0
AD
207662001-08-10 Akim Demaille <akim@epita.fr>
20767
20768 * src/system.h: Provide default declarations for stpcpy, strndup,
20769 and strnlen.
20770
3e259915
MA
207712001-08-10 Robert Anisko <anisko_r@epita.fr>
20772
20773 * doc/bison.texinfo (Locations): Update @$ stuff.
20774
ca96bc2d
MA
207752001-08-09 Robert Anisko <anisko_r@epita.fr>
20776
20777 * src/bison.simple (YYLLOC_DEFAULT): Update.
20778 (yyparse): Adjust.
20779
fdc6758b
MA
207802001-08-08 Marc Autret <autret_m@epita.fr>
20781
b77b9ee0 20782 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
20783 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20784 Reported by Fabrice Bauzac.
957d4dbf 20785
600cad3b
MA
207862001-08-08 Marc Autret <autret_m@epita.fr>
20787
20788 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20789 * src/vcg.c (output_node): Fix.
20790 * src/vcg.h: Cleanup.
20791 * src/print_graph.c: Add comments.
b77b9ee0 20792 (node_output_size): New global variable. Simplify the formatting of
600cad3b 20793 the VCG graph output.
b77b9ee0 20794 (print_actions): Unused code is now used. It notifies the final state
600cad3b 20795 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 20796 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
20797 blue.
20798 Get the current node name and node_obstack by argument.
20799 (node_obstack): New variable.
20800 (print_state): Manage node_obstack.
20801 (print_core): Use node_obstack given by argument.
20802 A node is not only computed here but in print_actions also.
20803 (print_graph): CPP out useless code instead of commenting it.
20804
976e528f
AD
208052001-08-07 Pascal Bart <pascal.bart@epita.fr>
20806
20807 * tests/atconfig.in (CPPFLAGS): Fix.
20808
20e8e5ca
AD
208092001-08-07 Akim Demaille <akim@epita.fr>
20810
20811 * src/print_graph.c (quote): New.
20812 (print_core): Use it.
20813
957d4dbf 208142001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 20815
3e3da797
AD
20816 * src/vcg.c (complain.h): Include it.
20817 Unepitaize `return' invocations.
c4b66126 20818 [NDEBUG] (main): Remove.
79282c6c 20819 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
20820 * src/files.c (open_files): Initialize graph_obstack.
20821 * src/print_graph.c (print_actions): CPP out useless code.
20822 (print_core): Don't output the last `\n' in labels.
20823 Use `quote'.
20824 * src/files.c (output_files): Output the VCG file.
20825 * src/main.c (main): Invoke print_graph ();
3e3da797 20826
957d4dbf 208272001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
20828
20829 Automaton VCG graph output.
20830 Using option ``-g'' or long option ``--graph'', you can generate
20831 a gram_filename.vcg file containing a VCG description of the LALR (1)
20832 automaton of your grammar.
20833
20834 * src/main.c: Call to print_graph() function.
20835 * src/getargs.h: Update.
20836 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20837 (graph_flag): New flag.
20838 (longopts): Update.
20839 (getargs): Add case `g'.
20840 * src/files.c (graph_obstack): New obstack struct.
20841 (open_files): Initialize new obstack.
20842 (output_files): Saves graph_obstack if required.
20843 * src/files.h (graph_obstack): New extern declaration.
20844 * src/Makefile.am: Add new source files.
20845
927c1557 208462001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
20847
20848 * src/print_graph.c, src/print_graph.h (graph): New.
20849 * src/vcg.h: New file.
20850 * src/vcg.c: New file, VCG graph handling.
20851
7333d403
AD
208522001-08-06 Marc Autret <autret_m@epita.fr>
20853
20854 Add of %source_extension and %header_extension which specify
20855 the source or/and the header output file extension.
20856
20857 * src/files.c (compute_base_names): Remove initialisation of
20858 src_extension and header_extension.
20859 (compute_exts_from_gf): Update.
20860 (compute_exts_from_src): Update.
20861 (output_files): Update.
20862 * src/reader.c (parse_header_extension_decl): New.
20863 (parse_source_extension_decl): New.
20864 (read_declarations): New case statements for the new tokens.
20865 * src/lex.c (percent_table): Add entries for %source_extension
20866 and %header_extension.
20867 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20868
84163231
AD
208692001-08-06 Marc Autret <autret_m@epita.fr>
20870
20871 * configure.in: Bump to 1.28c.
20872 * doc/bison.texinfo: Texinfo thingies.
20873
8303fc42
AD
208742001-08-04 Pascal Bart <pascal.bart@epita.fr>
20875
20876 * tests/atconfig.in (CPPFLAGS): Add.
20877 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20878
70a84437
AD
208792001-08-03 Akim Demaille <akim@epita.fr>
20880
20881 Version 1.28b.
20882
2ce10144
AD
208832001-08-03 Akim Demaille <akim@epita.fr>
20884
20885 * tests/Makefile.am (check-local): Ship testsuite.
20886 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20887 Include `string.h'.
20888
1e3e4bc1
AD
208892001-08-03 Akim Demaille <akim@epita.fr>
20890
20891 * configure.in: Try using -Wformat when compiling.
20892
42b45b7f
AD
208932001-08-03 Akim Demaille <akim@epita.fr>
20894
20895 * configure.in: Bump to 1.28b.
20896
8f13fe33
AD
208972001-08-03 Akim Demaille <akim@epita.fr>
20898
20899 * src/complain.c: Adjust strerror_r portability issues.
20900
b37ba92c
AD
209012001-08-03 Akim Demaille <akim@epita.fr>
20902
20903 Version 1.28a.
20904
b0ce6046
AD
209052001-08-03 Akim Demaille <akim@epita.fr>
20906
20907 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20908 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20909 * src/getargs.c: Include complain.h.
20910 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20911 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20912
d01c415b
AD
209132001-08-03 Akim Demaille <akim@epita.fr>
20914
20915 * src/reader.c (readgram): Display hidden chars in error messages.
20916
459dd1a6
AD
209172001-08-03 Akim Demaille <akim@epita.fr>
20918
20919 Update to gettext 0.10.39.
20920
53b74c0c
AD
209212001-08-03 Akim Demaille <akim@epita.fr>
20922
20923 * lib/strspn.c: New.
20924
234a3be3
AD
209252001-08-01 Marc Autret <autret_m@epita.fr>
20926
20927 * doc/bison.texinfo: Update.
20928 * doc/bison.1 (mandoc): Update.
20929 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20930 * src/files.c: Support output files extensions computing.
20931 (src_extension): New static variable.
20932 (header_extension): New static variable.
20933 (tr): New function.
20934 (get_extension_index): New function, gets the index of an extension
20935 filename in a string.
20936 (compute_exts_from_gf): New function, computes extensions from the
20937 grammar file extension.
20938 (compute_exts_from_src): New functions, computes extensions from the
20939 C source file extension, file given by ``-o'' option.
20940 (compute_base_names): Update.
20941 (output_files): Update.
20942
847bf1f5
AD
209432001-08-01 Robert Anisko <anisko_r@epita.fr>
20944
d995fee7 20945 * doc/bison.texi: Document @$.
847bf1f5
AD
20946 (Locations): New section.
20947
d074a105
AD
209482001-07-18 Akim Demaille <akim@epita.fr>
20949
20950 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20951 * config/prev-version.txt, config/move-if-change: New.
20952 * Makefile.am: Adjust.
20953
3419715d
AD
209542001-07-08 Pascal Bart <pascal.bart@epita.fr>
20955
20956 * src/bison.simple (yyparse): Suppress warning `comparaison
20957 between signed and unsigned'.
20958
62ab6972
AD
209592001-07-05 Pascal Bart <pascal.bart@epita.fr>
20960
20961 * src/getargs.h (raw_flag): Remove.
20962 * src/getargs.c: Die on `-r'/`--raw'.
20963 * src/lex.c (parse_percent_token): Die on `%raw'.
20964 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20965 * tests/calc.at: Suppress test with option `--raw'.
20966
1e24cc5b
AD
209672001-07-14 Akim Demaille <akim@epita.fr>
20968
20969 * config/: New.
20970 * configure.in: Require Autoconf 2.50.
20971 Update to gettext 0.10.38.
20972
32dfccf8
AD
209732001-03-16 Akim Demaille <akim@epita.fr>
20974
20975 * doc/bison.texinfo: ANSIfy the examples.
20976
cd5bd6ac
AD
209772001-03-16 Akim Demaille <akim@epita.fr>
20978
20979 * getargs.c (skeleton): New variable.
20980 (longopts): --skeleton is a new option.
20981 (shortopts, getargs): -S is a new option.
20982 * getargs.h: Declare skeleton.
20983 * output.c (output_parser): Use it.
20984
5141b016
AD
209852001-03-16 Akim Demaille <akim@epita.fr>
20986
20987 * m4/strerror_r.m4: New.
20988 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20989 * lib/error.h, lib/error.c: Update.
20990
447992b9
AD
209912001-03-16 Akim Demaille <akim@epita.fr>
20992
20993 * src/getargs.c (longopts): Clean up.
20994
274d42ce
AD
209952001-02-21 Akim Demaille <akim@epita.fr>
20996
20997 * src/reader.c (gensym): `gensym_count' is your own.
20998 Use a static buf to create the symbol name, as token_buffer is no
20999 longer a buffer.
21000
22c821f3
AD
210012001-02-08 Akim Demaille <akim@epita.fr>
21002
21003 * src/conflicts.c (conflict_report): Be sure not to append to res
21004 between two calls, which could happen if both first sprintf were
21005 skipped, but not the first cp += strlen.
21006
18569462
AD
210072001-02-08 Akim Demaille <akim@epita.fr>
21008
21009 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21010 New, from fileutils 4.0.37.
21011 * configure.in: Require Autoconf 2.49c. I took some time before
21012 making this decision. This is the only way out for portability
21013 issues in Bison, it would mean way too much duplicate effort to
21014 import in Bison features implemented in 2.49c since 2.13.
21015 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21016
0d8f3c8a
AD
210172001-02-02 Akim Demaille <akim@epita.fr>
21018
21019 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 21020 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 21021
f17bcd1f
AD
210222001-01-19 Akim Demaille <akim@epita.fr>
21023
21024 Get rid of the ad hoc handling of token_buffer in the scanner: use
21025 the obstacks.
21026
21027 * src/lex.c (token_obstack): New.
21028 (init_lex): Initialize it. No longer call...
21029 (grow_token_buffer): this. Remove it.
21030 Adjust all the places which used it to use the obstack.
21031
511e79b3
AD
210322001-01-19 Akim Demaille <akim@epita.fr>
21033
21034 * src/lex.h: Rename all the tokens:
21035 s/\bENDFILE\b/tok_eof/g;
21036 s/\bIDENTIFIER\b/tok_identifier/g;
21037 etc.
21038 Let them be enums, not #define, to ease debugging.
21039 Adjust all the code.
21040
0d6508ef
AD
210412001-01-18 Akim Demaille <akim@epita.fr>
21042
21043 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21044 * src/lex.c (maxtoken, grow_token_buffer): Static.
21045
6deb4447
AD
210462001-01-18 Akim Demaille <akim@epita.fr>
21047
21048 Since we now use obstacks, more % directives can be enabled.
21049
21050 * src/lex.c (percent_table): Also accept `%yacc',
21051 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21052 `%debug'.
21053 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21054 instead of returning a token.
21055 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21056 * src/reader.c (read_declarations): Adjust.
21057 * src/files.c (open_files): Don't call `compute_base_names', don't
21058 compute `attrsfile' since they depend upon data which might be
21059 *in* the input file now.
21060 (output_files): Do it here.
21061 * src/output.c (output_headers): Document the fact that this patch
21062 introduces a guaranteed SEGV for semantic parsers.
21063 * doc/bison.texinfo: Document them.
21064 * tests/suite.at: Exercise these %options.
21065
ff4423cc
AD
210662000-12-20 Akim Demaille <akim@epita.fr>
21067
21068 Also handle the output file (--verbose) with obstacks.
21069
21070 * files.c (foutput): Remove.
21071 (output_obstack): New.
21072 Adjust all dependencies.
21073 * src/conflicts.c: Return a string.
21074 * src/system.h (obstack_grow_string): Rename as...
21075 (obstack_sgrow): this. Be ready to work with non literals.
21076 (obstack_fgrow4): New.
21077
956dba3a
AD
210782000-12-20 Akim Demaille <akim@epita.fr>
21079
21080 * src/files.c (open_files): Fix the computation of short_base_name
21081 in the case of `-o foo.tab.c'.
21082
337bab46
AD
210832000-12-20 Akim Demaille <akim@epita.fr>
21084
21085 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21086 (copy_dollar): Now that everything uses obstacks, get rid of the
21087 FILE * parameters.
21088
5d3214b8
AD
210892000-12-20 Akim Demaille <akim@epita.fr>
21090
21091 * src/files.c (open_files): Actually the `.output' file is based
21092 on the short_base_name, not base_name.
21093 * tests/suite.at (Checking output file names): Adjust.
21094
29092a57
AD
210952000-12-20 Akim Demaille <akim@epita.fr>
21096
21097 * src/bison.s1: Remove, we now use directly...
21098 * src/bison.simple: this.
21099 * src/Makefile.am: Use pkgdata instead of data.
21100
ea5607fd
AD
211012000-12-20 Akim Demaille <akim@epita.fr>
21102
21103 * src/files.c (guard_obstack): New.
21104 (open_files): Initialize it.
21105 (output_files): Dump it...
21106 * src/files.h: Export it.
21107 * src/reader.c (copy_guard): Use it.
21108
27110317
AD
211092000-12-19 Akim Demaille <akim@epita.fr>
21110
21111 * src/files.c (outfile, defsfile, actfile): Removed as global
21112 vars.
21113 (open_files): Don't compute them.
21114 (output_files): Adjust.
21115 (base_name, short_base_name): Be global.
21116 Adjust dependencies.
21117
19c50364
AD
211182000-12-19 Akim Demaille <akim@epita.fr>
21119
21120 * src/files.c (strsuffix): New.
21121 (stringappend): Be just like strcat but allocate.
21122 (base_names): Eve out from open_files.
21123 Try to simplify the rather hairy computation of base_name and
21124 short_base_name.
21125 (open_files): Use it.
21126 * tests/suite.at (Checking output file names): New test.
21127
573c1d9f
AD
211282000-12-19 Akim Demaille <akim@epita.fr>
21129
21130 * src/system.h (obstack_grow_literal_string): Rename as...
21131 (obstack_grow_string): this.
21132 * src/output.c (output_parser): Recognize `%% actions' instead of
21133 `$'.
21134 * src/bison.s1: s/$/%% actions/.
21135 * src/bison.hairy: Likewise.
21136
ef7ddedd
AD
211372000-12-19 Akim Demaille <akim@epita.fr>
21138
21139 * src/output.c (output_parser): Compute the `#line' lines when
21140 there are.
21141 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21142 Suggested by Hans Aberg.
21143
ff61dabd
AD
211442000-12-19 Akim Demaille <akim@epita.fr>
21145
21146 Let the handling of the skeleton files be local to the procedures
21147 that use it.
21148
21149 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21150 longer static.
21151 (fparser, open_extra_files): Remove.
21152 (open_files, output_files): Don't take care of fparser.
21153 * src/files.h: Adjust.
21154 * src/output.c (output_parser): Open and close the file to the
21155 skeleton.
21156 * src/reader.c (read_declarations): When %semantic_parser, open
21157 fguard.
21158
55b96341
AD
211592000-12-19 Akim Demaille <akim@epita.fr>
21160
21161 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21162 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21163
358c15b7
AD
211642000-12-19 Akim Demaille <akim@epita.fr>
21165
21166 * src/files.c (open_files): Yipee! We no longer need all the code
21167 looking for `/tmp' since we have no tmp file.
21168
7de3329e
AD
211692000-12-19 Akim Demaille <akim@epita.fr>
21170
21171 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21172 New macros.
21173 * src/files.c (open_files): Less dependency on MSDOS etc.
21174
3abcd459
AD
211752000-12-14 Akim Demaille <akim@epita.fr>
21176
21177 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21178 Provide a default definition.
21179 Use it when executing the default @ action.
21180 * src/reader.c (reader_output_yylsp): No longer include
21181 `timestamp' and `text' in the default YYLTYPE.
21182
2a91a95e
AD
211832000-12-12 Akim Demaille <akim@epita.fr>
21184
21185 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21186 (copy_guard): Quote the file names.
21187 Reported by Laurent Mascherpa.
21188
14d3eb9b
AD
211892000-12-12 Akim Demaille <akim@epita.fr>
21190
21191 * src/output.c (output_headers, output_program, output): Be sure
21192 to escape special characters when outputting filenames.
21193 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21194 (output_headers): Don't depend on them, Use ACTSTR.
21195
d7045ec6
AD
211962000-11-17 Akim Demaille <akim@epita.fr>
21197
21198 * lib/obstack.h: Formatting changes.
21199 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21200 prevents type checking.
21201 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21202 cast the value to (void *): assigning a `foo *' to a `void *'
21203 variable is valid.
21204 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21205 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21206 append characters.
21207
6fd54b73
AD
212082000-11-17 Akim Demaille <akim@epita.fr>
21209
21210 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21211 as...
21212 (suite.m4, regression.m4, calc.m4): these.
21213 * tests/atgeneral.m4: Update from CVS Autoconf.
21214
4c50eae6
AD
212152000-11-17 Akim Demaille <akim@epita.fr>
21216
21217 * tests/regression.m4 (%union and --defines): New test,
21218 demonstrating a current bug in the obstack implementation.
21219
a35f64ea
AD
212202000-11-17 Akim Demaille <akim@epita.fr>
21221
21222 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21223 macros.
21224 Use them to declare the variables which are global or local to
21225 `yyparse'.
21226
7de23534
AD
212272000-11-17 Akim Demaille <akim@epita.fr>
21228
21229 * acconfig.h: Remove, no longer used.
21230
aa7815f5
AD
212312000-11-07 Akim Demaille <akim@epita.fr>
21232
21233 * src: s/Copyright (C)/Copyright/g.
21234
5af1f549
AD
212352000-11-07 Akim Demaille <akim@epita.fr>
21236
21237 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21238 defining.
21239 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21240
553e2b22
AD
212412000-11-07 Akim Demaille <akim@epita.fr>
21242
21243 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21244 Merge in a single CPP if/else.
21245
8a4f41d6
AD
212462000-11-07 Akim Demaille <akim@epita.fr>
21247
21248 * src/output.c (output): Remove useless variables.
21249 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21250 argument `data' for consistency with the prototypes.
21251 Qualify it `const'.
21252 (obstack_copy, obstack_copy0): Rename the second argument as
21253 `address' for consistency. Qualify it `const'.
21254 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21255 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21256 `const' their input argument (`data' or `address').
21257 Adjust the corresponding macros to include `const' in casts.
21258
095a3fb5
AD
212592000-11-03 Akim Demaille <akim@epita.fr>
21260
21261 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21262 s/PFILE1/BISON_HAIRY/.
21263 Adjust dependencies.
21264
d1cdce7c
AD
212652000-11-03 Akim Demaille <akim@epita.fr>
21266
090c5ebf 21267 For some reason, this was not applied.
d1cdce7c
AD
21268
21269 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21270 `unlink': it's no longer used.
21271
9311529b
AD
212722000-11-03 Akim Demaille <akim@epita.fr>
21273
21274 * src/files.c (skeleton_find): New function, eved out of...
21275 (open_files, open_extra_files): here.
21276
d8880f69
AD
212772000-11-03 Akim Demaille <akim@epita.fr>
21278
21279 Don't use `atexit'.
21280
21281 * src/files.c (obstack_save): New function.
21282 (done): Rename as...
21283 (output_files): this.
21284 Use `obstack_save'.
21285 * src/main.c (main): Don't use `atexit' to register `done', since
21286 it no longer has to remove tmp files, just call `output_files'
21287 when there are no errors.
21288
0dbb648e
AD
212892000-11-02 Akim Demaille <akim@epita.fr>
21290
21291 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21292 `unlink': it's no longer used.
21293 * src/files.h: Formatting changes.
21294
896fe5c1
AD
212952000-11-02 Akim Demaille <akim@epita.fr>
21296
21297 Remove the last uses of mktemp and unlink/delete.
21298
21299 * src/files.c (fdefines, ftable): Removed.
21300 (defines_ostack, table_obstack): New.
21301 Adjust dependencies of the former into uses of the latter.
21302 * src/output.c (output_short_or_char_table, output_short_table):
21303 Convert to using obstacks.
21304 * src/reader.c (copy_comment2): Accept one FILE * and two
21305 obstacks.
21306 (output_token_defines, reader_output_yylsp): Use obstacks.
21307 * src/system.h (obstack_fgrow3): New.
1f65350a 21308 * po/POTFILES.in: Adjust.
896fe5c1 21309
dd60faec
AD
213102000-11-01 Akim Demaille <akim@epita.fr>
21311
21312 Change each use of `fattrs' into a use of `attrs_obstack'.
21313
21314 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21315 * src/files.c (fattrs): Remove.
21316 (attrs_obstack): New.
21317 Adjust all dependencies.
21318 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21319
8c7ebe49
AD
213202000-11-01 Akim Demaille <akim@epita.fr>
21321
21322 Introduce obstacks.
21323 Change each use of `faction' into a use of `action_obstack'.
21324
21325 * lib/obstack.h, lib/obstack.c: New files.
21326 * src/files.c (faction): Remove.
21327 (action_obstack): New.
21328 Adjust all dependencies.
21329
77aee789
AD
213302000-10-20 Akim Demaille <akim@epita.fr>
21331
21332 * lib/quote.h (PARAMS): New macro. Use it.
21333
43591cec
AD
213342000-10-16 Akim Demaille <akim@epita.fr>
21335
21336 * src/output.c (output_short_or_char_table): New function.
21337 (output_short_table, output_token_translations): Use it.
21338 (goto_actions): Use output_short_table.
21339
1e9798d5
AD
213402000-10-16 Akim Demaille <akim@epita.fr>
21341
21342 * src/symtab.c (bucket_new): New function.
21343 (getsym): Use it.
21344
21345 * src/output.c (output_short_table): New argument to display the
21346 comment associated with the table.
21347 Adjust dependencies.
21348 (output_gram): Use it.
21349 (output_rule_data): Nicer output layout for YYTNAME.
21350
f282676b
AD
213512000-10-16 Akim Demaille <akim@epita.fr>
21352
21353 * src/lex.c (read_typename): New function.
21354 (lex): Use it.
21355 * src/reader.c (copy_dollar): Likewise.
21356
550a72a3
AD
213572000-10-16 Akim Demaille <akim@epita.fr>
21358
21359 * src/reader.c (copy_comment2): Expect the input stream to be on
21360 the `/' which is suspected to open a comment, instead of being
21361 called after `//' or `/*' was read.
21362 (copy_comment, copy_definition, parse_union_decl, copy_action)
21363 (copy_guard): Adjust.
21364
131e2fef
AD
213652000-10-16 Akim Demaille <akim@epita.fr>
21366
21367 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21368 `read_signed_integer'.
21369
79282c5a
AD
213702000-10-16 Akim Demaille <akim@epita.fr>
21371
21372 * src/reader.c (copy_dollar): New function.
21373 (copy_guard, copy_action): Use it.
21374
ff4a34be
AD
213752000-10-16 Akim Demaille <akim@epita.fr>
21376
21377 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21378 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21379 New files, from Fileutils 4.0.27.
21380 * src/main.c (printable_version): Remove.
21381 * src/lex.c, src/reader.c: Use `quote'.
21382
213832000-10-04 Akim Demaille <akim@epita.fr>
21384
21385 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21386
14ded682
AD
213872000-10-04 Akim Demaille <akim@epita.fr>
21388
21389 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21390
8e03724b
AD
213912000-10-04 Akim Demaille <akim@epita.fr>
21392
21393 When a literal string is used to define two different tokens,
21394 `bison -v' segfaults.
21395 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21396
21397 * tests/regression.m4: New file.
21398 Include the core of the sample provided by Piotr Gackiewicz.
21399 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21400 properly.
21401
a9e64249
AD
214022000-10-04 Akim Demaille <akim@epita.fr>
21403
21404 * src/reader.c (parse_expect_decl): Keep `count' within the size
21405 of `buffer'.
21406 From Neil Booth.
21407
da9abf43
AD
214082000-10-02 Paul Eggert <eggert@twinsun.com>
21409
21410 * bison.s1 (yyparse): Assign the default value
21411 unconditionally, to avoid a GCC warning and make the parser a
21412 tad smaller.
21413
c33638bb
AD
214142000-10-02 Akim Demaille <akim@epita.fr>
21415
21416 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21417 options.
21418
444c570a
AD
214192000-10-02 Akim Demaille <akim@epita.fr>
21420
21421 * src/derives.c, src/print.c, src/reduce.c: To ease the
21422 translation, move some `\n' out of the translated strings.
21423
89cab50d
AD
214242000-10-02 Akim Demaille <akim@epita.fr>
21425
21426 The location tracking mechanism is precious for parse error
21427 messages. Nevertheless, it is enabled only when `@n' is used in
21428 the grammar, which is a different issue (you can use it in error
21429 message, but not in the grammar per se). Therefore, there should
21430 be another means to enable it.
21431
21432 * src/getargs.c (getargs): Support `--locations'.
21433 (usage): Report it.
21434 * src/getargs.h (locationsflag): Export it.
21435 * src/lex.c (percent_table): Support `%locations'.
21436 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21437 with `locationsflag'.
21438 * doc/bison.texinfo: Document `--locations' and `%locations'.
21439 Sort the options.
21440 * tests/calc.m4: Test it.
21441
21442 For regularity of the names, replace each
21443 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21444 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21445 In addition replace each `flag' with `_flag'.
21446
d6c2cba0
AD
214472000-10-02 Akim Demaille <akim@epita.fr>
21448
21449 Also test parse error messages, including with YYERROR_VERBOSE.
21450
21451 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21452 associative).
21453 Use it to check the computations.
21454 Use it to check `nonassoc' is honored.
21455 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21456 `--yyerror-verbose'.
21457 (_AT_CHECK_CALC): Adjust to this option.
21458 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21459
5a35a6cb
AD
214602000-10-02 Akim Demaille <akim@epita.fr>
21461
21462 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21463 the latter demonstrates a flaw in the handling of non debugging
21464 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21465 was used in order to simplify:
21466
21467 #if YYDEBUG
21468 if (yydebug)
21469 {
21470 ...
21471 }
21472 #endif
21473
21474 into
21475
21476 if (yydebug)
21477 {
21478 ...
21479 }
21480
21481 unfortunately this leads to a CPP conflict when
21482 `--name-prefix=foo' is used since it produces `#define yydebug
21483 foodebug'.
21484
21485 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21486 (YYDPRINTF): New macro.
21487 Spread its use.
21488 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21489 the bison options.
21490 Also test `--verbose', `--defines' and `--name-prefix'.
21491
71da9eea
AD
214922000-10-02 Akim Demaille <akim@epita.fr>
21493
21494 Improve the readability of the produced parsers.
21495
21496 * src/bison.s1: Formatting changes.
21497 Improve the comment related to the `$' mark.
21498 (yydefault): Don't fall through to `yyresume': `goto' there.
21499 * src/output.c (output_parser): When the `$' is met, skip the end
21500 of its line.
21501 New variable, `number_of_dollar_signs', to check there's exactly
21502 one `$' in the parser skeleton.
21503
95e36146
AD
215042000-10-02 Akim Demaille <akim@epita.fr>
21505
21506 * lib/xstrdup.c: New file, from the fileutils.
21507 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21508 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21509 instead of strlen + xmalloc + strcpy.
21510 * src/symtab.c (copys): Remove, use xstrdup instead.
21511
d7020c20
AD
215122000-10-02 Akim Demaille <akim@epita.fr>
21513
21514 * src/gram.h (associativity): New enum type which replaces the
21515 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21516 `right_assoc', `left_assoc' and `non_assoc'.
21517 Adjust all dependencies.
21518 * src/reader.c: Formatting changes.
21519 (LTYPESTR): Don't define it, use it as a literal in
21520 `reader_output_yylsp'.
21521 * src/symtab.h (symbol_class): New enum type which replaces the
21522 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21523 `sunknown', `stoken and `snterm'.
21524
1916f98e
AD
215252000-10-02 Akim Demaille <akim@epita.fr>
21526
21527 * src/getargs.c (fixed_outfiles): Rename as...
21528 (yaccflag): for consistency and accuracy.
21529 Adjust dependencies.
21530
d7913476
AD
215312000-10-02 Akim Demaille <akim@epita.fr>
21532
21533 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21534 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21535 difficult and introduced a lot of core dump. It turns out that
21536 Bison used an implementation of `xmalloc' based on `calloc', and
21537 at various places it does depend upon the initialization to 0. I
21538 have not tried to isolate the pertinent places, and all the former
21539 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21540 someone should address this issue.
21541
21542 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21543 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21544 files.
21545 Adjust dependencies.
21546 * src/warshall.h: New file.
21547 Propagate.
21548
340ef489
AD
215492000-10-02 Akim Demaille <akim@epita.fr>
21550
21551 Various anti-`extern in *.c' changes.
21552
21553 * src/system.h: Include `assert.h'.
21554
b2ca4022
AD
215552000-10-02 Akim Demaille <akim@epita.fr>
21556
21557 * src/state.h (nstates, final_state, first_state, first_shift)
21558 (first_reduction): Move their exportation from here...
21559 * src/LR0.h: to here.
21560 Adjust dependencies.
21561 * src/getargs.c (statisticsflag): New variable.
21562 Add support for `--statistics'.
21563 Adjust dependencies.
21564
21565 Remove a lot of now useless `extern' statements in most files.
21566
403b315b
AD
215672000-10-02 Akim Demaille <akim@epita.fr>
21568
21569 * src/LR0.h: New file.
21570 Propagate its use.
21571
07a58c13
AD
215722000-10-02 Akim Demaille <akim@epita.fr>
21573
21574 * src/print.h: New file.
21575 Propagate its use.
21576 * src/print.c: Formatting and ordering changes.
21577 (verbose, terse): Replace with...
21578 (print_results): this new function.
21579 Adjust dependencies.
21580
0619caf0
AD
215812000-10-02 Akim Demaille <akim@epita.fr>
21582
21583 * src/conflicts.c (conflict_report): New function.
21584 (conflict_log, verbose_conflict_log): Replace with...
21585 (print_conflicts): this function.
21586 Adjust dependencies.
21587 * src/conflicts.h: New file.
21588 Propagate its inclusion.
21589
3519ec76
AD
215902000-10-02 Akim Demaille <akim@epita.fr>
21591
21592 * src/nullable.h: New file.
21593 Propagate its inclusion.
21594 * src/nullable.c: Formatting changes.
21595
015acc48
AD
215962000-10-02 Akim Demaille <akim@epita.fr>
21597
21598 * src/reduce.h: New file.
21599 Propagate its inclusion.
21600 * src/reduce.c: Topological sort and other formatting changes.
21601 (bool, TRUE, FALSE): Move their definition to...
21602 * src/system.h: here.
21603
8963a27b
AD
216042000-10-02 Akim Demaille <akim@epita.fr>
21605
21606 * src/files.c: Formatting changes.
21607 (tryopen, tryclose, openfiles): Rename as...
21608 (xfopen, xfclose, open_files): this.
21609 (stringappend): static.
21610 * src/files.h: Complete the list of exported symbols.
21611 Propagate its use.
21612
a70083a3
AD
216132000-10-02 Akim Demaille <akim@epita.fr>
21614
21615 * src/reader.h: New file.
21616 Propagate its use instead of tedious list of `extern' and
21617 prototypes.
21618 * src/reader.c: Formatting changes, topological sort,
21619 s/register//.
21620
abadc117
AD
216212000-10-02 Akim Demaille <akim@epita.fr>
21622
21623 * src/lex.h: Prototype `lex.c' exported functions.
21624 * src/reader.c: Adjust.
21625 * src/lex.c: Formatting changes.
21626 (safegetc): Rename as...
21627 (xgetc): this.
21628
720d742f
AD
216292000-10-02 Akim Demaille <akim@epita.fr>
21630
21631 * src/lalr.h: New file.
21632 Propagate its inclusion instead of prototypes and `extern'.
21633 * src/lalr.c: Formatting changes, topological sorting etc.
21634
f2acea59
AD
216352000-10-02 Akim Demaille <akim@epita.fr>
21636
21637 * src/output.c (token_actions): Introduce a temporary array,
21638 YYDEFACT, that makes it possible for this function to use
21639 output_short_table.
21640
d019d655
AD
216412000-10-02 Akim Demaille <akim@epita.fr>
21642
21643 `user_toknums' is output as a `short[]' in `output.c', while it is
21644 defined as a `int[]' in `reader.c'. For consistency with the
21645 other output tables, `user_toknums' is now defined as a table of
21646 shorts.
21647
21648 * src/reader.c (user_toknums): Be a short table instead of an int
21649 table.
21650 Adjust dependencies.
21651
21652 Factor the short table outputs.
21653
21654 * src/output.c (output_short_table): New function.
21655 * src/output.c (output_gram, output_stos, output_rule_data)
21656 (output_base, output_table, output_check): Use it.
21657
6c89f1c1
AD
216582000-10-02 Akim Demaille <akim@epita.fr>
21659
21660 * src/output.c (output): Topological sort of the functions, in
21661 order to get rid of the `static' prototypes.
21662 No longer use `register'.
21663 * src/output.h: New file.
21664 Propagate its inclusion in files explicitly prototyping functions
21665 from output.c.
21666
d9efd181
AD
216672000-09-21 Akim Demaille <akim@epita.fr>
21668
21669 * src/atgeneral.m4: Update from Autoconf.
21670
c29240e7 216712000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
21672
21673 * src/closure.h: New file.
21674 * src/closure.c: Formatting changes, topological sort over the
21675 functions, use of closure.h.
21676 (initialize_closure, finalize_closure): Rename as...
21677 (new_closure, free_closure): these. Adjust dependencies.
21678 * src/LR0.c: Formatting changes, topological sort, use of
21679 cloture.h.
21680 (initialize_states): Rename as...
21681 (new_states): this.
21682 * src/Makefile.am (noinst_HEADERS): Adjust.
21683
499daa50
AD
216842000-09-20 Akim Demaille <akim@epita.fr>
21685
21686 * src/acconfig.h: Don't protect config.h against multiple
21687 inclusion.
21688 Don't define PARAMS.
21689 * src/system.h: Define PARAMS.
21690 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21691 purpose of config.h. system.h must not try to fix wrong
21692 definitions in config.h.
21693
cc84fd5d
AD
216942000-09-20 Akim Demaille <akim@epita.fr>
21695
21696 * src/derives.h: New file.
21697 * src/main.c, src/derives.h: Use it.
21698 Formatting changes.
21699 * src/Makefile.am (noinst_HEADERS): Adjust.
21700
db5b3a89
AD
217012000-09-20 Akim Demaille <akim@epita.fr>
21702
21703 * tests/atgeneral.m4: Update from Autoconf.
21704 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21705 (AT_CHECK_CALC): New macros.
21706 Use these macros to test bison with options `', `--raw',
21707 `--debug', `--yacc', `--yacc --debug'.
21708
ceed8467
AD
217092000-09-19 Akim Demaille <akim@epita.fr>
21710
21711 * src/output.c: Formatting changes.
21712 * src/machine.h: Remove, leaving its contents in...
21713 * src/system.h: here.
21714 Include stdio.h.
21715 Adjust all dependencies on stdio.h and machine.h.
21716 * src/getargs.h: New file.
21717 Let all `extern' declarations about getargs.c be replaced with
21718 inclusion of `getargs.h'.
21719 * src/Makefile.am (noinst_HEADERS): Adjust.
21720
21721 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21722 scope.
21723 (yyerror): Returns void, not int.
21724 * doc/bison.texinfo: Formatting changes.
21725
05a1d24b
AD
217262000-09-19 Akim Demaille <akim@epita.fr>
21727
21728 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21729 portable.
21730
cbd25751
AD
217312000-09-18 Akim Demaille <akim@epita.fr>
21732
21733 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21734 * src/Makefile.am (INCLUDES): Don't.
21735 Be ready to fetch headers in lib/.
21736
13863333
AD
217372000-09-18 Akim Demaille <akim@epita.fr>
21738
21739 * doc/bison.texinfo: Update the copyright.
21740 ANSIfy and GNUify the examples.
21741 Remove the old menu.
21742
0d533154
AD
217432000-09-18 Akim Demaille <akim@epita.fr>
21744
21745 First set of tests: use the `calc' example from the documentation.
21746
21747 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21748 is defined only when YYDEBUG is.
21749 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21750 * src/files.c (tryopen, tryclose): Formatting changes.
21751 Move to the top and be static.
21752 * src/reader.c (read_signed_integer): Likewise.
21753 * tests/calc.m4: New file.
21754 * Makefile.am, suite.m4: Adjust.
21755 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21756
e79137ac
AD
217572000-09-18 Akim Demaille <akim@epita.fr>
21758
21759 Add support for an Autotest test suite for Bison.
21760
21761 * m4/m4.m4, m4/atconfig.m4: New files.
21762 * m4/Makefile.am (EXTRA_DIST): Adjust.
21763 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21764 files.
21765 * src/getargs.c: Display a more standard --version message.
21766 * src/reader.c (reader): Formatting changes.
21767 No longer depend upon VERSION_STRING.
21768 * configure.in: No longer use `dnl'.
21769 Set up the test suite and the new directory `tests/.
21770 (VERSION_STRING): Remove.
21771
27821bff
AD
217722000-04-14 Akim Demaille <akim@epita.fr>
21773
21774 * src/reader.c (copy_comment2): New function, same as former
21775 `copy_comment', but outputs into two FILE *.
21776 (copy_comment): Use it.
21777 (parse_union_decl): Use it.
21778 (get_type, parse_start_decl): Use the same `invalid' message.
21779 (parse_start_decl, parse_union_decl): Use the same `multiple'
21780 message.
21781 (parse_union_decl, copy_guard, copy_action): Use the same
21782 `unmatched' message.
21783 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21784
cfe5fbc0
AD
217852000-03-31 Akim Demaille <akim@epita.fr>
21786
21787 * src/files.c (tryopen, tryclose): Move to the top.
21788 Be static.
21789
cb7db13e
AD
217902000-03-31 Akim Demaille <akim@epita.fr>
21791
21792 * src/main.c (main): Don't call `done', exit does it.
21793
a0f6b076
AD
217942000-03-31 Akim Demaille <akim@epita.fr>
21795
36281465
AD
21796 * allocate.c: s/return (foo)/return foo/.
21797 * lalr.c: Likewise.
21798 * LR0.c: Likewise.
21799 * output.c: Likewise.
21800 * reader.c: Likewise.
21801 * symtab.c: Likewise.
21802 * vmsgetargs.c: Likewise.
21803
218042000-03-31 Akim Demaille <akim@epita.fr>
21805
21806 Clean up the error reporting functions.
a0f6b076
AD
21807
21808 * src/report.c: New file.
21809 * src/report.h: Likewise.
21810 * src/Makefile.am: Adjust.
21811 * m4/error.m4: New file.
21812 * m4/Makefile.am: Adjust.
21813 * configure.in (jm_PREREQ_ERROR): Call it.
21814 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21815 Remove.
21816 (fatal, fatals): Remove. All callers use complain.c::fatal.
21817 (warn, warni, warns, warnss, warnss): Remove. All callers use
21818 complain.c::complain.
21819 (toomany): Remove, use fatal instead.
21820 * src/files.c (done): No argument, use complain_message_count.
21821 * src/main.c (main): Register `done' to `atexit'.
21822
21823 * src/getargs.c (usage): More `fputs', less `fprintf'.
21824
18539825
AD
218252000-03-28 Akim Demaille <akim@epita.fr>
21826
21827 * lib/: New directory.
21828 * Makefile.am (SUBDIRS): Adjust.
21829 * configure.in: Adjust.
21830 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21831 useless.
21832 * src/alloca.c: Moved to lib/.
21833 * src/getopt.c: Likewise.
21834 * src/getopt1.c: Likewise.
21835 * src/getopt.h: Likewise.
21836 * src/ansi2knr.c: Likewise.
21837 * src/ansi2knr.1: Likewise.
21838 * src/Makefile.am: Adjust.
21839 * lib/Makefile.am: New file.
21840
9f306f2a
AD
218412000-03-28 Akim Demaille <akim@epita.fr>
21842
21843 * src/getargs.c (usage): Refresh the help message.
21844
0ba347b6
AD
218452000-03-17 Akim Demaille <akim@epita.fr>
21846
21847 * src/getopt1.c: Updated from textutils 2.0e
21848 * src/getopt.c: Likewise.
21849 * src/getopt.h: Likewise.
21850
dbe7f271
AD
218512000-03-17 Akim Demaille <akim@epita.fr>
21852
21853 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21854 the file name, not the whole `#line LINE FILE'.
21855
75bbe78d
AD
218562000-03-17 Akim Demaille <akim@epita.fr>
21857
21858 On syntax errors, report the token on which we choked.
21859
aa5fd0ee
AD
21860 * src/bison.s1 (yyparse): In the label yyerrlab, when
21861 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 21862
7b306f52
AD
218632000-03-17 Akim Demaille <akim@epita.fr>
21864
aa5fd0ee 21865 * src/reader.c (copy_at): New function.
7b306f52
AD
21866 (copy_guard): Use it.
21867 (copy_action): Use it.
21868
e87b5700
AD
218692000-03-17 Akim Demaille <akim@epita.fr>
21870
21871 Be kind to translators, save some useless translations.
21872
aa5fd0ee 21873 * src/main.c (banner): New function.
e87b5700
AD
21874 (fatal_banner): Use it.
21875 (warn_banner): Use it.
21876
ae3c3164
AD
218772000-03-17 Akim Demaille <akim@epita.fr>
21878
aa5fd0ee
AD
21879 * src/reader.c (copy_definition): Use copy_string and
21880 copy_comment. Removed now unused `match', `ended',
21881 `cplus_comment'.
ae3c3164
AD
21882 (copy_comment, copy_string): Moved, to be visible from
21883 copy_definition.
21884
4dc58e7c
AD
218852000-03-17 Akim Demaille <akim@epita.fr>
21886
aa5fd0ee
AD
21887 * src/reader.c (copy_string): Declare `static inline'. No
21888 problems with inline, since it is checked by configure.
4dc58e7c
AD
21889 (copy_comment): Likewise.
21890
0a6384c4
AD
218912000-03-17 Akim Demaille <akim@epita.fr>
21892
aa5fd0ee 21893 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 21894
3cef001a
AD
218952000-03-17 Akim Demaille <akim@epita.fr>
21896
aa5fd0ee 21897 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
21898 (copy_action): Use it. Removed now unused `match', `ended',
21899 `cplus_comment'.
21900 (copy_guard): Likewise.
21901
ca36d2ef
AD
219022000-03-17 Akim Demaille <akim@epita.fr>
21903
aa5fd0ee 21904 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
21905 (copy_action): Use it.
21906 (copy_guard): Likewise.
21907
6666f98f
AD
219082000-03-17 Akim Demaille <akim@epita.fr>
21909
21910 Change the handling of @s so that they behave exactly like $s.
21911 There is now a pseudo variable @$ (readble and writable), location
21912 of the lhs of the rule (by default ranging from the location of
21913 the first symbol of the rhs, to the location of the last symbol,
21914 or, if the rhs is empty, YYLLOC).
21915
21916 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21917 yyval.
21918 (yyparse): When providing a default semantic action, provide a
21919 default location action.
21920 (after the $): No longer change `*YYLSP', just stack YYLOC the
21921 same way you stack YYVAL.
21922 * src/reader.c (read_declarations): Use warns.
21923 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21924 (copy_action, case '@'): Likewise.
21925 Use a standard error message, to save useless work from
21926 translators.
21927
41aca2e0
AD
219282000-03-17 Akim Demaille <akim@epita.fr>
21929
aa5fd0ee
AD
21930 * src/bison.s1: Formatting and cosmetics changes.
21931 * src/reader.c: Likewise.
41aca2e0
AD
21932 Update the Copyright notice.
21933
dc08c1d5
AD
219342000-03-17 Akim Demaille <akim@epita.fr>
21935
aa5fd0ee
AD
21936 * src/bison.s1 (#line): All set to `#line' only, since the
21937 Makefile now handles them.
dc08c1d5 21938
9ee3c97b
AD
219392000-03-16 Akim Demaille <akim@epita.fr>
21940
21941 * src/output.c (output_rule_data): Output the documentation of
21942 some of the tables.
21943 (Copyright notice): Update.
21944 Formatting changes.
21945
0de741ca
AD
219462000-03-16 Akim Demaille <akim@epita.fr>
21947
21948 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21949 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21950 One `#if YYDEBUG' remains, since it uses variables which are
21951 defined only if `YYDEBUG != 0'.
21952
bb10be54
AD
219532000-03-16 Akim Demaille <akim@epita.fr>
21954
21955 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21956 and related variables so that the similarities are highlighted.
21957
b07b484a
AD
219582000-03-16 Akim Demaille <akim@epita.fr>
21959
21960 * src/bison.s1: Properly indent CPP directives.
21961
361f60b3
AD
219622000-03-16 Akim Demaille <akim@epita.fr>
21963
21964 * src/bison.s1: Properly indent the `alloca' CPP section.
21965
8c44d3ec
AD
219662000-03-16 Akim Demaille <akim@epita.fr>
21967
21968 Do not hard code values of directories in `configure.in'.
21969 Update the `configure' tool chain.
21970
21971 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21972 src/makefile.am.
21973 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21974 (AC_OUTPUT): Add m4/Makefile.
21975 Bump to bison 1.28a, 1.29 has never been released.
21976 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21977 handled via src/Makefile.am.
21978 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21979 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21980 autoheader.
21981 * Makefile.am (SUBDIRS): Add m4.
21982 (ACLOCAL_AM_FLAGS): New variable.
21983 (AUTOMAKE_OPTIONS): Add check-news.
21984 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21985 the proper line number and file name.
21986 (DEFS): Propagate the location of bison library files and of the
21987 locale files.
21988 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21989 builddir.
21990 * acinclude.m4: Remove, replaced by the directory m4.
21991 * m4/Makefile.am (EXTRA_DIST): New variable.
21992 * m4/gettext.m4: New file, from the fileutils.
21993 * m4/lcmessage.m4: Likewise
21994 * m4/progtest.m4: Likewise.
21995 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21996
f95997e7
AD
219972000-03-10 Akim Demaille <akim@epita.fr>
21998
21999 * src/closure.c:
22000 Formatting changes of various comments.
22001 Respect the GNU coding standards at various places.
22002 Don't use `_()' when no translation is needed.
22003
220041999-12-13 Jesse Thilo <jthilo@gnu.org>
22005
22006 * src/files.c:
22007 OS/2 honors TMPDIR environment variable.
22008
220091999-12-13 Jesse Thilo <jthilo@gnu.org>
22010
22011 * doc/bison.texinfo: Tweaked spelling and grammar.
22012 Updated ISBN.
22013 Removed reference to price of printed copy.
22014 Mention BISON_SIMPLE and BISON_HAIRY.
22015
220161999-12-13 Jesse Thilo <jthilo@gnu.org>
22017
22018 * configure.in, NEWS:
22019 Bison 1.29 released.
22020
220211999-10-27 Jesse Thilo <jthilo@gnu.org>
22022
22023 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22024 Added reference card.
22025
220261999-07-26 Jesse Thilo <jthilo@gnu.org>
22027
22028 * po/ru.po: Added Russian translation.
22029
220301999-07-26 Jesse Thilo <jthilo@gnu.org>
22031
22032 * configure.in: Added Russian translation.
22033
220341999-07-06 Jesse Thilo <jthilo@gnu.org>
22035
22036 * configure.in, NEWS, README:
22037 Released version 1.28.
22038
220391999-06-14 Jesse Thilo <jthilo@gnu.org>
22040
22041 * src/system.h:
22042 Squashed redefinition warning on some systems.
22043
22044 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22045 Have configure build version string instead of relying on ANSI string
22046 concatentation.
22047
220481999-06-14 Jesse Thilo <jthilo@gnu.org>
22049
22050 * po/POTFILES.in: Got rid of version.c.
22051
220521999-06-14 Jesse Thilo <jthilo@gnu.org>
22053
22054 * acconfig.h, configure.in:
22055 Have configure build version string instead of relying on ANSI string
22056 concatentation.
22057
220581999-06-08 Jesse Thilo <jthilo@gnu.org>
22059
22060 * doc/bison.1:
22061 Dropped mention of `+' for long-named options.
22062
220631999-05-30 Jesse Thilo <jthilo@gnu.org>
22064
22065 * src/files.c: Added <unistd.h> for unlink().
22066
22067 * src/Makefile.am, src/system.h:
22068 I18n fixes.
22069
220701999-05-30 Jesse Thilo <jthilo@gnu.org>
22071
22072 * README: Added a FAQ list.
22073
22074 * configure.in, acconfig.h:
22075 I18n fixes.
22076
220771999-05-30 Jesse Thilo <jthilo@gnu.org>
22078
22079 * doc/FAQ, doc/Makefile.am:
22080 Added a FAQ list.
22081
220821999-05-19 Jesse Thilo <jthilo@gnu.org>
22083
22084 * src/alloc.h, src/symtab.h, src/version.c:
22085 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22086
220871999-04-18 Jesse Thilo <jthilo@gnu.org>
22088
22089 * src/.cvsignore, src/Makefile.am:
22090 Reorganized: sources in `src', documentation in `doc'.
22091
22092 * src/lex.c (literalchar):
22093 fixed the code for escaping double quotes (thanks
22094 Jonathan Czisny.)
22095
220961999-04-18 Jesse Thilo <jthilo@gnu.org>
22097
22098 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22099 Adjusted paths to reflect directory reorganization.
22100
221011999-04-18 Jesse Thilo <jthilo@gnu.org>
22102
22103 * doc/.cvsignore, doc/Makefile.am:
22104 Reorganized: sources in `src', documentation in `doc'.
22105
221061999-04-18 Jesse Thilo <jthilo@gnu.org>
22107
22108 * configure.in:
22109 Updated AC_INIT file to reflect directory reorganization.
22110
22111 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22112 Reorganized: sources in `src', documentation in `doc'.
22113
221141999-04-13 Jesse Thilo <jthilo@gnu.org>
22115
22116 * src/allocate.c:
22117 Don't declare calloc() and realloc() if not necessary.
22118
221191999-04-13 Jesse Thilo <jthilo@gnu.org>
22120
22121 * configure.in, acconfig.h, acinclude.m4:
22122 Don't declare calloc() and realloc() if not necessary.
22123
221241999-03-23 Jesse Thilo <jthilo@gnu.org>
22125
22126 * po/.cvsignore: Added i18n support.
22127
221281999-03-23 Jesse Thilo <jthilo@gnu.org>
22129
22130 * acconfig.h, configure.in, Makefile.am:
22131 Added i18n support.
22132
221331999-03-22 Jesse Thilo <jthilo@gnu.org>
22134
22135 * src/bison.s1: Fixed #line numbers.
22136
221371999-03-15 Jesse Thilo <jthilo@gnu.org>
22138
22139 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22140 Added PO files from Translation Project.
22141
221421999-03-03 Jesse Thilo <jthilo@gnu.org>
22143
22144 * Makefile.am:
22145 Added support for non-ANSI compilers (ansi2knr).
22146
221471999-02-16 Jesse Thilo <jthilo@gnu.org>
22148
22149 * configure.in: Bumped version number to 1.27.
22150
22151 * Makefile.am:
22152 Added `bison.simple' to list of files removed by `make distclean'.
22153
221541999-02-12 Jesse Thilo <jthilo@gnu.org>
22155
22156 * src/files.c, src/files.h:
22157 Defined locations of parser files in config.h instead of Makefile.
22158
221591999-02-12 Jesse Thilo <jthilo@gnu.org>
22160
22161 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22162 Defined locations of parser files in config.h instead of Makefile.
22163
221641999-02-09 Jesse Thilo <jthilo@gnu.org>
22165
22166 * Makefile.am:
22167 Removed inappropriate use of $< macro.
22168
221691999-02-05 Jesse Thilo <jthilo@gnu.org>
22170
22171 * po/Makefile.in.in, po/POTFILES.in:
22172 Add `po' directory skeleton.
22173
221741999-01-27 Jesse Thilo <jthilo@gnu.org>
22175
22176 * README: Document help-bison list.
22177
22178 * configure.in: Add check for mkstemp().
22179
221801999-01-20 Jesse Thilo <jthilo@gnu.org>
22181
22182 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22183 Hush a few compiler warnings.
22184
22185 * src/files.c:
22186 Add tryclose(), which verifies that fclose was successful.
22187 Hush a couple of compiler warnings.
22188
221891999-01-20 Jesse Thilo <jthilo@gnu.org>
22190
22191 * Makefile.am, OChangeLog:
22192 ChangeLog is now automatically generated. Include the old version as
22193 OChangeLog.
22194
221951999-01-14 Jesse Thilo <jthilo@gnu.org>
22196
22197 * 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:
22198 Update FSF address.
22199
222001999-01-14 Jesse Thilo <jthilo@gnu.org>
22201
22202 * doc/bison.texinfo: Fix formatting glitch.
22203
22204 * doc/bison.texinfo: Update FSF address.
22205
222061999-01-14 Jesse Thilo <jthilo@gnu.org>
22207
22208 * acconfig.h: Update FSF address.
22209
222101999-01-08 Jesse Thilo <jthilo@gnu.org>
22211
22212 * src/system.h:
22213 Don't define PACKAGE here, since config.h defines it.
22214
222151998-12-30 Jesse Thilo <jthilo@gnu.org>
22216
22217 * src/reader.c: Update copyright date.
22218
22219 * src/main.c:
22220 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22221 favor of output directly to stderr (avoids buffer overruns).
22222
22223 * src/reader.c: Some checks for premature EOF.
22224
22225 * 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:
22226 Use prototypes if the compiler understands them.
22227
22228 * src/files.c: Honor TMPDIR on Unix hosts.
22229 Use prototypes if the compiler understands them.
22230
22231 * src/reader.c:
22232 Fix a couple of buffer overrun bugs.
22233 Use prototypes if the compiler understands them.
22234
22235 * src/system.h: Include unistd.h and ctype.h.
22236 Use #ifdef instead of #if for NLS symbols.
22237
222381998-12-30 Jesse Thilo <jthilo@gnu.org>
22239
22240 * doc/bison.texinfo:
22241 Delete comment "consider using @set for edition number, etc..." since
22242 we now are doing so.
22243
222441998-12-30 Jesse Thilo <jthilo@gnu.org>
22245
22246 * configure.in:
22247 Use prototypes if the compiler understands them.
22248
22249 * NEWS: Document 1.26 highlights.
22250
22251 * Makefile.am: Require Automake 1.3 or later.
22252
22253 * acconfig.h:
22254 Use prototypes if the compiler understands them.
22255
222561998-12-29 Jesse Thilo <jthilo@gnu.org>
22257
22258 * src/version.c:
22259 Use VERSION symbol from automake for version number.
22260
222611998-12-29 Jesse Thilo <jthilo@gnu.org>
22262
22263 * acconfig.h, configure.in, version.cin:
22264 Use VERSION symbol from automake for version number.
22265
222661998-11-28 Jesse Thilo <jthilo@gnu.org>
22267
22268 * Makefile.am:
22269 Distribute original version of simple parser (bison.s1), not built
22270 version (bison.simple).
22271
222721998-11-28 Jesse Thilo <jthilo@gnu.org>
22273
22274 * doc/bison.texinfo: Add info dir entry.
22275
22276 * doc/bison.texinfo:
22277 Let automake put version number into documentation.
22278
222791998-11-26 Jesse Thilo <jthilo@gnu.org>
22280
22281 * src/bison.cld, src/build.com, src/vmshlp.mar:
22282 Add non-RCS files from /gd/gnu/bison.
22283
222841998-11-26 Jesse Thilo <jthilo@gnu.org>
22285
22286 * doc/bison.1:
22287 Document the BISON_HAIRY and BISON_SIMPLE variables.
22288
222891998-11-25 Jesse Thilo <jthilo@gnu.org>
22290
22291 * src/version.c: Build version.c automatically.
22292
22293 * src/reader.c:
22294 Fix token numbering (used to start at 258, not 257).
22295
22296 * src/system.h: Include config.h.
22297
22298 * src/getargs.c: Update bug report address.
22299
22300 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22301 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22302
223031998-11-25 Jesse Thilo <jthilo@gnu.org>
22304
22305 * Makefile.am:
22306 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22307
22308 * configure.in, version.cin:
22309 Build version.c automatically.
22310
22311 * AUTHORS: Add AUTHORS file.
22312
22313 * README: Update bug report address.
22314
22315 * bison.simple:
22316 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22317
22318 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22319 Add automake stuff.
22320
223211998-11-25 Jesse Thilo <jthilo@gnu.org>
22322
22323 * doc/bison.texinfo: Clean up some formatting.
22324
223251998-05-05 Richard Stallman <rms@gnu.org>
22326
22327 * doc/bison.texinfo:
22328 Explain better why to make a pure parser.
22329
223301998-01-05 Richard Stallman <rms@gnu.org>
22331
22332 * src/files.c (openfiles):
22333 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22334 find a temporary directory, if possible. Do not unlink files while
22335 they are open.
22336
223371997-08-25 Richard Stallman <rms@gnu.org>
22338
22339 * src/reader.c (stack_offset;):
22340 Change some warni to warns.
22341
22342 * src/lex.c (literalchar): Use warns, not warni.
22343
223441997-06-28 Richard Stallman <rms@gnu.org>
22345
22346 * src/bison.s1: Add a Bison version comment.
22347
22348 * src/main.c (fatal, warn, berror):
22349 Use program_name.
22350
223511997-06-28 Richard Stallman <rms@gnu.org>
22352
22353 * Makefile.in (bison_version): New variable.
22354 (dist): Use that variable.
22355 (bison.s1): Substitute the Bison version into bison.simple.
22356
22357 * bison.simple: Add a Bison version comment.
22358
223591997-06-18 Richard Stallman <rms@gnu.org>
22360
22361 * src/main.c (fatal, warn, berror):
22362 Make error messages standard.
22363 (toomany): Improve error message text.
22364
22365 * 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:
22366 new.h renamed to alloc.h.
22367
223681997-06-18 Richard Stallman <rms@gnu.org>
22369
22370 * Makefile.in: new.h renamed to alloc.h.
22371
223721997-05-24 Richard Stallman <rms@gnu.org>
22373
22374 * src/lex.c (literalchar):
22375 Fix the code for escaping \, " and '.
22376
22377 (lex): Avoid trouble when there are many chars
22378 to discard in a char literal with just several chars in it.
22379
223801997-05-17 Richard Stallman <rms@gnu.org>
22381
22382 * src/bison.s1:
22383 Use malloc, if using alloca is troublesome.
22384 (YYSTACK_USE_ALLOCA): New flag macro.
22385 Define it for some systems and compilers.
22386 (YYSTACK_ALLOC): New macro.
22387 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22388 If it was malloc'd, free it.
22389
223901997-05-17 Richard Stallman <rms@gnu.org>
22391
22392 * bison.simple:
22393 Use malloc, if using alloca is troublesome.
22394 (YYSTACK_USE_ALLOCA): New flag macro.
22395 Define it for some systems and compilers.
22396 (YYSTACK_ALLOC): New macro.
22397 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22398 If it was malloc'd, free it.
22399
224001997-04-23 Richard Stallman <rms@gnu.org>
22401
22402 * src/bison.s1:
22403 (alloca) [__hpux]: Always define as __builtin_alloca.
22404
224051997-04-23 Richard Stallman <rms@gnu.org>
22406
22407 * bison.simple:
22408 (alloca) [__hpux]: Always define as __builtin_alloca.
22409
224101997-04-22 Richard Stallman <rms@gnu.org>
22411
22412 * src/bison.s1:
22413 [__hpux]: Include alloca.h (right for HPUX 10)
22414 instead of declaring alloca (right for HPUX 9).
22415
22416 * src/bison.s1 (__yy_memcpy):
22417 Declare arg `count' as unsigned int.
22418 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22419
224201997-04-22 Richard Stallman <rms@gnu.org>
22421
22422 * bison.simple:
22423 [__hpux]: Include alloca.h (right for HPUX 10)
22424 instead of declaring alloca (right for HPUX 9).
22425
22426 * bison.simple (__yy_memcpy):
22427 Declare arg `count' as unsigned int.
22428 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22429
224301997-01-03 Richard Stallman <rms@gnu.org>
22431
22432 * src/allocate.c: [__STDC__ or _MSC_VER]:
22433 Declare calloc and realloc to return void *.
22434
224351997-01-02 Richard Stallman <rms@gnu.org>
22436
22437 * src/system.h:
22438 [_MSC_VER]: Include stdlib.h and process.h.
22439 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22440
22441 * src/main.c (main): Return FAILURE as a value.
22442 (printable_version): Declare arg as int, not char.
22443
224441997-01-02 Richard Stallman <rms@gnu.org>
22445
22446 * Makefile.in (dist):
22447 Explicitly check for symlinks, and copy them.
22448
224491996-12-19 Richard Stallman <rms@gnu.org>
22450
22451 * src/files.c:
22452 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22453
224541996-12-18 Paul Eggert <eggert@gnu.org>
22455
22456 * src/bison.s1 (yyparse):
22457 If __GNUC__ and YYPARSE_PARAM are both defined,
22458 declare yyparse to have a void * argument.
22459
224601996-12-18 Paul Eggert <eggert@gnu.org>
22461
22462 * bison.simple (yyparse):
22463 If __GNUC__ and YYPARSE_PARAM are both defined,
22464 declare yyparse to have a void * argument.
22465
224661996-12-17 Richard Stallman <rms@gnu.org>
22467
22468 * src/reduce.c (nbits): Add some casts.
22469
224701996-08-12 Richard Stallman <rms@gnu.org>
22471
22472 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22473
224741996-08-12 Richard Stallman <rms@gnu.org>
22475
22476 * bison.simple: Test _MSDOS as well as _MSDOS_.
22477
224781996-07-31 Richard Stallman <rms@gnu.org>
22479
22480 * src/bison.s1:
22481 [__sun && __i386]: Include alloca.h.
22482
224831996-07-31 Richard Stallman <rms@gnu.org>
22484
22485 * bison.simple:
22486 [__sun && __i386]: Include alloca.h.
22487
224881996-07-30 Richard Stallman <rms@gnu.org>
22489
22490 * src/bison.s1: Comment change.
22491
22492 * src/bison.s1: Test _MSDOS_, not MSDOS.
22493
224941996-07-30 Richard Stallman <rms@gnu.org>
22495
22496 * bison.simple: Comment change.
22497
22498 * bison.simple: Test _MSDOS_, not MSDOS.
22499
225001996-06-01 Richard Stallman <rms@gnu.org>
22501
22502 * 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:
22503 Insert `_' macro around many string constants.
22504
22505 * src/main.c:
22506 Insert `_' macro around many string constants.
22507
22508 (main): Call setlocale, bindtextdomain and textdomain.
22509
22510 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22511 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22512 [ENABLE_NLS]: Include libintl.h.
22513 [ENABLE_NLS] (gettext): Define.
22514 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22515 (N_, PACKAGE, LOCALEDIR): New macros.
22516
225171996-06-01 Richard Stallman <rms@gnu.org>
22518
22519 * POTFILES.in: New file.
22520
22521 * Makefile.in (allocate.o):
22522 Define target explicitly.
22523
22524 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22525 (LDFLAGS): Set to @LDFLAGS@.
22526 (configure): Run autoconf only if preceding `cd' succeeds.
22527 (bison.s1): Redirect output to temporary file then move the
22528 temporary to the target, rather than redirecting directly to bison.s1.
22529 (clean): Remove config.status and config.log.
22530 (distclean): Don't remove config.status here.
22531
225321996-05-12 Richard Stallman <rms@gnu.org>
22533
22534 * src/bison.s1:
22535 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22536
225371996-05-12 Richard Stallman <rms@gnu.org>
22538
22539 * bison.simple:
22540 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22541
225421996-05-11 Richard Stallman <rms@gnu.org>
22543
22544 * src/bison.s1 (__yy_memcpy):
22545 Really reorder the args, as was supposedly done on Feb 14 1995.
22546 (yyparse): Calls changed accordingly.
22547
225481996-05-11 Richard Stallman <rms@gnu.org>
22549
22550 * Makefile.in (dist): Don't use $(srcdir).
22551
22552 * bison.simple (__yy_memcpy):
22553 Really reorder the args, as was supposedly done on Feb 14 1995.
22554 (yyparse): Calls changed accordingly.
22555
225561996-01-27 Richard Stallman <rms@gnu.org>
22557
22558 * src/output.c (output_rule_data):
22559 Test YYERROR_VERBOSE in the conditional
22560 around the definition of ttyname.
22561
225621995-12-29 Richard Stallman <rms@gnu.org>
22563
22564 * src/bison.s1:
22565 Fix line numbers in #line commands.
22566
225671995-12-29 Richard Stallman <rms@gnu.org>
22568
22569 * bison.simple:
22570 Fix line numbers in #line commands.
22571
225721995-12-27 Richard Stallman <rms@gnu.org>
22573
22574 * src/bison.s1 (YYPARSE_PARAM_DECL):
22575 In C++, make it always null.
22576 (YYPARSE_PARAM_ARG): New macro.
22577 (yyparse): Use YYPARSE_PARAM_ARG.
22578
225791995-12-27 Richard Stallman <rms@gnu.org>
22580
22581 * bison.simple (YYPARSE_PARAM_DECL):
22582 In C++, make it always null.
22583 (YYPARSE_PARAM_ARG): New macro.
22584 (yyparse): Use YYPARSE_PARAM_ARG.
22585
225861995-11-29 Richard Stallman <rms@gnu.org>
22587
22588 * doc/bison.texinfo:
22589 Describe literal string tokens, %raw, %no_lines, %token_table.
22590
225911995-11-29 Daniel Hagerty <hag@gnu.org>
22592
22593 * doc/bison.texinfo: Fixed update date
22594
225951995-10-16 Richard Stallman <rms@gnu.org>
22596
22597 * src/version.c: Version 1.25.
22598
225991995-10-16 Richard Stallman <rms@gnu.org>
22600
22601 * NEWS: *** empty log message ***
22602
226031995-10-16 Richard Stallman <rms@gnu.org>
22604
22605 * doc/bison.1, doc/bison.rnh:
22606 Add new options.
22607
226081995-10-15 Richard Stallman <rms@gnu.org>
22609
22610 * src/vmsgetargs.c, src/getargs.c:
22611 Added -n, -k, and -raw switches.
22612 (noparserflag, toknumflag, rawtoknumflag): New variables.
22613
22614 * src/symtab.h (SALIAS):
22615 New #define for adding aliases to %token.
22616 (struct bucket): Added `alias' field.
22617
22618 * src/reduce.c (reduce_grammar):
22619 Revise error message.
22620 (print_notices): Remove final `.' from error message.
22621
22622 * src/reader.c (reader_output_yylsp):
22623 New function.
22624 (readgram): Use `#if 0' around code that accepted %command
22625 inside grammar rules: The documentation doesn't allow it,
22626 and it will fail since the %command processors scan for the next %.
22627 (parse_token_decl): Extended the %token
22628 declaration to allow a multi-character symbol as an alias.
22629 (parse_thong_decl): New function.
22630 (read_declarations): Added %thong declarations.
22631 (read_declarations): Handle NOOP to deal with allowing
22632 % declarations as another means to specify the flags.
22633 (readgram): Allow %prec prior to semantics embedded in a rule.
22634 (skip_to_char, read_declarations, copy_definition)
22635 (parse_token_decl, parse_start_decl, parse_type_decl)
22636 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22637 (get_type_name, copy_guard, copy_action, readgram)
22638 (get_type, packsymbols): Revised most error messages.
22639 Changed `fatal' to `warnxxx' to avoid aborting for error.
22640 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22641 (read_declarations): Improve the error message for
22642 an invalid character. Do not abort.
22643 (read_declarations, copy_guard, copy_action): Use
22644 printable_version to avoid unprintable characters in printed output.
22645 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22646 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22647 Allow the type of a non-terminal can be given
22648 more than once, as long as all specifications give the same type.
22649
22650 * src/output.c:
22651 (output_headers, output_trailers, output, output_gram)
22652 (output_rule_data): Implement noparserflag variable.
22653 Implement toknumflag variable.
22654 (output): Call reader_output_yylsp to output LTYPESTR.
22655
22656 * src/main.c (main):
22657 If reader sees an error, don't process the grammar.
22658 (fatals): Updated to not use VARARGS1.
22659 (printable_version, int_to_string, warn, warni, warns, warnss)
22660 (warnsss): New error reporting functions. Avoid abort for error.
22661
22662 * src/lex.h:
22663 Added THONG and NOOP for alias processing.
22664 Added SETOPT for the new code that allows setting options with %flags.
22665
22666 * src/lex.c:
22667 Include getopt.h. Add some extern decls.
22668 (safegetc): New function to deal with EOF gracefully.
22669 (literalchar); new function to deal with reading \ escapes.
22670 (lex): Use literalchar.
22671 (lex): Implemented "..." tokens.
22672 (literalchar, lex, parse_percent_token): Made tokenbuffer
22673 always contain the token. This includes growing the token
22674 buffer while reading an integer.
22675 (parse_percent_token): Replaced if-else statement with percent_table.
22676 (parse_percent_token): Added % declarations as another
22677 way to specify the flags -n, -l, and -r. Also added hooks for
22678 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22679 major changes to files.c.
22680 (lex) Retain in the incoming stream a character following
22681 an incorrect '/'.
22682 (skip_white_space, lex): Revised most error messages
22683 and changed fatal to warn to avoid aborting.
22684 (percent_table): Added %thong declarations.
22685
22686 * src/gram.h: Comment changes.
22687
22688 * src/files.c (openfiles, open_extra_files, done):
22689 Add faction flag
22690 and actfile file. Handle noparserflag. Both for -n switch.
22691
22692 * src/conflicts.c (resolve_sr_conflict):
22693 Remove use of alloca.
22694
226951995-06-01 Jim Meyering <meyering@gnu.org>
22696
22697 * doc/bison.texinfo: *** empty log message ***
22698
226991995-05-06 Richard Stallman <rms@gnu.org>
22700
22701 * src/bison.s1: Comment change.
22702
227031995-05-06 Richard Stallman <rms@gnu.org>
22704
22705 * bison.simple: Comment change.
22706
227071995-05-03 Richard Stallman <rms@gnu.org>
22708
22709 * src/version.c: Version now 1.24.
22710
22711 * src/bison.s1: Change distribution terms.
22712
22713 * src/version.c: Version now 1.23.
22714
227151995-05-03 Richard Stallman <rms@gnu.org>
22716
22717 * doc/bison.texinfo:
22718 Rewrite "Conditions for Using Bison".
22719 Update version to 1.24.
22720
227211995-05-03 Richard Stallman <rms@gnu.org>
22722
22723 * bison.simple: Change distribution terms.
22724
227251995-02-23 Richard Stallman <rms@gnu.org>
22726
22727 * src/files.c: Test __VMS_POSIX as well as VMS.
22728
227291995-02-14 Jim Meyering <meyering@gnu.org>
22730
22731 * src/bison.s1 (__yy_memcpy):
22732 Renamed from __yy_bcopy to avoid
22733 confusion. Reverse FROM and TO arguments to be consistent with
22734 those of memcpy.
22735
227361995-02-14 Jim Meyering <meyering@gnu.org>
22737
22738 * bison.simple (__yy_memcpy):
22739 Renamed from __yy_bcopy to avoid
22740 confusion. Reverse FROM and TO arguments to be consistent with
22741 those of memcpy.
22742
227431994-11-10 David J. MacKenzie <djm@gnu.org>
22744
22745 * NEWS: reformat
22746
22747 * NEWS: New file.
22748
22749 * Makefile.in (DISTFILES): Include NEWS.
22750
22751 * Makefile.in (DISTFILES):
22752 Include install-sh, not install.sh.
22753
22754 * configure.in: Update to Autoconf v2 macro names.
22755
227561994-10-05 David J. MacKenzie <djm@gnu.org>
22757
22758 * Makefile.in: fix typo
22759
22760 * Makefile.in (prefix, exec_prefix):
22761 Let configure set them.
22762
227631994-09-28 David J. MacKenzie <djm@gnu.org>
22764
22765 * Makefile.in: Set datadir to $(prefix)/share.
22766
227671994-09-15 Richard Stallman <rms@gnu.org>
22768
22769 * src/bison.s1:
22770 Update copyright notice and GPL version.
22771
227721994-09-15 Richard Stallman <rms@gnu.org>
22773
22774 * bison.simple:
22775 Update copyright notice and GPL version.
22776
227771994-07-12 Richard Stallman <rms@gnu.org>
22778
22779 * src/reduce.c, src/reader.c:
22780 entered into RCS
22781
227821994-05-05 David J. MacKenzie <djm@gnu.org>
22783
22784 * Makefile.in: entered into RCS
22785
227861994-03-26 Richard Stallman <rms@gnu.org>
22787
22788 * src/bison.s1: entered into RCS
22789
227901994-03-26 Richard Stallman <rms@gnu.org>
22791
22792 * bison.simple: entered into RCS
22793
227941994-03-25 Richard Stallman <rms@gnu.org>
22795
22796 * src/main.c: entered into RCS
22797
227981994-03-24 Richard Stallman <rms@gnu.org>
22799
22800 * src/conflicts.c: entered into RCS
22801
228021994-01-02 Richard Stallman <rms@gnu.org>
22803
22804 * Makefile.in: *** empty log message ***
22805
228061993-11-21 Richard Stallman <rms@gnu.org>
22807
22808 * src/bison.s1: *** empty log message ***
22809
228101993-11-21 Richard Stallman <rms@gnu.org>
22811
22812 * doc/bison.texinfo: entered into RCS
22813
22814 * doc/bison.texinfo: *** empty log message ***
22815
228161993-11-21 Richard Stallman <rms@gnu.org>
22817
22818 * bison.simple: *** empty log message ***
22819
228201993-10-25 David J. MacKenzie <djm@gnu.org>
22821
22822 * doc/bison.texinfo: *** empty log message ***
22823
228241993-10-19 Richard Stallman <rms@gnu.org>
22825
22826 * src/bison.s1: *** empty log message ***
22827
228281993-10-19 Richard Stallman <rms@gnu.org>
22829
22830 * bison.simple: *** empty log message ***
22831
228321993-10-14 Richard Stallman <rms@gnu.org>
22833
22834 * src/bison.s1: *** empty log message ***
22835
228361993-10-14 Richard Stallman <rms@gnu.org>
22837
22838 * bison.simple: *** empty log message ***
22839
228401993-09-14 David J. MacKenzie <djm@gnu.org>
22841
22842 * doc/bison.texinfo: *** empty log message ***
22843
228441993-09-13 Noah Friedman <friedman@gnu.org>
22845
22846 * Makefile.in: *** empty log message ***
22847
228481993-09-10 Richard Stallman <rms@gnu.org>
22849
22850 * src/conflicts.c: *** empty log message ***
22851
22852 * src/system.h: entered into RCS
22853
228541993-09-10 Richard Stallman <rms@gnu.org>
22855
22856 * doc/bison.1: entered into RCS
22857
228581993-09-06 Noah Friedman <friedman@gnu.org>
22859
22860 * src/version.c: entered into RCS
22861
228621993-09-06 Noah Friedman <friedman@gnu.org>
22863
22864 * Makefile.in: *** empty log message ***
22865
228661993-07-30 David J. MacKenzie <djm@gnu.org>
22867
22868 * Makefile.in: *** empty log message ***
22869
228701993-07-24 Richard Stallman <rms@gnu.org>
22871
22872 * src/bison.s1: *** empty log message ***
22873
228741993-07-24 Richard Stallman <rms@gnu.org>
22875
22876 * bison.simple: *** empty log message ***
22877
228781993-07-08 David J. MacKenzie <djm@gnu.org>
22879
22880 * Makefile.in: *** empty log message ***
22881
228821993-07-04 Richard Stallman <rms@gnu.org>
22883
22884 * src/bison.s1: *** empty log message ***
22885
228861993-07-04 Richard Stallman <rms@gnu.org>
22887
22888 * bison.simple: *** empty log message ***
22889
228901993-06-26 David J. MacKenzie <djm@gnu.org>
22891
22892 * src/getargs.c: entered into RCS
22893
228941993-06-26 David J. MacKenzie <djm@gnu.org>
22895
22896 * doc/bison.texinfo: *** empty log message ***
22897
22898 * doc/bison.1: New file.
22899
229001993-06-25 Richard Stallman <rms@gnu.org>
22901
22902 * src/getargs.c: New file.
22903
229041993-06-16 Richard Stallman <rms@gnu.org>
22905
22906 * src/bison.s1: *** empty log message ***
22907
229081993-06-16 Richard Stallman <rms@gnu.org>
22909
22910 * bison.simple: *** empty log message ***
22911
229121993-06-03 Richard Stallman <rms@gnu.org>
22913
22914 * src/bison.s1: New file.
22915
229161993-06-03 Richard Stallman <rms@gnu.org>
22917
22918 * doc/bison.texinfo: *** empty log message ***
22919
229201993-06-03 Richard Stallman <rms@gnu.org>
22921
22922 * bison.simple: New file.
22923
229241993-05-19 Richard Stallman <rms@gnu.org>
22925
22926 * doc/bison.texinfo: New file.
22927
229281993-05-07 Noah Friedman <friedman@gnu.org>
22929
22930 * Makefile.in: *** empty log message ***
22931
229321993-04-28 Noah Friedman <friedman@gnu.org>
22933
22934 * src/reader.c: *** empty log message ***
22935
229361993-04-23 Noah Friedman <friedman@gnu.org>
22937
22938 * src/alloc.h: entered into RCS
22939
229401993-04-20 David J. MacKenzie <djm@gnu.org>
22941
22942 * src/version.c: *** empty log message ***
22943
22944 * src/files.c, src/allocate.c:
22945 entered into RCS
22946
22947 * src/reader.c: *** empty log message ***
22948
22949 * src/lex.c: entered into RCS
22950
22951 * src/conflicts.c: New file.
22952
22953 * src/symtab.c: entered into RCS
22954
22955 * src/alloc.h: New file.
22956
22957 * src/LR0.c: entered into RCS
22958
229591993-04-18 Noah Friedman <friedman@gnu.org>
22960
22961 * src/reader.c: New file.
22962
22963 * src/version.c: *** empty log message ***
22964
229651993-04-18 Noah Friedman <friedman@gnu.org>
22966
22967 * Makefile.in: *** empty log message ***
22968
229691993-04-17 Noah Friedman <friedman@gnu.org>
22970
22971 * Makefile.in: *** empty log message ***
22972
229731993-04-15 Richard Stallman <rms@gnu.org>
22974
22975 * src/main.c, src/files.c:
22976 New file.
22977
229781993-04-15 Noah Friedman <friedman@gnu.org>
22979
22980 * configure.in: entered into RCS
22981
22982 * configure.in: *** empty log message ***
22983
22984 * configure.in: New file.
22985
229861993-04-14 Richard Stallman <rms@gnu.org>
22987
22988 * Makefile.in: New file.
22989
229901993-04-13 Richard Stallman <rms@gnu.org>
22991
22992 * src/version.c: New file.
22993
229941993-03-25 Richard Stallman <rms@gnu.org>
22995
22996 * src/output.c: entered into RCS
22997
229981992-09-25 Richard Stallman <rms@gnu.org>
22999
23000 * configure.bat: entered into RCS
23001
230021992-06-22 Richard Stallman <rms@gnu.org>
23003
23004 * src/vmsgetargs.c: entered into RCS
23005
230061992-06-22 Richard Stallman <rms@gnu.org>
23007
23008 * doc/bison.rnh: entered into RCS
23009
230101992-04-20 David J. MacKenzie <djm@gnu.org>
23011
23012 * README: entered into RCS
23013
230141992-01-22 Richard Stallman <rms@gnu.org>
23015
23016 * src/machine.h: entered into RCS
23017
230181991-12-21 Richard Stallman <rms@gnu.org>
23019
23020 * src/lalr.c, src/closure.c:
23021 entered into RCS
23022
230231991-12-20 Richard Stallman <rms@gnu.org>
23024
23025 * src/state.h: entered into RCS
23026
230271991-12-18 Richard Stallman <rms@gnu.org>
23028
23029 * src/print.c, src/nullable.c, src/derives.c:
23030 entered into RCS
23031
230321991-11-03 David J. MacKenzie <djm@gnu.org>
23033
23034 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23035 entered into RCS
23036
230371988-09-09 Richard Stallman <rms@gnu.org>
23038
23039 * src/bison.hairy: entered into RCS
23040
230411987-12-16 Richard Stallman <rms@gnu.org>
23042
23043 * REFERENCES: entered into RCS
dc546b0f 23044
f294a2c2 23045
04098407 23046 -----
f294a2c2 23047
04098407 23048 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
9126263e 23049 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
95021767 23050 Free Software Foundation, Inc.
f294a2c2 23051
04098407
PE
23052 Copying and distribution of this file, with or without
23053 modification, are permitted provided the copyright notice and this
23054 notice are preserved.