]> git.saurik.com Git - bison.git/blob - ChangeLog
For consistency, use `lookahead' instead of `look-ahead' or
[bison.git] / ChangeLog
1 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 For consistency, use `lookahead' instead of `look-ahead' or
4 `look_ahead'. Discussed starting at
5 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6 and then at
7 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8 * NEWS: For the next release, note the change to `--report'.
9 * TODO, doc/bison.1: Update English.
10 * doc/bison.texinfo: Update English.
11 (Understanding Your Parser, Bison Options): Document as
12 `--report=lookahead' rather than `--report=look-ahead'.
13 * src/conflicts.c: Update English in comments.
14 (lookahead_set): Rename from look_ahead_set.
15 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
16 (resolve_sr_conflict): Rename local look_ahead_tokens to
17 lookahead_tokens, and update other uses.
18 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
19 count_rr_conflicts, conflicts_free): Update uses.
20 * src/getargs.c (report_args): Move "lookahead" before alternate
21 spellings.
22 (report_types): Update uses.
23 (usage): For `--report' usage description, state `lookahead' spelling
24 rather than `look-ahead'.
25 * src/getargs.h (report.report_lookahead_tokens): Rename from
26 report_look_ahead_tokens.
27 * src/lalr.c: Update English in comments.
28 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
29 (state_lookahead_tokens_count): Rename from
30 state_look_ahead_tokens_count.
31 Rename local n_look_ahead_tokens to n_lookahead_tokens.
32 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
33 Rename local n_look_ahead_tokens to n_lookahead_tokens.
34 Update other uses.
35 Update English in output.
36 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
37 * src/print.c: Update English in comments.
38 (lookahead_set): Rename from look_ahead_set.
39 (print_reduction): Rename argument lookahead_token from
40 look_ahead_token.
41 (print_core, state_default_rule, print_reductions, print_results):
42 Update uses.
43 * src/print_graph.c: Update English in comments.
44 (print_core): Update uses.
45 * src/state.c: Update English in comments.
46 (reductions_new): Update uses.
47 (state_rule_lookahead_tokens_print): Rename from
48 state_rule_look_ahead_tokens_print, and update other uses.
49 * src/state.h: Update English in comments.
50 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
51 (state_rule_lookahead_tokens_print): Rename from
52 state_rule_look_ahead_tokens_print.
53 * src/tables.c: Update English in comments.
54 (conflict_row, action_row): Update uses.
55 * tests/glr-regression.at
56 (Incorrect lookahead during deterministic GLR,
57 Incorrect lookahead during nondeterministic GLR): Rename
58 print_look_ahead to print_lookahead.
59 * tests/torture.at: Update English in comments.
60 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
61 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
62 (Many lookahead tokens): Update uses.
63 * data/glr.c: Update English in comments.
64 * lalr1.cc: Likewise.
65 * yacc.c: Likewise.
66 * src/conflicts.h: Likewise.
67 * src/lalr.h: Likewise.
68 * src/main.c: Likewise.
69 * src/output.c: Likewise.
70 * src/parse-gram.c: Likewise.
71 * src/tables.h: Likewise.
72 * tests/calc.at: Likewise.
73
74 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
75
76 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
77
78 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
79
80 * TODO: Add request from Nelson H. F. Beebe to be able to install
81 Bison without installing the yacc script.
82
83 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
84
85 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
86 and yytext if they're already #define'd.
87 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
88 * src/scan-code-c.c: ... here.
89 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
90 <config.h>.
91
92 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
93
94 Get Bison to build again when configured with --enable-gcc-warnings.
95 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
96 missing #include's.
97 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
98 loc argument as it shadows a global.
99 * src/scan-gram.l: Remove stray comma that prevents boundary_set
100 invocation.
101
102 * src/.cvsignore: Add scan-code.c.
103
104 2006-06-07 Akim Demaille <akim@epita.fr>
105
106 * src/scan-gram.l: Move the "add a trailing ; to actions" code
107 to...
108 * src/scan-code.l: here.
109 * tests/input.at (Torturing the Scanner): Fix another location
110 error.
111
112 2006-06-07 Akim Demaille <akim@epita.fr>
113
114 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
115
116 2006-06-06 Akim Demaille <akim@epita.fr>
117
118 Extract the parsing of user actions from the grammar scanner.
119 As a consequence, the relation between the grammar scanner and
120 parser is much simpler. We can also split "composite tokens" back
121 into simple tokens.
122 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
123 * src/scan-gram.l (add_column_width, adjust_location): Move to and
124 rename as...
125 * src/location.h, src/location.c (add_column_width)
126 (location_compute): these.
127 Fix the column count: the initial column is 0.
128 (location_print): Be robust to ending column being 0.
129 * src/location.h (boundary_set): New.
130 * src/main.c: Adjust to scanner_free being renamed as
131 gram_scanner_free.
132 * src/output.c: Include scan-code.h.
133 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
134 Use boundary_set.
135 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
136 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
137 which is now, again, a separate token.
138 Adjust all dependencies.
139 Whereever actions with $ and @ are used, use translate_code.
140 (action): Remove this nonterminal which is now useless.
141 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
142 (grammar_current_rule_action_append): Use translate_code.
143 (packgram): Bound check ruleno, itemno, and rule_length.
144 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
145 (last_string, last_braced_code_loc, max_left_semantic_context)
146 (scanner_initialize, scanner_free, scanner_last_string_free)
147 (gram_out, gram_lineno, YY_DECL_): Move to...
148 * src/scan-gram.h: this new file.
149 (YY_DECL): Rename as...
150 (GRAM_DECL): this.
151 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
152 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
153 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
154 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
155 Move these declarations, and...
156 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
157 these to...
158 * src/flex-scanner.h: this new file.
159 * src/scan-gram.l (rule_length, rule_length_overflow)
160 (increment_rule_length): Remove.
161 (last_braced_code_loc): Rename as...
162 (gram_last_braced_code_loc): this.
163 Adjust to the changes of the parser.
164 Move all the handling of $ and @ into...
165 * src/scan-code.l: here.
166 * src/scan-gram.l (handle_dollar, handle_at): Remove.
167 (handle_action_dollar, handle_action_at): Move to...
168 * src/scan-code.l: here.
169 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
170 scan-code.h, scan-code-c.c, scan-gram.h.
171 (EXTRA_bison_SOURCES): Add scan-code.l.
172 (BUILT_SOURCES): Add scan-code.c.
173 (yacc): Be robust to white spaces.
174
175 * tests/conflicts.at, tests/input.at, tests/reduce.at,
176 * tests/regression.at: Adjust the column numbers.
177 * tests/regression.at: Adjust the error message.
178
179 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
180
181 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
182 Use Akim's wording from
183 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
184
185 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
186
187 Between Bison releases, manually append `+' to the previous Bison
188 release number, and use that as a signal to automatically print the
189 ChangeLog's CVS Id keyword from --version. Discussed starting at
190 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
191 * ChangeLog: Add Id header.
192 * configure.ac (AC_INIT): Append `+' to `2.3'.
193 * src/.cvsignore: Add revision.c.
194 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
195 (BUILT_SOURCES): Add revision.c.
196 (revision.c): New target rule. This file defines a new global variable
197 named revision. It initializes it with either the Id from ChangeLog
198 or, if VERSION doesn't contain `+', with the empty string.
199 * src/getargs.c (version): Print the value of revision.
200 * src/revision.h: Extern revision.
201
202 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
203
204 * NEWS: Version 2.3.
205 * configure.ac (AC_INIT): Likewise.
206
207 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
208
209 * data/glr.c (YYRECOVERING): Define to be a function-like macro
210 with no arguments, not as an object-like macro. This is for
211 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
212 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
213 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
214 Document this.
215
216 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
217
218 * src/getargs.c (usage): Back out yesterday's modification of the
219 --help output so that we don't have to wait for translation before
220 releasing 2.3.
221
222 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
223
224 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
225 Problem reported by Akim Demaille.
226
227 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
228
229 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
230
231 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
232
233 * data/yacc.c (yy_reduce_print): Omit trailing white space in
234 generated source code. Problem reported by Frans Englich in
235 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
236
237 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
238
239 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
240 shell, not within 'make', so that 'make' by an ordinary builder
241 (using GNU make) does not worry about configuring gzip. This also
242 works around a bug reported independently by Keith Thompson and by
243 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
244 stderr rather than stdout, messing up the build logs.
245
246 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
247
248 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
249 to make sure that YYID will never be unused. This fixes a 'make
250 maintainer-check' failure caused by the recent changes to the 'Trivial
251 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
252 not used.
253 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
254
255 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
256
257 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
258 state before an empty RHS is always resolved here. Only the location
259 of that state is guaranteed to be resolved, and that's enough. This
260 fixes the remaining bug reported by Derek M. Jones in
261 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
262 * tests/glr-regression.at (Uninitialized location when reporting
263 ambiguity): Test the above case.
264 Also, the embedded comments in this test case claim it checks the case
265 of an empty RHS that has inherited the initial location. However, the
266 corresponding LHS was already resolved, so yyresolveLocations didn't
267 actually have reason to modify it. Fix this by forcing
268 nondeterministic operation at the beginning of the parse.
269
270 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
271
272 * data/c.m4 (b4_yy_symbol_print_generate):
273 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
274 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
275 of the bugs reported today by Derek M Jones in
276 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
277 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
278 defined to be a type name without parens or brackets.
279 (Location Type): Similarly for YYLTYPE.
280 * tests/regression.at (Trivial grammars): Put in a test for this
281 bug that will be caught by 'make maintainer-check' (though not,
282 alas, by 'make check' unless your compiler is picky).
283
284 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
285
286 * NEWS: Version 2.2.
287 * configure.ac (AC_INIT): Likewise.
288
289 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
290
291 * data/glr.c (yyreportTree): Make room in yystates for the state
292 preceding the RHS. This fixes the segmentation fault reported by Derek
293 M. Jones in
294 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
295 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
296 to the user. Reported for yyreportTree by Derek M. Jones later in the
297 same thread.
298 * THANKS: Add Derek M. Jones.
299 Update my email address.
300 Fix typo in Steve Murphy's name.
301
302 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
303
304 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
305 checking against YYLAST that caused the parser to miss a potential
306 alternative in its diagnostic.
307 Problem reported by Maria Jose Moron Fernandez in
308 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
309 * data/lalr1.cc (yysyntax_error_): Likewise.
310 * data/yacc.c (yysyntax_error): Likewise.
311 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
312 tokens, in case we run into an older C compiler.
313 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
314 Use them to check for the off-by-one error fixed above.
315
316 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
317 YYSIZE_T, not size_t.
318 * tests/regression.at (Trivial grammars): New test, to catch
319 the error fixed by the above patch.
320
321 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
322
323 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
324 scheme.
325 Reported by Steve Murphy.
326
327 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
328
329 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
330 * data/glr.cc: b4_location_flag is now b4_locations_flag.
331
332 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
333
334 Implement --trace=m4.
335 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
336 * src/output.c (output_skeleton): When set, pass -dV to m4.
337
338 Factor the handling of flags in m4.
339 * src/output.c (prepare): Rename the muscle names debug, defines,
340 error_verbose to debug_flag, defines_flag, error_verbose_flag.
341 * data/c.m4: Adjust.
342 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
343 Use b4_define_flag_if to define other b4_FLAG_if macros.
344 (b4_location_if): As a consequence, rename as...
345 (b4_locations_if): this, for consistency.
346 Adjust all the skeletons.
347
348 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
349
350 * etc/bench.pm: Shorten bench names.
351
352 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
353
354 * src/output.h, src/output.c (error_verbose): Move to...
355 * src/getargs.h, src/getargs.c: here.
356 Sort the flags.
357 Adjust dependencies.
358
359 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
360
361 * data/c.m4 (b4_copyright): Put the special exception for Bison
362 skeletons here, so we don't have to put it in each skeleton. All
363 uses changed. Suggested by Akim Demaille. Also, wrap the
364 copyright notice, in case it is longer than 80 columns. Replace
365 comma by newline after title.
366
367 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
368
369 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
370 incompatibility, not a bug. Mention that it wasn't fixed as of
371 flex 2.5.33.
372
373 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
374
375 * examples/extexi: Enforce the precedence of concatenation over
376 >>.
377 Reported by Tommy Nordgren.
378
379 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
380
381 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
382 with the member "token".
383 Reported by Martin Nylin.
384
385 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
386
387 * data/glr.c: Switch to Bison 2.2 special-exception language in
388 the copyright notice. Use more-regular format for titles and
389 copyright notices.
390 * data/glr.cc: Likewise.
391 * data/location.cc: Likewise.
392 * data/yacc.cc: Likewise.
393 * doc/bison.texinfo (Conditions): Document this.
394 * NEWS: likewise. Upgrade version to 2.2.
395
396 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
397
398 * data/glr.cc: Remove dead code.
399
400 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
401
402 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
403 that variable and the line breaks the bootstrap. Problem reported
404 by Juan M. Guerrero.
405
406 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
407
408 * doc/bison.texinfo (Multiple start-symbols): New.
409
410 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
411
412 * etc/README, etc/bench.pl: New.
413
414 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
415
416 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
417 rule.
418 Reported by Mickael Labau.
419 * tests/input.at (Torturing the Scanner): Test it.
420
421 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
422
423 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
424 Problem reported by Bob Rossi.
425
426 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
427
428 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
429 and didn't really work.
430 For the index, use @ifnotinfo, not @iftex.
431 Minor cleanups of spacing and terminology.
432
433 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
434
435 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
436 of AT_NAME_PREFIX when %name-prefix is not used.
437
438 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
439
440 Apply --prefix to C++ skeletons too: they change the namespace.
441 The test suite already exercize these cases.
442 * data/c++.m4 (b4_namespace): New.
443 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
444 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
445 * data/yacc.c, data/glr.c: Remove a useless `[]'.
446 * doc/bison.texinfo: Document it.
447 (Option Cross Key): Use @multitable in all formats. It looks
448 nicer, even in TeX outputs.
449 (Rules): Use the same code whatever the output type is.
450 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
451 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
452 * tests/calc.at: Use it, instead of hard coding `yy'.
453
454 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
455
456 * TODO: Remove dead items.
457
458 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
459
460 * doc/FAQ: Remove, merged into...
461 * doc/bison.texinfo (FAQ): this.
462 * doc/Makefile.am (EXTRA_DIST): Adjust.
463
464 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
465
466 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
467 even if empty.
468 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
469 * doc/bison.texinfo (Calc++ Scanner): Use it.
470
471 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
472
473 Fix two nits reported by twlevo, plus one more that I discovered.
474
475 * src/assoc.h (assoc_to_string): Give a name to the arg, as
476 this is the usual Bison style.
477 * src/location.h (location_print): Likewise.
478
479 * src/reader.h (token_name): Likewise.
480
481 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
482
483 Fix some nits reported by twlevo.
484 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
485 and "POSIX". Use more-modern syntax for URLs. Mention C++
486 and ask for Java. Don't hardwire OS version numbers. Add
487 copyright notice.
488 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
489 * src/conflicts.c (solved_conflicts_obstack): Now static.
490
491 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
492
493 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
494 page. Say "you can use it" not "you may use it" as on the web page;
495 we're describing capabilities not granting permission.
496
497 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
498
499 * data/glr.c (yyresolveLocations): Rename local variables to avoid
500 shadowing warnings. Use usual patter for iterating through RHS.
501 * tests/glr-regression.at
502 (Uninitialized location when reporting ambiguity):
503 Modify yylex so that it uses its argument, rather than trying
504 to rely on ARGSUSED (which doesn't work for gcc with warnings).
505 const char -> char const.
506
507 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
508 Don't use tabs inside commands; it messes up 'ps'.
509 Problem reported by twlevo.
510
511 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
512
513 * tests/glr-regression.at (Uninitialized location when reporting
514 ambiguity): New test case.
515 * data/glr.c (yyresolveLocations): New function, which uses
516 YYLLOC_DEFAULT.
517 (yyresolveValue): Invoke yyresolveLocations before reporting an
518 ambiguity.
519 * doc/bison.texinfo (Default Action for Locations): Note
520 YYLLOC_DEFAULT's usage for ambiguity locations.
521 (GLR Semantic Actions): Cross-reference those notes.
522
523 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
524
525 * tests/glr-regression.at (Leaked semantic values when reporting
526 ambiguity): Remove unnecessary union and type declarations.
527 (Leaked lookahead after nondeterministic parse syntax error): New test
528 case.
529 * data/glr.c (yyparse): Check for zero stacks remaining before
530 attempting to shift the lookahead so that you don't lose it.
531
532 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
533
534 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
535 * tests/glr-regression.at (Leaked semantic values when reporting
536 ambiguity): New test case.
537 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
538 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
539 now unnecessary yystackp parameter.
540 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
541 destructors can be called.
542
543 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
544 in existing testcases.
545
546 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
547
548 Don't leak semantic values for parent RHS when a user action cuts the
549 parser, and clean up related code a bit.
550 * tests/glr-regression.at (Leaked merged semantic value if user action
551 cuts parse): Rename to...
552 (Leaked semantic values if user action cuts parse): ... this. Add check
553 for leaked parent RHS values.
554 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
555 between an unresolved state (non-empty chain of semantic options) and
556 an incomplete one (signaled by an empty chain).
557 (yyresolveStates): Document the interface. Move all manipulation of a
558 successfully or unsuccessfully resolved yyGLRState to...
559 (yyresolveValue): ... here so that yyresolveValue always leaves a
560 yyGLRState with consistent data and thus is easier to understand.
561 Remove the yyvalp and yylocp parameters since they are always just
562 taken from the yys parameter. When reporting a discarded merged value
563 in debugging output, note that it is incompletely merged. Document the
564 interface.
565 (yyresolveAction): If resolving any of the RHS states fails, destroy
566 them all rather than leaking them. Thus, as long as user actions are
567 written to clean up the RHS correctly, yyresolveAction always cleans up
568 the RHS of a semantic option. Document the interface.
569
570 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
571
572 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
573 led to a segmentation fault in GNU Pascal. Problem reported
574 by Waldek Hebisch.
575
576 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
577
578 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
579 mid-rule action inside a nonterminal symbol in order to declare a
580 destructor for its semantic value.
581
582 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
583
584 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
585 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
586 __cplusplus && ! defined _STDLIB_H && !
587 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
588 defined free))]: Include <stdlib.h> rather than rolling our own
589 declarations of malloc and free, to avoid problems with
590 incompatible declarations (using 'throw') C++'s stdlib.h. This
591 should fix Debian bug 340012
592 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
593 reported by Guillaume Melquiond.
594
595 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
596
597 * NEWS: Clarify symbols versus types in unused-value warnings.
598
599 * configure.ac (AC_INIT): Bump version number.
600
601 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
602
603 * NEWS: Version 2.1a.
604 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
605 since C99 requires this.
606
607 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
608
609 * m4/c-working.m4: New file.
610 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
611
612 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
613
614 * Makefile.maint: Merge from coreutils.
615
616 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
617
618 More portability fixes for problems summarized by Nelson H. F. Beebe.
619
620 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
621 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
622 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
623 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
624 messes up because C++ code is compiled in 32-bit mode but linked
625 in 64-bit mode.
626
627 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
628
629 More portability fixes for problems summarized by Nelson H. F. Beebe.
630
631 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
632 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
633
634 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
635 nodist_PROGRAMS, since we don't need to actually compile the
636 example if we're just doing a plain 'make'. This avoids bothering
637 the installer unnecessarily about problems due to weird C++
638 compilers.
639
640 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
641
642 More portability fixes for problems summarized by Nelson H. F. Beebe.
643
644 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
645 than #include "...", and compile with -I'.'. The old method was
646 not portable, according to Posix and the C standard, and it does
647 not work with Sun C 5.7, where previous #line directives affect
648 the working directory used in later #include "..." directives.
649
650 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
651
652 Various DJGGP specific issues in /djgpp
653
654 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
655
656 More portability fixes for problems summarized by Nelson H. F. Beebe.
657
658 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
659 '#include <map>' works and that you can apply ++ to iterators.
660
661 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
662
663 Work around portability problems summarized by Nelson H. F. Beebe in
664 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
665
666 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
667 that '#include <string>' works.
668
669 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
670 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
671 "warning: sorry: semantics of inline function static data `const
672 unsigned char translate_table[262]' are wrong (you'll wind up with
673 multiple copies)".
674
675 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
676 or, xor to not_, and_, or_, and xor_, respectively. This works
677 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
678 random system header somewhere that includes the equivalent of
679 <iso646.h>.
680
681 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
682 -E" works; it apparently doesn't work with PathScale EKO Compiler
683 Suite Version 2.0.
684
685 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
686
687 During deterministic GLR operation, user actions should be able to
688 influence the parse by changing yychar. To make this easier to fix and
689 to make glr.c easier to evolve in general, don't maintain yytoken in
690 parallel with yychar; just compute yytoken when needed.
691 * tests/glr-regression.at (Incorrect lookahead during deterministic
692 GLR): Check that setting yychar in a user action has the intended
693 effect.
694 * data/glr.c (yyGLRStack): Remove yytokenp member.
695 (yyclearin): Don't set *yytokenp.
696 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
697 yychar rather than *yytokenp to determine the current lookahead.
698 Compute yytoken locally when needed.
699 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
700 point to.
701
702 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
703 after `--report' documentation.
704
705 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
706
707 * src/parse-gram.y (grammar_declaration): Location of printer
708 symbol is @1, not list->location. Bug reported by twlevo.
709 * tests/input.at (Incompatible Aliases): Adjust to above change.
710
711 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
712
713 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
714 all the test at once. This makes the output easier to read in the
715 normal case.
716
717 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
718 got from <http://bro-ids.org/download.html>. The bug is that
719 when two actions appeared in succession, the second one was
720 scanned before the first one was added to the grammar rule
721 as a midrule action. Bison then output the incorrect warning
722 "parse.y:905.17-906.36: warning: unused value: $3".
723 * src/parse-gram.y (BRACED_CODE, action): These are no longer
724 associated with a value.
725 (rhs): Don't invoke grammar_current_rule_action_append.
726 (action): Invoke it here instead.
727 * src/reader.c (grammar_midrule_action): Now extern.
728 (grammar_current_rule_action_append): Don't invoke
729 grammar_midrule_action; that is now the scanner's job.
730 * src/reader.h (last_string, last_braced_code_loc):
731 (grammar_midrule_action): New decls.
732 * src/scan-gram.l (last_string): Now extern, sigh.
733 (last_braced_code_loc): New extern variable.
734 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
735 rule already has an action.
736 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
737 * tests/input.at (AT_CHECK_UNUSED_VALUES):
738 Add some tests to check that the above changes fixed the bug.
739
740 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
741
742 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
743 All used changed. Check whether the symbol has a destructor,
744 not whether it is typed.
745 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
746 that the values are still reported as unused. All line numbers
747 adjusted.
748
749 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
750
751 Work around a bug in bro 0.8, which underparenthesizes its
752 definition of YYLLOC_DEFAULT.
753 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
754 their arguments.
755 * data/lalr1.cc: Likewise.
756 * data/yacc.cc: Likewise.
757
758 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
759
760 Work around a bug in Pike 7.0, and give the Pike folks a
761 better way to override the usual int widths.
762 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
763 user can override the types.
764 (short): #undef, to work around a bug in Pike 7.0.
765 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
766 (union yyalloc.yyss): Use yytype_int16 rather than short.
767 All uses changed.
768 (yysigned_char): Remove.
769 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
770 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
771 * tests/regression.at (Web2c Actions): Adjust to above changes.
772
773 * src/reader.c (check_and_convert_grammar): New function.
774 (reader): Close the input file even if something went wrong during
775 parsing. Minor file descriptor leak reported by twlevo.
776
777 * src/assoc.c (assoc_to_string): Use a default: abort (); case
778 to pacify gcc -Wswitch-default.
779 * src/scan-gram.l (adjust_location): Use a default: break; case
780 to pacify gcc -Wswitch-default.
781 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
782 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
783 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
784 Move these decls to scan-skel.l, since they don't need to be
785 visible elsewhere.
786 * src/scan-skel.l: Accept the above decls.
787 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
788 is used.
789
790 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
791
792 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
793 since we don't want to insist on a version number at the start
794 of the changelog every time.
795 * Makefile.maint: Sync from coreutils a bit better.
796 (sc_trailing_blank): Renamed from sc_trailing_space.
797 All uses changed.
798 (sc_no_if_have_config_h, sc_require_config_h):
799 (sc_prohibit_assert_without_use): New rules.
800 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
801 (sc_dd_max_sym_length): Fix leading spaces in rule.
802 (sc_system_h_headers): Prefix with @.
803 (sc_useless_cpp_parens, m4-check): Output line numbers.
804 (changelog-check): Allow version only in head.
805 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
806 satisfy new Makefile.maint rule.
807 * data/glr.c: Likewise.
808 * data/glr.cc: Likewise.
809 * data/lalr1.cc: Likewise.
810 * data/yacc.c: Likewise.
811 * lib/ebitsetv.c: Likewise.
812 * lib/lbitset.c: Likewise.
813 * lib/subpipe.c: Likewise.
814 * lib/timevar.c: Likewise.
815 * src/system.h: Likewise.
816 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
817 * djgpp/Makefile.maint: Add copyright notice.
818 * djgpp/README.in: Likewise.
819 * djgpp/config.bat: Likewise.
820 * djgpp/config.site: Likewise.
821 * djgpp/config_h.sed: Likewise.
822 * djgpp/djunpack.bat: Likewise.
823 * djgpp/config.sed: Fix copyright notice to match standard format.
824 * djgpp/subpipe.h: Likewise.
825 * lib/bitsetv-print.c: Likewise.
826 * lib/bitsetv.c: Likewise.
827 * lib/subpipe.h: Likewise.
828 * lib/timevar.c: Likewise.
829 * lib/timevar.h: Likewise.
830 * djgpp/subpipe.c: Use standard recipe for config.h.
831 * lib/abitset.c: Likewise.
832 * lib/bitset.c: Likewise.
833 * lib/bitset_stats.c: Likewise.
834 * lib/bitsetv-print.c: Likewise.
835 * lib/bitsetv.c: Likewise.
836 * lib/ebitsetv.c: Likewise.
837 * lib/get-errno.c: Likewise.
838 * lib/lbitset.c: Likewise.
839 * lib/subpipe.c: Likewise.
840 * lib/timevar.c: Likewise.
841 * lib/vbitset.c: Likewise.
842 * tests/local.at: Likewise.
843 * src/scan-gram.l: Don't include verify.h, since system.h does
844 that for us.
845 * .x-sc_require_config_h: New file.
846 * .x-sc_unmarked_diagnostics: New file.
847
848 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
849
850 Be a bit more systematic about using 'abort'.
851 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
852 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
853 Put 'default: abort ();' before some other case, to satisfy older
854 pedantic compilers.
855 * lib/bitset_stats.c (bitset_stats_init): Likewise.
856 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
857 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
858 * src/conflicts.c (resolve_sr_conflict): Likewise.
859 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
860 (get_decision_str, get_orientation_str, get_node_alignment_str):
861 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
862 (get_linestyle_str, get_arrowstyle_str): Likewise.
863 * src/conflicts.c (resolve_sr_conflict):
864 Use a default case rather than one for the one remaining enum
865 value, to catch invalid enum values as well.
866 * src/lalr.c (set_goto_map, map_goto):
867 Prefer "assert (FOO);" to "if (!FOO) abort ();".
868 * src/nullable.c (nullable_compute, token_definitions_output):
869 Likewise.
870 * src/reader.c (packgram, reader): Likewise.
871 * src/state.c (transitions_to, state_new, state_reduction_find):
872 Likewise.
873 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
874 (symbol_pack): Likewise.
875 * src/tables.c (conflict_row, pack_vector): Likewise.
876 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
877 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
878 * src/system.h: Don't include <assert.h>.
879 (assert): New macro.
880
881 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
882 (Destructor Decl, Parser Function, Pure Calling):
883 Describe rules for braces inside C code more carefully.
884
885 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
886
887 Fix some porting glitches found by Nelson H. F. Beebe.
888 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
889 compilers that don't understand that abort () does not return.
890 * src/state.c (transitions_to): Likewise.
891 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
892 that '#include <cstdlib>' works.
893 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
894 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
895 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
896 for the benefit of some pre-C99 compilers.
897
898 * bootstrap: Undo changes to gnulib files that autoreconf made.
899
900 Minor fixups to get 'make maintainer-check' to work.
901 * configure.ac: Don't use -Wnested-externs, as it's incompatible
902 with the new verify.h implementation.
903 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
904 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
905 * data/yacc.c (YYUSE): Likewise.
906 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
907 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
908 * src/parse-gram.y (declaration): Don't pass a string constant
909 to a function that expects char *, since GCC might complain
910 about the constant value.
911 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
912 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
913 before #defining them.
914 * tests/glr-regression.at
915 (Incorrectly initialized location for empty right-hand side in GLR):
916 In yyerror, use the msg arg.
917 (Corrupted semantic options if user action cuts parse):
918 (Incorrect lookahead during deterministic GLR):
919 (Incorrect lookahead during nondeterministic GLR):
920 Don't name a local var 'index'; it shadows string.h's 'index'.
921
922 2006-01-19 Akim Demaille <akim@epita.fr>
923
924 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
925 location, not just parts of it.
926
927 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
928
929 * NEWS: Document the fact that multiple %unions are now allowed.
930 * doc/bison.texinfo (Union Decl): Likewise.
931 * TODO: This feature is now implemented, so remove it from
932 the wishlist.
933
934 * Makefile.maint: Merge with coreutils Makefile.maint.
935 (CVS_LIST): Use build-aux version if available.
936 (VERSION_REGEXP): New macro.
937 (syntax-check-rules): Add sc_no_if_have_config_h,
938 sc_prohibit_assert_without_use, sc_require_config_h,
939 sc_useless_cpp_parens.
940 (sc_obsolete_symbols): Check for O_NDELAY.
941 (sc_dd_max_sym_length): Track coreutils.
942 (sc_unmarked_diagnostics): Look in all files, not just *.c.
943 (sc_useless_cpp_parens): New rule.
944 (news-date-check): Look for version or today's date.
945 (changelog-check): Don't require version number near head.
946 (copyright-check): Use current year instead of hardwiring 2005.
947 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
948 (announcement): Add --gpg-key-ID.
949
950 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
951 with "file system".
952
953 Avoid undefined behavior that addressed just before the start of an
954 array. Problem reported by twlevo.
955 * src/reader.c (packgram): Prepend a new sentinel before ritem.
956 * src/lalr.c (build_relations): Rely on new sentinel.
957 * src/gram.c (gram_free): Adjust to new sentinel.
958
959 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
960
961 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
962 yylookaheadNeeds. All uses updated.
963 (yysplitStack): Rename local yynewLookaheadStatuses to
964 yynewLookaheadNeeds.
965 * data/glr-regression.at (Incorrect lookahead during nondeterministic
966 GLR): In comments, change `lookahead status' to `lookahead need'.
967
968 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
969
970 * data/glr.c (yysplitStack): A little stylistic rewrite.
971
972 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
973
974 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
975
976 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
977
978 * doc/bison.texinfo: Fix some typos.
979 (GLR Semantic Actions): New subsection discussing special
980 considerations because GLR semantic actions might be deferred.
981 (Actions): Mention look-ahead usage of yylval.
982 (Actions and Locations): Mention look-ahead usage of yylloc.
983 (Special Features for Use in Actions): Add YYEOF entry and mention it
984 in the yychar entry.
985 In the yychar entry, remove mention of the local yychar case (pure
986 parser) since this is irrelevant information when writing semantic
987 actions and since it's already discussed in `Bison Symbols' where
988 yychar is otherwise described as an external variable.
989 In the yychar entry, don't call it the `current' look-ahead since it
990 isn't when semantic actions are deferred.
991 In the yychar and yyclearin entries, add note about deferred semantic
992 actions.
993 Add yylloc and yylval entries discussing look-ahead usage.
994 (Look-Ahead Tokens): When discussing yychar, don't call it the
995 `current' look-ahead, and do mention yylval and yylloc.
996 (Error Recovery): Cross-reference `Action Features' when mentioning
997 yyclearin.
998 (Bison Symbols): In the yychar entry, don't call it the `current'
999 look-ahead.
1000 In the yylloc and yylval entries, mention look-ahead usage.
1001
1002 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1003
1004 * tests/glr-regression.at: Update copyright year to 2006.
1005
1006 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1007
1008 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1009 use during nondeterministic operation to track which stacks have
1010 actually needed the current lookahead.
1011 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1012 Allocate, deallocate, resize, and otherwise shuffle space for
1013 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1014 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1015 appropriately during nondeterministic operation.
1016 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1017 members to store the current lookahead to be used by the deferred
1018 user action.
1019 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1020 from which the RHS is taken. Set the lookahead members of the new
1021 yySemanticOption according to the lookahead status for stack yyk.
1022 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1023 yyaddDeferredAction.
1024 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1025 members of yySemanticOption before invoking yyuserAction, and then set
1026 them back to their current values afterward.
1027 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1028 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1029 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1030 titles for consistency.
1031 (Leaked merged semantic value if user action cuts parse): In order to
1032 suppress lint warnings, use arguments in merge function, and assign
1033 char value < 128 in main.
1034 (Incorrect lookahead during deterministic GLR): New test case.
1035 (Incorrect lookahead during nondeterministic GLR): New test case.
1036
1037 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1038
1039 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
1040 !yyvaluep as signal that no semantic value is available to print.
1041 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1042 to print a semantic value.
1043
1044 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1045
1046 * tests/glr-regression.at: For consistency with my newer test cases,
1047 don't thank myself.
1048
1049 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1050
1051 * data/glr.c (yyresolveValue): When merging semantic options, if at
1052 least one user action succeeds but a later one cuts the parse, then
1053 destroy the semantic value before returning rather than leaking it.
1054 (yyresolveStates): If a user action cuts the parse and thus
1055 yyresolveValue fails, ignore the (unset) semantic value rather than
1056 corrupting the yyGLRState, and empty the semantic options list since
1057 the user actions should have called all necessary destructors.
1058 Simplify code with YYCHK.
1059 * tests/glr-regression.at (Corrupted semantic options if user action
1060 cuts parse): New test case.
1061 (Undesirable destructors if user action cuts parse): New test case.
1062 Before applying any of this patch, this test case never actually failed
1063 for me... but only because the corrupted semantic options usually
1064 masked this bug.
1065 (Leaked merged semantic value if user action cuts parse): New test
1066 case.
1067
1068 2006-01-05 Akim Demaille <akim@epita.fr>
1069
1070 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
1071
1072 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
1073
1074 * data/c.m4 (b4_c_modern): New macro, with a new provision for
1075 _MSC_VER. Problem reported by Cenzato Marco.
1076 (b4_c_function_def): Use it.
1077 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
1078 b4_c_modern.
1079 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
1080 than rolling our own.
1081
1082 2006-01-04 Akim Demaille <akim@epita.fr>
1083
1084 Also warn about non-used mid-rule values.
1085 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
1086 member.
1087 (symbol_list_new): Adjust.
1088 * src/reader.c (symbol_typed_p): New.
1089 (grammar_rule_check): Use it.
1090 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
1091 Check its rule.
1092 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
1093 Use it.
1094 * tests/actions.at (Exotic Dollars): Adjust.
1095
1096 2006-01-04 Akim Demaille <akim@epita.fr>
1097
1098 * src/reader.c (grammar_midrule_action): If $$ is set in a
1099 mid-rule, move the `used' bit to its lhs.
1100 * tests/input.at (Unused values): New.
1101 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
1102
1103 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
1104
1105 * doc/bison.texinfo (Bison Options): Say more accurately what
1106 --yacc does.
1107 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
1108 about declarations in the grammar when in Yacc mode, as POSIX does
1109 not require a diagnostic when the grammar uses extensions.
1110
1111 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
1112
1113 Warn about dubious constructions like "%token T T".
1114 Reported by twlevo.
1115 * src/symtab.h (struct symbol.declared): New member.
1116 * src/symtab.c (symbol_new): Initialize it to false.
1117 (symbol_class_set): New arg DECLARING, specifying whether
1118 this is a declaration that we want to warn about, if there
1119 is more than one of them. All uses changed.
1120
1121 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
1122 Allow multiple %union directives, whose contents concatenate.
1123 * src/parse-gram.y (grammar_declaration): Likewise.
1124 Use muscle_code_grow, so that we don't need stype_line any more.
1125 All uses changed.
1126
1127 * src/muscle_tab.c (muscle_grow): Fix comment.
1128
1129 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
1130 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
1131 Update copyright year to 2006.
1132
1133 2006-01-03 Akim Demaille <akim@epita.fr>
1134
1135 Have glr.cc pass (some of) the calc.at tests.
1136 * data/glr.cc (b4_parse_param_orig): New.
1137 (b4_parse_param): Improve its definition, and bound it more
1138 clearly in the skeleton.
1139 (b4_epilogue): Append, instead of prepending, in order to keep
1140 #line consistency.
1141 Simplify the generation of auxiliary functions: locations and
1142 purity are mandated.
1143 (b4_global_tokens_and_yystype): Honor it.
1144 * data/location.cc (c++.m4): Don't include it.
1145 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
1146 and AT_SKEL_CC_IF.
1147 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
1148 AT_LALR1_CC_IF.
1149 Be sure to initialize the first position's filename.
1150 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
1151 mandated anyway.
1152 (AT_CHECK_CALC_GLR_CC): New.
1153 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
1154
1155 2006-01-02 Akim Demaille <akim@epita.fr>
1156
1157 * src/output.c (output_skeleton): Don't hard wire the inclusion of
1158 c.m4.
1159 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
1160 * data/glr.cc: Do not include stack.hh.
1161
1162 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1163
1164 * data/glr.c: Reformat whitespace with tabs.
1165 (b4_lpure_formals): Remove this unused m4 macro.
1166 * tests/cxx-type.at: Reformat whitespace with tabs.
1167 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
1168 since it's a member. Rename type to isNterm for clarity.
1169
1170 2005-12-29 Akim <akim@sulaco.local>
1171
1172 Let glr.cc catch up with symbol_value_print.
1173 * data/glr.cc (b4_yysymprint_generate): Replace by...
1174 (b4_yy_symbol_print_generate): this.
1175 (yy_symbol_print, yy_symbol_value_print): Declare them.
1176
1177 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
1178
1179 * src/location.h (boundary): Note that a line or column equal
1180 to INT_MAX indicates an overflow.
1181 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
1182 (rule_length_overflow, increment_rule_length, add_column_width):
1183 New functions.
1184 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
1185 (<SC_BRACED_CODE>"}"):
1186 Use increment_rule_length rather than incrementing it by hand.
1187 (adjust_location, handle_syncline): Diagnose overflow.
1188 (handle_action_dollar, handle_action_at):
1189 Fix bug with monstrosities like $-2147483648.
1190 Remove now-unnecessary checks.
1191 (scan_integer): Verify assumptions and remove now-unnecessary checks.
1192 (convert_ucn_to_byte): Verify assumptions.
1193 (handle_syncline): New arg LOC. All callers changed.
1194 Don't store through a value derived from char const * pointer.
1195
1196 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
1197 GCC warnings.
1198
1199 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
1200
1201 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
1202 Remove unnecessary forward static decls.
1203
1204 2005-12-27 Akim Demaille <akim@epita.fr>
1205
1206 * src/reader.c (grammar_current_rule_check): Also check that $$
1207 is used.
1208 Take the rule to check as argument, hence rename as...
1209 (grammar_rule_check): this.
1210 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
1211 Rename as...
1212 (grammar_rule_begin, grammar_rule_end): these, for consistency.
1213 (grammar_midrule_action, grammar_symbol_append): Now static.
1214 * tests/torture.at (input): Don't rely on the default action
1215 being always performed.
1216 * tests/calc.at: "Set" $$ even when the action is "cut" with
1217 YYERROR or other.
1218 * tests/actions.at (Exotic Dollars): Instead of using unused
1219 values, check that the warning is issued.
1220
1221 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
1222
1223 * NEWS: Improve wording for unused-value warnings.
1224
1225 2005-12-22 Akim Demaille <akim@epita.fr>
1226
1227 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
1228 (b4_yysymprint_generate): Rename as...
1229 (b4_yy_symbol_print_generate): this.
1230 Generate yy_symbol_print instead of yysymprint.
1231 Generate also yy_symbol_value_print, and use it.
1232
1233 2005-12-22 Akim Demaille <akim@epita.fr>
1234
1235 * NEWS: Warn about unused values.
1236 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1237 a `used' member.
1238 (symbol_list_n_get, symbol_list_n_used_set): New.
1239 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1240 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1241 * src/reader.c (grammar_current_rule_check): Check that values are
1242 used.
1243 * src/symtab.c (symbol_print): Accept 0.
1244 * tests/existing.at: Remove the type information.
1245 Empty the actions.
1246 Remove useless actions (beware of mid-rule actions: perl -000
1247 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1248 * tests/actions.at (Exotic Dollars): Use unused values.
1249 * tests/calc.at: Likewise.
1250 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1251 Likewise.
1252
1253 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1254 rule_useful_p.
1255
1256 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1257
1258 Undo 2005-12-01 tentative license wording change. The wording is
1259 still being reviewed by the lawyers, and we don't want to wait for
1260 them before publishing a test release. For now, revert to the
1261 previous wording.
1262 * NEWS: Undo 2005-12-01 change.
1263 * data/glr.c: Revert to previous license wording.
1264 * data/glr.cc: Likewise.
1265 * data/lalr1.cc: Likewise.
1266 * data/location.cc: Likewise.
1267 * data/yacc.c: Likewise.
1268
1269 * NEWS: Reword %destructor vs YYABORT etc.
1270 * data/glr.c: Use American spacing, for consistency.
1271 * data/glr.cc: Likewise.
1272 * data/lalr1.cc: Likewise.
1273 * data/yacc.c: Likewise.
1274 * data/yacc.c: Reformat comments slightly.
1275 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1276 for consistency. Fix some spelling errors and reword recently-included
1277 text slightly.
1278 * tests/cxx-type.at: Cast results of malloc, for C++.
1279
1280 2005-12-21 Joel E. Denny <address@hidden>
1281
1282 * tests/cxx-type.at: Construct a tree, count the parents of shared
1283 nodes, and free each node once and only once. Previously, the memory
1284 for semantic values was leaked instead.
1285
1286 2005-12-21 Joel E. Denny <address@hidden>
1287
1288 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
1289 (yylval, yylloc): If pure, #define to yystackp->yyval and
1290 yystackp->yyloc similar to yychar and yynerrs.
1291 (yyparse): If pure, remove local yylval and yylloc. Add local
1292 yystackp to accommodate pure definitions of yylval and yylloc.
1293 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
1294 yylvalp and yyllocp to &yylval and &yylloc.
1295 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
1296 namespace. Previously, nerrs and char were missing, but lval and lloc
1297 weren't necessary.
1298 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
1299 yylvalp and yyllocp parameters since, if pure, these are now always
1300 accessible through yystackp. If not pure, they are still accessible
1301 globally.
1302 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
1303 `if (YYID (N))' to pacify lint.
1304
1305 2005-12-21 Akim Demaille <akim@epita.fr>
1306
1307 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
1308 destroy the RHS symbols of a rule.
1309 * data/yacc.c (yylen): Initialize to 0.
1310 Keep its value to the number of items to possibly shift.
1311 In particular, a regular successful parse that ends on YYFINAL by
1312 a (internal) YYACCEPT must not have yylen != 0.
1313 (yyerrorlab, yyreturn): Pop the RHS.
1314 Reorder a bit to emphasize the `shifting' bits of code.
1315 (YYPOPSTACK): Now accept a number of items to pop.
1316 * data/lalr1.cc: Likewise.
1317 * data/glr.c: Formatting changes.
1318 Use goto instead of fall through.
1319 * doc/bison.texinfo (Destructor Decl): Complete.
1320
1321 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1322
1323 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1324 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
1325 * djgpp/config.bat: Replace every occurence of the file name
1326 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1327 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1328 * djgpp/config.sed: Replace every occurence of the file name
1329 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1330 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1331 * djgpp/djunpack.bat: DJGPP specific file.
1332 * djgpp/fnchange.lst: DJGPP specific file.
1333 * djgpp/README.in: Add new information about how to unpack the bison
1334 source on MSDOS and other systems which have 8.3 file name restrictions
1335 using djunpack.bat and fnchange.lst.
1336
1337 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
1338
1339 * bootstrap (build_cvs_prefix): Remove; unused.
1340 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
1341 when getting gnulib.
1342
1343 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
1344
1345 * data/glr.c: Reorder typedef declarations for structs to match order
1346 of struct declarations.
1347 Rename yystack everywhere to yystackp except in yyparse where it's not
1348 a pointer.
1349 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
1350 consistency.
1351 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
1352 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
1353 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
1354 lint.
1355
1356 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
1357
1358 * tests/sets.at (Accept): Fix typos in regular expression used to
1359 sed out the final state number.
1360
1361 Work around portability problem on Solaris 10: flex-generated
1362 files include <stdio.h> before <config.h>, which messes up
1363 because the latter defines __EXTENSIONS__. Address the problem
1364 by creating two new little files that include <config.h> first,
1365 then include the flex-generated files. Rewrite everyone else
1366 to include <config.h> first, as well.
1367 * lib/timevar.c: Always include "config.h".
1368 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
1369 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
1370 (EXTRA_bison_SOURCES): New macro.
1371 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
1372 * src/system.h: Don't include config.h.
1373 * src/LR0.c: Include <config.h> first.
1374 * src/assoc.c: Likewise.
1375 * src/closure.c: Likewise.
1376 * src/complain.c: Likewise.
1377 * src/conflicts.c: Likewise.
1378 * src/derives.c: Likewise.
1379 * src/files.c: Likewise.
1380 * src/getargs.c: Likewise.
1381 * src/gram.c: Likewise.
1382 * src/lalr.c: Likewise.
1383 * src/location.c: Likewise.
1384 * src/main.c: Likewise.
1385 * src/muscle_tab.c: Likewise.
1386 * src/nullable.c: Likewise.
1387 * src/output.c: Likewise.
1388 * src/parse-gram.y: Likewise.
1389 * src/print.c: Likewise.
1390 * src/print_graph.c: Likewise.
1391 * src/reader.c: Likewise.
1392 * src/reduce.c: Likewise.
1393 * src/relation.c: Likewise.
1394 * src/state.c: Likewise.
1395 * src/symlist.c: Likewise.
1396 * src/symtab.c: Likewise.
1397 * src/tables.c: Likewise.
1398 * src/uniqstr.c: Likewise.
1399 * src/vcg.c: Likewise.
1400
1401 * src/parse-gram.y: Fix minor problems uncovered by lint.
1402 (current_lhs, current_lhs_location): Now static.
1403 (current_assoc): Remove unused variable.
1404
1405 Cleanups so that Bison-generated parsers have less lint.
1406 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
1407 Prepend /*ARGSUSED*/, for lint's sake.
1408 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
1409 definition if 'lint' is defined.
1410 (YYID): New macro (or function, if lint).
1411 All uses of /*CONSTCOND*/0 replaced by YYID(0).
1412 * data/yacc.c: Likewise.
1413 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
1414 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
1415 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
1416 is C++ only.
1417 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
1418 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
1419 Use YYID(0) rather than 0, for lint.
1420 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
1421 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
1422
1423 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
1424
1425 * tests/glr-regression.at
1426 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1427 Close memory leak reported by twlevo.
1428
1429 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
1430
1431 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
1432 all stacks.
1433 (yyparse): Iterate another stack in order to call user destructors.
1434 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1435 New test case.
1436 (Duplicated user destructor for lookahead): This test now is expected
1437 to succeed.
1438
1439 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
1440
1441 * NEWS: Document the following change.
1442 * data/yacc.c: Say "parser skeleton" rather than "file", since
1443 it's no longer just a file.
1444 * data/glr.c: Grant a special exception for C GLR parsers, that
1445 reads like the already-existing exception for C LALR(1) parsers.
1446 * data/glr.cc: Likewise.
1447 * data/lalr1.cc: Likewise.
1448 * data/location.cc: Likewise.
1449 * data/yacc.c: Reword the "written by" statement to clarify that
1450 it was the parser skeleton, not the entire output file.
1451 * data/glr.c: Written by Paul Hilfinger.
1452 * data/glr.cc: Written by Akim Demaille.
1453 * data/lalr1.cc: Likewise.
1454
1455 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
1456
1457 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
1458 Fix typos in previous change that broke 'make check'.
1459 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
1460 supported in C.
1461 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
1462 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
1463 We can revert this once things settle down.
1464
1465 * src/conflicts.c (conflicts_print): Don't print file name twice
1466 when %expect fails because there were no conflicts.
1467 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
1468 change.
1469 * tests/conflicts.at (%expect not enough, %expect too much):
1470 (%expect with reduce conflicts): Adjust to new behavior.
1471
1472 2005-11-18 Akim Demaille <akim@epita.fr>
1473
1474 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
1475 errors.
1476 * NEWS: Document this.
1477 * doc/bison.texinfo (Expect Decl): Likewise.
1478
1479 2005-11-16 Akim Demaille <akim@epita.fr>
1480
1481 Generalize the display of semantic values and locations in traces.
1482 * data/glr.c (yy_reduce_print): Fix indices (again).
1483 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
1484 literal integers.
1485 * data/lalr1.cc (yyreduce_print): Rename as...
1486 (yy_reduce_print): this.
1487 Display values and locations.
1488 * data/yacc.c (yy_reduce_print): Likewise.
1489 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
1490 (yysymprint): Move higher to be visible from yy_reduce_print).
1491 (yyparse): Adjust.
1492 * tests/calc.at: Adjust the expected length of the traces.
1493
1494 2005-11-14 Akim Demaille <akim@epita.fr>
1495
1496 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
1497 from 1 to N, while values and location start at 0.
1498 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
1499
1500 2005-11-14 Akim Demaille <akim@epita.fr>
1501
1502 * data/glr.c (yy_reduce_print): Fix the $ number.
1503
1504 2005-11-14 Akim Demaille <akim@epita.fr>
1505
1506 "Use" parse parameters.
1507 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
1508 * data/glr.c, data/glr.cc: Use them.
1509 * data/glr.c (YYUSE): Have a C++ definition that supports
1510 non-pointer types.
1511
1512 2005-11-14 Akim Demaille <akim@epita.fr>
1513
1514 * data/glr.c (yyexpandGLRStack): Declare only if defined.
1515
1516 2005-11-14 Akim Demaille <akim@epita.fr>
1517
1518 * data/glr.cc: New.
1519 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
1520
1521 2005-11-12 Akim Demaille <akim@epita.fr>
1522
1523 Let position and location be PODs.
1524 * data/location.cc (position::initialize, location::initialize): New.
1525 (position::position, location::location): Define only if
1526 b4_location_constructors is defined.
1527 * data/lalr1.cc (b4_location_constructors): Define it for backward
1528 compatibility.
1529 * doc/bison.texinfo (Initial Action Decl): Use initialize.
1530
1531 2005-11-12 Akim Demaille <akim@epita.fr>
1532
1533 * data/lalr1.cc: Move the body of the ctor and dtor into the
1534 parser file (instead of the header).
1535 Wrap the implementations in a "namespace yy".
1536
1537 2005-11-12 Akim Demaille <akim@epita.fr>
1538
1539 Have glr.c include its header file when created.
1540 * data/glr.c (b4_shared_declarations): New.
1541 Output them verbatim in the parser if !%defines, otherwise
1542 output then in the header file, and include it instead.
1543
1544 2005-11-11 Akim Demaille <akim@epita.fr>
1545
1546 * data/glr.c: Comment changes.
1547
1548 2005-11-11 Akim Demaille <akim@epita.fr>
1549
1550 When yydebug, report semantic and location values for reductions.
1551 * data/glr.c (yy_reduce_print): Report the semantic values and the
1552 locations.
1553 (YY_REDUCE_PRINT): Adjust.
1554 (yyglrReduce): Use them.
1555 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
1556 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
1557 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
1558 traces.
1559
1560 2005-11-10 Akim Demaille <akim@epita.fr>
1561
1562 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
1563 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
1564 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
1565
1566 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
1567
1568 * m4/cxx.m4, examples/Makefile.am: Don't build
1569 examples/calc++ if no C++ compiler is available. (trivial change)
1570
1571 2005-11-09 Akim Demaille <akim@epita.fr>
1572
1573 * src/scan-skel.l: Use a couple of asserts.
1574
1575 2005-11-03 Akim Demaille <akim@epita.fr>
1576
1577 In some (weird) cases, the final state number is incorrect.
1578 Reported by Alexandre Duret-Lutz.
1579 * src/LR0.c (state_list_append): Remove the computation of
1580 final_state.
1581 (save_reductions): Do it here.
1582 (get_state): Alpha conversion.
1583 (generate_states): Use a for loop.
1584 * src/gram.h (item_number_is_rule_number)
1585 (item_number_is_symbol_number): New.
1586 * src/state.c: Use assert.
1587 * src/system.h: Include assert.h.
1588 * tests/sets.at (Accept): New.
1589
1590 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1591
1592 * data/glr.c (yyfill): Adjust comment.
1593 (yyresolveAction): Initialize default location properly
1594 for empty right-hand sides.
1595 (yydoAction): Ditto.
1596 Add comment explaining apparently dead code.
1597 * tests/glr-regression.at
1598 (Incorrectly initialized location for empty right-hand side in GLR):
1599 New test.
1600
1601 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
1602
1603 * bootstrap (cleanup_gnulib): New function. Use it to clean up
1604 gnulib when interrupted. This fixes some race conditions and
1605 works around some portability problems (one noted by Paul
1606 Hilfinger).
1607
1608 2005-10-22 Akim <akim@epita.fr>
1609
1610 * Makefile.cfg: Adjust to config -> build-aux.
1611 Reported by twledo.
1612
1613 2005-10-21 Akim Demaille <akim@epita.fr>
1614
1615 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
1616 the %parse-params.
1617 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
1618 * data/yacc.c (b4_Pure_if): Rename as...
1619 (b4_yacc_pure_if): this.
1620 (YY_SYMBOL_PRINT, yyparse): Adjust.
1621 * doc/bison.texinfo: Formatting changes.
1622
1623 2005-10-21 Akim Demaille <akim@epita.fr>
1624
1625 Finish the transition config -> build-aux.
1626 * configure.ac, Makefile.am: Use build-aux.
1627 * config/prev-version, config/announce-gen, config/Makefile.am:
1628 Move to...
1629 * build-aux/prev-version, build-aux/announce-gen,
1630 * build-aux/Makefile.am: here.
1631
1632 2005-10-14 Akim Demaille <akim@epita.fr>
1633
1634 * examples/calc++/test: Use set -x only when VERBOSE.
1635
1636 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
1637
1638 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
1639 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
1640
1641 2005-10-13 Akim Demaille <akim@epita.fr>
1642
1643 * src/scan-skel.l: Output the base name parts of the parser and
1644 header file names.
1645 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
1646 additional checks.
1647 Use this to exercise C++ outputs in subdirs.
1648 Reported by Oleg Smolsky.
1649
1650 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
1651
1652 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
1653 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
1654 Problem reported by John P. Hartmann.
1655 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
1656 already defined it.
1657
1658 2005-10-12 Akim Demaille <akim@epita.fr>
1659
1660 * src/parse-gram.y (version_check): Exit 63 to please missing
1661 (stands for "version mismatch).
1662 * tests/input.at, doc/bison.texinfo: Adjust.
1663
1664 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
1665
1666 Work around portability problems with Visual Age C compiler
1667 (xlc and xlC_r) reported by John P. Hartmann.
1668 * data/location.cc (initial_column, initial_line): Remove.
1669 All uses replaced by 0 and 1.
1670 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
1671 that xlc complains about.
1672 * src/scan-skel.l (skel_wrap): Likewise.
1673 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
1674 as __STDC__.
1675 * data/yacc.c (YYMODERN_C): New macro, which also looks at
1676 __STDC_VERSION__. Use it everywhere instead of looking at
1677 __STDC__ and __cplusplus.
1678
1679 2005-10-10 Akim Demaille <akim@epita.fr>
1680
1681 * examples/calc++/test: Be quiet unless VERBOSE.
1682
1683 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
1684
1685 * data/c.m4 (yydestruct, yysymprint):
1686 Use YYUSE instead of casting to void.
1687 * data/glr.c (YYUSE): New macro.
1688 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
1689 Use it instead of rolling our own.
1690 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1691 (YYCHK1):
1692 Use /*CONSTCOND*/ to suppress lint warnings.
1693 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1694 (YY_STACK_PRINT): Use 'false' not '0'.
1695 (YYUSE): New macro.
1696 (yysymprint_, yydestruct_): Use it instead of rolling our own.
1697 * data/yacc.c (YYUSE): New macro.
1698 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
1699 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
1700 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
1701
1702
1703 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
1704 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
1705
1706 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
1707
1708 Undo the parts of the unlocked-I/O change that substituted
1709 putc or puts for printf. This might hurt performance a bit,
1710 but some people prefer the printf style.
1711 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
1712 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
1713 All uses replaced by YYFPRINTF and YYDPRINTF.
1714 * data/yacc.c: Likewise.
1715 * lib/bitset.c (bitset_print): Likewise.
1716 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
1717 putc and puts.
1718 * lib/lbitset.c (debug_lbitset): Likewise.
1719 * src/closure.c (print_firsts, print_fderives): Likewise.
1720 * src/gram.c (grammar_dump): Likewise.
1721 * src/lalr.c (look_ahead_tokens_print): Likewise.
1722 * src/output.c (escaped_output): Likewise.
1723 (user_actions_output): Break apart two printfs.
1724 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
1725 * src/reduce.c (reduce_print): Likewise.
1726 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
1727 * src/system.h: Include unlocked-io.h rathe than stdio.h.
1728
1729 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
1730 Use assignments rather than casts-to-void to suppress
1731 unused-variable warnings. This pacifies 'lint'.
1732 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
1733 unused-variable warnings.
1734
1735 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1736
1737 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1738
1739 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
1740
1741 Use unlocked I/O for a minor performance improvement on hosts like
1742 GNU/Linux and Solaris that support unlocked I/O. The basic idea
1743 is to use the gnlib unlocked-io module, and to prefer putc and
1744 puts to printf when either will work (since the latter doesn't
1745 come in an unlocked flavor).
1746 * bootstrap (gnulib_modules): Add unlocked-io.
1747 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
1748 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
1749 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
1750 and similarly for puts and putc and printf.
1751 * data/yacc.c: Likewise.
1752 * lib/bitset.c (bitset_print): Likewise.
1753 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
1754 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
1755 to printf.
1756 * lib/lbitset.c (debug_lbitset): Likewise.
1757 * src/closure.c (print_firsts, print_fderives): Likewise.
1758 * src/gram.c (grammar_dump): Likewise.
1759 * src/lalr.c (look_ahead_tokens_print): Likewise.
1760 * src/output.c (escaped_output): Likewise.
1761 (user_actions_output): Coalesce two printfs.
1762 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
1763 * src/reduce.c (reduce_print): Likewise.
1764 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
1765 * src/system.h: Include unlocked-io.h rather than stdio.h.
1766
1767 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
1768 this confuses xgettext.
1769
1770 2005-10-02 Akim Demaille <akim@epita.fr>
1771
1772 * bootstrap (gnulib_modules): Add strverscmp.
1773 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
1774 * m4/.cvsignore: Add strverscmp.m4.
1775 * src/parse-gram.y (%require): New token, new rule.
1776 (version_check): New.
1777 * src/scan-gram.l (%require): Adjust.
1778 * tests/input.at (AT_REQUIRE): New.
1779 Use it.
1780 * doc/bison.texinfo (Require Decl): New.
1781 (Calc++ Parser): Use %require.
1782
1783 2005-10-02 Akim Demaille <akim@epita.fr>
1784
1785 * data/location.cc: New.
1786
1787 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
1788 Akim Demaille <akim@epita.fr>
1789
1790 Make sure -odir/foo.cc creates dir/location.hh etc.
1791 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
1792 (spec_file_prefix, spec_verbose_file, spec_graph_file)
1793 (spec_defines_file): Now const.
1794 (dir_prefix): New.
1795 (short_base_name): Remove.
1796 * src/files.c: Adjust.
1797 (dirname.h): Include.
1798 (base_name): Don't prototype it.
1799 (finput): Remove, duplicates gram_in.
1800 (full_base_name, short_base_name): Replace by...
1801 (all_but_ext, all_but_tab_ext): these.
1802 (compute_base_names): Rename as...
1803 (compute_file_name_parts): this.
1804 Update to compute the new variables, including dir_prefix.
1805 Adjust dependencies.
1806 * src/output.c (prepare): Output them.
1807 * src/reader.c: Adjust to use gram_in, not finput.
1808 * src/scan-skel.l (@dir_prefix@): New.
1809
1810 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1811
1812 * lib/subpipe.c: New function end_of_output_subpipe() added
1813 to allow support for non-posix systems. This is a no-op function
1814 for posix systems.
1815
1816 * lib/subpipe.h: New function end_of_output_subpipe() added
1817 to allow support for non-posix systems. This is a no-op function
1818 for posix systems.
1819
1820 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
1821 handle the lack of pipe/fork functionality on non-posix systems.
1822
1823 * djgpp/Makefile.maint: DJGPP specific file.
1824
1825 * djgpp/README.in: DJGPP specific file.
1826
1827 * djgpp/config.bat: DJGPP specific configuration file.
1828
1829 * djgpp/config.sed: DJGPP specific configuration file.
1830
1831 * djgpp/config.site: DJGPP specific configuration file.
1832
1833 * djgpp/config_h.sed: DJGPP specific configuration file.
1834
1835 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
1836
1837 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
1838
1839 2005-10-02 Akim Demaille <akim@epita.fr>
1840
1841 * data/location.cc: New, extract from...
1842 * data/lalr1.cc: here.
1843 (location.hh): Include it after the user prologue, in case the
1844 filename type is defined by the user.
1845 Forward declation location and position before the pre-prologue.
1846 (yyresult_): Rename as...
1847 (yyresult): this, it's a local variable, not an attribute.
1848 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
1849
1850 2005-10-01 Akim Demaille <akim@epita.fr>
1851
1852 * examples/extexi: Restore the #line generation.
1853
1854 2005-09-30 Akim Demaille <akim@epita.fr>,
1855 Alexandre Duret-Lutz <adl@gnu.org>
1856
1857 Move the token type and YYSTYPE in the parser class.
1858 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
1859 (parser::token): New, from the moved free definition of tokens.
1860 (parser::semantic_value): Now a full definition instead of an
1861 indirection to YYSTYPE.
1862 (b4_post_prologue): No longer included in the header file, but
1863 in the implementation file.
1864 * doc/bison.texi (C+ Language Interface): Update.
1865 * src/parse-gram.y: Support unary %define.
1866 * tests/actions.at: Define global_tokens_and_yystype for backward
1867 compatibility until we update the tests.
1868 * tests/calc.at: Idem.
1869 (first_line, first_column, last_line, last_column): Define for lalr1.cc
1870 to simplify the code.
1871
1872 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
1873
1874 Port to SunOS 4.1.4, which lacks strtoul and strerror.
1875 Ah, the good old days! Problem reported by Peter Klein.
1876 * bootstrap (gnulib_modules): Add strerror, strtoul.
1877 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
1878 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
1879
1880 2005-09-29 Akim Demaille <akim@epita.fr>
1881
1882 * data/c.m4 (b4_error_verbose_if): New.
1883 * data/lalr1.cc: Use it.
1884 (YYERROR_VERBOSE_IF): Remove.
1885 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
1886 parser members, replaced by...
1887 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
1888 local variables.
1889 (yysyntax_error_): Takes the state number as argument.
1890 (yyreduce_print_): Use the argument yyrule, not the former
1891 attribute yyn_.
1892
1893 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
1894
1895 * bootstrap (gnulib_modules): Add verify.
1896 * lib/.cvsignore: Add verify.h.
1897 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
1898 * src/system.h (verify): Remove.
1899 Include verify.h instead.
1900 * src/tables.c (tables_generate): Use new API for 'verify'.
1901
1902 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
1903
1904 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
1905 local variables whose names begin with 'yy'.
1906 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1907 Trivial changes from Joel E. Denny.
1908
1909 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
1910 it itself.
1911 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
1912 don't use alloca any more.
1913
1914 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
1915 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
1916 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
1917 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
1918 to match yacc.c, to test more hosts.
1919
1920 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
1921
1922 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
1923 doesn't affect behavior.
1924 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
1925 Solaris, AIX, MSC.
1926 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
1927 This works a bit better with glibc, if user code has already included
1928 stdlib.h.
1929 * doc/bison.texinfo (Bison Parser): Document that users can't
1930 arbitrarily use malloc and free for other purposes. Document
1931 that <alloca.h> and <malloc.h> might be included.
1932 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
1933 user must declare alloca.
1934
1935 * HACKING (release): Forwarn the Translation Project about
1936 stable releses.
1937
1938 2005-09-20 Akim Demaille <akim@epita.fr>
1939
1940 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
1941
1942 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
1943
1944 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
1945 (YYSTACK_ALLOC_MAXIMUM): Use it.
1946 (yysyntax_error): New function.
1947 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
1948 multiple syntax errors are reported, and alloca is being used.
1949 Instead, reallocate buffers twice as big each time, so that
1950 we waste at most half the allocated memory. Start with a small
1951 (128-byte) buffer that will suffice in most cases anyway.
1952 Use yysyntax_error to do most of the work.
1953
1954 * doc/bison.texinfo (Error Reporting, Table of Symbols):
1955 yynerrs is the number of errors reported, not the number of
1956 errors encountered.
1957
1958 * tests/glr-regression.at (Duplicated user destructor for lookahead):
1959 Mark it as expected to fail.
1960 Cast result of malloc; problem reported by twlevo@xs4all.nl.
1961 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
1962 Don't start user-code symbols with "yy", to avoid name space problems.
1963
1964 2005-09-19 Akim Demaille <akim@epita.fr>
1965
1966 Remove the traits, failed experiment.
1967 It never proved useful, and anyway because of the current
1968 definition, it was not possible to have several specialization of
1969 this traits, making it useless.
1970 * data/lalr1.cc (yy:traits): Remove.
1971 Inline its definitions in the parser class.
1972
1973 2005-09-19 Akim Demaille <akim@epita.fr>
1974
1975 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
1976 least Mac OSX with a /usr/local install of gettext.
1977
1978 2005-09-19 Akim Demaille <akim@epita.fr>
1979
1980 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
1981 and yytoken for similarity with the other skeletons.
1982
1983 2005-09-19 Akim Demaille <akim@epita.fr>
1984
1985 * NEWS, configure.ac: update version number to 2.1a.
1986
1987 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
1988
1989 * NEWS: Version 2.1.
1990
1991 * NEWS: Remove notice of yytname change, since it was never in an
1992 official release.
1993 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
1994 diagnostic.
1995 * src/output.c (prepare): Likewise.
1996 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
1997 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
1998 is not defined. This is an awful hack, but it's enough for now.
1999 All callers changed.
2000 * tests/glr-regression-at (make_value): Args are const pointers now,
2001 to avoid GCC warning.
2002 (Duplicated user destructor for lookahead): New test. Currently
2003 skipped. It fails on my host but I'm not sure it'll always fail.
2004
2005 2005-09-16 Akim Demaille <akim@epita.fr>
2006
2007 * src/symtab.h (struct symbol): Declare the printer and destructor
2008 as const, to avoid accidental calls to free.
2009 (symbol_destructor_set, symbol_printer_set): Adjust.
2010 * src/symtab.c: Adjust.
2011
2012 2005-09-16 Akim Demaille <akim@epita.fr>
2013
2014 * data/c.m4 (b4_token_enums): New.
2015 (b4_token_defines): Rename as...
2016 (b4_token_enums_defines): this.
2017 (b4_token_defines): New, output only the #defines.
2018 * data/yacc.c, data/glr.c: Adjust.
2019 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2020 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2021 as default values.
2022
2023 2005-09-16 Akim Demaille <akim@epita.fr>
2024
2025 * data/lalr1.cc (yylex_): Remove, inline its code.
2026 (yyreport_syntax_error_): Remove, replaced by...
2027 (yysyntax_error_): this which returns a string and leaves to the
2028 caller the call to the users' error function.
2029 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2030 Move from members of the parser object...
2031 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2032 to local variables of the parse function.
2033
2034 2005-09-16 Akim Demaille <akim@epita.fr>
2035
2036 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2037 since it's in Bison's name space.
2038
2039 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2040
2041 * data/glr.c (yyresolveValue): Add default case to pacify
2042 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2043
2044 * NEWS: Document when yyparse started to return 2.
2045 * doc/bison.texinfo (Parser Function): Document when yyparse
2046 returns 2.
2047
2048 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2049 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2050 changed.
2051 (class position): file_name -> filename (reverting). All uses changed.
2052
2053 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2054
2055 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2056 do anything if $@ exists. This reverts part of the 2005-07-07
2057 patch.
2058
2059 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2060
2061 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2062 contains obsolete information and isn't worth distributing as a
2063 separate file anyway.
2064 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2065 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2066 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2067 (yyparse): Abort if user code uses longjmp to throw an unexpected
2068 value.
2069
2070 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2071
2072 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
2073 Suggested by twlevo@xs4all.nl.
2074
2075 * data/glr.c (YYCHK1): Do not assume YYE is in range.
2076 This avoids a diagnostic from gcc -Wswitch-enum.
2077 Problem reported by twlevo@xs4all.nl.
2078
2079 * doc/bison.texinfo: Don't use "filename", as per GNU coding
2080 standards. Use "file name" or "file" or "name", depending on
2081 the context.
2082 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
2083 not to hack/foo.tab.c.
2084 (Calc++ Top Level): 2nd arg of main is not const.
2085 * data/glr.c: b4_filename -> b4_file_name.
2086 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
2087 All uses changed.
2088 (class position): filename -> file_name. All uses changed.
2089 * data/yacc.c: b4_filename -> b4_file_name.
2090 * lib/bitset.h: filename -> file_name in local vars.
2091 * lib/bitset_stats.c: Likewise.
2092 * src/files.c: Likewise.
2093 * src/scan-skel.l ("@output ".*\n): Likewise.
2094 * src/files.c (file_name_split): Renamed from filename_split.
2095 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
2096
2097 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
2098
2099 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
2100 to accommodate latest gnulib.
2101
2102 * tests/glr-regression.at (Duplicate representation of merged trees):
2103 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
2104
2105 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
2106 needed.
2107
2108 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
2109
2110 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
2111 All uses changed. Invoke user destructor after an error during a
2112 split parse (trivial change from Joel E. Denny).
2113
2114 * tests/glr-regression.at
2115 (User destructor after an error during a split parse): New test case.
2116 Problem reported by Joel E. Denny in:
2117 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
2118
2119 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2120
2121 * README-cvs: Give URLs for recommended tools.
2122 Mention Gzip version problem, and bootstrapping issues.
2123 Remove troubleshooting section, as it's somewhat obsolete.
2124
2125 * bootstrap (no_cache): New var, to accommodate different wget
2126 variants. Use it instead of '-C off'. Problem reported by
2127 twlevo@xs4all.nl.
2128
2129 * data/glr.c (yydestroyStackItem): New function.
2130 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
2131 debugging information. Problem reported by Joel E. Denny.
2132
2133 2005-08-25 Akim Demaille <akim@epita.fr>
2134
2135 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
2136
2137 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
2138
2139 * data/glr.c (yyrecoverSyntaxError, yyreturn):
2140 Don't invoke destructor on unresolved entries.
2141 * tests/glr-regression.at
2142 (User destructor for unresolved GLR semantic value): New test case.
2143 Problem reported by Joel E. Denny in:
2144 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
2145
2146 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
2147
2148 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
2149 Add strnlen.c.
2150 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
2151 lib-prefix.m4, po.m4.
2152
2153 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
2154 in yydestruct diagnostic, since it might not be an error.
2155 Problem reported by Joel Denny near end of
2156 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2157 * data/lalr1.cc (yyerturn): Likewise.
2158 * data/yacc.c (yyreturn): Likewise.
2159 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
2160
2161 * src/files.c: Remove obsolete FIXME comment.
2162
2163 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
2164 with the other templates, and to fix bogus run-on messages such
2165 as the one reported at the end of
2166 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2167 All callers changed to avoid the newline.
2168 (yyprocessOneStack): Output two lines rather than one, to accommodate
2169 the above change. This changes the debug output format slightly.
2170
2171 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
2172 reported by Joel E. Denny in
2173 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
2174 (trivial change).
2175 * tests/glr-regression.at (Duplicate representation of merged trees):
2176 New test, from Joel E. Denny in:
2177 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
2178 * THANKS: Add Joel E. Denny.
2179
2180 * configure.ac (AC_INIT): Bump to 2.0c.
2181
2182 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
2183
2184 * NEWS: Version 2.0b.
2185
2186 * Makefile.am (SUBDIRS): Put examples before tests, so that
2187 "make check" doesn't finish with "All 1 tests passed".
2188
2189 * tests/regression.at (Token definitions): Don't rely on
2190 AT_PARSER_CHECK for data that contains backslashes. It currently
2191 uses 'echo', and 'echo' isn't portable if its argument contains
2192 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
2193 that the byte '\0xff' is not printable in the C locale; it is,
2194 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
2195 not printable, so use '\0x81' to test.
2196
2197 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
2198 version of GCC, since the macro is used with non-GCC compilers.
2199
2200 Fix core dump reported by Pablo De Napoli in
2201 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
2202 * tests/regression.at (Invalid inputs with {}): New test.
2203 * src/parse-gram.y (token_name): Translate type before using
2204 it as an index.
2205
2206 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
2207 the user's name space. All uses changed to __attribute__
2208 ((__unused__)).
2209 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
2210 Add __attribute__ ((__noreturn__)).
2211
2212 * etc/clcommit: Remove. We weren't using it, and it failed
2213 "make maintainer-distcheck".
2214 * Makefile.maint: Merge from coreutils.
2215 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
2216 (syntax-check-rules): Change list of rules as described below.
2217 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
2218 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
2219 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
2220 (sc_trailing_space): New rules.
2221 (sc_xalloc_h_in_src): Remove.
2222 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2223 (sc_space_tab, sc_error_exit_success, sc_changelog):
2224 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
2225 (makefile-check, po-check, author_mark_check):
2226 (makefile_path_separator_check, copyright-check):
2227 Use grep -n, to make it easier to find violations.
2228 Use CVS_LIST and CVS_LIST_EXCEPT.
2229 (header_regexp, h_re): Remove.
2230 (dd_c): New macro.
2231 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
2232 (my-distcheck): Use more-modern GCC flags.
2233 (signatures, %.asc): Remove.
2234 (rel-files, announcement): Remove signatures.
2235 Restore old updating code, even though we don't use it, so
2236 that we're the same as coreutils.
2237 (alpha, beta, major): Depend on news-date-check.
2238 Make the upload commands.
2239
2240 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2241 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2242 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2243 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2244 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2245 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2246 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2247 * tests/sets.at: Likewise.
2248
2249 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2250 we comment out the Autoconf version number.
2251 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2252 it's error-prone and "make maintainer-distcheck" rejects it.
2253
2254 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2255 Indent calls to "error" to pacify "make maintainer-distcheck",
2256 when the calls are not intended to be translated.
2257 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2258
2259 * src/Makefile.am (DEFS): Use +=, to pacify
2260 "make maintainer-distcheck".
2261 (bison_SOURCES): Add scan-skel.h.
2262 (sc_tight_scope): New rule, from coreutils.
2263
2264 * src/files.c (src_extension, header_extension):
2265 Now static, not extern.
2266 * src/getargs.c (short_options): Likewise.
2267 * src/muscle_tab.c (muscle_table): Likewise.
2268 * src/parse-gram.y (current_class, current_type, current_prec):
2269 Likewise.
2270 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2271 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2272 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2273 void, to avoid warning when NLS is disabled.
2274 * src/output.c: Include scan-skel.h.
2275 (scan_skel): Remove decl, since scan-skel.h does this.
2276 (output_skeleton):
2277 Indent calls to "error" to pacify "make maintainer-distcheck".
2278 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2279 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2280 "make maintainer-distcheck".
2281 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
2282 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
2283 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
2284 (skel_lex_destroy, scan_skel): Move these decls to...
2285 * src/scan-skel.h: New file.
2286 * src/uniqstr.c (uniqstr_assert):
2287 Indent calls to "error" to pacify "make maintainer-distcheck".
2288
2289 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
2290 not @VAR@.
2291
2292 * tests/torture.at: Revamp to avoid misuse of atoi that
2293 "make maintainer-distcheck" complained about.
2294
2295 * examples/extexi (message): Don't print a message more than once,
2296 and omit line-number decoration that makes Emacs compile think
2297 that informative messages are worth worrying about.
2298
2299 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
2300
2301 * configure.ac: Update version number.
2302
2303 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
2304 accidentally.
2305 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
2306 autogenerated by the maintainer.
2307 * examples/calc++/.cvsignore: Add *.yy.
2308
2309 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
2310 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2311 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2312
2313 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
2314
2315 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
2316 from maintainer-distcheck about casting the argument of 'free'.
2317
2318 * NEWS: Mention recent yytname changes.
2319 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
2320
2321 * bootstrap: For translations that have not yet been upgraded to
2322 the new runtime-po domain, prime the pump by extracting the
2323 relevant strings from the obsolete translations. This code can be
2324 removed once the bison-runtime domain has been translated by each
2325 team.
2326
2327 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
2328 now that token names are already quoted.
2329
2330 Fix problem reported by Anthony Heading.
2331 * data/glr.c (YYTOKEN_TABLE): New macro.
2332 (yytname): Define if YYTOKEN_TABLE.
2333 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
2334 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
2335 (YYERROR_VERBOSE): Define the same way the other skeletons do.
2336 * src/output.c (prepare_symbols): Output token_table_flag.
2337
2338 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
2339
2340 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
2341 again if the first call fails.
2342
2343 * data/glr.c (yytnamerr): New function.
2344 (yyreportSyntaxError): Use it to dequote most string literals.
2345 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
2346 with other skeletons. All uses changed.
2347 (yytnameerr_): New function.
2348 (yyreport_syntax_error): Use it to dequote most string literals.
2349 * data/yacc.c (yytnamerr): New function.
2350 (yyerrlab): Use it to decode most string literals.
2351 * doc/bison.texinfo (Decl Summary, Calling Convention):
2352 Clarify quoting convention of yytname.
2353 * src/output.c (prepare_symbols): Quote all names. This undoes
2354 the 2005-04-17 change, which is now accomplished (mostly) via
2355 changes in the parsers as described above.
2356 * tests/regression.at (Token definitions, Web2c Actions):
2357 Undo most 2005-04-17 change here, too.
2358
2359 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
2360
2361 Fix more problems reported by twlevo@xs4all.nl.
2362 * tests/cxx-type.at: Don't pipe output of ./types through sed to
2363 remove trailing spaces. This loses the exit status of ./types,
2364 and isn't needed since ./types shouldn't be emitting trailing
2365 spaces.
2366 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
2367 as the stack isn't valid in that case.
2368
2369 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2370 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2371 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2372 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
2373 is used.
2374 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
2375 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2376 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2377 Likewise.
2378
2379 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
2380 overly-picky compilers that reject 'char *foo = "bar";'.
2381
2382 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
2383 to FILE * parameter, not to stderr. This fixes a typo introduced
2384 in the 2005-07-12 change.
2385
2386 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
2387 warnings from GCC 4.
2388
2389 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
2390 (yyglrShiftDefer, yysplitStack):
2391 Remove unused parameters b4_pure_formals. All uses changed.
2392 (yyglrShift): Remove unused parameters b4_user_formals.
2393 All uses changed.
2394 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
2395
2396 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
2397
2398 Destructor cleanups and regularization among the three skeletons.
2399 * NEWS: Document the behavior changes.
2400 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
2401 stack before failing, as the cleanup code will do it for us now.
2402 * data/lalr1.cc (yyerrlab): Likewise.
2403 * data/glr.c (yyparse): Pop everything off the stack before
2404 freeing it, so that destructors get called properly.
2405 * data/lalr1.cc (yyreturn): Likewise.
2406 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
2407 This is more consistent.
2408 * doc/bison.texinfo (Destructor Decl): Mention more reasons
2409 why destructors might be called. 1.875 -> 2.1.
2410 (Destructor Decl, Decl Summary, Table of Symbols):
2411 Some English-language cleanups for %destructor.
2412 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2413 Add output line for destructor of start symbol.
2414 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
2415 because of that same extra output line.
2416
2417 * NEWS: Document minor wording changes in diagnostics of
2418 Bison-generated parsers.
2419 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
2420 Remove unused formals. All uses changed.
2421 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
2422 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
2423 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
2424 Rename yyoverflowab to yyexhaustedlab.
2425 When memory exhaustion occurs during syntax-error reporting,
2426 report it separately rather than in a single diagnostic; this
2427 eases translation.
2428 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
2429 (Memory Exhausted): Renamed from Parser Stack Overflow.
2430 Revamp wording slightly to prefer "memory exhaustion".
2431 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
2432
2433 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
2434
2435 Add i18n support to the GLR skeleton. Partially fix the C++
2436 skeleton; a C++ expert needs to finish this. Remove debugging
2437 msgids; there's little point to having them translated, since they
2438 can be understood only by someone who can read the
2439 (English-language) source code.
2440
2441 Generate runtime-po/bison-runtime.pot automatically, so that we
2442 don't have to worry about garbage getting in that file. We'll
2443 make sure after the next official release that old msgids don't
2444 get lost. See
2445 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
2446
2447 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
2448 Now auto-generated.
2449 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
2450 Fix typos in explanations of the runtime file.
2451 * bootstrap: Change gettext keyword from YYI18N to YY_.
2452 Use standard Makefile.in.in in runtime-po, since we'll arrange
2453 for backward-compatible bison-runtime.po files in a different way.
2454 * data/glr.c (YY_): New macro, from yacc.c.
2455 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
2456 Translate messages intended for users.
2457 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
2458 the wording in the other skeletons. We don't know that the memory
2459 is virtual.
2460 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
2461 Use same method that yacc.c uses.
2462 Don't translate debugging messages.
2463 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
2464 it doesn't work (yet), and requires C++ expertise to fix.
2465 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
2466 Move defn to a more logical place, to be consistent with other
2467 skeletons.
2468 Don't translate debugging messages.
2469 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
2470 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
2471 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
2472 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
2473
2474 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
2475 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
2476 void, not int.
2477 * tests/glr-regression.at (Badly Collapsed GLR States):
2478 Likewise.
2479 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2480 yylex should return 0 at EOF rather than aborting.
2481
2482 Improve tests for stack overflow in GLR parser.
2483 Problem reported by twlevo@xs4all.nl.
2484 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
2485 All uses removed.
2486 (yyStackOverflow): Just longjmp, but with value 2 so that caller
2487 can handle the problem.
2488 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
2489 (yyparse): New local variable yyresult to record the result.
2490 Use result of setjmp to set it, rather than storing itinto
2491 struct.
2492 (yyDone): Remove label.
2493 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
2494 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
2495 if YYABORT is used).
2496 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
2497 yyparse status; put status > 1 into diagnostic.
2498 Check that status==2 works.
2499 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
2500 Use exit status 3 for failure to open (which shouldn't happen).
2501
2502 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
2503
2504 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
2505 1 on syntax error; just let yyparse do its thing.
2506 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
2507 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
2508 (Exploding the Stack Size with Alloca):
2509 (Exploding the Stack Size with Malloc):
2510 Expect exit status 2, not 1, since the parser is supposed to blow
2511 its stack. Problem reported by twlevo@xs4all.nl.
2512
2513 * data/glr.c (yyparse): Don't assume that the initial calls
2514 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
2515 Print a stack-overflow message and fail instead.
2516 Initialize the line-number information before creating the stack,
2517 so that the stack-overflow message can report line zero safely.
2518
2519 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
2520
2521 Fix problems reported by twlevo@xs4all.nl.
2522 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
2523 (yyuserMerge): Provide a default case if b4_mergers is empty.
2524 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
2525 * tests/glr-regression.at
2526 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2527 Add casts to pacify C++ compilers.
2528 * tests/glr-regression.at (Improper merging of GLR delayed action
2529 sets): Declare yylex before using it.
2530 * tests/Makefile.am (maintainer-check-g++): Fix a stray
2531 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
2532 test for valgrind; valgrind is independent of g++.
2533 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
2534 for compatibility with POSIX 1003.1-2001 (if running coreutils).
2535 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
2536 Use a destructor, so that we can expand the stack. Change
2537 YYSTYPE to char * so that we can free it. Cast result of malloc.
2538
2539 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2540
2541 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
2542 a valgrind failure. Problem reported by twlevo@xs4all.nl.
2543
2544 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
2545
2546 * PACKAGING: New file, suggested by Bruno Haible and taken from
2547 similar wording in gettext's PACKAGING file.
2548 * NEWS: Mention PACKAGING.
2549 * Makefile.am (EXTRA_DIST): Add PACKAGING.
2550
2551 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
2552
2553 * NEWS: Document recent i18n improvements.
2554 * bootstrap: Get runtime translations into runtime-po.
2555 Create runtime-po files automatically, if possible.
2556 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
2557 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
2558 does not infringe on the user's name space.
2559 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
2560 * doc/bison.texinfo (Internationalization): Revamp the English
2561 and Texinfo syntax a bit, to try to make it clearer.
2562 (Bison Options, Option Cross Key): Mention --print-localedir.
2563 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
2564 YYENABLE_NLS. Quote a bit more.
2565 * runtime-po/.cvsignore: New file.
2566 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
2567 * runtime-po/Rules-quot: Remove; now created by bootstrap.
2568 * runtime-po/quot.sed: Likewise.
2569 * runtime-po/boldquot.sed: Likewise.
2570 * runtime-po/en@quot.header: Likewise.
2571 * runtime-po/en@boldquot.header: Likewise.
2572 * runtime-po/insert-header.sin: Likewise.
2573 * runtime-po/remove-potcdate.sin: Likewise.
2574 * runtime-po/Makevars: Likewise.
2575 * runtime-po/LINGUAS: Likewise.
2576 * runtime-po/de.po: Likewise; we will rely on the translation project
2577 to maintain this, so "bootstrap" should get it.
2578 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
2579 its value.
2580 * src/main.c (main): Bind the bison-runtime domain, too.
2581
2582 2005-07-12 Bruno Haible <bruno@clisp.org>
2583
2584 * data/yacc.c: Include <libintl.h> when NLS is enabled.
2585 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
2586 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
2587 * runtime-po: New directory.
2588 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
2589 $(DOMAIN).pot-update rule, so that old messages are never dropped.
2590 * runtime-po/Rules-quot: New file, copied from po/.
2591 * runtime-po/quot.sed: Likewise.
2592 * runtime-po/boldquot.sed: Likewise.
2593 * runtime-po/en@quot.header: Likewise.
2594 * runtime-po/en@boldquot.header: Likewise.
2595 * runtime-po/insert-header.sin: Likewise.
2596 * runtime-po/remove-potcdate.sin: Likewise.
2597 * runtime-po/Makevars: New file.
2598 * runtime-po/POTFILES.in: New file.
2599 * runtime-po/LINGUAS: New file.
2600 * runtime-po/bison-runtime.pot: New file.
2601 * runtime-po/de.po: New file.
2602 * m4/bison.m4: New file.
2603 * Makefile.am (SUBDIRS): Add runtime-po.
2604 (aclocaldir, aclocal_DATA): New variables.
2605 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
2606 Define aclocaldir.
2607 * src/getargs.c (usage): Document --print-localedir option.
2608 (PRINT_LOCALEDIR_OPTION): New enum item.
2609 (long_options): Add --print-localedir option.
2610 (getargs): Handle --print-localedir option.
2611 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
2612 (Internationalization): New section.
2613
2614 2005-07-12 Akim Demaille <akim@epita.fr>
2615
2616 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
2617 for consistency with the rest of the code.
2618 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
2619 Add separators.
2620
2621 2005-07-12 Akim Demaille <akim@epita.fr>
2622
2623 * src/parse-gram.y: Use %printer instead of YYPRINT.
2624
2625 2005-07-12 Akim Demaille <akim@epita.fr>
2626
2627 * src/symtab.h, src/symtab.c (symbol_print): New.
2628 * src/symlist.h, src/symlist.c (symbol_list_print): New.
2629 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
2630
2631 2005-07-12 Akim Demaille <akim@epita.fr>
2632
2633 * data/glr.c (b4_syncline): Fix (swap) the definitions of
2634 b4_at_dollar and b4_dollar_dollar.
2635
2636 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
2637
2638 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
2639 and Pennello's paper.
2640
2641 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
2642
2643 * data/yacc.c (yyparse): Undo previous patch. Instead,
2644 set yylsp[0] and yyvsp[0] only if the initial action
2645 sets yylloc and yylval, respectively.
2646
2647 * data/yacc.c (yyparse): In the initial action, set
2648 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
2649 This avoids the use of undefined variables if the initial
2650 action does not set yylloc and/or yylval.
2651
2652 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
2653
2654 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
2655 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
2656 Remove from CVS. These files are automatically generated.
2657 * examples/extexi: Clarify that this file is now part of Bison,
2658 not GNU M4, and that it works with any POSIX-compatible Awk.
2659 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
2660 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
2661 so that we also get calc++-parser.yy. Geneate it.
2662 Use $(AWK), not gawk, since any conforming Awk will do.
2663 Put comment before action, since older 'make' can't handle comment
2664 in action.
2665 $(BUILT_SOURCES): List all built sources, not just some of them.
2666 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
2667 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
2668 $($(calc_sources_generated)): Remove unnecessary test for existence
2669 of target. (This had a shell syntax error anyway; a stray "x".)
2670 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
2671 calc++-parser.yy.
2672 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
2673
2674 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
2675 implied by the other modules.
2676
2677 2005-07-06 Akim Demaille <akim@epita.fr>
2678
2679 Bind examples/calc++ to the package.
2680 * examples/calc++/Makefile: Remove, replaced by...
2681 * examples/calc++/Makefile.am: ... this new file.
2682 * examples/calc++/test: Remove input.
2683 * examples/calc++/compile: Remove.
2684 * examples/Makefile.am: New.
2685 * configure.ac, Makefile.am: Adjust.
2686 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
2687
2688 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
2689
2690 * data/glr.c (yyFail): Drastically simplify; since the format argument
2691 never had any % directives, we can simply pass it to yyerror.
2692 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
2693 be modified later, as that is the usual style in glr.c.
2694 Problems reported by Paul Hilfinger.
2695
2696 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
2697 and size overflow errors.
2698 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
2699 in case the user prolog sets feature-test macros like _GNU_SOURCE.
2700 (YYSIZEMAX): New macro.
2701 (yystpcpy): New function, taken from yacc.c.
2702 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
2703 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
2704 so that we don't have to maintain their signatures.
2705 (yyFail): Check for buffer overflow, by using vsnprintf rather
2706 than vsprintf. Allocate a bigger buffer if possible.
2707 Report an error if buffer allocation fails.
2708 (yyStackOverflow): New function.
2709 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
2710 the initialization was successful. It might fail if storage was
2711 exhausted.
2712 (yyexpandGLRStack): Add more checks for storage allocation failure.
2713 Use yyStackOverflow to report failures.
2714 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
2715 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
2716 Don't assume stack number fits in int.
2717 (yysplitStack): Check for storage allocation failure.
2718 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
2719 can print diagnostics on storage allocation failure. All callers
2720 changed.
2721 (yyresolveValue): Use yybool for boolean.
2722 (yyreportSyntaxError): Check for size-calculation overflow.
2723 This code is taken from yacc.c.
2724 (yyparse): Check for storage allocation errors when allocating
2725 the initial stack.
2726
2727 2005-07-05 Akim Demaille <akim@epita.fr>
2728
2729 Extract calc++ from the documentation.
2730 * doc/bison.texinfo (Calc++): Add the extraction marks.
2731 * examples/extexi: New, from the aborted GNU Programming 2E.
2732 Separate the different paragraph of a file with empty lines.
2733 * examples/Makefile: Use it to extract the whole calc++ example.
2734
2735 2005-06-24 Akim Demaille <akim@epita.fr>
2736
2737 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
2738 class typedefs.
2739
2740 2005-06-22 Akim Demaille <akim@epita.fr>
2741
2742 * doc/bison.texinfo (C++ Language Interface): First stab.
2743 (C++ Parsers): Remove.
2744
2745 2005-06-22 Akim Demaille <akim@epita.fr>
2746
2747 * data/lalr1.cc (yylex_): Honor %lex-param.
2748
2749 2005-06-22 Akim Demaille <akim@epita.fr>
2750
2751 Start a set of simple examples.
2752 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
2753 * examples/calc++/calc++-driver.hh,
2754 * examples/calc++/calc++-parser.yy,
2755 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
2756 * examples/calc++/compile, examples/calc++/test: New.
2757
2758 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
2759
2760 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
2761 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
2762 which stems from the 2005-05-27 patch.
2763
2764 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2765
2766 * data/glr.c: Modify treatment of unused parameters to permit use
2767 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
2768
2769 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
2770
2771 Fix infringement on user name space reported by Janos Zoltan Szabo.
2772 * data/yacc.c (yyparse): strlen -> yystrlen.
2773
2774 2005-05-30 Akim Demaille <akim@epita.fr>
2775
2776 * data/lalr1.cc (_): New.
2777 Translate the various messages.
2778
2779 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
2780
2781 Fix infringement on user name space reported by Bruno Haible.
2782 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
2783 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
2784 the user's name space.
2785 (alloca): Include <stdlib.h> to get it, if it's not built in.
2786 (YYMALLOC, YYFREE): Define only if needed.
2787 (malloc, free): Declare, but only if needed, as this infringes on
2788 the user name space.
2789
2790 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
2791
2792 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
2793 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
2794 with %d format.
2795 * lib/ebitset.c (min, max): Undef before defining.
2796 * lib/vbitset.c (min, max): Likewise.
2797 * lib/subpipe.c (create_subpipe): Save local variables in case
2798 vfork clobbers them.
2799
2800 2005-05-24 Bruno Haible <bruno@clisp.org>
2801
2802 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
2803 error message syntax used by gcc-4.0.
2804
2805 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
2806
2807 * README: Mention m4 1.4.3. Remove obsolete advice about
2808 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
2809
2810 * bootstrap: Remove workaround for problem I encountered with
2811 gettext 0.14.1; it seems to be fixed now.
2812
2813 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
2814
2815 * NEWS: Version 2.0a.
2816
2817 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
2818 the previous change.
2819
2820 Various maintainer cleanups.
2821 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
2822 conftest*, for benefit of CVS commands run at the same time as
2823 "configure". Add build-aux, since "bootstrap" now creates it and
2824 its subfiles.
2825 * Makefile.cfg (move_if_change): Remove.
2826 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
2827 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
2828 (po_repo, do-po-update, po-update, wget_files, get-targets):
2829 (config.guess-url_prefix, config.sub-url_prefix):
2830 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
2831 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
2832 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
2833 Remove.
2834 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
2835 this is now the recommended name.
2836 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
2837 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
2838 ylwrap. These files now go into build-aux.
2839 * config/move-if-change: Remove.
2840 * config/prev-version.txt: Bump from 1.75 to 2.0.
2841
2842 * bootstrap: Add stdio-safer, unistd-safer modules.
2843 Remove m4/glibc2.m4 (introduced by latest gnulib, but
2844 we don't need it).
2845 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
2846 fopen-safer.c, stdio-safer.h, unistd-safer.h.
2847 * lib/subpipe.c: Include "unistd-safer.h".
2848 (create_subpipe): Make sure all the newly-created
2849 file descriptors are > 2, so that diagnostics don't
2850 get sent down them (which might cause Bison to hang, in theory).
2851 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
2852 * src/files.c (xfopen): Use fopen_safer, not fopen.
2853
2854 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
2855 yesterday's yacc.c fix.
2856
2857 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
2858
2859 * data/glr.c, data/lalr1.cc: Update copyright date.
2860
2861 Fix a destructor bug reported by Wolfgang Spraul in
2862 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
2863 * data/yacc.c (yyabortlab): Don't call destructor, and
2864 don't set yychar to EMPTY.
2865 (yyoverflowlab): Don't call destructor.
2866 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
2867 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
2868 since we no longer output the message "discarding lookahead token
2869 end of input ()".
2870
2871 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2872
2873 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
2874 fix a small glitch in debugging output.
2875 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
2876 after YY_SYMBOL_PRINT where needed.
2877
2878 (struct yyGLRState): Add some comments.
2879 (struct yySemanticOption): Add some comments.
2880 (union yyGLRStackItem): Add comment.
2881
2882 (yymergeOptionSets): Correct this to properly perform the union,
2883 avoiding infinite reported by Michael Rosien.
2884 Update comment.
2885
2886 * tests/glr-regression.at: Add test for GLR merging error reported
2887 by M. Rosien.
2888
2889 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
2890
2891 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
2892 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
2893 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
2894 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
2895 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
2896 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
2897 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
2898 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
2899 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
2900 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
2901 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
2902 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
2903 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
2904 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
2905 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
2906 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
2907 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
2908 src/derives.h, src/files.c, src/files.h, src/getargs.c,
2909 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
2910 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
2911 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
2912 src/output.h, src/parse-gram.c, src/parse-gram.h,
2913 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
2914 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
2915 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
2916 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
2917 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
2918 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
2919 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
2920 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
2921 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
2922 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
2923 tests/reduce.at, tests/regression.at, tests/sets.at,
2924 tests/synclines.at, tests/testsuite.at, tests/torture.at:
2925 Update FSF postal mail address.
2926
2927 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
2928
2929 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
2930 Problem reported by Ralf Menzel.
2931
2932 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
2933
2934 * tests/actions.at: Test that stack overflow invokes destructors.
2935 From Marcus Holland-Moritz.
2936 * data/yacc.c (yyerrlab): Move the code that destroys the stack
2937 from here....
2938 (yyreturn): to here. That way, destructors are called properly
2939 even if the stack overflows, or the user calls YYACCEPT or
2940 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
2941 (yyoverflowlab): Destroy the lookahead.
2942
2943 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
2944
2945 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
2946
2947 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
2948
2949 * NEWS: Bison-generated C parsers no longer quote literal strings
2950 associated with tokens.
2951 * src/output.c (prepare_symbols): Don't escape strings,
2952 since users don't want to see C escapes.
2953 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
2954 in diagnostics.
2955 * tests/input.at (Torturing the Scanner): Likewise.
2956 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
2957
2958 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
2959
2960 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
2961 the data size is known to be too small and we can't increase it.
2962 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
2963
2964 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
2965
2966 * src/parse-gram.y: Include quotearg.h.
2967 (string_as_id): Quote $1 before using it as a key, since the
2968 lexer no longer quotes it for us.
2969 (string_content): Don't strip quotes, since lexer no longer
2970 quotes it for us.
2971 * src/scan-gram.l: Include quotearg.h.
2972 ("\""): Omit quote.
2973 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
2974 a key, since the rest of the lexer doesn't quote it.
2975 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
2976 * tests/regression.at (Token definitions): Check for backslashes
2977 in token strings.
2978
2979 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
2980 (YYSIZE_T): Define to unsigned long int when using an older compiler.
2981 (yyparse): Revamp code to generate long syntax error message, to
2982 make it easier to translate, and to avoid problems with arithmetic
2983 overflow. Change "virtual memory" to "memory" in diagnostic, since
2984 we don't know whether the memory is virtual.
2985
2986 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
2987
2988 * NEWS: Bison-generated C parsers now use the _ macro to
2989 translate strings.
2990 * data/yacc.c (_) [!defined _]: New macro.
2991 All English strings wrapped inside this macro.
2992 * doc/bison.texinfo (Bison Parser): Document _.
2993 * po/POTFILES.in: Include src/parse-gram.c, since it now
2994 includes translateable strings that parse-gram.y doesn't.
2995
2996 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
2997
2998 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
2999 reverting the 2004-10-11 change to this function.
3000 (symbol_check_alias_consistency): Don't call symbol_type_set
3001 if the type name is already correct.
3002 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3003
3004 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3005
3006 * tests/regression.at (Token definitions): Don't use a token named
3007 c, as that generates a "#define c ..." that runs afoul of buggy
3008 stdlib.h that uses the identifier c as a member of struct
3009 drand48_data. Problem reported by Horst Wente.
3010
3011 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3012
3013 * bootstrap: Change translation URL from
3014 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3015 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3016 redirection glitches. Problem reported by twlevo@xs4all.nl.
3017
3018 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3019
3020 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3021 after operands; POSIX says this isn't portable for the c99 command.
3022
3023 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3024
3025 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3026 immediately if a data overrun has occurred; this may help us track
3027 down what may be a spurious failure on MacOS.
3028
3029 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3030
3031 Respond to problems reported by twlevo@xs4all.nl.
3032
3033 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3034
3035 * src/vcg.h: Comment fix.
3036 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3037 (G_CMAX): Change to -1 instead of INT_MAX.
3038
3039 * data/yacc.c (yyparse): Omit spaces before #line.
3040
3041 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3042
3043 * src/tables.c (state_number_to_vector_number): Put it inside an
3044 "#if 0", since it's not currently used. Problem reported by
3045 Roland McGrath.
3046
3047 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3048
3049 * src/output.c (escaped_output): Renamed from
3050 escaped_file_name_output, since we now use it for symbol tags as
3051 well. All uses changed.
3052 (symbol_destructors_output, symbol_printers_output):
3053 Escape symbol tags too.
3054 Problem reported by Matyas Forstner in
3055 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3056
3057 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3058 not needed.
3059 * src/output.c (user_actions_output, token_definitions_output,
3060 symbol_destructors_output, symbol_printers_output): Likewise.
3061 * src/reader.c (prologue_augment): Likewise.
3062 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3063
3064 * src/vcg.c (output_edge): Don't quote linestyle arg.
3065 Problem reported by twlevo@xs4all.nl.
3066
3067 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
3068
3069 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
3070 example, reported by Derek M Jones. Also, make the example even
3071 more outrageous, to better illustrate how bad the problem is.
3072
3073 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
3074
3075 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
3076 putsym. Typo reported by Sebastian Piping.
3077
3078 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
3079
3080 * doc/bison.texinfo (Language and Grammar): some -> same
3081 (Epilogue): int he -> in the
3082 Typos reported by Sebastian Piping via Justin Pence.
3083
3084 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
3085
3086 * tests/glr-regression.at (Improper handling of embedded actions
3087 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
3088 embedded actions and $-N in GLR parsers", work around an Autoconf bug
3089 with dollar signs in test names.
3090 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
3091 for a similar reason.
3092
3093 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
3094
3095 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
3096 wants to redefine G_VIEW.
3097
3098 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
3099
3100 * src/vcg.c (get_view_str): Remove case for normal_view.
3101 Problem reported by twlevo@xs4all.nl.
3102
3103 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
3104
3105 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
3106 Problem reported by twlevo@xs4all.nl.
3107
3108 * doc/bison.texinfo: Change @dircategory from "GNU programming
3109 tools" to "Software development". Requested by Richard Stallman
3110 via Karl Berry.
3111
3112 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
3113
3114 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
3115 Problem reported by twlevo@xs4all.nl.
3116
3117 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
3118
3119 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
3120 keyword; it's not needed with modern compilers, and it doesn't
3121 affect correctness with older compilers. Suggested by
3122 twlevo@xs4all.nl.
3123
3124 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
3125
3126 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
3127 gcc -Wswitch-default.
3128 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3129 * data/yacc.c (yyparse): Likewise.
3130
3131 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
3132
3133 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
3134 already. Let config.h define any nonstandard values.
3135
3136 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
3137
3138 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
3139 for the benefit of slower hosts. Problem reported by
3140 Nelson H. F. Beebe.
3141
3142 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
3143
3144 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
3145 being defined and not used.
3146 * data/lalr1.cc (yyparse): Likewise.
3147 Use "if (false)" rather than "if (0)".
3148
3149 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
3150
3151 * TODO: Mention that we should allow NUL bytes in tokens.
3152
3153 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
3154
3155 * src/scan-skel.l (<<EOF>>): Don't close standard output.
3156 Problem reported by Hans Aberg.
3157
3158 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
3159
3160 * src/getargs.c (version): Happy new year; update overall
3161 program copyright date from 2004 to 2005.
3162
3163 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
3164 Problem reported by Hans Aberg.
3165 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
3166 (Output file names.): Add a test for the case when standard output
3167 is closed.
3168
3169 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
3170
3171 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
3172 to fix an oversight in the Bison 2.0 manual.
3173
3174 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
3175
3176 * NEWS: Version 2.0. Reformat the existing news items since
3177 1.875, so that related items are grouped together.
3178 * configure.ac (AC_INIT): Bump version to 2.0.
3179 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
3180
3181 * tests/torture.at (Exploding the Stack Size with Alloca): Set
3182 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
3183 otherwise, we're not testing alloca. Unfortunately there's no
3184 simple way to consult HAVE_ALLOCA here.
3185
3186 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
3187 for yymsg, too.
3188
3189 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
3190 hand. This avoids a warning about comparing int to size_t when
3191 GCC warnings are enabled.
3192
3193 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
3194
3195 * NEWS: Bison-generated parsers no longer default to using the
3196 alloca function (when available) to extend the parser stack, due
3197 to widespread problems in unchecked stack-overflow detection.
3198 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
3199 responsibility to set it to a positive value. This lets the user
3200 specify a value that is not a preprocessor constant.
3201 * data/yacc.c (YYMAXDEPTH): Likewise.
3202 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
3203 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
3204 to be a compile-time constant. However, explain the constraints on it.
3205 Also, explain the constraints on YYINITDEPTH.
3206 (Table of Symbols): Explain that alloca is no longer the default.
3207 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
3208 to 1.
3209
3210 * doc/bison.texinfo (Location Default Action): Mention that n must
3211 be zero when k is zero. Suggested by Frank Heckenbach.
3212
3213 2004-12-22 Akim Demaille <akim@epita.fr>
3214
3215 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
3216 (parser::state_type, parser::semantic_type, parser::location_type):
3217 Private, not public.
3218 (parser::parse): Return ints, not bool.
3219 Returning a bool introduces a problem: 0 corresponds to false, and
3220 it seems weird to return false on success. Returning true changes
3221 the conventions for yyparse.
3222 Alternatively we could return void and send an exception.
3223 There is no clear consensus (yet?).
3224 (state_stack, semantic_stack, location_stack): Rename as...
3225 (state_stack_type, semantic_stack_type, location_stack_type): these.
3226 Private, not public.
3227 * tests/c++.at: New.
3228 * tests/testsuite.at, tests/Makefile.am: Adjust.
3229
3230 2004-12-21 Akim Demaille <akim@epita.fr>
3231
3232 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
3233
3234 2004-12-21 Akim Demaille <akim@epita.fr>
3235
3236 Don't impose std::string for filenames.
3237
3238 * data/lalr1.cc (b4_filename_type): New.
3239 (position::filename): Use it.
3240 (parser.hh): Move the inclusion of stack.hh and location.hh below
3241 the user code, so that needed headers for the filename type can be
3242 included first.
3243 Forward declare them before the user code.
3244 * tests/Makefile.am (check-local, installcheck-local): Pass
3245 TESTSUITEFLAGS to the TESTSUITE.
3246
3247 2004-12-20 Akim Demaille <akim@epita.fr>
3248
3249 Use more STL like names: my_class instead of MyClass.
3250
3251 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3252 (SemanticStack, SemanticType, StateStack, StateType)
3253 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3254 (Parser::value): Rename as...
3255 (location_stack, location_type, rhs_number_type, semantic_stack)
3256 (semantic_type, state_stack, state_type, token_number_type, stack)
3257 (slice, traits, parser::yylloc, parser::yylval): these.
3258
3259 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3260
3261 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3262
3263 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3264 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3265
3266 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3267
3268 Remove uses of 'short int' and 'unsigned short int'. This raises
3269 some arbitrary limits. It uses more memory but nowadays that's
3270 not much of an issue.
3271
3272 This change does not affect the generated parsers; that's a different
3273 task, as some users will want to conserve memory there.
3274
3275 Ideally we should use size_t to represent all object counts, and
3276 something like ptrdiff_t to represent signed differences of object
3277 counts; but that will require more code-cleanup than I have the
3278 time to do right now.
3279
3280 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
3281 Use size_t, not int or short int, to count objects.
3282 * src/closure.c (nritemset, closure): Likewise.
3283 * src/closure.h (nritemset, closure): Likewise.
3284 * src/nullable.c (nullable_compute): Likewise.
3285 * src/print.c (print_core): Likewise.
3286 * src/print_graph.c (print_core): Likewise.
3287 * src/state.c (state_compare, state_hash): Likewise.
3288 * src/state.h (struct state): Likewise.
3289 * src/tables.c (default_goto, goto_actions): Likewise.
3290
3291 * src/gram.h (rule_number, rule): Use int, not short int.
3292 * src/output.c (prepare_rules): Likewise.
3293 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
3294 errs, reductions): Likewise.
3295 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
3296 Likewise.
3297 * src/tables.c (vector_number, tally, action_number,
3298 ACTION_NUMBER_MINIMUM): Likewise.
3299 * src/output.c (muscle_insert_short_int_table): Remove.
3300
3301 2004-12-17 Akim Demaille <akim@epita.fr>
3302
3303 * data/lalr1.cc: Extensive Doxygenation.
3304 (error_): Rename as...
3305 (error): this, since it is visible to the user.
3306 Adjust callers.
3307 (Parser::message): Now an automatic variable from...
3308 (Parser::yyreport_syntax_error_): here.
3309 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
3310 Parser::error.
3311 * tests/input.at: Escape $.
3312
3313 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
3314
3315 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
3316 Parenthesize rhs to avoid obscure problems with mistakes like
3317 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
3318 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3319 b4_rhs_location): Likewise.
3320 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3321 b4_rhs_location): Likewise.
3322
3323 2004-12-16 Akim Demaille <akim@epita.fr>
3324
3325 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
3326 yacc.c: be sure to stay within yycheck_.
3327 * tests/actions.at: Re-enable C++ tests.
3328
3329 2004-12-16 Akim Demaille <akim@epita.fr>
3330
3331 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
3332 real.
3333
3334 2004-12-16 Akim Demaille <akim@epita.fr>
3335
3336 Use #define to handle the %name-prefix.
3337
3338 * data/glr.c, data/yacc.c: Comment changes.
3339 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
3340 so that one can refer to yylex in the parser file, and have it
3341 renamed, as is the case with other skeletons.
3342
3343 2004-12-16 Akim Demaille <akim@epita.fr>
3344
3345 Move lalr1.cc internals into yy*.
3346
3347 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
3348 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
3349 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
3350 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
3351 (empty_, final_, terror_, errcode_, ntokens_)
3352 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
3353 (looka_, ilooka_, error_range_, nerrs_):
3354 Rename as...
3355 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
3356 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
3357 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
3358 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
3359 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
3360 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
3361 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
3362 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
3363 these.
3364
3365 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
3366
3367 Fix some problems reported by twlevo at xs4all.
3368 * src/symtab.c (symbol_new): Report an error if the input grammar
3369 contains too many symbols. This is better than calling abort() later.
3370 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
3371 (struct node, struct graph):
3372 Rename member expand to stretch. All uses changed.
3373 (struct graph): Remove member layoutalgorithm. All uses removed.
3374 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
3375 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
3376 All uses changed.
3377 (N_STRETCH): Rename from N_EXPAND. All uses changed.
3378
3379 2004-12-15 Akim Demaille <akim@epita.fr>
3380
3381 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
3382 Add more Doxygen comments.
3383 (symprint_, stack_print_, reduce_print_, destruct_, pop)
3384 (report_syntax_error_, translate_): Rename as...
3385 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
3386 (yypop_, yyreport_syntax_error_, yytranslate_): this.
3387
3388 2004-12-15 Akim Demaille <akim@epita.fr>
3389
3390 * data/lalr1.cc (lex_): Rename as...
3391 (yylex_): this.
3392 Move the trace here.
3393 Take the %name-prefix into account.
3394 Reported by Alexandre Duret-Lutz.
3395
3396 2004-12-15 Akim Demaille <akim@epita.fr>
3397
3398 Simplify the C++ parser constructor.
3399
3400 * data/lalr1.cc (debug_): Rename as...
3401 (yydebug_): so that the parser's internals are always in the yy*
3402 pseudo namespace.
3403 Adjust uses.
3404 (b4_parse_param_decl): Remove the leading comma as it is now only
3405 called as unique argument list.
3406 (Parser::Parser): Remove the constructor accepting a location and
3407 an initial debugging level.
3408 Remove from the other ctor the argument for the debugging level.
3409 (debug_level_type, debug_level, set_debug_level): New.
3410
3411 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
3412 constructor calls.
3413
3414 2004-12-15 Akim Demaille <akim@epita.fr>
3415
3416 Remove b4_root related material: failure experiment
3417 (which goal was to allow to derive from a class).
3418
3419 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
3420 definitions and uses.
3421
3422 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
3423
3424 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
3425 not 2, since it's not portable to subtract 1 from the start of an
3426 array. The new item 0 is never set or used. All uses changed.
3427
3428 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
3429 the default definition of YYLLOC_DEFAULT. Problem reported
3430 by Frank Heckenbach.
3431
3432 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
3433
3434 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
3435 the normal case and one for the error case. Just use the
3436 first one uniformly. Problem reported by Frank Heckenbach.
3437 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
3438 use exactly the same macro in both places.
3439 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
3440 so that the normal-case YYRHSLOC works for the error case too.
3441 All uses changed.
3442 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
3443 (YYLLOC_DEFAULT): Use the same macro as glr.c.
3444 * doc/bison.texinfo (Location Default Action): Don't claim that
3445 we have an array of locations. Use the same macro for both glr
3446 and lalr parsers. Mention YYRHSLOC. Mention what happens when
3447 the index is 0.
3448
3449 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3450
3451 * HACKING: Update email addresses to send announcements to.
3452
3453 * configure.ac (AC_INIT): Bump version to 1.875f.
3454
3455 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3456
3457 * NEWS: Version 1.875e.
3458 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
3459
3460 * src/scan-skel.l: Include "complain.h", for "fatal".
3461
3462 * src/relation.h (relation_print, relation_digraph):
3463 Relation sizes are of type relation_node, not size_t (this is
3464 merely a doc fix, since the two types are equivalent).
3465 (relation_transpose): Relation sizes are of type relation_node,
3466 not int.
3467 * src/relation.c: Likewise.
3468 (top, infinity): Now of type relation_node, not int.
3469 (traverse, relation_transpose): Use relation_node, not int.
3470
3471 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
3472 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
3473 (yyparse): Remove unused local introduced in 2004-10-25 patch.
3474
3475 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
3476 specifying whether the test should be skipped. Use it tp
3477 specify that the [%defines %skeleton "lalr1.cc"] tests currently
3478 fail on some hosts, and should be skipped.
3479
3480 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
3481
3482 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
3483 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
3484 unless otherwise specified below.
3485
3486 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
3487 to allocate kernel_base, kernel_items, kernel_size, since
3488 they needn't be initialized to 0.
3489 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
3490 * src/closure.c (new_closure): Likewise, for itemset.
3491 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
3492 * src/lalr.c (set_goto_map): Likewise, for temp_map.
3493 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
3494 (build_relations): Likewise for edge, states1, includes.
3495 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
3496 * src/reader.c (packgram): Likewise, for ritem, rules.
3497 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
3498 * src/relation.c (relation_digraph): Likewise for VERTICES.
3499 (relation_transpose): Likewise for new_R, end_R.
3500 * src/symtab.c (symbols_token_translations_init): Likewise for
3501 token_translations.
3502 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
3503 (token_actions): Likewise for yydefact, actrow, conflrow,
3504 conflict_list.
3505 (save_column): Likewise for froms[symno], tos[symno].
3506 (goto_actions): Likewise for state_count.
3507 (pack_table): Likewise for base, pos, check.
3508 (tables_generate): Likewise for width.
3509
3510 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
3511 for initial core. Just have a separate core, so we needn't worry
3512 about whether kernel_size and kernel_base are initialized.
3513
3514 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
3515 kernel_size, kernel_items): Remove unnecessary initialization.
3516 * src/conflicts.c (conflicts): Likewise.
3517 * src/derives.c (derives): Likewise.
3518 * src/muscle_tablc (muscle_insert): Likewise.
3519 * src/relation.c (relation_digraph): Likewise.
3520 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
3521 conflrow, conflict_table, conflict_list, table, check):
3522 Likewise.
3523
3524 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
3525 This is because all callers pass unsigned int.
3526 * src/closure.h (new_closure): Likewise.
3527
3528 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
3529 (build_relations): Initialize includes[i] in all cases.
3530 * src/reader.c (packgram): Always initialize rules[ruleno].prec
3531 and rules[ruleno].precsym. Initialize members in order.
3532 * src/relation.c (relation_transpose): Always initialize new_R[i]
3533 and end_R[i].
3534 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
3535
3536 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
3537 conflict_list[0] was always 0, but now it isn't initialized.
3538
3539 * src/table.c (table_grow): When conflict_table grew, the grown
3540 area wasn't cleared. Fix this.
3541
3542 * lib/.cvsignore: Add strdup.c, strdup.h.
3543 * m4/.cvsignore: Add strdup.m4.
3544
3545 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
3546
3547 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
3548 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
3549 GOTO_NUMBER_MAXIMUM, since we occasionally compute
3550 ngotos + 1 without checking for overflow.
3551 (build_relations): Use END_NODE, not -1, to denote end of edges.
3552 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
3553 build_relations): Use goto_number, not int, for goto numbers.
3554 * src/tables.c (save_column, default_goto): Likewise.
3555
3556 2004-11-23 Akim Demaille <akim@epita.fr>
3557
3558 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
3559 of #defining from yystype.
3560 Don't typedef yystype, C++ does not need it.
3561 This lets it possible to forward declare it as union.
3562
3563 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
3564
3565 * bootstrap (gnulib_modules): Add extensions.
3566 Problem reported by Jim Meyering.
3567
3568 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
3569
3570 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
3571 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
3572 src/system.h, src/tables.c: XFREE -> free, to accommodate
3573 recent change to gnulib xalloc.h.
3574 Problem reported by Jim Meyering.
3575
3576 2004-11-17 Akim Demaille <akim@epita.fr>
3577
3578 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
3579
3580 2004-10-28 Akim Demaille <akim@epita.fr>,
3581 Alexandre Duret-Lutz <adl@gnu.org>
3582
3583 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
3584 changes.
3585 (YYCDEBUG): Adjust.
3586 Use it instead of cdebug_.
3587 (Parser::debug_stream, Parser::set_debug_stream): New.
3588 (Parser::symprint_): Define cdebug_ for temporary backward
3589 compatibility.
3590 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
3591 debug_stream ().
3592
3593 2004-11-17 Akim Demaille <akim@epita.fr>
3594
3595 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
3596 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
3597 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
3598 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
3599
3600 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
3601
3602 * data/glr.c (yyloc_default): Remove; not used.
3603 Problem reported by Frank Heckenbach.
3604
3605 2004-10-25 Akim Demaille <akim@epita.fr>
3606
3607 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
3608 Introduce another definition to address simple location arrays.
3609 (yyGLRStack): New member: yyerror_range.
3610 (yyrecoverSyntaxError, yyparse): Update it.
3611 (yyrecoverSyntaxError): Use it when shifting the error token to
3612 have an accurate range, equivalent to the one computed by both
3613 yacc.c and lalr1.cc.
3614 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
3615 that column numbers start at column 0, as per GNU Coding
3616 Standards, the others tests, and the doc.
3617 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
3618 Adjust to the above change (first column is 0).
3619 And adjust the location of the "<error>", now covering the whole
3620 line.
3621
3622 2004-10-22 Akim Demaille <akim@epita.fr>
3623 and Paul Eggert <eggert@cs.ucla.edu>
3624
3625 Remove some arbitrary limits on goto numbers and relations.
3626 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
3627 initial values, since they're never used.
3628 (set_goto_map): ngotos is now unsigned, so test for overflow
3629 by seeing whether it wraps around to zero.
3630 * src/lalr.h (goto_number): Now size_t, not short int.
3631 (GOTO_NUMBER_MAXIMUM): Remove.
3632 * src/relation.c (relation_print, traverse, relation_transpose):
3633 Check for END_NODE rather than looking at sign.
3634 * src/relation.h (END_NODE): New macro.
3635 (relation_node): Now size_t, not short int.
3636
3637 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
3638
3639 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
3640 keyword, not an identifier. Problem reported by Baron Schwartz in
3641 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
3642
3643 2004-10-11 Akim Demaille <akim@epita.fr>
3644
3645 * src/symtab.c (symbol_check_alias_consistency): Also check
3646 type names, destructors, and printers.
3647 Reported by Alexandre Duret-Lutz.
3648 Recode the handling of associativity and precedence in terms
3649 of symbol_precedence_set.
3650 Accept no redeclaration at all, not even equal to the previous
3651 value.
3652 (redeclaration): New.
3653 Use it to factor redeclaration complaints.
3654 (symbol_make_alias): Don't set the type of the alias, let
3655 symbol_check_alias_consistency do it as for other features.
3656 * src/symtab.h (symbol): Add new member prec_location, and
3657 type_location.
3658 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
3659 * tests/input.at (Incompatible Aliases): New.
3660
3661 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
3662
3663 .cvsignore fixes to accommodate gnulib changes,
3664 and the practice of naming build directories "_build".
3665 * .cvsignore: Add "_*". Sort.
3666 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
3667 * m4/.cvsignore: Add "*_gl.m4".
3668
3669 2004-10-06 Akim Demaille <akim@epita.fr>
3670
3671 * src/parse-gram.y (add_param): Fix the truncation of trailing
3672 spaces.
3673
3674 2004-10-05 Akim Demaille <akim@epita.fr>
3675
3676 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
3677 whether the reducion was empty or not. This leaves room to
3678 improve the use of YYLLOC_DEFAULT in such a case.
3679 lalr1.cc is still experimental, so changing this is acceptable.
3680 And finally, there are probably not many users who changed the
3681 handling of locations in GLR, so changing is admissible too.
3682
3683 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
3684 empty reduction, set @$ to an empty location ending the previously
3685 stacked symbol.
3686 Adjust uses to make sure the code is triggered on empty
3687 reductions.
3688 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
3689 expected output: empty reductions have empty locations.
3690
3691 2004-09-29 Akim Demaille <akim@epita.fr>
3692
3693 * data/lalr1.cc: Move towards a more standard C++ coding style
3694 for templates: Class < T > -> Class<T>.
3695
3696 2004-09-29 Akim Demaille <akim@epita.fr>
3697
3698 * data/lalr1.cc: Reinstall the former ctor, for sake of
3699 compatibility, but warn it will be removed.
3700 Move towards a more standard C++ coding style (i.e., type *var ->
3701 type* var).
3702
3703 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
3704
3705 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
3706 since it's less likely to work if NULs are involved in the future.
3707
3708 2004-09-27 Akim Demaille <akim@epita.fr>
3709
3710 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
3711
3712 2004-09-27 Akim Demaille <akim@epita.fr>
3713
3714 * data/lalr1.cc (b4_parse_param_decl_1): New.
3715 (b4_parse_param_decl): Use it to have different names between attribute
3716 and argument names.
3717 (b4_cc_constructor_call): Likewise.
3718
3719 2004-09-24 Akim Demaille <akim@epita.fr>
3720
3721 * src/parse-gram.y (add_param): Strip the leading and trailing
3722 blanks from a formal argument declaration.
3723 (YY_LOCATION_PRINT): New.
3724
3725 2004-09-24 Akim Demaille <akim@epita.fr>
3726
3727 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
3728 after the location.
3729
3730 2004-09-24 Akim Demaille <akim@epita.fr>
3731
3732 * doc/bison.texinfo (Table of Symbols): Sort.
3733
3734 2004-09-21 Akim Demaille <akim@epita.fr>
3735
3736 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
3737 the useless parentheses.
3738 Suggested by Paul Eggert.
3739
3740 2004-09-20 Akim Demaille <akim@epita.fr>
3741
3742 Let the initial-action act on the look-ahead, and use it for the
3743 "initial push" (corresponding to an hypothetical beginning-of-file).
3744 And let lalr1.cc honor %initial-action.
3745
3746 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
3747 example.
3748 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
3749 (Parser::Parser): Remove the ctor that used to initialize it.
3750 (Parser::parse): Like in the other skeletons, issue the "starting
3751 parse" message before any action.
3752 Honor %initial-action.
3753 Initialize the stacks with the lookahead.
3754 * data/yacc.c: Let $$ and @$ in %initial-action designate the
3755 look-ahead.
3756 Push them in the stacks.
3757 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
3758
3759 2004-09-20 Akim Demaille <akim@epita.fr>
3760
3761 * doc/bison.texinfo (Initial Action Decl): New.
3762
3763 2004-09-20 Akim Demaille <akim@epita.fr>
3764
3765 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
3766 clearer criterion to define it.
3767 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
3768 When reducing on an empty RHS, use the latest stacked location as
3769 location.
3770 yylloc is not always available.
3771 * data/glr.c: Likewise.
3772 Also, honor initial-actions.
3773
3774 2004-09-20 Akim Demaille <akim@epita.fr>
3775
3776 * data/yacc.c (YY_LOCATION_PRINT): New.
3777 Define when we know YYLTYPE's structure, i.e., when the default
3778 YYLLOC_DEFAULT is used.
3779 * data/c.m4 (b4_yysymprint_generate): Use it.
3780 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
3781 value of the result.
3782 (error_start_): Replace with...
3783 (error_range_): this location array.
3784 This allows to replace code relying on the implementation of
3785 locations by portable code.
3786 * data/yacc.c (yylerrsp): Replace with...
3787 (yyerror_range): this.
3788 Every time a token is popped, update yyerror_range[0], to have an
3789 accurate location for the error token.
3790 * data/glr.c (YY_LOCATION_PRINT): New.
3791 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
3792 deference a pointer.
3793 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
3794 report the location in %printers.
3795
3796 * src/scan-skel.l: Instead of abort, report error messages to ease
3797 understanding skeleton scanning failures.
3798
3799 2004-09-16 Akim Demaille <akim@epita.fr>
3800
3801 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
3802 (iterator, const_iterator): these, to be more in the C++ spirit.
3803 Also, return reverse iterators so that when displaying the stack
3804 we display its bottom first.
3805 (Parser::stack_print_, Parser::reduce_print_): Match the messages
3806 from yacc.c.
3807 We should probably use vector here though.
3808
3809 2004-09-16 Akim Demaille <akim@epita.fr>
3810
3811 Have more complete shift traces.
3812
3813 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
3814 to report Shifts instead of ad hoc YYDPRINTF invocations,
3815 including for the error token.
3816 * data/lalr1.cc (symprint_): Output the location.
3817 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
3818 output the location within the %printer.
3819 Activate GLR tests, at least to make sure they compile properly.
3820 They still don't pass though.
3821 * tests/calc.at: Adjust expect verbose output, since now "Entering
3822 state..." is on a different line than the "Shifting" message.
3823
3824 2004-09-08 Akim Demaille <akim@epita.fr>
3825
3826 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
3827 Bison directive from the Bison file to the invocation of this
3828 macro, so that these directives are passed to
3829 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
3830 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
3831 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
3832 the extra Bison directives instead of the whole series.
3833 Change the grammar so that there are recoverable errors, and
3834 unrecoverable errors. Now we can have the parser give up before
3835 consuming the whole input. As a result we now can observe that
3836 the lookahead is freed when needed.
3837 Change the parser source to parse argv[1] instead of a hard coded
3838 string.
3839 Simplify yylex, and give a value and location to EOF.
3840 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
3841 passed directives already coded in the file.
3842 Add some tests to check the location of "error".
3843 For some tests, the C++ parser is correct, and not yacc.c.
3844 For other tests, they provide different, but unsatisfying, values,
3845 so keep the C++ value so that at least one parser is "correct"
3846 according to the test suite.
3847 (Actions after errors): Remove, this is subsumed by the
3848 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
3849
3850 2004-09-06 Akim Demaille <akim@epita.fr>
3851
3852 * data/lalr1.cc: Adjust the indentation of the labels.
3853 (Parser::pop): New.
3854 Use it.
3855
3856 2004-09-06 Akim Demaille <akim@epita.fr>
3857
3858 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
3859 argument, an informative message.
3860 Call YY_SYMBOL_PRINT.
3861 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
3862 * data/lalr1.cc (destruct_): Likewise.
3863 In addition, no longer depend on b4_yysymprint_generate and
3864 b4_yydestruct_generate to generate these functions, do it "by
3865 hand".
3866
3867 2004-09-03 Akim Demaille <akim@epita.fr>
3868
3869 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
3870 invoked, yydestruct the lookahead.
3871 * tests/calc.at (Calculator $1): Update the expected lengths of
3872 traces: there is an added line for the discarded lookahead.
3873 * doc/bison.texinfo (Destructor Decl): Some rewording.
3874 Define "discarded" symbols.
3875
3876 2004-09-02 Akim Demaille <akim@epita.fr>
3877
3878 * data/lalr1.cc (translate_, destruct_): No reason to be static.
3879
3880 2004-09-02 Akim Demaille <akim@epita.fr>
3881
3882 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
3883 (YYDSYMPRINTF): Rename as...
3884 (YY_SYMBOL_PRINT): this.
3885 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
3886 two.
3887 Use it instead of direct symprint_ calls.
3888 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
3889 one.
3890
3891 2004-09-02 Akim Demaille <akim@epita.fr>
3892
3893 * data/lalr1.cc (b4_yysymprint_generate): New.
3894 (symprint_): New member function, defined when YYDEBUG.
3895 Use it consistently instead of token/nterm debugging output by
3896 hand.
3897 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
3898 %printer calls to use cdebug_ when using lalr1.cc.
3899
3900 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
3901
3902 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
3903 with #ifdef YYDEBUG.
3904
3905 2004-08-26 Akim Demaille <akim@epita.fr>
3906
3907 * doc/bison.texinfo (Implementing Loops): Rename as...
3908 (Implementing Gotos/Loops): this.
3909
3910 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
3911
3912 Adjust to latest gnulib.
3913 * bootstrap (gnulib_modules): Add xalloc-die.
3914 Set LC_ALL=C so that file names sort consistently.
3915 Prefer the gnulib copies of gettext.m4, glibc21.m4,
3916 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
3917 uintmax_t.m4, ulonglong.m4.
3918 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
3919 po.m4 since we are now using _gl.m4 instead.
3920
3921 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
3922
3923 * src/scan-action.l: Remove. Scanning of semantic actions is
3924 handled in scan-gram.l.
3925
3926 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
3927
3928 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
3929
3930 * src/location.h (struct): The file member is a uniqstr.
3931 (equal_boundaries): Use UNIQSTR_EQ for comparison.
3932
3933 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
3934
3935 Fix bug with non-%union parsers that have printers or destructors,
3936 which led to a Bison core dump. Reported by Peter Fales in
3937 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
3938
3939 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
3940 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
3941 not to our own type.
3942 * src/output.c (symbol_destructors_output, symbol_printers_output):
3943 Don't assume %union.
3944 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
3945 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
3946 UNION-FLAG. All callers changed.
3947 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
3948 Use type char, not unsigned int, when declaring an array of char;
3949 this lets us remove a cast.
3950 (Printers and Destructors): Add non-%union test cases.
3951
3952 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3953
3954 * doc/bison.texinfo: Minor editorial changes, mostly to the new
3955 GLR writeups. E.g., avoid frenchspacing and the future tense,
3956 change "lookahead" to "look-ahead", and change "wrt" to "with
3957 respect to".
3958
3959 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3960
3961 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
3962 New sections, split off from the GLR Parsers section. Put the new
3963 Simple GLR Parser near the start of the GLR section, for clarity.
3964 Rewrite connective text.
3965
3966 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
3967
3968 * doc/bison.texinfo (Simple GLR Parsers): New section.
3969
3970 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3971
3972 * NEWS, TODO, doc/bison.texinfo:
3973 Use "look-ahead" instead of "lookahead", to be consistent.
3974 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
3975 while we're fixing "look-ahead".
3976 * src/conflicts.c (shift_set): Renamed from shiftset.
3977 (look_ahead_set): Renamed from lookaheadset.
3978 * src/print.c: Likewise.
3979 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
3980 name for "lookahead".
3981 (report_types, usage): Likewise.
3982 * src/getargs.h (report_look_ahead_tokens): Renamed from
3983 report_lookaheads.
3984 * src/lalr.c (compute_look_ahead_tokens): Renamed from
3985 compute_lookaheads.
3986 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
3987 (look_ahead_tokens_print): Renamed from lookaheads_print.
3988 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
3989 state_rule_lookaheads_print.
3990 * src/state.h: Likewise.
3991 (reductions.look_ahead_tokens): Renamed from lookaheads.
3992 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
3993 AT_DATA_LOOKAHEADS_GRAMMAR.
3994
3995 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
3996
3997 * README: Update location of patched M4 distribution.
3998
3999 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4000
4001 Don't assume the C++ compiler takes the same arguments as the C compiler
4002 (trivial change).
4003 * configure.ac (O0CXXFLAGS): New var.
4004 * tests/atlocal.in (CXXFLAGS): Use it.
4005
4006 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4007
4008 Fix some "make check" problems with C++ reported by
4009 Albert Chin-A-Young for Tru64 C++ in this thread:
4010 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4011
4012 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4013 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4014 Output to a .cc file for C++, not to a .c file.
4015 * tests/calc.at (AT_CHECK_CALC): Likewise.
4016 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4017 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4018
4019 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4020
4021 * tests/calc.at, tests/actions.at: Workaround for SGI
4022 C++ compiler. (trivial change)
4023
4024 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4025
4026 Spent a few hours checking out which prerequisite versions the
4027 current sources actually require. I went all the way back to
4028 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4029 a seemingly endless set of combinations of versions more recent
4030 than that. The bottom line is that the current sources require
4031 fairly recent versions of the build tools, and it'll be some work
4032 to change this.
4033 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4034 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4035 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4036 Add comments explaining why those particular versions are
4037 currently needed.
4038
4039 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4040 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
4041 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
4042
4043 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4044 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4045
4046 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4047
4048 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4049 0.11.5. Suggested by Bruno Haible.
4050 * bootstrap: Remove gettext version checking.
4051
4052 * doc/bison.texinfo (Decl Summary): Also mention that %union
4053 can depend on prerequisite types. Problem reported by Tim
4054 Van Holder.
4055
4056 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4057
4058 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4059 * README-alpha: Don't tell people not to package this.
4060
4061 * bootstrap: Don't assume $(...) works; use `...` instead.
4062 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4063 gettext better.
4064
4065 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4066 put into the -d output file, and mention what to do if YYSTYPE is
4067 defined as a macro.
4068
4069 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
4070
4071 Undo change made earlier today: it caused autopoint to not bring
4072 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
4073 autopoint's.
4074
4075 * bootstrap: Check that gettext version matches what's in
4076 configure.ac. Warn users to ignore robots.txt ERROR 404.
4077 * bootstrap: Undo today's earlier change (logged below).
4078 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
4079
4080 The gettext version checking is causing more trouble than it's
4081 curing; remove it. Problem reported by Paul Hilfinger.
4082
4083 * bootstrap: Issue a warning that one can expect a message
4084 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
4085 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
4086
4087 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
4088
4089 Ensure that the C++ compiler used for testing actually works on a
4090 simple test program; if not, skip the C++-related tests. Problem
4091 reported by Vin Shelton in:
4092 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
4093
4094 * m4/cxx.m4: New file.
4095 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
4096 * tests/atlocal.in (BISON_CXX_WORKS): Add.
4097 * tests/local.at (AT_COMPILE_CXX): Use it.
4098
4099 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4100
4101 * data/glr.c (yylloc): Output this macro even if locations are not
4102 being generated, as the GLR parser needs it even in that case.
4103 Problem reported by Troy A. Johnson
4104 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
4105
4106 * configure.ac (AC_INIT): Update to 1.875e.
4107
4108 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4109
4110 * NEWS: Version 1.875d.
4111 * configure.ac (AC_INIT): Likewise.
4112 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
4113
4114 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
4115 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
4116 lalr1.cc runs afoul of the first, and the last two are no longer
4117 supported by GCC 3.4.0.
4118 * README: Mention GNU m4 1.4 or later; mention m4 patches.
4119 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
4120
4121 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
4122
4123 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
4124 unsigned int, for compatibility with latest gnulib hash module.
4125 * src/state.c (state_hash, state_hasher): Likewise.
4126 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
4127 * src/uniqstr.c (hash_uniqstr): Likewise.
4128
4129 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
4130
4131 * NEWS: Unescaped newlines are no longer allowed in char & strings.
4132
4133 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
4134 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
4135 character and string literals.
4136 (unexpected_end): New function.
4137 (unexpected_eof): Use it.
4138 (unexpected_newline): New function.
4139 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
4140 actions.
4141
4142 * NEWS: Document %expect-rr.
4143
4144 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
4145 Fix typo by replacing $1 with $option.
4146 Remove more 'intl'-related files.
4147 Don't DEFUN AM_INTL_SUBDIR twice.
4148
4149 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
4150 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
4151 strtoul.c.
4152 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
4153 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
4154 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
4155 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
4156 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
4157 * src/.cvsignore: Add *.output.
4158
4159 * src/parse-gram.y: Put copyright notice inside %{ %} so it
4160 gets copied to the output file.
4161
4162 2004-04-28 Paul Eggert <eggert@twinsun.com>
4163
4164 Get files from the gnulib and po repositories, instead of relying
4165 on them being in our CVS. Upgrade to latest versions of gnulib
4166 and Automake.
4167
4168 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
4169 * bootstrap: Bootstrap from gnulib and po repositories.
4170 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
4171 * README-cvs: Document these changes. Remove version numbers from
4172 mentions of build tools, since they change so often. Mention Flex.
4173
4174 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
4175 (gl_USE_SYSTEM_EXTENSIONS): Add.
4176 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
4177 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
4178 does this for us.
4179 (AC_ISC_POSIX): Remove; we no longer support this
4180 ancient OS, as it gets in the way of latest Autoconf & gnulib.
4181 (AC_HEADER_STDC): Remove: we now assume C89 or better.
4182 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
4183 Do not check for C89 headers, except for locale.h which is used
4184 by the Yacc library and must port to K&R hosts.
4185 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
4186 Do not check for C89 functions, except for setlocale which is
4187 used by the Yacc library.
4188 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
4189 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
4190 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
4191 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
4192 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
4193 AM_GNU_GETTEXT): Remove; now done by:
4194 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
4195 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
4196 for us.
4197
4198 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
4199 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
4200 Define to empty, as gnulib.mk will do the rest for us.
4201 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
4202 for us.
4203 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
4204 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
4205
4206 * src/files.c: Include gnulib's xstrndup.h.
4207
4208 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
4209 (REALLOC): Use xnrealloc, for likewise.
4210 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
4211 (strnlen, memrchr): Remove decls; functions no longer used.
4212 Include <stpcpy.h>.
4213
4214 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
4215 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4216 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
4217 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
4218 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
4219 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
4220 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
4221 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
4222 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
4223 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
4224 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
4225 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4226 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
4227 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
4228 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
4229 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
4230 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
4231 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
4232 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4233 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
4234 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
4235 Remove, as these files are now generated automatically
4236 by bootstrap or automake.
4237
4238 * po/ChangeLog: Remove: all but one entry was a duplicate
4239 of this file, and I moved that 2000-11-02 entry here.
4240
4241 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4242 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4243 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4244 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4245 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4246 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4247 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4248 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4249 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4250 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4251 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4252 xstrndup.h.
4253 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4254 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4255 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4256 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4257 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4258 * src/.cvsignore: Remove *_.c.
4259
4260
4261 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4262 support it. (The latest stable gzip doesn't.)
4263
4264 2004-04-27 Paul Eggert <eggert@twinsun.com>
4265
4266 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4267 case, as stos_ is now used by destructors due to the 2004-02-09
4268 change.
4269
4270 Remove more K&R C support.
4271 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4272 * lib/subpipe.c (errno): Remove decl.
4273 Include <stdlib.h> unconditionally.
4274 (EXIT_FAILURE): Remove macro.
4275 * src/complain.c (vfprintf, strerror): Remove.
4276 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4277 unconditionally.
4278 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4279 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4280 (strchr, strspn, memchr): Remove decls.
4281 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
4282 unconditionally. Do not declare perror.
4283 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
4284 unconditionally.
4285
4286 * src/complain.c (_): Remove useless defn, as system.h defines this.
4287
4288 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
4289 with latest obstack.h.
4290 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
4291 to procedure types, as obstack.h now does that for us.
4292 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
4293
4294 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
4295 so that this include file can stand alone.
4296 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
4297 does this now. Include subpipe.h first after config.h, to
4298 test whether it can stand alone.
4299
4300 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
4301 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
4302 unused declaration.
4303
4304 * tests/synclines.at (%union synch line): Put a dummy member in
4305 the union, because empty unions aren't allowed in C. Caught
4306 by GCC 3.4.0.
4307
4308 2004-04-13 Jim Meyering <jim@meyering.net>
4309
4310 * src/conflicts.c (conflicts_print): Correct format string typo:
4311 use `%%' to produce literal `%'. (trivial change)
4312
4313 2004-03-30 Paul Eggert <eggert@twinsun.com>
4314
4315 * src/getargs.c (version): Update copyright year to 2004.
4316
4317 * data/c.m4 (b4_int_type): Use 'short int' rather than
4318 'short', and similarly for 'long', 'unsigned', etc.
4319 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
4320 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
4321 yy_yypstack, yydumpstack): Likewise.
4322 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
4323 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
4324 Likewise.
4325 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
4326 yy_stack_print, yyparse): Likewise.
4327 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
4328 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
4329 * lib/bitset.c (bitset_print): Likewise.
4330 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
4331 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4332 * lib/bitsetv.c (bitsetv_dump): Likewise.
4333 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
4334 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
4335 Likewise.
4336 * src/LR0.c (allocate_itemsets): Likewise.
4337 * src/gram.h (rule_number, rule): Likewise.
4338 * src/lalr.h (goto_number): Likewise.
4339 * src/nullable.c (nullable_compute): Likewise.
4340 * src/output.c (prepare_rules): Likewise.
4341 * src/relation.c (relation_print, relation_digraph): Likewise.
4342 * src/relation.h (relation_node): Likewise.
4343 * src/state.h (state_number, transitions, errs, reductions,
4344 struct state): Likewise.
4345 * src/symtab.h (symbol_number, struct symbol): Likewise.
4346 * src/tables.c (vector_number, tally, action_number,
4347 default_goto, goto_actions): Likewise.
4348 * tests/existing.at (GNU Cim Grammar): Likewise.
4349 * tests/regression.at (Web2c Actions): Likewise.
4350
4351 * src/output.c (muscle_insert_short_int_table): Renamed from
4352 muscle_insert_short_table. All uses changed.
4353
4354 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4355
4356 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
4357 (declaration): Replace expected_conflicts with expected_sr_conflicts.
4358 Add %expect-rr rule.
4359
4360 * src/scan-gram.l: Recognize %expect-rr.
4361
4362 * src/conflicts.h (expected_sr_conflicts): Rename from
4363 expected_conflicts.
4364 (expected_rr_conflicts): Declare.
4365
4366 * src/conflicts.c (expected_sr_conflicts): Rename from
4367 expected_conflicts.
4368 (expected_rr_conflicts): Define.
4369 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
4370 for GLR parsers.
4371 Use expected_sr_conflicts in place of expected_conflicts.
4372 Warn if expected_rr_conflicts used in non-GLR parser.
4373
4374 * doc/bison.texinfo: Add documentation for %expect-rr.
4375
4376 2004-03-08 Paul Eggert <eggert@gnu.org>
4377
4378 Add support for hex token numbers. Suggested by Odd Arild Olsen in
4379 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
4380
4381 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
4382 in lalr1.cc.
4383 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
4384 * src/scan-gram.l (scan_integer): New function.
4385 ({int}): Use it.
4386 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
4387 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
4388 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
4389 Say "long int", not "long", for uniformity with GNU style.
4390
4391 2004-02-25 Paul Eggert <eggert@twinsun.com>
4392
4393 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
4394 compilers. This fixes a problem with Intel's C++ compiler being
4395 chatty, reported by Guido Trentalancia in
4396 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
4397
4398 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
4399
4400 Support %destructor and merge error locations in lalr1.cc.
4401
4402 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
4403 (Parser::stos_): Define unconditionally.
4404 (Parser::destruct_): New method. Generate its body with
4405 b4_yydestruct_generate.
4406 (Parser::error_start_): New attribute.
4407 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
4408 token which are discarded.
4409 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
4410 error_start_ when erroneous token are discarded.
4411 (Parser::parse) <yyerrlab1>: Compute the location of the error
4412 token so that it covers all the discarded tokens.
4413 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
4414 it can be called with `%skeleton "lalr1.cc"', and do that.
4415
4416 2004-02-02 Paul Eggert <eggert@twinsun.com>
4417
4418 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
4419 $(top_srcdir)/lib and ../lib. This fixes a bug reported
4420 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
4421 There's no need to mention top_builddir since Automake does that
4422 for us.
4423 (INCLUDES): Remove, as Automake says it's obsolescent.
4424 Contents migrated into AM_CPPFLAGS as described above.
4425 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
4426
4427 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4428
4429 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
4430 (yyreportSyntaxError): Handle case where lookahead token is
4431 YYEMPTY.
4432
4433 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4434
4435 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
4436 resulting parsers are compilable with C++.
4437
4438 2003-12-23 Paul Eggert <eggert@twinsun.com>
4439
4440 * config/depcomp, config/install-sh: Sync with Automake 1.8.
4441 * src/output.c (output_skeleton): Rename local var.
4442 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
4443 Bison tokens, as this runs afoul of the 2003-10-07 change that
4444 disallowed NUL bytes in character constants or string literals.
4445
4446 * tests/local.at: Require Autoconf 2.59's Autotest.
4447 * tests/testsuite.at: Don't include local.at, since we now assume
4448 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
4449 including it.
4450 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
4451 multiple inclusion warnings.
4452
4453 2003-12-02 Akim Demaille <akim@epita.fr>
4454
4455 * doc/bison.texinfo (How Can I Reset the Parser): More about start
4456 conditions.
4457 From Bruno Haible.
4458
4459 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
4460
4461 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
4462
4463 2003-10-07 Paul Eggert <eggert@twinsun.com>
4464
4465 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
4466 if testsuite doesn't exist.
4467
4468 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
4469 literals, unfortunately.
4470 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
4471 Complain about NUL bytes in character constants or string literals.
4472
4473 2003-10-05 Paul Eggert <eggert@twinsun.com>
4474
4475 * NEWS: Don't document %no-default-prec, as it's still
4476 too experimental.
4477 * doc/bison.texinfo: Document %no-default-prec only if
4478 the defaultprec flag is set. Normally it's not.
4479
4480 2003-10-04 Paul Eggert <eggert@twinsun.com>
4481
4482 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
4483 non-modifiable lvalue, instead of a modifiable one.
4484 * doc/bison.texinfo (Actions): Document that $$ can
4485 be assigned to. Do not claim that $$ and $N are
4486 array element references: user code should not rely on this.
4487
4488 2003-10-01 Paul Eggert <eggert@twinsun.com>
4489
4490 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
4491 (grammar_declaration): Use it.
4492 * src/scan-gram.l: New token %no-default-prec.
4493 * tests/conflicts.at: Revamp tests to use %no-default-prec.
4494 * NEWS, doc/bison.texinfo: Document the above.
4495
4496 2003-10-01 Akim Demaille <akim@epita.fr>
4497
4498 VCG no longer supports long_straight_phase.
4499
4500 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
4501 * src/print_graph.c (print_graph): Adjust.
4502
4503 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
4504 and Paul Eggert <eggert@twinsun.com>
4505
4506 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
4507 Table of Symbols): Document %default-prec.
4508 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
4509 (grammar_declaration): Set default_prec on %default-prec.
4510 * src/scan-gram.l (%default-prec): New token.
4511 * src/reader.h (default_prec): New flag.
4512 * src/reader.c: Likewise.
4513 (packgram): Handle it.
4514 * tests/conflicts.at (%default-prec without %prec,
4515 %default-prec with %prec, %default-prec 1): New tests.
4516
4517 2003-09-30 Paul Eggert <eggert@twinsun.com>
4518
4519 * tests/testsuite.at: Include local.at, not input.at, fixing
4520 a typo in the 2003-08-25 patch.
4521
4522 2003-08-27 Akim Demaille <akim@epita.fr>
4523
4524 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
4525 GCC warnings.
4526
4527 2003-08-26 Akim Demaille <akim@epita.fr>
4528
4529 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
4530 "<\#" to avoid magic from Gnus when posting parts of this script.
4531
4532 2003-08-26 Akim Demaille <akim@epita.fr>
4533
4534 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
4535 (Parser::parse): here.
4536 Adjust: nerrs and errstatus is now replaced by...
4537 (Parser::nerrs_, Parser::errstatus_): New.
4538
4539 2003-08-25 Akim Demaille <akim@epita.fr>
4540
4541 * config/announce-gen, Makefile.cfg: New.
4542 * Makefile.am: Adjust.
4543 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
4544 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
4545
4546 2003-08-25 Akim Demaille <akim@epita.fr>
4547
4548 When reducing initial empty rules, Bison parser read an initial
4549 location that is not defined. This results in garbage, and that
4550 affects Bison's own parser. Therefore we need (i) to extend Bison
4551 to support a means to initialize this location, and (ii) to use
4552 this CVS Bison to fix CVS Bison's parser.
4553
4554 * src/reader.h, reader.c (epilogue_augment): Remove, replace
4555 with...
4556 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
4557 * src/parse-gram.y: Adjust.
4558 (%initial-action): New.
4559 (%error-verbose): Since we require CVS Bison, there is no reason
4560 not to use it.
4561 * src/scan-gram.l: Adjust.
4562 * src/Makefile.am (YACC): New, to make sure we use our own parser.
4563 * data/yacc.c (yyparse): Use b4_initial_action.
4564
4565 2003-08-25 Akim Demaille <akim@epita.fr>
4566
4567 * doc/bison.texinfo: Don't promote stdout for error messages.
4568
4569 2003-08-25 Akim Demaille <akim@epita.fr>
4570
4571 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
4572 From Alexandre Duret-Lutz.
4573
4574 2003-08-25 Akim Demaille <akim@epita.fr>
4575
4576 Version 1.875c.
4577
4578 2003-08-25 Akim Demaille <akim@epita.fr>
4579
4580 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
4581 Use them.
4582
4583 2003-08-25 Akim Demaille <akim@epita.fr>
4584
4585 * data/lalr1.cc (Parser::reduce_print_): New.
4586 Use it.
4587
4588 2003-08-25 Akim Demaille <akim@epita.fr>
4589
4590 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
4591 error recovery loops. This patch is based on
4592 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
4593 Also, augment the similarity between lalr1.cc and yacc.c.
4594 Note: the locations of error recovery rules are not correct yet.
4595
4596 * data/lalr1.cc: Comment changes to augment the similarity between
4597 lalr1.cc and yacc.c.
4598 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
4599 (yyerrlab1): Remove, but where it used to be (now the bottom part of
4600 yyerrlab), when hitting EOF, pop the whole stack here instead of
4601 merely falling thru the default error handling mechanism.
4602 (yyerrorlab): New label, with the old contents of YYERROR,
4603 plus the following change: pop the stack of rhs corresponding
4604 to the production that invoked YYERROR. That is how Yacc
4605 behaves (required by POSIX).
4606 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
4607 fail.
4608
4609 2003-08-25 Akim Demaille <akim@epita.fr>
4610
4611 Tune local.at so that people can "autom4te -l autotest calc.at -o
4612 calc" for instance, to extract a sub test suite.
4613
4614 * tests/testsuite.at: Move the initialization, Autotest version
4615 requirement, and AT_TESTED invocation into...
4616 * tests/local.at: here.
4617 * tests/testsuite.at: Include it for compatibility with Autoconf
4618 2.57.
4619 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
4620 be ignore.
4621
4622 2003-08-04 Paul Eggert <eggert@twinsun.com>
4623
4624 Rework code slightly to avoid gcc -Wtraditional warnings.
4625 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
4626 The returned value is now stored in *YY0. All callers changed.
4627 * src/output.c (merge_output): Adjust to the above change.
4628
4629 2003-07-26 Paul Eggert <eggert@twinsun.com>
4630
4631 * data/glr.c (YYASSERT): New macro.
4632 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
4633 yyresolveStates, yyprocessOneStack):
4634 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
4635 Derived from a suggestion by Frank Heckenbach.
4636
4637 2003-07-25 Paul Eggert <eggert@twinsun.com>
4638
4639 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
4640 for portability to K&R C (after ansi2knr, presumably). See
4641 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
4642 by Frank Heckenbach, though I have omitted the structure-initialization
4643 part of his glr-knr.diff patch since I recall that the Portable
4644 C Compiler didn't require that change.
4645
4646 Let the user specify how to allocate and free memory.
4647 Derived from a suggestion by Frank Heckenbach in
4648 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
4649 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
4650 All uses of free, malloc, realloc changed to use these macros,
4651 and unnecessary casts removed.
4652 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
4653
4654 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
4655
4656 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
4657 use s.empty() rather than s == "" to test for empty string; see
4658 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
4659 (trivial change)
4660
4661 2003-06-25 Akim Demaille <akim@epita.fr>
4662
4663 * config/depcomp, config/install-sh: Update from masters.
4664
4665 2003-06-20 Paul Eggert <eggert@twinsun.com>
4666
4667 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
4668 and return properly parenthesized result.
4669 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
4670 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4671 Remove unnecessary parentheses from uses.
4672 * doc/bison.texinfo (Location Default Action): Describe the
4673 conventions for parentheses.
4674
4675 2003-06-19 Paul Eggert <eggert@twinsun.com>
4676
4677 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
4678 yyreportTree): Do not assume that size_t is the same width as int,
4679 when printing sizes. Print sizes using an unsigned format.
4680 Problem reported by Frank Heckenbach in
4681 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4682
4683 Port to Forte Developer 7 C compiler.
4684 * data/glr.c (struct YYLTYPE): If locations are not being used,
4685 declare a single dummy member, as empty structs do not conform
4686 to the C standard.
4687 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
4688 the Forte Developer 7 C compiler complains that end-of-loop
4689 code is not reached.
4690
4691 2003-06-17 Paul Eggert <eggert@twinsun.com>
4692
4693 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
4694 avoid warnings from picky compilers about redefinition of PARAMS.
4695
4696 2003-06-17 Paul Eggert <eggert@twinsun.com>
4697
4698 Version 1.875b.
4699
4700 * NEWS: Document 1.875b.
4701
4702 * lib/bbitset.h: Do not include config.h; that's the includer's job.
4703 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
4704 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
4705 Don't use 'index' in comments, as it's a builtin fn on some hosts.
4706 * lib/bitset_stats.c: Include gettext.h unconditionally, as
4707 per recent gettext manual's suggestion.
4708 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
4709 Use prototypes, not old-style definitions.
4710 * lib/lbitset.c (lbitset_unused_clear): Likewise.
4711 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
4712 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
4713 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
4714 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
4715 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
4716 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
4717 vbitset_or_and_cmp, vbitset_copy): Likewise.
4718
4719 * lib/libiberty.h: Do not include config.h; that's the includer's job.
4720 Do not include <stdlib.h>.
4721 (PARAMS): Define unconditionally for C89.
4722 (ATTRIBUTE_NORETURN): Remove.
4723 (ATTRIBUTE_UNUSED): Define unconditionally.
4724
4725 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
4726 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
4727 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
4728 * lib/vbitset.c, lib/vbitset.h: New files.
4729 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
4730 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
4731 from libbitset.
4732
4733 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
4734 `How Can I Reset @code{yyparse}', since texinfo does not allow
4735 arbitrary @ in node names.
4736
4737 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
4738 shouldn't be needed according to the gettext 0.12.1 documentation
4739 but which seem to be needed anyway: codeset.m4 glibc21.m4
4740 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
4741 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
4742 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
4743
4744 * lib/.cvsignore: Add stdbool.h.
4745 * m4/.cvsignore: Add nls.m4, po.m4.
4746
4747 Upgrade to CVS gnulib.
4748 * stdbool_.h: File renamed from stdbool.h.in.
4749 * configure.ac (AM_STDBOOL_H): Invoke this instead of
4750 AC_HEADER_STDBOOL.
4751 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
4752 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
4753 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
4754 (MOSTLYCLEANFILES): New var.
4755 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
4756 (stdbool.h): New rule.
4757 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
4758 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
4759 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
4760 m4/quote.m4: Upgrade to today's gnulib.
4761
4762 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
4763 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
4764 the tests right now.
4765 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
4766 yyerror are declared before use; C99 requires this.
4767
4768 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4769
4770 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
4771 first.
4772 (yyrecoverSyntaxError): Correct the logic for setting and testing
4773 yyerrState.
4774 Correct comment on handling EOF.
4775 Allow states with only a default reduction, rather than failing
4776 (I can't quite reconstruct why these were not allowed before).
4777
4778 Fixes to avoid problem that $-N rules in GLR parsers can cause
4779 buffer overruns, corrupting state.
4780
4781 * src/output.c (prepare_rules): Output max_left_semantic_context
4782 definition.
4783 * src/reader.h (max_left_semantic_context): New variable declaration.
4784 * src/scan-gram.l (max_left_semantic_context): Define.
4785 (handle_action_dollar): Update max_left_semantic_context.
4786 * data/glr.c (YYMAXLEFT): New definition.
4787 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
4788 (yyresolveAction): Ditto.
4789
4790 Fixes to problems with location handling in GLR parsers reported by
4791 Frank Heckenbach (2003/06/05).
4792
4793 * data/glr.c (YYLTYPE): Make trivial if locations not used.
4794 (YYRHSLOC): Add parentheses, and define only if locations used.
4795 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
4796 locations not used.
4797 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
4798 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
4799
4800 * tests/cxx-type.at: Exercise location information; update tests
4801 to differentiate output with and without locations.
4802 Remove forward declarations of yylex and yyerror---caused errors
4803 because default YYLTYPE not yet defined.
4804 Change semantic actions to compute strings, rather than printing
4805 them directly (to test proper passing of semantics values). Change
4806 output to prefix notation and update test data and expected results.
4807 (yylex): Track locations.
4808 (stmtMerge): Return value rather than printing, and include arguments
4809 in value.
4810
4811 2003-06-03 Paul Eggert <eggert@twinsun.com>
4812
4813 Avoid warnings generated by GCC 2.95.4 when Bison is
4814 configured with --enable-gcc-warnings.
4815 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
4816 yy::]b4_parser_class_name[::translate_,
4817 yy::Stack::operator[] (unsigned),
4818 yy::Stack::operator[] (unsigned) const,
4819 yy::Slice::operator[] (unsigned),
4820 yy::Slice::operator[] (unsigned) const):
4821 Rename local vars to avoid warnings.
4822 * tests/glr-regression.at (Improper handling of embedded actions
4823 and $-N in GLR parsers): Remove unused local variable from yylex.
4824 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
4825 (void) as arg when not pure, since we now assume C89 when building
4826 Bison. Pacify GCC by using parameter.
4827
4828 2003-06-02 Paul Eggert <eggert@twinsun.com>
4829
4830 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
4831 yy::Location::lines, yy::Location::columns): Rename arguments
4832 to avoid shadowing; this removes a warning generated by GCC 3.3.
4833
4834 2003-06-01 Paul Eggert <eggert@twinsun.com>
4835
4836 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
4837 to g++, as GCC 3.3 complains if you do it.
4838 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
4839 everything that WARNING_CFLAGS has, except omit warnings
4840 not suitable for C++.
4841 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
4842 * tests/atlocal.in (CXXFLAGS): New var.
4843 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
4844
4845 Fix a GLR parser bug I reported in February; see
4846 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
4847 The problem was that GLR parsers did not conform to the C standard,
4848 because actions like { $1 = $2 + $3; } expanded to expressions
4849 that invoked YYFILL in separate subexpressions, and YYFILL assigned
4850 to a local variable. The C standard says that expressions
4851 like (var = f ()) + (var = f ()) have undefined behavior.
4852 Another problem was that GCC sometimes issues warnings that
4853 yyfill and its parameters are unused.
4854
4855 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
4856 as possibly unused.
4857 (yyfill): New function.
4858 (YYFILL): Use it.
4859 (yyuserAction): Change type of yynormal to bool, so that it matches
4860 the new yyfill signature. Mark it as possibly unused.
4861
4862
4863 Follow up on a bug I reported in February, where a Bison-generated
4864 parser can loop. Provide a test case and a fix for yacc.c. I
4865 don't have a fix for lalr1.cc or for glr.c, unfortunately.
4866 The original bug report is in:
4867 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
4868
4869 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
4870 macro's size was becoming unwieldy.
4871 (yyerrlab): Do not discard an empty lookahead symbol, as this
4872 might destroy garbage.
4873 (yyerrorlab): New label, with the old contents of YYERROR,
4874 plus the following change: pop the stack of rhs corresponding
4875 to the production that invoked YYERROR. That is how Yacc
4876 behaves, and POSIX requires this behavior.
4877 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
4878 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
4879 Define 'alarm' to do nothing if unistd.h is not available.
4880 Add a new rule "exp: '-' error;" to test the above change to
4881 data/yacc.c. Use 'alarm' to abort any test taking longer than
4882 10 seconds, as it's probably looping.
4883 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
4884 Also, the new yacc.c generates two fewer diagnostics for an
4885 existing test.
4886
4887 2003-05-24 Paul Eggert <eggert@twinsun.com>
4888
4889 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
4890 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
4891 This fixes a problem reported by John Bowman when the Compaq/HP
4892 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
4893 -ansi -Wall -gall).
4894 * data/yacc.c (union yyalloc): Likewise.
4895 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
4896
4897 Switch from 'int' to 'bool' where that makes sense.
4898
4899 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
4900 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
4901 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
4902 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
4903 Return or accept bool, not int. All callers changed.
4904 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
4905 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
4906 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
4907 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
4908 bitset_or_and_cmp_): Likewise.
4909 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
4910 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
4911 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
4912 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
4913 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
4914 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
4915 bitset_stats_or_and_cmp): Likewise.
4916 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
4917 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
4918 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
4919 ebitset_xor_cmp): Likewise.
4920 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
4921 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
4922 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
4923 lbitset_xor_cmp): Likewise.
4924 * lib/bbitset.h: Include <stdbool.h>.
4925 (struct bitset_vtable): The following members now return bool, not
4926 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
4927 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
4928 or_and_cmp).
4929 * src/conflicts.c (count_rr_conflicts): Likewise.
4930 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
4931 All uses changed.
4932 * lib/ebitset.c (ebitset_obstack_init): Likewise.
4933 * lib/lbitset.c (lbitset_obstack_init): Likewise.
4934 * src/getargs.c (debug_flag, defines_flag, locations_flag,
4935 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4936 graph_flag): Likewise.
4937 * src/getargs.h (debug_flag, defines_flag, locations_flag,
4938 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4939 graph_flag): Likewise.
4940 * src/output.c (error_verbose): Likewise.
4941 * src/output.h (error_verbose): Likewise.
4942 * src/reader.c (start_flag, typed): Likewise.
4943 * src/reader.h (typed): Likewise.
4944 * src/getargs.c (LOCATIONS_OPTION): New constant.
4945 (long_options, getargs): Use it.
4946 * src/lalr.c (build_relations): Use bool, not int.
4947 * src/nullable.c (nullable_compute): Likewise.
4948 * src/print.c (print_reductions): Likewise.
4949 * src/tables.c (action_row, pack_vector): Likewise.
4950 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
4951 * src/output.c (prepare): Use it.
4952 * src/output.c (token_definitions_output,
4953 symbol_destructors_output, symbol_destructors_output): Use string,
4954 not boolean integer, to keep track of whether to output separator.
4955 * src/print_graph.c (print_core): Likewise.
4956 * src/state.c (state_rule_lookaheads_print): Likewise.
4957
4958 * config/install-sh: Sync from automake 1.7.5.
4959
4960 2003-05-14 Paul Eggert <eggert@twinsun.com>
4961
4962 * src/parse-gram.y (rules_or_grammar_declaration): Require a
4963 semicolon after a grammar declaration, in the interest of possible
4964 future changes to the Bison input language.
4965 Do not allow a stray semicolon at the start of the grammar.
4966 (rhses.1): Allow one or more semicolons after any rule, including
4967 just before "|" as required by POSIX.
4968 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
4969 grammar.
4970
4971 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
4972
4973 %parse-param support for lalr1.cc.
4974
4975 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
4976 b4_cc_constructor_calls, b4_cc_constructor_call,
4977 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
4978 definitions.
4979 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
4980 parse-param arguments.
4981 (yy::b4_parser_class_name): Declare instance variables to
4982 hold parse-param arguments.
4983 * tests/calc.at: s/value/semantic_value/ because value clashes
4984 with a member of yy::b4_parser_class_name. Adjust C++ code
4985 to handle %parse-param. Enable %parse-param test in C++.
4986
4987 2003-05-12 Paul Eggert <eggert@twinsun.com>
4988
4989 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
4990 English a bit. Fix fclose typo. Change "const char" to "char
4991 const", and use ANSI C rather than K&R for "main". Suggest
4992 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
4993 and suggest yy_switch_to_buffer.
4994
4995 2003-05-05 Paul Eggert <eggert@twinsun.com>
4996
4997 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
4998 C89. This avoids a diagnostic on compilers that define __STDC__
4999 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
5000 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5001
5002 2003-05-03 Paul Eggert <eggert@twinsun.com>
5003
5004 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5005 Do not overrun array bounds.
5006 This should fix a bug reported today by Olatunji Oluwabukunmi in
5007 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
5008
5009 2003-04-29 Akim Demaille <akim@epita.fr>
5010
5011 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5012 * src/getargs.c, src/getargs.h: here, as bool, not int.
5013 (nondeterministic_parser): New.
5014 * src/parse-gram.y, src/scan-gram.l: Support
5015 %nondeterministic-parser.
5016 * src/output.c (prepare): Use nondeterministic_parser instead
5017 of glr_parser where appropriate.
5018 * src/tables.c (conflict_row, action_row, save_row)
5019 (token_actions, token_actions, pack_vector): Ditto.
5020
5021 2003-04-29 Akim Demaille <akim@epita.fr>
5022
5023 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5024
5025 2003-04-29 Akim Demaille <akim@epita.fr>
5026
5027 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5028 with %pure-parser and %locations to exercise the patch from Yakov
5029 Markovitch below.
5030
5031 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5032
5033 * data/yacc.c: (b4_lex_param): Corrected for the case where
5034 %lex-param is provided and %pure-parser isn't.
5035
5036 2003-04-27 Paul Eggert <eggert@twinsun.com>
5037
5038 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
5039 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
5040 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5041 if it is not defined.
5042 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5043
5044 2003-04-26 Paul Eggert <eggert@twinsun.com>
5045
5046 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5047 Declare to be of type suitable for the ninf value itself, not of
5048 type suitable for the corresponding table, since the latter might
5049 be unsigned but the ninf value might be negative. This fixes a
5050 bug reported by Alexandre Duret-Lutz in
5051 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
5052
5053 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5054 invokes it. We shouldn't invoke it twice because it will attempt
5055 to put error.o in the archive twice. This fixes a glitch reported
5056 by Martin Mokrejs in
5057 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5058
5059 2003-04-21 Paul Eggert <eggert@twinsun.com>
5060
5061 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5062 to gnulib.
5063
5064 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5065
5066 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5067 Fix obvious typo that results in uncompilable GLR parsers
5068 when both %pure-parser and %locations are used. (trivial change)
5069
5070 2003-04-17 Paul Eggert <eggert@twinsun.com>
5071
5072 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
5073 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
5074 Do not insert the expected token via unput, as this runs afoul
5075 of a POSIX-compatibility bug in flex 2.5.31.
5076 All uses changed to BEGIN the parent state,
5077 since we no longer insert the expected token via unput.
5078 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
5079 that is no longer emitted after the above change.
5080
5081 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
5082 the first one. This change is from Paul Hilfinger, and it fixes
5083 regression reported by Werner Lemberg in
5084 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5085
5086 (resolve_sr_conflict): Don't invoke state_errs_set
5087 unless one or more tokens have been explicitly made errors.
5088 Otherwise, the above change causes Bison to abort.
5089
5090 * tests/existing.at (GNU pic Grammar): New test case, taken from
5091 Lemberg's email.
5092
5093 2003-03-31 Akim Demaille <akim@epita.fr>
5094
5095 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
5096
5097 2003-03-31 Akim Demaille <akim@epita.fr>
5098
5099 * src/output.c (prepare_symbols): Avoid trailing spaces in the
5100 output.
5101
5102 2003-03-31 Akim Demaille <akim@epita.fr>
5103
5104 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
5105 From Paul Hilfinger.
5106
5107 2003-03-29 Akim Demaille <akim@epita.fr>
5108
5109 * m4/error.m4: Do not put under dynamic conditions some code which
5110 expansion is under static control.
5111
5112 2003-03-29 Akim Demaille <akim@epita.fr>
5113
5114 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
5115
5116 2003-03-29 Akim Demaille <akim@epita.fr>
5117
5118 * doc/bison.texinfo (Strings are Destroyed): New.
5119
5120 2003-03-13 Paul Eggert <eggert@twinsun.com>
5121
5122 * .cvsignore: Add configure.lineno.
5123 * src/.cvsignore: Add yacc.
5124 * tests/.cvsignore: Add testsuite.log.
5125 * doc/fdl.texi: Sync with latest FSF version.
5126
5127 2003-03-12 Paul Eggert <eggert@twinsun.com>
5128
5129 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
5130 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
5131 cursor, instead of leaving it undefined. This fixes a bug
5132 reported by Tim Van Holder in
5133 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
5134 * tests/input.at (Torturing the Scanner): Test the scanner on
5135 an empty input file, which was Tim Van Holder's test case.
5136
5137 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
5138 <sys/resource.h> can be included, include sys/time.h and
5139 sys/times.h first, if available. This works around the SunOS
5140 4.1.4 porting bug reported by Bruce Becker in
5141 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
5142
5143 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
5144 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
5145 AC_HEADER_SYS_WAIT.
5146
5147 Merge changes from gnulib. This was prompted because the CVS
5148 snapshot didn't build on Solaris 7 due to strnlen problems.
5149
5150 These changes need to be merged back into gnulib:
5151 * lib/hash.c: Include <stdbool.h> unconditionally.
5152 * m4/onceonly.m4 (m4_quote): New macro.
5153 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
5154 Quote AC_FOREACH variable-expansions properly.
5155 The 2003-01-03 obstack.h change also needs merging.
5156 {end of changes requiring merging}
5157
5158 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5159 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
5160 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
5161 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
5162 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
5163 New files, imported from gnulib.
5164 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
5165 above.
5166
5167 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
5168 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
5169 gnulib sources.
5170
5171 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
5172 Add.
5173 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
5174 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
5175 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
5176 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
5177 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
5178 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
5179 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
5180 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
5181 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
5182 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
5183 (jm_PREREQ_ARGMATCH): Remove.
5184 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
5185 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
5186
5187 * src/system.h: Include <stdbool.h> unconditionally.
5188
5189 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
5190 assuming at least C89 in the bitset code for some time now.
5191
5192 2003-03-03 Akim Demaille <akim@epita.fr>
5193
5194 * ro.po: New.
5195
5196 2003-03-02 Akim Demaille <akim@epita.fr>
5197
5198 * doc/bison.texinfo (Table of Symbols): Reactivate the
5199 documentation for %lex-param, and %parse-param.
5200
5201 2003-03-02 Akim Demaille <akim@epita.fr>
5202
5203 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
5204 generate verbose error messages.
5205 Use the number of tokens as an upper bound in yytname, as it
5206 cannot be a non terminal.
5207
5208 2003-03-02 Akim Demaille <akim@epita.fr>
5209
5210 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
5211 message.
5212
5213 2003-03-02 Akim Demaille <akim@epita.fr>
5214
5215 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
5216 Use them to exercise yycheck overrun.
5217 Based on Andrew Suffield's grammar.
5218
5219 2003-03-02 Akim Demaille <akim@epita.fr>
5220
5221 Create tests/local.at for Bison generic testing macros.
5222
5223 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
5224 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5225 This new file.
5226 * tests/calc.at (AT_CHECK_CALC): Adjust.
5227 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
5228 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
5229 * tests/local.at: here.
5230 (AT_COMPILE_CXX): Tags the tests using it as c++.
5231 Ignore the test if CXX is not functional.
5232
5233 2003-03-01 Paul Eggert <eggert@twinsun.com>
5234
5235 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5236 not loc->end, since loc->end might contain garbage and this leads
5237 to undefined behavior on some platforms.
5238 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5239 depend on *loc, so that the reader doesn't give the the false
5240 impression that *loc is initialized.
5241 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5242 does not survive the return.
5243
5244 2003-03-01 Akim Demaille <akim@epita.fr>
5245
5246 * src/scan-gram.l (code_start): Always initialize it when entering
5247 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5248 yylex invocation. An alternative would be making it static, but
5249 then it starts with the second %%'s beginning, instead of its end.
5250
5251 2003-02-28 Paul Eggert <eggert@twinsun.com>
5252
5253 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5254 around a UnixWare 7.1.1 porting bug reported by John Hughes in
5255 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
5256
5257 2003-02-26 Paul Eggert <eggert@twinsun.com>
5258
5259 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5260 Remove Sequent/Pyramid discussion (nobody uses them any more).
5261 Merge VMS and MS-DOS discussion; these ports may well be dead
5262 but let's keep mentioning them for now. Put <> around email
5263 addresses. Add copyright notice.
5264
5265 2003-02-24 Paul Eggert <eggert@twinsun.com>
5266
5267 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5268 to avoid collision with flex use of yylineno.
5269 Problem reported by Bruce Lilly in
5270 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
5271 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5272 * data/yacc.c (yy_reduce_print): Likewise.
5273
5274 * config/depcomp: Sync with Automake 1.7.3.
5275
5276 2003-02-21 Akim Demaille <akim@epita.fr>
5277
5278 * data/lalr1.cc: Use temporary variables instead of casts to
5279 change integer types.
5280 Suggested by Paul Eggert.
5281
5282 2003-02-21 Akim Demaille <akim@epita.fr>
5283
5284 * doc/bison.texinfo: Use "location" consistently to refer to @n,
5285 to avoid confusions with lalr1.cc's notion of Position.
5286 Suggested by Paul Eggert.
5287
5288 2003-02-20 Akim Demaille <akim@epita.fr>
5289
5290 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
5291 before initial_columns.
5292 (location.hh): Use consistent variable names when defining the
5293 operator<<.
5294 Use "last" so that we subtract from Positions, not from unsigned.
5295
5296 2003-02-20 Akim Demaille <akim@epita.fr>
5297
5298 * data/lalr1.cc (position.hh): New subfile, including the extended
5299 and Doxygen'ed documentation of class Position.
5300 (location.hh): Use it.
5301 Document a` la Doxygen.
5302 With the help of Benoit Perrot.
5303
5304 2003-02-20 Akim Demaille <akim@epita.fr>
5305
5306 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
5307 AT_YACC_IF.
5308 Redefine AT_YYERROR_SEES_LOC_IF using it.
5309 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
5310 not defined.
5311 Don't use the location in yy::Parser::error_ and
5312 yy::Parser::print_ when not %locations.
5313 Activate more lalr1.cc tests.
5314
5315 2003-02-19 Akim Demaille <akim@epita.fr>
5316
5317 * data/lalr1.cc: When displaying a line number, be sure to make it
5318 an int.
5319
5320 2003-02-19 Akim Demaille <akim@epita.fr>
5321
5322 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
5323 Remove, useless.
5324 (YYABORT, YYACCEPT, YYERROR): New.
5325 * tests/calc.at: Renable the lalr1.cc test.
5326
5327 2003-02-19 Akim Demaille <akim@epita.fr>
5328
5329 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
5330 error recovery, mixing with/without pops and discarding of the
5331 lookahead.
5332 Exercise YYERROR.
5333 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
5334
5335 2003-02-17 Paul Eggert <eggert@twinsun.com>
5336
5337 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
5338 * tests/testsuite.at (AT_COMPILE): Use them.
5339 This fixes the testsuite problem reported by Robert Lentz in
5340 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
5341
5342 2003-02-12 Paul Eggert <eggert@twinsun.com>
5343
5344 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
5345 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
5346 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
5347 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
5348 Check for malloc failure, for consistency with yacc.c.
5349 (yytname_size): Remove, for consistency with yacc.c.
5350
5351 The bug still remains in data/lalr1.cc, as I didn't have time
5352 to fix it there.
5353
5354 2003-02-06 Akim Demaille <akim@epita.fr>
5355
5356 * configure.ac (GXX): Rename as...
5357 (CXX): this, to keep the original Autoconf semantics.
5358 Require 2.57.
5359 * data/lalr1.cc: Fix b4_copyright invocations.
5360 If YYDEBUG is not defined, don't depend upon name_ being defined.
5361 (location.hh): Include string and iostream.
5362 (Position::filename): New member.
5363 (Position::Position ()): New.
5364 (operator<< (Position)): New.
5365 (operator- (Position, int)): New.
5366 (Location::first, Location::last): Rename as...
5367 (Location::begin, Location::end): these, to mock the conventional
5368 iterator names.
5369 (operator<< (Location)): New.
5370 * tests/atlocal.in (CXX): New.
5371 * tests/testsuite.at (AT_COMPILE_CXX): New.
5372 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
5373 locations in a more synthetic way.
5374 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
5375 lalr1.cc is used.
5376 Adjust the C locations to match those from Emacs: first column is
5377 column 0.
5378 Change all the expected results.
5379 Conform to the GCS: simplify the locations when applicable.
5380 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
5381 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
5382 these CPP macros with the m4 macros new defined by...
5383 (AT_CHECK_PUSHDEFS): this, i.e.:
5384 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
5385 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
5386 New macros.
5387 (AT_CHECK_POPDEFS): Undefine them.
5388 (AT_CHECK_CALC_LALR1_CC): New.
5389 Use it for the first lalr1.cc test.
5390
5391 2003-02-04 Akim Demaille <akim@epita.fr>
5392
5393 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
5394 Location as is defined.
5395
5396 2003-02-04 Akim Demaille <akim@epita.fr>
5397
5398 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
5399 name_ being defined.
5400
5401 2003-02-03 Paul Eggert <eggert@twinsun.com>
5402
5403 * src/gram.h (start_symbol): Remove unused decl.
5404
5405 Use more-consistent naming conventions for local vars.
5406
5407 * src/derives.c (derives_compute): Change type of local var from
5408 int to rule_number.
5409 * src/gram.c (grammar_rules_partial_print): Likewise.
5410 * src/print.c (print_core): Likewise.
5411 * src/reduce.c (reduce_grammar_tables): Likewise.
5412
5413 * src/gram.c (grammar_dump): Change name of item_number *
5414 local var from r to rp.
5415 * src/nullable.c (nullable_compute): Likewise.
5416
5417 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
5418
5419 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
5420 for symbol or symbol_number var.
5421 * src/reader.c (grammar_start_symbol_set): Likewise.
5422 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
5423 Likewise.
5424 * src/state.c (transitions_to): Likewise.
5425 * src/state.h: Likewise.
5426 * src/tables.c (symbol_number_to_vector_number): Likewise.
5427
5428 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
5429 char * var.
5430
5431 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
5432 var.
5433
5434 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
5435 var.
5436
5437 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
5438 Use str, not s, for char * var. Use ch, not c, for character var.
5439 Use size for size var.
5440
5441 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
5442 char * var.
5443 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
5444 uniqstr var.
5445 * src/uniqstr.h: Likewise.
5446
5447 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
5448 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
5449 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
5450 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
5451 param to have same name as that of enum, so that we don't use
5452 "s" to stand for a non-state.
5453
5454 2003-02-02 Akim Demaille <akim@epita.fr>
5455
5456 * src/scan-skel.l: Scan more than one inert character per yylex
5457 invocation.
5458
5459 2003-02-01 Paul Eggert <eggert@twinsun.com>
5460
5461 Version 1.875a.
5462
5463 * po/LINGUAS: Add ms.
5464
5465 2003-01-30 Akim Demaille <akim@epita.fr>
5466
5467 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
5468
5469 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5470
5471 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
5472 of $1.
5473
5474 Changes in response to error report by S. Eken: GLR mode does not
5475 handle negative $ indices or $ indices in embedded rules correctly.
5476 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
5477
5478 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
5479 (b4_rhs_location): Ditto.
5480 (yyfill): New function to copy from stack tree into array
5481 incrementally.
5482 (yyuserAction): Modify to allow incremental move of semantic values
5483 to rhs array when in GLR mode.
5484 Define YYFILL to use in user-defined actions to fill semantic array
5485 as needed.
5486 Remove dummy use of yystack, as there is now a guaranteed use.
5487 (yydoAction): Modify to allow incremental move of semantic values
5488 to rhs array when in GLR mode.
5489 (yyresolveAction): Ditto.
5490 (yyglrShiftDefer): Update comment.
5491 (yyresolveStates): Use X == NULL for pointers, not !X.
5492 (yyglrReduce): Ditto.
5493 (yydoAction): Ditto
5494
5495 * tests/glr-regr1.at: Rename to ...
5496 * tests/glr-regression.at: Add new regression test for the problems
5497 described above (adapted from S. Eken).
5498 Update copyright notice.
5499 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
5500 * tests/Makefile.am: Ditto.
5501
5502 2003-01-28 Paul Eggert <eggert@twinsun.com>
5503
5504 * data/lalr1.cc: Do not use @output_header_name@ unless
5505 b4_defines_flag is set. This fixes two bugs reported by
5506 Tim Van Holder in
5507 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
5508 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
5509
5510 2003-01-21 Paul Eggert <eggert@twinsun.com>
5511
5512 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
5513 we don't need to worry about yyerrlab1 being reported as an
5514 "unused label" by non-GCC C compilers. The downside is that if
5515 locations are used then a couple of statements are duplicated each
5516 time YYERROR is invoked, but the upside is that the warnings
5517 should vanish.
5518 (yyerrlab1): Move code to YERROR.
5519 (yyerrlab2): Remove. Change uses back to yyerrlab1.
5520 This reverts some of the 2002-12-27 change.
5521
5522 2003-01-17 Paul Eggert <eggert@twinsun.com>
5523
5524 * src/output.c (symbol_printers_output): Fix typo that led
5525 to core dump. Problem reported by Antonio Rus in
5526 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
5527
5528 2003-01-13 Akim Demaille <akim@epita.fr>,
5529 Quoc Peyrot <chojin@lrde.epita.fr>,
5530 Robert Anisko <anisko_r@lrde.epita.fr>
5531
5532 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
5533 when the stacks contain one element, as the loop would otherwise
5534 free the last state, and then use the top state (the one we just
5535 popped). This means that the initial elements will not be freed
5536 explicitly, as is the case in yacc.c; it is not a problem, as
5537 these elements have fake values.
5538
5539 2003-01-11 Paul Eggert <eggert@twinsun.com>
5540
5541 * NEWS: %expect-violations are now just warnings, reverting
5542 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
5543 bootstrapping problem reported by Matthias Klose; see
5544 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
5545 * src/conflicts.c (conflicts_print): Likewise.
5546 * tests/conflicts.at (%expect not enough, %expect too much,
5547 %expect with reduce conflicts): Likewise.
5548 * doc/bison.texinfo (Expect Decl): Document this. Also mention
5549 that the warning is enabled if the number of conflicts changes
5550 (not necessarily increases).
5551
5552 * src/getargs.c (version): Update copyright year.
5553
5554 2003-01-09 Akim Demaille <akim@epita.fr>
5555
5556 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
5557
5558 2003-01-08 Paul Eggert <eggert@twinsun.com>
5559
5560 * Makefile.maint (WGETFLAGS):
5561 New macro, containing "-C off" to disable proxy caches.
5562 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
5563 (rel-check): Use $(WGET) instead of wget.
5564
5565 2003-01-06 Paul Eggert <eggert@twinsun.com>
5566
5567 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
5568 the GLR paper of Scott, Johnstone and Hussain.
5569
5570 2003-01-04 Paul Eggert <eggert@twinsun.com>
5571
5572 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
5573 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
5574 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
5575 (EXTRA_LIBRARIES): New var, for liby.a.
5576 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
5577 (EXTRA_SCRIPTS): New var, for yacc.
5578
5579 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
5580 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
5581 Problem reported by Nelson H. F. Beebe.
5582
5583 2003-01-03 Paul Eggert <eggert@twinsun.com>
5584
5585 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
5586 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
5587 when compiling Bison 1.875's `bitset bset = obstack_alloc
5588 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
5589
5590 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
5591 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
5592 grow to a huge size with typical invocation.
5593
5594 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
5595 Use the pattern recommended by Autoconf 2.57, except also protect
5596 against double-definition.
5597 * src/system.h: Likewise.
5598 Portability issues reported by Nelson H. F. Beebe.
5599
5600 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
5601 All uses changed. Provide a definition in both C and C++.
5602 (yytrue, yyfalse): Define even if defined (__cplusplus).
5603
5604 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
5605 Reported by Nelson H. F. Beebe.
5606
5607 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
5608
5609 2003-01-02 Paul Eggert <eggert@twinsun.com>
5610
5611 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
5612 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
5613 Bug reported by Nelson H. F. Beebe.
5614
5615 2003-01-01 Paul Eggert <eggert@twinsun.com>
5616
5617 * Version 1.875.
5618
5619 2002-12-30 Paul Eggert <eggert@twinsun.com>
5620
5621 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
5622 Moved here from...
5623 (<INITIAL>","): Here. This causes stray "," to be treated
5624 more uniformly.
5625
5626 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
5627 last brace in braced code when not in Yacc mode, for compatibility
5628 with Bison 1.35. This resurrects the 2001-12-15 patch to
5629 src/reader.c.
5630
5631 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
5632 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
5633
5634 2002-12-28 Paul Eggert <eggert@twinsun.com>
5635
5636 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
5637 that of SYM's type. This fixes Debian bug 168069, reported by
5638 Thomas Olsson.
5639
5640 2002-12-28 Paul Eggert <eggert@twinsun.com>
5641
5642 Version 1.75f.
5643
5644 Switch back to the Yacc style of conflict reports, undoing some
5645 of the 2002-07-30 change.
5646 * doc/bison.texinfo (Understanding): Use Yacc style for
5647 conflict reports. Also, use new way of locating rules.
5648 * src/conflicts.c (conflict_report):
5649 Renamed from conflict_report_yacc, removing the old
5650 'conflict_report'. Translate the entire conflict report at once,
5651 so that we don't assume that "," has the same interpretation in
5652 all languages.
5653 (conflicts_output): Use Yacc-style conflict report for each state,
5654 instead of our more-complicated style.
5655 (conflicts_print): Use Yacc-style conflict report, except print
5656 the input file name when not emulating Yacc.
5657 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
5658 Conflicted Reduction, %expect not enough, %expect too much,
5659 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
5660 * tests/existing.at (GNU Cim Grammar): Likewise.
5661 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
5662
5663 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
5664 fatal): Don't invoke fflush; it's not needed and it might even be
5665 harmful for stdout, as stdout might not be open.
5666 * src/reduce.c (reduce_print): Likewise.
5667
5668 2002-12-27 Paul Eggert <eggert@twinsun.com>
5669
5670 Fix a bug where error locations were not being recorded correctly.
5671 This problem was originally reported by Paul Hilfinger in
5672 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
5673
5674 * data/yacc.c (yyparse): New local var yylerrsp, to record the
5675 top of the location stack's error locations.
5676 (yyerrlab): Set it. When discarding a token, push its location
5677 onto yylerrsp so that we don't lose track of the error's end.
5678 (yyerrlab1): Now is only the target of YYERROR, so that we can
5679 properly record the location of the action that failed. For GCC
5680 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
5681 GCC warning about yyerrlab1 being unused if YYERROR is unused.
5682 (yyerrlab2): New label, which yyerrlab now falls through to.
5683 Compute the error's location by applying YYLLOC_DEFAULT to
5684 the locations of all the symbols that went into the error.
5685 * doc/bison.texinfo (Location Default Action): Mention that
5686 YYLLOC_DEFAULT is also invoked for syntax errors.
5687 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5688 Error locations include the locations of all the tokens that were
5689 discarded, not just the last token.
5690
5691 2002-12-26 Paul Eggert <eggert@twinsun.com>
5692
5693 * src/files.c: Include quote.h.
5694 (compute_output_file_names): Warn if we detect conflicting
5695 outputs to the same file. This should catch the misunderstanding
5696 exemplified by Debian Bug 165349, reported by Bruce Stephens..
5697
5698 * src/conflicts.c (conflicts_print): If the user specifies
5699 "%expect N", report an error if there are any reduce/reduce
5700 conflicts. This is what the manual says should happen.
5701 This fixes Debian bug 130890, reported by Anthony DeRobertis.
5702 * tests/conflicts.at (%expect with reduce conflicts): New test.
5703
5704 Don't use m4_include on relative file names, as it doesn't work as
5705 desired if there happens to be a file with that name under ".".
5706
5707 * m4sugar/version.m4: Remove; it was included but it wasn't used.
5708 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
5709 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
5710 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
5711 * src/output.c (output_skeleton): Use full path names when
5712 specifying a file to include; don't rely on include path, as
5713 it's unreliable when the working file contains a file with
5714 that name.
5715
5716 2002-12-25 Paul Eggert <eggert@twinsun.com>
5717
5718 Remove obsolete references to bison.simple and bison.hairy.
5719 Problem mentioned by Aubin Mahe in
5720 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
5721 * data/glr.c: Comment fix.
5722 * doc/bison.1: Remove references. Also, mention "yacc".
5723
5724 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
5725 with -g option.
5726
5727 * src/parse-gram.y (declaration): Use enum "report_states" rather
5728 than its numeric value 1.
5729
5730 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
5731 opening a new one. This fixes Debian bug 165349, reported by
5732 Bruce Stephens.
5733
5734 2002-12-24 Paul Eggert <eggert@twinsun.com>
5735
5736 Version 1.75e.
5737
5738 * Makefile.maint (cvs-update): Don't assume that the shell
5739 supports $(...), as Solaris sh doesn't.
5740
5741 * src/parse-gram.y (lloc_default): Remove test for empty
5742 nonterminals at the end, since it didn't change the result.
5743
5744 2002-12-24 Paul Eggert <eggert@twinsun.com>
5745
5746 If the user does not define YYSTYPE as a macro, Bison now declares it
5747 using typedef instead of defining it as a macro. POSIX requires this.
5748 For consistency, YYLTYPE is also declared instead of defined.
5749
5750 %union directives can now have a tag before the `{', e.g., the
5751 directive `%union foo {...}' now generates the C code
5752 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
5753 The default union tag is `YYSTYPE', for compatibility with Solaris 9
5754 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
5755 instead of `yyltype'.
5756
5757 `yystype' and `yyltype' are now obsolescent macros instead of being
5758 typedefs or tags; they are no longer documented and will be
5759 withdrawn in a future release.
5760
5761 * data/glr.c (b4_location_type): Remove.
5762 (YYSTYPE): Renamed from yystype.
5763 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
5764 (struct YYLTYPE): Renamed from struct yyltype.
5765 (YYLTYPE): Renamed from yyltype.
5766 (yyltype, yystype): New (and obsolescent) macros,
5767 for backward compatibility.
5768 * data/yacc.c: Likewise.
5769
5770 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
5771 does not specify a union tag. This is for compatibility with
5772 Solaris 9 yacc.
5773
5774 * src/parse-gram.y (add_param): 2nd arg is now char * not char
5775 const *, since it is now modified by stripping surrounding { }.
5776 (current_braced_code): Remove.
5777 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
5778 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
5779 trailing " {...}". Now of type <chars>.
5780 (grammar_declaration): Adjust to bundled tokens.
5781 (code_content): Remove; stripping is now done by add_param.
5782 (print_token_value): Print contents of bundled tokens.
5783 (token_name): New function.
5784
5785 * src/reader.h (braced_code, current_braced_code): Remove.
5786 (token_name): New decl.
5787
5788 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
5789 token_type, not braced_code code_kind. All uses changed.
5790 (SC_PRE_CODE): New state, for scanning after a keyword that
5791 has (or usually has) an immediately-following braced code.
5792 (token_type): New local var, to keep track of which token type
5793 to return when scanning braced code.
5794 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
5795 <INITIAL>"%parse-param", <INITIAL>"%printer",
5796 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
5797 instead of returning a token type immediately.
5798 (<INITIAL>"{"): Set token type.
5799 (<SC_BRACED_CODE>"}"): Use it.
5800 (handle_action_dollar, handle_action_at): Now returns bool
5801 indicating success. Fail if ! current_rule; this prevents a core dump.
5802 (handle_symbol_code_dollar, handle_symbol_code_at):
5803 Remove; merge body into caller.
5804 (handle_dollar, handle_at): Complain in invalid contexts.
5805
5806 * NEWS, doc/bison.texinfo: Document the above.
5807 * NEWS: Fix years and program names in copyright notice.
5808
5809 2002-12-17 Paul Eggert <eggert@twinsun.com>
5810
5811 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
5812 Reporting, Table of Symbols): Omit mentions of %lex-param and
5813 %parse-param from the documentation for now.
5814
5815 2002-12-15 Paul Eggert <eggert@twinsun.com>
5816
5817 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
5818 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
5819 lookahead symbol, and which sets yychar in parser actions) and it
5820 disagreed with the Bison documentation. Bug
5821 reported by Andrew Walrond.
5822
5823 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
5824 as the caller now does that.
5825 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
5826 (YYEMPTY): Parenthesize right hand side, since others use it.
5827 (yyparse): Don't assume that our generated code is the only code
5828 that sets yychar.
5829
5830 2002-12-13 Paul Eggert <eggert@twinsun.com>
5831
5832 Version 1.75d.
5833
5834 POSIX requires a "yacc" command.
5835 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
5836 (MOSTLYCLEANFILES): Add yacc.
5837 (yacc): New rule.
5838 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
5839 as an alias for bison y.
5840
5841 * po/LINGUAS: Add da.
5842
5843 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
5844 problem with latest <getopt.h>.
5845 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
5846
5847 * doc/fdl.texi: Upgrade to 1.2.
5848 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
5849 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
5850 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
5851 gnulib.
5852 * config/install-sh: Sync with autotools.
5853
5854 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
5855 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
5856 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
5857 locations are requested.
5858 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
5859 locations are requested.
5860
5861 2002-12-12 Paul Eggert <eggert@twinsun.com>
5862
5863 Remove unportable casts and storage allocation tricks.
5864 While we're at it, remove almost all casts, since they
5865 usually aren't needed and are a sign of trouble.
5866
5867 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
5868
5869 * src/derives.c (derives_compute): Do not subtract NTOKENS from
5870 the pointer DSET returned by malloc; this isn't portable.
5871 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
5872 Similarly for DERIVES.
5873 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
5874 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
5875 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
5876
5877 * src/derives.c (derives_compute): Do not bother invoking
5878 int_of_rule_number, since rule numbers are integers.
5879
5880 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
5881 rather than XMALLOC (char, N).
5882
5883 * src/files.c (filename_split): Rewrite to avoid cast.
5884
5885 * src/gram.h (symbol_number_as_item_number,
5886 item_number_as_symbol_number, rule_number_as_item_number,
5887 item_number_as_rule_number):
5888 Now inline functions rather than macros, to avoid casts.
5889 * src/state.h (state_number_as_int): Likewise.
5890 * src/tables.c (state_number_to_vector_number,
5891 symbol_number_to_vector_number): Likewise.
5892
5893 * src/gram.h (int_of_rule_number): Remove; no longer used.
5894
5895 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
5896 since the resulting storage is always stored into.
5897
5898 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
5899 where it's needed.
5900
5901 * src/muscle_tab.c (muscle_m4_output):
5902 Now inline. Return bool, not int.
5903 * src/state.c (state_compare): Likewise.
5904 * src/symtab.c (symbol_check_defined,
5905 symbol_check_alias_consistency, symbol_pack, symbol_translation,
5906 hash_compare_symbol, hash_symbol):
5907 Likewise.
5908 * src/uniqstr.c (uniqstr_print): Likewise.
5909 * src/muscle_tab.c (muscle_m4_output_processor):
5910 New function, to avoid casts.
5911 * src/state.c (state_comparator, stage_hasher): Likewise.
5912 * src/symtab.c (symbol_check_defined_processor,
5913 symbol_check_alias_consistency_processor, symbol_pack_processor,
5914 symbol_translation_processor, hash_symbol_comparator,
5915 hash_symbol_hasher): Likewise.
5916 * src/uniqstr.c (uniqstr_print_processor): Likewise.
5917 * src/muscle_tab.c (muscles_m4_output):
5918 Use new functions instead of casting old functions unportably.
5919 * src/state.c (state_hash_new): Likewise.
5920 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
5921 symbols_token_translations_init):
5922 Likewise.
5923 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
5924
5925 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
5926 var instead of casting to long, to avoid casts.
5927 (prepare_states): Use MALLOC rather than alloca, so that we don't
5928 have to worry about alloca.
5929 * src/state.c (state_hash_lookup): Likewise.
5930
5931 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
5932 local var instead of casting to unsigned char, to avoid casts.
5933
5934 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
5935 STATE_ALLOC): Remove.
5936 (transitions_new, errs_new, reductions_new, state_new): Use malloc
5937 rather than calloc, and use offsetof to avoid allocating slightly
5938 too much storage.
5939 (state_new): Initialize all members.
5940
5941 * src/state.c (state_hash): Use unsigned accumulator, not signed.
5942
5943 * src/symtab.c (symbol_free): Remove; unused.
5944 (symbol_get): Remove cast in lhs of assignment.
5945 (symbols_do): Now static. Accept generic arguments, not
5946 hashing-related ones.
5947
5948 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
5949 (symbol_processor): Remove.
5950 (symbols_do): Remove decl; now static.
5951
5952 * src/system.h (alloca): Remove; decl no longer needed.
5953 (<stddef.h>): Include, for offsetof.
5954 (<inttypes.>, <stdint.h>): Include if available.
5955 (uintptr_t): New type, if system lacks it.
5956 (CALLOC, MALLOC, REALLOC): New macros.
5957 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
5958 new macros.
5959
5960 * src/tables.c (table_size): Now int, to pacify GCC.
5961 (table_grow, table_ninf_remap): Use signed table size.
5962 (save_row): Don't bother initializing locals when not needed.
5963 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
5964 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
5965
5966 * src/vcg.h: Correct misspellings.
5967
5968 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
5969
5970
5971 * src/getargs.c (getargs): Don't assume EOF == -1.
5972
5973 2002-12-09 Paul Eggert <eggert@twinsun.com>
5974
5975 Change identifier spellings to avoid collisions with names
5976 that are reserved by POSIX.
5977
5978 Don't use names ending in _t, since POSIX reserves them.
5979 For consistency, remove _e and _s endings -- they're weren't
5980 needed to remove ambiguity. All uses changed.
5981 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
5982 turn was just renamed from struniq_t.
5983 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
5984 which in turn was just renamed from struniq_processor_t.
5985 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
5986 in turn was renamed from hash_compare_struniq_t.
5987 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
5988 (state_list): Renamed from state_list_t.
5989 * src/assoc.h (assoc): Renamed from assoc_t.
5990 * src/conflicts.c (enum conflict_resolution): Renamed from
5991 enum conflict_resolution_e.
5992 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
5993 (rule_list): Renamed from rule_list_t.
5994 * src/getargs.h (enum trace): Renamed from enum trace_e.
5995 (enum report): Renamed from enum report_e.
5996 * src/gram.h (item_number): Renamed from item_number_t.
5997 (rule_number): Renamed from rule_number_t.
5998 (struct rule_s): Remove the "rule_s" part; not used.
5999 (rule): Renamed from rule_t.
6000 (rule_filter): Renamed from rule_filter_t.
6001 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6002 (goto_list): Renamed from goto_list_t.
6003 * src/lalr.h (goto_number): Renamed from goto_number_t.
6004 * src/location.h (location): Renamed from location_t.
6005 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6006 and moved here from:
6007 * src/muscle_tab.h (muscle_entry_t): here.
6008 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6009 (rule_list): Renamed from rule_list_t.
6010 * src/print_graph.c (static_graph): Renamed from graph.
6011 * src/reader.h (braced_code): Renamed from braced_code_t.
6012 Remove brace_code_e tag.
6013 * src/relation.h (relation_node): Renamed from relation_node_t.
6014 (relation_nodes): Renamed from relation_nodes_t.
6015 (relation): Renamed from relation_t.
6016 * src/state.h (state_number): Renamed from state_number_t.
6017 (struct state): Renamed from struct state_s.
6018 (state): Renamed from state_t.
6019 (transitions): Renamed from transitions_t. Unused (and
6020 misspelled) transtion_s tag removed.
6021 (errs): Renamed from errs_t. Unused errs_s tag removed.
6022 (reductions): Renamed from reductions_t. Unused tag
6023 reductions_s removed.
6024 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6025 (struct symbol_list): Renamed from struct symbol_list_s.
6026 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6027 (struct symbol): Renamed from struct symbol_s.
6028 (symbol): Renamed from symbol_t.
6029 * src/tables.c (vector_number): Renamed from vector_number_t.
6030 (action_number): Renamed from action_t.
6031 * src/tables.h (base_number): Renamed from base_t.
6032 * src/vcg.h (enum color): Renamed from enum color_e.
6033 (enum textmode): Renamed from enum textmode_e.
6034 (enum shape): Renamed from enum shape_e.
6035 (struct colorentry): Renamed from struct colorentry_s.
6036 (struct classname): Renamed from struct classname_s.
6037 (struct infoname): Renamed from struct infoname_s.
6038 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6039 (enum decision): Renamed from enum decision_e.
6040 (enum orientation): Renamed from enum orientation_e.
6041 (enum alignment): Renamed from enum alignment_e.
6042 (enum arrow_mode): Renamed from enum arrow_mode_e.
6043 (enum crossing_type): Renamed from enum crossing_type_e.
6044 (enum view): Renamed from enum view_e.
6045 (struct node): Renamed from struct node_s.
6046 (node): Renamed from node_t.
6047 (enum linestyle): Renamed from enum linestyle_e.
6048 (enum arrowstyle): Renamed from enum arrowstyle_e.
6049 (struct edge): Renamed from struct edge.
6050 (edge): Renamed from edge_t.
6051 (struct graph): Renamed from struct graph_s.
6052 (graph): Renamed from graph_t.
6053 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6054 Rename value_t -> value.
6055 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6056 value_t_as_yystype -> value_as_yystype.
6057
6058 Don't include <errno.h> in the mainstream code, since it
6059 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6060 * lib/get-errno.c, lib/get-errno.h: New files.
6061 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6062 get-errno.c.
6063 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6064 * src/output.c (output_skeleton): Likewise.
6065 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6066 instead of errno.
6067 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
6068 Likewise.
6069 (handle_action_dollar, handle_action_at): Likewise.
6070 * src/system.h: Do not include <errno.h>.
6071 (TAB_EXT): Renamed from EXT_TAB.
6072 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
6073
6074 Avoid str[a-z]*, since <string.h> reserves that name space.
6075 Change all instances of "struniq" in names to "uniqstr", and
6076 likewise for "STRUNIQ" and "UNIQSTR".
6077 * src/uniqstr.c: Renamed from src/struniq.c.
6078 * src/uniqstr.h: Renamed from src/struniq.h.
6079 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
6080 * src/files.c (strsuffix): Remove; unused.
6081 (concat2): Renamed from stringappend. Now static.
6082 * src/files.h (strsuffix, stringappend): Remove; unused.
6083 * src/parse-gram.y (<chars>): Renamed from <string>.
6084 (<uniqstr>): Renamed from <struniq>.
6085 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
6086 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
6087 (struct graph_s.expand): Renamed from struct graph_s.stretch.
6088 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
6089 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
6090 (N_EXPAND): Renamed from N_STRETCH.
6091
6092 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
6093 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
6094 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
6095 Remove; unused.
6096 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
6097 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
6098 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
6099 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
6100 (BASE_MAXIMUM): Renamed from BASE_MAX.
6101 (BASE_MINIMUM): Renamed from BASE_MIN.
6102 (ACTION_MAX): Remove; unused.
6103 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
6104 Unnecessary casts removed from above defines.
6105
6106
6107 Fix misspelling in names.
6108 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
6109 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
6110 G_NODE_ALIGNEMENT.
6111
6112
6113 * lib/timevar.c (timevar_report): Renamed from time_report,
6114 for consistency with other names.
6115 * lib/timevar.h (timevar_report): New decl.
6116 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
6117
6118
6119 Sort include-file uses.
6120
6121 Reorder all include files under src to be in the order "system.h".
6122 then the ../lib include files in angle brackets (alphabetized),
6123 then the . include files in double-quotes (alphabetized). Fix
6124 dependency breakages encountered in this process, as follows:
6125 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
6126 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
6127 * src/state.h: Include "symtab.h".
6128
6129 2002-12-08 Paul Eggert <eggert@twinsun.com>
6130
6131 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
6132 since this causes problems when __file__ contains character
6133 sequences like "@" that are treated specially by src/scan-skel.l.
6134 Instead, just use the file's basename. This fixes the bug
6135 reported by Martin Mokrejs in
6136 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
6137
6138 2002-12-06 Paul Eggert <eggert@twinsun.com>
6139
6140 Add support for rules that do not have trailing semicolons, as
6141 POSIX requires. Improve the quality of locations in Bison
6142 diagnostics.
6143
6144 * src/location.c: Include <quotearg.h>.
6145 (empty_location): Now const.
6146 (location_print): New function. Follow the recommendation of the
6147 GNU Coding Standards for locations that span file boundaries.
6148 * src/location.h: Do not include <quotearg.h>; no longer needed.
6149 (boundary): New type.
6150 (location_t): Use it. This allows locations to span file boundaries.
6151 All member uses changed: file -> start.file or end.file (as needed),
6152 first_line -> start.line, first_column -> start.column,
6153 last_line -> end.line, last_column -> end.column.
6154 (equal_boundaries): New function.
6155 (LOCATION_RESET, LOCATION_STEP): Remove.
6156 (LOCATION_PRINT): Remove. All callers changed to use location_print.
6157 (empty_location): Now const.
6158 (location_print): New decl.
6159 * src/parse-gram.y (lloc_default): New function, which handles
6160 empty locations more accurately.
6161 (YYLLOC_DEFAULT): Use it.
6162 (%token COLON): Remove.
6163 (%token ID_COLON): New token.
6164 (rules): Use it.
6165 (declarations, rules): Remove trailing semicolon.
6166 (declaration, rules_or_grammar_declaration):
6167 Allow empty (";") declaration.
6168 (symbol_def): Remove empty actions; no longer needed.
6169 (rules_or_grammar_declaration): Remove trailing semicolon.
6170 (semi_colon.opt): Remove.
6171 * src/reader.h: Include location.h.
6172 (scanner_cursor): New decl.
6173 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
6174 rolling our own.
6175 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
6176 of *loc.
6177 (STEP): Remove. No longer needed, now that adjust_location does
6178 the work. All uses removed.
6179 (scanner_cursor): New var.
6180 (adjust_location): Renamed from extend_location. It now sets
6181 *loc and adjusts the scanner cursor. All uses changed.
6182 Don't bother testing for CR.
6183 (handle_syncline): Remove location arg; now updates scanner cursor.
6184 All callers changed.
6185 (unexpected_end_of_file): Now accepts start boundary of token or
6186 comment, not location. All callers changed. Update scanner cursor,
6187 not the location.
6188 (SC_AFTER_IDENTIFIER): New state.
6189 (context_state): Renamed from c_context. All uses changed.
6190 (id_loc, code_start, token_start): New local vars.
6191 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
6192 processing of Yacc white space and equivalents here.
6193 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
6194 instead of returning ID immediately, since we need to search for
6195 a subsequent colon.
6196 (<INITIAL>"'", "\""): Save token_start.
6197 (<INITIAL>"%{", "{", "%%"): Save code_start.
6198 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
6199 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
6200 BEGIN context_state at end, not INITIAL.
6201 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
6202 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
6203 Return correct token start.
6204 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
6205 the start of a character, string or multiline comment is found.
6206 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
6207 Reduction): Adjust reported locations to match the more-precise
6208 results now expected.
6209 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
6210 * tests/reduce.at (Useless Rules, Reduced Automaton,
6211 Underivable Rules): Likewise.
6212 * tests/regression.at (Invalid inputs): No longer `expecting ";"
6213 or "|"' now that so many other tokens are allowed by the new grammar.
6214
6215 * src/complain.h (current_file): Remove duplicate decl;
6216 current_file is now owned by files.h.
6217 * src/complain.c, src/scan-gram.l: Include files.h.
6218
6219 2002-12-06 Paul Eggert <eggert@twinsun.com>
6220
6221 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
6222 promotes to int; it might be unsigned int.
6223 * data/yacc.c (yy_reduce_print): Likewise.
6224
6225 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
6226 be #defined in the prologue, not in the Bison declarations.
6227 This fixes Debian Bug 102878, reported by Shaul Karl.
6228
6229 2002-12-02 Paul Eggert <eggert@twinsun.com>
6230
6231 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
6232 * lib/strtoul.c: New file, from gnulib.
6233 This fixes a porting bug reported by Peter Klein in
6234 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
6235
6236 2002-11-30 Paul Eggert <eggert@twinsun.com>
6237
6238 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6239 and put only a forward declaration in the prologue. This is for
6240 consistency with the other scanner helper functions.
6241
6242 Type clashes now generate warnings, not errors, since it
6243 appears that POSIX may allow some grammars with type clashes.
6244 * src/reader.c (grammar_current_rule_check): Warn about
6245 type clashes instead of complaining.
6246 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6247
6248 Add Yacc library, since POSIX requires it.
6249 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6250 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6251 * lib/main.c, lib/yyerror.c: New files.
6252
6253 gram_error can be static; it need not be extern.
6254 * src/reader.h (gram_error): Remove decl.
6255 * src/parse-gram.y (gram_error): Now static. Add static decl.
6256 (print_token_value): Omit parameter names from forward decl,
6257 for consistency.
6258
6259 2002-11-29 Paul Eggert <eggert@twinsun.com>
6260
6261 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6262 be declared before being used. E.g., one should typically
6263 declare them in the prologue. Use GNU coding style in examples.
6264 Put "const" consistently after the type it modifies. Mention
6265 that C99 supports "inline". Mention that yyerror traditionally
6266 returns "int".
6267
6268 %parse-param and %lex-param now take just one argument, the
6269 declaration; the argument name is deduced from the declaration.
6270
6271 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6272 Reporting, Table of Symbols): Document this.
6273 * src/parse-gram.y (add_param): New function.
6274 (COMMA): Remove.
6275 (declaration): Implement new rule for %parse-param and %lex-param.
6276 * src/scan-gram.l: "," now elicits a warning, rather than being
6277 a token; this is more compatible with byacc.
6278 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6279
6280 2002-11-27 Paul Eggert <eggert@twinsun.com>
6281
6282 Rename identifiers to avoid real and potential collisions.
6283
6284 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6285 to avoid collision with lex macro described by Bruce Lilly in
6286 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
6287 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6288 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
6289 * src/parse-gram.y (print_token_value): Renamed from yyprint.
6290 All uses changed.
6291 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
6292 The name "yycontrol" violates the name space rules, and this stuff
6293 wasn't being used anyway.
6294 (input): Remove action; this stuff wasn't being used.
6295 (gram_error): Rename local variable yylloc -> loc.
6296 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
6297 (YY_DECL): Don't use "yy" at start of local variables.
6298 All uses changed, e.g., yylloc -> loc.
6299 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
6300 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
6301 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
6302 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
6303
6304 * src/parse-gram.y (gram_error): loc is now const *.
6305 * src/reader.h (gram_error): Likewise.
6306
6307 2002-11-24 Paul Eggert <eggert@twinsun.com>
6308
6309 Version 1.75c.
6310
6311 * tests/actions.at (Actions after errors): Use an output format
6312 more similar to that of the Printers and Destructors test.
6313 Test the position of the ';' token too.
6314 (Printers and Destructors): Likewise.
6315 (Printers and Destructors: %glr-parser): Remove for now, to avoid
6316 unnecessarily alarming people when the test fails.
6317
6318 * data/yacc.c (yyerrlab1): Move this label down, so that the
6319 parser does not discard the lookahead token if the user code
6320 invokes YYERROR. This change is required for POSIX conformance.
6321
6322 * lib/error.c: Sync with gnulib.
6323
6324 2002-11-22 Paul Eggert <eggert@twinsun.com>
6325
6326 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
6327 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
6328 * lib/xmalloc.c: Likewise.
6329
6330 2002-11-20 Paul Eggert <eggert@twinsun.com>
6331
6332 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
6333
6334 2002-11-20 Paul Eggert <eggert@twinsun.com>
6335
6336 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
6337 should use `if (! x) abort ();' rather than `assert (x);', and
6338 anyway it's one less thing to worry about configuring.
6339
6340 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
6341 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
6342 and replace all instances of assert with abort.
6343 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6344 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
6345
6346 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
6347 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
6348 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
6349 hash_find_entry, hash_rehash, hash_insert): Likewise.
6350 * src/conflicts.c (resolve_sr_conflict): Likewise.
6351 * src/lalr.c (set_goto_map, map_goto): Likewise.
6352 * src/nullable.c (nullable_compute): Likewise.
6353 * src/output.c (prepare_rules, token_definitions_output): Likewise.
6354 * src/reader.c (packgram, reader): Likewise.
6355 * src/state.c (state_new, state_free, state_transitions_set,
6356 state_reduction_find): Likewise.
6357 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
6358 symbol_pack): Likewise.
6359 * src/tables.c (conflict_row, pack_vector): Likewise.
6360 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6361 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6362 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
6363 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
6364
6365 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
6366 (ARGMATCH_CONSTRAINT): New macro.
6367 (ARGMATCH_ASSERT): Use it.
6368
6369 * src/system.h (verify): New macro.
6370 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
6371 rather than assert.
6372 * src/tables.c (tables_generate): Likewise.
6373
6374 * src/struniq.c (struniq_assert): Now returns void, and aborts
6375 if the assertion is false.
6376 (struniq_assert_p): Remove.
6377 * src/struniq.h: Likewise.
6378
6379 2002-11-18 Paul Eggert <eggert@twinsun.com>
6380
6381 * data/glr.c (yygetLRActions): Replace `yyindex' with
6382 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
6383 This fixes the regression with Sun ONE Studio 7 cc that I reported in
6384 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
6385
6386 2002-11-18 Akim Demaille <akim@epita.fr>
6387
6388 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
6389 space.
6390 From Tim Van Holder.
6391
6392 2002-11-17 Paul Eggert <eggert@twinsun.com>
6393
6394 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
6395 to "SyntaxError" for consistency with my 2002-11-15 change.
6396
6397 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
6398 not define to {}, since this breaks the common use of `YYDPRINTF
6399 ((...));' if a single statement is desired (e.g. before `else').
6400 Work around GCC warnings by surrounding corresponding calls with
6401 {} if needed.
6402 (yyhasResolvedValue): Remove unused function.
6403 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
6404 loop body.
6405 (yyreportSyntaxError): Renamed from yyreportParseError.
6406 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
6407 All uses changed.
6408 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
6409 extern when possible. Remove unused initializations.
6410
6411 2002-11-16 Akim Demaille <akim@epita.fr>
6412
6413 Augment the similarity between GLR and LALR traces.
6414
6415 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
6416 (YY_REDUCE_PRINT): New.
6417 (yyparse): Use them.
6418 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
6419 YYDPRINT here.
6420 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
6421 state reached after the reduction/recovery, since...
6422 (yyparse, yyprocessOneStack): Report the state we are entering in.
6423
6424 2002-11-16 Akim Demaille <akim@epita.fr>
6425
6426 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
6427 Add support for --trace=skeleton.
6428 * src/scan-skel.l: %option debug.
6429 Scan strings of non-@ or \n instead of character by character.
6430 (scan_skel): Handle trace_skeleton.
6431 (QPUTS): New.
6432 (@output_parser_name@, @output_header_name@): ``Restore'' their
6433 support (used to be M4 macros).
6434 * data/yacc.c: Quote larger chunks, a la glr.c.
6435 * data/lalr1.cc: Likewise.
6436 The header guards are no longer available, so use some other
6437 string than `YYLSP_NEEDED'.
6438
6439 2002-11-16 Akim Demaille <akim@epita.fr>
6440
6441 Make the ``Printers and Destructors'' test more verbose, taking
6442 `yacc.c''s behavior as (possibly wrong) reference.
6443
6444 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
6445 instead of fprint on stdout.
6446 Set and report the last_line of the symbols.
6447 Consistently display values and locations.
6448
6449 2002-11-16 Paul Eggert <eggert@twinsun.com>
6450
6451 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
6452
6453 2002-11-15 Paul Eggert <eggert@twinsun.com>
6454
6455 * tests/actions.at (Actions after errors): New test case.
6456
6457 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
6458 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
6459 tests/action.at, tests/calc.at, tests/conflicts.at,
6460 tests/cxx-type.at, tests/regression.at:
6461 "parse error" -> "syntax error" for POSIX compatibility.
6462 "parsing stack overflow..." -> "parser stack overflow" so
6463 that code matches Bison documentation.
6464
6465 2002-11-15 Akim Demaille <akim@epita.fr>
6466
6467 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
6468 take two BRACED_CODE, not two string_content.
6469 Free the scanner's obstack when we are done.
6470 (code_content): New.
6471 * tests/calc.at: Adjust.
6472 * doc/bison.texinfo: Adjust.
6473 Also, make sure to include the `,' for these declarations.
6474
6475 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
6476
6477 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
6478 definition; avoids potential autoreconf problems.
6479
6480 2002-11-15 Akim Demaille <akim@epita.fr>
6481
6482 Always check the value returned by yyparse.
6483
6484 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
6485 returned by yyparse.
6486 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
6487 Adjust calls.
6488 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
6489 returned by yyparse.
6490
6491 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6492
6493 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
6494 on input.at test.
6495
6496 2002-11-14 Paul Eggert <eggert@twinsun.com>
6497
6498 * src/output.c (output_skeleton): Call xfopen instead of
6499 duplicating xfopen's body.
6500
6501 Fix bugs reported by Nelson H. F. Beebe in
6502 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
6503
6504 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
6505 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
6506 Group compiler. Instead, use "$CC -E bar.c". Include the .h
6507 file twice in the grammar, as an extra check.
6508
6509 * tests/input.at (Torturing the Scanner): Surround the
6510 backslash-newline tests with "#if 0", to make it less likely that
6511 we'll run into compiler bugs. Bring back solitary \ inside
6512 comment, but add a closing comment to work around HP C bug. Don't
6513 test backslash-newline in C character constant.
6514
6515 2002-11-14 Akim Demaille <akim@epita.fr>
6516
6517 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
6518 status of the compiler.
6519 Calling `exit 1' is no longer needed.
6520 Reported by Nelson H. F. Beebe.
6521
6522 2002-11-14 Akim Demaille <akim@epita.fr>
6523
6524 * tests/atlocal.in (CPPFLAGS): We have config.h.
6525 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
6526 New.
6527 * tests/actions.at, tests/calc.at, tests/conflicts.at,
6528 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
6529 * tests/regression.at, tests/torture.at: Use them for all the
6530 grammars that are to be compiled.
6531 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
6532 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
6533 * doc/bison.texinfo (GLR Parsers): Document `inline'.
6534
6535 2002-11-14 Akim Demaille <akim@epita.fr>
6536
6537 * doc/bison.texinfo: Various formatting changes (alignments in
6538 samples, additional @group/@end group, GCS in samples.
6539 Use @deffn instead of simple @table to define the directives,
6540 macros, variables etc.
6541
6542 2002-11-13 Paul Eggert <eggert@twinsun.com>
6543
6544 Fix some bugs reported by Albert Chin-A-Young in
6545 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
6546
6547 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
6548 -o c"; the HP C compiler chatters during compilation.
6549 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
6550 * tests/headers.at (export YYLTYPE): Likewise.
6551
6552 * tests/input.at (Torturing the Scanner): Remove lines containing
6553 solitary backslashes, as they tickle a bug in the HP C compiler.
6554
6555 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
6556 comments, since they're not portable. Use GNU coding style.
6557
6558 2002-11-13 Akim Demaille <akim@epita.fr>
6559
6560 * data/yacc.c: Leave bigger chunks of quoted text.
6561 (YYDSYMPRINTF): New.
6562 Use it to report symbol activities.
6563 * data/glr.c (YYDSYMPRINTF): New.
6564 Use it.
6565
6566 2002-11-12 Paul Eggert <eggert@twinsun.com>
6567
6568 Version 1.75b.
6569
6570 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
6571 (yyglrReduce): Return yyok, not 0.
6572 This should avoid the enumerated-type warnings reported
6573 by Nelson H. F. Beebe in
6574 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
6575
6576 * lib/bbitset.h (BITSET_INLINE): Remove.
6577 * lib/bitset.h [! BITSET_INLINE]: Remove.
6578 (bitset_set, bitset_reset, bitset_test): Rename local vars
6579 to avoid shadowing warnings by GCC.
6580
6581 * data/glr.c (inline): Remove #define. It's the user's
6582 responsibility to #define it away, just like 'const'.
6583 This fixes one of the bugs reported by Nelson H. F. Beebe in
6584 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
6585
6586 * Makefile.maint (po-check): Scan .l and .y files instead of the
6587 .c and the .h files that they generate. This fixes the bug
6588 reported by Tim Van Holder in:
6589 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
6590 Look for N_ as well as for _. Try to avoid matching #define for
6591 N_ and _.
6592 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
6593 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
6594 * src/scan-gram.l: Revamp regular expressions so that " and '
6595 do not confuse xgettext.
6596
6597 * src/struniq.h (struniq_new): Do not declare the return type
6598 to be 'const'; this violates the C standard.
6599 * src/struniq.c (struniq_new): Likewise.
6600
6601 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
6602
6603 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
6604 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
6605 linker.
6606
6607 2002-11-12 Akim Demaille <akim@epita.fr>
6608
6609 * Makefile.maint: Sync with Autoconf:
6610 (local_updates): New.
6611
6612 2002-11-12 Akim Demaille <akim@epita.fr>
6613
6614 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
6615
6616 2002-11-12 Akim Demaille <akim@epita.fr>
6617
6618 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
6619 locations.
6620
6621 2002-11-12 Akim Demaille <akim@epita.fr>
6622
6623 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
6624 not yyvalue.
6625
6626 2002-11-12 Akim Demaille <akim@epita.fr>
6627
6628 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
6629 Use it to test the GLR parser.
6630
6631 2002-11-12 Akim Demaille <akim@epita.fr>
6632
6633 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
6634 defines it.
6635 * data/glr.c (yystos): New.
6636 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
6637 (YYDSYMPRINT): New.
6638 (yyval): Don't define it, it is handled via M4.
6639 (yyrecoverParseError): Free verbosely the discarded symbols.
6640 * data/yacc.c (yysymprint): Remove, rather...
6641 (b4_yysymprint_generate): invoke.
6642 * data/c.m4 (b4_yysymprint_generate): New.
6643 Accept pointers as arguments, as opposed to the version from
6644 yacc.c.
6645 (b4_yydestruct_generate): Likewise.
6646 * tests/cations.at (Printers and Destructors): Use Bison directives
6647 instead of CPP macros.
6648 Don't rely on internal details.
6649
6650 2002-11-12 Akim Demaille <akim@epita.fr>
6651
6652 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
6653 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
6654 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
6655 it against YYEMPTY and so forth), work on yytoken (i.e., set
6656 it to YYEMPTY etc.).
6657 (yydestruct): Replace with a b4_yydestruct_generate invocation.
6658 (b4_symbol_actions): Remove.
6659 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
6660 for 0, end-of-input.
6661
6662 2002-11-12 Akim Demaille <akim@epita.fr>
6663
6664 * doc/bison.texinfo (Destructor Decl): New.
6665
6666 2002-11-12 Akim Demaille <akim@epita.fr>
6667
6668 * src/tables.c (tables_generate): Use free for pointers that
6669 cannot be NULL, not XFREE.
6670 (pack_vector): Use assert, not fatal, for bound violations.
6671 * src/state.c (state_new): Likewise.
6672 * src/reader.c (reader): Likewise.
6673 * src/lalr.c (set_goto_map): Likewise.
6674 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
6675 the file name.
6676
6677 2002-11-12 Akim Demaille <akim@epita.fr>
6678
6679 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
6680 Restore.
6681 * src/scan-gram.l (last_string): Is global to the file, not to
6682 yylex.
6683 * src/parse-gram.y (input): Don't append the epilogue here,
6684 (epilogue.opt): do it here, and free the scanner's obstack.
6685 * src/reader.c (epilogue_set): Rename as...
6686 (epilogue_augment): this.
6687 * data/c.m4 (b4_epilogue): Defaults to empty.
6688
6689 2002-11-12 Akim Demaille <akim@epita.fr>
6690
6691 * src/getargs.c (long_options): Remove duplicates.
6692 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
6693 Remove.
6694 * doc/bison.rnh: Remove.
6695 * doc/bison.texinfo (VMS Invocation): Remove.
6696
6697 2002-11-12 Akim Demaille <akim@epita.fr>
6698
6699 * src/struniq.h, src/struniq.c (struniq_t): Is const.
6700 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
6701
6702 Use struniq for symbols.
6703
6704 * src/symtab.h (symbol_t): The tag member is a struniq.
6705 (symbol_type_set): Adjust.
6706 * src/symtab.c (symbol_new): Takes a struniq.
6707 (symbol_free): Don't free the tag member.
6708 (hash_compare_symbol_t, hash_symbol_t): Rename as...
6709 (hash_compare_symbol, hash_symbol): these.
6710 Use the fact that tags as struniqs.
6711 (symbol_get): Use struniq_new.
6712 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
6713 Returns a strniq.
6714 * src/reader.h (merger_list, grammar_currentmerge_set): The name
6715 and type members are struniqs.
6716 * src/reader.c (get_merge_function)
6717 (grammar_current_rule_merge_set): Adjust.
6718 (TYPE, current_type): Are struniq.
6719
6720 Use struniq for file names.
6721
6722 * src/files.h, src/files.c (infile): Split into...
6723 (grammar_file, current_file): these.
6724 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
6725 * src/reduce.c (reduce_print): Likewise.
6726 * src/getargs.c (getargs): Likewise.
6727 * src/complain.h, src/complain.c: Likewise.
6728 * src/main.c (main): Call struniqs_new early enough to use it for
6729 file names.
6730 Don't free the input file name.
6731
6732 2002-11-12 Akim Demaille <akim@epita.fr>
6733
6734 * src/symtab.c (symbol_free): Remove dead deactivated code:
6735 type_name are properly removed.
6736 Don't use XFREE to free items that cannot be NULL.
6737 * src/struniq.h, src/struniq.c: New.
6738 * src/main.c (main): Initialize/free struniqs.
6739 * src/parse-gram.y (%union): Add astruniq member.
6740 (yyprint): Adjust.
6741 * src/scan-gram.l (<{tag}>): Return a struniq.
6742 Free the obstack bit that used to store it.
6743 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
6744
6745 2002-11-11 Paul Eggert <eggert@twinsun.com>
6746
6747 Revamp to fix many (but not all) of the C- and M4-related quoting
6748 problems. Among other things, this fixes the Bison bug reported
6749 by Jan Hubicka when processing the Bash grammar; see:
6750 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
6751
6752 Use new @ escapes consistently. Represent brackets with @{ and @}
6753 rather than @<:@ and @:>@, since this works a bit better with dumb
6754 editors like vi. Represent @ with @@, since @ is now consistently
6755 an escape. Use @oline@ and @ofile@ rather than __oline__ and
6756 __ofile__, to avoid unexpected expansions. Similarly, use @output
6757 rather than #output.
6758
6759 * data/c.m4 (b4_copyright): Omit file name from comment, since
6760 the file name could contain "*/".
6761 (b4_synclines_flag): Don't quote the 2nd argument; it should already
6762 be quoted. All uses changed.
6763
6764 * data/glr.c: Use new @ escapes consistently.
6765 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
6766 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
6767 Remove, since they couldn't handle arbitrary characters in file
6768 names.
6769 * data/lalr1.cc: Likewise.
6770 * data/yacc.c: Likewise.
6771
6772 * src/files.c (output_infix): Remove; all uses removed.
6773 * src/files.h: Likewise.
6774
6775 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
6776 mishandled funny characters in file names, and anyway it isn't
6777 needed any more.
6778 * data/yacc.c: Likewise.
6779 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
6780
6781 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
6782 * data/yacc.c: Likewise.
6783
6784 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
6785 strings now.
6786 (muscle_init): Quote filename as a C string.
6787 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
6788 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
6789 * src/output.c (escaped_file_name_output): New function.
6790 (prepare_symbols): Quote tokens for M4.
6791 (prepare): Don't insert output_infix, output_prefix,
6792 output_parser_name, output_header_name; this is now down by scan-skel.
6793 Insert skeleton as a C string.
6794
6795 * src/output.c (user_actions_output, symbol_destructors_output,
6796 symbol_printers_output): Quote filenames for C and M4.
6797 * src/reader.c (prologue_augment, epilogue_set): Likewise.
6798
6799 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
6800 escapes other than \\ and \'; this simplifies the code.
6801 (<SC_STRING>): Likewise, for \\ and \".
6802 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
6803 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
6804 Use new escapes @{ and @} for [ and ].
6805
6806 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
6807 them with auto vars.
6808 Switch to new escape scheme, where @ is the escape character uniformly.
6809 Abort if a stray escape character is found. Avoid unbounded input
6810 buffer when parsing non-escaped text.
6811
6812 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
6813 __oline__, #output, $@, and @{ do not have unintended meanings.
6814
6815 2002-11-09 Paul Eggert <eggert@twinsun.com>
6816
6817 Fix the test failure due to GCC warnings described in
6818 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
6819 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
6820 evaluate to 0 if it's impossible for NINF to be in the respective
6821 table.
6822 (yygetLRActions, yyrecoverParseError): Use them.
6823
6824 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
6825 counted in the token inserted at end of file. Now takes
6826 location_t *, not location_t, so that the location can be
6827 adjusted. All uses changed.
6828
6829 * tests/regression.at (Invalid inputs): Adjust wording in
6830 diagnostic to match the new behavior.
6831
6832 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
6833 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
6834 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
6835 abort ();'. This reduces the runtime of the "Many lookaheads"
6836 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
6837 GCC 3.2.
6838
6839 2002-11-07 Paul Eggert <eggert@twinsun.com>
6840
6841 * src/parse-gram.y (CHARACTER): Remove unused token.
6842 All uses removed.
6843
6844 * src/scan-gram.l: Remove stack option. We no longer use the
6845 stack, since the stack was never deeper than 1; instead, use the
6846 new auto var c_context to record the stacked value.
6847
6848 Remove nounput option. At an unexpected end of file, we now unput
6849 the minimal input necessary to end cleanly; this simplifies the
6850 code.
6851
6852 Avoid unbounded token sizes where this is easy.
6853
6854 (unexpected_end_of_file): New function.
6855 Use it to systematize the error message on unexpected EOF.
6856 (last-string): Now auto, not static.
6857 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
6858 (scanner_last_string_free): Remove; not used.
6859 (percent_percent_count): Move decl to just before use.
6860 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
6861 not the (never otherwised-used) CHARACTER.
6862
6863 2002-11-07 Akim Demaille <akim@epita.fr>
6864
6865 Let yyerror always receive the msg as last argument, so that
6866 yyerror can be variadic.
6867
6868 * data/yacc.c (b4_yyerror_args): New.
6869 Use it when calling yyerror.
6870 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
6871 Use it when calling yyerror.
6872 * doc/bison.texinfo (Error Reporting): Adjust.
6873 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
6874 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
6875
6876 2002-11-06 Akim Demaille <akim@epita.fr>
6877
6878 #line should have quoted strings.
6879 Ideally, this should be done by m4_quotearg.
6880
6881 * src/scan-skel.l: Include quotearg.h.
6882 Quote __ofile__.
6883 * src/output.c (symbol_printers_output)
6884 (symbol_destructors_output): Quote the file name.
6885
6886 2002-11-06 Akim Demaille <akim@epita.fr>
6887
6888 * tests/regression.at (Invalid inputs): Adjust to the recent
6889 messages.
6890
6891 2002-11-06 Akim Demaille <akim@epita.fr>
6892
6893 Restore --no-lines.
6894 Reported by Jim Kent.
6895
6896 * data/c.m4 (b4_syncline): New.
6897 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
6898 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
6899 * src/output.c (user_actions_output): Likewise.
6900 (prepare): Define 'b4_synclines_flag'.
6901 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
6902
6903 2002-11-06 Akim Demaille <akim@epita.fr>
6904
6905 * src/main.c (main): Free `infile'.
6906 * src/scan-gram.l (handle_syncline): New.
6907 Recognize `#line'.
6908 * src/output.c (user_actions_output, symbol_destructors_output)
6909 (symbol_printers_output): Use the location's file name, not
6910 infile.
6911 * src/reader.c (prologue_augment, epilogue_set): Likewise.
6912
6913 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6914
6915 * src/tables.c (matching_state): Don't allow states to match if
6916 either has GLR conflict entries.
6917
6918 2002-11-05 Paul Eggert <eggert@twinsun.com>
6919
6920 * src/scan-gram.l: Use more accurate diagnostics, e.g.
6921 "integer out of range" rather than "invalid value".
6922 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
6923 accordingly.
6924
6925 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
6926 Also, remove one static variable in the scanner.
6927
6928 * src/scan-gram.l (braces_level): Now auto, not static.
6929 Initialize to zero if the compiler is being picky.
6930 (INITIAL): Clear braces_level instead of incrementing it.
6931 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
6932 as POSIX 1003.1-2001 requires.
6933 * src/system.h (IF_LINT): New macro, taken from coreutils.
6934 * configure.ac: Define "lint" if --enable-gcc-warnings.
6935
6936 2002-11-05 Akim Demaille <akim@epita.fr>
6937
6938 * src/scan-gram.l: When it starts with `%', complain about the
6939 whole directive, not just that `invalid character: %'.
6940
6941 2002-11-04 Akim Demaille <akim@epita.fr>
6942
6943 * Makefile.maint: Update from Autoconf.
6944 (update, cvs-update, po-update, do-po-update): New.
6945
6946 2002-11-04 Akim Demaille <akim@epita.fr>
6947
6948 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
6949 and yyerror.
6950 Have yyerror `use' its arguments.
6951 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
6952 returns true when location & yacc & pure & parse-param.
6953 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
6954
6955 2002-11-04 Akim Demaille <akim@epita.fr>
6956
6957 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
6958 clashes.
6959 * src/scan-gram.l: Use [\'] instead of ['] to pacify
6960 font-lock-mode.
6961 Use complain_at.
6962 Use quote, not quote_n since LOCATION_PRINT no longer uses the
6963 slot 0.
6964
6965 2002-11-03 Paul Eggert <eggert@twinsun.com>
6966
6967 * src/reader.c (get_merge_function, grammar_current_rule_check):
6968 Use consistent diagnostics for reporting type name clashes.
6969 Quote the types with <>, for consistency with Yacc.
6970 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
6971
6972 2002-11-03 Akim Demaille <akim@epita.fr>
6973
6974 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
6975 New.
6976 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
6977 (b4_parse_param): Remove.
6978 Use b4_identification.
6979 Propagate b4_pure_args where needed to pass them to yyerror.
6980 * data/glr.m4 (b4_parse_param): Remove.
6981 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
6982 (b4_lpure_formals): New.
6983 Use b4_identification.
6984 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
6985 b4_user_formals and b4_user_args.
6986 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
6987 (yyreportAmbiguity): When using a pure parser, also need
6988 the location, and the parse-params.
6989 Adjust callers.
6990 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
6991 When using a pure parser, also need the parse-params.
6992 Adjust callers.
6993 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
6994 (%pure-parser + %parse-param) LALR and GLR parsers.
6995 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
6996 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
6997 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
6998 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
6999 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7000 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7001 * doc/bison.texinfo: Untabify the whole file.
7002 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7003 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7004 (Error Reporting): Adjust to these new directives.
7005 Document %error-verbose, deprecate YYERROR_VERBOSE.
7006
7007 2002-11-03 Akim Demaille <akim@epita.fr>
7008
7009 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7010 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7011 command line options.
7012 * tests/cxx-type.at: Formatting changes.
7013
7014 2002-11-03 Paul Eggert <eggert@twinsun.com>
7015
7016 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7017 to count columns correctly, and to check for invalid inputs.
7018
7019 Use mbsnwidth to count columns correctly. Account for tabs, too.
7020 Include mbswidth.h.
7021 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7022 (extend_location): New function.
7023 (YY_LINES): Remove.
7024
7025 Handle CRLF in C code rather than in Lex code.
7026 (YY_INPUT): New macro.
7027 (no_cr_read): New function.
7028
7029 Scan UCNs, even though we don't fully handle them yet.
7030 (convert_ucn_to_byte): New function.
7031
7032 Handle backslash-newline correctly in C code.
7033 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7034 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7035 all uses changed.
7036 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7037 Use {splice} wherever C allows backslash-newline.
7038 YY_STEP after space, newline, vertical-tab.
7039 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
7040
7041 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7042
7043 ({int}, handle_action_dollar, handle_action_at): Check for integer
7044 overflow.
7045
7046 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7047
7048 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7049 as well as \000. Check for UCHAR_MAX, not 255.
7050 Allow \x with an arbitrary positive number of digits, as in C.
7051 Check for overflow here.
7052 Allow \? and UCNs, for compatibility with C.
7053
7054 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7055 with quote slot used by complain_at.
7056
7057 * tests/input.at: Add tests for backslash-newline, m4 quotes
7058 in symbols, long literals, and funny escapes in strings.
7059
7060 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7061 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7062 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7063 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7064 * m4/mbswidth.m4: New file, from GNU coreutils.
7065
7066 * doc/bison.texinfo (Grammar Outline): Document // comments.
7067 (Symbols): Document that trigraphs have no special meaning in Bison,
7068 nor is backslash-newline allowed.
7069 (Actions): Document that trigraphs have no special meaning.
7070
7071 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
7072 no longer used.
7073
7074 2002-11-02 Paul Eggert <eggert@twinsun.com>
7075
7076 * src/reader.c: Don't include quote.h; not needed.
7077 (get_merge_function): Reword warning to be consistent with
7078 type clash diagnostic in grammar_current_rule_check.
7079
7080 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
7081 bug in trigraph handling.
7082
7083 * src/output.c (prepare_symbols): When printing token names,
7084 escape "[" as "@<:@" and likewise for "]".
7085
7086 * src/system.h (errno): Remove declaration, as we are now
7087 assuming C89 or better, and C89 guarantees errno.
7088
7089 2002-10-30 Paul Eggert <eggert@twinsun.com>
7090
7091 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
7092 Check for close failures.
7093 * src/files.h (xfclose): Return void, not int, since it always
7094 returned zero.
7095 * src/files.c (xfclose): Likewise. Report I/O error if ferror
7096 indicates one.
7097 * src/output.c (output_skeleton): Use xfclose rather than fclose
7098 and ferror. xfclose now checks ferror.
7099
7100 * data/glr.c (YYLEFTMOST_STATE): Remove.
7101 (yyreportTree): Use a stack-based leftmost state. This avoids
7102 our continuing battles with bogus warnings about initializers.
7103
7104 2002-10-30 Akim Demaille <akim@epita.fr>
7105
7106 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
7107 #if.
7108
7109 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7110
7111 * tests/glr-regr1.at: New test for reported regressions.
7112 * tests/testsuite.at: Add glr-regr1.at test.
7113 * tests/Makefile.am: Add glr-regr1.at test.
7114
7115 2002-10-24 Paul Eggert <eggert@twinsun.com>
7116
7117 Version 1.75a.
7118
7119 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
7120 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
7121 we use malloc. Don't assume 'A' through 'Z' are contiguous.
7122 Don't assume strdup exists; POSIX says its an XSI extension.
7123 Check for buffer overflow on input.
7124
7125 2002-10-24 Akim Demaille <akim@epita.fr>
7126
7127 * src/output.c (output_skeleton): Don't disable M4sugar comments
7128 too soon: it results in comments being expanded.
7129 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
7130 first output.
7131
7132 2002-10-24 Akim Demaille <akim@epita.fr>
7133
7134 * data/yacc.c (m4_int_type): New.
7135 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
7136 char' as only yacc.c wants K&R portability.
7137 * data/glr.c (yysigned_char): Remove.
7138 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
7139 Reported by Quoc Peyrot.
7140
7141 2002-10-23 Paul Eggert <eggert@twinsun.com>
7142
7143 * src/main.c (main): With --trace=time, report times even if a
7144 non-fatal error occurs. Formerly, the times were reported in some
7145 such cases but not in others.
7146 * src/reader.c (reader): Just return if a complaint has been issued,
7147 instead of exiting, so that 'main' can report times.
7148
7149 2002-10-22 Akim Demaille <akim@epita.fr>
7150
7151 * src/system.h: Include sys/types.
7152 Reported by Bert Deknuydt.
7153
7154 2002-10-23 Paul Eggert <eggert@twinsun.com>
7155
7156 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
7157 Suggested by Art Haas.
7158
7159 2002-10-22 Paul Eggert <eggert@twinsun.com>
7160
7161 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
7162 decl; not needed any more.
7163 * src/main.c (main): Use return to exit, undoing yesterday's change.
7164 The last OS that we could find where this wouldn't work is
7165 SunOS 3.5, and that's too old to worry about now.
7166
7167 * data/glr.c (struct yyltype): Define members even when not
7168 doing locations. This is more consistent with yacc.c, and it
7169 works around the following bug reports:
7170 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
7171 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
7172
7173 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
7174 @acronym consistently. Standardize on "Yacc" instead of "YACC",
7175 "Algol" instead of "ALGOL". Give a bit more history about BNF.
7176
7177 2002-10-22 Akim Demaille <akim@epita.fr>
7178
7179 * data/README: New.
7180
7181 2002-10-21 Paul Eggert <eggert@twinsun.com>
7182
7183 Be consistent about 'bool'; the old code used an enum in one
7184 module and an int in another, and this violates the C standard.
7185 * m4/stdbool.m4: New file, from coreutils 4.5.3.
7186 * configure.ac (AC_HEADER_STDBOOL): Add.
7187 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
7188 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
7189 * src/symtab.c (hash_compare_symbol_t): Likewise.
7190 * src/system.h (bool, false, true): Use a definition consistent
7191 with ../lib/hash.c. All uses changed.
7192
7193 * src/complain.c (warning_issued): Renamed from warn_message_count,
7194 so that we needn't worry about integer overflow (!).
7195 Now of type bool. All uses changed.
7196 (complaint_issued): Renamed from complain_message_count; likewise.
7197
7198 * src/main.c (main): Use exit to exit with failure.
7199
7200 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
7201 rather than 1 and 0.
7202 * src/main.c (main): Likewise.
7203 * src/getargs.c (getargs): Likewise.
7204 * src/reader.c (reader): Likewise.
7205
7206 * src/getarg.c (getargs): Remove duplicate code for
7207 "Try `bison --help'".
7208
7209 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
7210 What was that "2" for?
7211
7212 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
7213 * src/getargs.c (usage): Likewise.
7214
7215 * src/getargs.c (getargs): When there are too few operands, report
7216 the last one. When there are too many, report the first extra
7217 one. This is how diffutils does it.
7218
7219 2002-10-20 Paul Eggert <eggert@twinsun.com>
7220
7221 Remove K&R vestiges.
7222 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
7223 * src/complain.c (VA_START): Remove. Assume prototypes.
7224 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
7225 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
7226 fatal): Assume prototypes.
7227 * src/complain.h: Assume prototypes.
7228 * src/system.h (PARAMS): Remove.
7229 Include <limits.h> unconditionally, since it's guaranteeed even
7230 for a freestanding C89 compiler.
7231 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
7232 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
7233
7234 2002-10-20 Akim Demaille <akim@epita.fr>
7235
7236 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7237 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7238 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7239 (yyresolveStates, yyresolveAction, yyresolveStack)
7240 (yyprocessOneStack): Use them.
7241 (yy_reduce_print): New.
7242 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7243
7244 2002-10-20 Akim Demaille <akim@epita.fr>
7245
7246 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7247 arguments and output `void'.
7248 (b4_c_function): Rename as...
7249 (b4_c_function_def): this.
7250 (b4_c_function_decl, b4_c_ansi_function_def)
7251 (b4_c_ansi_function_decl): New.
7252 Change the interpretation of the arguments: before `int, foo', now
7253 `int foo, foo'.
7254 * data/yacc.c (yyparse): Prototype and define thanks to these.
7255 Adjust b4_c_function_def uses.
7256 * data/glr.c (yyparse): Likewise, but ANSI only.
7257
7258 2002-10-20 Akim Demaille <akim@epita.fr>
7259
7260 * src/output.c (prepare): Move the definition of `tokens_number',
7261 `nterms_number', `undef_token_number', `user_token_number_max'
7262 to...
7263 (prepare_tokens): Here.
7264 (prepare_tokens): Rename as...
7265 (prepare_symbols): this.
7266 (prepare): Move the definition of `rules_number' to...
7267 (prepare_rules): here.
7268 (prepare): Move the definition of `last', `final_state_number',
7269 `states_number' to...
7270 (prepare_states): here.
7271 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7272
7273 2002-10-20 Akim Demaille <akim@epita.fr>
7274
7275 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7276
7277 2002-10-20 Akim Demaille <akim@epita.fr>
7278
7279 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7280 * data/c.m4: here.
7281
7282 2002-10-20 Akim Demaille <akim@epita.fr>
7283
7284 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
7285 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
7286 `pair'.
7287 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
7288 `name' to...
7289 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
7290 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
7291 These.
7292
7293 2002-10-19 Paul Eggert <eggert@twinsun.com>
7294
7295 Do not create a temporary file, as that involves security and
7296 cleanup headaches. Instead, use a pair of pipes.
7297 Derived from a suggestion by Florian Krohm.
7298 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
7299 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
7300 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
7301 (BISON_PREREQ_SUBPIPE): Add.
7302 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
7303 Add subpipe.h, subpipe.c.
7304 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
7305 * po/POTFILES.in: Add lib/subpipe.c.
7306 * src/output.c: Include "subpipe.h".
7307 (m4_invoke): Remove decl.
7308 (scan_skel): New decl.
7309 (output_skeleton): Use pipe rather than temporary file for m4 input.
7310 Check that m4sugar.m4 is readable, to avoid deadlock.
7311 Check for pipe I/O error.
7312 * src/scan-skel.l (readpipe): Remove decl.
7313 (scan_skel): New function, to be used in place of m4_invoke.
7314 Read from stream rather than file.
7315
7316 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
7317 float, as this generates a warning on Solaris 8 + GCC 3.2 with
7318 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
7319 this generates a more-accurate value anyway.
7320
7321 * lib/timevar.c (timervar_accumulate): Rename locals to
7322 avoid confusion with similarly-named more-global.
7323 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
7324
7325 * src/output.c (prepare): Use xstrdup to convert char const *
7326 to char *, to avoid GCC warning.
7327
7328 2002-10-19 Akim Demaille <akim@epita.fr>
7329
7330 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
7331 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
7332 Use them to have `calc.y' ready for %pure-parser.
7333 * data/yacc.c (YYLEX): Pass a yylex return type to
7334 b4_c_function_call.
7335
7336 2002-10-19 Akim Demaille <akim@epita.fr>
7337
7338 Prototype support of %lex-param and %parse-param.
7339
7340 * src/parse-gram.y: Add the definition of the %lex-param and
7341 %parse-param tokens, plus their rules.
7342 Drop the `_' version of %glr-parser.
7343 Add the "," token.
7344 * src/scan-gram.l (INITIAL): Scan them.
7345 * src/muscle_tab.c: Comment changes.
7346 (muscle_insert, muscle_find): Rename `pair' as `probe'.
7347 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
7348 (muscle_entry_s): The `value' member is no longer const.
7349 Adjust all dependencies.
7350 * src/muscle_tab.c (muscle_init): Adjust: use
7351 MUSCLE_INSERT_STRING.
7352 Initialize the obstack earlier.
7353 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
7354 (muscle_pair_list_grow): New.
7355 * data/c.m4 (b4_c_function_call, b4_c_args): New.
7356 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
7357 * tests/calc.at: Use %locations, not --locations.
7358 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
7359
7360 2002-10-19 Akim Demaille <akim@epita.fr>
7361
7362 * src/getargs.c (usage): Take status as argument and exit
7363 accordingly.
7364 Report the traditional `Try ... --help' message when status != 0.
7365 (usage, version): Don't take a FILE * as arg, it is pointless.
7366 (getargs): When there is an incorrect number of arguments, make it
7367 an error, and report it GNUlically thanks to `usage ()'.
7368
7369 2002-10-18 Paul Eggert <eggert@twinsun.com>
7370
7371 * data/glr.c (yyreportParseError): Don't assume that sprintf
7372 yields the length of the printed string, as this is not true
7373 on SunOS 4.1.4. Reported by Peter Klein.
7374
7375 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
7376 * tests/conflicts.at (%nonassoc and eof): Likewise.
7377 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
7378
7379 2002-10-17 Akim Demaille <akim@epita.fr>
7380
7381 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
7382 * src/getargs.c (trace_types, trace_args): Adjust.
7383 * src/reader.c (grammar_current_rule_prec_set)
7384 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
7385 Standardize error messages.
7386 And s/@prec/%prec/!
7387 (reader): Use trace_flag to enable scanner/parser debugging,
7388 instead of an adhoc scheme.
7389 * src/scan-gram.l: Remove trailing debugging code.
7390
7391 2002-10-16 Paul Eggert <eggert@twinsun.com>
7392
7393 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
7394 MUSCLE_TAB_H.
7395
7396 * NEWS: Officially drop support for building Bison with K&R C,
7397 since it didn't work anyway and it's not worth worrying about.
7398 * Makefile.maint (wget_files): Remove ansi2knr.c.
7399 (ansi2knr.c-url_prefix): Remove.
7400 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
7401 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7402 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7403
7404 2002-10-15 Paul Eggert <eggert@twinsun.com>
7405
7406 Stop using the "enum_" trick for K&R-style function definitions;
7407 it confused me, and I was the author! Instead, assume that people
7408 who want to use K&R C compilers (when using these modules in GCC,
7409 perhaps?) will run ansi2knr.
7410
7411 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
7412 All uses of "enum_" changed to "enum ".
7413 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7414 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
7415
7416 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
7417 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
7418 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
7419 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
7420 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
7421 abitset_not, abitset_ones, abitset_or, abitset_or_and,
7422 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
7423 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
7424 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
7425 Use function prototypes; this removes the need for declaring
7426 static functions simply to provide their prototypes.
7427 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
7428 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
7429 bitset_count_, bitset_create, bitset_dump, bitset_first,
7430 bitset_free, bitset_init, bitset_last, bitset_next,
7431 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
7432 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
7433 bitset_print, bitset_release_memory, bitset_toggle_,
7434 bitset_type_choose, bitset_type_get, bitset_type_name_get,
7435 debug_bitset): Likewise.
7436 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
7437 * lib/bitset_stats.c (bitset_log_histogram_print,
7438 bitset_percent_histogram_print, bitset_stats_and,
7439 bitset_stats_and_cmp, bitset_stats_and_or,
7440 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
7441 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
7442 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
7443 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
7444 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
7445 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
7446 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
7447 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
7448 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
7449 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
7450 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
7451 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
7452 bitset_stats_zero): Likewise.
7453 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7454 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7455 bitsetv_dump, debug_bitsetv): Likewise.
7456 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
7457 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
7458 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
7459 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
7460 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
7461 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
7462 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
7463 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
7464 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
7465 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
7466 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
7467 Likewise.
7468 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
7469 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
7470 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
7471 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
7472 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
7473 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
7474 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
7475 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
7476 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
7477 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
7478 lbitset_xor_cmp, lbitset_zero): Likewise.
7479
7480 2002-10-14 Akim Demaille <akim@epita.fr>
7481
7482 Version 1.75.
7483
7484 2002-10-14 Akim Demaille <akim@epita.fr>
7485
7486 * tests/Makefile.am (maintainer-check-posix): New.
7487
7488 2002-10-14 Akim Demaille <akim@epita.fr>
7489
7490 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
7491 member.
7492
7493 2002-10-14 Akim Demaille <akim@epita.fr>
7494
7495 * src/tables.c (table_ninf_remap): base -> tab.
7496 Reported by Matt Rosing.
7497
7498 2002-10-14 Paul Eggert <eggert@twinsun.com>
7499
7500 * tests/action.at, tests/calc.at, tests/conflicts.at,
7501 tests/cxx-type.at, tests/headers.at, tests/input.at,
7502 tests/regression.at, tests/synclines.at, tests/torture.at:
7503 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
7504 so that the tests still work even if POSIXLY_CORRECT is set.
7505 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
7506
7507 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
7508 for portability to K&R hosts. Fix typo: signed char is guaranteed
7509 only to 127, not to 128.
7510 * data/glr.c (yysigned_char): New type.
7511 * data/yacc.c (yysigned_char): Likewise.
7512 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
7513
7514 2002-10-13 Paul Eggert <eggert@twinsun.com>
7515
7516 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
7517 true due to limited range of data type" warning from GCC.
7518
7519 * data/c.m4 (b4_token_defines): Protect against double-inclusion
7520 by wrapping enum yytokentype's definition inside #ifndef
7521 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
7522
7523 2002-10-13 Akim Demaille <akim@epita.fr>
7524
7525 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
7526 Un yy- yyrhs to avoid the name clash with the global YYRHS.
7527
7528 2002-10-13 Akim Demaille <akim@epita.fr>
7529
7530 * Makefile.maint: Update from Autoconf 2.54.
7531 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
7532
7533 2002-10-13 Akim Demaille <akim@epita.fr>
7534
7535 * src/print.c (print_state): Separate the list of solved conflicts
7536 from the other items.
7537 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
7538
7539 2002-10-13 Akim Demaille <akim@epita.fr>
7540
7541 Let nondeterministic skeletons be usable with deterministic
7542 tables.
7543
7544 With the patch, GAWK compiled by GCC without -O2 passes its test
7545 suite using a GLR parser driven by LALR tables. It fails with -O2
7546 because `struct stat' gives two different answers on my machine:
7547 88 (definition of an auto var) and later 96 (memset on this var).
7548 Hence the stack is badly corrumpted. The headers inclusion is to
7549 blame: if I move the awk.h inclusion before GLR's system header
7550 inclusion, the two struct stat have the same size.
7551
7552 * src/tables.c (pack_table): Always create conflict_table.
7553 (token_actions): Always create conflict_list.
7554 * data/glr.c (YYFLAG): Remove, unused.
7555
7556 2002-10-13 Akim Demaille <akim@epita.fr>
7557
7558 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
7559 (O0FLAGS): New.
7560 (VALGRIND, GXX): New.
7561 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
7562 * tests/bison.in: Run $PREBISON a pre-command.
7563 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
7564 (maintainer-check-g++): New.
7565 * Makefile.am (maintainer-check): New.
7566
7567 2002-10-13 Akim Demaille <akim@epita.fr>
7568
7569 * data/glr.c: Formatting changes.
7570 Tweak some trace messages to match yacc.c's.
7571
7572 2002-10-13 Akim Demaille <akim@epita.fr>
7573
7574 GLR parsers sometimes raise parse errors instead of performing the
7575 default reduction.
7576 Reported by Charles-Henry de Boysson.
7577
7578 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
7579 check the length of the traces when %glr.
7580 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
7581 GLR's traces.
7582 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
7583 Test GLR parsers.
7584 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
7585 (yyltype): Remove the yy prefix from the member names.
7586 (yytable): Complete its comment.
7587 (yygetLRActions): Map error action number from YYTABLE from
7588 YYTABLE_NINF to 0.
7589 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
7590 (which was a bug: it should have been YYTABEL_NINF, and yet it was
7591 not satisfying as we could compare an YYACTION computed from
7592 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
7593 only value for error actions.
7594 (yyreportParseError): In verbose parse error messages, don't issue
7595 `error' in the list of expected tokens.
7596 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
7597 next action to perform to match glr.c's decoding.
7598 (yytable): Complete its comment.
7599
7600 2002-10-13 Paul Eggert <eggert@twinsun.com>
7601
7602 Fix problem reported by Henrik Grubbstroem in
7603 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
7604 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
7605 because the Bison parser reads the second action before reducing
7606 the first one.
7607 * src/scan-gram.l (rule_length): New static var.
7608 Use it to keep track of the rule length in the scanner, since
7609 we can't expect the parser to be in lock-step sync with the scanner.
7610 (handle_action_dollar, handle_action_at): Use this var.
7611 * tests/actions.at (Exotic Dollars): Test for the problem.
7612
7613 2002-10-12 Paul Eggert <eggert@twinsun.com>
7614
7615 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
7616 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
7617 Include <sys/time.h> when checking for clock_t and struct tms.
7618 Use same include order as source.
7619 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
7620 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
7621
7622 * lib/timevar.c: Update copyright date and clarify comments.
7623 (get_time) [IN_GCC]: Keep the GCC version for reference.
7624
7625 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
7626 GCC version as of today, then merge Bison's changes.
7627 Change "GCC" to "Bison" in copyright notice. timevar.def's
7628 author is Akim, so change that too.
7629
7630 * src/reader.c (grammar_current_rule_check):
7631 Don't worry about the default action if $$ is untyped.
7632 Prevents bogus warnings reported by Jim Gifford in
7633 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
7634
7635 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
7636 * data/glr.c, data/lalr1.cc, data/yacc.c:
7637 Output token definitions before the first part of user declarations.
7638 Fixes compatibility problem reported by Jim Gifford for kbd in
7639 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
7640
7641 2002-10-11 Paul Eggert <eggert@twinsun.com>
7642
7643 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
7644 (yyparse): here. This undoes some of the 2002-07-25 change.
7645 Compatibility problem reported by Ralf S. Engelschall with
7646 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
7647
7648 2002-10-11 Akim Demaille <akim@epita.fr>
7649
7650 * tests/regression.at Characters Escapes): New.
7651 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
7652 characters.
7653 Reported by Jan Nieuwenhuizen.
7654
7655 2002-10-11 Akim Demaille <akim@epita.fr>
7656
7657 * po/id.po: New.
7658
7659 2002-10-10 Paul Eggert <eggert@twinsun.com>
7660
7661 Portability fixes for bitsets; this also avoids several GCC
7662 warnings.
7663
7664 * lib/abitset.c: Include <stddef.h>, for offsetof.
7665 * lib/lbitset.c: Likewise.
7666
7667 * lib/abitset.c (abitset_bytes): Return a size that is aligned
7668 properly for vectors of objects. Do not assume that adding a
7669 header size to a multiple of a word size yields a value that is
7670 properly aligned for the whole union.
7671 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7672
7673 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
7674 unique names for structures.
7675 * lib/ebitset.c (ebitset_bytes): Likewise.
7676 * lib/lbitset.c (lbitset_bytes): Likewise.
7677
7678 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
7679 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
7680 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
7681 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
7682 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
7683 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
7684 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
7685 to improve the type-checking that GCC can do.
7686 * lib/bitset.c (bitset_op4_cmp): Likewise.
7687 * lib/bitset_stats.c (bitset_stats_count,
7688 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
7689 bitset_stats_copy, bitset_stats_disjoint_p,
7690 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
7691 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
7692 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
7693 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
7694 bitset_stats_and_or_cmp, bitset_stats_andn_or,
7695 bitset_stats_andn_or_cmp, bitset_stats_or_and,
7696 bitset_stats_or_and_cmp): Likewise.
7697 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
7698 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
7699 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
7700 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
7701
7702 * lib/abitset.h: Include bitset.h, not bbitset.h.
7703 * lib/ebitset.h: Likewise.
7704 * lib/lbitset.h: Likewise.
7705
7706 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
7707 All instances of parameters of type enum bitset_opts are now of
7708 type enum_bitset_opts, to conform to the C Standard, and similarly
7709 for enum_bitset_type.
7710 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7711 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
7712
7713 Do not use "struct bitset_struct" to mean different things in
7714 different modules. Not only is this confusing, it violates
7715 the C Standard, which requires that structure types in different
7716 modules must be compatible if one is to be passed to the other.
7717 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
7718 All instances of "struct bitset_struct *" replaced with "bitset".
7719 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
7720 (union bitset_union, struct abitset_struct, struct ebitset_struct,
7721 struct lbitset_struct, struct bitset_stats_struct): New types.
7722 All uses of struct bitset_struct changed to union bitset_union,
7723 etc.
7724 * lib/abitset.c (struct abitset_struct, abitset,
7725 struct bitset_struct): Remove.
7726 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
7727 struct bitset_struct): Remove.
7728 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
7729 bitset_struct): Remove.
7730 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
7731 Likewise.
7732
7733 Do not call a function of type T using a call that assumes the
7734 function is of a different type U. Standard C requires that a
7735 function must be called with a type that is compatible with its
7736 definition.
7737 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
7738 New decls.
7739 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
7740 New functions.
7741 * lib/ebitset.c (PFV): Remove.
7742 * lib/lbitset.c (PFV): Likewise.
7743 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
7744 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
7745 decls.
7746 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
7747 (ebitset_vtable): Use them.
7748 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
7749 lbitset_xor): New functions.
7750 (lbitset_vtable): Use them.
7751
7752 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
7753 Declare.
7754
7755 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
7756 GCC warning.
7757 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
7758 Use offsetof, for simplicity.
7759
7760 2002-10-06 Paul Eggert <eggert@twinsun.com>
7761
7762 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
7763 the same width as int. This reapplies a hunk of the 2002-08-12 patch
7764 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
7765 which was inadvertently undone by the 2002-09-30 patch.
7766 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
7767 the same width as int.
7768
7769 2002-10-04 Paul Eggert <eggert@twinsun.com>
7770
7771 Version 1.50.
7772
7773 * configure.ac (AC_INIT), NEWS: Increment version number.
7774
7775 * doc/bison.texinfo: Minor spelling, grammar, and white space
7776 fixes.
7777 (Symbols): Mention that any negative value returned from yylex
7778 signifies end-of-input. Warn about negative chars. Mention
7779 the portable Standard C character set.
7780
7781 The GNU coding standard says CFLAGS and YFLAGS are reserved
7782 for the installer to set.
7783 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
7784 * src/Makefile.am (AM_CFLAGS): Likewise.
7785 (AM_YFLAGS): Renamed from YFLAGS.
7786
7787 Fix some MAX and MIN problems.
7788 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
7789 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
7790 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
7791 * src/reader.c (reader): Use it.
7792
7793 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
7794 POSIX 1003.1-2001 has removed fgrep.
7795
7796 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
7797
7798 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
7799 interpreted as signed.
7800 * lib/ebitset.c (ebitset_list): Fix bug.
7801
7802 2002-10-01 Paul Eggert <eggert@twinsun.com>
7803
7804 More fixes for 64-bit hosts and large bitsets.
7805
7806 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
7807 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
7808 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
7809 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
7810 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
7811 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
7812 bitset_count_): Likewise.
7813 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
7814 bitset_first, bitset_last): Likewise.
7815 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
7816 bitset_stats_list_reverse, bitset_stats_size,
7817 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
7818 Likewise.
7819 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7820 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7821 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7822 bitsetv_reflexive_transitive_closure): Likewise.
7823 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
7824 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
7825 Likewise.
7826 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
7827 Likewise.
7828
7829 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
7830 Use size_t, not unsigned int, to count bytes.
7831 * lib/abitset.h (abitset_bytes): Likewise.
7832 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
7833 Likewise.
7834 * lib/bitset.h (bitset_bytes): Likewise.
7835 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
7836 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
7837 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7838 * lib/ebitset.c (ebitset_bytes): Likewise.
7839 * lib/ebitset.h (ebitset_bytes): Likewise.
7840 * lib/lbitset.c (lbitset_bytes): Likewise.
7841 * lib/lbitset.h (lbitset_bytes): Likewise.
7842
7843 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
7844 abitset_subset_p, abitset_disjoint_p, abitset_and,
7845 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
7846 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
7847 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
7848 abitset_or_and, abitset_or_and_cmp):
7849 Use bitset_windex instead of unsigned int.
7850 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7851 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
7852 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
7853 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
7854 Likewise.
7855 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
7856
7857 * lib/bitset.c (bitset_print):
7858 Use proper printf formats for widths of integer types.
7859 * lib/bitset_stats.c (bitset_percent_histogram_print,
7860 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
7861 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7862 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7863 * lib/lbitset.c (lbitset_bytes): Likewise.
7864
7865 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
7866 BITSET_SIZE_MAX): New macros.
7867 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
7868 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
7869 to BITSET_WINDEX_MAX.
7870
7871 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
7872 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
7873 since we now return the bitset_bindex type (not int).
7874
7875 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
7876 when computing sizes.
7877 * lib/ebitset.c (ebitset_elts_grow): Likewise.
7878
7879 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
7880 and avoid cast to unsigned.
7881
7882 2002-09-30 Akim Demaille <akim@epita.fr>
7883
7884 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
7885 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
7886 Updates from Michael Hayes.
7887
7888 2002-09-30 Art Haas <ahaas@neosoft.com>
7889
7890 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
7891 invocations.
7892 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
7893 defined.
7894
7895 2002-09-27 Akim Demaille <akim@epita.fr>
7896
7897 Version 1.49c.
7898
7899 2002-09-27 Akim Demaille <akim@epita.fr>
7900
7901 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
7902 (Because of AC_LIBSOURCE).
7903
7904 2002-09-27 Akim Demaille <akim@epita.fr>
7905
7906 Playing with Autoscan.
7907
7908 * configure.ac: Remove the old LIBOBJ tweaks.
7909 (AC_REPLACE_FUNCS): Add strrchr and strtol.
7910 * lib/strrchr.c: New.
7911 * lib/strtol.c: New, from the Coreutils 4.5.1.
7912
7913 2002-09-27 Akim Demaille <akim@epita.fr>
7914
7915 Playing with Autoscan.
7916
7917 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
7918 * lib/Makefile.am (libbison_a_SOURCES): No longer include
7919 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
7920 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
7921 Coreutils 4.5.1.
7922
7923 2002-09-24 Akim Demaille <akim@epita.fr>
7924
7925 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
7926 (Frequently Asked Questions, Parser Stack Overflow): New.
7927
7928 2002-09-13 Akim Demaille <akim@epita.fr>
7929
7930 Playing with autoscan.
7931
7932 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
7933 * src/files.c (skeleton_find): Remove, unused.
7934 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
7935 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
7936
7937 2002-09-13 Akim Demaille <akim@epita.fr>
7938
7939 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
7940 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
7941
7942 2002-09-13 Akim Demaille <akim@epita.fr>
7943
7944 * configure.ac: Require 2.54.
7945 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
7946 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
7947 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
7948 Remove, provided by Autoconf macros.
7949
7950 2002-09-12 Akim Demaille <akim@epita.fr>
7951
7952 * m4/prereq.m4: Update, from Coreutils 4.5.1.
7953
7954 2002-09-12 Akim Demaille <akim@epita.fr>
7955
7956 * m4/prereq.m4: Update, from Fileutils 4.1.5.
7957 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
7958 Reported by Martin Mokrejs.
7959
7960 2002-09-10 Akim Demaille <akim@epita.fr>
7961
7962 * src/parse-gram.y: Associate a human readable string to each
7963 token type.
7964 * tests/regression.at (Invalid inputs): Adjust.
7965
7966 2002-09-10 Gary V. Vaughan <gary@gnu.org>
7967
7968 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
7969 with an Autoconf-2.5x style configure.ac.
7970
7971 2002-09-06 Paul Eggert <eggert@twinsun.com>
7972
7973 * doc/bison.texinfo (Conditions): Make explicit that the GPL
7974 exception applies only to yacc.c. This is a modification of a
7975 patch originally suggested by Akim Demaille.
7976
7977 2002-09-06 Akim Demaille <akim@epita.fr>
7978
7979 * data/c.m4 (b4_copyright): Move the GPL exception comment from
7980 here to...
7981 * data/yacc.c: here.
7982
7983 * data/lalr1.cc (struct yyltype): Don't define it, since we use
7984 LocationType.
7985 (b4_ltype): Default to yy::Location from location.hh.
7986
7987 2002-09-04 Jim Meyering <jim@meyering.net>
7988
7989 * data/yacc.c: Guard the declaration of yytoknum also with
7990 `#ifdef YYPRINT', so it is declared only when used.
7991
7992 2002-09-04 Akim Demaille <akim@epita.fr>
7993
7994 * configure.in: Rename as...
7995 * configure.ac: this.
7996 Bump to 1.49c.
7997
7998 2002-09-04 Akim Demaille <akim@epita.fr>
7999
8000 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8001 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8002 translate maintainer only messages.
8003
8004 2002-08-12 Paul Eggert <eggert@twinsun.com>
8005
8006 Version 1.49b.
8007
8008 * Makefile.am (SUBDIRS): Remove intl.
8009 (DISTCLEANFILES): Remove.
8010 * NEWS: Mention that GNU M4 is now required. Clarify what is
8011 meant by "larger grammars". Mention the pt_BR translation.
8012 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8013 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8014 Bump version from 0.11.2 to 0.11.5.
8015 (BISON_PREREQ_STAGE): Remove.
8016 (AM_GNU_GETTEXT): Use external gettext.
8017 (AC_OUTPUT): Remove intl/Makefile.
8018
8019 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8020
8021 * data/glr.c: Include string.h, for strlen.
8022 (yyreportParseError): Use size_t for yysize.
8023 (yy_yypstack): No longer nested inside yypstates, as nested
8024 functions are not portable. Do not assume size_t is the
8025 same width as int.
8026 (yypstates): Do not assume that ptrdiff_t is the same width
8027 as int, and similarly for yyposn and YYINDEX.
8028
8029 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8030
8031 * lib/Makefile.am (INCLUDES): Do not include from the intl
8032 directory, which has been removed.
8033 * src/Makefile.am (INCLUDES): Likewise.
8034
8035 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8036 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8037 New vars.
8038
8039 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8040 * tests/Makefile.am (EXTRA_DIST): Likewise.
8041
8042 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8043 Do not assume that bitset_windex is the same width as unsigned.
8044
8045 * lib/abitset.c (abitset_unused_clear): Do not assume that
8046 bitset_word is the same width as int.
8047 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8048 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8049 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8050 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8051 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8052
8053 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8054 portability to one's complement hosts!).
8055 * lib/ebitset.c (ebitset_op1): Likewise.
8056 * lib/lbitset.c (lbitset_op1): Likewise.
8057
8058 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8059 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8060 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8061 Sync with fileutils.
8062 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8063 lib/gettext.h: Sync with diffutils.
8064
8065 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8066 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8067
8068 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
8069 PROTOTYPES to check for prototypes, and "defined __STDC__" to
8070 check for void *.
8071
8072 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
8073 size_t; the old version tried to do this but casted improperly.
8074 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
8075 (bitset_test): Now returns int, not unsigned long.
8076
8077 * lib/bitset_stats.c: Include "gettext.h".
8078 (_): New macro.
8079 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
8080 name locals "index", as it generates unnecessary warnings on some
8081 hosts that have an "index" function.
8082
8083 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
8084 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
8085 they need translation.
8086 * src/LR0.c (state_list_append, new_itemsets, get_state,
8087 append_states, generate_states): Likewise.
8088 * src/assoc.c (assoc_to_string): Likewise.
8089 * src/closure.c (print_closure, set_firsts, closure): Likewise.
8090 * src/gram.c (grammar_dump): Likewise.
8091 * src/injections.c (injections_compute): Likewise.
8092 * src/lalr.c (lookaheads_print): Likewise.
8093 * src/relation.c (relation_transpose): Likewise.
8094 * src/scan-gram.l: Likewise.
8095 * src/tables.c (table_grow, pack_vector): Likewise.
8096
8097 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
8098 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
8099 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
8100 * m4/mbstate_t.m4: Sync with fileutils.
8101 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
8102
8103 * po/LINGUAS: Add pt_BR.
8104 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
8105 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
8106 lib/timevar.c.
8107 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
8108 manual recommends.
8109 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
8110
8111 * src/complain.c (strerror_r): Remove decl; not needed.
8112 (strerror): Use same pattern as ../lib/error.c.
8113
8114 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
8115
8116 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
8117
8118 * src/main.c (main): Cast result of bindtextdomain and textdomain
8119 to void, to avoid a GCC warning when --disable-nls is in effect.
8120
8121 * src/scan-gram.l: Use strings rather than escapes when possible,
8122 to minimize the number of warnings from xgettext.
8123 (handle_action_dollar, handle_action_at): Don't use isdigit,
8124 as it mishandles negative chars and it may not work as expected
8125 outside the C locale.
8126
8127 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
8128 this is a GCC extension and is not portable to other compilers.
8129
8130 * src/system.h (alloca): Use same pattern as ../lib/error.c.
8131 Do not include <ctype.h>; no longer needed.
8132 Do not include <malloc.h>; no longer needed (and generates
8133 warnings on OpenBSD 3.0).
8134
8135 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
8136 it's not portable.
8137
8138 * tests/regression.at: Do not use 'cc -c input.c -o input';
8139 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
8140
8141 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
8142 exit status as failure, not just exit status 1. Sun C exits
8143 with status 2 sometimes.
8144
8145 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
8146 Use it for the two large tests.
8147
8148 2002-08-02 Akim Demaille <akim@epita.fr>
8149
8150 * src/conflicts.c (conflicts_output): Don't output rules never
8151 reduced here, since anyway that computation doesn't work.
8152 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
8153 (rule_useless_p, rule_never_reduced_p): New.
8154 (grammar_rules_partial_print): Use a filter instead of a range.
8155 Display the title only if needed.
8156 (grammar_rules_print): Adjust.
8157 (grammar_rules_never_reduced_report): New.
8158 * src/tables.c (action_row): Move the computation of rules never
8159 reduced to...
8160 (token_actions): here.
8161 * src/main.c (main): Make the parser before making the report, so
8162 that rules never reduced are computed.
8163 Call grammar_rules_never_reduced_report.
8164 * src/print.c (print_results): Report rules never reduced.
8165 * tests/conflicts.at, tests/reduce.at: Adjust.
8166
8167 2002-08-01 Akim Demaille <akim@epita.fr>
8168
8169 Instead of attaching lookaheads and duplicating the rules being
8170 reduced by a state, attach the lookaheads to the reductions.
8171
8172 * src/state.h (state_t): Remove the `lookaheads',
8173 `lookaheads_rule' member.
8174 (reductions_t): Add a `lookaheads' member.
8175 Use a regular array for the `rules'.
8176 * src/state.c (reductions_new): Initialize the lookaheads member
8177 to 0.
8178 (state_rule_lookaheads_print): Adjust.
8179 * src/state.h, src/state.c (state_reductions_find): New.
8180 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
8181 (count_rr_conflicts): Adjust.
8182 * src/lalr.c (LArule): Remove.
8183 (add_lookback_edge): Adjust.
8184 (state_lookaheads_count): New.
8185 (states_lookaheads_initialize): Merge into...
8186 (initialize_LA): this.
8187 (lalr_free): Adjust.
8188 * src/main.c (main): Don't free nullable and derives too early: it
8189 is used by --verbose.
8190 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
8191
8192 2002-08-01 Akim Demaille <akim@epita.fr>
8193
8194 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
8195 `rule_number_t**'.
8196 (set_derives, free_derives): Rename as...
8197 (derives_compute, derives_free): this.
8198 Adjust all dependencies.
8199 * src/nullable.c (set_nullable, free_nullable): Rename as...
8200 (nullable_compute, nullable_free): these.
8201 (rule_list_t): Store rule_t *, not rule_number_t.
8202 * src/state.c (state_rule_lookaheads_print): Directly compare rule
8203 pointers, instead of their numbers.
8204 * src/main.c (main): Call nullable_free, and derives_free earlier,
8205 as they were lo longer used.
8206
8207 2002-08-01 Akim Demaille <akim@epita.fr>
8208
8209 * lib/timevar.c (get_time): Include children time.
8210 * src/lalr.h (LA, LArule): Don't export them: used with the
8211 state_t.
8212 * src/lalr.c (LA, LArule): Static.
8213 * src/lalr.h, src/lalr.c (lalr_free): New.
8214 * src/main.c (main): Call it.
8215 * src/tables.c (pack_vector): Check whether loc is >= to the
8216 table_size, not >.
8217 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
8218 (tables_generate): do it, since that's also it which allocates
8219 them.
8220 Don't free LA and LArule, main does.
8221
8222 2002-07-31 Akim Demaille <akim@epita.fr>
8223
8224 Separate parser tables computation and output.
8225
8226 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
8227 (conflict_list, conflict_list_cnt, table, check, table_ninf)
8228 (yydefgoto, yydefact, high): Move to...
8229 * src/tables.h, src/tables.c: here.
8230 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8231 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8232 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
8233 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
8234 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
8235 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8236 (action_row, save_row, token_actions, save_column, default_goto)
8237 (goto_actions, sort_actions, matching_state, pack_vector)
8238 (table_ninf_remap, pack_table, prepare_actions): Move to...
8239 * src/tables.c: here.
8240 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8241 * src/output.c (token_actions, output_base, output_conflicts)
8242 (output_check): Merge into...
8243 (prepare_actions): this.
8244 (actions_output): Rename as...
8245 (user_actions_output): this.
8246 * src/main.c (main): Call tables_generate and tables_free.
8247
8248 2002-07-31 Akim Demaille <akim@epita.fr>
8249
8250 Steal GCC's --time-report support.
8251
8252 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8253 stolen/adjusted from GCC.
8254 * m4/stage.m4: Remove time related checks.
8255 * m4/timevar.m4: New.
8256 * configure.in: Adjust.
8257 * src/system.h: Adjust to using timevar.h.
8258 * src/getargs.h, src/getargs.c: Support trace_time for
8259 --trace=time.
8260 * src/main.c (stage): Remove.
8261 (main): Replace `stage' invocations with timevar calls.
8262 * src/output.c: Insert pertinent timevar calls.
8263
8264 2002-07-31 Akim Demaille <akim@epita.fr>
8265
8266 Let --trace have arguments.
8267
8268 * src/getargs.h (enum trace_e): New.
8269 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8270 (long_options, short_options): --trace/-T takes an optional
8271 argument.
8272 Change all the uses of trace_flag to reflect the new flags.
8273 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8274
8275 Strengthen `stage' portability.
8276
8277 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8278 * configure.in: Use it.
8279 Don't check for malloc.h and sys/times.h.
8280 * src/system.h: Include them when appropriate.
8281 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
8282 times and struct tms are available.
8283
8284 2002-07-30 Akim Demaille <akim@epita.fr>
8285
8286 In verbose parse error message, don't report `error' as an
8287 expected token.
8288 * tests/actions.at (Printers and Destructors): Adjust.
8289 * tests/calc.at (Calculator $1): Adjust.
8290 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
8291 error message, do not report the parser accepts the error token in
8292 that state.
8293
8294 2002-07-30 Akim Demaille <akim@epita.fr>
8295
8296 Normalize conflict related messages.
8297
8298 * src/complain.h, src/complain.c (warn, complain): New.
8299 * src/conflicts.c (conflicts_print): Use them.
8300 (conflict_report_yacc): New, extracted from...
8301 (conflicts_print): here.
8302 * tests/conflicts.at, tests/existing.at: Adjust.
8303
8304 2002-07-30 Akim Demaille <akim@epita.fr>
8305
8306 Report rules which are never reduced by the parser: those hidden
8307 by conflicts.
8308
8309 * src/LR0.c (save_reductions): Don't make the final state too
8310 different: save its reduction (accept) instead of having a state
8311 without any action (no shift or goto, no reduce).
8312 Note: the final state is now a ``regular'' state, i.e., the
8313 parsers now contain `reduce 0' as default reduction.
8314 Nevertheless, since they decide to `accept' when yystate =
8315 final_state, they still will not reduce rule 0.
8316 * src/print.c (print_actions, print_reduction): Adjust.
8317 * src/output.c (action_row): Track reduced rules.
8318 (token_actions): Report rules never reduced.
8319 * tests/conflicts.at, tests/regression.at: Adjust.
8320
8321 2002-07-30 Akim Demaille <akim@epita.fr>
8322
8323 `stage' was accidently included in a previous patch.
8324 Initiate its autoconfiscation.
8325
8326 * configure.in: Look for malloc.h and sys/times.h.
8327 * src/main.c (stage): Adjust.
8328 Report only when trace_flag.
8329
8330 2002-07-29 Akim Demaille <akim@epita.fr>
8331
8332 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
8333 state_number_t.
8334 (errs_t): symbol_t*, not symbol_number_t.
8335 (reductions_t): rule_t*, not rule_number_t.
8336 (FOR_EACH_SHIFT): New.
8337 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
8338 * src/print.c, src/print_graph.c: Adjust.
8339
8340 2002-07-29 Akim Demaille <akim@epita.fr>
8341
8342 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
8343
8344 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
8345 (endtoken, accept): these.
8346 * src/reader.c (reader): Set endtoken's default tag to "$end".
8347 Set undeftoken's tag to "$undefined" instead of "$undefined.".
8348 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
8349 Adjust.
8350
8351 2002-07-29 Akim Demaille <akim@epita.fr>
8352
8353 * src/reduce.c (reduce_grammar): When the language is empty,
8354 complain about the start symbol, not the axiom.
8355 Use its location.
8356 * tests/reduce.at (Empty Language): New.
8357
8358 2002-07-26 Akim Demaille <akim@epita.fr>
8359
8360 * src/reader.h, src/reader.c (gram_error): ... can't get
8361 yycontrol without making too strong assumptions on the parser
8362 itself.
8363 * src/output.c (prepare_tokens): Use the real 0th value of
8364 token_translations instead of `0'.
8365 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
8366 visible here.
8367 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
8368 for the time being: %locations ought to provide it to yyerror.
8369
8370 2002-07-25 Akim Demaille <akim@epita.fr>
8371
8372 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
8373 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
8374 * tests/regression.at (Web2c Actions): Adjust.
8375
8376 2002-07-25 Akim Demaille <akim@epita.fr>
8377
8378 Stop storing rules from 1 to nrules + 1.
8379
8380 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
8381 * src/nullable.c, src/output.c, src/print.c, src/reader.c
8382 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
8383 Iterate from 0 to nrules.
8384 Use rule_number_as_item_number and item_number_as_rule_number.
8385 Adjust to `derive' now containing possibly 0.
8386 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
8387 Handle the `- 1' part in rule numbers from/to item numbers.
8388 * src/conflicts.c (log_resolution): Fix the message which reversed
8389 shift and reduce.
8390 * src/output.c (action_row): Initialize default_rule to -1.
8391 (token_actions): Adjust.
8392 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
8393 expected output.
8394 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
8395
8396 2002-07-25 Akim Demaille <akim@epita.fr>
8397
8398 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
8399 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
8400 (b4_c_knr_arg_decl): New.
8401 * data/yacc.c: Use it to define yysymprint, yydestruct, and
8402 yyreport_parse_error.
8403
8404 2002-07-25 Akim Demaille <akim@epita.fr>
8405
8406 * data/yacc.c (yyreport_parse_error): New, extracted from...
8407 (yyparse): here.
8408 (yydestruct, yysymprint): Move above yyparse.
8409 Be K&R compliant.
8410
8411 2002-07-25 Akim Demaille <akim@epita.fr>
8412
8413 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
8414 replace...
8415 (b4_sint_type, b4_uint_type): these.
8416 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
8417 * tests/regression.at (Web2c Actions): Adjust.
8418
8419 2002-07-25 Akim Demaille <akim@epita.fr>
8420
8421 * src/gram.h (TIEM_NUMBER_MAX): New.
8422 (item_number_of_rule_number, rule_number_of_item_number): Rename
8423 as...
8424 (rule_number_as_item_number, item_number_as_rule_number): these.
8425 Adjust dependencies.
8426 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8427 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8428 (symbol_number_to_vector_number): New.
8429 (order): Of vector_number_t* type.
8430 (base_t, BASE_MAX, BASE_MIN): New.
8431 (froms, tos, width, pos, check): Of base_t type.
8432 (action_number_t, ACTION_MIN, ACTION_MAX): New.
8433 (actrow): Of action_number_t type.
8434 (conflrow): Of unsigned int type.
8435 (table_ninf, base_ninf): New.
8436 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
8437 (muscle_insert_int_table, muscle_insert_base_table)
8438 (muscle_insert_rule_number_table): New.
8439 (prepare_tokens): Output `toknum' as int_table.
8440 (action_row): Returns a rule_number_t.
8441 Use ACTION_MIN, not SHRT_MIN.
8442 (token_actions): yydefact is rule_number_t*.
8443 (table_ninf_remap): New.
8444 (pack_table): Use it for `base' and `table'.
8445 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
8446 replaced with...
8447 (YYPACT_NINF, YYTABLE_NINF): these.
8448 (yypact, yytable): Compute their types instead of hard-coded
8449 `short'.
8450 * tests/regression.at (Web2c Actions): Adjust.
8451
8452 2002-07-19 Akim Demaille <akim@epita.fr>
8453
8454 * src/scan-gram.l (id): Can start with an underscore.
8455
8456 2002-07-16 Akim Demaille <akim@epita.fr>
8457
8458 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
8459 Adjust all former `associativity' dependencies.
8460 * src/symtab.c (symbol_new): Default associativity is `undef', not
8461 `right'.
8462 (symbol_check_alias_consistence): Adjust.
8463
8464 2002-07-09 Akim Demaille <akim@epita.fr>
8465
8466 * doc/bison.texinfo: Properly set the ``header'' part.
8467 Use @dircategory ``GNU programming tools'' as per Texinfo's
8468 documentation.
8469 Use @copying.
8470
8471 2002-07-09 Akim Demaille <akim@epita.fr>
8472
8473 * lib/quotearg.h: Protect against multiple inclusions.
8474 * src/location.h (location_t): Add a `file' member.
8475 (LOCATION_RESET, LOCATION_PRINT): Adjust.
8476 * src/complain.c (warn_at, complain_at, fatal_at): Drop
8477 `error_one_per_line' support.
8478
8479 2002-07-09 Akim Demaille <akim@epita.fr>
8480
8481 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
8482 * src/reader.c (lineno): Remove.
8483 Adjust all dependencies.
8484 (get_merge_function): Take a location and use complain_at.
8485 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
8486 * tests/regression.at (Invalid inputs, Mixing %token styles):
8487 Adjust.
8488
8489 2002-07-09 Akim Demaille <akim@epita.fr>
8490
8491 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
8492 recovery rule, and forbid extensions when --yacc.
8493 (gram_error): Use complain_at.
8494 * src/reader.c (reader): Exit if there were parse errors.
8495
8496 2002-07-09 Akim Demaille <akim@epita.fr>
8497
8498 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
8499 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
8500 Reported by R Blake <blakers@mac.com>.
8501
8502 2002-07-09 Akim Demaille <akim@epita.fr>
8503
8504 * data/yacc.c: Output the copyright notive in the header.
8505
8506 2002-07-03 Akim Demaille <akim@epita.fr>
8507
8508 * src/output.c (froms, tos): Are state_number_t.
8509 (save_column): sp, sp1, and sp2 are state_number_t.
8510 (prepare): Rename `final' as `final_state_number', `nnts' as
8511 `nterms_number', `nrules' as `rules_number', `nstates' as
8512 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
8513 unused.
8514 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
8515 * data/lalr1.cc (nsym_): Remove, unused.
8516
8517 2002-07-03 Akim Demaille <akim@epita.fr>
8518
8519 * src/lalr.h, src/lalr.c (goto_number_t): New.
8520 * src/lalr.c (goto_list_t): New.
8521 Propagate them.
8522 * src/nullable.c (rule_list_t): New.
8523 Propagate.
8524 * src/types.h: Remove.
8525
8526 2002-07-03 Akim Demaille <akim@epita.fr>
8527
8528 * src/closure.c (print_fderives): Use rule_rhs_print.
8529 * src/derives.c (print_derives): Use rule_rhs_print.
8530 (rule_list_t): New, replaces `shorts'.
8531 (set_derives): Add comments.
8532 * tests/sets.at (Nullable, Firsts): Adjust.
8533
8534 2002-07-03 Akim Demaille <akim@epita.fr>
8535
8536 * src/output.c (prepare_actions): Free `tally' and `width'.
8537 (prepare_actions): Allocate and free `order'.
8538 * src/symtab.c (symbols_free): Free `symbols'.
8539 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
8540 * src/output.c (m4_invoke): Move to...
8541 * src/scan-skel.l: here.
8542 (<<EOF>>): Close yyout, and free its name.
8543
8544 2002-07-03 Akim Demaille <akim@epita.fr>
8545
8546 Fix some memory leaks, and fix a bug: state 0 was examined twice.
8547
8548 * src/LR0.c (new_state): Merge into...
8549 (state_list_append): this.
8550 (new_states): Merge into...
8551 (generate_states): here.
8552 (set_states): Don't ensure a proper `errs' state member here, do it...
8553 * src/conflicts.c (conflicts_solve): here.
8554 * src/state.h, src/state.c: Comment changes.
8555 (state_t): Rename member `shifts' as `transitions'.
8556 Adjust all dependencies.
8557 (errs_new): For consistency, also take the values as argument.
8558 (errs_dup): Remove.
8559 (state_errs_set): New.
8560 (state_reductions_set, state_transitions_set): Assert that no
8561 previous value was assigned.
8562 (state_free): New.
8563 (states_free): Use it.
8564 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
8565 temporary storage: use `errs' and `nerrs' as elsewhere.
8566 (set_conflicts): Allocate and free this `errs'.
8567
8568 2002-07-02 Akim Demaille <akim@epita.fr>
8569
8570 * lib/libiberty.h: New.
8571 * lib: Update the bitset implementation from upstream.
8572 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
8573 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
8574 * src/main.c: Adjust bitset stats calls.
8575
8576 2002-07-01 Paul Eggert <eggert@twinsun.com>
8577
8578 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
8579 char, so that negative chars don't collide with $.
8580
8581 2002-06-30 Akim Demaille <akim@epita.fr>
8582
8583 Have the GLR tests be `warning' checked, and fix the warnings.
8584
8585 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
8586 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
8587 (yyremoveDeletes): `yyi' and `yyj' are size_t.
8588 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
8589 (yyaddDeferredAction): static.
8590 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
8591 (yyreportParseError): yyprefix is const.
8592 yytokenp is used only when verbose.
8593 (yy__GNUC__): Replace with __GNUC__.
8594 (yypdumpstack): yyi is size_t.
8595 (yypreference): Un-yy local variables and arguments, to avoid
8596 clashes with `yyr1'. Anyway, we are not in the user name space.
8597 (yytname_size): be an int, as is compared with ints.
8598 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
8599 Use them.
8600 * tests/cxx-gram.at: Use quotation to protect $1.
8601 Use AT_COMPILE to enable warnings hunts.
8602 Prototype yylex and yyerror.
8603 `Use' argc.
8604 Include `string.h', not `strings.h'.
8605 Produce and prototype stmtMerge only when used.
8606 yylex takes a location.
8607
8608 2002-06-30 Akim Demaille <akim@epita.fr>
8609
8610 We spend a lot of time in quotearg, in particular when --verbose.
8611
8612 * src/symtab.c (symbol_get): Store a quoted version of the key.
8613 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
8614 Adjust all callers.
8615
8616 2002-06-30 Akim Demaille <akim@epita.fr>
8617
8618 * src/state.h (reductions_t): Rename member `nreds' as num.
8619 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
8620 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
8621
8622 2002-06-30 Akim Demaille <akim@epita.fr>
8623
8624 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
8625 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
8626 (shifts_to): Rename as...
8627 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
8628 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
8629 (TRANSITION_IS_DISABLED, transitions_to): these.
8630
8631 2002-06-30 Akim Demaille <akim@epita.fr>
8632
8633 * src/print.c (print_shifts, print_gotos): Merge into...
8634 (print_transitions): this.
8635 (print_transitions, print_errs, print_reductions): Align the
8636 lookaheads columns.
8637 (print_core, print_transitions, print_errs, print_state,
8638 print_grammar): Output empty lines separator before, not after.
8639 (state_default_rule_compute): Rename as...
8640 (state_default_rule): this.
8641 * tests/conflicts.at (Defaulted Conflicted Reduction),
8642 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
8643 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
8644
8645 2002-06-30 Akim Demaille <akim@epita.fr>
8646
8647 Display items as we display rules.
8648
8649 * src/gram.h, src/gram.c (rule_lhs_print): New.
8650 * src/gram.c (grammar_rules_partial_print): Use it.
8651 * src/print.c (print_core): Likewise.
8652 * tests/conflicts.at (Defaulted Conflicted Reduction),
8653 (Unresolved SR Conflicts): Adjust.
8654 (Unresolved SR Conflicts): Adjust and rename as...
8655 (Resolved SR Conflicts): this, as was meant.
8656 * tests/regression.at (Web2c Report): Adjust.
8657
8658 2002-06-30 Akim Demaille <akim@epita.fr>
8659
8660 * src/print.c (state_default_rule_compute): New, extracted from...
8661 (print_reductions): here.
8662 Pessimize, but clarify the code.
8663 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
8664
8665 2002-06-30 Akim Demaille <akim@epita.fr>
8666
8667 * src/output.c (action_row): Let default_rule be always a rule
8668 number.
8669
8670 2002-06-30 Akim Demaille <akim@epita.fr>
8671
8672 * src/closure.c (print_firsts, print_fderives, closure):
8673 Use BITSET_EXECUTE.
8674 * src/lalr.c (lookaheads_print): Likewise.
8675 * src/state.c (state_rule_lookaheads_print): Likewise.
8676 * src/print_graph.c (print_core): Likewise.
8677 * src/print.c (print_reductions): Likewise.
8678 * src/output.c (action_row): Likewise.
8679 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
8680
8681 2002-06-30 Akim Demaille <akim@epita.fr>
8682
8683 * src/print_graph.c: Use report_flag.
8684
8685 2002-06-30 Akim Demaille <akim@epita.fr>
8686
8687 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
8688 to...
8689 * src/relation.h, src/relation.c (traverse, relation_digraph)
8690 (relation_print, relation_transpose): New.
8691
8692 2002-06-30 Akim Demaille <akim@epita.fr>
8693
8694 * src/state.h, src/state.c (shifts_to): New.
8695 * src/lalr.c (build_relations): Use it.
8696
8697 2002-06-30 Akim Demaille <akim@epita.fr>
8698
8699 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
8700 (item_number_of_rule_number, rule_number_of_item_number): New.
8701 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
8702 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8703 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
8704 Propagate their use.
8705 Much remains to be done, in particular wrt `shorts' from types.h.
8706
8707 2002-06-30 Akim Demaille <akim@epita.fr>
8708
8709 * src/symtab.c (symbol_new): Initialize the `printer' member.
8710
8711 2002-06-30 Akim Demaille <akim@epita.fr>
8712
8713 * src/LR0.c (save_reductions): Remove, replaced by...
8714 * src/state.h, src/state.c (state_reductions_set): New.
8715 (reductions, errs): Rename as...
8716 (reductions_t, errs_t): these.
8717 Adjust all dependencies.
8718
8719 2002-06-30 Akim Demaille <akim@epita.fr>
8720
8721 * src/LR0.c (state_list_t, state_list_append): New.
8722 (first_state, last_state): Now symbol_list_t.
8723 (this_state): Remove.
8724 (new_itemsets, append_states, save_reductions): Take a state_t as
8725 argument.
8726 (set_states, generate_states): Adjust.
8727 (save_shifts): Remove, replaced by...
8728 * src/state.h, src/state.c (state_shifts_set): New.
8729 (shifts): Rename as...
8730 (shifts_t): this.
8731 Adjust all dependencies.
8732 * src/state.h (state_t): Remove the `next' member.
8733
8734 2002-06-30 Akim Demaille <akim@epita.fr>
8735
8736 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
8737 escaped in slot 0.
8738
8739 2002-06-30 Akim Demaille <akim@epita.fr>
8740
8741 Use hash.h for the state hash table.
8742
8743 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
8744 (allocate_storage): Use state_hash_new.
8745 (free_storage): Use state_hash_free.
8746 (new_state, get_state): Adjust.
8747 * src/lalr.h, src/lalr.c (states): Move to...
8748 * src/states.h (state_t): Remove the `link' member, no longer
8749 used.
8750 * src/states.h, src/states.c: here.
8751 (state_hash_new, state_hash_free, state_hash_lookup)
8752 (state_hash_insert, states_free): New.
8753 * src/states.c (state_table, state_compare, state_hash): New.
8754 * src/output.c (output_actions): Do not free states now, since we
8755 still need to know the final_state number in `prepare', called
8756 afterwards. Do it...
8757 * src/main.c (main): here: call states_free after `output'.
8758
8759 2002-06-30 Akim Demaille <akim@epita.fr>
8760
8761 * src/state.h, src/state.c (state_new): New, extracted from...
8762 * src/LR0.c (new_state): here.
8763 * src/state.h (STATE_ALLOC): Move to...
8764 * src/state.c: here.
8765 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
8766 * src/state.h, src/state.c: here.
8767
8768 2002-06-30 Akim Demaille <akim@epita.fr>
8769
8770 * src/reader.c (gensym): Rename as...
8771 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
8772 (getsym): Rename as...
8773 (symbol_get): this.
8774
8775 2002-06-30 Akim Demaille <akim@epita.fr>
8776
8777 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
8778 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
8779 * src/output.c, src/print.c, src/print_graph.c: Propagate.
8780 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
8781
8782 2002-06-30 Akim Demaille <akim@epita.fr>
8783
8784 Make the test suite pass with warnings checked.
8785
8786 * tests/actions.at (Printers and Destructors): Improve.
8787 Avoid unsigned vs. signed issues.
8788 * tests/calc.at: Don't exercise the scanner here, do it...
8789 * tests/input.at (Torturing the Scanner): here.
8790
8791 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8792
8793 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
8794 reorganize first lines parallel to yacc.c.
8795
8796 2002-06-28 Akim Demaille <akim@epita.fr>
8797
8798 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
8799 (b4_token_enum, b4_token_defines): New, factored from...
8800 * data/lalr1.cc, data/yacc.c, glr.c: here.
8801
8802 2002-06-28 Akim Demaille <akim@epita.fr>
8803
8804 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
8805 unused variables.
8806 * src/output.c (merger_output): static.
8807
8808 2002-06-28 Akim Demaille <akim@epita.fr>
8809
8810 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
8811 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
8812 pacify GCC.
8813 * src/output.c (save_row): Initialize all the variables to pacify GCC.
8814
8815 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8816
8817 Accumulated changelog for new GLR parsing features.
8818
8819 * src/conflicts.c (count_total_conflicts): Change name to
8820 conflicts_total_count.
8821 * src/conflicts.h: Ditto.
8822 * src/output.c (token_actions): Use the new name.
8823 (output_conflicts): Change conflp => conflict_list_heads, and
8824 confl => conflict_list for better readability.
8825 * data/glr.c: Use the new names.
8826 * NEWS: Add self to GLR announcement.
8827
8828 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
8829
8830 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
8831 Akim Demaille.
8832
8833 * data/bison.glr: Change name to glr.c
8834 * data/glr.c: Renamed from bison.glr.
8835 * data/Makefile.am: Add glr.c
8836
8837 * src/getargs.c:
8838
8839 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
8840 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
8841
8842 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8843
8844 * data/bison.glr: Be sure to restore the
8845 current #line when returning to the skeleton contents after having
8846 exposed the input file's #line.
8847
8848 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8849
8850 * data/bison.glr: Bring up to date with changes to bison.simple.
8851
8852 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8853
8854 * data/bison.glr: Correct definitions that use b4_prefix.
8855 Various reformatting.
8856 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
8857 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
8858 yytokenp argument; now part of stack.
8859 (yychar): Define to behave as documented.
8860 (yyclearin): Ditto.
8861
8862 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8863
8864 * src/reader.h: Add declaration for free_merger_functions.
8865
8866 * src/reader.c (merge_functions): New variable.
8867 (get_merge_function): New function.
8868 (free_merger_functions): New function.
8869 (readgram): Check for %prec that is not followed by a symbol.
8870 Handle %dprec and %merge declarations.
8871 (packgram): Initialize dprec and merger fields in rules array.
8872
8873 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
8874 conflict_list_cnt, conflict_list_free): New variables.
8875 (table_grow): Also grow conflict_table.
8876 (prepare_rules): Output dprec and merger tables.
8877 (conflict_row): New function.
8878 (action_row): Output conflict lists for GLR parser. Don't use
8879 default reduction in conflicted states for GLR parser so that there
8880 are spaces for the conflict lists.
8881 (save_row): Also save conflict information.
8882 (token_actions): Allocate conflict list.
8883 (merger_output): New function.
8884 (pack_vector): Pack conflict table, too.
8885 (output_conflicts): New function to output yyconflp and yyconfl.
8886 (output_check): Allocate conflict_tos.
8887 (output_actions): Output conflict tables, also.
8888 (output_skeleton): Output b4_mergers definition.
8889 (prepare): Output b4_max_rhs_length definition.
8890 Use 'bison.glr' as default skeleton for GLR parsers.
8891
8892 * src/gram.c (glr_parser): New flag.
8893 (grammar_free): Call free_merger_functions.
8894
8895 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
8896 all pairs of conflicting reductions, rather than just all tokens
8897 causing conflicts. Needed to size conflict tables.
8898 (conflicts_output): Modify call to count_rr_conflicts for new
8899 interface.
8900 (conflicts_print): Ditto.
8901 (count_total_conflicts): New function.
8902
8903 * src/reader.h (merger_list): New type.
8904 (merge_functions): New variable.
8905
8906 * src/lex.h (tok_dprec, tok_merge): New token types.
8907
8908 * src/gram.h (rule_s): Add dprec and merger fields.
8909 (glr_parser): New flag.
8910
8911 * src/conflicts.h (count_total_conflicts): New function.
8912
8913 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
8914
8915 * doc/bison.texinfo (Generalized LR Parsing): New section.
8916 (GLR Parsers): New section.
8917 (Language and Grammar): Mention GLR parsing.
8918 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
8919 Correct typo ("tge" -> "the").
8920
8921 * data/bison.glr: New skeleton for GLR parsing.
8922
8923 * tests/cxx-gram.at: New tests for GLR parsing.
8924
8925 * tests/testsuite.at: Include cxx-gram.at.
8926
8927 * tests/Makefile.am: Add cxx-gram.at.
8928
8929 * src/parse-gram.y:
8930
8931 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
8932
8933 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
8934
8935 2002-06-27 Akim Demaille <akim@epita.fr>
8936
8937 * src/options.h, src/options.c: Remove.
8938 * src/getargs.c (short_options, long_options): New.
8939
8940 2002-06-27 Akim Demaille <akim@epita.fr>
8941
8942 * data/bison.simple, data/bison.c++: Rename as...
8943 * data/yacc.c, data/lalr1.cc: these.
8944 * doc/bison.texinfo (Environment Variables): Remove.
8945
8946 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
8947
8948 * src/getargs.c (report_argmatch): Initialize strtok().
8949
8950 2002-06-20 Akim Demaille <akim@epita.fr>
8951
8952 * data/bison.simple (b4_symbol_actions): New, replaces...
8953 (b4_symbol_destructor, b4_symbol_printer): these.
8954 (yysymprint): Be sure to call YYPRINT only for tokens, and using
8955 user token numbers.
8956
8957 2002-06-20 Akim Demaille <akim@epita.fr>
8958
8959 * data/bison.simple (yydestructor): Rename as...
8960 (yydestruct): this.
8961
8962 2002-06-20 Akim Demaille <akim@epita.fr>
8963
8964 * src/symtab.h, src/symtab.c (symbol_type_set)
8965 (symbol_destructor_set, symbol_precedence_set): The location is
8966 the last argument.
8967 Adjust all callers.
8968
8969 2002-06-20 Akim Demaille <akim@epita.fr>
8970
8971 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
8972 internals.
8973 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
8974 Takes a location.
8975 * src/symtab.h, src/symtab.c (symbol_class_set)
8976 (symbol_user_token_number_set): Likewise.
8977 Adjust all callers.
8978 Promote complain_at.
8979 * tests/input.at (Type Clashes): Adjust.
8980
8981 2002-06-20 Akim Demaille <akim@epita.fr>
8982
8983 * data/bison.simple (YYLEX): Fix the declaration when
8984 %pure-parser.
8985
8986 2002-06-20 Akim Demaille <akim@epita.fr>
8987
8988 * data/bison.simple (yysymprint): Don't print the token number,
8989 just its name.
8990 * tests/actions.at (Destructors): Rename as...
8991 (Printers and Destructors): this.
8992 Also exercise %printer.
8993
8994 2002-06-20 Akim Demaille <akim@epita.fr>
8995
8996 * data/bison.simple (YYDSYMPRINT): New.
8997 Use it to remove many of the #if YYDEBUG/if (yydebug).
8998
8999 2002-06-20 Akim Demaille <akim@epita.fr>
9000
9001 * src/symtab.h, src/symtab.c (symbol_t): printer and
9002 printer_location are new members.
9003 (symbol_printer_set): New.
9004 * src/parse-gram.y (PERCENT_PRINTER): New token.
9005 Handle its associated rule.
9006 * src/scan-gram.l: Adjust.
9007 (handle_destructor_at, handle_destructor_dollar): Rename as...
9008 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9009 * src/output.c (symbol_printers_output): New.
9010 (output_skeleton): Call it.
9011 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9012 since there are already many grammar files with a user `yyprint'.
9013 Replace the calls to YYPRINT to calls to yysymprint.
9014 * tests/calc.at: Adjust.
9015 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9016 taking advantage of parser very internal details (stack size!).
9017
9018 2002-06-20 Akim Demaille <akim@epita.fr>
9019
9020 * src/scan-gram.l: Complete the scanner with the missing patterns
9021 to pacify Flex.
9022 Use `quote' and `symbol_tag_get' where appropriate.
9023
9024 2002-06-19 Akim Demaille <akim@epita.fr>
9025
9026 * tests/actions.at (Destructors): Augment to test locations.
9027 * data/bison.simple (yydestructor): Pass it the current location
9028 if locations are enabled.
9029 Prototype only when __STDC__ or C++.
9030 Change the argument names to move into the yy name space: there is
9031 user code here.
9032
9033 2002-06-19 Akim Demaille <akim@epita.fr>
9034
9035 * data/bison.simple (b4_pure_if): New.
9036 Use it instead of #ifdef YYPURE.
9037
9038 2002-06-19 Akim Demaille <akim@epita.fr>
9039
9040 * data/bison.simple (b4_location_if): New.
9041 Use it instead of #ifdef YYLSP_NEEDED.
9042
9043 2002-06-19 Akim Demaille <akim@epita.fr>
9044
9045 Prepare @$ in %destructor, but currently don't bind it in the
9046 skeleton, as %location use is not cleaned up yet.
9047
9048 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9049 (handle_action_at): New.
9050 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9051 a braced_code_t and a location as additional arguments.
9052 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9053 unquote one when outputting `b4_dollar_dollar'.
9054 Adjust callers.
9055 * data/bison.simple (b4_eval): Remove.
9056 (b4_symbol_destructor): Adjust.
9057 * tests/input.at (Invalid @n): Adjust.
9058
9059 2002-06-19 Zack Weinberg <zack@codesourcery.com>
9060
9061 * doc/bison.texinfo: Document ability to have multiple
9062 prologue sections.
9063
9064 2002-06-18 Akim Demaille <akim@epita.fr>
9065
9066 * src/files.c (compute_base_names): When computing the output file
9067 names from the input file name, strip the directory part.
9068
9069 2002-06-18 Akim Demaille <akim@epita.fr>
9070
9071 * data/bison.simple.new: Comment changes.
9072 Reported by Andreas Schwab.
9073
9074 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
9075
9076 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
9077 there are no `label `yyoverflowlab' defined but not used' warnings
9078 when yyoverflow is defined.
9079
9080 2002-06-18 Akim Demaille <akim@epita.fr>
9081
9082 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
9083 new member.
9084 (symbol_destructor_set): Adjust.
9085 * src/output.c (symbol_destructors_output): Output the destructor
9086 locations.
9087 Output the symbol name.
9088 * data/bison.simple (b4_symbol_destructor): Adjust.
9089
9090 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
9091 and Akim Demaille <akim@epita.fr>
9092
9093 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
9094 what's left on the stack when the error recovery hits EOF.
9095 * tests/actions.at (Destructors): Complete to exercise this case.
9096
9097 2002-06-17 Akim Demaille <akim@epita.fr>
9098
9099 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
9100 arguments is really empty, not only equal to `[]'.
9101 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
9102 member.
9103 (symbol_destructor_set): New.
9104 * src/output.c (symbol_destructors_output): New.
9105 * src/reader.h (brace_code_t, current_braced_code): New.
9106 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
9107 (handle_dollar): Rename as...
9108 (handle_action_dollar): this.
9109 (handle_destructor_dollar): New.
9110 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
9111 (grammar_declaration): Use it.
9112 * data/bison.simple (yystos): Is always defined.
9113 (yydestructor): New.
9114 * tests/actions.at (Destructors): New.
9115 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
9116
9117 2002-06-17 Akim Demaille <akim@epita.fr>
9118
9119 * src/symlist.h, src/symlist.c (symbol_list_length): New.
9120 * src/scan-gram.l (handle_dollar, handle_at): Compute the
9121 rule_length only when needed.
9122 * src/output.c (actions_output, token_definitions_output): Output
9123 the full M4 block.
9124 * src/symtab.c: Don't access directly to the symbol tag, use
9125 symbol_tag_get.
9126 * src/parse-gram.y: Use symbol_list_free.
9127
9128 2002-06-17 Akim Demaille <akim@epita.fr>
9129
9130 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
9131 (symbol_list_prepend, get_type_name): Move to...
9132 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
9133 (symbol_list_prepend, symbol_list_n_type_name_get): here.
9134 Adjust all callers.
9135 (symbol_list_free): New.
9136 * src/scan-gram.l (handle_dollar): Takes a location.
9137 * tests/input.at (Invalid $n): Adjust.
9138
9139 2002-06-17 Akim Demaille <akim@epita.fr>
9140
9141 * src/reader.h, src/reader.c (symbol_list_new): Export it.
9142 (symbol_list_prepend): New.
9143 * src/parse-gram.y (%union): `list' is a new member.
9144 (symbols.1): New, replaces...
9145 (terms_to_prec.1, nterms_to_type.1): these.
9146 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
9147 Take a location as additional argument.
9148 Adjust all callers.
9149
9150 2002-06-15 Akim Demaille <akim@epita.fr>
9151
9152 * src/parse-gram.y: Move %token in the declaration section so that
9153 we don't depend upon CVS Bison.
9154
9155 2002-06-15 Akim Demaille <akim@epita.fr>
9156
9157 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
9158 * src/print.c (print_core): Use it.
9159
9160 2002-06-15 Akim Demaille <akim@epita.fr>
9161
9162 * src/conflicts.c (log_resolution): Accept the rule involved in
9163 the sr conflicts instead of the lookahead number that points to
9164 that rule.
9165 (flush_reduce): Accept the current lookahead vector as argument,
9166 instead of the index in LA.
9167 (resolve_sr_conflict): Accept the current number of lookahead
9168 bitset to consider for the STATE, instead of the index in LA.
9169 (set_conflicts): Adjust.
9170 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
9171
9172 2002-06-15 Akim Demaille <akim@epita.fr>
9173
9174 * src/state.h (state_t): Replace the `lookaheadsp' member, a
9175 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
9176 Adjust all dependencies.
9177 * src/lalr.c (initialize_lookaheads): Split into...
9178 (states_lookaheads_count, states_lookaheads_initialize): these.
9179 (lalr): Adjust.
9180
9181 2002-06-15 Akim Demaille <akim@epita.fr>
9182
9183 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
9184 out of...
9185 (grammar_rules_print): here.
9186 * src/reduce.c (reduce_output): Use it.
9187 * tests/reduce.at (Useless Rules, Reduced Automaton)
9188 (Underivable Rules): Adjust.
9189
9190 2002-06-15 Akim Demaille <akim@epita.fr>
9191
9192 Copy BYacc's nice way to report the grammar.
9193
9194 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
9195 New.
9196 Don't print the rules' location, it is confusing and useless.
9197 (rule_print): Use grammar_rhs_print.
9198 * src/print.c (print_grammar): Use grammar_rules_print.
9199
9200 2002-06-15 Akim Demaille <akim@epita.fr>
9201
9202 Complete and rationalize `useless thing' warnings.
9203
9204 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
9205 (symbol_tag_print): New.
9206 Use them everywhere in place of accessing directly the tag member.
9207 * src/gram.h, src/gram.c (rule_print): New.
9208 Use it where a rule used to be printed `by hand'.
9209 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
9210 (reduce_grammar_tables): Report the useless rules.
9211 (reduce_print): Useless things are a warning, not an error.
9212 Report it as such.
9213 * tests/reduce.at (Useless Nonterminals, Useless Rules):
9214 (Reduced Automaton, Underivable Rules): Adjust.
9215 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
9216 * tests/conflicts.at (Unresolved SR Conflicts)
9217 (Solved SR Conflicts): Adjust.
9218
9219 2002-06-15 Akim Demaille <akim@epita.fr>
9220
9221 Let symbols have a location.
9222
9223 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
9224 (getsym): Adjust.
9225 Adjust all callers.
9226 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
9227 Use location_t, not int.
9228 * src/symtab.c (symbol_check_defined): Take advantage of the
9229 location.
9230 * tests/regression.at (Invalid inputs): Adjust.
9231
9232 2002-06-15 Akim Demaille <akim@epita.fr>
9233
9234 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
9235 (input): Don't try to initialize yylloc here, do it in the
9236 scanner.
9237 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9238 * src/gram.h (rule_t): Change line and action_line into location
9239 and action_location, of location_t type.
9240 Adjust all dependencies.
9241 * src/location.h, src/location.c (empty_location): New.
9242 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9243 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9244 (grammar_current_rule_symbol_append)
9245 (grammar_current_rule_action_append): Expect a location as argument.
9246 * src/reader.c (grammar_midrule_action): Adjust to attach an
9247 action's location as dummy symbol location.
9248 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9249 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9250 the line numbers.
9251
9252 2002-06-14 Akim Demaille <akim@epita.fr>
9253
9254 Grammar declarations may be found in the grammar section.
9255
9256 * src/parse-gram.y (rules_or_grammar_declaration): New.
9257 (declarations): Each declaration may end with a semicolon, not
9258 just...
9259 (grammar_declaration): `"%union"'.
9260 (grammar): Branch to rules_or_grammar_declaration.
9261
9262 2002-06-14 Akim Demaille <akim@epita.fr>
9263
9264 * src/main.c (main): Invoke scanner_free.
9265
9266 2002-06-14 Akim Demaille <akim@epita.fr>
9267
9268 * src/output.c (m4_invoke): Extracted from...
9269 (output_skeleton): here.
9270 Free tempfile.
9271
9272 2002-06-14 Akim Demaille <akim@epita.fr>
9273
9274 * src/parse-gram.y (directives, directive, gram)
9275 (grammar_directives, precedence_directives, precedence_directive):
9276 Rename as...
9277 (declarations, declaration, grammar, grammar_declaration)
9278 (precedence_declaration, precedence_declarator): these.
9279 (symbol_declaration): New.
9280
9281 2002-06-14 Akim Demaille <akim@epita.fr>
9282
9283 * src/files.c (action_obstack): Remove, unused.
9284 (output_obstack): Remove it, and all its dependencies, as it is no
9285 longer needed.
9286 * src/reader.c (epilogue_set): Build the epilogue in the
9287 muscle_obstack.
9288 * src/output.h, src/output.c (muscle_obstack): Move to...
9289 * src/muscle_tab.h, src/muscle_tab.h: here.
9290 (muscle_init): Initialize muscle_obstack.
9291 (muscle_free): New.
9292 * src/main.c (main): Call it.
9293
9294 2002-06-14 Akim Demaille <akim@epita.fr>
9295
9296 * src/location.h: New, extracted from...
9297 * src/reader.h: here.
9298 * src/Makefile.am (noinst_HEADERS): Merge into
9299 (bison_SOURCES): this.
9300 Add location.h.
9301 * src/parse-gram.y: Use location_t instead of Bison's.
9302 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
9303 Use location_t instead of ints.
9304
9305 2002-06-14 Akim Demaille <akim@epita.fr>
9306
9307 * data/bison.simple, data/bison.c++: Be sure to restore the
9308 current #line when returning to the skeleton contents after having
9309 exposed the input file's #line.
9310
9311 2002-06-12 Akim Demaille <akim@epita.fr>
9312
9313 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
9314 eager.
9315 * tests/actions.at (Exotic Dollars): New.
9316
9317 2002-06-12 Akim Demaille <akim@epita.fr>
9318
9319 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
9320 ['"/] too eagerly.
9321 * tests/input.at (Torturing the Scanner): New.
9322
9323 2002-06-11 Akim Demaille <akim@epita.fr>
9324
9325 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
9326 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
9327 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
9328 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
9329 * src/reader.c (reader): Use it.
9330
9331 2002-06-11 Akim Demaille <akim@epita.fr>
9332
9333 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
9334 Adjust all callers.
9335 (scanner_last_string_free): New.
9336
9337 2002-06-11 Akim Demaille <akim@epita.fr>
9338
9339 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
9340 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
9341 (last_string, YY_OBS_FREE): New.
9342 Use them when returning an ID.
9343
9344 2002-06-11 Akim Demaille <akim@epita.fr>
9345
9346 Have Bison grammars parsed by a Bison grammar.
9347
9348 * src/reader.c, src/reader.h (prologue_augment): New.
9349 * src/reader.c (copy_definition): Remove.
9350
9351 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
9352 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
9353 (grammar_current_rule_prec_set, grammar_current_rule_check)
9354 (grammar_current_rule_symbol_append)
9355 (grammar_current_rule_action_append): Export.
9356 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
9357 (symbol_list_action_append): Remove.
9358 Hook the routines from reader.
9359 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
9360 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
9361
9362 * src/reader.c (read_declarations): Remove, unused.
9363
9364 * src/parse-gram.y: Handle the epilogue.
9365 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
9366 (grammar_start_symbol_set): this.
9367 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
9368 * src/reader.c (readgram): Remove, unused.
9369 (reader): Adjust to insert eoftoken and axiom where appropriate.
9370
9371 * src/reader.c (copy_dollar): Replace with...
9372 * src/scan-gram.h (handle_dollar): this.
9373 * src/parse-gram.y: Remove `%thong'.
9374
9375 * src/reader.c (copy_at): Replace with...
9376 * src/scan-gram.h (handle_at): this.
9377
9378 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
9379 New.
9380
9381 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
9382 time being.
9383
9384 * src/reader.h, src/reader.c (grammar_rule_end): New.
9385
9386 * src/parse.y (current_type, current_class): New.
9387 Implement `%nterm', `%token' support.
9388 Merge `%term' into `%token'.
9389 (string_as_id): New.
9390 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
9391 type name.
9392
9393 * src/parse-gram.y: Be sure to handle properly the beginning of
9394 rules.
9395
9396 * src/parse-gram.y: Handle %type.
9397 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
9398
9399 * src/parse-gram.y: More directives support.
9400 * src/options.c: No longer handle source directives.
9401
9402 * src/parse-gram.y: Fix %output.
9403
9404 * src/parse-gram.y: Handle %union.
9405 Use the prologue locations.
9406 * src/reader.c (parse_union_decl): Remove.
9407
9408 * src/reader.h, src/reader.c (epilogue_set): New.
9409 * src/parse-gram.y: Use it.
9410
9411 * data/bison.simple, data/bison.c++: b4_stype is now either not
9412 defined, then default to int, or to the contents of %union,
9413 without `union' itself.
9414 Adjust.
9415 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
9416
9417 * src/output.c (actions_output): Don't output braces, as they are
9418 already handled by the scanner.
9419
9420 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
9421 characters to themselves.
9422
9423 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
9424 that the epilogue has a proper #line.
9425
9426 * src/parse-gram.y: Handle precedence/associativity.
9427
9428 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
9429 a terminal.
9430 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
9431 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
9432 at all to define terminals that cannot be emitted.
9433
9434 * src/scan-gram.l: Escape M4 characters.
9435
9436 * src/scan-gram.l: Working properly with escapes in user
9437 strings/characters.
9438
9439 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
9440 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
9441 grammar.
9442 Use more modest sizes, as for the time being the parser does not
9443 release memory, and therefore the process swallows a huge amount
9444 of memory.
9445
9446 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
9447 stricter %token grammar.
9448
9449 * src/symtab.h (associativity): Add `undef_assoc'.
9450 (symbol_precedence_set): Do nothing when passed an undef_assoc.
9451 * src/symtab.c (symbol_check_alias_consistence): Adjust.
9452
9453 * tests/regression.at (Invalid %directive): Remove, as it is now
9454 meaningless.
9455 (Invalid inputs): Adjust to the new error messages.
9456 (Token definitions): The new grammar doesn't allow too many
9457 eccentricities.
9458
9459 * src/lex.h, src/lex.c: Remove.
9460 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
9461 (copy_character, copy_string2, copy_string, copy_identifier)
9462 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
9463 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
9464 (parse_action): Remove.
9465 * po/POTFILES.in: Adjust.
9466
9467 2002-06-11 Akim Demaille <akim@epita.fr>
9468
9469 * src/reader.c (parse_action): Don't store directly into the
9470 rule's action member: return the action as a string.
9471 Don't require `rule_length' as an argument: compute it.
9472 (grammar_current_rule_symbol_append)
9473 (grammar_current_rule_action_append): New, eved out from
9474 (readgram): here.
9475 Remove `action_flag', `rulelength', unused now.
9476
9477 2002-06-11 Akim Demaille <akim@epita.fr>
9478
9479 * src/reader.c (grammar_current_rule_prec_set).
9480 (grammar_current_rule_check): New, eved out from...
9481 (readgram): here.
9482 Remove `xaction', `first_rhs': useless.
9483 * tests/input.at (Type clashes): New.
9484 * tests/existing.at (GNU Cim Grammar): Adjust.
9485
9486 2002-06-11 Akim Demaille <akim@epita.fr>
9487
9488 * src/reader.c (grammar_midrule_action): New, Eved out from
9489 (readgram): here.
9490
9491 2002-06-11 Akim Demaille <akim@epita.fr>
9492
9493 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
9494 New.
9495 (readgram): Use them as replacement of inlined code, crule and
9496 crule1.
9497
9498 2002-06-11 Akim Demaille <akim@epita.fr>
9499
9500 * src/reader.c (grammar_end, grammar_symbol_append): New.
9501 (readgram): Use them.
9502 Make the use of `p' as local as possible.
9503
9504 2002-06-10 Akim Demaille <akim@epita.fr>
9505
9506 GCJ's parser requires the tokens to be defined before the prologue.
9507
9508 * data/bison.simple: Output the token definition before the user's
9509 prologue.
9510 * tests/regression.at (Braces parsing, Duplicate string)
9511 (Mixing %token styles): Check the output from bison.
9512 (Early token definitions): New.
9513
9514 2002-06-10 Akim Demaille <akim@epita.fr>
9515
9516 * src/symtab.c (symbol_user_token_number_set): Don't complain when
9517 assigning twice the same user number to a token, so that we can
9518 use it in...
9519 * src/lex.c (lex): here.
9520 Also use `symbol_class_set' instead of hand written code.
9521 * src/reader.c (parse_assoc_decl): Likewise.
9522
9523 2002-06-10 Akim Demaille <akim@epita.fr>
9524
9525 * src/symtab.c, src/symtab.c (symbol_class_set)
9526 (symbol_user_token_number_set): New.
9527 * src/reader.c (parse_token_decl): Use them.
9528 Use a switch instead of ifs.
9529 Use a single argument.
9530
9531 2002-06-10 Akim Demaille <akim@epita.fr>
9532
9533 Remove `%thong' support as it is undocumented, unused, duplicates
9534 `%token's job, and creates useless e-mail traffic with people who
9535 want to know what it is, why it is undocumented, unused, and
9536 duplicates `%token's job.
9537
9538 * src/reader.c (parse_thong_decl): Remove.
9539 * src/options.c (option_table): Remove "thong".
9540 * src/lex.h (tok_thong): Remove.
9541
9542 2002-06-10 Akim Demaille <akim@epita.fr>
9543
9544 * src/symtab.c, src/symtab.c (symbol_type_set)
9545 (symbol_precedence_set): New.
9546 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
9547 (value_components_used): Remove, unused.
9548
9549 2002-06-09 Akim Demaille <akim@epita.fr>
9550
9551 Move symbols handling code out of the reader.
9552
9553 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
9554 (axiom): Move to...
9555 * src/symtab.h, src/symtab.c: here.
9556
9557 * src/gram.c (start_symbol): Remove: use startsymbol->number.
9558 * src/reader.c (startval): Rename as...
9559 * src/symtab.h, src/symtab.c (startsymbol): this.
9560 * src/reader.c: Adjust.
9561
9562 * src/reader.c (symbol_check_defined, symbol_make_alias)
9563 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9564 (token_translations_init)
9565 Move to...
9566 * src/symtab.c: here.
9567 * src/reader.c (packsymbols): Move to...
9568 * src/symtab.h, src/symtab.c (symbols_pack): here.
9569 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
9570 argument.
9571
9572 2002-06-03 Akim Demaille <akim@epita.fr>
9573
9574 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
9575 then statements.
9576
9577 2002-06-03 Akim Demaille <akim@epita.fr>
9578
9579 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
9580 structs with non literals.
9581 * src/scan-skel.l: never-interactive.
9582 * src/conflicts.c (enum conflict_resolution_e): No trailing
9583 comma.
9584 * src/getargs.c (usage): Split long literal strings.
9585 Reported by Hans Aberg.
9586
9587 2002-05-28 Akim Demaille <akim@epita.fr>
9588
9589 * data/bison.c++: Use C++ ostreams.
9590 (cdebug_): New member.
9591
9592 2002-05-28 Akim Demaille <akim@epita.fr>
9593
9594 * src/output.c (output_skeleton): Be sure to allocate enough room
9595 for `/' _and_ for `\0' in full_skeleton.
9596
9597 2002-05-28 Akim Demaille <akim@epita.fr>
9598
9599 * data/bison.c++: Catch up with bison.simple:
9600 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9601 and Paul Eggert <eggert@twinsun.com>: `error' handing.
9602 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
9603 and popping traces.
9604
9605 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9606
9607 * src/output.c (output_skeleton): Put an explicit path in front of
9608 the skeleton file name, rather than relying on the -I directory,
9609 to partially alleviate effects of having a skeleton file lying around
9610 in the current directory.
9611
9612 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9613
9614 * src/conflicts.c (log_resolution): Correct typo:
9615 obstack_printf should be obstack_fgrow1.
9616
9617 2002-05-26 Akim Demaille <akim@epita.fr>
9618
9619 * src/state.h (state_t): `solved_conflicts' is a new member.
9620 * src/LR0.c (new_state): Set it to 0.
9621 * src/conflicts.h, src/conflicts.c (print_conflicts)
9622 (free_conflicts, solve_conflicts): Rename as...
9623 (conflicts_print, conflicts_free, conflicts_solve): these.
9624 Adjust callers.
9625 * src/conflicts.c (enum conflict_resolution_e)
9626 (solved_conflicts_obstack): New, used by...
9627 (log_resolution): this.
9628 Adjust to attach the conflict resolution to each state.
9629 Complete the description with the precedence/associativity
9630 information.
9631 (resolve_sr_conflict): Adjust.
9632 * src/print.c (print_state): Output its solved_conflicts.
9633 * tests/conflicts.at (Unresolved SR Conflicts)
9634 (Solved SR Conflicts): Exercise --report=all.
9635
9636 2002-05-26 Akim Demaille <akim@epita.fr>
9637
9638 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9639 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
9640 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
9641 (token_number_t, item_number_as_token_number)
9642 (token_number_as_item_number, muscle_insert_token_number_table):
9643 Rename as...
9644 (symbol_number_t, item_number_as_symbol_number)
9645 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
9646 these, since it is more appropriate.
9647
9648 2002-05-26 Akim Demaille <akim@epita.fr>
9649
9650 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
9651 `Error:' lines.
9652 * data/bison.simple (yystos) [YYDEBUG]: New.
9653 (yyparse) [YYDEBUG]: Display the symbols which are popped during
9654 error recovery.
9655 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
9656
9657 2002-05-25 Akim Demaille <akim@epita.fr>
9658
9659 * doc/bison.texinfo (Debugging): Split into...
9660 (Tracing): this new section, its former contents, and...
9661 (Understanding): this new section.
9662 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
9663 by...
9664 (report_flag): this.
9665 Adjust all dependencies.
9666 (report_args, report_types, report_argmatch): New.
9667 (usage, getargs): Report/support -r, --report.
9668 * src/options.h
9669 (struct option_table_struct): Rename as..,
9670 (struct option_table_s): this.
9671 Rename the `set_flag' member to `flag' to match with getopt_long's
9672 struct.
9673 * src/options.c (option_table): Split verbose into an entry for
9674 %verbose, and another for --verbose.
9675 Support --report/-r, so remove -r from the obsolete --raw.
9676 * src/print.c: Attach full item sets and lookaheads reports to
9677 report_flag instead of trace_flag.
9678 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
9679
9680 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9681 and Paul Eggert <eggert@twinsun.com>
9682
9683 * data/bison.simple (yyparse): Correct error handling to conform to
9684 POSIX and yacc. Specifically, after syntax error is discovered,
9685 do not reduce further before shifting the error token.
9686 Clean up the code a bit by removing the labels yyerrdefault,
9687 yyerrhandle, yyerrpop.
9688 * NEWS: Document the above.
9689
9690 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9691
9692 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
9693 type; it isn't always big enough, since it doesn't necessarily
9694 include non-terminals.
9695 (yytranslate): Expand definition of yy_token_number_type, so that
9696 the latter can be removed.
9697 (yy_token_number_type): Remove, only one use.
9698 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
9699 don't use TokenNumberType as element type.
9700
9701 * tests/regression.at: Modify expected output to agree with change
9702 to yyr1 and yytranslate.
9703
9704 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
9705
9706 * src/reader.c (parse_action): Use copy_character instead of
9707 obstack_1grow.
9708
9709 2002-05-13 Akim Demaille <akim@epita.fr>
9710
9711 * tests/regression.at (Token definitions): Prototype yylex and
9712 yyerror.
9713
9714 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9715
9716 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
9717 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
9718 32-bit arithmetic.
9719 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
9720
9721 2002-05-07 Akim Demaille <akim@epita.fr>
9722
9723 * tests/synclines.at: Be sure to prototype yylex and yyerror to
9724 avoid GCC warnings.
9725
9726 2002-05-07 Akim Demaille <akim@epita.fr>
9727
9728 Kill GCC warnings.
9729
9730 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
9731 over the RHS of each rule.
9732 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
9733 * src/state.h (state_t): Member `nitems' is unsigned short.
9734 * src/LR0.c (get_state): Adjust.
9735 * src/reader.c (packgram): Likewise.
9736 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
9737 `Type'.
9738 (muscle_insert_int_table): Remove, unused.
9739 (prepare_rules): Remove `max'.
9740
9741 2002-05-06 Akim Demaille <akim@epita.fr>
9742
9743 * src/closure.c (print_firsts): Display of the symbol tags.
9744 (bitmatrix_print): Move to...
9745 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
9746 here.
9747 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
9748
9749 2002-05-06 Akim Demaille <akim@epita.fr>
9750
9751 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
9752 hash_do_for_each.
9753
9754 2002-05-06 Akim Demaille <akim@epita.fr>
9755
9756 * src/LR0.c (new_state, get_state): Instead of using the global
9757 `kernel_size' and `kernel_base', have two new arguments:
9758 `core_size' and `core'.
9759 Adjust callers.
9760
9761 2002-05-06 Akim Demaille <akim@epita.fr>
9762
9763 * src/reader.c (packgram): No longer end `ritem' with a 0
9764 sentinel: it is not used.
9765
9766 2002-05-05 Akim Demaille <akim@epita.fr>
9767
9768 New experimental feature: display the lookaheads in the report and
9769 graph.
9770
9771 * src/print (print_core): When --trace-flag, display the rules
9772 lookaheads.
9773 * src/print_graph.c (print_core): Likewise.
9774 Swap the arguments.
9775 Adjust caller.
9776
9777 2002-05-05 Akim Demaille <akim@epita.fr>
9778
9779 * tests/torture.at (Many lookaheads): New test.
9780
9781 2002-05-05 Akim Demaille <akim@epita.fr>
9782
9783 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
9784 (GENERATE_MUSCLE_INSERT_TABLE): this.
9785 (output_int_table, output_unsigned_int_table, output_short_table)
9786 (output_token_number_table, output_item_number_table): Replace with...
9787 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
9788 (muscle_insert_short_table, muscle_insert_token_number_table)
9789 (muscle_insert_item_number_table): these.
9790 Adjust all callers.
9791 (prepare_tokens): Don't free `translations', since...
9792 * src/reader.h, src/reader.c (grammar_free): do it.
9793 Move to...
9794 * src/gram.h, src/gram.c (grammar_free): here.
9795 * data/bison.simple, data/bison.c++: b4_token_number_max is now
9796 b4_translate_max.
9797
9798 2002-05-05 Akim Demaille <akim@epita.fr>
9799
9800 * src/output.c (output_unsigned_int_table): New.
9801 (prepare_rules): `i' is unsigned.
9802 `prhs', `rline', `r2' are unsigned int.
9803 Rename muscle `rhs_number_max' as `rhs_max'.
9804 Output muscles `prhs_max', `rline_max', and `r2_max'.
9805 Free rline and r1.
9806 * data/bison.simple, data/bison.c++: Adjust to use these muscles
9807 to compute types instead of constant types.
9808 * tests/regression.at (Web2c Actions): Adjust.
9809
9810 2002-05-04 Akim Demaille <akim@epita.fr>
9811
9812 * src/symtab.h (SALIAS, SUNDEF): Rename as...
9813 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
9814 Adjust dependencies.
9815 * src/output.c (token_definitions_output): Be sure not to output a
9816 `#define 'a'' when fed with `%token 'a' "a"'.
9817 * tests/regression.at (Token definitions): New.
9818
9819 2002-05-03 Paul Eggert <eggert@twinsun.com>
9820
9821 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
9822 for K&R C.
9823
9824 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
9825
9826 * Makefile.am (SUBDIRS): Remove intl.
9827 (EXTRA_DIST): Add config/config.rpath.
9828
9829 2002-05-03 Akim Demaille <akim@epita.fr>
9830
9831 * data/bison.simple (m4_if): Don't output empty enums.
9832 And actually, output valid enum definitions :(.
9833
9834 2002-05-03 Akim Demaille <akim@epita.fr>
9835
9836 * configure.bat: Remove, completely obsolete.
9837 * Makefile.am (EXTRA_DIST): Adjust.
9838 Don't distribute config.rpath...
9839 * config/Makefile.am (EXTRA_DIST): Do it.
9840
9841 2002-05-03 Akim Demaille <akim@epita.fr>
9842
9843 * configure.in (GETTEXT_VERSION): New.
9844 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
9845
9846 2002-05-03 Akim Demaille <akim@epita.fr>
9847
9848 * data/bison.simple (b4_token_enum): New.
9849 (b4_token_defines): Use it to output tokens both as #define and
9850 enums.
9851 Suggested by Paul Eggert.
9852 * src/output.c (token_definitions_output): Don't output spurious
9853 white spaces.
9854
9855 2002-05-03 Akim Demaille <akim@epita.fr>
9856
9857 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
9858
9859 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
9860
9861 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
9862 Update the stack class, give a try to deque as the default container.
9863
9864 2002-05-02 Akim Demaille <akim@epita.fr>
9865
9866 * data/bison.simple (yyparse): Do not implement @$ = @1.
9867 (YYLLOC_DEFAULT): Adjust to do it.
9868 * doc/bison.texinfo (Location Default Action): Fix.
9869
9870 2002-05-02 Akim Demaille <akim@epita.fr>
9871
9872 * src/reader.c (parse_braces): Merge into...
9873 (parse_action): this.
9874
9875 2002-05-02 Akim Demaille <akim@epita.fr>
9876
9877 * configure.in (ALL_LINGUAS): Remove.
9878 * po/LINGUAS, hr.po: New.
9879
9880 2002-05-02 Akim Demaille <akim@epita.fr>
9881
9882 Remove the so called hairy (semantic) parsers.
9883
9884 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
9885 * src/gram.h, src/gram.c (semantic_parser): Remove.
9886 (rule_t): Remove the guard and guard_line members.
9887 * src/lex.h (token_t): remove tok_guard.
9888 * src/options.c (option_table): Remove %guard and %semantic_parser
9889 support.
9890 * src/output.c, src/output.h (guards_output): Remove.
9891 (prepare): Adjust.
9892 (token_definitions_output): Don't output the `T'
9893 tokens (???).
9894 (output_skeleton): Don't output the guards.
9895 * src/files.c, src/files.c (attrsfile): Remove.
9896 * src/reader.c (symbol_list): Remove the guard and guard_line
9897 members.
9898 Adjust dependencies.
9899 (parse_guard): Remove.
9900 * data/bison.hairy: Remove.
9901 * doc/bison.texinfo (Environment Variables): Remove occurrences of
9902 BISON_HAIRY.
9903
9904 2002-05-02 Akim Demaille <akim@epita.fr>
9905
9906 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
9907 (parse_guard): Rename the formal argument `stack_offset' as
9908 `rule_length', which is more readable.
9909 Adjust callers.
9910 (copy_at, copy_dollar): Instead of outputting the hard coded
9911 values of $$, $n and so forth, output invocation to b4_lhs_value,
9912 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
9913 Note: this patch partially drops `semantic-parser' support: it
9914 always does `rule_length - n', where semantic parsers ought to
9915 always use `-n'.
9916 * data/bison.simple, data/bison.c++ (b4_lhs_value)
9917 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
9918
9919 2002-05-02 Akim Demaille <akim@epita.fr>
9920
9921 * configure.in (AC_INIT): Bump to 1.49b.
9922 (AM_INIT_AUTOMAKE): Short invocation.
9923
9924 2002-05-02 Akim Demaille <akim@epita.fr>
9925
9926 Version 1.49a.
9927
9928 2002-05-01 Akim Demaille <akim@epita.fr>
9929
9930 * src/skeleton.h: Remove.
9931
9932 2002-05-01 Akim Demaille <akim@epita.fr>
9933
9934 * src/skeleton.h: Fix the #endif.
9935 Reported by Magnus Fromreide.
9936
9937 2002-04-26 Paul Eggert <eggert@twinsun.com>
9938
9939 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
9940 Define if we define YYSTYPE and YYLTYPE, respectively.
9941 (YYCOPY): Fix [] quoting problem in the non-GCC case.
9942
9943 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
9944
9945 * src/scan-skel.l: Postprocess quadrigraphs.
9946
9947 * src/reader.c (copy_character): New function, used to output
9948 single characters while replacing `[' and `]' with quadrigraphs, to
9949 avoid troubles with M4 quotes.
9950 (copy_comment): Output characters with copy_character.
9951 (read_additionnal_code): Likewise.
9952 (copy_string2): Likewise.
9953 (copy_definition): Likewise.
9954
9955 * tests/calc.at: Exercise M4 quoting.
9956
9957 2002-04-25 Akim Demaille <akim@epita.fr>
9958
9959 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
9960 between `!' and the command.
9961 Reported by Paul Eggert.
9962
9963 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
9964
9965 * tests/calc.at: Exercise prologue splitting.
9966
9967 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
9968 `b4_post_prologue' instead of `b4_prologue'.
9969
9970 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
9971 muscles.
9972 (output): Free pre_prologue_obstack and post_prologue_obstack.
9973 * src/files.h, src/files.c (attrs_obstack): Remove.
9974 (pre_prologue_obstack, post_prologue_obstack): New.
9975 * src/reader.c (copy_definition): Add a parameter to specify the
9976 obstack to fill, instead of using attrs_obstack unconditionally.
9977 (read_declarations): Pass pre_prologue_obstack to copy_definition if
9978 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
9979
9980 2002-04-23 Paul Eggert <eggert@twinsun.com>
9981
9982 * data/bison.simple: Remove unnecessary commentary and white
9983 space differences from 1_29-branch.
9984 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
9985
9986 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
9987 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
9988 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
9989 constructors or destructors.
9990
9991 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
9992
9993 2002-04-23 Akim Demaille <akim@epita.fr>
9994
9995 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
9996 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
9997 location with columns.
9998 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
9999 All reported by Paul Eggert.
10000
10001 2002-04-22 Akim Demaille <akim@epita.fr>
10002
10003 * src/reduce.c (dump_grammar): Move to...
10004 * src/gram.h, src/gram.c (grammar_dump): here.
10005 Be sure to separate long item numbers.
10006 Don't read the members of a rule's prec if its nil.
10007
10008 2002-04-22 Akim Demaille <akim@epita.fr>
10009
10010 * src/output.c (table_size, table_grow): New.
10011 (MAXTABLE): Remove, replace uses with table_size.
10012 (pack_vector): Instead of dying when the table is too big, grow it.
10013
10014 2002-04-22 Akim Demaille <akim@epita.fr>
10015
10016 * data/bison.simple (yyr1): Its type is that of a token number.
10017 * data/bison.c++ (r1_): Likewise.
10018 * tests/regression.at (Web2c Actions): Adjust.
10019
10020 2002-04-22 Akim Demaille <akim@epita.fr>
10021
10022 * src/reader.c (token_translations_init): 256 is now the default
10023 value for the error token, i.e., it will be assigned another
10024 number if the user assigned 256 to one of her tokens.
10025 (reader): Don't force 256 to error.
10026 * doc/bison.texinfo (Symbols): Adjust.
10027 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10028 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10029 etc. instead of 10, 20, 30 (which was used to `jump' over error
10030 (256) and undefined (2)).
10031
10032 2002-04-22 Akim Demaille <akim@epita.fr>
10033
10034 Propagate more token_number_t.
10035
10036 * src/gram.h (token_number_as_item_number)
10037 (item_number_as_token_number): New.
10038 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10039 Use it to create output_item_number_table and
10040 output_token_number_table.
10041 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10042 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10043 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10044 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10045
10046 2002-04-22 Akim Demaille <akim@epita.fr>
10047
10048 * src/output.h, src/output.c (get_lines_number): Remove.
10049
10050 2002-04-19 Akim Demaille <akim@epita.fr>
10051
10052 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10053 as Lex/Flex'.
10054 (Debugging): More details about enabling the debugging features.
10055 (Table of Symbols): Describe $$, $n, @$, and @n.
10056 Suggested by Tim Josling.
10057
10058 2002-04-19 Akim Demaille <akim@epita.fr>
10059
10060 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10061
10062 2002-04-10 Akim Demaille <akim@epita.fr>
10063
10064 * src/system.h: Rely on HAVE_LIMITS_H.
10065 Suggested by Paul Eggert.
10066
10067 2002-04-09 Akim Demaille <akim@epita.fr>
10068
10069 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
10070 full stderr, and strip it according to the bison options, instead
10071 of composing the error message from different bits.
10072 This makes it easier to check for several error messages.
10073 Adjust all the invocations.
10074 Add an invocation exercising the error token.
10075 Add an invocation demonstrating a stupid error message.
10076 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
10077 Adjust the tests.
10078 Error message are for stderr, not stdout.
10079
10080 2002-04-09 Akim Demaille <akim@epita.fr>
10081
10082 * src/gram.h, src/gram.c (error_token_number): Remove, use
10083 errtoken->number.
10084 * src/reader.c (reader): Don't specify the user token number (2)
10085 for $undefined, as it uselessly prevents using it.
10086 * src/gram.h (token_number_t): Move to...
10087 * src/symtab.h: here.
10088 (state_t.number): Is a token_number_t.
10089 * src/print.c, src/reader.c: Use undeftoken->number instead of
10090 hard coded 2.
10091 (Even though this 2 is not the same as above: the number of the
10092 undeftoken remains being 2, it is its user token number which
10093 might not be 2).
10094 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
10095 `user_token_number_max'.
10096 Output `undef_token_number'.
10097 * data/bison.simple, data/bison.c++: Use them.
10098 Be sure to map invalid yylex return values to
10099 `undef_token_number'. This saves us from gratuitous SEGV.
10100
10101 * tests/conflicts.at (Solved SR Conflicts)
10102 (Unresolved SR Conflicts): Adjust.
10103 * tests/regression.at (Web2c Actions): Adjust.
10104
10105 2002-04-08 Akim Demaille <akim@epita.fr>
10106
10107 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
10108 Adding #line.
10109 Remove the duplicate `typedefs'.
10110 (RhsNumberType): Fix the declaration and various other typos.
10111 Use __ofile__.
10112 * data/bison.simple: Use __ofile__.
10113 * src/scan-skel.l: Handle __ofile__.
10114
10115 2002-04-08 Akim Demaille <akim@epita.fr>
10116
10117 * src/gram.h (item_number_t): New, the type of item numbers in
10118 RITEM. Note that it must be able to code symbol numbers as
10119 positive number, and the negation of rule numbers as negative
10120 numbers.
10121 Adjust all dependencies (pretty many).
10122 * src/reduce.c (rule): Remove this `short *' pointer: use
10123 item_number_t.
10124 * src/system.h (MINSHORT, MAXSHORT): Remove.
10125 Include `limits.h'.
10126 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
10127 (shortcpy): Remove.
10128 (MAXTABLE): Move to...
10129 * src/output.c (MAXTABLE): here.
10130 (prepare_rules): Use output_int_table to output rhs.
10131 * data/bison.simple, data/bison.c++: Adjust.
10132 * tests/torture.at (Big triangle): Move the limit from 254 to
10133 500.
10134 * tests/regression.at (Web2c Actions): Ajust.
10135
10136 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
10137 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
10138 passes, but produces negative #line number, once fixed, GCC is
10139 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
10140 C), it passes.
10141 * src/state.h (state_h): Code input lines on ints, not shorts.
10142
10143 2002-04-08 Akim Demaille <akim@epita.fr>
10144
10145 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
10146 and then the grammar.
10147
10148 2002-04-08 Akim Demaille <akim@epita.fr>
10149
10150 * src/system.h: No longer using strndup.
10151
10152 2002-04-07 Akim Demaille <akim@epita.fr>
10153
10154 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
10155 * src/output.c (output_table_data): Return the longest number.
10156 (prepare_tokens): Output `token_number_max').
10157 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
10158 New.
10159 Use them to define yy_token_number_type/TokenNumberType.
10160 Use this type for yytranslate.
10161 * tests/torture.at (Big triangle): Push the limit from 124 to
10162 253.
10163 * tests/regression.at (Web2c Actions): Adjust.
10164
10165 2002-04-07 Akim Demaille <akim@epita.fr>
10166
10167 * tests/torture.at (Big triangle): New.
10168 (GNU AWK Grammar, GNU Cim Grammar): Move to...
10169 * tests/existing.at: here.
10170
10171 2002-04-07 Akim Demaille <akim@epita.fr>
10172
10173 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
10174 nritems.
10175 Adjust dependencies.
10176
10177 2002-04-07 Akim Demaille <akim@epita.fr>
10178
10179 * src/reader.c: Normalize increments to prefix form.
10180
10181 2002-04-07 Akim Demaille <akim@epita.fr>
10182
10183 * src/reader.c, symtab.c: Remove debugging code.
10184
10185 2002-04-07 Akim Demaille <akim@epita.fr>
10186
10187 Rename all the `bucket's as `symbol_t'.
10188
10189 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
10190 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
10191 * src/symtab.c, src/symtab.h (bucket): Rename as...
10192 (symbol_t): this.
10193 (symbol_list_new, bucket_check_defined, bucket_make_alias)
10194 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
10195 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10196 (buckets_new, buckets_free, buckets_do): Rename as...
10197 (symbol_list_new, symbol_check_defined, symbol_make_alias)
10198 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10199 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
10200 (symbols_new, symbols_free, symbols_do): these.
10201
10202 2002-04-07 Akim Demaille <akim@epita.fr>
10203
10204 Use lib/hash for the symbol table.
10205
10206 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
10207 EOF.
10208 * src/lex.c (lex): Set the `number' member of new terminals.
10209 * src/reader.c (bucket_check_defined, bucket_make_alias)
10210 (bucket_check_alias_consistence, bucket_translation): New.
10211 (reader, grammar_free, readgram, token_translations_init)
10212 (packsymbols): Adjust.
10213 (reader): Number the predefined tokens.
10214 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
10215 for predefined tokens.
10216 * src/symtab.h (bucket): Remove all the hash table related
10217 members.
10218 * src/symtab.c (symtab): Replace by...
10219 (bucket_table): this.
10220 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10221 (buckets_new, buckets_do): New.
10222
10223 2002-04-07 Akim Demaille <akim@epita.fr>
10224
10225 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
10226 (start_symbol, max_user_token_number, semantic_parser)
10227 (error_token_number): Initialize.
10228 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
10229 Initialize.
10230 (reader): Don't.
10231 (errtoken, eoftoken, undeftoken, axiom): Extern.
10232
10233 2002-04-07 Akim Demaille <akim@epita.fr>
10234
10235 * src/gram.h (rule_s): prec and precsym are now pointers
10236 to the bucket giving the priority/associativity.
10237 Member `associativity' removed: useless.
10238 * src/reduce.c, src/conflicts.c: Adjust.
10239
10240 2002-04-07 Akim Demaille <akim@epita.fr>
10241
10242 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10243 Properly escape the symbols' TAG when outputting them.
10244
10245 2002-04-07 Akim Demaille <akim@epita.fr>
10246
10247 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10248
10249 2002-04-07 Akim Demaille <akim@epita.fr>
10250
10251 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10252 (LArule): this, which is an array to rule_t*.
10253 * src/print.c, src/conflicts.c: Adjust.
10254
10255 2002-04-07 Akim Demaille <akim@epita.fr>
10256
10257 * src/gram.h (rule_t): Rename `number' as `user_number'.
10258 `number' is a new member.
10259 Adjust dependencies.
10260 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10261
10262 2002-04-07 Akim Demaille <akim@epita.fr>
10263
10264 As a result of the previous patch, it is no longer needed
10265 to reorder ritem itself.
10266
10267 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10268
10269 2002-04-07 Akim Demaille <akim@epita.fr>
10270
10271 Be sure never to walk through RITEMS, but use only data related to
10272 the rules themselves. RITEMS should be banished.
10273
10274 * src/output.c (output_token_translations): Rename as...
10275 (prepare_tokens): this.
10276 In addition to `translate', prepare the muscles `tname' and
10277 `toknum', which were handled by...
10278 (output_rule_data): this.
10279 Remove, and move the remainder of its outputs into...
10280 (prepare_rules): this new routines, which also merges content from
10281 (output_gram): this.
10282 (prepare_rules): Be sure never to walk through RITEMS.
10283 (output_stos): Rename as...
10284 (prepare_stos): this.
10285 (output): Always invoke prepare_states, after all, just don't use it
10286 in the output if you don't need it.
10287
10288 2002-04-07 Akim Demaille <akim@epita.fr>
10289
10290 * src/LR0.c (new_state): Display `nstates' as the name of the
10291 newly created state.
10292 Adjust to initialize first_state and last_state if needed.
10293 Be sure to distinguish the initial from the final state.
10294 (new_states): Create the itemset of the initial state, and use
10295 new_state.
10296 * src/closure.c (closure): Now that the initial state has its
10297 items properly set, there is no need for a special case when
10298 creating `ruleset'.
10299
10300 As a result, now the rule 0, reducing to $axiom, is visible in the
10301 outputs. Adjust the test suite.
10302
10303 * tests/conflicts.at (Solved SR Conflicts)
10304 (Unresolved SR Conflicts): Adjust.
10305 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
10306 * tests/conflicts.at (S/R in initial): New.
10307
10308 2002-04-07 Akim Demaille <akim@epita.fr>
10309
10310 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
10311 the RHS of the rules.
10312 * src/output.c (output_gram): Likewise.
10313
10314 2002-04-07 Akim Demaille <akim@epita.fr>
10315
10316 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
10317 bucket.
10318 Adjust all dependencies.
10319 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
10320 `number' of the buckets too.
10321 * src/gram.h: Include `symtab.h'.
10322 (associativity): Move to...
10323 * src/symtab.h: here.
10324 No longer include `gram.h'.
10325
10326 2002-04-07 Akim Demaille <akim@epita.fr>
10327
10328 * src/gram.h, src/gram.c (rules_rhs_length): New.
10329 (ritem_longest_rhs): Use it.
10330 * src/gram.h (rule_t): `number' is a new member.
10331 * src/reader.c (packgram): Set it.
10332 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
10333 the end of `rules', and count them out of `nrules'.
10334 (reduce_output, dump_grammar): Adjust.
10335 * src/print.c (print_grammar): It is no longer needed to check for
10336 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
10337 * tests/reduce.at (Reduced Automaton): New test.
10338
10339 2002-04-07 Akim Demaille <akim@epita.fr>
10340
10341 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
10342 lacking `+ 1' to nrules, Bison reported as useless a token if it
10343 was used solely to set the precedence of the last rule...
10344
10345 2002-04-07 Akim Demaille <akim@epita.fr>
10346
10347 * data/bison.c++, data/bison.simple: Don't output the current file
10348 name in #line, to avoid useless diffs between two identical
10349 outputs under different names.
10350
10351 2002-04-07 Akim Demaille <akim@epita.fr>
10352
10353 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
10354 Normalize loops to using `< nrules + 1', not `<= nrules'.
10355
10356 2002-04-07 Akim Demaille <akim@epita.fr>
10357
10358 * TODO: Update.
10359
10360 2002-04-07 Akim Demaille <akim@epita.fr>
10361
10362 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
10363 bucket.value as bucket.number.
10364
10365 2002-04-07 Akim Demaille <akim@epita.fr>
10366
10367 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
10368 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10369 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
10370 RHS, instead of being an index in RITEMS.
10371
10372 2002-04-04 Paul Eggert <eggert@twinsun.com>
10373
10374 * doc/bison.texinfo: Update copyright date.
10375 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
10376 (Symbols): Warn about running Bison in one character set,
10377 but compiling and/or running in an incompatible one.
10378 Warn about character code 256, too.
10379
10380 2002-04-03 Paul Eggert <eggert@twinsun.com>
10381
10382 * src/bison.data (YYSTACK_ALLOC): Depend on whether
10383 YYERROR_VERBOSE is nonzero, not whether it is defined.
10384
10385 Merge changes from bison-1_29-branch.
10386
10387 2002-03-20 Paul Eggert <eggert@twinsun.com>
10388
10389 Merge fixes from Debian bison_1.34-1.diff.
10390
10391 * configure.in (AC_PREREQ): 2.53.
10392
10393 2002-03-20 Akim Demaille <akim@epita.fr>
10394
10395 * src/conflicts.c (log_resolution): Argument `resolution' is const.
10396
10397 2002-03-19 Paul Eggert <eggert@twinsun.com>
10398
10399 * src/bison.simple (YYCOPY): New macro.
10400 (YYSTACK_RELOCATE): Use it.
10401 Remove Type arg; no longer needed. All callers changed.
10402 (yymemcpy): Remove; no longer needed.
10403
10404 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
10405 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10406
10407 2002-03-19 Akim Demaille <akim@epita.fr>
10408
10409 Test and fix the #line outputs.
10410
10411 * tests/atlocal.at (GCC): New.
10412 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
10413 (Prologue synch line, %union synch line, Postprologue synch line)
10414 (Action synch line, Epilogue synch line): New tests.
10415 * src/reader.c (parse_union_decl): Define the muscle stype_line.
10416 * data/bison.simple, data/bison.c++: Use it.
10417
10418 2002-03-19 Akim Demaille <akim@epita.fr>
10419
10420 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
10421 (Solved SR Conflicts, %expect not enough, %expect right)
10422 (%expect too much): Move to...
10423 * tests/conflicts.at: this new file.
10424
10425 2002-03-19 Akim Demaille <akim@epita.fr>
10426
10427 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10428 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
10429 that we can move to enums for instance.
10430 * src/output.c (token_definitions_output): Output a list of
10431 `token-name, token-number' instead of the #define.
10432 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
10433
10434 2002-03-14 Akim Demaille <akim@epita.fr>
10435
10436 Use Gettext 0.11.1.
10437
10438 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
10439
10440 * data/bison.c++: Make the user able to add members to the generated
10441 parser by subclassing.
10442
10443 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
10444
10445 * src/reader.c (read_additionnal_code): `c' should be an integer, not
10446 a character.
10447 Reported by Nicolas Tisserand and Nicolas Burrus.
10448
10449 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10450
10451 * src/reader.c: Warn about lacking semi-colons, do not complain.
10452
10453 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10454
10455 * data/bison.c++: Remove a debug line.
10456
10457 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10458
10459 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
10460 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
10461 provide a default implementation.
10462
10463 2002-03-04 Akim Demaille <akim@epita.fr>
10464
10465 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
10466 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
10467 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
10468 * tests/semantic.at (Parsing Guards): Similarly.
10469 * src/reader.at (readgram): Complain if the last rule is not ended
10470 with a semi-colon.
10471
10472 2002-03-04 Akim Demaille <akim@epita.fr>
10473
10474 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
10475 * src/closure.c: here.
10476 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
10477 RTC.
10478 * src/warshall.h, src/warshall.c: Remove.
10479 * tests/sets.at (Broken Closure): Adjust.
10480
10481 2002-03-04 Akim Demaille <akim@epita.fr>
10482
10483 * src/output.c (output_skeleton): tempdir is const.
10484 bytes_read is unused.
10485
10486 2002-03-04 Akim Demaille <akim@epita.fr>
10487
10488 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10489 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
10490 Update.
10491 From Michael Hayes.
10492
10493 2002-03-04 Akim Demaille <akim@epita.fr>
10494
10495 * src/closure.c (closure): `r' is unused.
10496
10497 2002-03-04 Akim Demaille <akim@epita.fr>
10498
10499 * tests/sets.at (Broken Closure): Add the ending `;'.
10500 * src/reader.at (readgram): Complain if a rule is not ended with a
10501 semi-colon.
10502
10503 2002-03-04 Akim Demaille <akim@epita.fr>
10504
10505 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
10506 (count_sr_conflicts): Use bitset_count.
10507 * src/reduce.c (inaccessable_symbols): Ditto.
10508 (bits_size): Remove.
10509 * src/warshall.h, src/warshall.c: Convert to bitsetv.
10510
10511 2002-03-04 Akim Demaille <akim@epita.fr>
10512
10513 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
10514 * src/reduce.c: Remove the `bitset_zero's following the
10515 `bitset_create's, as now it is performed by the latter.
10516
10517 2002-03-04 Akim Demaille <akim@epita.fr>
10518
10519 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
10520 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
10521 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
10522 latest sources from Michael.
10523
10524 2002-03-04 Akim Demaille <akim@epita.fr>
10525
10526 * src/output.c (output): Don't free the grammar.
10527 * src/reader.c (grammar_free): New.
10528 * src/main.c (main): Call it and don't free symtab here.
10529
10530 2002-03-04 Akim Demaille <akim@epita.fr>
10531
10532 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
10533 before returning.
10534 Reported by Benoit Perrot.
10535
10536 2002-03-04 Akim Demaille <akim@epita.fr>
10537
10538 Use bitset operations when possible, not loops over bits.
10539
10540 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
10541 bitset_or.
10542 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
10543 * src/reduce.c (useless_nonterminals): Formatting changes.
10544 * src/warshall.c (TC): Use bitset_or.
10545
10546 2002-03-04 Akim Demaille <akim@epita.fr>
10547
10548 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
10549 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
10550 Ditto.
10551
10552 2002-03-04 Akim Demaille <akim@epita.fr>
10553
10554 * src/lalr.c (F): Now a bitset*.
10555 Adjust all dependencies.
10556
10557 2002-03-04 Akim Demaille <akim@epita.fr>
10558
10559 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
10560 Adjust all dependencies.
10561
10562 2002-03-04 Akim Demaille <akim@epita.fr>
10563
10564 * src/L0.c, src/LR0.h (nstates): Be size_t.
10565 Adjust comparisons (signed vs unsigned).
10566 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
10567 bitset*.
10568 Adjust all dependencies.
10569
10570 2002-03-04 Akim Demaille <akim@epita.fr>
10571
10572 * src/closure.c (firsts): Now, also a bitset.
10573 Adjust all dependencies.
10574 (varsetsize): Remove, now unused.
10575 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
10576
10577 2002-03-04 Akim Demaille <akim@epita.fr>
10578
10579 * src/print.c: Convert to use bitset.h, not hand coded iterations
10580 over ints.
10581
10582 2002-03-04 Akim Demaille <akim@epita.fr>
10583
10584 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
10585
10586 2002-03-04 Akim Demaille <akim@epita.fr>
10587
10588 * src/closure.c (ruleset): Be a bitset.
10589 (rulesetsize): Remove.
10590
10591 2002-03-04 Akim Demaille <akim@epita.fr>
10592
10593 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10594 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
10595 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
10596 * src/closure.c (fderives): Be an array of bitsets.
10597
10598 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
10599
10600 * data/bison.c++: Merge the two generated headers. Insert a copyright
10601 notice in each output file.
10602
10603 2002-02-28 Akim Demaille <akim@epita.fr>
10604
10605 * data/bison.c++: Copy the prologue of bison.simple to fetch
10606 useful M4 definitions, such as b4_header_guard.
10607
10608 2002-02-25 Akim Demaille <akim@epita.fr>
10609
10610 * src/getargs.c (version): Give the name of the authors, and use a
10611 translator friendly scheme for the bgr
10612 copyright notice.
10613
10614 2002-02-25 Akim Demaille <akim@epita.fr>
10615
10616 * src/output.c (header_output): Remove, now handled completely via
10617 M4.
10618
10619 2002-02-25 Akim Demaille <akim@epita.fr>
10620
10621 * m4/m4.m4: New, from CVS Autoconf.
10622 * configure.in: Invoke it.
10623 * src/output.c (output_skeleton): Use its result instead of the
10624 hard coded name.
10625
10626 2002-02-25 Akim Demaille <akim@epita.fr>
10627
10628 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
10629 Fileutils 4.1.5.
10630 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
10631 * src/output.c (output_skeleton): Use mkstemp to create a real
10632 temporary file.
10633 Move the filling of `skeleton' and its muscle to...
10634 (prepare): here.
10635 (output): Move the definition of the prologue muscle to...
10636 (prepare): here.
10637 * src/system.h (DEFAULT_TMPDIR): New.
10638
10639 2002-02-14 Paul Eggert <eggert@twinsun.com>
10640
10641 Remove the support for C++ namespace cleanliness; it was
10642 causing more problems than it was curing, since it didn't work
10643 properly on some nonstandard C++ compilers. This can wait
10644 for a proper C++ parser.
10645
10646 * NEWS: Document this.
10647 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
10648 of C++, as it's treated like C now.
10649 * src/bison.simple (YYSTD): Remove.
10650 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
10651 Treat C++ just like Standard C instead of trying to support
10652 namespace cleanliness.
10653
10654 2002-02-14 Akim Demaille <akim@epita.fr>
10655
10656 * tests/regression.at (else): Adjust to Andreas' change.
10657
10658 2002-02-14 Akim Demaille <akim@epita.fr>
10659
10660 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
10661
10662 2002-02-13 Andreas Schwab <schwab@suse.de>
10663
10664 * src/output.c (output_rule_data): Don't output NULL, it might
10665 not be defined yet.
10666
10667 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
10668
10669 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
10670 (Copyright notice): Update.
10671
10672 2002-02-11 Akim Demaille <akim@epita.fr>
10673
10674 * tests/regression.at (%nonassoc and eof): Don't include
10675 nonportable headers.
10676
10677 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
10678
10679 * data/bison.c++: Correct error recovery. Make the user able to
10680 initialize the starting location.
10681
10682 2002-02-07 Akim Demaille <akim@epita.fr>
10683
10684 * tests/input.at: New.
10685
10686 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10687
10688 * data/bison.c++: Replace some direct m4 expansions by constants. Be
10689 more consistent when naming methods and variables. Put preprocessor
10690 directives around tables only needed for debugging.
10691
10692 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10693
10694 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
10695 C++ parsers.
10696 (yy::b4_name::parse): Use print_.
10697
10698 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10699
10700 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
10701
10702 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10703
10704 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
10705 C++ parsers.
10706 (yy::b4_name::parse): Build verbose error messages, and use error_.
10707
10708 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
10709
10710 * data/bison.c++: Fix m4 quoting in comments.
10711
10712 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
10713
10714 * data/bison.c++: Adjust the parser code. Fix some muscles that were
10715 not expanded by m4.
10716
10717 2002-02-05 Akim Demaille <akim@epita.fr>
10718
10719 * data/bison.c++: Adjust to the M4 back end.
10720 More is certainly needed.
10721
10722 2002-02-05 Akim Demaille <akim@epita.fr>
10723
10724 Give a try to M4 as a back end.
10725
10726 * lib/readpipe.c: New, from wdiff.
10727 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
10728 BISON_HAIRY.
10729 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
10730 specific values. Now it is m4 that performs the lookup.
10731 * src/parse-skel.y: Remove.
10732 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
10733 * src/output.c (actions_output, guards_output)
10734 (token_definitions_output): No longer keeps track of the output
10735 line number, hence remove the second argument.
10736 (guards_output): Check against the guard member of a rule, not the
10737 action member.
10738 Adjust callers.
10739 (output_skeleton): Don't look for the skeleton location, let m4 do
10740 that.
10741 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
10742 file will be used.
10743 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
10744 (prepare): Given that for the time being changesyntax is not
10745 usable in M4, rename the muscles using `-' to `_'.
10746 Define `defines_flag', `output_parser_name' and `output_header_name'.
10747 * src/output.h (actions_output, guards_output)
10748 (token_definitions_output): Adjust prototypes.
10749 * src/scan-skel.l: Instead of scanning the skeletons, it now
10750 processes the output of m4: `__oline__' and `#output'.
10751 * data/bison.simple: Adjust to be used by M4(sugar).
10752 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
10753 to date.
10754 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
10755 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
10756 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
10757 shamelessly stolen from CVS Autoconf.
10758
10759 2002-02-05 Akim Demaille <akim@epita.fr>
10760
10761 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
10762 * configure.in: Check for the declarations of free and malloc.
10763 * src/muscle_tab.c: Adjust.
10764
10765 2002-02-05 Akim Demaille <akim@epita.fr>
10766
10767 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
10768 which have no values.
10769
10770 2002-02-05 Akim Demaille <akim@epita.fr>
10771
10772 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
10773 * data/: here.
10774
10775 2002-01-29 Paul Eggert <eggert@twinsun.com>
10776
10777 * src/bison.simple (YYSIZE_T): Do not define merely because
10778 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
10779 On some platforms, <alloca.h> does not declare YYSTD (size_t).
10780
10781 2002-01-27 Akim Demaille <akim@epita.fr>
10782
10783 Fix `%nonassoc and eof'.
10784
10785 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
10786 which were not properly copied! Replace
10787 memcpy (res->errs, src->errs, src->nerrs);
10788 with
10789 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
10790 !!!
10791 * tests/regression.at (%nonassoc and eof): Adjust to newest
10792 Autotest: `.' is not in the PATH.
10793
10794 2002-01-27 Akim Demaille <akim@epita.fr>
10795
10796 * tests/sets.at (AT_EXTRACT_SETS): New.
10797 (Nullable): Use it.
10798 (Firsts): New.
10799
10800 2002-01-26 Akim Demaille <akim@epita.fr>
10801
10802 * tests/actions.at, tests/calc.at, tests/headers.at,
10803 * tests/torture.at: Adjust to the newest Autotest which no longer
10804 forces `.' in the PATH.
10805
10806 2002-01-25 Akim Demaille <akim@epita.fr>
10807
10808 * tests/regression.at (%nonassoc and eof): New.
10809 Suggested by Robert Anisko.
10810
10811 2002-01-24 Akim Demaille <akim@epita.fr>
10812
10813 Bison dumps core when trying to complain about broken input files.
10814 Reported by Cris van Pelt.
10815
10816 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
10817 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
10818 into...
10819 (Invalid inputs): Strengthen: exercise parse_percent_token.
10820
10821 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
10822
10823 * src/Makefile.am: Add bison.c++.
10824 * src/bison.c++: New skeleton.
10825
10826 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
10827
10828 * po/it.po: New.
10829
10830 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
10831
10832 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
10833
10834 2002-01-20 Marc Autret <marc@gnu.org>
10835
10836 * src/files.c (compute_output_file_names): Fix
10837
10838 2002-01-20 Marc Autret <marc@gnu.org>
10839
10840 * tests/output.at: New test.
10841 * src/files.c (compute_base_names): Don't map extensions when
10842 the YACC flag is set, use defaults.
10843 Reported by Evgeny Stambulchik.
10844
10845 2002-01-20 Marc Autret <marc@gnu.org>
10846
10847 * src/system.h: Need to define __attribute__ away for non-GCC
10848 compilers as well (i.e., the vendor C compiler).
10849 Suggested by Albert Chin-A-Young.
10850
10851 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
10852
10853 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
10854 canonical definition.
10855 * src/system.h: Use the canonical definition for PARAMS (avoids
10856 a conflict with the macro from lib/hash.h).
10857
10858 2002-01-11 Akim Demaille <akim@epita.fr>
10859
10860 * configure.in: Use AC_FUNC_STRNLEN.
10861 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
10862
10863 2002-01-09 Akim Demaille <akim@epita.fr>
10864
10865 * src/files.c, src/files.h (output_infix): New.
10866 (tab_extension): Remove.
10867 (compute_base_names): Compute the former, drop the latter.
10868 * src/output.c (prepare): Insert the muscles `output-infix', and
10869 `output-suffix'.
10870 * src/parse-skel.y (string, string.1): New.
10871 (section.header): Use it.
10872 (section.yacc): Remove.
10873 (prefix): Remove too.
10874 * src/scan-skel.l: Adjust.
10875 * src/bison.simple, src/bison.hairy: Adjust.
10876
10877 2002-01-09 Akim Demaille <akim@epita.fr>
10878
10879 * configure.in (WERROR_CFLAGS): Compute it.
10880 * src/Makefile.am (CFLAGS): Pass it.
10881 * tests/atlocal.in (CFLAGS): Idem.
10882 * src/files.c: Fix a few warnings.
10883 (get_extension_index): Remove, unused.
10884
10885 2002-01-08 Akim Demaille <akim@epita.fr>
10886
10887 * src/getargs.c (AS_FILE_NAME): New.
10888 (getargs): Use it to convert DOSish file names.
10889 * src/files.c (base_name): Rename as full_base_name to avoid
10890 clashes with `base_name ()'.
10891 (filename_split): New.
10892 (compute_base_names): N-th rewrite, using filename_split.
10893
10894 2002-01-08 Akim Demaille <akim@epita.fr>
10895
10896 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
10897 New, stolen from the Fileutils 4.1.
10898 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10899 * configure.in: Check for the presence of memrchr, and of its
10900 prototype.
10901
10902 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
10903
10904 * lib/hash.h (__P): Added definition for this macro.
10905 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
10906 BUILT_SOURCES, to ensure they are generated first.
10907 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
10908 %error-verbose to allow bootstrapping with bison 1.30x.
10909
10910 2002-01-06 Akim Demaille <akim@epita.fr>
10911
10912 * src/reader.c (parse_braces): Don't fetch the next char, the
10913 convention is to fetch on entry.
10914 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
10915 'switch' without a following semicolon.
10916 * tests/regression.at (braces parsing): New.
10917
10918 2002-01-06 Akim Demaille <akim@epita.fr>
10919
10920 Bison is dead wrong in its RR conflict reports.
10921
10922 * tests/torture.at (GNU Cim Grammar): New.
10923 * src/conflicts.c (count_rr_conflicts): Fix.
10924
10925 2002-01-06 Akim Demaille <akim@epita.fr>
10926
10927 Creating package.m4 from configure.ac causes too many problems.
10928
10929 * tests/Makefile.am (package.m4): Create it by hand,
10930 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
10931
10932 2002-01-06 Akim Demaille <akim@epita.fr>
10933
10934 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
10935 skeleton.h.
10936
10937 2002-01-04 Paul Eggert <eggert@twinsun.com>
10938
10939 * doc/bison.texinfo (Debugging):
10940 Remove YYSTDERR; it's no longer defined or used.
10941 Also, s/cstdio.h/cstdio/.
10942
10943 2002-01-03 Akim Demaille <akim@epita.fr>
10944
10945 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
10946
10947 2002-01-03 Akim Demaille <akim@epita.fr>
10948
10949 * src/parse-skel.y (process_skeleton): Don't bind the parser's
10950 tracing code to --trace, wait for a better --trace option, with
10951 args.
10952
10953 2002-01-03 Akim Demaille <akim@epita.fr>
10954
10955 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
10956 The ISO C++ standard is extremely clear about it: stderr is
10957 considered a macro, not a regular symbol (see table 94 `Header
10958 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
10959 Therefore std:: does not apply to it. It still does with fprintf.
10960 Also, s/cstdio.h/cstdio/.
10961
10962 2002-01-03 Akim Demaille <akim@epita.fr>
10963
10964 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
10965 for non system headers.
10966
10967 2002-01-02 Akim Demaille <akim@epita.fr>
10968
10969 Equip the skeleton chain with location tracking, runtime trace,
10970 pure parser and scanner.
10971
10972 * src/parse-skel.y: Request a pure parser, locations, and prefix
10973 renaming.
10974 (%union): Having several members with the same type does not help
10975 type mismatches, simplify.
10976 (YYPRINT, yyprint): New.
10977 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
10978 (skel_error): this.
10979 Handle locations.
10980 * src/scan-skel.l: Adjust to these changes.
10981 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
10982 (LOCATION_PRINT, skel_control_t): New.
10983
10984 2001-12-30 Akim Demaille <akim@epita.fr>
10985
10986 * src/parse-skel.y: Get rid of the shift/reduce conflict:
10987 replace `gb' with BLANKS.
10988 * src/scan-skel.l: Adjust.
10989
10990 2001-12-30 Akim Demaille <akim@epita.fr>
10991
10992 * src/system.h: We don't need nor want bcopy.
10993 Throw away MS-DOS crap: we don't need getpid.
10994 * configure.in: We don't need strndup. It was even causing
10995 problems: because Flex includes the headers *before* us,
10996 _GNU_SOURCE is not defined by config.h, and therefore strndup was
10997 not visible.
10998 * lib/xstrndup.c: New.
10999 * src/scan-skel.l: Use it.
11000 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11001 * src/parse-skel.y: Use %directives instead of #defines.
11002
11003 2001-12-30 Akim Demaille <akim@epita.fr>
11004
11005 * src/skeleton.h: New.
11006 * src/output.c (output_parser, output_master_parser): Remove, dead
11007 code.
11008 * src/output.h (get_lines_number, actions_output, guards_output)
11009 (token_definitions_output): Prototype them.
11010 * src/parse-skel.y: Add the license notice.
11011 Include output.h and skeleton.h.
11012 (process_skeleton): Returns void, and takes a single parameter.
11013 * src/scan-skel.l: Add the license notice.
11014 Include skeleton.h.
11015 Don't use %option yylineno: it seems that then Flex imagines
11016 REJECT has been used, and therefore it won't reallocate its
11017 buffers (which makes no other sense to me than a bug). It results
11018 in warnings for `unused: yy_flex_realloc'.
11019
11020 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
11021
11022 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11023 (MUSCLE_INSERT_PREFIX): ...to there.
11024 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11025 (MUSCLE_INSERT_PREFIX): Move from here...
11026
11027 * src/bison.hairy: Add a section directive. Put braces around muscle
11028 names. This parser skeleton is still broken, but Bison should not
11029 choke on a bad muscle 'syntax'.
11030 * src/bison.simple: Add a section directive. Put braces around muscle
11031 names.
11032
11033 * src/files.h (strsuffix, stringappend): Add declarations.
11034 (tab_extension): Add declaration.
11035 (short_base_name): Add declaration.
11036
11037 * src/files.c (strsuffix, stringappend): No longer static. These
11038 functions are used in the skeleton parser.
11039 (tab_extension): New.
11040 (compute_base_names): Use the computations done in this function
11041 to guess if the generated parsers should have '.tab' in their
11042 names.
11043 (short_base_name): No longer static.
11044
11045 * src/output.c (output_skeleton): New.
11046 (output): Disable call to output_master_parser, and give a try to
11047 a new skeleton handling system.
11048 (guards_output, actions_output): No longer static.
11049 (token_definitions_output, get_lines_number): No longer static.
11050
11051 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11052
11053 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
11054 parse-skel.y.
11055
11056 * src/parse-skel.y: New file.
11057 * src/scan-skel.l: New file.
11058
11059 2001-12-29 Akim Demaille <akim@epita.fr>
11060
11061 %name-prefix is broken.
11062
11063 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11064 Adjust all dependencies.
11065 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11066 %name-prefix.
11067
11068 Renaming yylval but not yylloc is not consistent. Now we do.
11069
11070 * src/bison.simple: Prefix yylloc if used.
11071 * doc/bison.texinfo (Decl Summary): Document that.
11072
11073 2001-12-29 Akim Demaille <akim@epita.fr>
11074
11075 * doc/bison.texinfo: Promote `%long-directive' over
11076 `%long_directive'.
11077 Remove all references to fixed-output-files, yacc is enough.
11078
11079 2001-12-29 Akim Demaille <akim@epita.fr>
11080
11081 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
11082 user prologue. These are defaults.
11083 * tests/actions.at (Mid-rule actions): Make sure the user can
11084 define YYDEBUG and YYERROR_VERBOSE.
11085
11086 2001-12-29 Akim Demaille <akim@epita.fr>
11087
11088 * src/output.c (header_output): Don't forget to export YYLTYPE and
11089 yylloc.
11090 * tests/headers.at (export YYLTYPE): New, make sure it does.
11091 * tests/regression.at (%union and --defines, Invalid CPP headers):
11092 Move to...
11093 * tests/headers.at: here.
11094
11095 2001-12-29 Akim Demaille <akim@epita.fr>
11096
11097 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
11098
11099 2001-12-29 Akim Demaille <akim@epita.fr>
11100
11101 * tests/actions.at (Mid-rule actions): Output on a single line
11102 instead of several.
11103
11104 2001-12-29 Akim Demaille <akim@epita.fr>
11105
11106 * doc/bison.texinfo: Formatting changes.
11107
11108 2001-12-29 Akim Demaille <akim@epita.fr>
11109
11110 Don't store the token defs in a muscle, just be ready to output it
11111 on command. Now possible via `symbols'. Fixes a memory leak.
11112
11113 * src/output.c (token_definitions_output): New.
11114 (output_parser, header_output): Use it.
11115 * src/reader.c (symbols_save): Remove.
11116
11117 2001-12-29 Akim Demaille <akim@epita.fr>
11118
11119 * src/bison.simple: Do not provide a default for YYSTYPE and
11120 YYLTYPE before the user's prologue. Otherwise it's hardly... a
11121 default.
11122
11123 2001-12-29 Akim Demaille <akim@epita.fr>
11124
11125 Mid-rule actions are simply... ignored!
11126
11127 * src/reader.c (readgram): Be sure to attach mid-rule actions to
11128 the empty-rule associated to the dummy symbol, not to the host
11129 rule.
11130 * tests/actions.at (Mid-rule actions): New.
11131
11132 2001-12-29 Akim Demaille <akim@epita.fr>
11133
11134 Memory leak.
11135
11136 * src/reader.c (reader): Free grammar.
11137
11138 2001-12-29 Akim Demaille <akim@epita.fr>
11139
11140 Memory leak.
11141
11142 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
11143 since it allocates it for each state, although only one is needed.
11144 (allocate_storage): Do it here.
11145
11146 2001-12-29 Akim Demaille <akim@epita.fr>
11147
11148 * src/options.h, src/options.c (create_long_option_table): Rename
11149 as...
11150 (long_option_table_new): this, with a clearer prototype.
11151 (percent_table): Remove, unused,
11152 * src/getargs.c (getargs): Adjust.
11153
11154 2001-12-29 Akim Demaille <akim@epita.fr>
11155
11156 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
11157 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
11158 as states.
11159
11160 2001-12-29 Akim Demaille <akim@epita.fr>
11161
11162 * src/lalr.c (build_relations): Rename `states' as `states1'.
11163 Sorry, I don't understand exactly what it is, no better name...
11164
11165 2001-12-29 Akim Demaille <akim@epita.fr>
11166
11167 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
11168 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
11169 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
11170 as rules.
11171
11172 2001-12-29 Akim Demaille <akim@epita.fr>
11173
11174 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
11175 ago.
11176
11177 2001-12-29 Akim Demaille <akim@epita.fr>
11178
11179 * src/reader.c, src/reader.h (user_toknums): Remove.
11180 Adjust all users to use symbols[i]->user_token_number.
11181
11182 2001-12-29 Akim Demaille <akim@epita.fr>
11183
11184 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
11185 Adjust all users to use symbols[i]->prec or ->assoc.
11186
11187 2001-12-29 Akim Demaille <akim@epita.fr>
11188
11189 * src/reader.c, src/reader.h (tags): Remove.
11190 Adjust all users to use symbols[i]->tag.
11191
11192 2001-12-29 Akim Demaille <akim@epita.fr>
11193
11194 * src/gram.h, src/gram.c (symbols): New, similar to state_table
11195 and rule_table.
11196 * src/reader.c (packsymbols): Fill this table.
11197 Drop sprec.
11198 * src/conflicts.c (resolve_sr_conflict): Adjust.
11199 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
11200 single table.
11201 Use symbols[i]->tag instead of tags[i].
11202
11203 2001-12-29 Akim Demaille <akim@epita.fr>
11204
11205 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
11206 In addition, put a comment in there, to replace...
11207 * tests/regression.at (%union and C comments): Remove.
11208
11209 2001-12-29 Akim Demaille <akim@epita.fr>
11210
11211 * tests/regression.at (Web2c Actions): Blindly move the actual
11212 output as expected output. The contents *seem* right to me, but I
11213 can't pretend reading perfectly parser tables... Nonetheless, all
11214 the other tests pass correctly, the table look OK, even though the
11215 presence of `$axiom' is to be noted: AFAICS it is useless (but
11216 harmless).
11217
11218 2001-12-29 Akim Demaille <akim@epita.fr>
11219
11220 * src/reader.c (readgram): Don't add the rule 0 if there were no
11221 rules read. In other words, add it _after_ having performed
11222 grammar sanity checks.
11223 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
11224
11225 2001-12-29 Akim Demaille <akim@epita.fr>
11226
11227 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
11228 visible, and some states have now a different number.
11229
11230 2001-12-29 Akim Demaille <akim@epita.fr>
11231
11232 * src/reader.c (readgram): Bind the initial rule's lineno to that
11233 of the first rule.
11234 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
11235 (Solved SR Conflicts): Adjust rule 0's line number.
11236
11237 2001-12-29 Akim Demaille <akim@epita.fr>
11238
11239 Fix the `GAWK Grammar' failure.
11240
11241 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11242 the reductions of the first state which was mistakenly confused
11243 with the final state because precisely final_state was initialized
11244 to 0.
11245 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11246 now noticed by Bison.
11247 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11248 have a reduction on $default.
11249
11250 2001-12-29 Akim Demaille <akim@epita.fr>
11251
11252 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11253 rule line numbers.
11254 * src/closure.c (print_closure): Likewise.
11255 * src/derives.c (print_derives): Likewise.
11256 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11257 now.
11258
11259 2001-12-29 Akim Demaille <akim@epita.fr>
11260
11261 * src/lalr.c (lookaheads_print): New.
11262 (lalr): Call it when --trace-flag.
11263 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11264 are dumped.
11265
11266 2001-12-29 Akim Demaille <akim@epita.fr>
11267
11268 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11269 when walking through ritem, even via rule->rhs.
11270 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11271 (useful_production, useless_nonterminals): Likewise.
11272 (reduce_grammar_tables): Likewise, plus update nritems.
11273 * src/nullable.c (set_nullable): Likewise.
11274 * src/lalr.c (build_relations): Likewise.
11275 * tests/sets.at (Nullable): Adjust.
11276 Fortunately, now, the $axiom is no longer nullable.
11277
11278 2001-12-29 Akim Demaille <akim@epita.fr>
11279
11280 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
11281 the 0-sentinel.
11282 * src/gram.c (ritem_longest_rhs): Likewise.
11283 * src/reduce.c (nonterminals_reduce): Likewise.
11284 * src/print_graph.c (print_graph): Likewise.
11285 * src/output.c (output_rule_data): Likewise.
11286 * src/nullable.c (set_nullable): Likewise.
11287
11288 2001-12-29 Akim Demaille <akim@epita.fr>
11289
11290 * src/output.c: Comment changes.
11291
11292 2001-12-27 Paul Eggert <eggert@twinsun.com>
11293
11294 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
11295 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
11296 Sparc, as they were causing more porting problems than the
11297 (minor) performance improvement was worth.
11298
11299 Also, catch up with 1.31's YYSTD.
11300
11301 2001-12-27 Akim Demaille <akim@epita.fr>
11302
11303 * src/output.c (output_gram): Rely on nritems, not the
11304 0-sentinel. See below.
11305 Use -1 as separator, not 0.
11306 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
11307 Rely on -1 as separator in yyrhs, instead of 0.
11308 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
11309 twice `Now at end of input', therefore there are two lines less to
11310 expect.
11311
11312 2001-12-27 Akim Demaille <akim@epita.fr>
11313
11314 * tests/regression.at (Unresolved SR Conflicts):
11315 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
11316 below.
11317
11318 2001-12-27 Akim Demaille <akim@epita.fr>
11319
11320 * src/LR0.c (new_state): Recognize the final state by the fact it
11321 is reached by eoftoken.
11322 (insert_start_shifting_state, insert_eof_shifting_state)
11323 (insert_accepting_state, augment_automaton): Remove, since now
11324 these states are automatically computed from the initial state.
11325 (generate_states): Adjust.
11326 * src/print.c: When reporting a rule number to the user, substract
11327 1, so that the axiom rule is rule 0, and the first user rule is 1.
11328 * src/reduce.c: Likewise.
11329 * src/print_graph.c (print_core): For the time being, just as for
11330 the report, depend upon --trace-flags to dump the full set of
11331 items.
11332 * src/reader.c (readgram): Once the grammar read, insert the rule
11333 0: `$axiom: START-SYMBOL $'.
11334 * tests/set.at: Adjust: rule 0 is now displayed, and since the
11335 number of the states has changed (the final state is no longer
11336 necessarily the last), catch up.
11337
11338 2001-12-27 Akim Demaille <akim@epita.fr>
11339
11340 Try to make the use of the eoftoken valid. Given that its value
11341 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
11342 is used instead of > 0 where appropriate, (ii), depend upon nritems
11343 instead of the 0-sentinel.
11344
11345 * src/gram.h, src/gram.c (nritems): New.
11346 Expected to be duplication of nitems, but for the time being...
11347 * src/reader.c (packgram): Assert nritems and nitems are equal.
11348 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
11349 * src/closure.c (print_closure, print_fderives): Likewise.
11350 * src/gram.c (ritem_print): Likewise.
11351 * src/print.c (print_core, print_grammar): Likewise.
11352 * src/print_graph.c: Likewise.
11353
11354 2001-12-27 Akim Demaille <akim@epita.fr>
11355
11356 * src/main.c (main): If there are complains after grammar
11357 reductions, then output the report anyway if requested, then die.
11358 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
11359 * src/reader.c (eoftoken): New.
11360 (parse_token_decl): If the token being defined has value `0', it
11361 is the eoftoken.
11362 (packsymbols): No longer hack `tags' to insert `$' by hand.
11363 Be sure to preserve the value of the eoftoken.
11364 (reader): Make sure eoftoken is defined.
11365 Initialize nsyms to 0: now eoftoken is created just like the others.
11366 * src/print.c (print_grammar): Don't special case the eof token.
11367 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
11368 lie anyway, albeit pleasant.
11369 * tests/calc.at: Exercise error messages with eoftoken.
11370 Change the grammar so that empty input is invalid.
11371 Adjust expectations.
11372 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
11373
11374 2001-12-27 Akim Demaille <akim@epita.fr>
11375
11376 * configure.in: Check the protos of strchr ans strspn.
11377 Replace strchr if needed.
11378 * src/system.h: Provide the protos of strchr, strspn and memchr if
11379 missing.
11380 * lib/strchr.c: New.
11381 * src/reader.c (symbols_save): Use strchr.
11382
11383 2001-12-27 Akim Demaille <akim@epita.fr>
11384
11385 * src/print.c, src/print_graph.c (escape): New.
11386 Use it to quote the TAGS outputs.
11387 * src/print_graph.c (print_state): Now errors are in red, and
11388 reductions in green.
11389 Prefer high to wide: output the state number on a line of its own.
11390
11391 2001-12-27 Akim Demaille <akim@epita.fr>
11392
11393 * src/state.h, src/state.c (reductions_new): New.
11394 * src/LR0.c (set_state_table): Let all the states have a
11395 `reductions', even if reduced to 0.
11396 (save_reductions): Adjust.
11397 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
11398 * src/print.c (print_reductions, print_actions): Adjust.
11399 * src/output.c (action_row): Adjust.
11400
11401 2001-12-27 Akim Demaille <akim@epita.fr>
11402
11403 * src/state.h, src/state.c (errs_new, errs_dup): New.
11404 * src/LR0.c (set_state_table): Let all the states have an errs,
11405 even if reduced to 0.
11406 * src/print.c (print_errs, print_reductions): Adjust.
11407 * src/output.c (output_actions, action_row): Adjust.
11408 * src/conflicts.c (resolve_sr_conflict): Adjust.
11409
11410 2001-12-27 Akim Demaille <akim@epita.fr>
11411
11412 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
11413
11414 2001-12-27 Akim Demaille <akim@epita.fr>
11415
11416 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
11417 * src/print.c: here.
11418 (lookaheadset, shiftset): New, used as additional storage by
11419 print_reductions.
11420 (print_results): Adjust.
11421 (print_shifts, print_gotos, print_errs): New, extracted from...
11422 (print_actions): here.
11423 * src/print_graph.c (print_actions): Remove dead code.
11424
11425 2001-12-27 Akim Demaille <akim@epita.fr>
11426
11427 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
11428 `$n' and `@n'.
11429
11430 2001-12-27 Akim Demaille <akim@epita.fr>
11431
11432 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
11433 (build_relations): Adjust.
11434
11435 2001-12-27 Akim Demaille <akim@epita.fr>
11436
11437 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
11438 duplication.
11439
11440 2001-12-27 Akim Demaille <akim@epita.fr>
11441
11442 * src/reader.c (packgram): Catch nitems overflows.
11443
11444 2001-12-27 Akim Demaille <akim@epita.fr>
11445
11446 * src/files.c, src/files.h (guard_obstack): Remove.
11447 * src/output.c (output): Adjust.
11448 * src/reader.c (parse_braces): New, factoring...
11449 (copy_action, copy_guard): these two which are renamed as...
11450 (parse_action, parse_guard): these.
11451 As a voluntary consequence, using braces around guards is now
11452 mandatory.
11453
11454 2001-12-27 Akim Demaille <akim@epita.fr>
11455
11456 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
11457 * src/reader.c (symbol_list): `guard' and `guard_line' are new
11458 members.
11459 (symbol_list_new): Adjust.
11460 (copy_action): action_line is the first line, not the last.
11461 (copy_guard): Just as for actions, store the `action' only, not
11462 the switch/case/break flesh.
11463 Don't parse the user action that might follow the guard, let...
11464 (readgram): do it, i.e., now, there can be an action after a
11465 guard.
11466 In other words the guard is just explicitly optional.
11467 (packgram): Adjust.
11468 * src/output.c (guards_output): New.
11469 (output_parser): Call it when needed.
11470 (output): Also free the guard and attrs obstacks.
11471 * src/files.c, src/files.h (obstack_save): Remove.
11472 (output_files): Remove.
11473 As a result, if one needs the former `.act' file, using an
11474 appropriate skeleton which requires actions and guards is now
11475 required.
11476 * src/main.c (main): Adjust.
11477 * tests/semantic.at: New.
11478 * tests/regression.at: Use `input.y' as input file name.
11479 Avoid 8+3 problems by requiring input.c when the test needs the
11480 parser.
11481
11482 2001-12-27 Akim Demaille <akim@epita.fr>
11483
11484 * src/reader.c (symbol_list_new): Be sure to initialize all the
11485 fields.
11486
11487 2001-12-27 Akim Demaille <akim@epita.fr>
11488
11489 All the hacks using a final pseudo state are now useless.
11490
11491 * src/LR0.c (set_state_table): state_table holds exactly nstates.
11492 * src/lalr.c (nLA): New.
11493 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
11494 instead of lookaheadsp from the pseudo state (nstate + 1).
11495
11496 2001-12-27 Akim Demaille <akim@epita.fr>
11497
11498 * src/output.c (action_row, token_actions): Use a state_t instead
11499 of a integer, and nlookaheads instead of the following state's
11500 lookaheadsp.
11501
11502 2001-12-27 Akim Demaille <akim@epita.fr>
11503
11504 * src/conflicts.c (log_resolution, flush_shift)
11505 (resolve_sr_conflict, set_conflicts, solve_conflicts)
11506 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
11507 (conflicts_print, print_reductions): Use a state_t instead of an
11508 integer when referring to a state.
11509 As much as possible, depend upon nlookaheads, instead of the
11510 `lookaheadsp' member of the following state (since lookaheads of
11511 successive states are successive, the difference between state n + 1
11512 and n served as the number of lookaheads for state n).
11513 * src/lalr.c (add_lookback_edge): Likewise.
11514 * src/print.c (print_core, print_actions, print_state)
11515 (print_results): Likewise.
11516 * src/print_graph.c (print_core, print_actions, print_state)
11517 (print_graph): Likewise.
11518 * src/conflicts.h: Adjust.
11519
11520 2001-12-27 Akim Demaille <akim@epita.fr>
11521
11522 * src/bison.hairy: Formatting/comment changes.
11523 ANSIfy.
11524 Remove `register' indications.
11525 Add plenty of `static'.
11526
11527 2001-12-27 Akim Demaille <akim@epita.fr>
11528
11529 * src/output.c (prepare): Drop the muscle `ntbase' which
11530 duplicates ntokens.
11531 * src/bison.simple: Formatting/comment changes.
11532 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
11533 is an undocumented synonym.
11534
11535 2001-12-22 Akim Demaille <akim@epita.fr>
11536
11537 * src/output.c (output_table_data): Change the prototype to use
11538 `int' for array ranges: some invocations do pass an int, not a
11539 short.
11540 Reported by Wayne Green.
11541
11542 2001-12-22 Akim Demaille <akim@epita.fr>
11543
11544 Some actions of web2c.y are improperly triggered.
11545 Reported by Mike Castle.
11546
11547 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
11548 * tests/regression.at (Web2c): Rename as...
11549 (Web2c Report): this.
11550 (Web2c Actions): New.
11551
11552 2001-12-22 Akim Demaille <akim@epita.fr>
11553
11554 Reductions in web2c.y are improperly reported.
11555 Reported by Mike Castle.
11556
11557 * src/conflicts.c (print_reductions): Fix.
11558 * tests/regression.at (Web2c): New.
11559
11560 2001-12-18 Akim Demaille <akim@epita.fr>
11561
11562 Some host fail on `assert (!"foo")', which expands to
11563 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
11564 Reported by Nelson Beebee.
11565
11566 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
11567 `#define it_succeeded 0' and `assert (it_succeeded)'.
11568
11569 2001-12-17 Marc Autret <autret_m@epita.fr>
11570
11571 * src/bison.simple: Don't hard code the skeleton line and filename.
11572 * src/output.c (output_parser): Rename 'line' as 'output_line'.
11573 New line counter 'skeleton_line' (skeleton-line muscle).
11574
11575 2001-12-17 Paul Eggert <eggert@twinsun.com>
11576
11577 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
11578 YYDEBUG must be defined to a nonzero value.
11579
11580 * src/bison.simple (yytname): Do not assume that the user defines
11581 YYDEBUG to a properly parenthesized expression.
11582
11583 2001-12-17 Akim Demaille <akim@epita.fr>
11584
11585 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
11586 nlookaheads is a new member.
11587 Adjust all users.
11588 * src/lalr.h (nlookaheads): Remove this orphan declaration.
11589 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
11590 state.
11591
11592 2001-12-17 Akim Demaille <akim@epita.fr>
11593
11594 * src/files.h, src/files.c (open_files, close_files): Remove.
11595 * src/main.c (main): Don't open/close files, nor invoke lex_free,
11596 let...
11597 * src/reader.c (reader): Do it.
11598
11599 2001-12-17 Akim Demaille <akim@epita.fr>
11600
11601 * src/conflicts.c (print_reductions): Formatting changes.
11602
11603 2001-12-17 Akim Demaille <akim@epita.fr>
11604
11605 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
11606 (flush_reduce): New.
11607 (resolve_sr_conflict): Adjust.
11608
11609 2001-12-17 Akim Demaille <akim@epita.fr>
11610
11611 * src/output.c (output_obstack): Be static and rename as...
11612 (format_obstack): this, to avoid any confusion with files.c's
11613 output_obstack.
11614 * src/reader.h (muscle_obstack): Move to...
11615 * src/output.h: here, since it's defined in output.c.
11616
11617 2001-12-17 Akim Demaille <akim@epita.fr>
11618
11619 * src/output.c (action_row, save_column, default_goto)
11620 (sort_actions, matching_state, pack_vector): Better variable
11621 locality.
11622
11623 2001-12-17 Akim Demaille <akim@epita.fr>
11624
11625 * src/output.c: Various formatting changes.
11626
11627 2001-12-17 Akim Demaille <akim@epita.fr>
11628
11629 * src/files.c (output_files): Free the output_obstack.
11630 * src/main.c (main): Call print and print_graph conditionally.
11631 * src/print.c (print): Work unconditionally.
11632 * src/print_graph.c (print_graph): Work unconditionally.
11633 * src/conflicts.c (log_resolution): Output only if verbose_flag.
11634
11635 2001-12-16 Marc Autret <autret_m@epita.fr>
11636
11637 * src/output.c (actions_output): Fix. When we use %no-lines,
11638 there is one less line per action.
11639
11640 2001-12-16 Marc Autret <autret_m@epita.fr>
11641
11642 * src/bison.simple: Remove a useless #line directive.
11643 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
11644 * src/output.c (get_lines_number): New.
11645 (output_parser): Adjust, now takes care about the lines of a
11646 output muscles.
11647 Fix line numbering.
11648 (actions_output): Computes the number of lines taken by actions.
11649 (output_master_parser): Insert new skeleton which is the name of
11650 the output parser file name.
11651
11652 2001-12-15 Marc Autret <autret_m@epita.fr>
11653
11654 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
11655
11656 2001-12-15 Marc Autret <autret_m@epita.fr>
11657
11658 * src/output.c (output_gram): Keep track of the hairy one.
11659
11660 2001-12-15 Akim Demaille <akim@epita.fr>
11661
11662 Make `make distcheck' work.
11663
11664 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
11665 system.h which uses libgettext.h.
11666
11667 2001-12-15 Akim Demaille <akim@epita.fr>
11668
11669 * src/nullable.c (set_nullable): Useless rules must be skipped,
11670 otherwise, since we range over their symbols, we might look at a
11671 nonterminal which no longer ``exists'', i.e., it is not counted in
11672 `nvars', hence we overflow our arrays.
11673
11674 2001-12-15 Akim Demaille <akim@epita.fr>
11675
11676 The header can also be produced directly, without any obstack!
11677 Yahoo!
11678
11679 * src/files.c, src/files.h (defines_obstack): Remove.
11680 (compute_header_macro): Global.
11681 (defines_obstack_save): Remove.
11682 * src/reader.c (parse_union_decl): No longer output to
11683 defines_obstack: its content can be found in the `stype' muscle
11684 anyway.
11685 (output_token_translations): Merge into...
11686 (symbols_output): this.
11687 Rename as...
11688 (symbols_save): this.
11689 (reader): Adjust.
11690 * src/output.c (header_output): New.
11691 (output): Call it.
11692
11693 2001-12-15 Akim Demaille <akim@epita.fr>
11694
11695 * src/reader.c (parse_union_decl): Instead of handling two obstack
11696 simultaneously, use one to define the `stype' muscle, and use the
11697 value of the latter to fill defines_obstack.
11698 (copy_comment): Remove.
11699 (copy_comment2): Work for a single obstack.
11700 Rename as...
11701 (copy_comment): this.
11702
11703 2001-12-15 Akim Demaille <akim@epita.fr>
11704
11705 * src/lex.c, src/lex.h (xgetc): No longer static.
11706 * src/reader.c (parse_union_decl): Revamp.
11707
11708 2001-12-15 Akim Demaille <akim@epita.fr>
11709
11710 Still making progress in separating Bison into (i) input, (ii)
11711 process, (iii) output: now we can directly output the parser file
11712 without using table_obstack at all.
11713
11714 * src/files.c, src/files.h (table_obstack): Bye bye.
11715 (parser_file_name): New.
11716 * src/files.c (compute_output_file_names): Compute it.
11717 * src/output.c (actions_output, output_parser)
11718 (output_master_parser): To a file instead of an obstack.
11719
11720 2001-12-15 Akim Demaille <akim@epita.fr>
11721
11722 Attach actions to rules, instead of pre-outputting them to
11723 actions_obstack.
11724
11725 * src/gram.h (rule_t): action and action_line are new members.
11726 * src/reader.c (symbol_list): Likewise.
11727 (copy_action): Save the actions within the rule.
11728 (packgram): Save them in rule_table.
11729 * src/output.c (actions_output): New.
11730 (output_parser): Use it on `%%actions'.
11731 (output_rule_data): Don't free rule_table.
11732 (output): Do it.
11733 (prepare): Don't save the `action' muscle.
11734 * src/bison.simple: s/%%action/%%actions/.
11735
11736 2001-12-15 Akim Demaille <akim@epita.fr>
11737
11738 * src/reader.c (copy_action): When --yacc, don't append a `;'
11739 to the user action: let it fail if lacking.
11740 Suggested by Arnold Robbins and Tom Tromey.
11741
11742 2001-12-14 Akim Demaille <akim@epita.fr>
11743
11744 * src/lex.c (literalchar): Simply return the char you decoded, non
11745 longer mess around with obstacks and int pointers.
11746 Adjust all callers.
11747
11748 2001-12-14 Akim Demaille <akim@epita.fr>
11749
11750 * src/lex.c (literalchar): Don't escape the special characters,
11751 just decode them, and keep them as char (before, eol was output as
11752 the 2 char string `\n' etc.).
11753 * src/output.c (output_rule_data): Use quotearg to output the
11754 token strings.
11755
11756 2001-12-13 Paul Eggert <eggert@twinsun.com>
11757
11758 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
11759 Do not infringe on the global user namespace when using C++.
11760 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
11761 All uses of `fprintf' and `stderr' changed.
11762
11763 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
11764
11765 2001-12-13 Akim Demaille <akim@epita.fr>
11766
11767 The computation of nullable is broken: it doesn't handle empty
11768 RHS's properly.
11769
11770 * tests/torture.at (GNU AWK Grammar): New.
11771 * tests/sets.at (Nullable): New.
11772 * src/nullable.c (set_nullable): Instead of blindly looping over
11773 `ritems', loop over the rules, and then over their rhs's.
11774
11775 Work around Autotest bugs.
11776
11777 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
11778 frame, because Autotest understand lines starting with a `+' as
11779 traces from the shell. Then, they are not processed properly.
11780 Admittedly an Autotest bug, but we don't have time to wait for
11781 Autotest to catch up.
11782 * tests/regression.at (Broken Closure): Adjust to the new table
11783 frames.
11784 Move to...
11785 * tests/sets.at: here.
11786
11787 2001-12-13 Akim Demaille <akim@epita.fr>
11788
11789 * src/closure.c (closure): Use nrules instead of playing tricks
11790 with BITS_PER_WORD.
11791
11792 2001-12-13 Akim Demaille <akim@epita.fr>
11793
11794 * src/print.c (print_actions): Output the handling of `$' as the
11795 traces do: shifting the token EOF. Before EOF was treated as a
11796 nonterminal.
11797 * tests/regression.at: Adjust some tests.
11798 * src/print_graph.c (print_core): Complete the set of items via
11799 closure. The next-to-final and final states are still unsatisfying,
11800 but that's to be addressed elsewhere.
11801 No longer output the rule numbers, but do output the state number.
11802 A single loop for the shifts + gotos is enough, but picked a
11803 distinct color for each.
11804 (print_graph): Initialize and finalize closure.
11805
11806 2001-12-13 Akim Demaille <akim@epita.fr>
11807
11808 * src/reader.c (readgram): Remove dead code, an strip useless
11809 braces.
11810 (get_type): Remove, unused.
11811
11812 2001-12-12 Akim Demaille <akim@epita.fr>
11813
11814 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
11815 on that of lib/error.c.
11816
11817 2001-12-12 Akim Demaille <akim@epita.fr>
11818
11819 Some hosts don't like `/' in includes.
11820
11821 * src/system.h: Include libgettext.h without qualifying the path.
11822 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
11823 $(top_srcdir).
11824
11825 2001-12-11 Marc Autret <autret_m@epita.fr>
11826
11827 * src/output.c (output_parser): Remove useless muscle.
11828
11829 2001-12-11 Marc Autret <autret_m@epita.fr>
11830
11831 * src/bison.simple: Remove #line just before %%epilogue. It
11832 is now handled in ...
11833 * src/reader.c (read_additionnal_code): Add the output of a
11834 #line for the epilogue.
11835
11836 2001-12-10 Marc Autret <autret_m@epita.fr>
11837
11838 * src/reader.c (copy_definition): Re-use CPP-outed code which
11839 replace precedent remove.
11840 * src/bison.simple: Remove #line before %%prologue because
11841 %%input-line is wrong at this time.
11842
11843 2001-12-10 Marc Autret <autret_m@epita.fr>
11844
11845 * src/reader.c (symbols_output): Clean up.
11846 * src/output.c (output_gram, output): Clean up.
11847
11848 2001-12-10 Akim Demaille <akim@epita.fr>
11849
11850 * src/lalr.c (initialize_lookaheads): New. Extracted from...
11851 * src/LR0.c (set_state_table): here.
11852 * src/lalr.c (lalr): Call it.
11853
11854 2001-12-10 Akim Demaille <akim@epita.fr>
11855
11856 * src/state.h (shifts): Remove the `number' member: shifts are
11857 attached to state, hence no longer need to be labelled with a
11858 state number.
11859
11860 2001-12-10 Akim Demaille <akim@epita.fr>
11861
11862 Now that states have a complete set of members, the linked list of
11863 shifts is useless: just fill directly the state's shifts member.
11864
11865 * src/state.h (shifts): Remove the `next' member.
11866 * src/LR0.c (first_state, last_state): Remove.
11867 Adjust the callers.
11868 (augment_automaton): Don't look for the shifts that must be added
11869 a shift on EOF: it is those of the state we looked for! But now,
11870 since shifts are attached, it is no longer needed to looking
11871 merely by its id: its number.
11872
11873 2001-12-10 Akim Demaille <akim@epita.fr>
11874
11875 * src/LR0.c (augment_automaton): Better variable locality.
11876 Remove an impossible branch: if there is a state corresponding to
11877 the start symbol being shifted, then there is shift for the start
11878 symbol from the initial state.
11879
11880 2001-12-10 Akim Demaille <akim@epita.fr>
11881
11882 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
11883 only when appropriate: when insert_start_shifting_state' is not
11884 invoked.
11885 * tests/regression.at (Rule Line Numbers): Adjust.
11886
11887 2001-12-10 Akim Demaille <akim@epita.fr>
11888
11889 * src/LR0.c (augment_automaton): Now that all states have shifts,
11890 merge the two cases addition shifts to the initial state.
11891
11892 2001-12-10 Akim Demaille <akim@epita.fr>
11893
11894 * src/lalr.c (set_state_table): Move to...
11895 * src/LR0.c: here.
11896 * src/lalr.c (lalr): Don't call it...
11897 * src/LR0.c (generate_states): do it.
11898 * src/LR0.h (first_state): Remove, only the table is used.
11899
11900 2001-12-10 Akim Demaille <akim@epita.fr>
11901
11902 * src/LR0.h (first_shift, first_reduction): Remove.
11903 * src/lalr.c: Don't use first_shift: find shifts through the
11904 states.
11905
11906 2001-12-10 Akim Demaille <akim@epita.fr>
11907
11908 * src/LR0.c: Attach shifts to states as soon as they are
11909 computed.
11910 * src/lalr.c (set_state_table): Instead of assigning shifts to
11911 state, just assert that the mapping was properly done.
11912
11913 2001-12-10 Akim Demaille <akim@epita.fr>
11914
11915 * src/LR0.c (insert_start_shift): Rename as...
11916 (insert_start_shifting_state): this.
11917 (insert_eof_shifting_state, insert_accepting_state): New.
11918 (augment_automaton): Adjust.
11919 Better locality of the variables.
11920 When looking if the start_symbol is shifted from the initial
11921 state, using `while (... symbol != start_symbol ...)' sounds
11922 better than `while (... symbol < start_symbol ...)': If fail
11923 to see how the order between symbols could be relevant!
11924
11925 2001-12-10 Akim Demaille <akim@epita.fr>
11926
11927 * src/getargs.h: Don't declare `spec_name_prefix' and
11928 `spec_file_prefix', declared by src/files.h.
11929 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
11930 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
11931 * src/output.c (prepare): Adjust.
11932 * src/reader.c (symbols_output): Likewise.
11933 * src/vmsgetargs.c: Vaguely adjust, but who cares?
11934
11935 2001-12-10 Akim Demaille <akim@epita.fr>
11936
11937 * src/muscle_tab.c (muscle_init): NULL is a better default than
11938 `"0"'.
11939
11940 2001-12-10 Akim Demaille <akim@epita.fr>
11941
11942 * src/reader.c (reader): Calling symbols_output once is enough.
11943
11944 2001-12-10 Akim Demaille <akim@epita.fr>
11945
11946 Now that states have a complete set of members, the linked list of
11947 reductions is useless: just fill directly the state's reductions
11948 member.
11949
11950 * src/state.h (struct reductions): Remove member `number' and
11951 `next'.
11952 * src/LR0.c (first_reduction, last_reduction): Remove.
11953 (save_reductions): Don't link the new reductions, store them in
11954 this_state.
11955 * src/lalr.c (set_state_table): No need to attach reductions to
11956 states, it's already done.
11957 * src/output.c (output_actions): No longer free the shifts, then
11958 the reductions, then the states: free all the states and their
11959 members.
11960
11961 2001-12-10 Akim Demaille <akim@epita.fr>
11962
11963 * src/options.c (OPTN, DRTV, BOTH): New.
11964 (option_table): Use them.
11965
11966 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
11967 the job of system.h.
11968 * src/options.c: Don't include stdio.h and xalloc.h for the same
11969 reasons.
11970
11971 2001-12-10 Akim Demaille <akim@epita.fr>
11972
11973 * src/output.c (output, prepare): Make sure the values of the
11974 muscles `action' and `prologue' are 0-terminated.
11975
11976 2001-12-10 Akim Demaille <akim@epita.fr>
11977
11978 Clean up GCC warnings.
11979
11980 * src/reader.c (copy_action): `buf' is not used.
11981 (parse_skel_decl): Be static.
11982 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
11983 * src/options.h (create_long_option_table): Have a real prototype.
11984 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
11985 (hash_delete_at): Return const void *.
11986 Adjust casts to preserve the const.
11987
11988 2001-12-10 Akim Demaille <akim@epita.fr>
11989
11990 * configure.in: Require 2.52g.
11991 M4 is not needed, but AUTOM4TE is.
11992 * m4/m4.m4: Remove.
11993 * tests/Makefile.am: Adjust.
11994
11995 2001-12-10 Akim Demaille <akim@epita.fr>
11996
11997 One structure for states is enough, even though theoretically
11998 there are LR(0) states and LALR(1) states.
11999
12000 * src/lalr.h (state_t): Remove.
12001 (state_table): Be state_t **, not state_t *.
12002 * src/state.h (core, CORE_ALLOC): Rename as...
12003 (state_t, STATE_ALLOC): this.
12004 Add the LALR(1) members: shifts, reductions, errs.
12005 * src/LR0.c (state_table): Rename as...
12006 (state_hash): this, to avoid name clashes with the global
12007 `state_table'.
12008 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12009 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12010
12011 2001-12-10 Akim Demaille <akim@epita.fr>
12012
12013 Bison dumps core on bash.y.
12014 Reported by Pascal Bart.
12015
12016 * src/warshall.c (bitmatrix_print): New.
12017 (TC): Use it.
12018 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
12019 j must be the outer loop.
12020 * tests/regression.at (Broken Closure): New.
12021
12022 2001-12-05 Akim Demaille <akim@epita.fr>
12023
12024 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12025 its argument.
12026 Reported by Peter Hamorsky.
12027
12028 2001-12-05 Akim Demaille <akim@epita.fr>
12029
12030 * src/conflicts.c (err_table): Remove.
12031 (resolve_sr_conflict): Adjust.
12032 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12033 Rename as...
12034 (state_t.reductions, state_t.shifts): this.
12035
12036 2001-12-05 Akim Demaille <akim@epita.fr>
12037
12038 * src/reduce.c (reduce_grammar_tables): No longer disable the
12039 removal of useless rules via CPP but via `if (0)', so that the
12040 compiler still check the code is valid.
12041 For instance, it should have noticed `rline' no longer exists: use
12042 the `line' member of rule_t.
12043 * src/gram.c (dummy, rline): Remove, unused.
12044
12045 2001-12-05 Akim Demaille <akim@epita.fr>
12046
12047 * src/output.c (pack_vector): Use assert, not berror.
12048 * src/main.c (berror): Remove, unused.
12049
12050 2001-12-05 Akim Demaille <akim@epita.fr>
12051
12052 New experimental feature: if --verbose --trace output all the
12053 items of a state, not only its kernel.
12054
12055 * src/print.c (print_core): If `trace_flag', then invoke closure
12056 before outputting the items of the state (print_core is no longer
12057 a correct name them).
12058 (print_results): Invoke new_closure/free_closure if needed.
12059
12060 2001-12-05 Akim Demaille <akim@epita.fr>
12061
12062 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12063 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12064 (nitemset): for consistency with the rest of the project.
12065
12066 2001-12-05 Akim Demaille <akim@epita.fr>
12067
12068 * src/closure.c (print_closure): Improve.
12069 (closure): Use it for printing input and output.
12070
12071 2001-12-05 Akim Demaille <akim@epita.fr>
12072
12073 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
12074 indexed by nonterminals.
12075
12076 2001-12-05 Akim Demaille <akim@epita.fr>
12077
12078 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
12079 what it was!).
12080 * src/warshall.h: Remove accidental duplication of the content.
12081
12082 2001-12-05 Akim Demaille <akim@epita.fr>
12083
12084 * src/closure.c (set_fderives): De-obfuscate.
12085
12086 2001-12-05 Akim Demaille <akim@epita.fr>
12087
12088 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
12089
12090 2001-12-05 Akim Demaille <akim@epita.fr>
12091
12092 * src/closure.c (set_firsts): De-obfuscate.
12093
12094 2001-12-05 Akim Demaille <akim@epita.fr>
12095
12096 * src/output.c (action_row): De-obfuscate
12097 using the good o' techniques: arrays not pointers, variable
12098 locality, BITISSET, RESETBIT etc.
12099
12100 2001-12-05 Akim Demaille <akim@epita.fr>
12101
12102 Pessimize the code to simplify it: from now on, all the states
12103 have a valid SHIFTS, which NSHIFTS is possibly 0.
12104
12105 * src/LR0.c (shifts_new): Be global and move to..
12106 * src/state.c, src/state.h: here.
12107 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
12108 * src/print_graph: Adjust.
12109
12110 2001-12-05 Akim Demaille <akim@epita.fr>
12111
12112 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
12113 * src/conflicts.c: Use it.
12114 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
12115 incorrectly ``simplified''.
12116
12117 2001-12-05 Akim Demaille <akim@epita.fr>
12118
12119 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
12120 using the good o' techniques: arrays not pointers, variable
12121 locality, BITISSET, RESETBIT etc.
12122
12123 2001-12-05 Akim Demaille <akim@epita.fr>
12124
12125 * src/state.h (SHIFT_SYMBOL): New.
12126 * src/conflicts.c: Use it to deobfuscate.
12127
12128 2001-12-05 Akim Demaille <akim@epita.fr>
12129
12130 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
12131 (print_reductions): De-obfuscate using the good o' techniques:
12132 arrays not pointers, variable locality, BITISSET.
12133
12134 2001-12-05 Akim Demaille <akim@epita.fr>
12135
12136 * src/conflicts.c (print_reductions): Arrays, not pointers.
12137 Use BITISSET.
12138
12139 2001-12-05 Akim Demaille <akim@epita.fr>
12140
12141 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12142
12143 2001-12-05 Akim Demaille <akim@epita.fr>
12144
12145 * src/conflicts.c (print_reductions): Improve variable locality.
12146
12147 2001-12-05 Akim Demaille <akim@epita.fr>
12148
12149 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12150
12151 2001-12-05 Akim Demaille <akim@epita.fr>
12152
12153 * src/conflicts.c (print_reductions): Improve variable locality.
12154
12155 2001-12-05 Akim Demaille <akim@epita.fr>
12156
12157 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
12158 * src/lalr.c: Use them.
12159
12160 2001-12-05 Akim Demaille <akim@epita.fr>
12161
12162 * src/LR0.c (augment_automaton): Formatting changes.
12163 Better variable locality.
12164
12165 2001-12-05 Akim Demaille <akim@epita.fr>
12166
12167 * src/lalr.c (matrix_print): New.
12168 (transpose): Use it.
12169 Use arrays instead of pointers.
12170
12171 2001-12-05 Akim Demaille <akim@epita.fr>
12172
12173 * src/lalr.c (maxrhs): Move to...
12174 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
12175 * src/lalr.c (build_relations): Adjust.
12176
12177 2001-12-05 Akim Demaille <akim@epita.fr>
12178
12179 * src/lalr.c (transpose): Free the memory allocated to the
12180 argument, as it is replaced by the results by the unique caller.
12181 (build_relations): Merely invoke transpose: it handles the memory
12182 deallocation.
12183 Improve variable locality.
12184 Avoid variables used as mere abbreviations.
12185 (compute_lookaheads): Use arrays instead of pointers.
12186
12187 2001-12-05 Akim Demaille <akim@epita.fr>
12188
12189 * src/lalr.c (initialize_F): Improve variable locality.
12190 Avoid variables used as mere abbreviations.
12191
12192 2001-12-05 Akim Demaille <akim@epita.fr>
12193
12194 * src/derives.c (print_derives): Display the ruleno.
12195 * src/lalr.c (initialize_F, transpose): Better variable locality
12196 to improve readability.
12197 Avoid variables used as mere abbreviations.
12198
12199 2001-12-05 Akim Demaille <akim@epita.fr>
12200
12201 * src/lalr.c (traverse): Use arrays instead of pointers.
12202
12203 2001-12-05 Akim Demaille <akim@epita.fr>
12204
12205 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
12206 the handling of squeue.
12207 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12208
12209 2001-12-05 Akim Demaille <akim@epita.fr>
12210
12211 Because useless nonterminals are now kept alive (instead of being
12212 `destroyed'), we now sometimes examine them, and store information
12213 related to them. Hence we need to know their number, and adjust
12214 memory allocations.
12215
12216 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
12217 static.
12218 * src/LR0.c (allocate_itemsets): The memory allocated to
12219 `symbol_count' was used for two different purpose: once to count
12220 the number of occurrences of each symbol, and later reassigned to
12221 `shift_symbol', containing the symbol that can be shifted from a
12222 given state.
12223 Deobfuscate, i.e., allocate, use and free `symbol_count' here
12224 only, and...
12225 (new_itemsets): Allocate `shift_symbol' here.
12226 (allocate_itemsets): symbol_count includes useless nonterminals.
12227 Make room for them.
12228 (free_storage): Use `free', not `XFREE', for pointers that cannot
12229 be null.
12230
12231 2001-12-05 Akim Demaille <akim@epita.fr>
12232
12233 * src/nullable.c (set_nullable): Deobfuscate the handling of
12234 ritem.
12235 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12236
12237 2001-12-05 Akim Demaille <akim@epita.fr>
12238
12239 * src/gram.c, src/gram.h (ritem_print): New.
12240 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12241 (This useless function was defined only to work around VMS linkers
12242 that can't handle compilation units with variables only).
12243 * src/reduce.c (dump_grammar): Use it to trace the construction of
12244 ritem.
12245
12246 2001-12-04 Paul Eggert <eggert@twinsun.com>
12247
12248 * src/bison.simple (union yyalloc): Change member names
12249 to be the same as the stack names.
12250 (yyparse): yyptr is now union yyalloc *, not char *.
12251 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12252 and may generate better code on some machines.
12253 (yystpcpy): Use prototype if __STDC__ is defined, not just
12254 if __cplusplus is defined.
12255
12256 2001-11-30 Akim Demaille <akim@epita.fr>
12257
12258 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12259 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12260 Gettext doesn't compile cleanly, and dies with -Werror.
12261 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12262 Include WARNING_CFLAGS here.
12263 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12264 before being defined.
12265
12266 2001-11-27 Paul Eggert <eggert@twinsun.com>
12267
12268 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12269 First arg is int, not unsigned.
12270 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12271 (SIZE_MAX, UINT_MAX): New macros.
12272 (quotearg_n_options): Abort if N is negative.
12273 Avoid overflow check on hosts where size_t is 64 bits and int
12274 is 32 bits, as overflow is impossible there.
12275 Fix off-by-one typo that caused unnecessary reallocation.
12276
12277 2001-11-29 Paul Eggert <eggert@twinsun.com>
12278
12279 Name space cleanup in generated parser.
12280
12281 * doc/bison.texinfo (Bison Parser): Discuss system headers
12282 and their effect on the user name space.
12283
12284 * src/bison.simple:
12285 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
12286 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
12287 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
12288
12289 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
12290 on user names when possible.
12291
12292 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
12293 Simplify test for whather <alloca.h> exists.
12294
12295 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
12296
12297 (<stdio.h>): Include if YYDEBUG.
12298
12299 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
12300 ! defined (yyoverflow) && ! defined (yymemcpy).
12301
12302 (yymemcpy, yyparse): Rename local variables as needed so that
12303 they all begin with 'yy'.
12304
12305 (yystrlen, yystpcpy): New functions.
12306
12307 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
12308 All uses changed.
12309
12310 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
12311 instead of relying on string.h functions. Use YYSTACK_ALLOC
12312 and YYSTACK_FREE instead of malloc and free.
12313
12314 2001-11-30 Akim Demaille <akim@epita.fr>
12315
12316 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
12317 before their first uses.
12318 (YYBISON, YYPURE): Move to the top of the output.
12319
12320 2001-11-30 Akim Demaille <akim@epita.fr>
12321
12322 * tests/reduce.at (Useless Nonterminals): Fix.
12323
12324 2001-11-30 Akim Demaille <akim@epita.fr>
12325
12326 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
12327 if body instead of `;' to pacify GCC's warnings.
12328
12329 2001-11-30 Akim Demaille <akim@epita.fr>
12330
12331 Instead of mapping the LHS of unused rules to -1, keep the LHS
12332 valid, but flag the rules as invalid.
12333
12334 * src/gram.h (rule_t): `useful' is a new member.
12335 * src/print.c (print_grammar): Adjust.
12336 * src/derives.c (set_derives): Likewise.
12337 * src/reader.c (packgram, reduce_output): Likewise.
12338 * src/reduce.c (reduce_grammar_tables): Likewise.
12339 * tests/reduce.at (Underivable Rules, Useless Rules): New.
12340
12341 2001-11-30 Akim Demaille <akim@epita.fr>
12342
12343 * src/reduce.c (reduce_output): Formatting changes.
12344 * src/print.c (print_results, print_grammar): Likewise.
12345 * tests/regression.at (Rule Line Numbers)
12346 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
12347
12348 2001-11-30 Akim Demaille <akim@epita.fr>
12349
12350 * src/reduce.c (nonterminals_reduce): Instead of throwing away
12351 useless nonterminals, move them at the end of the symbol arrays.
12352 (reduce_output): Adjust.
12353 * tests/reduce.at (Useless Nonterminals): Adjust.
12354
12355 2001-11-30 Akim Demaille <akim@epita.fr>
12356
12357 * src/reduce.c: Various comment/formatting changes.
12358 (nonterminals_reduce): New, extracted from...
12359 (reduce_grammar_tables): here.
12360 (reduce_grammar): Call nonterminals_reduce.
12361
12362 2001-11-29 Paul Eggert <eggert@twinsun.com>
12363
12364 * src/bison.simple (YYSTACK_REALLOC): Remove.
12365 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
12366 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
12367 New macros.
12368 (union yyalloc): New type.
12369 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
12370 an arbitrary restriction on hosts where size_t is wider than int.
12371
12372 (yyparse): Don't dump core if alloca or malloc fails; instead, report
12373 a parser stack overflow. Allocate just one block of memory for all
12374 three stacks, instead of allocating three blocks; this typically is
12375 faster and reduces fragmentation.
12376
12377 Do not limit the number of items in the stack to a value that fits
12378 in 'int', as this is an arbitrary limit on hosts with 64-bit
12379 size_t and 32-bit int.
12380
12381 2001-11-29 Marc Autret <autret_m@epita.fr>
12382
12383 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
12384 of defining YYERROR_VERBOSE.
12385 [AT_DATA]: $4 is now out of C declarations in the prologue.
12386
12387 2001-11-28 Marc Autret <autret_m@epita.fr>
12388
12389 * src/reader.c (parse_dquoted_param): New.
12390 (parse_skel_decl): Use it.
12391 * src/lex.h: Add its prototype.
12392 * src/lex.c (literalchar): Become not static.
12393
12394 2001-11-28 Marc Autret <autret_m@epita.fr>
12395
12396 * src/output.h: And put its extern declaration here.
12397 * src/output.c (error_verbose): Define here.
12398 (prepare): Echo name modification.
12399 * src/getargs.h: Clean its extern declaration.
12400 * src/getargs.c (error_verbose_flag): Remove.
12401 (getargs): Remove case 'e'.
12402 * src/options.c (option_table): 'error-verbose' is now seen as simple
12403 percent option.
12404 Include output.h.
12405
12406 * src/reader.c (read_declarations): Remove case tok_include.
12407 (parse_include_decl): Remove.
12408 * src/lex.h (token_t): Remove tok_include.
12409 * src/options.c (option_table): 'include' is now a simple command line
12410 option.
12411
12412 2001-11-28 Marc Autret <autret_m@epita.fr>
12413
12414 * src/bison.simple: Adjust muscle names.
12415 * src/muscle_tab.c (muscle_init): Also rename the muscles.
12416 * src/output.c (prepare): s/_/-/ for the muscles names.
12417 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
12418
12419 2001-11-28 Marc Autret <autret_m@epita.fr>
12420
12421 * src/bison.simple: Fix debug.
12422 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
12423
12424 2001-11-28 Akim Demaille <akim@epita.fr>
12425
12426 * src/LR0.c (shifts_new): New.
12427 (save_shifts, insert_start_shift, augment_automaton): Use it.
12428
12429 2001-11-28 Akim Demaille <akim@epita.fr>
12430
12431 * src/closure.c (closure): `b' and `ruleno' denote the same value:
12432 keep ruleno only.
12433
12434 2001-11-28 Akim Demaille <akim@epita.fr>
12435
12436 * src/closure.c (closure): Instead of looping over word in array
12437 then bits in words, loop over bits in array.
12438
12439 2001-11-28 Akim Demaille <akim@epita.fr>
12440
12441 * src/closure.c (closure): No longer optimize the special case
12442 where all the bits of `ruleset[r]' are set to 0, to make the code
12443 clearer.
12444
12445 2001-11-28 Akim Demaille <akim@epita.fr>
12446
12447 * src/closure.c (closure): `r' and `c' are new variables, used to
12448 de-obfuscate accesses to RULESET and CORE.
12449
12450 2001-11-28 Akim Demaille <akim@epita.fr>
12451
12452 * src/reduce.c (reduce_print): Use ngettext.
12453 (dump_grammar): Improve the trace accuracy.
12454
12455 2001-11-28 Akim Demaille <akim@epita.fr>
12456
12457 * src/reduce.c (dump_grammar): Don't translate trace messages.
12458
12459 2001-11-28 Akim Demaille <akim@epita.fr>
12460
12461 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
12462 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
12463 as all tags are free'ed afterwards.
12464 From Enrico Scholz.
12465
12466 2001-11-27 Paul Eggert <eggert@twinsun.com>
12467
12468 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
12469 use alloca when we didn't want to, and vice versa.
12470
12471 2001-11-27 Marc Autret <autret_m@epita.fr>
12472
12473 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
12474 initialization.
12475 * src/output.c (prepare): Remove its update.
12476
12477 2001-11-27 Marc Autret <autret_m@epita.fr>
12478
12479 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
12480 Use %error-verbose.
12481
12482 2001-11-27 Marc Autret <autret_m@epita.fr>
12483
12484 * src/bison.simple: Remove YYERROR_VERBOSE using.
12485 Use %%error_verbose.
12486 (yyparse): Likewise.
12487 * src/output.c (prepare): Give its final value.
12488 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
12489 * src/getargs.h: Add its extern declaration.
12490 * src/getargs.c (error_verbose_flag): New int.
12491 (getargs): Update to catch new case.
12492 * src/options.c (option_table): 'error-verbose' is a new option.
12493 (shortopts): Update.
12494
12495 2001-11-27 Akim Demaille <akim@epita.fr>
12496
12497 * src/system.h: Use intl/libgettext.h.
12498 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
12499
12500 2001-11-27 Akim Demaille <akim@epita.fr>
12501
12502 * tests/torture.at (Exploding the Stack Size with Malloc):
12503 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
12504
12505 2001-11-27 Akim Demaille <akim@epita.fr>
12506
12507 * src/files.c: Include error.h.
12508 Reported by Hans Aberg.
12509
12510 2001-11-26 Marc Autret <autret_m@epita.fr>
12511
12512 * src/reader.c (parse_include_decl): New, not yet implemented.
12513 (read_declarations): Add case tok_include.
12514 * src/getargs.h (include): Add its extern definition.
12515 * src/getargs.c (include): New const char *.
12516 (getargs): Add case '-I'.
12517 * src/options.c (option_table): Add include as command line and
12518 percent option.
12519 * src/lex.h (token_t): Add tok_include.
12520
12521 2001-11-26 Akim Demaille <akim@epita.fr>
12522
12523 * src/reader.c (readgram): Make sure rules for mid-rule actions
12524 have a lineno equal to that of their host rule.
12525 Reported by Hans Aberg.
12526 * tests/regression.at (Rule Line Numbers): New.
12527
12528 2001-11-26 Akim Demaille <akim@epita.fr>
12529
12530 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
12531 size_ts.
12532
12533 2001-11-26 Akim Demaille <akim@epita.fr>
12534
12535 * src/complain.c, src/complain.h (error): Remove, provided by
12536 lib/error.[ch].
12537
12538 2001-11-26 Akim Demaille <akim@epita.fr>
12539
12540 * src/reader.c (read_declarations): Don't abort on tok_illegal,
12541 issue an error message.
12542 * tests/regression.at (Invalid %directive): New.
12543 Reported by Hans Aberg.
12544
12545 2001-11-26 Akim Demaille <akim@epita.fr>
12546
12547 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
12548 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12549
12550 2001-11-26 Akim Demaille <akim@epita.fr>
12551
12552 * src/conflicts.c (conflicts_print): Don't complain at all when
12553 there are no reduce/reduce conflicts, and as many shift/reduce
12554 conflicts as expected.
12555 * tests/regression.at (%expect right): Adjust.
12556
12557 2001-11-23 Akim Demaille <akim@epita.fr>
12558
12559 * lib/alloca.c: Update, from fileutils.
12560
12561 2001-11-23 Akim Demaille <akim@epita.fr>
12562
12563 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
12564
12565 2001-11-23 Akim Demaille <akim@epita.fr>
12566
12567 * src/system.h: Include alloca.h.
12568 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
12569
12570 2001-11-23 Akim Demaille <akim@epita.fr>
12571
12572 * src/print_graph.c (print_actions): Remove `rule', unused.
12573 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
12574 pacify GCC's signed < unsigned warnings.
12575 * src/closure.c (itemsetsize): Likewise.
12576 * src/reader.c (symbol_list_new): Static.
12577
12578 2001-11-23 Akim Demaille <akim@epita.fr>
12579
12580 Attaching lineno to buckets is stupid, since only one copy of each
12581 symbol is kept, only the line of the first occurrence is kept too.
12582
12583 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
12584 * src/reader.c (rline_allocated): Remove, unused.
12585 (symbol_list): Have a `line' member.
12586 (symbol_list_new): New.
12587 (readgram): Use it.
12588 * src/print.c (print_grammar): Output the rule line numbers.
12589 * tests/regression.at (Solved SR Conflicts)
12590 (Unresolved SR Conflicts): Adjust.
12591 Reported by Hans Aberg.
12592
12593 2001-11-22 Marc Autret <autret_m@epita.fr>
12594
12595 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
12596
12597 2001-11-22 Marc Autret <autret_m@epita.fr>
12598
12599 * src/muscle_tab.c (muscle_init): Remove initialization of
12600 skeleton muscle.
12601 * src/output.c (output_master_parser): Do it here.
12602
12603 2001-11-20 Akim Demaille <akim@epita.fr>
12604
12605 * po/sv.po: New.
12606 * configure.in (ALL_LINGUAS): Adjust.
12607 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
12608 longer contains strings to translate.
12609
12610 2001-11-19 Akim Demaille <akim@epita.fr>
12611
12612 * src/conflicts.c (conflicts_print): Add a missing \n.
12613
12614 2001-11-19 Akim Demaille <akim@epita.fr>
12615
12616 * src/nullable.c (nullable_print): New.
12617 (set_nullable): Call it when tracing.
12618 Better locality of variables.
12619
12620 2001-11-19 Akim Demaille <akim@epita.fr>
12621
12622 * src/print.c (print_actions): Better locality of variables.
12623
12624 2001-11-19 Akim Demaille <akim@epita.fr>
12625
12626 * src/derives.c (print_derives): Fix and enrich.
12627 * src/closure.c (print_fderives): Likewise.
12628
12629 2001-11-19 Akim Demaille <akim@epita.fr>
12630
12631 * src/closure.c (itemsetend): Remove, replaced with...
12632 (itemsetsize): new.
12633
12634 2001-11-19 Akim Demaille <akim@epita.fr>
12635
12636 * src/LR0.c (kernel_end): Remove, replaced with...
12637 (kernel_size): new.
12638
12639 2001-11-19 Akim Demaille <akim@epita.fr>
12640
12641 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
12642 to clarify.
12643
12644 2001-11-19 Akim Demaille <akim@epita.fr>
12645
12646 * src/closure.c (closure): Use arrays instead of pointers to clarify.
12647
12648 2001-11-19 Akim Demaille <akim@epita.fr>
12649
12650 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
12651 trace messages.
12652 * src/LR0.c: Likewise.
12653 (allocate_itemsets): Use arrays instead of pointers to clarify.
12654
12655 2001-11-19 Akim Demaille <akim@epita.fr>
12656
12657 * src/getargs.c (statistics_flag): Replace with...
12658 (trace_flag): New.
12659 (longopts): Accept --trace instead of --statistics.
12660 * src/getargs.h, src/options.c: Adjust.
12661 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
12662 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
12663
12664 2001-11-19 Akim Demaille <akim@epita.fr>
12665
12666 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
12667 pointers to clarify the code.
12668 (save_reductions, save_shifts): Factor common parts of alternatives.
12669
12670 2001-11-19 Akim Demaille <akim@epita.fr>
12671
12672 * src/LR0.c (new_state, get_state): Complete TRACE code.
12673 * src/closure.c: Include `reader.h' to get `tags', needed by the
12674 trace code.
12675 Rename the conditional DEBUG as TRACE.
12676 Output consistently TRACEs to stderr, not stdout.
12677 * src/derives.c: Likewise.
12678 * src/reduce.c: (inaccessable_symbols): Using if is better style
12679 than goto.
12680 Use `#if TRACE' instead of `#if 0' for tracing code.
12681
12682 2001-11-19 Akim Demaille <akim@epita.fr>
12683
12684 * src/system.h (LIST_FREE, shortcpy): New.
12685 * src/LR0.c: Use them.
12686 * src/output.c (free_itemsets, free_reductions, free_shifts):
12687 Remove, replaced by LIST_FREE.
12688
12689 2001-11-19 Akim Demaille <akim@epita.fr>
12690
12691 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
12692 (REDUCTIONS_ALLOC): New.
12693 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
12694 allocation.
12695
12696 2001-11-19 Akim Demaille <akim@epita.fr>
12697
12698 * src/LR0.c (new_state): Complete trace code.
12699 * src/nullable.c (set_nullable): Don't translate traces.
12700
12701 2001-11-19 Akim Demaille <akim@epita.fr>
12702
12703 * src/print_graph.c (print_core): Better locality of variables.
12704 * src/print.c (print_core): Likewise.
12705
12706 2001-11-19 Akim Demaille <akim@epita.fr>
12707
12708 * src/vcg.c: You do the output, so you are responsible of the
12709 handling of VCG syntax, in particular: use quotearg.
12710 * src/print_graph.c: Don't.
12711 (print_actions): Don't output the actions as part of the nodes,
12712 since that's the job of the edges.
12713 (print_state): Don't output by hand: fill the node description,
12714 and ask for its output.
12715
12716 2001-11-19 Akim Demaille <akim@epita.fr>
12717
12718 * src/bison.simple (yyparse): When verbosely reporting an error,
12719 no longer put additional quotes around token names.
12720 * tests/calc.at: Adjust.
12721
12722 2001-11-19 Akim Demaille <akim@epita.fr>
12723
12724 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
12725 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
12726 * src/output.c: Adjust.
12727
12728 2001-11-19 Akim Demaille <akim@epita.fr>
12729
12730 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
12731 (rule_t): this.
12732 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
12733
12734 2001-11-19 Akim Demaille <akim@epita.fr>
12735
12736 * src/gram.h (rule_t): New.
12737 (rule_table): New.
12738 (rrhs, rlhs): Remove, part of state_t.
12739 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
12740 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12741 * src/reader.c, src/reduce.c: Adjust.
12742
12743 2001-11-19 Akim Demaille <akim@epita.fr>
12744
12745 * src/reader.c (symbols_output): New, extracted from...
12746 (packsymbols): Here.
12747 (reader): Call it.
12748
12749 2001-11-19 Akim Demaille <akim@epita.fr>
12750
12751 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
12752 (maxrhs): this new function.
12753
12754 2001-11-19 Akim Demaille <akim@epita.fr>
12755
12756 * src/lalr.c (F): New macro to access the variable F.
12757 Adjust.
12758
12759 2001-11-19 Akim Demaille <akim@epita.fr>
12760
12761 * src/lalr.h (LA): New macro to access the variable LA.
12762 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12763 * src/lalr.c: Adjust.
12764
12765 2001-11-19 Akim Demaille <akim@epita.fr>
12766
12767 * src/lalr.c (initialize_LA): Only initialize LA. Let...
12768 (set_state_table): handle the `lookaheads' members.
12769
12770 2001-11-19 Akim Demaille <akim@epita.fr>
12771
12772 * src/lalr.h (lookaheads): Removed array, whose contents is now
12773 a member of...
12774 (state_t): this structure.
12775 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12776 Adjust.
12777
12778 2001-11-19 Akim Demaille <akim@epita.fr>
12779
12780 * src/lalr.h (consistent): Removed array, whose contents is now
12781 a member of...
12782 (state_t): this structure.
12783 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12784 Adjust.
12785
12786 2001-11-19 Akim Demaille <akim@epita.fr>
12787
12788 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
12789 contents are now members of...
12790 (state_t): this structure.
12791 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12792 Adjust.
12793
12794 2001-11-19 Akim Demaille <akim@epita.fr>
12795
12796 * src/lalr.h (state_t): New.
12797 (state_table): Be a state_t * instead of a core **.
12798 (accessing_symbol): Remove, part of state_t.
12799 * src/lalr.c: Adjust.
12800 (set_accessing_symbol): Merge into...
12801 (set_state_table): this.
12802 * src/print_graph.c, src/conflicts.c: Adjust.
12803
12804 2001-11-14 Akim Demaille <akim@epita.fr>
12805
12806 * tests/calc.at, tests/output.at, tests/regression.at,
12807 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
12808 now the tests are run in private dirs, therefore AC_CLEANUP and
12809 family can be simplified to 0-ary.
12810 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
12811 use abs. path to find config.h.
12812 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
12813 stderr, there can be way too much random noise.
12814 Instead pass -Werror to GCC and rely on the exit status.
12815 Reported by Wolfram Wagner.
12816
12817 2001-11-14 Akim Demaille <akim@epita.fr>
12818
12819 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
12820 defined only if yyoverflow is defined, to avoid `warning: unused
12821 variable `yyvs1''.
12822 Reported by The Test Suite.
12823
12824 2001-11-14 Akim Demaille <akim@epita.fr>
12825
12826 * src/print.c: Include reduce.h.
12827 Reported by Hans Aberg.
12828
12829 2001-11-14 Akim Demaille <akim@epita.fr>
12830
12831 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
12832 Revert a previous patch: these are really const.
12833 * src/conflicts.c (conflict_report): Additional useless pair of
12834 braces to pacify GCC's warnings for `if () if () {} else {}'.
12835 * src/lex.c (parse_percent_token): Replace equal_offset with
12836 arg_offset.
12837 arg is const.
12838 Be sure to strdup `arg' when used, since there is no reason for
12839 token_buffer not to change.
12840
12841 2001-11-14 Akim Demaille <akim@epita.fr>
12842
12843 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
12844 definition.
12845 * src/main.c (main): Use them.
12846 Suggested by Hans Aberg.
12847
12848 2001-11-12 Akim Demaille <akim@epita.fr>
12849
12850 * src/system.h (ngettext): Now that we use ngettext, be sure to
12851 provide a default definition when NLS are not used.
12852
12853 2001-11-12 Akim Demaille <akim@epita.fr>
12854
12855 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
12856 Use @kbd to denote user input.
12857 (Language and Grammar): ANSIfy the example.
12858 Adjust its layout for info/notinfo.
12859 (Location Tracking Calc): Output error messages to stderr.
12860 Output locations in a more GNUtically correct way.
12861 Fix a couple of Englishos.
12862 Adjust @group/@end group pairs.
12863
12864 2001-11-12 Akim Demaille <akim@epita.fr>
12865
12866 %expect was not functioning at all.
12867
12868 * src/conflicts.c (expected_conflicts): Set to -1.
12869 (conflict_report): Use ngettext.
12870 (conflicts_print): Check %expect and make its violation an error.
12871 * doc/bison.texinfo (Expect Decl): Adjust.
12872 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
12873 * tests/regression.at (%expect not enough, %expect right)
12874 (%expect too much): New.
12875
12876 2001-11-12 Akim Demaille <akim@epita.fr>
12877
12878 * tests/regression.at (Conflicts): Rename as...
12879 (Unresolved SR Conflicts): this.
12880 (Solved SR Conflicts): New.
12881
12882 2001-11-12 Akim Demaille <akim@epita.fr>
12883
12884 * src/reduce.c (print_results): Rename as...
12885 (reduce_output): This.
12886 Output to OUT, passed as argument, instead of output_obstack.
12887 (dump_grammar): Likewise.
12888 (reduce_free): New.
12889 Also free V1.
12890 (reduce_grammar): No longer call reduce_output, since...
12891 * src/print.c (print_results): do it.
12892 * src/main.c (main): Call reduce_free;
12893
12894 2001-11-12 Akim Demaille <akim@epita.fr>
12895
12896 * src/conflicts.c (print_reductions): Accept OUT as argument.
12897 Output to it, not to output_obstack.
12898 * src/print.c (print_actions): Adjust.
12899
12900 2001-11-12 Akim Demaille <akim@epita.fr>
12901
12902 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
12903 the result instead of using...
12904 (src_total, rrc_total, src_count, rrc_count): Remove.
12905 (any_conflicts): Remove.
12906 (print_conflicts): Split into...
12907 (conflicts_print, conflicts_output): New.
12908 * src/conflicts.h: Adjust.
12909 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
12910 * src/print.c (print_grammar): Issue `\n' between two rules.
12911 * tests/regression.at (Conflicts): New.
12912 Reported by Tom Lane.
12913
12914 2001-11-12 Akim Demaille <akim@epita.fr>
12915
12916 * tests/regression.at (Invalid input): Remove, duplicate with
12917 ``Invalid input: 1''.
12918
12919 2001-11-12 Akim Demaille <akim@epita.fr>
12920
12921 * tests/torture.at (AT_DATA_STACK_TORTURE)
12922 (Exploding the Stack Size with Alloca)
12923 (Exploding the Stack Size with Malloc): New.
12924
12925 2001-11-12 Akim Demaille <akim@epita.fr>
12926
12927 * src/bison.simple (YYSTACK_REALLOC): New.
12928 (yyparse) [!yyoverflow]: Use it and free the old stack.
12929 Reported by Per Allansson.
12930
12931 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
12932
12933 * src/bison.simple: Define type yystype instead of YYSTYPE, and
12934 define CPP macro, which substitute YYSTYPE by yystype.
12935 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
12936 with yyltype/YYLTYPE. This allows inclusion of the generated
12937 header within the parser if the compiler, such as GGC, accepts
12938 multiple equivalent #defines.
12939 From Akim.
12940
12941 2001-11-05 Akim Demaille <akim@epita.fr>
12942
12943 * src/reader.c (symbols_output): New, extracted from...
12944 (packsymbols): here.
12945 (reader): Adjust.
12946
12947 2001-11-05 Akim Demaille <akim@epita.fr>
12948
12949 * src/lex.c (parse_percent_token): s/quotearg/quote/.
12950
12951 2001-11-05 Akim Demaille <akim@epita.fr>
12952
12953 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
12954 pattern.
12955
12956 2001-11-05 Akim Demaille <akim@epita.fr>
12957
12958 * src/options.h (struct option_table_struct): set_flags is void*.
12959 * src/options.c (longopts): Support `--output' and `%output'.
12960 (usage): Adjust.
12961 * src/lex.h (tok_setopt): Remove, replaced with...
12962 (tok_intopt, tok_stropt): these new guys.
12963 * src/lex.c (getopt.h): Not needed.
12964 (token_buffer, unlexed_token_buffer): Not const.
12965 (percent_table): Promote `-' over `_' in directive names.
12966 Active `%name-prefix', `file-prefix', and `output'.
12967 (parse_percent_token): Accept possible arguments to directives.
12968 Promote `-' over `_' in directive names.
12969
12970 2001-11-04 Akim Demaille <akim@epita.fr>
12971
12972 * doc/bison.texinfo (Decl Summary): Split the list into
12973 `directives for grammars' and `directives for bison'.
12974 Sort'em.
12975 Add description of `%name-prefix', `file-prefix', and `output'.
12976 Promote `-' over `_' in directive names.
12977 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
12978 Simplify the description of `--name-prefix'.
12979 Promote `-' over `_' in directive names.
12980 Promote `--output' over `--output-file'.
12981 Fix the description of `--defines'.
12982 * tests/output.at: Exercise %file-prefix and %output.
12983
12984 2001-11-02 Akim Demaille <akim@epita.fr>
12985
12986 * doc/refcard.tex: Update.
12987
12988 2001-11-02 Akim Demaille <akim@epita.fr>
12989
12990 * src/symtab.h (SUNDEF): New.
12991 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
12992 stand for `uninitialized', instead of 0.
12993 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
12994 * src/lex.c (lex): Adjust.
12995
12996 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
12997 Number it 0.
12998 Let yylex return it instead of a plain 0.
12999 Reported by Dick Streefland.
13000
13001 2001-11-02 Akim Demaille <akim@epita.fr>
13002
13003 * tests/regression.at (Mixing %token styles): New test.
13004
13005 2001-11-02 Akim Demaille <akim@epita.fr>
13006
13007 * src/reader.c (parse_thong_decl): Formatting changes.
13008 (token_translations_init): New, extracted from...
13009 (packsymbols): Here.
13010 Adjust.
13011
13012 2001-11-01 Akim Demaille <akim@epita.fr>
13013
13014 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13015 Check that `9foo.y' produces correct cpp guards.
13016 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13017 guards.
13018 Reported by Wwp.
13019
13020 2001-11-01 Akim Demaille <akim@epita.fr>
13021
13022 * tests/regression.at (Invalid input: 2): New.
13023 * src/lex.c (unlexed_token_buffer): New.
13024 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13025 too.
13026 Reported by Wwp.
13027
13028 2001-11-01 Akim Demaille <akim@epita.fr>
13029
13030 * tests/calc.at: Catch up with 1.30.
13031 * configure.in: Bump to 1.49a.
13032 Adjust to newer Autotest.
13033
13034 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
13035
13036 * src/conflicts.c: Move global variables rrc_total and src_total ...
13037 (print_conflicts): here.
13038 * src/output.c (output): Free global variable user_toknums.
13039 * src/lex.c (token_obstack): Become static.
13040
13041 2001-10-18 Akim Demaille <akim@epita.fr>
13042
13043 * tests/atlocal.in (GCC): Add.
13044 * tests/calc.at: s/m4_match/m4_bmatch/.
13045 s/m4_patsubst/m4_bpatsubst/.
13046 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13047 * configure.in: AC_SUBST(GCC).
13048
13049 2001-10-14 Marc Autret <autret_m@epita.fr>
13050
13051 * src/options.c (create_long_option_table): Fix.
13052
13053 2001-10-10 Akim Demaille <akim@epita.fr>
13054
13055 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13056
13057 2001-10-04 Akim Demaille <akim@epita.fr>
13058
13059 * src/reader.c (parse_union_decl): Push the caracters in
13060 union_obstack, not attrs_obstack.
13061
13062 2001-10-04 Akim Demaille <akim@epita.fr>
13063
13064 Merge in the branch 1.29.
13065
13066 * src/reader.c (packsymbols): Use a temporary obstack for
13067 `%%tokendef', since output_stack is already used elsewhere.
13068
13069 2001-10-02 Akim Demaille <akim@epita.fr>
13070
13071 Bump 1.29d.
13072
13073 2001-10-02 Akim Demaille <akim@epita.fr>
13074
13075 Version 1.29c.
13076
13077 2001-10-02 Akim Demaille <akim@epita.fr>
13078
13079 * tests/regression.at (Invalid CPP headers): New.
13080 From Alexander Belopolsky.
13081 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
13082
13083 2001-10-02 Akim Demaille <akim@epita.fr>
13084
13085 * tests/regression.at (Invalid input): New.
13086 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
13087 Reported by Shura.
13088
13089 2001-10-02 Akim Demaille <akim@epita.fr>
13090
13091 * tests/calc.at: Now that --debug works, the tests must be adjusted.
13092
13093 2001-10-02 Akim Demaille <akim@epita.fr>
13094
13095 * src/output.c (output_parser): Assert `skeleton'.
13096 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
13097 systems.
13098 From Shura.
13099
13100 2001-10-01 Marc Autret <autret_m@epita.fr>
13101
13102 * src/lex.h: Echo modifications.
13103 * src/lex.c (unlex): Parameter is now token_t.
13104 From Hans Aberg.
13105
13106 2001-10-01 Marc Autret <autret_m@epita.fr>
13107
13108 * src/main.c: Include lex.h.
13109 From Hans Aberg.
13110
13111 2001-09-29 Akim Demaille <akim@epita.fr>
13112
13113 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
13114
13115 2001-09-28 Akim Demaille <akim@epita.fr>
13116
13117 * tests/testsuite.at: Update to newer Autotest.
13118 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
13119
13120 2001-09-27 Akim Demaille <akim@epita.fr>
13121
13122 Position independent wrapper.
13123
13124 * tests/bison: Remove.
13125 * tests/bison.in: New.
13126 * configure.in: Adjust.
13127
13128 2001-09-27 Paul Eggert <eggert@twinsun.com>
13129
13130 Port quotearg fixes from tar 1.13.24.
13131
13132 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
13133 tm to be declared.
13134 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
13135 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
13136
13137 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
13138 * m4/mbrtowc.m4: New file.
13139 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
13140 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
13141
13142 2001-09-27 Akim Demaille <akim@epita.fr>
13143
13144 Bump to 1.29c.
13145
13146 2001-09-27 Akim Demaille <akim@epita.fr>
13147
13148 Version 1.29b.
13149
13150 2001-09-25 Akim Demaille <akim@epita.fr>
13151
13152 * src/system.h: Include `xalloc.h'.
13153 Remove it from the C files.
13154 * src/files.c (output_files): Free the obstacks.
13155 * src/lex.c (init_lex): Rename as...
13156 (lex_init): this.
13157 (lex_free): New.
13158 * src/main.c (main): Use it.
13159
13160 2001-09-24 Marc Autret <autret_m@epita.fr>
13161
13162 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
13163 to output informations in fout (FILE*).
13164 (open_graph, close_graph): Likewise.
13165 (output_graph, output_edge, output_node): Likewise.
13166 * src/vcg.h: Update function prototypes.
13167 * src/print_graph.c (print_graph): Open output graph file.
13168 (print_actions): Adjust.
13169 * src/files.h: Remove extern declaration.
13170 * src/files.c: Remove graph_obstack declaration.
13171 (open_files): Remove graph_obstack initialization.
13172 (output_files): Remove graph_obstack saving.
13173
13174 2001-09-24 Marc Autret <autret_m@epita.fr>
13175
13176 * src/files.c (compute_output_file_names): Fix.
13177
13178 2001-09-24 Marc Autret <autret_m@epita.fr>,
13179 Akim Demaille <akim@epita.fr>
13180
13181 * src/reader.c (reader): Remove call to free_symtab ().
13182 * src/main.c (main): Call it here.
13183 Include symtab.h.
13184 * src/conflicts.c (initialize_conflicts): Rename as...
13185 (solve_conflicts): this.
13186 * src/print.c (print_core, print_actions, print_state)
13187 (print_grammar): Dump to a file instead a `output_obstack'.
13188 (print_results): Dump `output_obstack', and then proceed with the
13189 FILE *.
13190 * src/files.c (compute_output_file_names, close_files): New.
13191 (output_files): Adjust.
13192 * src/main.c (main): Adjust.
13193
13194 2001-09-23 Marc Autret <autret_m@epita.fr>
13195
13196 * src/files.c (compute_header_macro): Computes header macro name
13197 from spec_defines_file when given.
13198
13199 2001-09-23 Marc Autret <autret_m@epita.fr>
13200
13201 * src/files.c (output_files): Add default extensions.
13202
13203 2001-09-22 Akim Demaille <akim@epita.fr>
13204
13205 * src/conflicts.c (finalize_conflicts): Rename as...
13206 (free_conflicts): this.
13207
13208 2001-09-22 Akim Demaille <akim@epita.fr>
13209
13210 * src/gram.c (gram_free): Rename back as...
13211 (dummy): this.
13212 (output_token_translations): Free `token_translations'.
13213 * src/symtab.c (free_symtab): Free the tag field.
13214
13215 2001-09-22 Akim Demaille <akim@epita.fr>
13216
13217 Remove `translations' as it is always set to true.
13218
13219 * src/gram.h: Adjust.
13220 * src/reader.c (packsymbols, parse_token_decl): Adjust
13221 * src/print.c (print_grammar): Adjust.
13222 * src/output.c (output_token_translations): Adjust.
13223 * src/lex.c (lex): Adjust.
13224 * src/gram.c: Be sure the set pointers to NULL.
13225 (dummy): Rename as...
13226 (gram_free): this.
13227
13228 2001-09-22 Akim Demaille <akim@epita.fr>
13229
13230 * configure.in: Invoke AM_LIB_DMALLOC.
13231 * src/system.h: Use dmalloc.
13232 * src/LR0.c: Be sure to have pointers initialized to NULL.
13233 (allocate_itemsets): Allocate kernel_items only if needed.
13234
13235 2001-09-22 Akim Demaille <akim@epita.fr>
13236
13237 * configure.in: Bump to 1.29b.
13238 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13239 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13240 need xmalloc.c in calc.y.
13241 From Pascal Bart.
13242
13243 2001-09-21 Akim Demaille <akim@epita.fr>
13244
13245 Version 1.29a.
13246 * Makefile.maint, config/config.guess, config/config.sub,
13247 * config/missing: Update from masters.
13248 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13249 upon package.m4.
13250 * configure.in (ALL_LINGUAS): Add `tr'.
13251
13252 2001-09-21 Akim Demaille <akim@epita.fr>
13253
13254 * tests/Makefile.am (package.m4): Move to...
13255 ($(srcdir)/$(TESTSUITE)): here.
13256
13257 2001-09-20 Akim Demaille <akim@epita.fr>
13258
13259 * src/complain.c: No longer try to be standalone: use system.h.
13260 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13261 * src/complain.h: Likewise.
13262 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13263 Remove the unused variable `n'.
13264 From Albert Chin-A-Young.
13265
13266 2001-09-18 Marc Autret <autret_m@epita.fr>
13267
13268 * doc/bison.1: Update.
13269 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13270 descriptions.
13271 (Option Cross Key): Update.
13272 Add --graph.
13273
13274 2001-09-18 Marc Autret <autret_m@epita.fr>
13275
13276 * tests/regression.at: New test (comment in %union).
13277
13278 2001-09-18 Marc Autret <autret_m@epita.fr>
13279
13280 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
13281 do that.
13282 Reported by Keith Browne.
13283
13284 2001-09-18 Marc Autret <autret_m@epita.fr>
13285
13286 * tests/output.at: Add tests for --defines and --graph.
13287
13288 2001-09-18 Marc Autret <autret_m@epita.fr>
13289
13290 * tests/output.at: Removes tests of %{header,src}_extension features.
13291
13292 2001-09-18 Akim Demaille <akim@epita.fr>
13293
13294 * tests/Makefile.am (package.m4): New.
13295 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
13296 (_AT_CHECK_CALC_ERROR): Likewise.
13297 Factor the `, ' part of verbose error messages.
13298
13299 2001-09-18 Marc Autret <autret_m@epita.fr>
13300
13301 * src/getargs.c (longopts): Declare --defines and --graph as options
13302 with optional arguments.
13303 * src/files.h: Add extern declarations.
13304 * src/files.c (spec_graph_file, spec_defines_file): New.
13305 (output_files): Update.
13306 Remove CPP-outed code.
13307
13308 2001-09-18 Marc Autret <autret_m@epita.fr>
13309
13310 Turn off %{source,header}_extension feature.
13311
13312 * src/files.c (compute_exts_from_gf): Update.
13313 (compute_exts_from_src): Update.
13314 (output_files): CPP-out useless code.
13315 * src/files.h: Remove {header,source}_extension extern declarations.
13316 * src/reader.c (parse_dquoted_param): CPP-out.
13317 (parse_header_extension_decl): Remove.
13318 (parse_source_extension_decl): Remove.
13319 (read_declarations): Remove cases tok_{hdrext,srcext}.
13320 * src/lex.c (percent_table): Remove {header,source}_extension entries.
13321 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
13322
13323 2001-09-10 Akim Demaille <akim@epita.fr>
13324
13325 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
13326 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
13327 (AT_CHECK_OUTPUT): this.
13328 Merely check ls' exit status, its output is useless.
13329
13330 2001-09-10 Akim Demaille <akim@epita.fr>
13331
13332 * tests/calc.at: Use m4_match.
13333 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
13334
13335 2001-09-10 Marc Autret <autret_m@epita.fr>,
13336 Akim Demaille <akim@epita.fr>
13337
13338 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
13339 enum color_e.
13340 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
13341 to `normal'.
13342 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
13343 * src/lex.h: Adjust prototype.
13344 (token_t): Add `tok_undef'.
13345 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
13346 (parse_percent_token): Now returns token_t.
13347 Add default statement in switch.
13348 (lex): Separate `c' as an input variable, from the token_t result
13349 part.
13350 (unlexed): Is a token_t.
13351
13352 2001-09-10 Akim Demaille <akim@epita.fr>
13353
13354 * configure.in: Bump to 1.29a.
13355
13356 2001-09-07 Akim Demaille <akim@epita.fr>
13357
13358 Version 1.29.
13359
13360 2001-08-30 Akim Demaille <akim@epita.fr>
13361
13362 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
13363 * m4/atconfig.m4: Remove.
13364 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
13365 * tests/bison: New.
13366 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
13367 m4_if, m4_patsubst, and m4_regexp.
13368 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
13369 `input' file instead of echo.
13370
13371 2001-08-29 Akim Demaille <akim@epita.fr>
13372
13373 Bump to 1.28e.
13374
13375 2001-08-29 Akim Demaille <akim@epita.fr>
13376
13377 Version 1.28d.
13378
13379 2001-08-29 Paul Eggert <eggert@twinsun.com>
13380
13381 * src/bison.simple (yyparse): Don't take the address of an
13382 item before the start of an array, as that doesn't conform to
13383 the C Standard.
13384
13385 2001-08-29 Robert Anisko <anisko_r@epita.fr>
13386
13387 * doc/bison.texinfo (Location Tracking Calc): New node.
13388
13389 2001-08-29 Paul Eggert <eggert@twinsun.com>
13390
13391 * src/output.c (output): Do not define const, as this now
13392 causes more problems than it cures.
13393
13394 2001-08-29 Akim Demaille <akim@epita.fr>
13395
13396 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
13397 the nodes.
13398 Be sure to tag the `detailmenu'.
13399
13400 2001-08-29 Akim Demaille <akim@epita.fr>
13401
13402 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
13403 download in a tmp dir.
13404
13405 2001-08-28 Marc Autret <autret_m@epita.fr>
13406
13407 * config/depcomp: New file.
13408
13409 2001-08-28 Marc Autret <autret_m@epita.fr>
13410
13411 * doc/bison.1 (mandoc): Adjust.
13412 From Juan Manuel Guerrero.
13413
13414 2001-08-28 Marc Autret <autret_m@epita.fr>
13415
13416 * src/print_graph.c (print_state): Fix.
13417
13418 2001-08-27 Marc Autret <autret_m@epita.fr>
13419
13420 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
13421 char * members.
13422 Echo modifications to the functions prototypes.
13423 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
13424
13425 2001-08-27 Marc Autret <autret_m@epita.fr>
13426
13427 * src/vcg.c: Include `xalloc.h'.
13428 (add_colorentry): New.
13429 (add_classname): New.
13430 (add_infoname): New.
13431 * src/vcg.h: Add new prototypes.
13432
13433 2001-08-27 Akim Demaille <akim@epita.fr>
13434
13435 * Makefile.maint: Sync. again with CVS Autoconf.
13436
13437 2001-08-27 Akim Demaille <akim@epita.fr>
13438
13439 * Makefile.maint: Formatting changes.
13440 (po-update, cvs-update, update): New targets.
13441 (AMTAR): Remove.
13442
13443 2001-08-27 Akim Demaille <akim@epita.fr>
13444
13445 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13446 * Makefile.maint: Sync. with CVS Autoconf.
13447
13448 2001-08-27 Marc Autret <autret_m@epita.fr>
13449
13450 * src/vcg.h (struct infoname_s): New.
13451 (struct colorentry_s): New.
13452 (graph_s): New fields {vertical,horizontal}_order in structure.
13453 Add `infoname' field.
13454 Add `colorentry' field;
13455 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
13456 (G_HORIZONTAL_ORDER): New.
13457 (G_INFONAME): New.
13458 (G_COLORENTRY): New.
13459 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
13460 Add output of `infoname'.
13461 Add output of `colorentry'.
13462
13463 2001-08-27 Marc Autret <autret_m@epita.fr>
13464
13465 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
13466 This one shadowed a global parameter.
13467
13468 2001-08-24 Marc Autret <autret_m@epita.fr>
13469
13470 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
13471 instead of `unsigned'.
13472 (print_state): Do not call obstack_object_size () in obstack_grow ()
13473 to avoid macro variables shadowing.
13474
13475 2001-08-23 Marc Autret <autret_m@epita.fr>
13476
13477 * src/lex.c (percent_table): Typo: s/naem/name/.
13478 Add graph option.
13479 Normalize new options declarations.
13480
13481 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
13482
13483 * tests/suite.at: Exercise %header_extension and %source_extension.
13484
13485 2001-08-16 Marc Autret <autret_m@epita.fr>
13486
13487 * src/reader.c (parse_dquoted_param): New.
13488 (parse_header_extension_decl): Use it.
13489 (parse_source_extension_decl): Likewise.
13490
13491 2001-08-16 Marc Autret <autret_m@epita.fr>
13492
13493 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
13494 (get_xxxx_str): Use assert () instead of complain ().
13495 Remove return invokations in default cases.
13496 (get_decision_str): Modify default behaviour. Remove second argument.
13497 Echo modifications on calls.
13498 (output_graph): Fix.
13499
13500 2001-08-16 Marc Autret <autret_m@epita.fr>
13501
13502 * src/getargs.c (usage): Update with ``-g, --graph''.
13503
13504 2001-08-16 Marc Autret <autret_m@epita.fr>
13505
13506 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
13507 (Option Cross Key): Likewise.
13508 * doc/bison.1: Update.
13509
13510 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
13511
13512 * src/output.c (output_master_parser): Don't finish action_obstack.
13513 (output_parser): Don't care about the muscle action, here.
13514 (prepare): Copy the action_obstack in the action muscle.
13515 (output): Free action_obstack.
13516
13517 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
13518
13519 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
13520 will contain `%union' declaration.
13521 (parse_union_decl): Delete #line directive output.
13522 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
13523 informations about %union.
13524 (parse_union_decl): Copy the union_obstack in the muscle stype.
13525 * src/bison.simple: Add new #line directive.
13526 Add typdef %%stype YYSTYPE.
13527
13528 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
13529
13530 * src/bison.simple: Add new `#line' directive.
13531
13532 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
13533
13534 * src/bison.simple: New `#line' directive.
13535 * src/output.c (output_parser): Support new dynamic muscle input_line.
13536
13537 2001-09-22 Marc Autret <autret_m@epita.fr>
13538
13539 * src/output.c (output_master_parser): New.
13540 (output_parser): Be more re-entrant.
13541
13542 2001-09-21 Marc Autret <autret_m@epita.fr>
13543
13544 * src/reader.c (copy_definition, parse_union_decl): Update and use
13545 `linef' muscle.
13546 (copy_action): Likewise.
13547 Use obstack_1grow ().
13548 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
13549
13550 2001-09-21 Marc Autret <autret_m@epita.fr>
13551
13552 * src/options.c (option_table): Adjust.
13553 * src/lex.c (parse_percent_token): Fix.
13554
13555 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
13556
13557 * src/options.c (symtab.h): Include it, need by lex.h.
13558
13559 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
13560
13561 * src/lex.c (parse_percent_token): Change type of variable `tx', which
13562 is now an option_table_struct*.
13563 (option_strcmp): New function option_strcmp.
13564 (parse_percent_token): Call option_strcmp.
13565 * src/getargs.c (xalloc.h, options.h): Include it.
13566 (getargs): Call create_long_option_table.
13567 (getargs): Free longopts at the end of the function.
13568 (shortopts): Move in options.c.
13569 * src/options.c (create_long_option_table): New function. Convert
13570 information from option_table to option structure.
13571 * src/reader.c (options.h): Include it.
13572
13573 * src/Makefile.am: Adjust.
13574 * src/options.c (option_table): Create from longopts and percent_table.
13575 * src/getargs.c (longopts): Delete.
13576 * src/lex.c (struct percent_table_struct): Delete.
13577 (percent_table): Delete.
13578 (options.h): Include it.
13579 * src/options.c: Create.
13580 * src/options.h: Create.
13581 Declare enum opt_access_e.
13582 Define struct option_table_struct.
13583
13584 2001-09-20 Marc Autret <autret_m@epita.fr>
13585
13586 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
13587 sections of Bison.
13588
13589 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
13590
13591 * src/bison.simple: s/%%filename/%%skeleton.
13592 * src/muscle_tab.c (getargs.h): Include it.
13593 (muscle_init): Insert new muscle skeleton.
13594
13595 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
13596
13597 * src/output.c (output_parser): Delete unused variable actions_dumped.
13598
13599 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
13600
13601 * src/output.c (output): Delete call to reader_output_yylsp.
13602 * src/reader.c (reader): Likewise.
13603 * src/reader.h: Delete declaration of reader_output_yylsp.
13604
13605 2001-09-02 Marc Autret <autret_m@epita.fr>
13606
13607 * src/reader.c: Include muscle_tab.h.
13608 (parse_union_decl): Update.
13609 (parse_macro_decl): Rename parse_muscle_decl.
13610 Update to use renamed functions and variable.
13611 (read_declarations, copy_action, read_additionnal_code, : Updated
13612 with correct variables and functions names.
13613 (packsymbols, reader): Likewise.
13614
13615 * src/reader.h (muscle_obstack): Extern declaration update.
13616
13617 * src/output.c: Include muscle_tab.h
13618 In all functions using macro_insert, change by using muscle_insert ().
13619 (macro_obstack): Rename muscle_obstack.
13620 Echo modifications in the whole file.
13621 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
13622 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
13623 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
13624
13625 * src/muscle_tab.h: Update double inclusion macros.
13626 (macro_entry_s): Rename muscle_entry_s.
13627 Update prototypes.
13628
13629 * src/muscle_tab.c: Include muscle_tab.h.
13630 Rename macro_tabble to muscle_table.
13631 (mhash1, mhash2, mcmp): Use muscle_entry.
13632 (macro_init): Rename muscle_init. Update.
13633 (macro_insert): Rename muscle_insert. Update.
13634 (macro_find): Rename muscle_find. Update.
13635
13636 * src/main.c: Include muscle_tab.h.
13637 (main): Call muscle_init ().
13638 * src/Makefile.am (bison_SOURCES): Echo modifications.
13639
13640 2001-09-02 Marc Autret <autret_m@epita.fr>
13641
13642 Now the files macro_tab.[ch] are named muscle_tab.[ch].
13643
13644 * src/muscle_tab.c, src/muscle_tab.h: Add files.
13645
13646 2001-09-02 Marc Autret <autret_m@epita.fr>
13647
13648 * src/macrotab.c, src/macrotab.h: Remove.
13649
13650 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
13651
13652 * src/reader.c (copy_guard): Use muscle to specify the `#line'
13653 filename.
13654
13655 2001-09-01 Marc Autret <autret_m@epita.fr>
13656
13657 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
13658 to an explicit value to activate the feature. We do it here.
13659
13660 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13661
13662 * src/output.c (prepare): Delete the `filename' muscule insertion.
13663 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
13664 (parse_union_decl): Likewise.
13665 * src/macrotab.c (macro_init): Initialize filename by infile.
13666
13667 2001-08-31 Marc Autret <autret_m@epita.fr>
13668
13669 * src/bison.simple (YYLSP_NEEDED): New definition.
13670 * src/output.c (prepare): Add macro insertion of `locations_flag'
13671
13672 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13673
13674 * src/output.c (prepare): Delete insertion of previous muscles,
13675 and insert the `prefix' muscles.
13676 * src/macrotab.c (macro_init): Likewise.
13677 (macro_init): Initialization prefix directive by `yy'.
13678 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
13679 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
13680 yylval, yydebug, yyerror, yynerrs and yyparse.
13681 New directive `#define' to substitute yydebug, ... with option
13682 name_prefix.
13683
13684 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13685
13686 * src/main.c (main): Standardize.
13687 * src/output.c (output_table_data, output_parser): Likewise.
13688 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
13689
13690 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
13691
13692 * src/reader.c (read_additionnal_code): Rename %%user_code to
13693 %%epilogue.
13694 * src/output.c (output): Rename %%declarations to %%prologue.
13695 * src/bison.simple: Echo modifications.
13696
13697 2001-08-31 Marc Autret <autret_m@epita.fr>
13698
13699 * src/reader.c (readgram): CleanUp.
13700 (output_token_defines): Likewise.
13701 (packsymbols): Likewise.
13702 (reader): Likewise.
13703 * src/output.c (output): CPP-out useless code.
13704
13705 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13706
13707 * src/reader.c (reader): Delete obsolete call to function
13708 output_trailers and output_headers.
13709 * src/output.h: Remove obsolete functions prototypes of output_headers
13710 and output_trailers.
13711
13712 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
13713
13714 * src/main.c: Include macrotab.h.
13715 * src/macrotab.h (macro_entry_s): Constify fields.
13716 Adjust functions prototypes.
13717 * src/macrotab.c (macro_insert): Constify key and value.
13718 (macro_find): Constify key.
13719 (macro_insert): Include 'xalloc.h'
13720 (macro_insert): Use XMALLOC.
13721 (macro_find): Constify return value.
13722 * src/output.c (output_table_data): Rename table to table_data.
13723 (output_parser): Constify macro_key, macro_value.
13724
13725 2001-08-30 Marc Autret <autret_m@epita.fr>
13726
13727 * src/reader.c (parse_skel_decl): New.
13728 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
13729 * src/lex.h (token_t): New token `tok_skel'.
13730 * src/lex.c (percent_table): Add skeleton option entry.
13731 Standardize.
13732
13733 2001-08-29 Marc Autret <autret_m@epita.fr>
13734
13735 * src/bison.simple: Add %%user_code directive at the end.
13736 * src/reader.c (read_additionnal_code): New.
13737 (reader): Use it.
13738 * src/output.c (output_program): Remove.
13739 (output): Update.
13740
13741 2001-08-28 Marc Autret <autret_m@epita.fr>
13742
13743 * src/output.c (output_actions): Clean up.
13744 (output_gram): CPP-out useless code.
13745 * src/reader.c (reader): Clean up, CPP-out useless code.
13746
13747 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
13748
13749 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
13750 directive.
13751 * src/bison.simple: Add `%%definitions'.
13752
13753 2001-08-28 Marc Autret <autret_m@epita.fr>
13754
13755 * config/depcomp: New file.
13756
13757 2001-08-27 Paul Eggert <eggert@twinsun.com>
13758
13759 * src/bison.simple (yyparse): Don't take the address of an
13760 item before the start of an array, as that doesn't conform to
13761 the C Standard.
13762
13763 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
13764
13765 * src/output.c (output): Remove the initialization of the macro
13766 obstack. It was done too late here.
13767
13768 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
13769 completely wrong.
13770 (reader): Initialize the macro obstack here, since we need it to grow
13771 '%define' directives.
13772
13773 * src/reader.h: Declare the macro obstack as extern.
13774
13775 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
13776
13777 * src/output.c (output_parser): Fix. Store single '%' characters in
13778 the output obstack instead of throwing them away.
13779
13780 2001-08-27 Akim Demaille <akim@epita.fr>
13781
13782 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13783
13784 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13785
13786 * lib/Makefile.am: Adjust.
13787
13788 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13789
13790 * src/bison.simple: Update and add '%%' directives.
13791
13792 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13793
13794 * src/reader.c (reader): Remove calls to 'output_headers' and
13795 'output_trailers'. Remove some C output.
13796 (readgram): Disable a piece of code that was writing a default
13797 definition for 'YYSTYPE'.
13798 (reader_output_yylsp): Remove.
13799 (packsymbols): Output token defintions to a macro.
13800 (copy_definition): Disable C output.
13801
13802 * src/reader.c (parse_macro_decl): New function used to parse macro
13803 declarations.
13804 (copy_string2): Put the body of copy_string into this new function.
13805 Add a parameter to let the caller choose whether he wants to copy the
13806 string delimiters or not.
13807 (copy_string): Be a simple call to copy_string2 with the last argument
13808 bound to true.
13809 (read_declarations): Add case for macro definition.
13810 (copy_identifier): New.
13811 (parse_macro_decl): Read macro identifiers using copy_identifier
13812 rather than lex.
13813
13814 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13815
13816 * src/output.c (prepare): Add prefixed names.
13817 (output_parser): Output semantic actions.
13818 (output_parser): Fix bug on '%%line' directives.
13819
13820 * src/output.c (output_headers): Remove. The C code printed by this
13821 function should now be in the skeletons.
13822 (output_trailers): Remove.
13823 (output): Disable call to 'reader_output_yylsp'.
13824 (output_rule_data): Do not output tables to the table obstack.
13825
13826 * src/output.c: Remove some C dedicated output.
13827 Improve the use of macro and output obstacks.
13828 (output_defines): Remove.
13829
13830 * src/output.c (output_token_translations): Associate 'translate'
13831 table with a macro. No output to the table obstack.
13832 (output_gram): Same for 'rhs' and 'prhs'.
13833 (output_stos): Same for 'stos'.
13834 (output_rule_data): Same for 'r1' and 'r2'.
13835 (token_actions): Same for 'defact'.
13836 (goto_actions): Same for 'defgoto'.
13837 (output_base): Same for 'pact' and 'pgoto'.
13838 (output_table): Same for 'table'.
13839 (output_check): Same for 'check'.
13840
13841 * src/output.c (output_table_data): New function.
13842 (output_short_table): Remove.
13843 (output_short_or_char_table): Remove.
13844
13845 * src/output.c (output_parser): Replace most of the skeleton copy code
13846 with something new. Skeletons are now processed character by character
13847 rather than line by line, and Bison looks for '%%' macros. This is the
13848 first step in making Bison's output process (a lot) more flexible.
13849 (output_parser): Use the macro table.
13850
13851 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13852
13853 * src/main.c (main): Initialize the macro table.
13854
13855 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13856
13857 * src/lex.c (percent_table): Add tok_define.
13858 * src/lex.h: Add tok_define.
13859
13860 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13861
13862 * src/macrotab.c: New file.
13863 * src/macrotab.h: New file.
13864 * src/Makefile.am: Update.
13865
13866 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13867
13868 * lib/hash.c: New file.
13869 * lib/hash.h: New file.
13870 * lib/Makefile.am: Update.
13871
13872 2001-08-15 Akim Demaille <akim@epita.fr>
13873
13874 Version 1.28c.
13875
13876 2001-08-15 Marc Autret <autret_m@epita.fr>
13877
13878 * src/reader.c (readgram): Indent output macro YYSTYPE.
13879 (packsymbols): Likewise.
13880 (output_token_defines): Likewise.
13881 * src/files.c: Standardize.
13882 (compute_header_macro): New.
13883 (defines_obstack_save): New. Use compute_header_macro.
13884 (output_files): Update. Use defines_obstack_save.
13885
13886 2001-08-15 Akim Demaille <akim@epita.fr>
13887
13888 * doc/bison.texinfo (Table of Symbols): Document
13889 YYSTACK_USE_ALLOCA.
13890
13891 2001-08-15 Akim Demaille <akim@epita.fr>
13892
13893 * missing: Update from CVS Automake.
13894 * config/config.guess, config/config.sub, config/texinfo.tex:
13895 Update from gnu.org.
13896
13897 2001-08-15 Akim Demaille <akim@epita.fr>
13898
13899 * Makefile.maint: Sync with CVS Autoconf.
13900
13901 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
13902
13903 * doc/bison.texinfo: Include GNU Free Documentation License from
13904 `fdl.texi'.
13905 * doc/fdl.texi: Add to package.
13906
13907 2001-08-14 Marc Autret <autret_m@epita.fr>
13908
13909 Turn on %{source,header}_extension features.
13910
13911 * src/lex.c (percent_table): Un-CPP out header_extension and
13912 source_extension.
13913 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
13914 (compute_exts_from_src): Remove conditions. It restores priorities
13915 between options.
13916
13917 2001-08-14 Marc Autret <autret_m@epita.fr>
13918
13919 * src/files.c (compute_base_names): Add extensions computing when
13920 `--file-prefix' used.
13921 Standardize function calls.
13922
13923 2001-08-13 Marc Autret <autret_m@epita.fr>
13924
13925 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
13926 defining it (defined but null disables alloca).
13927
13928 2001-08-13 Marc Autret <autret_m@epita.fr>
13929
13930 * src/bison.simple (_yy_memcpy): CPP reformat.
13931
13932 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
13933
13934 * tests/atconfig.in (CPPFLAGS): Fix.
13935
13936 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
13937
13938 * doc/bison.texinfo: Include GNU General Public License from
13939 `gpl.texi'.
13940 * doc/gpl.texi: Add to package.
13941
13942 2001-08-10 Marc Autret <autret_m@epita.fr>
13943
13944 * src/print_graph.h: Fix.
13945 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
13946
13947 2001-08-10 Akim Demaille <akim@epita.fr>
13948
13949 * src/system.h: Provide default declarations for stpcpy, strndup,
13950 and strnlen.
13951
13952 2001-08-10 Robert Anisko <anisko_r@epita.fr>
13953
13954 * doc/bison.texinfo (Locations): Update @$ stuff.
13955
13956 2001-08-09 Robert Anisko <anisko_r@epita.fr>
13957
13958 * src/bison.simple (YYLLOC_DEFAULT): Update.
13959 (yyparse): Adjust.
13960
13961 2001-08-08 Marc Autret <autret_m@epita.fr>
13962
13963 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
13964 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
13965 Reported by Fabrice Bauzac.
13966
13967 2001-08-08 Marc Autret <autret_m@epita.fr>
13968
13969 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
13970 * src/vcg.c (output_node): Fix.
13971 * src/vcg.h: Cleanup.
13972 * src/print_graph.c: Add comments.
13973 (node_output_size): New global variable. Simplify the formatting of
13974 the VCG graph output.
13975 (print_actions): Unused code is now used. It notifies the final state
13976 and no action states in the VCG graph. It also give the reduce actions.
13977 The `shift and goto' edges are red and the `go to state' edges are
13978 blue.
13979 Get the current node name and node_obstack by argument.
13980 (node_obstack): New variable.
13981 (print_state): Manage node_obstack.
13982 (print_core): Use node_obstack given by argument.
13983 A node is not only computed here but in print_actions also.
13984 (print_graph): CPP out useless code instead of commenting it.
13985
13986 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
13987
13988 * tests/atconfig.in (CPPFLAGS): Fix.
13989
13990 2001-08-07 Akim Demaille <akim@epita.fr>
13991
13992 * src/print_graph.c (quote): New.
13993 (print_core): Use it.
13994
13995 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
13996
13997 * src/vcg.c (complain.h): Include it.
13998 Unepitaize `return' invocations.
13999 [NDEBUG] (main): Remove.
14000 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
14001 * src/files.c (open_files): Initialize graph_obstack.
14002 * src/print_graph.c (print_actions): CPP out useless code.
14003 (print_core): Don't output the last `\n' in labels.
14004 Use `quote'.
14005 * src/files.c (output_files): Output the VCG file.
14006 * src/main.c (main): Invoke print_graph ();
14007
14008 2001-08-06 Marc Autret <autret_m@epita.fr>
14009
14010 Automaton VCG graph output.
14011 Using option ``-g'' or long option ``--graph'', you can generate
14012 a gram_filename.vcg file containing a VCG description of the LALR (1)
14013 automaton of your grammar.
14014
14015 * src/main.c: Call to print_graph() function.
14016 * src/getargs.h: Update.
14017 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14018 (graph_flag): New flag.
14019 (longopts): Update.
14020 (getargs): Add case `g'.
14021 * src/files.c (graph_obstack): New obstack struct.
14022 (open_files): Initialize new obstack.
14023 (output_files): Saves graph_obstack if required.
14024 * src/files.h (graph_obstack): New extern declaration.
14025 * src/Makefile.am: Add new source files.
14026
14027 2001-08-06 Marc Autret <autret_m@epita.fr>
14028
14029 * src/print_graph.c, src/print_graph.h (graph): New.
14030 * src/vcg.h: New file.
14031 * src/vcg.c: New file, VCG graph handling.
14032
14033 2001-08-06 Marc Autret <autret_m@epita.fr>
14034
14035 Add of %source_extension and %header_extension which specify
14036 the source or/and the header output file extension.
14037
14038 * src/files.c (compute_base_names): Remove initialisation of
14039 src_extension and header_extension.
14040 (compute_exts_from_gf): Update.
14041 (compute_exts_from_src): Update.
14042 (output_files): Update.
14043 * src/reader.c (parse_header_extension_decl): New.
14044 (parse_source_extension_decl): New.
14045 (read_declarations): New case statements for the new tokens.
14046 * src/lex.c (percent_table): Add entries for %source_extension
14047 and %header_extension.
14048 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14049
14050 2001-08-06 Marc Autret <autret_m@epita.fr>
14051
14052 * configure.in: Bump to 1.28c.
14053 * doc/bison.texinfo: Texinfo thingies.
14054
14055 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
14056
14057 * tests/atconfig.in (CPPFLAGS): Add.
14058 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14059
14060 2001-08-03 Akim Demaille <akim@epita.fr>
14061
14062 Version 1.28b.
14063
14064 2001-08-03 Akim Demaille <akim@epita.fr>
14065
14066 * tests/Makefile.am (check-local): Ship testsuite.
14067 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
14068 Include `string.h'.
14069
14070 2001-08-03 Akim Demaille <akim@epita.fr>
14071
14072 * configure.in: Try using -Wformat when compiling.
14073
14074 2001-08-03 Akim Demaille <akim@epita.fr>
14075
14076 * configure.in: Bump to 1.28b.
14077
14078 2001-08-03 Akim Demaille <akim@epita.fr>
14079
14080 * src/complain.c: Adjust strerror_r portability issues.
14081
14082 2001-08-03 Akim Demaille <akim@epita.fr>
14083
14084 Version 1.28a.
14085
14086 2001-08-03 Akim Demaille <akim@epita.fr>
14087
14088 * src/getargs.c, src/getarg.h (skeleton)): Constify.
14089 * src/lex.c (literalchar): Avoid name clashes on `buf'.
14090 * src/getargs.c: Include complain.h.
14091 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
14092 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
14093
14094 2001-08-03 Akim Demaille <akim@epita.fr>
14095
14096 * src/reader.c (readgram): Display hidden chars in error messages.
14097
14098 2001-08-03 Akim Demaille <akim@epita.fr>
14099
14100 Update to gettext 0.10.39.
14101
14102 2001-08-03 Akim Demaille <akim@epita.fr>
14103
14104 * lib/strspn.c: New.
14105
14106 2001-08-01 Marc Autret <autret_m@epita.fr>
14107
14108 * doc/bison.texinfo: Update.
14109 * doc/bison.1 (mandoc): Update.
14110 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
14111 * src/files.c: Support output files extensions computing.
14112 (src_extension): New static variable.
14113 (header_extension): New static variable.
14114 (tr): New function.
14115 (get_extension_index): New function, gets the index of an extension
14116 filename in a string.
14117 (compute_exts_from_gf): New function, computes extensions from the
14118 grammar file extension.
14119 (compute_exts_from_src): New functions, computes extensions from the
14120 C source file extension, file given by ``-o'' option.
14121 (compute_base_names): Update.
14122 (output_files): Update.
14123
14124 2001-08-01 Robert Anisko <anisko_r@epita.fr>
14125
14126 * doc/bison.texi: Document @$.
14127 (Locations): New section.
14128
14129 2001-07-18 Akim Demaille <akim@epita.fr>
14130
14131 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
14132 * config/prev-version.txt, config/move-if-change: New.
14133 * Makefile.am: Adjust.
14134
14135 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
14136
14137 * src/bison.simple (yyparse): Suppress warning `comparaison
14138 between signed and unsigned'.
14139
14140 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
14141
14142 * src/getargs.h (raw_flag): Remove.
14143 * src/getargs.c: Die on `-r'/`--raw'.
14144 * src/lex.c (parse_percent_token): Die on `%raw'.
14145 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
14146 * tests/calc.at: Suppress test with option `--raw'.
14147
14148 2001-07-14 Akim Demaille <akim@epita.fr>
14149
14150 * config/: New.
14151 * configure.in: Require Autoconf 2.50.
14152 Update to gettext 0.10.38.
14153
14154 2001-03-16 Akim Demaille <akim@epita.fr>
14155
14156 * doc/bison.texinfo: ANSIfy the examples.
14157
14158 2001-03-16 Akim Demaille <akim@epita.fr>
14159
14160 * getargs.c (skeleton): New variable.
14161 (longopts): --skeleton is a new option.
14162 (shortopts, getargs): -S is a new option.
14163 * getargs.h: Declare skeleton.
14164 * output.c (output_parser): Use it.
14165
14166 2001-03-16 Akim Demaille <akim@epita.fr>
14167
14168 * m4/strerror_r.m4: New.
14169 * m4/error.m4: Run AC_FUNC_STRERROR_R.
14170 * lib/error.h, lib/error.c: Update.
14171
14172 2001-03-16 Akim Demaille <akim@epita.fr>
14173
14174 * src/getargs.c (longopts): Clean up.
14175
14176 2001-02-21 Akim Demaille <akim@epita.fr>
14177
14178 * src/reader.c (gensym): `gensym_count' is your own.
14179 Use a static buf to create the symbol name, as token_buffer is no
14180 longer a buffer.
14181
14182 2001-02-08 Akim Demaille <akim@epita.fr>
14183
14184 * src/conflicts.c (conflict_report): Be sure not to append to res
14185 between two calls, which could happen if both first sprintf were
14186 skipped, but not the first cp += strlen.
14187
14188 2001-02-08 Akim Demaille <akim@epita.fr>
14189
14190 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
14191 New, from fileutils 4.0.37.
14192 * configure.in: Require Autoconf 2.49c. I took some time before
14193 making this decision. This is the only way out for portability
14194 issues in Bison, it would mean way too much duplicate effort to
14195 import in Bison features implemented in 2.49c since 2.13.
14196 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
14197
14198 2001-02-02 Akim Demaille <akim@epita.fr>
14199
14200 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
14201 * lib/xalloc.h, lib/xmalloc.c: Update.
14202
14203 2001-01-19 Akim Demaille <akim@epita.fr>
14204
14205 Get rid of the ad hoc handling of token_buffer in the scanner: use
14206 the obstacks.
14207
14208 * src/lex.c (token_obstack): New.
14209 (init_lex): Initialize it. No longer call...
14210 (grow_token_buffer): this. Remove it.
14211 Adjust all the places which used it to use the obstack.
14212
14213 2001-01-19 Akim Demaille <akim@epita.fr>
14214
14215 * src/lex.h: Rename all the tokens:
14216 s/\bENDFILE\b/tok_eof/g;
14217 s/\bIDENTIFIER\b/tok_identifier/g;
14218 etc.
14219 Let them be enums, not #define, to ease debugging.
14220 Adjust all the code.
14221
14222 2001-01-18 Akim Demaille <akim@epita.fr>
14223
14224 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
14225 * src/lex.c (maxtoken, grow_token_buffer): Static.
14226
14227 2001-01-18 Akim Demaille <akim@epita.fr>
14228
14229 Since we now use obstacks, more % directives can be enabled.
14230
14231 * src/lex.c (percent_table): Also accept `%yacc',
14232 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
14233 `%debug'.
14234 Handle the actions for `%semantic_parser' and `%pure_parser' here,
14235 instead of returning a token.
14236 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14237 * src/reader.c (read_declarations): Adjust.
14238 * src/files.c (open_files): Don't call `compute_base_names', don't
14239 compute `attrsfile' since they depend upon data which might be
14240 *in* the input file now.
14241 (output_files): Do it here.
14242 * src/output.c (output_headers): Document the fact that this patch
14243 introduces a guaranteed SEGV for semantic parsers.
14244 * doc/bison.texinfo: Document them.
14245 * tests/suite.at: Exercise these %options.
14246
14247 2000-12-20 Akim Demaille <akim@epita.fr>
14248
14249 Also handle the output file (--verbose) with obstacks.
14250
14251 * files.c (foutput): Remove.
14252 (output_obstack): New.
14253 Adjust all dependencies.
14254 * src/conflicts.c: Return a string.
14255 * src/system.h (obstack_grow_string): Rename as...
14256 (obstack_sgrow): this. Be ready to work with non literals.
14257 (obstack_fgrow4): New.
14258
14259 2000-12-20 Akim Demaille <akim@epita.fr>
14260
14261 * src/files.c (open_files): Fix the computation of short_base_name
14262 in the case of `-o foo.tab.c'.
14263
14264 2000-12-20 Akim Demaille <akim@epita.fr>
14265
14266 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14267 (copy_dollar): Now that everything uses obstacks, get rid of the
14268 FILE * parameters.
14269
14270 2000-12-20 Akim Demaille <akim@epita.fr>
14271
14272 * src/files.c (open_files): Actually the `.output' file is based
14273 on the short_base_name, not base_name.
14274 * tests/suite.at (Checking output file names): Adjust.
14275
14276 2000-12-20 Akim Demaille <akim@epita.fr>
14277
14278 * src/bison.s1: Remove, we now use directly...
14279 * src/bison.simple: this.
14280 * src/Makefile.am: Use pkgdata instead of data.
14281
14282 2000-12-20 Akim Demaille <akim@epita.fr>
14283
14284 * src/files.c (guard_obstack): New.
14285 (open_files): Initialize it.
14286 (output_files): Dump it...
14287 * src/files.h: Export it.
14288 * src/reader.c (copy_guard): Use it.
14289
14290 2000-12-19 Akim Demaille <akim@epita.fr>
14291
14292 * src/files.c (outfile, defsfile, actfile): Removed as global
14293 vars.
14294 (open_files): Don't compute them.
14295 (output_files): Adjust.
14296 (base_name, short_base_name): Be global.
14297 Adjust dependencies.
14298
14299 2000-12-19 Akim Demaille <akim@epita.fr>
14300
14301 * src/files.c (strsuffix): New.
14302 (stringappend): Be just like strcat but allocate.
14303 (base_names): Eve out from open_files.
14304 Try to simplify the rather hairy computation of base_name and
14305 short_base_name.
14306 (open_files): Use it.
14307 * tests/suite.at (Checking output file names): New test.
14308
14309 2000-12-19 Akim Demaille <akim@epita.fr>
14310
14311 * src/system.h (obstack_grow_literal_string): Rename as...
14312 (obstack_grow_string): this.
14313 * src/output.c (output_parser): Recognize `%% actions' instead of
14314 `$'.
14315 * src/bison.s1: s/$/%% actions/.
14316 * src/bison.hairy: Likewise.
14317
14318 2000-12-19 Akim Demaille <akim@epita.fr>
14319
14320 * src/output.c (output_parser): Compute the `#line' lines when
14321 there are.
14322 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
14323 Suggested by Hans Aberg.
14324
14325 2000-12-19 Akim Demaille <akim@epita.fr>
14326
14327 Let the handling of the skeleton files be local to the procedures
14328 that use it.
14329
14330 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
14331 longer static.
14332 (fparser, open_extra_files): Remove.
14333 (open_files, output_files): Don't take care of fparser.
14334 * src/files.h: Adjust.
14335 * src/output.c (output_parser): Open and close the file to the
14336 skeleton.
14337 * src/reader.c (read_declarations): When %semantic_parser, open
14338 fguard.
14339
14340 2000-12-19 Akim Demaille <akim@epita.fr>
14341
14342 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
14343 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
14344
14345 2000-12-19 Akim Demaille <akim@epita.fr>
14346
14347 * src/files.c (open_files): Yipee! We no longer need all the code
14348 looking for `/tmp' since we have no tmp file.
14349
14350 2000-12-19 Akim Demaille <akim@epita.fr>
14351
14352 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
14353 New macros.
14354 * src/files.c (open_files): Less dependency on MSDOS etc.
14355
14356 2000-12-14 Akim Demaille <akim@epita.fr>
14357
14358 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
14359 Provide a default definition.
14360 Use it when executing the default @ action.
14361 * src/reader.c (reader_output_yylsp): No longer include
14362 `timestamp' and `text' in the default YYLTYPE.
14363
14364 2000-12-12 Akim Demaille <akim@epita.fr>
14365
14366 * src/reader.c (copy_definition, parse_union_decl, copy_action)
14367 (copy_guard): Quote the file names.
14368 Reported by Laurent Mascherpa.
14369
14370 2000-12-12 Akim Demaille <akim@epita.fr>
14371
14372 * src/output.c (output_headers, output_program, output): Be sure
14373 to escape special characters when outputting filenames.
14374 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
14375 (output_headers): Don't depend on them, Use ACTSTR.
14376
14377 2000-11-17 Akim Demaille <akim@epita.fr>
14378
14379 * lib/obstack.h: Formatting changes.
14380 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
14381 prevents type checking.
14382 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
14383 cast the value to (void *): assigning a `foo *' to a `void *'
14384 variable is valid.
14385 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
14386 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
14387 append characters.
14388
14389 2000-11-17 Akim Demaille <akim@epita.fr>
14390
14391 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
14392 as...
14393 (suite.m4, regression.m4, calc.m4): these.
14394 * tests/atgeneral.m4: Update from CVS Autoconf.
14395
14396 2000-11-17 Akim Demaille <akim@epita.fr>
14397
14398 * tests/regression.m4 (%union and --defines): New test,
14399 demonstrating a current bug in the obstack implementation.
14400
14401 2000-11-17 Akim Demaille <akim@epita.fr>
14402
14403 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
14404 macros.
14405 Use them to declare the variables which are global or local to
14406 `yyparse'.
14407
14408 2000-11-17 Akim Demaille <akim@epita.fr>
14409
14410 * acconfig.h: Remove, no longer used.
14411
14412 2000-11-07 Akim Demaille <akim@epita.fr>
14413
14414 * src: s/Copyright (C)/Copyright/g.
14415
14416 2000-11-07 Akim Demaille <akim@epita.fr>
14417
14418 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
14419 defining.
14420 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
14421
14422 2000-11-07 Akim Demaille <akim@epita.fr>
14423
14424 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
14425 Merge in a single CPP if/else.
14426
14427 2000-11-07 Akim Demaille <akim@epita.fr>
14428
14429 * src/output.c (output): Remove useless variables.
14430 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
14431 argument `data' for consistency with the prototypes.
14432 Qualify it `const'.
14433 (obstack_copy, obstack_copy0): Rename the second argument as
14434 `address' for consistency. Qualify it `const'.
14435 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
14436 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
14437 `const' their input argument (`data' or `address').
14438 Adjust the corresponding macros to include `const' in casts.
14439
14440 2000-11-03 Akim Demaille <akim@epita.fr>
14441
14442 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
14443 s/PFILE1/BISON_HAIRY/.
14444 Adjust dependencies.
14445
14446 2000-11-03 Akim Demaille <akim@epita.fr>
14447
14448 For some reason, this was not applied.
14449
14450 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14451 `unlink': it's no longer used.
14452
14453 2000-11-03 Akim Demaille <akim@epita.fr>
14454
14455 * src/files.c (skeleton_find): New function, eved out of...
14456 (open_files, open_extra_files): here.
14457
14458 2000-11-03 Akim Demaille <akim@epita.fr>
14459
14460 Don't use `atexit'.
14461
14462 * src/files.c (obstack_save): New function.
14463 (done): Rename as...
14464 (output_files): this.
14465 Use `obstack_save'.
14466 * src/main.c (main): Don't use `atexit' to register `done', since
14467 it no longer has to remove tmp files, just call `output_files'
14468 when there are no errors.
14469
14470 2000-11-02 Akim Demaille <akim@epita.fr>
14471
14472 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14473 `unlink': it's no longer used.
14474 * src/files.h: Formatting changes.
14475
14476 2000-11-02 Akim Demaille <akim@epita.fr>
14477
14478 Remove the last uses of mktemp and unlink/delete.
14479
14480 * src/files.c (fdefines, ftable): Removed.
14481 (defines_ostack, table_obstack): New.
14482 Adjust dependencies of the former into uses of the latter.
14483 * src/output.c (output_short_or_char_table, output_short_table):
14484 Convert to using obstacks.
14485 * src/reader.c (copy_comment2): Accept one FILE * and two
14486 obstacks.
14487 (output_token_defines, reader_output_yylsp): Use obstacks.
14488 * src/system.h (obstack_fgrow3): New.
14489 * po/POTFILES.in: Adjust.
14490
14491 2000-11-01 Akim Demaille <akim@epita.fr>
14492
14493 Change each use of `fattrs' into a use of `attrs_obstack'.
14494
14495 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
14496 * src/files.c (fattrs): Remove.
14497 (attrs_obstack): New.
14498 Adjust all dependencies.
14499 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
14500
14501 2000-11-01 Akim Demaille <akim@epita.fr>
14502
14503 Introduce obstacks.
14504 Change each use of `faction' into a use of `action_obstack'.
14505
14506 * lib/obstack.h, lib/obstack.c: New files.
14507 * src/files.c (faction): Remove.
14508 (action_obstack): New.
14509 Adjust all dependencies.
14510
14511 2000-10-20 Akim Demaille <akim@epita.fr>
14512
14513 * lib/quote.h (PARAMS): New macro. Use it.
14514
14515 2000-10-16 Akim Demaille <akim@epita.fr>
14516
14517 * src/output.c (output_short_or_char_table): New function.
14518 (output_short_table, output_token_translations): Use it.
14519 (goto_actions): Use output_short_table.
14520
14521 2000-10-16 Akim Demaille <akim@epita.fr>
14522
14523 * src/symtab.c (bucket_new): New function.
14524 (getsym): Use it.
14525
14526 * src/output.c (output_short_table): New argument to display the
14527 comment associated with the table.
14528 Adjust dependencies.
14529 (output_gram): Use it.
14530 (output_rule_data): Nicer output layout for YYTNAME.
14531
14532 2000-10-16 Akim Demaille <akim@epita.fr>
14533
14534 * src/lex.c (read_typename): New function.
14535 (lex): Use it.
14536 * src/reader.c (copy_dollar): Likewise.
14537
14538 2000-10-16 Akim Demaille <akim@epita.fr>
14539
14540 * src/reader.c (copy_comment2): Expect the input stream to be on
14541 the `/' which is suspected to open a comment, instead of being
14542 called after `//' or `/*' was read.
14543 (copy_comment, copy_definition, parse_union_decl, copy_action)
14544 (copy_guard): Adjust.
14545
14546 2000-10-16 Akim Demaille <akim@epita.fr>
14547
14548 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
14549 `read_signed_integer'.
14550
14551 2000-10-16 Akim Demaille <akim@epita.fr>
14552
14553 * src/reader.c (copy_dollar): New function.
14554 (copy_guard, copy_action): Use it.
14555
14556 2000-10-16 Akim Demaille <akim@epita.fr>
14557
14558 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
14559 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
14560 New files, from Fileutils 4.0.27.
14561 * src/main.c (printable_version): Remove.
14562 * src/lex.c, src/reader.c: Use `quote'.
14563
14564 2000-10-04 Akim Demaille <akim@epita.fr>
14565
14566 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
14567
14568 2000-10-04 Akim Demaille <akim@epita.fr>
14569
14570 * doc/bison.texinfo: Various typos spotted by Neil Booth.
14571
14572 2000-10-04 Akim Demaille <akim@epita.fr>
14573
14574 When a literal string is used to define two different tokens,
14575 `bison -v' segfaults.
14576 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
14577
14578 * tests/regression.m4: New file.
14579 Include the core of the sample provided by Piotr Gackiewicz.
14580 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
14581 properly.
14582
14583 2000-10-04 Akim Demaille <akim@epita.fr>
14584
14585 * src/reader.c (parse_expect_decl): Keep `count' within the size
14586 of `buffer'.
14587 From Neil Booth.
14588
14589 2000-10-02 Paul Eggert <eggert@twinsun.com>
14590
14591 * bison.s1 (yyparse): Assign the default value
14592 unconditionally, to avoid a GCC warning and make the parser a
14593 tad smaller.
14594
14595 2000-10-02 Akim Demaille <akim@epita.fr>
14596
14597 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
14598 options.
14599
14600 2000-10-02 Akim Demaille <akim@epita.fr>
14601
14602 * src/derives.c, src/print.c, src/reduce.c: To ease the
14603 translation, move some `\n' out of the translated strings.
14604
14605 2000-10-02 Akim Demaille <akim@epita.fr>
14606
14607 The location tracking mechanism is precious for parse error
14608 messages. Nevertheless, it is enabled only when `@n' is used in
14609 the grammar, which is a different issue (you can use it in error
14610 message, but not in the grammar per se). Therefore, there should
14611 be another means to enable it.
14612
14613 * src/getargs.c (getargs): Support `--locations'.
14614 (usage): Report it.
14615 * src/getargs.h (locationsflag): Export it.
14616 * src/lex.c (percent_table): Support `%locations'.
14617 * src/reader.c (yylsp_needed): Remove this variable, now replaced
14618 with `locationsflag'.
14619 * doc/bison.texinfo: Document `--locations' and `%locations'.
14620 Sort the options.
14621 * tests/calc.m4: Test it.
14622
14623 For regularity of the names, replace each
14624 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
14625 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
14626 In addition replace each `flag' with `_flag'.
14627
14628 2000-10-02 Akim Demaille <akim@epita.fr>
14629
14630 Also test parse error messages, including with YYERROR_VERBOSE.
14631
14632 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
14633 associative).
14634 Use it to check the computations.
14635 Use it to check `nonassoc' is honored.
14636 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
14637 `--yyerror-verbose'.
14638 (_AT_CHECK_CALC): Adjust to this option.
14639 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
14640
14641 2000-10-02 Akim Demaille <akim@epita.fr>
14642
14643 Test also `--verbose', `--defines' and `--name-prefix'. Testing
14644 the latter demonstrates a flaw in the handling of non debugging
14645 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
14646 was used in order to simplify:
14647
14648 #if YYDEBUG
14649 if (yydebug)
14650 {
14651 ...
14652 }
14653 #endif
14654
14655 into
14656
14657 if (yydebug)
14658 {
14659 ...
14660 }
14661
14662 unfortunately this leads to a CPP conflict when
14663 `--name-prefix=foo' is used since it produces `#define yydebug
14664 foodebug'.
14665
14666 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
14667 (YYDPRINTF): New macro.
14668 Spread its use.
14669 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
14670 the bison options.
14671 Also test `--verbose', `--defines' and `--name-prefix'.
14672
14673 2000-10-02 Akim Demaille <akim@epita.fr>
14674
14675 Improve the readability of the produced parsers.
14676
14677 * src/bison.s1: Formatting changes.
14678 Improve the comment related to the `$' mark.
14679 (yydefault): Don't fall through to `yyresume': `goto' there.
14680 * src/output.c (output_parser): When the `$' is met, skip the end
14681 of its line.
14682 New variable, `number_of_dollar_signs', to check there's exactly
14683 one `$' in the parser skeleton.
14684
14685 2000-10-02 Akim Demaille <akim@epita.fr>
14686
14687 * lib/xstrdup.c: New file, from the fileutils.
14688 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
14689 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
14690 instead of strlen + xmalloc + strcpy.
14691 * src/symtab.c (copys): Remove, use xstrdup instead.
14692
14693 2000-10-02 Akim Demaille <akim@epita.fr>
14694
14695 * src/gram.h (associativity): New enum type which replaces the
14696 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
14697 `right_assoc', `left_assoc' and `non_assoc'.
14698 Adjust all dependencies.
14699 * src/reader.c: Formatting changes.
14700 (LTYPESTR): Don't define it, use it as a literal in
14701 `reader_output_yylsp'.
14702 * src/symtab.h (symbol_class): New enum type which replaces the
14703 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
14704 `sunknown', `stoken and `snterm'.
14705
14706 2000-10-02 Akim Demaille <akim@epita.fr>
14707
14708 * src/getargs.c (fixed_outfiles): Rename as...
14709 (yaccflag): for consistency and accuracy.
14710 Adjust dependencies.
14711
14712 2000-10-02 Akim Demaille <akim@epita.fr>
14713
14714 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
14715 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
14716 difficult and introduced a lot of core dump. It turns out that
14717 Bison used an implementation of `xmalloc' based on `calloc', and
14718 at various places it does depend upon the initialization to 0. I
14719 have not tried to isolate the pertinent places, and all the former
14720 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
14721 someone should address this issue.
14722
14723 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
14724 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
14725 files.
14726 Adjust dependencies.
14727 * src/warshall.h: New file.
14728 Propagate.
14729
14730 2000-10-02 Akim Demaille <akim@epita.fr>
14731
14732 Various anti-`extern in *.c' changes.
14733
14734 * src/system.h: Include `assert.h'.
14735
14736 2000-10-02 Akim Demaille <akim@epita.fr>
14737
14738 * src/state.h (nstates, final_state, first_state, first_shift)
14739 (first_reduction): Move their exportation from here...
14740 * src/LR0.h: to here.
14741 Adjust dependencies.
14742 * src/getargs.c (statisticsflag): New variable.
14743 Add support for `--statistics'.
14744 Adjust dependencies.
14745
14746 Remove a lot of now useless `extern' statements in most files.
14747
14748 2000-10-02 Akim Demaille <akim@epita.fr>
14749
14750 * src/LR0.h: New file.
14751 Propagate its use.
14752
14753 2000-10-02 Akim Demaille <akim@epita.fr>
14754
14755 * src/print.h: New file.
14756 Propagate its use.
14757 * src/print.c: Formatting and ordering changes.
14758 (verbose, terse): Replace with...
14759 (print_results): this new function.
14760 Adjust dependencies.
14761
14762 2000-10-02 Akim Demaille <akim@epita.fr>
14763
14764 * src/conflicts.c (conflict_report): New function.
14765 (conflict_log, verbose_conflict_log): Replace with...
14766 (print_conflicts): this function.
14767 Adjust dependencies.
14768 * src/conflicts.h: New file.
14769 Propagate its inclusion.
14770
14771 2000-10-02 Akim Demaille <akim@epita.fr>
14772
14773 * src/nullable.h: New file.
14774 Propagate its inclusion.
14775 * src/nullable.c: Formatting changes.
14776
14777 2000-10-02 Akim Demaille <akim@epita.fr>
14778
14779 * src/reduce.h: New file.
14780 Propagate its inclusion.
14781 * src/reduce.c: Topological sort and other formatting changes.
14782 (bool, TRUE, FALSE): Move their definition to...
14783 * src/system.h: here.
14784
14785 2000-10-02 Akim Demaille <akim@epita.fr>
14786
14787 * src/files.c: Formatting changes.
14788 (tryopen, tryclose, openfiles): Rename as...
14789 (xfopen, xfclose, open_files): this.
14790 (stringappend): static.
14791 * src/files.h: Complete the list of exported symbols.
14792 Propagate its use.
14793
14794 2000-10-02 Akim Demaille <akim@epita.fr>
14795
14796 * src/reader.h: New file.
14797 Propagate its use instead of tedious list of `extern' and
14798 prototypes.
14799 * src/reader.c: Formatting changes, topological sort,
14800 s/register//.
14801
14802 2000-10-02 Akim Demaille <akim@epita.fr>
14803
14804 * src/lex.h: Prototype `lex.c' exported functions.
14805 * src/reader.c: Adjust.
14806 * src/lex.c: Formatting changes.
14807 (safegetc): Rename as...
14808 (xgetc): this.
14809
14810 2000-10-02 Akim Demaille <akim@epita.fr>
14811
14812 * src/lalr.h: New file.
14813 Propagate its inclusion instead of prototypes and `extern'.
14814 * src/lalr.c: Formatting changes, topological sorting etc.
14815
14816 2000-10-02 Akim Demaille <akim@epita.fr>
14817
14818 * src/output.c (token_actions): Introduce a temporary array,
14819 YYDEFACT, that makes it possible for this function to use
14820 output_short_table.
14821
14822 2000-10-02 Akim Demaille <akim@epita.fr>
14823
14824 `user_toknums' is output as a `short[]' in `output.c', while it is
14825 defined as a `int[]' in `reader.c'. For consistency with the
14826 other output tables, `user_toknums' is now defined as a table of
14827 shorts.
14828
14829 * src/reader.c (user_toknums): Be a short table instead of an int
14830 table.
14831 Adjust dependencies.
14832
14833 Factor the short table outputs.
14834
14835 * src/output.c (output_short_table): New function.
14836 * src/output.c (output_gram, output_stos, output_rule_data)
14837 (output_base, output_table, output_check): Use it.
14838
14839 2000-10-02 Akim Demaille <akim@epita.fr>
14840
14841 * src/output.c (output): Topological sort of the functions, in
14842 order to get rid of the `static' prototypes.
14843 No longer use `register'.
14844 * src/output.h: New file.
14845 Propagate its inclusion in files explicitly prototyping functions
14846 from output.c.
14847
14848 2000-09-21 Akim Demaille <akim@epita.fr>
14849
14850 * src/atgeneral.m4: Update from Autoconf.
14851
14852 2000-09-21 Akim Demaille <akim@epita.fr>
14853
14854 * src/closure.h: New file.
14855 * src/closure.c: Formatting changes, topological sort over the
14856 functions, use of closure.h.
14857 (initialize_closure, finalize_closure): Rename as...
14858 (new_closure, free_closure): these. Adjust dependencies.
14859 * src/LR0.c: Formatting changes, topological sort, use of
14860 cloture.h.
14861 (initialize_states): Rename as...
14862 (new_states): this.
14863 * src/Makefile.am (noinst_HEADERS): Adjust.
14864
14865 2000-09-20 Akim Demaille <akim@epita.fr>
14866
14867 * src/acconfig.h: Don't protect config.h against multiple
14868 inclusion.
14869 Don't define PARAMS.
14870 * src/system.h: Define PARAMS.
14871 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
14872 purpose of config.h. system.h must not try to fix wrong
14873 definitions in config.h.
14874
14875 2000-09-20 Akim Demaille <akim@epita.fr>
14876
14877 * src/derives.h: New file.
14878 * src/main.c, src/derives.h: Use it.
14879 Formatting changes.
14880 * src/Makefile.am (noinst_HEADERS): Adjust.
14881
14882 2000-09-20 Akim Demaille <akim@epita.fr>
14883
14884 * tests/atgeneral.m4: Update from Autoconf.
14885 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
14886 (AT_CHECK_CALC): New macros.
14887 Use these macros to test bison with options `', `--raw',
14888 `--debug', `--yacc', `--yacc --debug'.
14889
14890 2000-09-19 Akim Demaille <akim@epita.fr>
14891
14892 * src/output.c: Formatting changes.
14893 * src/machine.h: Remove, leaving its contents in...
14894 * src/system.h: here.
14895 Include stdio.h.
14896 Adjust all dependencies on stdio.h and machine.h.
14897 * src/getargs.h: New file.
14898 Let all `extern' declarations about getargs.c be replaced with
14899 inclusion of `getargs.h'.
14900 * src/Makefile.am (noinst_HEADERS): Adjust.
14901
14902 * tests/calc.m4 (yyin): Be initialized in main, not on the global
14903 scope.
14904 (yyerror): Returns void, not int.
14905 * doc/bison.texinfo: Formatting changes.
14906
14907 2000-09-19 Akim Demaille <akim@epita.fr>
14908
14909 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
14910 portable.
14911
14912 2000-09-18 Akim Demaille <akim@epita.fr>
14913
14914 * configure.in: Append WARNING_CFLAGS to CFLAGS.
14915 * src/Makefile.am (INCLUDES): Don't.
14916 Be ready to fetch headers in lib/.
14917
14918 2000-09-18 Akim Demaille <akim@epita.fr>
14919
14920 * doc/bison.texinfo: Update the copyright.
14921 ANSIfy and GNUify the examples.
14922 Remove the old menu.
14923
14924 2000-09-18 Akim Demaille <akim@epita.fr>
14925
14926 First set of tests: use the `calc' example from the documentation.
14927
14928 * src/bison.s1 (yyparse): Condition the code using `yytname' which
14929 is defined only when YYDEBUG is.
14930 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
14931 * src/files.c (tryopen, tryclose): Formatting changes.
14932 Move to the top and be static.
14933 * src/reader.c (read_signed_integer): Likewise.
14934 * tests/calc.m4: New file.
14935 * Makefile.am, suite.m4: Adjust.
14936 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
14937
14938 2000-09-18 Akim Demaille <akim@epita.fr>
14939
14940 Add support for an Autotest test suite for Bison.
14941
14942 * m4/m4.m4, m4/atconfig.m4: New files.
14943 * m4/Makefile.am (EXTRA_DIST): Adjust.
14944 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
14945 files.
14946 * src/getargs.c: Display a more standard --version message.
14947 * src/reader.c (reader): Formatting changes.
14948 No longer depend upon VERSION_STRING.
14949 * configure.in: No longer use `dnl'.
14950 Set up the test suite and the new directory `tests/.
14951 (VERSION_STRING): Remove.
14952
14953 2000-04-14 Akim Demaille <akim@epita.fr>
14954
14955 * src/reader.c (copy_comment2): New function, same as former
14956 `copy_comment', but outputs into two FILE *.
14957 (copy_comment): Use it.
14958 (parse_union_decl): Use it.
14959 (get_type, parse_start_decl): Use the same `invalid' message.
14960 (parse_start_decl, parse_union_decl): Use the same `multiple'
14961 message.
14962 (parse_union_decl, copy_guard, copy_action): Use the same
14963 `unmatched' message.
14964 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
14965
14966 2000-03-31 Akim Demaille <akim@epita.fr>
14967
14968 * src/files.c (tryopen, tryclose): Move to the top.
14969 Be static.
14970
14971 2000-03-31 Akim Demaille <akim@epita.fr>
14972
14973 * src/main.c (main): Don't call `done', exit does it.
14974
14975 2000-03-31 Akim Demaille <akim@epita.fr>
14976
14977 * allocate.c: s/return (foo)/return foo/.
14978 * lalr.c: Likewise.
14979 * LR0.c: Likewise.
14980 * output.c: Likewise.
14981 * reader.c: Likewise.
14982 * symtab.c: Likewise.
14983 * vmsgetargs.c: Likewise.
14984
14985 2000-03-31 Akim Demaille <akim@epita.fr>
14986
14987 Clean up the error reporting functions.
14988
14989 * src/report.c: New file.
14990 * src/report.h: Likewise.
14991 * src/Makefile.am: Adjust.
14992 * m4/error.m4: New file.
14993 * m4/Makefile.am: Adjust.
14994 * configure.in (jm_PREREQ_ERROR): Call it.
14995 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
14996 Remove.
14997 (fatal, fatals): Remove. All callers use complain.c::fatal.
14998 (warn, warni, warns, warnss, warnss): Remove. All callers use
14999 complain.c::complain.
15000 (toomany): Remove, use fatal instead.
15001 * src/files.c (done): No argument, use complain_message_count.
15002 * src/main.c (main): Register `done' to `atexit'.
15003
15004 * src/getargs.c (usage): More `fputs', less `fprintf'.
15005
15006 2000-03-28 Akim Demaille <akim@epita.fr>
15007
15008 * lib/: New directory.
15009 * Makefile.am (SUBDIRS): Adjust.
15010 * configure.in: Adjust.
15011 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15012 useless.
15013 * src/alloca.c: Moved to lib/.
15014 * src/getopt.c: Likewise.
15015 * src/getopt1.c: Likewise.
15016 * src/getopt.h: Likewise.
15017 * src/ansi2knr.c: Likewise.
15018 * src/ansi2knr.1: Likewise.
15019 * src/Makefile.am: Adjust.
15020 * lib/Makefile.am: New file.
15021
15022 2000-03-28 Akim Demaille <akim@epita.fr>
15023
15024 * src/getargs.c (usage): Refresh the help message.
15025
15026 2000-03-17 Akim Demaille <akim@epita.fr>
15027
15028 * src/getopt1.c: Updated from textutils 2.0e
15029 * src/getopt.c: Likewise.
15030 * src/getopt.h: Likewise.
15031
15032 2000-03-17 Akim Demaille <akim@epita.fr>
15033
15034 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15035 the file name, not the whole `#line LINE FILE'.
15036
15037 2000-03-17 Akim Demaille <akim@epita.fr>
15038
15039 On syntax errors, report the token on which we choked.
15040
15041 * src/bison.s1 (yyparse): In the label yyerrlab, when
15042 YYERROR_VERBOSE, add yychar in msg.
15043
15044 2000-03-17 Akim Demaille <akim@epita.fr>
15045
15046 * src/reader.c (copy_at): New function.
15047 (copy_guard): Use it.
15048 (copy_action): Use it.
15049
15050 2000-03-17 Akim Demaille <akim@epita.fr>
15051
15052 Be kind to translators, save some useless translations.
15053
15054 * src/main.c (banner): New function.
15055 (fatal_banner): Use it.
15056 (warn_banner): Use it.
15057
15058 2000-03-17 Akim Demaille <akim@epita.fr>
15059
15060 * src/reader.c (copy_definition): Use copy_string and
15061 copy_comment. Removed now unused `match', `ended',
15062 `cplus_comment'.
15063 (copy_comment, copy_string): Moved, to be visible from
15064 copy_definition.
15065
15066 2000-03-17 Akim Demaille <akim@epita.fr>
15067
15068 * src/reader.c (copy_string): Declare `static inline'. No
15069 problems with inline, since it is checked by configure.
15070 (copy_comment): Likewise.
15071
15072 2000-03-17 Akim Demaille <akim@epita.fr>
15073
15074 * src/reader.c (packsymbols): Formatting changes.
15075
15076 2000-03-17 Akim Demaille <akim@epita.fr>
15077
15078 * src/reader.c (copy_comment): New function, factored out from:
15079 (copy_action): Use it. Removed now unused `match', `ended',
15080 `cplus_comment'.
15081 (copy_guard): Likewise.
15082
15083 2000-03-17 Akim Demaille <akim@epita.fr>
15084
15085 * src/reader.c (copy_string): New function, factored out from:
15086 (copy_action): Use it.
15087 (copy_guard): Likewise.
15088
15089 2000-03-17 Akim Demaille <akim@epita.fr>
15090
15091 Change the handling of @s so that they behave exactly like $s.
15092 There is now a pseudo variable @$ (readble and writable), location
15093 of the lhs of the rule (by default ranging from the location of
15094 the first symbol of the rhs, to the location of the last symbol,
15095 or, if the rhs is empty, YYLLOC).
15096
15097 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
15098 yyval.
15099 (yyparse): When providing a default semantic action, provide a
15100 default location action.
15101 (after the $): No longer change `*YYLSP', just stack YYLOC the
15102 same way you stack YYVAL.
15103 * src/reader.c (read_declarations): Use warns.
15104 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
15105 (copy_action, case '@'): Likewise.
15106 Use a standard error message, to save useless work from
15107 translators.
15108
15109 2000-03-17 Akim Demaille <akim@epita.fr>
15110
15111 * src/bison.s1: Formatting and cosmetics changes.
15112 * src/reader.c: Likewise.
15113 Update the Copyright notice.
15114
15115 2000-03-17 Akim Demaille <akim@epita.fr>
15116
15117 * src/bison.s1 (#line): All set to `#line' only, since the
15118 Makefile now handles them.
15119
15120 2000-03-16 Akim Demaille <akim@epita.fr>
15121
15122 * src/output.c (output_rule_data): Output the documentation of
15123 some of the tables.
15124 (Copyright notice): Update.
15125 Formatting changes.
15126
15127 2000-03-16 Akim Demaille <akim@epita.fr>
15128
15129 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
15130 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
15131 One `#if YYDEBUG' remains, since it uses variables which are
15132 defined only if `YYDEBUG != 0'.
15133
15134 2000-03-16 Akim Demaille <akim@epita.fr>
15135
15136 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
15137 and related variables so that the similarities are highlighted.
15138
15139 2000-03-16 Akim Demaille <akim@epita.fr>
15140
15141 * src/bison.s1: Properly indent CPP directives.
15142
15143 2000-03-16 Akim Demaille <akim@epita.fr>
15144
15145 * src/bison.s1: Properly indent the `alloca' CPP section.
15146
15147 2000-03-16 Akim Demaille <akim@epita.fr>
15148
15149 Do not hard code values of directories in `configure.in'.
15150 Update the `configure' tool chain.
15151
15152 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
15153 src/makefile.am.
15154 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
15155 (AC_OUTPUT): Add m4/Makefile.
15156 Bump to bison 1.28a, 1.29 has never been released.
15157 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
15158 handled via src/Makefile.am.
15159 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
15160 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
15161 autoheader.
15162 * Makefile.am (SUBDIRS): Add m4.
15163 (ACLOCAL_AM_FLAGS): New variable.
15164 (AUTOMAKE_OPTIONS): Add check-news.
15165 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
15166 the proper line number and file name.
15167 (DEFS): Propagate the location of bison library files and of the
15168 locale files.
15169 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
15170 builddir.
15171 * acinclude.m4: Remove, replaced by the directory m4.
15172 * m4/Makefile.am (EXTRA_DIST): New variable.
15173 * m4/gettext.m4: New file, from the fileutils.
15174 * m4/lcmessage.m4: Likewise
15175 * m4/progtest.m4: Likewise.
15176 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
15177
15178 2000-03-10 Akim Demaille <akim@epita.fr>
15179
15180 * src/closure.c:
15181 Formatting changes of various comments.
15182 Respect the GNU coding standards at various places.
15183 Don't use `_()' when no translation is needed.
15184
15185 1999-12-13 Jesse Thilo <jthilo@gnu.org>
15186
15187 * src/files.c:
15188 OS/2 honors TMPDIR environment variable.
15189
15190 1999-12-13 Jesse Thilo <jthilo@gnu.org>
15191
15192 * doc/bison.texinfo: Tweaked spelling and grammar.
15193 Updated ISBN.
15194 Removed reference to price of printed copy.
15195 Mention BISON_SIMPLE and BISON_HAIRY.
15196
15197 1999-12-13 Jesse Thilo <jthilo@gnu.org>
15198
15199 * configure.in, NEWS:
15200 Bison 1.29 released.
15201
15202 1999-10-27 Jesse Thilo <jthilo@gnu.org>
15203
15204 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
15205 Added reference card.
15206
15207 1999-07-26 Jesse Thilo <jthilo@gnu.org>
15208
15209 * po/ru.po: Added Russian translation.
15210
15211 1999-07-26 Jesse Thilo <jthilo@gnu.org>
15212
15213 * configure.in: Added Russian translation.
15214
15215 1999-07-06 Jesse Thilo <jthilo@gnu.org>
15216
15217 * configure.in, NEWS, README:
15218 Released version 1.28.
15219
15220 1999-06-14 Jesse Thilo <jthilo@gnu.org>
15221
15222 * src/system.h:
15223 Squashed redefinition warning on some systems.
15224
15225 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
15226 Have configure build version string instead of relying on ANSI string
15227 concatentation.
15228
15229 1999-06-14 Jesse Thilo <jthilo@gnu.org>
15230
15231 * po/POTFILES.in: Got rid of version.c.
15232
15233 1999-06-14 Jesse Thilo <jthilo@gnu.org>
15234
15235 * acconfig.h, configure.in:
15236 Have configure build version string instead of relying on ANSI string
15237 concatentation.
15238
15239 1999-06-08 Jesse Thilo <jthilo@gnu.org>
15240
15241 * doc/bison.1:
15242 Dropped mention of `+' for long-named options.
15243
15244 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15245
15246 * src/files.c: Added <unistd.h> for unlink().
15247
15248 * src/Makefile.am, src/system.h:
15249 I18n fixes.
15250
15251 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15252
15253 * README: Added a FAQ list.
15254
15255 * configure.in, acconfig.h:
15256 I18n fixes.
15257
15258 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15259
15260 * doc/FAQ, doc/Makefile.am:
15261 Added a FAQ list.
15262
15263 1999-05-19 Jesse Thilo <jthilo@gnu.org>
15264
15265 * src/alloc.h, src/symtab.h, src/version.c:
15266 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15267
15268 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15269
15270 * src/.cvsignore, src/Makefile.am:
15271 Reorganized: sources in `src', documentation in `doc'.
15272
15273 * src/lex.c (literalchar):
15274 fixed the code for escaping double quotes (thanks
15275 Jonathan Czisny.)
15276
15277 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15278
15279 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15280 Adjusted paths to reflect directory reorganization.
15281
15282 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15283
15284 * doc/.cvsignore, doc/Makefile.am:
15285 Reorganized: sources in `src', documentation in `doc'.
15286
15287 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15288
15289 * configure.in:
15290 Updated AC_INIT file to reflect directory reorganization.
15291
15292 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
15293 Reorganized: sources in `src', documentation in `doc'.
15294
15295 1999-04-13 Jesse Thilo <jthilo@gnu.org>
15296
15297 * src/allocate.c:
15298 Don't declare calloc() and realloc() if not necessary.
15299
15300 1999-04-13 Jesse Thilo <jthilo@gnu.org>
15301
15302 * configure.in, acconfig.h, acinclude.m4:
15303 Don't declare calloc() and realloc() if not necessary.
15304
15305 1999-03-23 Jesse Thilo <jthilo@gnu.org>
15306
15307 * po/.cvsignore: Added i18n support.
15308
15309 1999-03-23 Jesse Thilo <jthilo@gnu.org>
15310
15311 * acconfig.h, configure.in, Makefile.am:
15312 Added i18n support.
15313
15314 1999-03-22 Jesse Thilo <jthilo@gnu.org>
15315
15316 * src/bison.s1: Fixed #line numbers.
15317
15318 1999-03-15 Jesse Thilo <jthilo@gnu.org>
15319
15320 * po/es.po, po/fr.po, po/nl.po, po/de.po:
15321 Added PO files from Translation Project.
15322
15323 1999-03-03 Jesse Thilo <jthilo@gnu.org>
15324
15325 * Makefile.am:
15326 Added support for non-ANSI compilers (ansi2knr).
15327
15328 1999-02-16 Jesse Thilo <jthilo@gnu.org>
15329
15330 * configure.in: Bumped version number to 1.27.
15331
15332 * Makefile.am:
15333 Added `bison.simple' to list of files removed by `make distclean'.
15334
15335 1999-02-12 Jesse Thilo <jthilo@gnu.org>
15336
15337 * src/files.c, src/files.h:
15338 Defined locations of parser files in config.h instead of Makefile.
15339
15340 1999-02-12 Jesse Thilo <jthilo@gnu.org>
15341
15342 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
15343 Defined locations of parser files in config.h instead of Makefile.
15344
15345 1999-02-09 Jesse Thilo <jthilo@gnu.org>
15346
15347 * Makefile.am:
15348 Removed inappropriate use of $< macro.
15349
15350 1999-02-05 Jesse Thilo <jthilo@gnu.org>
15351
15352 * po/Makefile.in.in, po/POTFILES.in:
15353 Add `po' directory skeleton.
15354
15355 1999-01-27 Jesse Thilo <jthilo@gnu.org>
15356
15357 * README: Document help-bison list.
15358
15359 * configure.in: Add check for mkstemp().
15360
15361 1999-01-20 Jesse Thilo <jthilo@gnu.org>
15362
15363 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
15364 Hush a few compiler warnings.
15365
15366 * src/files.c:
15367 Add tryclose(), which verifies that fclose was successful.
15368 Hush a couple of compiler warnings.
15369
15370 1999-01-20 Jesse Thilo <jthilo@gnu.org>
15371
15372 * Makefile.am, OChangeLog:
15373 ChangeLog is now automatically generated. Include the old version as
15374 OChangeLog.
15375
15376 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15377
15378 * 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:
15379 Update FSF address.
15380
15381 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15382
15383 * doc/bison.texinfo: Fix formatting glitch.
15384
15385 * doc/bison.texinfo: Update FSF address.
15386
15387 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15388
15389 * acconfig.h: Update FSF address.
15390
15391 1999-01-08 Jesse Thilo <jthilo@gnu.org>
15392
15393 * src/system.h:
15394 Don't define PACKAGE here, since config.h defines it.
15395
15396 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15397
15398 * src/reader.c: Update copyright date.
15399
15400 * src/main.c:
15401 Ditch sprintf to statically-sized buffers in fatal/warn functions in
15402 favor of output directly to stderr (avoids buffer overruns).
15403
15404 * src/reader.c: Some checks for premature EOF.
15405
15406 * 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:
15407 Use prototypes if the compiler understands them.
15408
15409 * src/files.c: Honor TMPDIR on Unix hosts.
15410 Use prototypes if the compiler understands them.
15411
15412 * src/reader.c:
15413 Fix a couple of buffer overrun bugs.
15414 Use prototypes if the compiler understands them.
15415
15416 * src/system.h: Include unistd.h and ctype.h.
15417 Use #ifdef instead of #if for NLS symbols.
15418
15419 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15420
15421 * doc/bison.texinfo:
15422 Delete comment "consider using @set for edition number, etc..." since
15423 we now are doing so.
15424
15425 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15426
15427 * configure.in:
15428 Use prototypes if the compiler understands them.
15429
15430 * NEWS: Document 1.26 highlights.
15431
15432 * Makefile.am: Require Automake 1.3 or later.
15433
15434 * acconfig.h:
15435 Use prototypes if the compiler understands them.
15436
15437 1998-12-29 Jesse Thilo <jthilo@gnu.org>
15438
15439 * src/version.c:
15440 Use VERSION symbol from automake for version number.
15441
15442 1998-12-29 Jesse Thilo <jthilo@gnu.org>
15443
15444 * acconfig.h, configure.in, version.cin:
15445 Use VERSION symbol from automake for version number.
15446
15447 1998-11-28 Jesse Thilo <jthilo@gnu.org>
15448
15449 * Makefile.am:
15450 Distribute original version of simple parser (bison.s1), not built
15451 version (bison.simple).
15452
15453 1998-11-28 Jesse Thilo <jthilo@gnu.org>
15454
15455 * doc/bison.texinfo: Add info dir entry.
15456
15457 * doc/bison.texinfo:
15458 Let automake put version number into documentation.
15459
15460 1998-11-26 Jesse Thilo <jthilo@gnu.org>
15461
15462 * src/bison.cld, src/build.com, src/vmshlp.mar:
15463 Add non-RCS files from /gd/gnu/bison.
15464
15465 1998-11-26 Jesse Thilo <jthilo@gnu.org>
15466
15467 * doc/bison.1:
15468 Document the BISON_HAIRY and BISON_SIMPLE variables.
15469
15470 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15471
15472 * src/version.c: Build version.c automatically.
15473
15474 * src/reader.c:
15475 Fix token numbering (used to start at 258, not 257).
15476
15477 * src/system.h: Include config.h.
15478
15479 * src/getargs.c: Update bug report address.
15480
15481 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
15482 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
15483
15484 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15485
15486 * Makefile.am:
15487 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15488
15489 * configure.in, version.cin:
15490 Build version.c automatically.
15491
15492 * AUTHORS: Add AUTHORS file.
15493
15494 * README: Update bug report address.
15495
15496 * bison.simple:
15497 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15498
15499 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
15500 Add automake stuff.
15501
15502 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15503
15504 * doc/bison.texinfo: Clean up some formatting.
15505
15506 1998-05-05 Richard Stallman <rms@gnu.org>
15507
15508 * doc/bison.texinfo:
15509 Explain better why to make a pure parser.
15510
15511 1998-01-05 Richard Stallman <rms@gnu.org>
15512
15513 * src/files.c (openfiles):
15514 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
15515 find a temporary directory, if possible. Do not unlink files while
15516 they are open.
15517
15518 1997-08-25 Richard Stallman <rms@gnu.org>
15519
15520 * src/reader.c (stack_offset;):
15521 Change some warni to warns.
15522
15523 * src/lex.c (literalchar): Use warns, not warni.
15524
15525 1997-06-28 Richard Stallman <rms@gnu.org>
15526
15527 * src/bison.s1: Add a Bison version comment.
15528
15529 * src/main.c (fatal, warn, berror):
15530 Use program_name.
15531
15532 1997-06-28 Richard Stallman <rms@gnu.org>
15533
15534 * Makefile.in (bison_version): New variable.
15535 (dist): Use that variable.
15536 (bison.s1): Substitute the Bison version into bison.simple.
15537
15538 * bison.simple: Add a Bison version comment.
15539
15540 1997-06-18 Richard Stallman <rms@gnu.org>
15541
15542 * src/main.c (fatal, warn, berror):
15543 Make error messages standard.
15544 (toomany): Improve error message text.
15545
15546 * 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:
15547 new.h renamed to alloc.h.
15548
15549 1997-06-18 Richard Stallman <rms@gnu.org>
15550
15551 * Makefile.in: new.h renamed to alloc.h.
15552
15553 1997-05-24 Richard Stallman <rms@gnu.org>
15554
15555 * src/lex.c (literalchar):
15556 Fix the code for escaping \, " and '.
15557
15558 (lex): Avoid trouble when there are many chars
15559 to discard in a char literal with just several chars in it.
15560
15561 1997-05-17 Richard Stallman <rms@gnu.org>
15562
15563 * src/bison.s1:
15564 Use malloc, if using alloca is troublesome.
15565 (YYSTACK_USE_ALLOCA): New flag macro.
15566 Define it for some systems and compilers.
15567 (YYSTACK_ALLOC): New macro.
15568 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15569 If it was malloc'd, free it.
15570
15571 1997-05-17 Richard Stallman <rms@gnu.org>
15572
15573 * bison.simple:
15574 Use malloc, if using alloca is troublesome.
15575 (YYSTACK_USE_ALLOCA): New flag macro.
15576 Define it for some systems and compilers.
15577 (YYSTACK_ALLOC): New macro.
15578 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15579 If it was malloc'd, free it.
15580
15581 1997-04-23 Richard Stallman <rms@gnu.org>
15582
15583 * src/bison.s1:
15584 (alloca) [__hpux]: Always define as __builtin_alloca.
15585
15586 1997-04-23 Richard Stallman <rms@gnu.org>
15587
15588 * bison.simple:
15589 (alloca) [__hpux]: Always define as __builtin_alloca.
15590
15591 1997-04-22 Richard Stallman <rms@gnu.org>
15592
15593 * src/bison.s1:
15594 [__hpux]: Include alloca.h (right for HPUX 10)
15595 instead of declaring alloca (right for HPUX 9).
15596
15597 * src/bison.s1 (__yy_memcpy):
15598 Declare arg `count' as unsigned int.
15599 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15600
15601 1997-04-22 Richard Stallman <rms@gnu.org>
15602
15603 * bison.simple:
15604 [__hpux]: Include alloca.h (right for HPUX 10)
15605 instead of declaring alloca (right for HPUX 9).
15606
15607 * bison.simple (__yy_memcpy):
15608 Declare arg `count' as unsigned int.
15609 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15610
15611 1997-01-03 Richard Stallman <rms@gnu.org>
15612
15613 * src/allocate.c: [__STDC__ or _MSC_VER]:
15614 Declare calloc and realloc to return void *.
15615
15616 1997-01-02 Richard Stallman <rms@gnu.org>
15617
15618 * src/system.h:
15619 [_MSC_VER]: Include stdlib.h and process.h.
15620 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
15621
15622 * src/main.c (main): Return FAILURE as a value.
15623 (printable_version): Declare arg as int, not char.
15624
15625 1997-01-02 Richard Stallman <rms@gnu.org>
15626
15627 * Makefile.in (dist):
15628 Explicitly check for symlinks, and copy them.
15629
15630 1996-12-19 Richard Stallman <rms@gnu.org>
15631
15632 * src/files.c:
15633 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
15634
15635 1996-12-18 Paul Eggert <eggert@gnu.org>
15636
15637 * src/bison.s1 (yyparse):
15638 If __GNUC__ and YYPARSE_PARAM are both defined,
15639 declare yyparse to have a void * argument.
15640
15641 1996-12-18 Paul Eggert <eggert@gnu.org>
15642
15643 * bison.simple (yyparse):
15644 If __GNUC__ and YYPARSE_PARAM are both defined,
15645 declare yyparse to have a void * argument.
15646
15647 1996-12-17 Richard Stallman <rms@gnu.org>
15648
15649 * src/reduce.c (nbits): Add some casts.
15650
15651 1996-08-12 Richard Stallman <rms@gnu.org>
15652
15653 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
15654
15655 1996-08-12 Richard Stallman <rms@gnu.org>
15656
15657 * bison.simple: Test _MSDOS as well as _MSDOS_.
15658
15659 1996-07-31 Richard Stallman <rms@gnu.org>
15660
15661 * src/bison.s1:
15662 [__sun && __i386]: Include alloca.h.
15663
15664 1996-07-31 Richard Stallman <rms@gnu.org>
15665
15666 * bison.simple:
15667 [__sun && __i386]: Include alloca.h.
15668
15669 1996-07-30 Richard Stallman <rms@gnu.org>
15670
15671 * src/bison.s1: Comment change.
15672
15673 * src/bison.s1: Test _MSDOS_, not MSDOS.
15674
15675 1996-07-30 Richard Stallman <rms@gnu.org>
15676
15677 * bison.simple: Comment change.
15678
15679 * bison.simple: Test _MSDOS_, not MSDOS.
15680
15681 1996-06-01 Richard Stallman <rms@gnu.org>
15682
15683 * 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:
15684 Insert `_' macro around many string constants.
15685
15686 * src/main.c:
15687 Insert `_' macro around many string constants.
15688
15689 (main): Call setlocale, bindtextdomain and textdomain.
15690
15691 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
15692 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
15693 [ENABLE_NLS]: Include libintl.h.
15694 [ENABLE_NLS] (gettext): Define.
15695 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
15696 (N_, PACKAGE, LOCALEDIR): New macros.
15697
15698 1996-06-01 Richard Stallman <rms@gnu.org>
15699
15700 * POTFILES.in: New file.
15701
15702 * Makefile.in (allocate.o):
15703 Define target explicitly.
15704
15705 * Makefile.in (CFLAGS): Set to @CFLAGS@.
15706 (LDFLAGS): Set to @LDFLAGS@.
15707 (configure): Run autoconf only if preceding `cd' succeeds.
15708 (bison.s1): Redirect output to temporary file then move the
15709 temporary to the target, rather than redirecting directly to bison.s1.
15710 (clean): Remove config.status and config.log.
15711 (distclean): Don't remove config.status here.
15712
15713 1996-05-12 Richard Stallman <rms@gnu.org>
15714
15715 * src/bison.s1:
15716 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
15717
15718 1996-05-12 Richard Stallman <rms@gnu.org>
15719
15720 * bison.simple:
15721 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
15722
15723 1996-05-11 Richard Stallman <rms@gnu.org>
15724
15725 * src/bison.s1 (__yy_memcpy):
15726 Really reorder the args, as was supposedly done on Feb 14 1995.
15727 (yyparse): Calls changed accordingly.
15728
15729 1996-05-11 Richard Stallman <rms@gnu.org>
15730
15731 * Makefile.in (dist): Don't use $(srcdir).
15732
15733 * bison.simple (__yy_memcpy):
15734 Really reorder the args, as was supposedly done on Feb 14 1995.
15735 (yyparse): Calls changed accordingly.
15736
15737 1996-01-27 Richard Stallman <rms@gnu.org>
15738
15739 * src/output.c (output_rule_data):
15740 Test YYERROR_VERBOSE in the conditional
15741 around the definition of ttyname.
15742
15743 1995-12-29 Richard Stallman <rms@gnu.org>
15744
15745 * src/bison.s1:
15746 Fix line numbers in #line commands.
15747
15748 1995-12-29 Richard Stallman <rms@gnu.org>
15749
15750 * bison.simple:
15751 Fix line numbers in #line commands.
15752
15753 1995-12-27 Richard Stallman <rms@gnu.org>
15754
15755 * src/bison.s1 (YYPARSE_PARAM_DECL):
15756 In C++, make it always null.
15757 (YYPARSE_PARAM_ARG): New macro.
15758 (yyparse): Use YYPARSE_PARAM_ARG.
15759
15760 1995-12-27 Richard Stallman <rms@gnu.org>
15761
15762 * bison.simple (YYPARSE_PARAM_DECL):
15763 In C++, make it always null.
15764 (YYPARSE_PARAM_ARG): New macro.
15765 (yyparse): Use YYPARSE_PARAM_ARG.
15766
15767 1995-11-29 Richard Stallman <rms@gnu.org>
15768
15769 * doc/bison.texinfo:
15770 Describe literal string tokens, %raw, %no_lines, %token_table.
15771
15772 1995-11-29 Daniel Hagerty <hag@gnu.org>
15773
15774 * doc/bison.texinfo: Fixed update date
15775
15776 1995-10-16 Richard Stallman <rms@gnu.org>
15777
15778 * src/version.c: Version 1.25.
15779
15780 1995-10-16 Richard Stallman <rms@gnu.org>
15781
15782 * NEWS: *** empty log message ***
15783
15784 1995-10-16 Richard Stallman <rms@gnu.org>
15785
15786 * doc/bison.1, doc/bison.rnh:
15787 Add new options.
15788
15789 1995-10-15 Richard Stallman <rms@gnu.org>
15790
15791 * src/vmsgetargs.c, src/getargs.c:
15792 Added -n, -k, and -raw switches.
15793 (noparserflag, toknumflag, rawtoknumflag): New variables.
15794
15795 * src/symtab.h (SALIAS):
15796 New #define for adding aliases to %token.
15797 (struct bucket): Added `alias' field.
15798
15799 * src/reduce.c (reduce_grammar):
15800 Revise error message.
15801 (print_notices): Remove final `.' from error message.
15802
15803 * src/reader.c (reader_output_yylsp):
15804 New function.
15805 (readgram): Use `#if 0' around code that accepted %command
15806 inside grammar rules: The documentation doesn't allow it,
15807 and it will fail since the %command processors scan for the next %.
15808 (parse_token_decl): Extended the %token
15809 declaration to allow a multi-character symbol as an alias.
15810 (parse_thong_decl): New function.
15811 (read_declarations): Added %thong declarations.
15812 (read_declarations): Handle NOOP to deal with allowing
15813 % declarations as another means to specify the flags.
15814 (readgram): Allow %prec prior to semantics embedded in a rule.
15815 (skip_to_char, read_declarations, copy_definition)
15816 (parse_token_decl, parse_start_decl, parse_type_decl)
15817 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
15818 (get_type_name, copy_guard, copy_action, readgram)
15819 (get_type, packsymbols): Revised most error messages.
15820 Changed `fatal' to `warnxxx' to avoid aborting for error.
15821 Revised and use multiple warnxxx functions to avoid using VARARGS1.
15822 (read_declarations): Improve the error message for
15823 an invalid character. Do not abort.
15824 (read_declarations, copy_guard, copy_action): Use
15825 printable_version to avoid unprintable characters in printed output.
15826 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
15827 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
15828 Allow the type of a non-terminal can be given
15829 more than once, as long as all specifications give the same type.
15830
15831 * src/output.c:
15832 (output_headers, output_trailers, output, output_gram)
15833 (output_rule_data): Implement noparserflag variable.
15834 Implement toknumflag variable.
15835 (output): Call reader_output_yylsp to output LTYPESTR.
15836
15837 * src/main.c (main):
15838 If reader sees an error, don't process the grammar.
15839 (fatals): Updated to not use VARARGS1.
15840 (printable_version, int_to_string, warn, warni, warns, warnss)
15841 (warnsss): New error reporting functions. Avoid abort for error.
15842
15843 * src/lex.h:
15844 Added THONG and NOOP for alias processing.
15845 Added SETOPT for the new code that allows setting options with %flags.
15846
15847 * src/lex.c:
15848 Include getopt.h. Add some extern decls.
15849 (safegetc): New function to deal with EOF gracefully.
15850 (literalchar); new function to deal with reading \ escapes.
15851 (lex): Use literalchar.
15852 (lex): Implemented "..." tokens.
15853 (literalchar, lex, parse_percent_token): Made tokenbuffer
15854 always contain the token. This includes growing the token
15855 buffer while reading an integer.
15856 (parse_percent_token): Replaced if-else statement with percent_table.
15857 (parse_percent_token): Added % declarations as another
15858 way to specify the flags -n, -l, and -r. Also added hooks for
15859 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
15860 major changes to files.c.
15861 (lex) Retain in the incoming stream a character following
15862 an incorrect '/'.
15863 (skip_white_space, lex): Revised most error messages
15864 and changed fatal to warn to avoid aborting.
15865 (percent_table): Added %thong declarations.
15866
15867 * src/gram.h: Comment changes.
15868
15869 * src/files.c (openfiles, open_extra_files, done):
15870 Add faction flag
15871 and actfile file. Handle noparserflag. Both for -n switch.
15872
15873 * src/conflicts.c (resolve_sr_conflict):
15874 Remove use of alloca.
15875
15876 1995-06-01 Jim Meyering <meyering@gnu.org>
15877
15878 * doc/bison.texinfo: *** empty log message ***
15879
15880 1995-05-06 Richard Stallman <rms@gnu.org>
15881
15882 * src/bison.s1: Comment change.
15883
15884 1995-05-06 Richard Stallman <rms@gnu.org>
15885
15886 * bison.simple: Comment change.
15887
15888 1995-05-03 Richard Stallman <rms@gnu.org>
15889
15890 * src/version.c: Version now 1.24.
15891
15892 * src/bison.s1: Change distribution terms.
15893
15894 * src/version.c: Version now 1.23.
15895
15896 1995-05-03 Richard Stallman <rms@gnu.org>
15897
15898 * doc/bison.texinfo:
15899 Rewrite "Conditions for Using Bison".
15900 Update version to 1.24.
15901
15902 1995-05-03 Richard Stallman <rms@gnu.org>
15903
15904 * bison.simple: Change distribution terms.
15905
15906 1995-02-23 Richard Stallman <rms@gnu.org>
15907
15908 * src/files.c: Test __VMS_POSIX as well as VMS.
15909
15910 1995-02-14 Jim Meyering <meyering@gnu.org>
15911
15912 * src/bison.s1 (__yy_memcpy):
15913 Renamed from __yy_bcopy to avoid
15914 confusion. Reverse FROM and TO arguments to be consistent with
15915 those of memcpy.
15916
15917 1995-02-14 Jim Meyering <meyering@gnu.org>
15918
15919 * bison.simple (__yy_memcpy):
15920 Renamed from __yy_bcopy to avoid
15921 confusion. Reverse FROM and TO arguments to be consistent with
15922 those of memcpy.
15923
15924 1994-11-10 David J. MacKenzie <djm@gnu.org>
15925
15926 * NEWS: reformat
15927
15928 * NEWS: New file.
15929
15930 * Makefile.in (DISTFILES): Include NEWS.
15931
15932 * Makefile.in (DISTFILES):
15933 Include install-sh, not install.sh.
15934
15935 * configure.in: Update to Autoconf v2 macro names.
15936
15937 1994-10-05 David J. MacKenzie <djm@gnu.org>
15938
15939 * Makefile.in: fix typo
15940
15941 * Makefile.in (prefix, exec_prefix):
15942 Let configure set them.
15943
15944 1994-09-28 David J. MacKenzie <djm@gnu.org>
15945
15946 * Makefile.in: Set datadir to $(prefix)/share.
15947
15948 1994-09-15 Richard Stallman <rms@gnu.org>
15949
15950 * src/bison.s1:
15951 Update copyright notice and GPL version.
15952
15953 1994-09-15 Richard Stallman <rms@gnu.org>
15954
15955 * bison.simple:
15956 Update copyright notice and GPL version.
15957
15958 1994-07-12 Richard Stallman <rms@gnu.org>
15959
15960 * src/reduce.c, src/reader.c:
15961 entered into RCS
15962
15963 1994-05-05 David J. MacKenzie <djm@gnu.org>
15964
15965 * Makefile.in: entered into RCS
15966
15967 1994-03-26 Richard Stallman <rms@gnu.org>
15968
15969 * src/bison.s1: entered into RCS
15970
15971 1994-03-26 Richard Stallman <rms@gnu.org>
15972
15973 * bison.simple: entered into RCS
15974
15975 1994-03-25 Richard Stallman <rms@gnu.org>
15976
15977 * src/main.c: entered into RCS
15978
15979 1994-03-24 Richard Stallman <rms@gnu.org>
15980
15981 * src/conflicts.c: entered into RCS
15982
15983 1994-01-02 Richard Stallman <rms@gnu.org>
15984
15985 * Makefile.in: *** empty log message ***
15986
15987 1993-11-21 Richard Stallman <rms@gnu.org>
15988
15989 * src/bison.s1: *** empty log message ***
15990
15991 1993-11-21 Richard Stallman <rms@gnu.org>
15992
15993 * doc/bison.texinfo: entered into RCS
15994
15995 * doc/bison.texinfo: *** empty log message ***
15996
15997 1993-11-21 Richard Stallman <rms@gnu.org>
15998
15999 * bison.simple: *** empty log message ***
16000
16001 1993-10-25 David J. MacKenzie <djm@gnu.org>
16002
16003 * doc/bison.texinfo: *** empty log message ***
16004
16005 1993-10-19 Richard Stallman <rms@gnu.org>
16006
16007 * src/bison.s1: *** empty log message ***
16008
16009 1993-10-19 Richard Stallman <rms@gnu.org>
16010
16011 * bison.simple: *** empty log message ***
16012
16013 1993-10-14 Richard Stallman <rms@gnu.org>
16014
16015 * src/bison.s1: *** empty log message ***
16016
16017 1993-10-14 Richard Stallman <rms@gnu.org>
16018
16019 * bison.simple: *** empty log message ***
16020
16021 1993-09-14 David J. MacKenzie <djm@gnu.org>
16022
16023 * doc/bison.texinfo: *** empty log message ***
16024
16025 1993-09-13 Noah Friedman <friedman@gnu.org>
16026
16027 * Makefile.in: *** empty log message ***
16028
16029 1993-09-10 Richard Stallman <rms@gnu.org>
16030
16031 * src/conflicts.c: *** empty log message ***
16032
16033 * src/system.h: entered into RCS
16034
16035 1993-09-10 Richard Stallman <rms@gnu.org>
16036
16037 * doc/bison.1: entered into RCS
16038
16039 1993-09-06 Noah Friedman <friedman@gnu.org>
16040
16041 * src/version.c: entered into RCS
16042
16043 1993-09-06 Noah Friedman <friedman@gnu.org>
16044
16045 * Makefile.in: *** empty log message ***
16046
16047 1993-07-30 David J. MacKenzie <djm@gnu.org>
16048
16049 * Makefile.in: *** empty log message ***
16050
16051 1993-07-24 Richard Stallman <rms@gnu.org>
16052
16053 * src/bison.s1: *** empty log message ***
16054
16055 1993-07-24 Richard Stallman <rms@gnu.org>
16056
16057 * bison.simple: *** empty log message ***
16058
16059 1993-07-08 David J. MacKenzie <djm@gnu.org>
16060
16061 * Makefile.in: *** empty log message ***
16062
16063 1993-07-04 Richard Stallman <rms@gnu.org>
16064
16065 * src/bison.s1: *** empty log message ***
16066
16067 1993-07-04 Richard Stallman <rms@gnu.org>
16068
16069 * bison.simple: *** empty log message ***
16070
16071 1993-06-26 David J. MacKenzie <djm@gnu.org>
16072
16073 * src/getargs.c: entered into RCS
16074
16075 1993-06-26 David J. MacKenzie <djm@gnu.org>
16076
16077 * doc/bison.texinfo: *** empty log message ***
16078
16079 * doc/bison.1: New file.
16080
16081 1993-06-25 Richard Stallman <rms@gnu.org>
16082
16083 * src/getargs.c: New file.
16084
16085 1993-06-16 Richard Stallman <rms@gnu.org>
16086
16087 * src/bison.s1: *** empty log message ***
16088
16089 1993-06-16 Richard Stallman <rms@gnu.org>
16090
16091 * bison.simple: *** empty log message ***
16092
16093 1993-06-03 Richard Stallman <rms@gnu.org>
16094
16095 * src/bison.s1: New file.
16096
16097 1993-06-03 Richard Stallman <rms@gnu.org>
16098
16099 * doc/bison.texinfo: *** empty log message ***
16100
16101 1993-06-03 Richard Stallman <rms@gnu.org>
16102
16103 * bison.simple: New file.
16104
16105 1993-05-19 Richard Stallman <rms@gnu.org>
16106
16107 * doc/bison.texinfo: New file.
16108
16109 1993-05-07 Noah Friedman <friedman@gnu.org>
16110
16111 * Makefile.in: *** empty log message ***
16112
16113 1993-04-28 Noah Friedman <friedman@gnu.org>
16114
16115 * src/reader.c: *** empty log message ***
16116
16117 1993-04-23 Noah Friedman <friedman@gnu.org>
16118
16119 * src/alloc.h: entered into RCS
16120
16121 1993-04-20 David J. MacKenzie <djm@gnu.org>
16122
16123 * src/version.c: *** empty log message ***
16124
16125 * src/files.c, src/allocate.c:
16126 entered into RCS
16127
16128 * src/reader.c: *** empty log message ***
16129
16130 * src/lex.c: entered into RCS
16131
16132 * src/conflicts.c: New file.
16133
16134 * src/symtab.c: entered into RCS
16135
16136 * src/alloc.h: New file.
16137
16138 * src/LR0.c: entered into RCS
16139
16140 1993-04-18 Noah Friedman <friedman@gnu.org>
16141
16142 * src/reader.c: New file.
16143
16144 * src/version.c: *** empty log message ***
16145
16146 1993-04-18 Noah Friedman <friedman@gnu.org>
16147
16148 * Makefile.in: *** empty log message ***
16149
16150 1993-04-17 Noah Friedman <friedman@gnu.org>
16151
16152 * Makefile.in: *** empty log message ***
16153
16154 1993-04-15 Richard Stallman <rms@gnu.org>
16155
16156 * src/main.c, src/files.c:
16157 New file.
16158
16159 1993-04-15 Noah Friedman <friedman@gnu.org>
16160
16161 * configure.in: entered into RCS
16162
16163 * configure.in: *** empty log message ***
16164
16165 * configure.in: New file.
16166
16167 1993-04-14 Richard Stallman <rms@gnu.org>
16168
16169 * Makefile.in: New file.
16170
16171 1993-04-13 Richard Stallman <rms@gnu.org>
16172
16173 * src/version.c: New file.
16174
16175 1993-03-25 Richard Stallman <rms@gnu.org>
16176
16177 * src/output.c: entered into RCS
16178
16179 1992-09-25 Richard Stallman <rms@gnu.org>
16180
16181 * configure.bat: entered into RCS
16182
16183 1992-06-22 Richard Stallman <rms@gnu.org>
16184
16185 * src/vmsgetargs.c: entered into RCS
16186
16187 1992-06-22 Richard Stallman <rms@gnu.org>
16188
16189 * doc/bison.rnh: entered into RCS
16190
16191 1992-04-20 David J. MacKenzie <djm@gnu.org>
16192
16193 * README: entered into RCS
16194
16195 1992-01-22 Richard Stallman <rms@gnu.org>
16196
16197 * src/machine.h: entered into RCS
16198
16199 1991-12-21 Richard Stallman <rms@gnu.org>
16200
16201 * src/lalr.c, src/closure.c:
16202 entered into RCS
16203
16204 1991-12-20 Richard Stallman <rms@gnu.org>
16205
16206 * src/state.h: entered into RCS
16207
16208 1991-12-18 Richard Stallman <rms@gnu.org>
16209
16210 * src/print.c, src/nullable.c, src/derives.c:
16211 entered into RCS
16212
16213 1991-11-03 David J. MacKenzie <djm@gnu.org>
16214
16215 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
16216 entered into RCS
16217
16218 1988-09-09 Richard Stallman <rms@gnu.org>
16219
16220 * src/bison.hairy: entered into RCS
16221
16222 1987-12-16 Richard Stallman <rms@gnu.org>
16223
16224 * REFERENCES: entered into RCS
16225
16226
16227 -----
16228
16229 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
16230 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
16231 Software Foundation, Inc.
16232
16233 Copying and distribution of this file, with or without
16234 modification, are permitted provided the copyright notice and this
16235 notice are preserved.
16236
16237 $Id$