]> git.saurik.com Git - bison.git/blame - ChangeLog
For push mode, add pull wrappers around yypush_parse.
[bison.git] / ChangeLog
CommitLineData
c3d50342
JD
12006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 For push mode, add pull wrappers around yypush_parse.
4 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5 (yypull_parse): New function wrapping yypush_parse.
6 (yyparse): New #define wrapping yypull_parse.
7 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
8 is declared.
9 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
10 prototype yylex in the module that calls yyparse, and don't prototype
11 yyparse there. Otherwise, the yyparse expansion won't compile.
12 * tests/input.at (Torturing the Scanner): Likewise.
13
94ebeba5
JD
142006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
15
16 Enable push parsers to operate in impure mode. Thus, %push-parser no
17 longer implies %pure-parser. The point of this change is to move
18 towards being able to test the push parser code by running the entire
19 test suite as if %push-parser had been declared.
20 * data/push.c (yypush_parse): For impure mode, remove the
21 yypushed_char, yypushed_val, and yypushed_loc arguments.
22 Instead, declare these as local variables initialized to the global
23 yychar, yylval, and yylloc.
24 For the first yypush_parse invocation only, restore the initial values
25 of these global variables when it's time to read a token since they
26 have been overwritten.
27 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
28 %push-parser.
29 * tests/calc.at (Simple LALR(1) Calculator): Always declare
30 %pure-parser along with %push-parser since this test case was designed
31 for pure push parsers.
32 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
33 (AT_YACC_OR_PUSH_IF): New.
34 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
35 add a note that it's still wrong for some cases (as it has been for a
36 while).
37 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
38 %push-parser no longer implies %pure-parser.
39
a0633178
JD
402006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
41
42 Remove some unnecessary differences between the pull parser code and
43 the push parser code. This patch enables yynerrs in push mode.
44 * data/push.c: Reformat M4 a little.
45 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
46 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
47 because push mode is on. Instead, if pure mode is on, move yynerrs
48 to...
49 (b4_declare_parser_state_variables): ... here.
50 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
51 to yyps->NAME so it can be used in yypush_parse.
52 (yypush_parse): Don't omit uses of yynerrs in push mode.
53
8646b6a3
JD
542006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
55
56 Fix bug such that the first pushed token's value and location are
57 sometimes overwritten (sometimes by %initial-action) before being used.
58 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
59 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
60 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
61 more closely mimic the pull parser logic.
62 Don't copy the pushed token to yychar, yylval, and yylloc until it's
63 time to read a token, which is after any initialization of yylval and
64 yylloc.
65 (gottoken): Rename label to...
66 (yyread_pushed_token): ... for clarity and to avoid infringing on the
67 user namespace.
68
9baf4d74
JD
692006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
70
71 Rearrange initialization of the parser state variables so that the
72 skeleton doesn't have to have a copy for pull mode and another for push
73 mode. This patch also fixes at least a bug such that yylloc was not
74 initialized (with b4_location_initial_line and
75 b4_location_initial_column) upon calling yypush_parse. However, that
76 initialization now overwrites the first token's location;
77 %initial-action assigning @$ already did the same thing, and both bugs
78 will be fixed in a later patch.
79 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
80 (b4_declare_parser_state_variables): Remove initialization of yytoken,
81 yyss, yyvs, yyls, and yystacksize.
82 (yypstate_new): Remove initialization of some yypstate fields: yystate,
83 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
84 yylsp.
85 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
86 yyps->NAME so it can be used in yypush_parse.
87 (yyparse or yypush_parse): For yypush_parse, don't print the
88 "Starting parse" diagnostic for invocations after the first.
89 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
90 yypush_parse, only do it for the first invocation.
91 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
92 initialization to occur in yypush_parse but only on the first
93 invocation.
94
23522164
JD
952006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
96
97 * data/push.c: Add CPP guards around push parser declarations in both
98 the header and the code file.
99 In the code file, move the push parser declarations to the same place
100 they appear in the header file.
101 Clean up the M4 some, especially the inconsistent underquoting in
102 some b4_c_function_def and b4_c_function_decl uses.
103
bb010fe5
JD
1042006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
105
106 Encapsulate the push parser state variables into an M4 macro so the
107 push skeleton doesn't have to list them again for pull mode's yyparse.
108 For push mode, remove yypush_parse's local equivalents of these
109 variables to eliminate unnecessary copying between the two sets at
110 run-time. This patch also fixes at least a bug related to multiple
111 %initial-action invocations in push mode.
112 * data/push.c (b4_declare_parser_variables): Rename to...
113 (b4_declare_scanner_communication_variables): ... this for clarity and
114 update both uses.
115 (b4_declare_yyparse_variables): Remove and move its contents to the one
116 spot where it was invoked.
117 (b4_declare_parser_state_variables): New macro containing the parser
118 state variables required by push mode.
119 (struct yypstate): Replace all fields but yynew with
120 b4_declare_parser_state_variables.
121 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
122 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
123 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
124 (yyparse or yypush_parse): For yyparse in pull mode, replace local
125 parser state variable declarations with
126 b4_declare_parser_state_variables.
127 Don't initialize parser state variables when calling yypush_parse since
128 yypstate_new already does that.
129 Invoke the user's initial action only upon the first yypush_parse
130 invocation.
131 Remove all code that copies between the local parser state variables
132 and the yypstate.
133
2d212f8c
JD
1342006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
135
136 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
137 prevent a name collision in a future patch where these names will
138 sometimes be #define'd.
139 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
140 since it no longer has the same name as the existing argument.
141 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
142
e6e704dc
JD
1432006-12-19 Paolo Bonzini <bonzini@gnu.org>
144 and Joel E. Denny <jdenny@ces.clemson.edu>
145
146 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
147 that the argument is case-insensitive, and there's no `=' here.
148 For the %skeleton entry, mention that %language is better.
149 (Bison Options): Likewise for --language and --skeleton. Move the
150 --skeleton entry so that the `Tuning the parser' section is sorted
151 alphabetically on long options.
152 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
153 %language directive in detail here; cross-reference the %language
154 documentation instead.
155 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
156 `%require "2.3b"' so that the example is always up-to-date.
157 (Bison Symbols): Add entries for %language and %skeleton.
158 * examples/extexi (normalize): Instead of replacing every %require
159 argument with the current Bison version, just substitute for
160 `@value{VERSION}'. This guarantees that we're testing what actually
161 appears in the documentation.
162 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
163 rather than `@VERSION@'.
164
0e021770
PE
1652006-12-18 Paul Eggert <eggert@cs.ucla.edu>
166
fd575f05
PE
167 * NEWS: Reword the %language news a bit, and put it earlier.
168
0e021770
PE
169 * src/getargs.c (skeleton_arg): Last arg is now location const *.
170 Rewrite to simplify the logic.
171 (language_argmatch): Likewise.
fd575f05
PE
172 (program_name): We now own this var.
173 * src/getargs.h (struct bison_language): Use char[] rather than
174 const char *.
0e021770
PE
175
176 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
177 Java is supported.
178 * src/complain.c (program_name): Remove decl; no longer needed.
179 * src/main.c (program_name): Remove; now belongs to getargs.
180
1812006-12-18 Paolo Bonzini <bonzini@gnu.org>
182
183 * NEWS: Document %language.
184
185 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
186
187 * data/c-skel.m4, data/c++-skel.m4: New files.
188 * data/glr.c: Complain on push parsers.
189
190 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
191 over %skeleton.
192 (Directives): Document %language and %skeleton.
193 (Command line): Document -L.
194
195 * examples/extexi: Rewrite %require directive.
196 * examples/calc++/Makefile.am: Pass VERSION to extexi.
197
198 * src/files.c (compute_exts_from_gc): Look in language structure
199 for .y extension.
200 (compute_file_name_parts): Check whether .tab should be added.
201 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
202 (language, skeleton_arg, language_argmatch): New.
203 (long_options): Add --language.
204 (getargs): Use skeleton_arg, add -L/--language.
205 * src/getargs.h: Include location.h.
206 (struct bison_language, language, skeleton_arg, language_argmatch): New.
207 * src/output.c (prepare): Pick default skeleton from struct language.
208 Don't dispatch C skeletons here.
209 * src/parse-gram.y (PERCENT_LANGUAGE): New.
210 (prologue_declaration): Add "%language" rule, use skeleton_arg.
211 * src/scan-gram.l ("%language"): New rule.
212
213 * tests/calc.at: Test %skeleton and %language.
214 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
215 (AT_GLR_IF): Look for %skeleton "glr.cc".
216 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
217 (AT_YACC_IF): Reject %language.
218
5691bf57
PE
2192006-12-18 Paul Eggert <eggert@cs.ucla.edu>
220
db06f0ce
PE
221 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
222 since it wasn't used; only the typedef name 'semantic_type' is needed.
223 Also, omit trailing white space.
224
5691bf57
PE
225 * bootstrap: Sync from coreutils.
226 (gnulib_extra_files): Add build-aux/announce.gen.
227 (slurp): Adjust .gitignore files like .cvsignore files.
228 * build-aux/announce-gen: Remove from CVS, since bootstrap
229 now creates this.
230
791934e4
JD
2312006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
232
233 Make %push-parser imply %pure-parser. This fixes several bugs; see
234 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
235 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
236 pure_parser = true.
237 * data/push.c: Don't bother testing b4_push_if when deciding whether
238 to expand b4_declare_parser_variables globally.
239 (yypush_parse): Likewise in here.
240
241 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
242 (yy_reduce_print): Reformat M4 for readability.
243
ee5abb37
JD
2442006-12-15 Bob Rossi <bob@brasko.net>
245 and Joel Denny <jdenny@ces.clemson.edu>
246
247 * data/push.c (yypstate): Add typedef, and update all uses of
248 struct yypstate to just yypstate.
249 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
250
16ca01f9
JD
2512006-12-14 Bob Rossi <bob@brasko.net>
252
253 * data/push.c (yypush_parse): Declare prototype regardless of
254 %locations option.
255
ab8e7e1a
JD
2562006-12-14 Bob Rossi <bob@brasko.net>
257
258 * data/push.c (yyparse): Remove the prototype and the #define when in
259 push-parser mode.
260
9bf32be3
JD
2612006-12-13 Bob Rossi <bob@brasko.net>
262
263 * data/push.c (yypstate_init): Rename to...
264 (yypstate_new): ... this and use b4_c_function_def.
265 (yypstate_delete): New.
266 (yypush_parse): Change parameters yynval and yynlloc to be const.
267 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
268 yypstate_delete functions.
269
f02e2948
JD
2702006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
271
272 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
273 strange test case titles. Reported by Bob Rossi.
274
38eb7751
PE
2752006-12-13 Paul Eggert <eggert@cs.ucla.edu>
276
277 * TODO: Add pointer to Sylvain Schmitz's work on static detection
278 of potential ambiguities in GLR grammers.
279
bd9d212b
JD
2802006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
281
282 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
283 `bison ', use m4_index instead of m4_substr since chopping up a string
284 containing M4-special characters causes problems here.
285
286 Fix a couple of bugs related to special characters in user-specified
287 file names, and make it easier for skeletons to compute output file
288 names with the same file name prefix as Bison-computed output file
289 names.
290 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
291 b4_parser_file_name and b4_spec_defines_file instead of
292 @output_parser_name@ and @output_header_name@, which are now redundant.
293 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
294 b4_parser_file_name, b4_spec_defines_file, and the new
295 @basename(FILENAME@) instead of @output_parser_name@ and
296 @output_header_name@, which inappropriately escaped the file names as
297 C string literals.
298 * src/files.c (all_but_ext): Remove static qualifier.
299 (compute_output_file_names): Move `free (all_but_ext)' to...
300 (output_file_names_free): ... here since all_but_ext is needed later.
301 * src/files.h (all_but_ext): Extern.
302 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
303 exactly what MUSCLE_INSERT_STRING used to do.
304 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
305 characters are escaped properly.
306 * src/output.c (prepare): Define muscle file_name_all_but_ext as
307 all_but_ext.
308 For pkgdatadir muscle, maintain previous functionality by using
309 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
310 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
311 digraphs would never be expanded. Hopefully no one has M4-special
312 characters in his Bison installation path.
313 * src/scan-skel.l: Don't parse @output_header_name@ and
314 @output_parser_name@ anymore since they're now redundant.
315 In @output, use decode_at_digraphs.
316 Parse a new @basename command that invokes last_component.
317 (decode_at_digraphs): New.
318 (BASE_QPUTS): Remove unused.
319 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
320 (Output file name): New tests.
321
3f7ca628
JD
3222006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
323
324 Warn about output files that are generated by the skeletons and that
325 conflict with other output files.
326 * data/glr.c: Don't generate the header file here when glr.cc does.
327 * src/files.c (file_names, file_names_count): New static globals.
328 (compute_output_file_names): Invoke output_file_name_check for files
329 not generated by the skeletons and remove existing checks.
330 (output_file_name_check): New function that warns about conflicting
331 output file names.
332 (output_file_names_free): Free file_names.
333 * src/files.h (output_file_name_check): Declare.
334 * src/scan-skel.l: Invoke output_file_name_check for files generated by
335 the skeletons.
336 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
337 (Conflicting output files): New tests.
338
178e123e
PE
3392006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
340
341 * doc/bison.texinfo: Fix a couple of typos.
342
3432006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
344
345 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
346 Rename to...
347 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
348 update all uses.
349 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
350 (yypush_parse): Rename yypvars argument to yyps and remove redundant
351 local pv.
352 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
353 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
354
ea17f233
JD
3552006-12-07 Bob Rossi <bob@brasko.net>
356 and Joel Denny <jdenny@ces.clemson.edu>
357
358 * data/push.c (yypvarsinit): Change return type from void* to struct
359 yypvars*. No longer cast to void* on return.
360 (struct yypvars): Remove yylen since it need not be remembered between
361 yypushparse invocations.
362 (yypushparse): Don't copy between yylen and pv->yylen.
363
55a30bda
JD
3642006-12-05 Bob Rossi <bob@brasko.net>
365
366 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
367 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
368 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
369 (struct yypvars): Remove b4_declare_parser_variables.
370 (yypvarsinit): Remove init code for removed variables.
371 (global scope): Do not declare b4_declare_parser_variables if
372 push or pure mode.
373 (yypushparse): Add b4_declare_parser_variables.
374 Init new local variables, and remove init code for removed
375 yypvars variables.
376 (yyparse): Delete.
377 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
378 and yyparse for other modes.
379 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
380 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
381 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
382 (AT_PURE_LEX_IF): True if pure or push parser.
383
85894313
JD
3842006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
385
386 Document Yacc prologue alternatives and default %destructor's and
387 %printer's as experimental. Don't mention Java yet. Discussed at
388 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
389 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
390 (2.3a): Annotate this entry to say the old forms of these features were
391 also experimental.
392 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
393 Bison Symbols): Say they're experimental. Comment out any mention
394 of Java (we'll want this back eventually).
395
02975b9a
JD
3962006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
397
398 Support a file name argument to %defines. Deprecate `=' in
399 %file-prefix, %name-prefix, and %output. Discussed at
400 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
401 * NEWS (2.3a+): Mention.
402 * doc/bison.texinfo (Decl Summary, Bison Symbols): Add entry for new
403 form of %defines, and remove `=' from entries for %file-prefix,
404 %name-prefix, and %output.
405 * src/parse-gram.y (prologue_declaration): Implement.
406 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
407 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
408 all but one occurrence of %name-prefix.
409 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
410 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
411 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
412 occurrence of each of %file-prefix and %output. Add check for %defines
413 with argument.
414 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
415 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
416 Remove the `=' from %output.
417
287b314e
JD
4182006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
419
420 Don't escape $ in test case titles since Autoconf 2.61 now does that
421 correctly.
422 * tests/actions.at (Default %printer and %destructor are not for error
423 or $undefined): Here.
424 (Default %printer and %destructor are not for $accept): Here.
425 * tests/input.at (Invalid $n and @n): Here.
426
3ebecc24
JD
4272006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
428
429 Rename <!> to <>. Discussed starting at
430 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
431 * NEWS (2.3a+): Update.
432 * doc/bison.texinfo (Freeing Discarded Symbols, Bison Symbols):
433 Update.
434 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
435 * src/scan-gram.l (INITIAL): Implement.
436 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
437 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
438 comment.
439 * tests/actions.at (Default tagless %printer and %destructor,
440 Default tagged and per-type %printer and %destructor,
441 Default %printer and %destructor are not for error or $undefined,
442 Default %printer and %destructor are not for $accept,
443 Default %printer and %destructor for mid-rule values): Update.
444 * tests/input.at (Default %printer and %destructor redeclared,
445 Unused values with default %destructor): Update.
446
26b8a438
JD
4472006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
448
449 Don't let %prec take a nonterminal.
450 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
451 token.
452 * tests/input.at (%prec takes a token): New test checking that %prec
453 won't take a nonterminal.
454
07c39ae9
JD
4552006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
456
405d53b7
JD
457 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
458 it was double-quoted.
07c39ae9
JD
459 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
460 grammar is maintained with Bison's highest standards.
461 * src/getargs.c: Fix some typos in Doxygen comments.
462
580b8926
JD
4632006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
464
465 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
466 later. Reported by Paul Eggert in
467 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
468 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
469 * src/scan-code.l (translate_action): Don't bother invoking
470 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
471 (code_scanner_free): Instead of invoking
472 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
473 which frees more.
474 * src/scan-gram.l (gram_scanner_free): Likewise.
475 * src/scan-skel.l (scan_skel): Likewise.
476
4502eadc
JD
4772006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
478
479 * src/files.c (tr): Change return type to void.
480 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
481 has been called previously for the same key.
482 (muscle_find): Return storage instead of value so that
483 --enable-gcc-warnings doesn't produce warnings that the return discards
484 const. aver that the value and storage are the same since storage
485 could potentially be NULL when value is not.
486 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
487 same as 0.
488
7746c8f6
PE
4892006-11-08 Paul Eggert <eggert@cs.ucla.edu>
490
491 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
492 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
493 us a slightly cleaner distribution, and also works.
494 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
495 gnulib changes.
496
eb095650
PE
4972006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
498 and Paul Eggert <eggert@cs.ucla.edu>
499
500 Don't let Bison leak memory except when it complains.
501 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
502 (spec_defines_file, dir_prefix): Now char *, not const char *,
503 since they are freed.
504 * src/files.c: Likewise.
505 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
506 Likewise.
507 (tr): Now operates in-place. All uses changed.
508 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
509 values.
510 (compute_file_name_parts, compute_output_file_names): Don't store
511 read-only data in variables that will be freed.
512 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
513 src_extension, and header_extension.
514 (output_file_names_free): New public function to free
515 spec_verbose_file, spec_graph_file, spec_defines_file,
516 parser_file_name, and dir_prefix.
517 * src/getargs.c (getargs): Don't store read-only data in variables that
518 will be freed.
519 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
520 (which previously existed but was unused), and quotearg_free.
521 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
522 * src/muscle_tab.c: Likewise.
523 (muscle_entry): Make the value char const *,
524 and add a new storage member that is char * and can be freed.
525 (muscle_entry_free): New private function.
526 (muscle_init): Use it instead of free.
527 (muscle_insert, muscle_grow): Update and use new storage member.
528 (muscle_code_grow): Free the string passed to muscle_grow
529 since it's not needed anymore.
530 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
531 add a new `char *code' member.
532 ("{...}"): Declare semantic type as code.
533 * src/scan-code.h (translate_rule_action):
534 (translate_symbol_action, translate_code, translate_action): Return
535 `char const *' rather than `char *' since external code should not free
536 these strings.
537 * src/scan-code.l: Likewise.
538 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
539 which is "{...}" in the parser.
540 * tests/Makefile.am (maintainer-check-valgrind): Set
541 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
542 Valgrind.
543 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
544 complain.
545 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
546 expecting a non-zero exit status sets --leak-check=summary and
547 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
548 this case, and we don't want to hear about it.
549
ac564be4
PE
5502006-11-08 Paul Eggert <eggert@cs.ucla.edu>
551
552 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
553 instead of from the template, to simplify configuration a bit.
554 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
555 and m4/wint_t.m4, as they are needed with the latest gnulib.
556
17bd8a73
JD
5572006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
558
559 Disable unset/unused mid-rule value warnings by default, and recognize
560 --warnings=midrule-values to enable them. Discussed starting at
561 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
562 * NEWS (2.3a+): Mention.
563 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
564 warnings): Add entry for midrule-values subargument.
565 * src/reader.c (symbol_should_be_used): Don't return true just because
566 the value is a set/used mid-rule value unless
567 --warnings=midrule-values was specified.
568 * tests/input.at (Unused values, Unused values before symbol
569 declarations): Run tests with and without --warnings=midrule-values.
570
571 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
572 than LIST_FREE directly.
573
89eb3c76
JD
5742006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
575
576 Finish implementing --warnings=error, which should not be implied by
577 --warnings=all (or by its synonyms -W and --warnings without
578 subarguments).
579 * src/complain.c (set_warning_issued): New function to report that
580 warnings are being treated as errors and to record an error if so.
581 Invoke...
582 (warn_at, warn): ... here.
583 * src/getargs.c (warnings_args, warnings_types): Reorder so that
584 "error - warnings are errors" does not appear above "all - all of the
585 above".
586 (getargs): For -W and --warnings without subarguments, don't let
587 FLAGS_ARGMATCH set warnings_error in warnings_flag.
588 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
589
ba7560e2
JD
5902006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
591
592 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
593 empty subargument list. For example: `bison --warnings= parser.y'.
594
31283fc3
JD
5952006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
596
597 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
598 the parser header file so that gcc doesn't warn.
599
12e35840
JD
6002006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
601
602 Split the default %destructor/%printer into two kinds: <*> and <!>.
603 Discussed starting at
604 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
605 * NEWS (2.3a+): Mention.
606 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
607 previous change today related to mid-rules.
608 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 609 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
610 (TYPE_TAG_ANY): Add as <*>.
611 (TYPE_TAG_NONE): Add as <!>.
612 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
613 for <*> and <!>.
614 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
615 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
616 * src/symlist.c (symbol_list_default_new): Split into tagged and
617 tagless versions.
618 (symbol_list_destructor_set, symbol_list_printer_set): Split
619 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
620 SYMLIST_DEFAULT_TAGLESS.
621 * src/symlist.h: Update symbol_list_default*_new prototypes.
622 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
623 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
624 * src/symtab.c (default_destructor, default_destructor_location,
625 default_printer, default_printer_location): Split each into tagged and
626 tagless versions.
627 (symbol_destructor_get, symbol_destructor_location_get,
628 symbol_printer_get, symbol_printer_location_get): Implement tagged
629 default and tagless default cases.
630 (default_destructor_set, default_printer_set): Split each into tagged
631 and tagless versions.
632 * src/symtab.h: Update prototypes.
633 * tests/actions.at (Default %printer and %destructor): Rename to...
634 (Default tagless %printer and %destructor): ... this, and extend.
635 (Per-type %printer and %destructor): Rename to...
636 (Default tagged and per-type %printer and %destructor): ... this, and
637 extend.
638 (Default %printer and %destructor for user-defined end token): Extend.
639 (Default %printer and %destructor are not for error or $undefined):
640 Update.
641 (Default %printer and %destructor are not for $accept): Update.
642 (Default %printer and %destructor for mid-rule values): Extend.
643 * tests/input.at (Default %printer and %destructor redeclared): Extend.
644 (Unused values with default %destructor): Extend.
645
f91b1629
JD
6462006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
647
648 Don't apply the default %destructor/%printer to an unreferenced midrule
649 value. Mentioned at
650 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
651 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
652 like $@n instead of just @n so that the default %destructor/%printer
653 logic doesn't see them as user-defined symbols.
654 (symbol_is_dummy): Check for both forms of the name.
655 * src/reader.c (packgram): Remove the `$' from each midrule symbol
656 name for which the midrule value is referenced in any action.
657 * tests/actions.at (Default %printer and %destructor for mid-rule
658 values): New test.
659 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
660 for change to dummy symbol names.
661
519d0004
JD
6622006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
663
664 Warn about unset midrule $$ if the corresponding $n is used.
665 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
666 $n usage.
667 (packgram): Before invoking grammar_rule_check on any rule, make sure
668 all actions have already been scanned in order to set `used' flags.
669 Otherwise, checking that a midrule's $$ is set will not always work
670 properly because the midrule check must forward-reference the midrule's
671 parent rule.
672 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
673 warning.
674
a501eca9
JD
6752006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
676
677 More improvements to the documentation of the prologue alternatives:
678 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
679 Bison manual.
680 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
681 some text to clarify the relative importance of the new directives and
682 to show how these directives may be viewed as code labels.
683
2cbe6b7f
JD
6842006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
685
686 Similar to the recently removed %before-header, add %code-top as the
687 alternative to the pre-prologue. Mentioned at
688 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
689 Also, let the prologue alternatives appear in the grammar section.
690 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
691 (prologue_declaration): Move the existing prologue alternatives to...
692 (grammar_declaration): ... here and add %code-top.
693 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
694
695 Clean up and extend documentation for the prologue alternatives.
696 * NEWS (2.3a+): Describe prologue alternatives.
697 * doc/bison.texinfo (Prologue): Move discussion of prologue
698 alternatives to...
699 (Prologue Alternatives): ... this new section, and extend it to discuss
700 all 4 directives in detail.
701 (Bison Symbols): Clean up discussion of prologue alternatives and add
702 %code-top.
703
e557d3ea
JMG
7042006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
705
706 DJGPP specific issues.
707
708 * djgpp/config.bat: config.hin has been moved to lib. Adjust
709 config.bat accordingly.
710 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
711 * djgpp/config.site: Likewise.
712
136a0f76
PB
7132006-10-16 Paolo Bonzini <bonzini@gnu.org>
714
27bd5d67
PB
715 Replace %*-header with %provides, %requires, %code. See discussion at
716 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
717
136a0f76
PB
718 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
719 (b4_user_start_header): Remove.
720 * data/glr.c: Use new macros instead of b4_*start_header
721 and b4_*end_header.
722 * data/glr.cc: Likewise.
723 * data/lalr1.cc: Likewise.
724 * data/push.c: Likewise.
725 * data/yacc.c: Likewise.
726
727 * doc/bison.texinfo: Remove %before-header, rename
728 %{start,end,after}-header to %requires, %provides, %code.
729
730 * src/parse-gram.y: Likewise (also rename token names accordingly).
731 * src/scan-gram.l: Likewise.
732 * tests/actions.at: Likewise.
733
10f429ef
PE
7342006-10-14 Paul Eggert <eggert@cs.ucla.edu>
735
736 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
737 Problem reported by Joel E. Denny.
738
7392006-10-14 Jim Meyering <jim@meyering.net>
740
741 (Sync from coreutils.)
742 Work also when the working directory (with e.g. coreutils sources)
743 is version controlled with git, rather than CVS.
744 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
745 rather than CVS.
746 In messages and comments, say e.g., "checked-out sources",
747 rather than "CVS sources".
748 (version_controlled_file): New function. Work for git as well as
749 for CVS. Don't use grep's -q option.
750 (slurp): Call it here, in place of CVS-specific code.
751
c4bd5bf7
JD
7522006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
753
754 Fix testsuite for ./configure --enable-gcc-warnings:
755 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
756 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
757 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
758 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
759 * test/regression.at (Diagnostic that expects two alternatives):
760 Likewise.
761
46356ea4
PE
7622006-10-12 Paul Eggert <eggert@cs.ucla.edu>
763
231ed89a
PE
764 * bootstrap.conf (gnulib_modules): Add config-h.
765 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
766 worry about HAVE_CONFIG_H.
767 * lib/abitset.c: Likewise.
768 * lib/bitset.c: Likewise.
769 * lib/bitset_stats.c: Likewise.
770 * lib/bitsetv-print.c: Likewise.
771 * lib/bitsetv.c: Likewise.
772 * lib/ebitset.c: Likewise.
773 * lib/get-errno.c: Likewise.
774 * lib/lbitset.c: Likewise.
775 * lib/subpipe.c: Likewise.
776 * lib/timevar.c: Likewise.
777 * lib/vbitset.c: Likewise.
778 * lib/bitset.c: Include "bitset.h" first, to test interface.
779 * lib/bitset_stats.c: Include "bitset_stats.h" first.
780 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
781 * lib/bitsetv.c: Include "bitsetv.h" first.
782 * lib/get-errno.c: Include "get-errno.h" first.
783 * m4/.cvsignore: Add config-h.m4.
784 * tests/actions.at (Default %printer and %destructor for ...):
785 Adjust expected line numbers in output to reflect removal of #if
786 HAVE_CONFIG_H lines.
787 * tests/glr-regression.at (Missed %merge type warnings when ...):
788 Likewise.
789 * tests/regression.at (Braced code in declaration in rules section):
790 Likewise.
791 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
792 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
793 Include <config.h> unconditionally.
794
46356ea4
PE
795 * bootstrap: Sync from coreutils, as follows:
796
797 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
798
799 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
800 variable was sometimes used without being initialized. This
801 messed up the installation of the INSTALL file in some cases.
802
803 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
804
805 * bootstrap (usage, main program, symlink_to_gnulib): Add option
806 --copy. Inspired by a suggestion from Bruno Haible.
807
808 2006-10-03 Jim Meyering <jim@meyering.net>
809
810 * bootstrap: Undo last change to this file, since now gnulib-tool
811 sticks with the automake default in generating dependencies.
812
dd4bf078
PE
8132006-10-12 Paul Eggert <eggert@cs.ucla.edu>
814
cf2a5f7c
PE
815 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
816 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
817
818 * doc/bison.1: Add copyright notice.
819
820 * data/glr.c: Don't include <stdarg.h>; not used.
821
35fe0834
PE
822 * NEWS: The -g and --graph options now output graphs in Graphviz
823 DOT format, not VCG format.
824 * doc/bison.1: Likewise.
825 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
826 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
827 of this change in
828 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
829 * TODO: Remove Graphviz entry.
830 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
831 remove vcg.c, vcg.h, vcg_defaults.h.
832 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
833 * src/graphviz.c, src/graphviz.h: New files.
834 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
835 * src/files.h: Make comment more generic.
836 * src/main.c (main): Likewise.
837 * src/print_graph.h: Likewise.
838 * src/getargs.c (usage): Make usage description more generic.
839 * src/print_graph.c: Include graphviz.h rather than vcg.h.
840 (static_graph, fgraph): Remove. All uses changed to pass
841 arguments instead of sharing a static var.
842 (print_core, print_actions, print_state, print_graph):
843 Output graphviz format rather than VCG format.
844 * tests/.cvsignore: Remove *.vcg; add *.dot.
845 * tests/output.at: Expect *.dot files, not *.vcg files.
846
dd4bf078
PE
847 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
848 accommodates the 2006-10-08 change.
849
efdd7421
PE
8502006-10-11 Bob Rossi <bob@brasko.net>
851
852 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
853 (b4_yyssa, b4_yyerror_range): New macros.
854 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
855 (yypvarsinit): Remove init of removed fields.
856 (yypushparse): Remove use of removed fields; use new macros instead.
857
96a1981a
PE
8582006-10-11 Paul Eggert <eggert@cs.ucla.edu>
859
860 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
861 in a push parser. Reindent slightly to match yacc.c better.
862
8632006-10-11 Bob Rossi <bob@brasko.net>
864
46356ea4
PE
865 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
866 yymsg_alloc fields.
867 (yypvarsinit, yypushparse): Remove init of removed fields.
868 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 869
c1630a8b
PE
8702006-10-09 Paul Eggert <eggert@cs.ucla.edu>
871
872 * THANKS: Add Paolo Bonzini and Bob Rossi.
873
90b9908d
PB
8742006-10-08 Paolo Bonzini <bonzini@gnu.org>
875
876 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
877 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
878 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
879 b4_define_user_cde and uses): Remove.
880 (b4_comment, b4_prefix, b4_sync_start): New.
881 * data/bison.m4: New file, with most of the content removed from c.m4.
882 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
883 * src/output.c (output_skeleton): Pass bison.m4.
884 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
885 only if specified.
886
cf806753
PE
8872006-10-05 Paul Eggert <eggert@cs.ucla.edu>
888
889 Fix test failure reported by Tom Lane in
890 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
891 and try to make such failures easier to catch in the future.
892 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
893 that's now the caller's responsibility.
894 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
895 Set yychar = YYEOF if it's negative.
896 * tests/actions.at (yylex): Abort if asked to read past EOF.
897 * tests/conflicts.at (yylex): Likewise.
898 * tests/cxx-type.at (yylex): Likewise.
899 * tests/glr-regression.at (yylex): Likewise.
900 * tests/input.at (yylex): Likewise.
901 * tests/regression.at (yylex): Likewise.
902 * tests/torture.at (yylex): Likewise.
903
0e2f006a
PE
9042006-10-01 Paul Eggert <eggert@cs.ucla.edu>
905
906 Fix problems with translating English-language diagnostics.
907 * bootstrap: Fix bug introduced in recent bootstrap changes, with
908 respect to bison-runtime pot generation. The YY_ stuff
909 wasn't being captured.
910 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
911 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
912 * runtime-po/POTFILES.in: Add data/push.c.
913
e3ddc1e3
PE
9142006-09-29 Paul Eggert <eggert@cs.ucla.edu>
915
916 Merge bootstrap changes from coreutils.
917
918 2006-09-28 Jim Meyering <jim@meyering.net>
919
920 Automatically generated dependencies are important even
921 when all of the sources in a directory come from gnulib.
922 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
923 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
924
925 2006-09-23 Jim Meyering <jim@meyering.net>
926
927 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
928
929 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
930
931 * bootstrap: Add support for --force.
932 (usage): New function. Describe usage less tersely.
933 (CVS_only_file): New var.
934
01e972b3
PE
9352006-09-21 Paul Eggert <eggert@cs.ucla.edu>
936
937 * data/push.c (YYPUSH_MORE): Make it an enum instead.
938 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
939 Adjust white space and comments to match GNU style better.
940
c63d3e90
PE
9412006-09-20 Bob Rossi <bob@brasko.net>
942
943 * data/push.c (yyresult_get): Remove function.
944 (YYPUSH_MORE): Add #define.
945 (yypushparse): Modify return value.
946
e70f46d1
PE
9472006-09-20 Paul Eggert <eggert@cs.ucla.edu>
948
949 * stamp-h.in: Remove; no longer needed.
950 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
951 Remove config.h, config.hin, intl (no longer created).
952 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
953 stamp-h1.
954
955 Sync bootstrap from coreutils, as follows:
956
957 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
958
959 * bootstrap (symlink_to_gnulib): New function.
960 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
961 to copies-of-gnulib.
962 (cp_mark_as_generated, slurp, gnulib_files):
963 Avoid making a copy if it's the same as the old version.
964 (gnulib_files): Add support for this variable (used by Bison).
965
a92be413
PE
9662006-09-20 Paul Eggert <eggert@cs.ucla.edu>
967
968 * src/getargs.c (usage): Rework to use conventions similar to
969 coreutils, to make translation a bit easier and the code a bit
970 smaller. Problem reported by Tim Van Holder.
971
4f82b42a
PE
9722006-09-15 Paul Eggert <eggert@cs.ucla.edu>
973
3b2942e6
PE
974 Use some of gnulib's new modules, taken from coreutils.
975
976 * bootstrap: Sync from coreutils, except add support for gnulib_files.
977 * bootstrap.conf: New file.
978 (gnulib_modules): Add configmake, inttypes, unistd.
979 (XGETTEXT_OPTIONS): Add complain, complain_at,
980 fatal, fatal_at, warn, warn_at, unexpected_end.
981 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
982 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
983 (gl_EARLY): Add.
984 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
985 (gl_INIT): Add
986 (GNULIB_AUTOCONF_SNIPPET): Remove.
987 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
988 the pickiest.
989 * lib/.cvsignore: Add inttypes_.h.
990 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
991 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
992 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
993 no-longer-necessary initializations.
994 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
995 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
996 use the unistd module.
997 * src/system.h: Likewise.
998 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
999 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
1000 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
1001 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
1002 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
1003 * src/system.h: Include inttypes.h unconditionally, now that we
1004 use the inttypes module. Don't bother to include stdint.h, since
1005 inttypes.h now does that for us.
1006 (LOCALEDIR): Remove, now that we use the configmake module.
1007 * src/getargs.c: Include configmake.h.
1008 * src/main.c: Likewise.
1009 * src/output.c: Likewise.
1010 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
1011 not from $abs_top_builddir, since config.h moved.
1012
1013
4f82b42a
PE
1014 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
1015 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
1016
1017 * src/parse-gram.y (symbol_declaration): Don't put statements
1018 before declarations; it's not portable to C89.
1019 * src/scan-code.l (handle_action_at): Likewise.
1020
1021 * src/scan-code.l: Always initialize braces_level; the old code
1022 left it uninitialized and therefore had undefined behavior.
1023
1024 Don't attempt to redefine 'assert', since it runs afoul of
1025 systems where standard headers (mistakenly) include <assert.h>.
1026 Instead, define and use our own alternative, called 'aver'.
1027 * src/reader.c: Don't include assert.h, since we no longer
1028 use assert.
1029 * src/scan-code.l: Likewise.
1030 * src/system.h (assert): Remove, replacing with....
1031 (aver): New function, taking a bool arg. All uses changed.
1032 * src/tables.c (pack_vector): Ensure that aver arg is bool,
1033 not merely an integer.
1034
31c10e38
PE
10352006-09-15 Bob Rossi <bob@brasko.net>
1036
1037 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
1038 * data/c.m4 (YYPUSH): New.
1039 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
1040 * src/getargs.c (push_parser): New var.
1041 * src/getargs.h (push_parser): New declaration.
1042 * src/output.c (prepare): Add macro insertion of `push_flag'.
1043 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
1044 (prologue_declaration): Parse %push-parser.
1045 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
1046 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
1047 list of removed lines from the traces observed.
1048 (AT_CHECK_CALC_LALR): Added push parser tests.
1049
fa7b79c0
PE
10502006-09-13 Paul Eggert <eggert@cs.ucla.edu>
1051
21fe08ca
PE
1052 * NEWS: Version 2.3a.
1053 * configure.ac (AC_INIT): Likewise.
1054
e8ec4d9b
PE
1055 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
1056 "#define YYSTYPE int" that caused "make maintainer-check" to fail
1057 due to header ordering dependencies. I don't know why the #define
1058 was there.
1059
fa7b79c0
PE
1060 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
1061 runtime cost when YYDEBUG is not defined, and so that some tests
1062 that used to fail now work. Problem and initial suggestion by
1063 Paolo Bonzini.
1064 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
1065 * data/glr.cc (b4_parser_class_name):
1066 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
1067 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
1068 (yydebug_) [YYDEBUG]: New member.
1069 (yycdebug_): Now defined only if YYDEBUG.
1070 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
1071 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
1072 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
1073 if YYYDEBUG.
1074 (debug_stream, set_debug_stream, debug_level, set_debug_level):
1075 Define only if YYDEBUG.
1076 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
1077 set_debug_level.
1078 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
1079 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
1080 AT_CHECK_CALC_GLR_CC that are working now.
1081
4ec13d60
PE
10822006-09-12 Paul Eggert <eggert@cs.ucla.edu>
1083
1084 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
1085 We don't need them in glr.cc, and glr.c defines them.
1086 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
1087 assumes that defining it to anything is the same as defining
1088 it to 1. Problem reported by Paolo Bonzini.
1089
8e1687ae
PE
10902006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
1091
1092 * data/c.m4 (b4_null, b4_case): Define.
1093 * src/output.c (prepare_symbols): Use b4_null.
1094 (user_actions_output): Use b4_case.
1095
3dc5e96b
PE
10962006-09-11 Paul Eggert <eggert@cs.ucla.edu>
1097
aef3da86
PE
1098 * data/glr.c (b4_shared_declarations): Put start-header first,
1099 before any #includes that we generate, so that feature-test
1100 macros work. Problem reported by Michael Deutschmann in
1101 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
1102 * data/lalr1.cc: Likewise.
1103 * doc/bison.texinfo (Prologue): Document that feature-test macros
1104 should be defined before any Bison declarations.
1105 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
1106 that depend on location.hh after, not before, Bison decls, since
1107 we now include location.hh after the first user prologue.
1108
3dc5e96b
PE
1109 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
1110 Sander Brandenburg in
1111 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
1112 Also, fix minor white space and comment issues.
aef3da86
PE
1113 (Prologue): Mention that it's better to define feature-test macros
1114 before Bison declarations. Problem reported by Michael Deutschmann.
1115
1116 * README-cvs: Fix typo: "&" should be "&&". Problem reported
1117 by Jim Meyering.
1118 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
1119 This adjusts to recent gnulib changes.
3dc5e96b 1120
b2a0b7ca
JD
11212006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
1122
1123 Finish implementation of per-type %destructor/%printer. Discussed
1124 starting at
1125 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
1126 and
1127 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
1128 * NEWS (2.3+): Add a description of this feature to the default
1129 %destructor/%printer description.
1130 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
1131 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1132 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
1133 list node contains a semantic type.
1134 * src/symtab.c, src/symtab.h: Extend with a table that associates
1135 semantic types with their %destructor's and %printer's.
1136 (semantic_type_from_uniqstr, semantic_type_get,
1137 semantic_type_destructor_set, semantic_type_printer_set): New functions
1138 composing the public interface of that table.
1139 (symbol_destructor_get, symbol_destructor_location_get,
1140 symbol_printer_get, symbol_printer_location_get): If there's no
1141 per-symbol %destructor/%printer, look up the per-type before trying
1142 the default.
1143 * tests/actions.at (Per-type %printer and %destructor): New test case.
1144 * tests/input.at (Default %printer and %destructor redeclared):
1145 Extend to check that multiple occurrences of %symbol-default in a
1146 single %destructor/%printer declaration is an error.
1147 (Per-type %printer and %destructor redeclared, Unused values with
1148 per-type %destructor): New test cases.
1149
3be03b13
JD
11502006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
1151
1152 Require default %destructor/%printer to be declared using
1153 %symbol-default instead of an empty symbol list, and start working on
1154 new per-type %destructor/%printer. Discussed at
1155 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
1156 * NEWS (2.3+): Add %symbol-default to example.
1157 * bison.texinfo (Freeing Discarded Symbols): Likewise.
1158 (Bison Symbols): Add entry for %symbol-default.
1159 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
1160 (generic_symlist, generic_symlist_item): New nonterminals for creating
1161 a list in which each item is a symbol, semantic type, or
1162 %symbol-default.
1163 (grammar_declaration): Use generic_symlist in %destructor and %printer
1164 declarations instead of symbols.1 or an empty list.
1165 (symbol_declaration, precedence_declaration, symbols.1): Update actions
1166 for changes to symbol_list.
1167 * src/reader.c: Update for changes to symbol_list.
1168 * src/scan-code.l: Likewise.
1169 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
1170 * src/symlist.c, src/symlist.h: Extend such that a list node may
1171 represent a semantic type or a %symbol-default in addition to just an
1172 ordinary symbol. Add switched functions for setting %destructor's and
1173 %printer's.
1174 * tests/actions.at, tests/input.at: Add %symbol-default to all default
1175 %destructor/%printer declarations.
1176
3508ce36
JD
11772006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
1178
1179 Whether the default %destructor/%printer applies to a particular symbol
1180 isn't a question of whether the user *declares* that symbol (in %token,
1181 for example). It's a question of whether the user by any means
1182 *defines* the symbol at all (by simply using a char token, for
1183 example). $end is defined by Bison whereas any other token with token
1184 number 0 is defined by the user. The error token is always defined by
1185 Bison regardless of whether the user declares it with %token, but we
1186 may one day let the user define error as a nonterminal instead.
1187 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
1188 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
1189 the meaning of "user-defined".
1190 * tests/actions.at (Default %printer and %destructor for user-declared
1191 end token): Rename to...
1192 (Default %printer and %destructor for user-defined end token): ...
1193 this.
1194
1195 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
1196 computation of whether to apply the default, don't maintain a list of
1197 every Bison-defined symbol. Instead, just check for a first character
1198 of '$', which a user symbol cannot have, and check for the error token.
1199
9350499c
JD
12002006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
1201
1202 Don't apply the default %destructor or %printer to the error token,
1203 $undefined, or $accept. This change fits the general rule that the
1204 default %destructor and %printer are only for user-declared symbols,
1205 and it solves several difficulties that are described in the new test
1206 cases listed below.
1207 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
1208 * tests/actions.at (Default %printer and %destructor are not for error
1209 or $undefined, Default %printer and %destructor are not for $accept):
1210 New test cases.
1211
4d7370cb
JD
12122006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
1213
1214 Allow %start after the first rule.
1215 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
1216 when parsing the first rule.
1217 (check_and_convert_grammar): Search for it here after all grammar
1218 declarations have been parsed. Skip midrules, which have dummy LHS
1219 nonterminals.
1220 * src/symtab.c (symbol_is_dummy): New function.
1221 * src/symtab.h (symbol_is_dummy): Declare it.
1222 * tests/input.at (%start after first rule): New test.
1223
6d0ef4ec
JD
12242006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
1225
1226 Redo some of the previous commit: add back the ability to use
1227 non-aliased/undeclared string literals since it might be useful to
1228 those declaring %token-table.
1229 * src/reader.c (check_and_convert_grammar): Undo changes in previous
1230 commit: don't worry about complaints from symbols_pack.
1231 * src/symtab.c (symbol_new, symbol_class_set,
1232 symbol_check_alias_consistency): Undo changes in previous commit: count
1233 each string literal as a new symbol and token, assign it a symbol
1234 number, and don't complain about non-aliased string literals.
1235 (symbols_pack): Since symbol_make_alias still does not decrement symbol
1236 and token counts but does still set aliased tokens to the same number,
1237 symbol_pack_processor now leaves empty slots in the symbols array.
1238 Remove those slots.
1239 * tests/regression.at (Undeclared string literal): Remove test case
1240 added in previous commit since non-aliased string literals are allowed
1241 again.
1242 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
1243 remove unnecessary string literal declarations.
1244 * tests/sets.at (Firsts): Likewise.
1245
965537bc
JD
12462006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
1247
1248 Don't allow an undeclared string literal, but allow a string literal to
1249 be used before its declaration.
1250 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
1251 symbols_pack complained.
1252 * src/symtab.c (symbol_new): Don't count a string literal as a new
1253 symbol.
1254 (symbol_class_set): Don't count a string literal as a new token, and
1255 don't assign it a symbol number since symbol_make_alias does that.
1256 (symbol_make_alias): It's not necessary to decrement the symbol and
1257 token counts anymore. Don't assume that an alias declaration occurs
1258 before any uses of the identifier or string, and thus don't assert that
1259 one of them has the highest symbol number so far.
1260 (symbol_check_alias_consistency): Complain if there's a string literal
1261 that wasn't declared as an alias.
1262 (symbols_pack): Bail if symbol_check_alias_consistency failed since
1263 symbol_pack asserts that every token has been assigned a symbol number
1264 although undeclared string literals have not.
1265 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 1266 string literal): New test cases.
965537bc
JD
1267 (Characters Escapes, Web2c Actions): Declare string literals as
1268 aliases.
1269 * tests/sets.at (Firsts): Likewise.
1270
47aee066
JD
12712006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
1272
1273 In the grammar scanner, STRING_FINISH unclosed constructs and return
1274 them to the parser in order to improve error messages.
1275 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
1276 SC_BRACED_CODE, SC_PROLOGUE): Implement.
1277 * tests/input.at (Unclosed constructs): New test case.
1278 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
1279 seen.
1280
1281 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
1282 unused global.
1283
1f6b3679
JD
12842006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
1285
1286 Handle string aliases for character tokens correctly.
1287 * src/symtab.c (symbol_user_token_number_set): If the token has an
1288 alias, check and set its alias's user token number instead of its own,
1289 which is set to indicate the alias. Previously, every occurrence of
1290 the character token in the grammar overwrote that alias indicator with
1291 the character code.
1292 * tests/input.at (String aliases for character tokens): New test.
1293
219741d8
JD
12942006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
1295
1296 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
1297
11daa4e7
PE
12982006-08-11 Paul Eggert <eggert@cs.ucla.edu>
1299
1300 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
1301 to prevent failures when building on older platforms.
1302 Check for autopoint failure.
1303 Set XGETTEXT_OPTIONS to values that check for C format strings,
1304 so that translators are warned about them (this also helps
1305 prevent core dumps).
1306
1307 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
1308 function, since it simplifies our code a bit.
1309
1310 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
1311 rather than -W, so we don't get bogus warnings about sign comparisons.
1312 Add -Wpointer-arith, since that warning is useful (it reports code
1313 that does not conform to C89 and that some compilers reject).
1314 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
1315 since it's no longer needed.
1316
f9bfc42a
JD
13172006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
1318
1319 Clean up scanners a bit.
1320 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
1321 definitions so gcc won't warn when obstack_for_string is unused.
1322 * src/scan-code.l: config.h and system.h are already #include'd by
1323 scan-code-c.c, so get rid of them here.
1324 * src/scan-gram.l: Likewise.
1325 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
1326 definitions rather than duplicating the rest of it.
1327 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
1328
06e8700a
JD
13292006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
1330
1331 Suppress signed/unsigned comparison warnings for yycheck.
1332 * data/c.m4 (b4_safest_int_type): New macro.
1333 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
1334 a signed int type, cast it to b4_safest_int_type first.
1335 * data/yacc.c: Likewise.
1336 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
1337 also overwritten.
1338
9c437126
PE
13392006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
1340
1341 * doc/bison.texinfo: Fix some typos.
1342
284d8a13
PE
13432006-08-02 Paul Eggert <eggert@cs.ucla.edu>
1344
1345 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
1346 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
1347
1348 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
1349 the latest gnulib does this a different way.
1350 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
1351 translation was patched, so stop omitting it.
1352
ec5479ce
JD
13532006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1354
1355 Enable declaration of default %printer/%destructor. Make the parser
1356 use these for all user-declared grammar symbols for which the user does
1357 not declare a specific %printer/%destructor. Thus, the parser uses it
1358 for token 0 if the user declares it but not if Bison generates it as
1359 $end. Discussed starting at
1360 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
1361 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
1362 and
1363 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
1364 * NEWS (2.3+): Mention.
1365 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
1366 declare a %destructor for a mid-rule's semantic value. It's just
1367 impossible to declare one specific to it.
1368 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
1369 code. Describe default %destructor form.
1370 * src/parse-gram.y (grammar_declaration): Parse default
1371 %printer/%destructor declarations.
1372 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
1373 and symbol_destructor_location_get rather than accessing the destructor
1374 and destructor_location members of struct symbol.
1375 (symbol_printers_output): Likewise but for %printer's.
1376 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
1377 again.
1378 * src/symtab.c (default_destructor, default_destructor_location,
1379 default_printer, default_printer_location): New static global
1380 variables to record the default %destructor and %printer.
1381 (symbol_destructor_get, symbol_destructor_location_get,
1382 symbol_printer_get, symbol_printer_location_get): New functions to
1383 compute the appropriate %destructor and %printer for a symbol.
1384 (default_destructor_set, default_printer_set): New functions to set the
1385 default %destructor and %printer.
1386 * src/symtab.h: Prototype all those new functions.
1387 * tests/actions.at (Default %printer and %destructor): New test to
1388 check that the right %printer and %destructor are called, that they're
1389 not called for $end, and that $$ and @$ work correctly.
1390 (Default %printer and %destructor for user-declared end token): New
1391 test to check that the default %printer and %destructor are called for
1392 a user-declared end token.
1393 * tests/input.at (Default %printer and %destructor redeclared, Unused
1394 values with default %destructor): New tests to check related grammar
1395 warnings and errors.
1396
868d2d96
JD
13972006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1398
1399 Clean up handling of %destructor for the end token (token 0).
1400 Discussed starting at
1401 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
1402 and
1403 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
1404
1405 Make the skeletons consistent in how they pop the end token and invoke
1406 its %destructor.
1407 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
1408 state, which has token number 0, since this would invoke the
1409 %destructor for the end token.
1410 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
1411 until after shifting the end token, or else it won't be popped.
1412 * data/yacc.c (yyparse): Likewise.
1413
1414 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
1415 it's the end token. Upon termination, destroy an unshifted lookahead
1416 even when it's the end token.
1417 * data/lalr1.cc (yy::parser::parse): Likewise.
1418 * data/yacc.c (yyparse): Likewise.
1419
1420 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
1421 value warnings for the end token when the user gives the end token a
1422 %destructor.
1423
1424 * tests/actions.at (Printers and Destructors): Test all the above.
1425
62a9592d
PE
14262006-07-24 Paul Eggert <eggert@cs.ucla.edu>
1427
1428 Update to latest gnulib and gettext versions.
1429 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
1430 Add fopen-safer.
1431 (gnulib_files): Add m4/warning.m4. Don't worry about files
1432 overwritten by autopoint.
1433 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
1434 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
1435 rejects them.
1436 Don't use autoreconf; instead, invoke autopoint etc. by hand,
1437 so that we can remove the intl files at a better time.
1438 (intl_files_to_remove): Remove aclocal.m4, since it gets
1439 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
1440 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
1441 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
1442 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
1443 Remove datarootdir hack; no longer needed.
1444 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
1445 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
1446 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
1447 strdup.h.
1448 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
1449 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
1450
10d6970f
PE
14512006-07-20 Paul Eggert <eggert@cs.ucla.edu>
1452
1453 * bootstrap: Adjust to today's change to gnulib-tool by invoking
1454 it with --assume-autoconf='latest-stable'.
1455
50a33993
JD
14562006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
1457
1458 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
1459 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
1460 YYSTYPE' and `{'.
1461 * src/muscle_tab.h (muscle_grow): Replace the header comments with
1462 those from muscle_tab.c since the old ones are misleading.
1463
2ce4ed68
AD
14642006-07-13 Akim Demaille <akim@epita.fr>
1465
1466 Support %define "KEY" {VALUE}.
1467 * src/scan-code.h, src/scan-code.l (translate_action)
1468 (translate_rule_action, translate_symbol_action, translate_code):
1469 Return char *, not const char *.
1470 * src/parse-gram.y (declaration): Rename as...
1471 (prologue_declaration): this.
1472 (string_content): Remove this nonterminal, use STRING.
1473 (braceless, content, content.opt): New nonterminal.
1474 Use them.
1475 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
1476 as value.
1477 * src/scan-gram.l (getargs.h): Don't include it.
1478
db7e5eb5
PE
14792006-07-12 Paul Eggert <eggert@cs.ucla.edu>
1480
1481 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
1482 rather than a for-loop that declares a local bool variable. This
1483 should work around a compatibility problem with a Cray x1e C++
1484 compiler reported by Hung Nguyen in
1485 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
1486 The for-loop was introduced in the 2004-11-17 change but I don't
1487 know why it was needed.
1488
a5d80ba5
AD
14892006-07-12 Akim Demaille <akim@epita.fr>
1490
1491 * data/c.m4: Comment changes.
1492
23eb2a69
AD
14932006-07-10 Akim Demaille <akim@lrde.epita.fr>
1494
1495 * src/complain.c (error_message, ERROR_MESSAGE): New.
1496 To factor...
1497 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
1498 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
1499
ddc8ede1
PE
15002006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1501
1502 * NEWS: Instead of %union, you can define and use your own union type
1503 YYSTYPE if your grammar contains at least one <type> tag.
1504 Your YYSTYPE need not be a macro; it can be a typedef.
1505 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
1506 (Union Decl, Decl Summary): Document this.
1507 * data/glr.c (YYSTYPE): Implement this.
1508 * data/glr.cc (YYSTYPE): Likewise.
1509 * data/lalr1.cc (YYSTYPE): Likewise.
1510 * data/yacc.c (YYSTYPE): Likewise.
1511 * src/output.c (prepare): Output tag_seen_flag.
1512 * src/parse-gram.y (declaration, grammar_declaration):
1513 Use 'union_seen' rather than 'typed' to determine whether
1514 %union has been seen, since grammars can now be typed without
1515 %union.
1516 (symbol_declaration, type.opt, symbol_def):
1517 Keep track of whether a tag has been seen.
1518 * src/reader.c (union_seen, tag_seen): New vars.
1519 (typed): remove.
1520 * src/reader.h (union_seen, tag_seen, typed): Likewise.
1521 * src/scan-code.l (untyped_var_seen): New variable.
1522 (handle_action_dollar): Adjust to above changes.
1523 (handle_action_dollar, handle_action_at):
1524 Improve overflow checking for outlandish numbers.
1525 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
1526 avoid new diagnostics generated by above changes.
1527 * tests/regression.at (YYSTYPE typedef): Add test to check
1528 for type tags without %union.
1529
1530 * src/symlist.c (symbol_list_length): Return int, not unsigned
1531 int, since callers expect int. This may need to get revisited
1532 once we have proper integer overflow checking.
1533
1534 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
1535 object is now static.
1536
1537 * src/getargs.c (flags_argmatch): Return void, not int,
1538 to pacify ./configure --enable-gcc-warnings.
1539
1540 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
1541 since last_string is already defined to FLEX_PREFIX (last_string).
1542
7b42569e
AD
15432006-07-09 Akim Demaille <akim@lrde.epita.fr>
1544
1545 Implement --warnings/-W.
1546 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
1547 replaced by...
1548 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
1549 Adjust callers.
1550 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
1551 (warnings_args, warnings_types): New.
1552 (getargs, short_options, long_options): Accept -W/--warnings.
1553 Sort the options by alphabetical order, upper case letter right
1554 before its lower case.
1555
3b452f4e
JD
15562006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1557
1558 Change %merge result type clash warnings to errors. Discussed at
1559 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
1560 * src/reader.c (record_merge_function_type): Use complain_at.
1561 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1562 declared later): Update test case results.
1563
b8a41559
AD
15642006-07-09 Akim Demaille <akim@lrde.epita.fr>
1565
1566 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
1567 to be in alphabetical order.
1568 (trace_args): Spelling fixes.
1569
cd9e1ba2
PE
15702006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1571
1572 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
1573 so they don't collide with user-defined macros.
1574 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
1575 this was never guaranteed, and now that we're using gnulib stdint,
1576 which defines int_fast16_t to long int, the problem is exposed.
1577
cb48f191
PE
15782006-07-08 Paul Eggert <eggert@cs.ucla.edu>
1579
b8445a15
PE
1580 * data/c.m4 (b4_basename): Simplify a bit, since we don't
1581 need the full POSIX semantics (and weren't implementing them
1582 anyway).
1583
cb48f191
PE
1584 Adjust to Autoconf 2.60 and today's gnulib.
1585 * bootstrap (gnulib_modules): Add stdint.
1586 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
1587 no longer copies it.
1588 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1589 since stdint needs the former and wcwidth (which is now required
1590 by mbswidth) needs the latter.
1591 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1592 work around a compatibility glitch between gettext 0.14.6 and
1593 Autoconf 2.60.
1594 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1595 Do not check for uintptr_t, since new stdint module does the right
1596 thing.
1597 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1598 Add stdint.h, stdint_.h, wcwidth.h.
1599 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1600 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1601 stdint.m4, wchar_t.m4, wcwidth.m4.
1602 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1603 usual order for ../lib/*.h files.
1604 (file_name_split): Use last_component, not base_name, to adjust
1605 to gnulib changes.
1606 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1607 for ../lib/*.h files.
1608 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1609 Define unconditionally, since we now assume the stdint module.
1610 * src/scan-skel.l: Include <dirname.h>.
1611 (BASE_QPUTS): Use last_component, not base_name.
1612 * src/system.h: Include <unlocked-io.h> in the usual order
1613 for ../lib/*.h files. Include <stdint.h> unconditionally,
1614 since we now use the stdint module.
1615 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1616 HAVE_UINTPTR_T, since we now use the stdint module.
1617 (base_name): Remove decl, since files now include <dirname.h>
1618 to get the decl.
1619
cd48d21d
AD
16202006-07-08 Akim Demaille <akim@lrde.epita.fr>
1621
1622 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1623 New, default to 1.
1624 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1625 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1626 default.
1627 * tests/calc.at: Adjust.
1628
8ec0a172
AD
16292006-07-08 Akim Demaille <akim@lrde.epita.fr>
1630
b8445a15 1631 * data/c.m4 (b4_basename): New.
8ec0a172
AD
1632 (b4_syncline): Also output the location of its invocation (from
1633 the skeleton).
1634 (b4_user_action, b4_define_user_action, b4_user_actions)
1635 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1636 (b4_user_stype): New.
1637 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1638
4a678af8
JD
16392006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1640
1641 In the grammar file, the first column is 1 not 0 on the first line as
1642 on every other line.
1643 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1644 * tests/input.at (Torturing the Scanner): Update output.
1645
1646 * src/scan-gram.l (scanner_cursor): Declare it static.
1647
dd60572a
JD
16482006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1649
1650 In warnings, say "previous declaration" rather than "first
1651 declaration".
1652 * src/symtab.c (redeclaration): Do that here.
1653 * src/reader.c (record_merge_function_type): In the case of a result
1654 type clash, report the previous declaration rather than the very first
1655 one in the grammar file.
1656 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1657 declared later): Add a third declaration to check this behavior.
1658 * tests/input.at (Incompatible Aliases): Update output.
1659
2073e1b6
AD
16602006-06-27 Akim Demaille <akim@epita.fr>
1661
1662 * doc/Doxyfile.in: New.
1663 * doc/Makefile.am: Use it.
1664 * src/lalr.h, src/symtab.h: Initial doxygenation.
1665
8ee5b538
JD
16662006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1667
1668 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
1669 declared after the %merge. This continues the effort of the previous
1670 patch.
8ee5b538
JD
1671 * src/reader.c (get_merge_function): Don't set the merger type yet.
1672 (record_merge_function_type): New function for setting the merger type
1673 and checking for clashes.
1674 (grammar_current_rule_merge_set): Set the location of the %merge for
1675 the current rule.
1676 (packgram): Invoke record_merge_function_type for each rule now that
1677 all symbol type declarations have been parsed.
1678 * src/reader.h (merger_list.type_declaration_location): New member
1679 storing the location of the first %merge from which the type for this
1680 merging function was derived.
1681 * src/symlist.h (symbol_list.merger_declaration_location): New member
1682 storing the location of a rule's %merge, if any.
1683 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1684 declared later): New test to catch the error fixed by the above patch.
1685
ffa4ba3a
JD
16862006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1687
1688 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
1689 declarations appear after the rules. Discussed at
1690 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1691 and
1692 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1693 Don't mistake the type of $$ in a midrule to be that of its parent
1694 rule's $$.
ffa4ba3a
JD
1695 * src/reader.c (grammar_current_rule_end): Don't invoke
1696 grammar_rule_check yet since not all symbol declarations may have been
1697 parsed yet.
1698 (grammar_midrule_action): Likewise.
1699 Don't record whether the midrule's $$ has been used yet since actions
1700 haven't been translated yet.
1701 Record the midrule's parent rule and its RHS index within the parent
1702 rule.
1703 (grammar_current_rule_action_append): Don't translate the action yet
1704 since not all symbol declarations may have been parsed yet and, thus,
1705 warnings about types for $$, $n, @$, and @n can't be reported yet.
1706 (packgram): Translate the action and invoke grammar_rule_check now that
1707 all symbol declarations have been parsed.
1708 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1709 after parsing the entire grammar file, the symbol list here in the case
1710 of a midrule is actually the midrule's empty RHS, so reference its
1711 parent rule's RHS where necessary.
1712 On the other hand, now that you can already know it's a midrule, you
1713 aren't forced to think $$ has the same type as its parent rule's $$.
1714 (handle_action_at): In the case of a midrule, reference the parent rule
1715 where necessary.
1716 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1717 members.
1718 (symbol_list_length): Now that this is invoked after all rules have
1719 been parsed, a NULL symbol (rather than a NULL symbol list node)
1720 terminates a rule. symbol_list_print already does this correctly.
1721 * src/symlist.h (symbol_list.midrule_parent_rule,
1722 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1723 remember their relationships with their parents.
1724 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1725 fixed by the above patch.
1726 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1727 implementing...
1728 (Unused values): ... this old test case and...
1729 (Unused values before symbol declarations): ... this new test case.
1730 This one is the same as `Unused values' except that all symbol
1731 declarations appear after the rules in order to catch the rest of the
1732 errors fixed by the above patch.
1733
e256e17f
JD
17342006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1735
300a1930
JD
1736 More cleanup.
1737 * src/reader.c (current_rule): Declare it static since it's no longer
1738 used outside this file.
1739 (grammar_current_rule_action_append): Remove redundant arguments from
1740 translate_rule_action invocation.
1741 * src/reader.h (current_rule): Remove this unused extern.
1742 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1743 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 1744
381ecb06
JD
17452006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1746
1747 Clean up yesterday's patch.
1748 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1749 to...
1750 * src/reader.c (grammar_current_rule_action_append): ... here for
1751 consistency with grammar_current_rule_symbol_append.
1752 * tests/regression.at (Braced code in declaration in rules section):
1753 Make yyerror and yylex static as usual.
1754
4210cd0b
JD
17552006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1756
1757 Fix bug that mistakes braced code in a declaration in the rules section
1758 to be a rule action. Mentioned at
1759 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1760 * src/scan-gram.l: Move midrule action detection from the start of the
1761 scanning of any braced code to...
1762 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1763 action. For readability, use $2 and @2 rather than the equivalent
1764 global variables.
1765 * tests/regression.at (Braced code in declaration in rules section):
1766 New test to catch the error fixed by the above patch.
1767
1768 Work on code readability some.
1769 * src/scan-code.l (current_rule): Get rid of this misleading and
1770 redundant declaration: it's actually extern'ed in reader.h.
1771 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1772 translate_action): Add a rule argument and use it instead of the global
1773 current_rule.
1774 (translate_rule_action): This already receives current_rule through an
1775 argument, so pass it on to translate_action instead of assigning
1776 current_rule to current_rule.
1777 (translate_symbol_action, translate_code): Pass rule = NULL to
1778 translate_action.
1779
34f98f46
JD
17802006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1781
1782 Rename %before-definitions to %start-header and %after-definitions to
1783 %end-header. Don't use these declarations to separate pre-prologue
1784 blocks from post-prologue blocks. Add new order-independent
1785 declarations %before-header and %after-header as alternatives to the
1786 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1787 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1788 * NEWS (2.3+): Update for these changes.
1789 * data/glr.c (b4_before_definitions): Update to...
1790 (b4_start_header): ... this.
1791 (b4_after_definitions): Update to...
1792 (b4_end_header): ... this.
1793 * data/glr.cc: Likewise.
1794 * data/lalr1.cc: Likewise.
1795 * data/yacc.c: Likewise.
1796 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1797 prologue blocks with %*-header declarations.
1798 (Calc++ Parser): Likewise.
1799 (Bison Declaration Summary): Update names.
1800 (Bison Symbols): Update description.
1801 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1802 (PERCENT_END_HEADER): ... this.
1803 (PERCENT_BEFORE_DEFINITIONS): Update to...
1804 (PERCENT_START_HEADER): ... this.
1805 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1806 (declaration): Update token names and m4 macro names.
1807 When parsing %end-header and %start-header, invoke translate_code
1808 before muscle_code_grow, and no longer set global booleans to remember
1809 whether these declarations have been seen.
1810 Parse new %after-header and %before-header.
1811 * src/reader.c (before_definitions, after_definitions): Remove.
1812 (prologue_augment): Accept a new bool argument to specify whether to
1813 augment the pre-prologue or post-prologue.
1814 * src/reader.h (before_definitions, after_definitions): Remove these
1815 extern's.
1816 (prologue_augment): Add new bool argument.
1817 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1818 (PERCENT_END_HEADER): ... this.
1819 (PERCENT_BEFORE_DEFINITIONS): Update to...
1820 (PERCENT_START_HEADER): ... this.
1821 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1822 * tests/actions.at (Printers and Destructors): Update names.
1823
31b2b07e
JD
18242006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1825
1826 Add comparison operators for C++ location classes. Discussed at
1827 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1828 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1829 declaration indicating whether filename_type has an operator==. If
1830 filename_type is `std::string', it defaults to `1', `0' otherwise.
1831 * data/location.cc: Iff b4_define_location_comparison is `1', add
1832 operator== and operator!= for class position and for class location.
1833
1834 Some minor fixes.
1835 * src/scan-action.l: Remove unused file.
1836 * src/symtab.c (symbol_printer_set): Use printer_location not
1837 destructor_location.
1838 * src/symtab.h (struct symbol): Replace incorrect source comment for
1839 printer members.
1840 * tests/input.at (Incompatible Aliases): Update output with correct
1841 printer location.
1842
9bc0dd67
JD
18432006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1844
1845 Don't put the pre-prologue in the header file. For the yacc.c code
1846 file and the glr.c header and code files, move the pre-prologue before
1847 the token definitions. Add new %before-definitions and
1848 %after-definitions to declare code that will go in both the header file
1849 and code file. Discussed at
1850 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1851 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1852 and
1853 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1854 * NEWS (2.3+): Describe these changes.
1855 * data/glr.c (b4_pre_prologue): Move from within to before...
1856 (b4_shared_declarations): ... this.
1857 Add new b4_before_definitions before b4_token_enums.
1858 Add new b4_after_definitions at the end.
1859 * data/glr.cc (b4_pre_prologue): Replace with...
1860 (b4_before_definitions): ... this in the header file.
1861 (b4_after_definitions): New near the end of the header file.
1862 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1863 code file right before including the header file.
1864 (b4_before_definitions): New in the previous position of
1865 b4_pre_prologue in the header file.
1866 (b4_after_definitions): New near the end of the header file.
1867 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1868 (b4_token_enums_defines): In the code file, move to right before
1869 YYSTYPE for consistency with the header file.
1870 (b4_before_definitions): New right before b4_token_enums_defines in
1871 both the header and code file.
1872 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1873 header and code file.
1874 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1875 of prologues for %union dependencies.
1876 (Bison Declaration Summary): In %defines description, mention the
1877 effect of %before-definitions and %after-definitions on the header
1878 file.
1879 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1880 than in the pre-prologue so that make check succeeds.
1881 (Bison Symbols): Add entries for %before-definitions and
1882 %after-definitions.
1883 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1884 %before-definitions.
1885 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1886 (declaration): Parse those declarations and append to
1887 b4_before_definitions and b4_after_definitions, respectively.
1888 * src/reader.c (before_definitions, after_definitions): New bools to
1889 track whether those declarations have been seen.
1890 (prologue_augment): Add to the post-prologue if %union,
1891 %before-definitions, or %after-definitions has been seen.
1892 * src/reader.h (before_definitions, after_definitions): New extern's.
1893 * src/scan-gram.l: Scan the new declarations.
1894 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1895 prologue block in a %before-definitions or a %after-definitions based
1896 on whether the %union is declared.
1897 * tests/regression.at (Early token definitions with --yacc, Early token
1898 definitions without --yacc): Move tests for token definitions into the
1899 post-prologue since token names are no longer defined in the
1900 pre-prologue.
1901
203b9274
AD
19022006-06-20 Akim Demaille <akim@epita.fr>
1903
1904 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1905 (symbol_get): Use it.
1906 * src/parse-gram.y: Use it.
1907
a7ee59cf
JD
19082006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1909
1910 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1911 build succeeds when configured with --enable-gcc-warnings.
1912
5a2baae7
PE
19132006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1914
33ad1a9c
PE
1915 * src/parse-gram.y (char_name): New function.
1916 (CHAR, STRING, string_content): For %printer, properly escape.
1917 (ID): Prefer fputs to fprintf.
1918 (id): Reindent to be consistent with other rules.
1919 Properly quote char.
1920
5a2baae7
PE
1921 The Translation Project changed its way of publishing translations
1922 to maintainers. I haven't received any responses to my request
1923 for supporting the old way, or for documenting the new way. I
1924 have modified 'bootstrap' to use screen scraping
1925 (in this case, HTML scraping). This is unreliable and inelegant,
1926 but I don't see any better way. Yuck.
1927 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1928 (get_translations): New function, which uses HTML scraping to
1929 deduce locations of latest translations.
1930 Use this function to grab both bison and bison-runtime .po files.
1931 Don't bother priming the pump for the runtime-po domain any more,
1932 as it's now translated better than bison is.
1933
58d7a1a1
AD
19342006-06-19 Akim Demaille <akim@epita.fr>
1935
1936 * src/scan-gram.l: No longer "parse" things after `%union' until
1937 `{'. Rather, return a single "%union" token.
1938 No longer make symbols: return strings, and leave the conversion
1939 to symbols to the parser.
1940 (SC_PRE_CODE, token_type): Remove.
1941 * src/parse-gram.y (%union): New field `character'.
1942 Sort tokens.
1943 (CHAR): New token.
1944 (ID, ID_COLON): Now that the scanner no longer makes them
1945 identifiers, adjust all uses to invoke symbol_get.
1946 (id_colon): New, wraps the conversion from string to symbol.
1947 (%union): Accept a possible union_name.
1948 (symbol): Now can be a char.
1949 * data/c.m4 (b4_union_name): Leave a default value.
1950 * data/glr.c, data/yacc.c: Use it.
1951
b931235e
JD
19522006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1953
1954 For associating token numbers with token names for "yacc.c", don't use
1955 #define statements unless `--yacc' is specified; always use enum
1956 yytokentype. Most important discussions start at:
1957 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1958 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1959 and
1960 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1961 * NEWS (2.3+): Mention.
1962 * data/c.m4 (b4_yacc_if): New.
1963 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1964 token #define's.
1965 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1966 on token name definitions.
1967 * src/getargs.c (usage): Capitalize `Yacc' in English.
1968 * src/output.c (prepare): Define b4_yacc_flag.
1969 * tests/regression.at (Early token definitions): Test that tokens names
1970 are defined before the pre-prologue not just before the post-prologue.
1971 Remove this test case and copy to...
1972 (Early token definitions with --yacc): ... this to test #define's.
1973 (Early token definitions without --yacc): ... and this to test enums.
1974
9e6e7ed2
PE
19752006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1976
1977 * NEWS: Reword the post-2.3 change to not be so optimistic about
1978 removing the old "look-ahead" spelling.
1979 Update previous look-ahead/lookahead change reports.
1980 * REFERENCES: look-ahead -> lookahead (since that's
1981 what he actually wrote).
1982 * doc/refcard.tex: look ahead -> lookahead,
1983 look-ahead -> lookahead
1984
742e4900
JD
19852006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1986
1987 For consistency, use `lookahead' instead of `look-ahead' or
1988 `look_ahead'. Discussed starting at
1989 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1990 and then at
1991 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1992 * NEWS: For the next release, note the change to `--report'.
1993 * TODO, doc/bison.1: Update English.
1994 * doc/bison.texinfo: Update English.
1995 (Understanding Your Parser, Bison Options): Document as
1996 `--report=lookahead' rather than `--report=look-ahead'.
1997 * src/conflicts.c: Update English in comments.
1998 (lookahead_set): Rename from look_ahead_set.
1999 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
2000 (resolve_sr_conflict): Rename local look_ahead_tokens to
2001 lookahead_tokens, and update other uses.
2002 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
2003 count_rr_conflicts, conflicts_free): Update uses.
2004 * src/getargs.c (report_args): Move "lookahead" before alternate
2005 spellings.
2006 (report_types): Update uses.
2007 (usage): For `--report' usage description, state `lookahead' spelling
2008 rather than `look-ahead'.
2009 * src/getargs.h (report.report_lookahead_tokens): Rename from
2010 report_look_ahead_tokens.
2011 * src/lalr.c: Update English in comments.
2012 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
2013 (state_lookahead_tokens_count): Rename from
2014 state_look_ahead_tokens_count.
2015 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2016 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
2017 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2018 Update other uses.
2019 Update English in output.
2020 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
2021 * src/print.c: Update English in comments.
2022 (lookahead_set): Rename from look_ahead_set.
2023 (print_reduction): Rename argument lookahead_token from
2024 look_ahead_token.
2025 (print_core, state_default_rule, print_reductions, print_results):
2026 Update uses.
2027 * src/print_graph.c: Update English in comments.
2028 (print_core): Update uses.
2029 * src/state.c: Update English in comments.
2030 (reductions_new): Update uses.
2031 (state_rule_lookahead_tokens_print): Rename from
2032 state_rule_look_ahead_tokens_print, and update other uses.
2033 * src/state.h: Update English in comments.
2034 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
2035 (state_rule_lookahead_tokens_print): Rename from
2036 state_rule_look_ahead_tokens_print.
2037 * src/tables.c: Update English in comments.
2038 (conflict_row, action_row): Update uses.
2039 * tests/glr-regression.at
2040 (Incorrect lookahead during deterministic GLR,
2041 Incorrect lookahead during nondeterministic GLR): Rename
2042 print_look_ahead to print_lookahead.
2043 * tests/torture.at: Update English in comments.
2044 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
2045 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
2046 (Many lookahead tokens): Update uses.
2047 * data/glr.c: Update English in comments.
2048 * lalr1.cc: Likewise.
2049 * yacc.c: Likewise.
2050 * src/conflicts.h: Likewise.
2051 * src/lalr.h: Likewise.
2052 * src/main.c: Likewise.
2053 * src/output.c: Likewise.
2054 * src/parse-gram.c: Likewise.
2055 * src/tables.h: Likewise.
2056 * tests/calc.at: Likewise.
2057
3c40d0b5
JD
20582006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
2059
2060 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
2061
5d278082
PE
20622006-06-07 Paul Eggert <eggert@cs.ucla.edu>
2063
2064 * TODO: Add request from Nelson H. F. Beebe to be able to install
2065 Bison without installing the yacc script.
2066
9e668899
JD
20672006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
2068
2069 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
2070 and yytext if they're already #define'd.
2071 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
2072 * src/scan-code-c.c: ... here.
2073 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
2074 <config.h>.
2075
0c8e079f
JD
20762006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
2077
2078 Get Bison to build again when configured with --enable-gcc-warnings.
2079 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
2080 missing #include's.
2081 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
2082 loc argument as it shadows a global.
2083 * src/scan-gram.l: Remove stray comma that prevents boundary_set
2084 invocation.
2085
2086 * src/.cvsignore: Add scan-code.c.
2087
2346344a
AD
20882006-06-07 Akim Demaille <akim@epita.fr>
2089
2090 * src/scan-gram.l: Move the "add a trailing ; to actions" code
2091 to...
2092 * src/scan-code.l: here.
2093 * tests/input.at (Torturing the Scanner): Fix another location
2094 error.
2095
4862bdfd
AD
20962006-06-07 Akim Demaille <akim@epita.fr>
2097
2098 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
2099
e9071366
AD
21002006-06-06 Akim Demaille <akim@epita.fr>
2101
2102 Extract the parsing of user actions from the grammar scanner.
2103 As a consequence, the relation between the grammar scanner and
2104 parser is much simpler. We can also split "composite tokens" back
2105 into simple tokens.
2106 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
2107 * src/scan-gram.l (add_column_width, adjust_location): Move to and
2108 rename as...
2109 * src/location.h, src/location.c (add_column_width)
2110 (location_compute): these.
2111 Fix the column count: the initial column is 0.
2112 (location_print): Be robust to ending column being 0.
2113 * src/location.h (boundary_set): New.
2114 * src/main.c: Adjust to scanner_free being renamed as
2115 gram_scanner_free.
2116 * src/output.c: Include scan-code.h.
2117 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
2118 Use boundary_set.
2119 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
2120 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
2121 which is now, again, a separate token.
2122 Adjust all dependencies.
2123 Whereever actions with $ and @ are used, use translate_code.
2124 (action): Remove this nonterminal which is now useless.
2125 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
2126 (grammar_current_rule_action_append): Use translate_code.
2127 (packgram): Bound check ruleno, itemno, and rule_length.
2128 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
2129 (last_string, last_braced_code_loc, max_left_semantic_context)
2130 (scanner_initialize, scanner_free, scanner_last_string_free)
2131 (gram_out, gram_lineno, YY_DECL_): Move to...
2132 * src/scan-gram.h: this new file.
2133 (YY_DECL): Rename as...
2134 (GRAM_DECL): this.
2135 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
2136 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2137 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2138 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2139 Move these declarations, and...
2140 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
2141 these to...
2142 * src/flex-scanner.h: this new file.
2143 * src/scan-gram.l (rule_length, rule_length_overflow)
2144 (increment_rule_length): Remove.
2145 (last_braced_code_loc): Rename as...
2146 (gram_last_braced_code_loc): this.
2147 Adjust to the changes of the parser.
2148 Move all the handling of $ and @ into...
2149 * src/scan-code.l: here.
2150 * src/scan-gram.l (handle_dollar, handle_at): Remove.
2151 (handle_action_dollar, handle_action_at): Move to...
2152 * src/scan-code.l: here.
2153 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
2154 scan-code.h, scan-code-c.c, scan-gram.h.
2155 (EXTRA_bison_SOURCES): Add scan-code.l.
2156 (BUILT_SOURCES): Add scan-code.c.
2157 (yacc): Be robust to white spaces.
2158
2159 * tests/conflicts.at, tests/input.at, tests/reduce.at,
2160 * tests/regression.at: Adjust the column numbers.
2161 * tests/regression.at: Adjust the error message.
7891a7c4 2162
184e42f0
JD
21632006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
2164
2165 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
2166 Use Akim's wording from
2167 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
2168
7891a7c4
JD
21692006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
2170
2171 Between Bison releases, manually append `+' to the previous Bison
2172 release number, and use that as a signal to automatically print the
2173 ChangeLog's CVS Id keyword from --version. Discussed starting at
2174 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
2175 * ChangeLog: Add Id header.
2176 * configure.ac (AC_INIT): Append `+' to `2.3'.
2177 * src/.cvsignore: Add revision.c.
2178 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
2179 (BUILT_SOURCES): Add revision.c.
2180 (revision.c): New target rule. This file defines a new global variable
2181 named revision. It initializes it with either the Id from ChangeLog
2182 or, if VERSION doesn't contain `+', with the empty string.
2183 * src/getargs.c (version): Print the value of revision.
2184 * src/revision.h: Extern revision.
2185
4ad3ed84
PE
21862006-06-05 Paul Eggert <eggert@cs.ucla.edu>
2187
2188 * NEWS: Version 2.3.
2189 * configure.ac (AC_INIT): Likewise.
2190
02103984
PE
21912006-05-30 Paul Eggert <eggert@cs.ucla.edu>
2192
2193 * data/glr.c (YYRECOVERING): Define to be a function-like macro
2194 with no arguments, not as an object-like macro. This is for
2195 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
2196 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
2197 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
2198 Document this.
2199
2c08afa5
JD
22002006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
2201
2202 * src/getargs.c (usage): Back out yesterday's modification of the
2203 --help output so that we don't have to wait for translation before
2204 releasing 2.3.
2205
6077da58
PE
22062006-05-29 Paul Eggert <eggert@cs.ucla.edu>
2207
2208 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
2209 Problem reported by Akim Demaille.
2210
2a26b6c2
JD
22112006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2212
2213 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
2214
aefef0d6
PE
22152006-05-26 Paul Eggert <eggert@cs.ucla.edu>
2216
2217 * data/yacc.c (yy_reduce_print): Omit trailing white space in
2218 generated source code. Problem reported by Frans Englich in
2219 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
2220
fcd8e201
PE
22212006-05-22 Paul Eggert <eggert@cs.ucla.edu>
2222
2223 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
2224 shell, not within 'make', so that 'make' by an ordinary builder
2225 (using GNU make) does not worry about configuring gzip. This also
2226 works around a bug reported independently by Keith Thompson and by
2227 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
2228 stderr rather than stdout, messing up the build logs.
2229
7b5cdcbd
JD
22302006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
2231
2232 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
2233 to make sure that YYID will never be unused. This fixes a 'make
2234 maintainer-check' failure caused by the recent changes to the 'Trivial
2235 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
2236 not used.
2237 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
2238
5ad0a449
JD
22392006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
2240
2241 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
2242 state before an empty RHS is always resolved here. Only the location
2243 of that state is guaranteed to be resolved, and that's enough. This
2244 fixes the remaining bug reported by Derek M. Jones in
2245 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
2246 * tests/glr-regression.at (Uninitialized location when reporting
2247 ambiguity): Test the above case.
2248 Also, the embedded comments in this test case claim it checks the case
2249 of an empty RHS that has inherited the initial location. However, the
2250 corresponding LHS was already resolved, so yyresolveLocations didn't
2251 actually have reason to modify it. Fix this by forcing
2252 nondeterministic operation at the beginning of the parse.
2253
50cce58e
PE
22542006-05-20 Paul Eggert <eggert@cs.ucla.edu>
2255
2256 * data/c.m4 (b4_yy_symbol_print_generate):
2257 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
2258 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
2259 of the bugs reported today by Derek M Jones in
2260 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
2261 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
2262 defined to be a type name without parens or brackets.
2263 (Location Type): Similarly for YYLTYPE.
2264 * tests/regression.at (Trivial grammars): Put in a test for this
2265 bug that will be caught by 'make maintainer-check' (though not,
2266 alas, by 'make check' unless your compiler is picky).
2267
ab8d9dc5
PE
22682006-05-19 Paul Eggert <eggert@cs.ucla.edu>
2269
0d2c8934 2270 * NEWS: Version 2.2.
ab8d9dc5
PE
2271 * configure.ac (AC_INIT): Likewise.
2272
9138c575
JD
22732006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
2274
2275 * data/glr.c (yyreportTree): Make room in yystates for the state
2276 preceding the RHS. This fixes the segmentation fault reported by Derek
2277 M. Jones in
2278 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
2279 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
2280 to the user. Reported for yyreportTree by Derek M. Jones later in the
2281 same thread.
2282 * THANKS: Add Derek M. Jones.
2283 Update my email address.
2284 Fix typo in Steve Murphy's name.
2285
276f48df
PE
22862006-05-14 Paul Eggert <eggert@cs.ucla.edu>
2287
d6645148
PE
2288 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
2289 checking against YYLAST that caused the parser to miss a potential
2290 alternative in its diagnostic.
2291 Problem reported by Maria Jose Moron Fernandez in
2292 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
2293 * data/lalr1.cc (yysyntax_error_): Likewise.
2294 * data/yacc.c (yysyntax_error): Likewise.
2295 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
2296 tokens, in case we run into an older C compiler.
2297 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
2298 Use them to check for the off-by-one error fixed above.
2299
276f48df
PE
2300 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
2301 YYSIZE_T, not size_t.
2302 * tests/regression.at (Trivial grammars): New test, to catch
2303 the error fixed by the above patch.
2304
cd8b5791
AD
23052006-05-14 Akim Demaille <akim@lrde.epita.fr>
2306
2307 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
2308 scheme.
2309 Reported by Steve Murphy.
2310
34376418
AD
23112006-05-14 Akim Demaille <akim@lrde.epita.fr>
2312
2313 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
2314 * data/glr.cc: b4_location_flag is now b4_locations_flag.
2315
327afc7c
AD
23162006-05-14 Akim Demaille <akim@lrde.epita.fr>
2317
2318 Implement --trace=m4.
2319 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
2320 * src/output.c (output_skeleton): When set, pass -dV to m4.
2321
2322 Factor the handling of flags in m4.
2323 * src/output.c (prepare): Rename the muscle names debug, defines,
2324 error_verbose to debug_flag, defines_flag, error_verbose_flag.
2325 * data/c.m4: Adjust.
2326 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
2327 Use b4_define_flag_if to define other b4_FLAG_if macros.
2328 (b4_location_if): As a consequence, rename as...
2329 (b4_locations_if): this, for consistency.
2330 Adjust all the skeletons.
2331
ba9ecd19
AD
23322006-05-14 Akim Demaille <akim@lrde.epita.fr>
2333
2334 * etc/bench.pm: Shorten bench names.
2335
4e83ea15
AD
23362006-05-14 Akim Demaille <akim@lrde.epita.fr>
2337
2338 * src/output.h, src/output.c (error_verbose): Move to...
2339 * src/getargs.h, src/getargs.c: here.
2340 Sort the flags.
2341 Adjust dependencies.
2342
6e93d810
PE
23432006-05-13 Paul Eggert <eggert@cs.ucla.edu>
2344
2345 * data/c.m4 (b4_copyright): Put the special exception for Bison
2346 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
2347 uses changed. Suggested by Akim Demaille. Also, wrap the
2348 copyright notice, in case it is longer than 80 columns. Replace
2349 comma by newline after title.
6e93d810 2350
eaea13f5
PE
23512006-05-11 Paul Eggert <eggert@cs.ucla.edu>
2352
2353 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
2354 incompatibility, not a bug. Mention that it wasn't fixed as of
2355 flex 2.5.33.
2356
3cf084ec
AD
23572006-05-11 Akim Demaille <akim@lrde.epita.fr>
2358
2359 * examples/extexi: Enforce the precedence of concatenation over
2360 >>.
0a9f1c7d 2361 Reported by Tommy Nordgren.
3cf084ec 2362
32c96bd7
AD
23632006-05-11 Akim Demaille <akim@lrde.epita.fr>
2364
2365 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
2366 with the member "token".
f94705b2 2367 Reported by Martin Nylin.
32c96bd7 2368
eaea13f5
PE
23692006-05-08 Paul Eggert <eggert@cs.ucla.edu>
2370
2371 * data/glr.c: Switch to Bison 2.2 special-exception language in
2372 the copyright notice. Use more-regular format for titles and
2373 copyright notices.
2374 * data/glr.cc: Likewise.
2375 * data/location.cc: Likewise.
2376 * data/yacc.cc: Likewise.
2377 * doc/bison.texinfo (Conditions): Document this.
2378 * NEWS: likewise. Upgrade version to 2.2.
2379
6e2d1146
AD
23802006-04-27 Akim Demaille <akim@lrde.epita.fr>
2381
2382 * data/glr.cc: Remove dead code.
2383
47671055
PE
23842006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2385
2386 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
2387 that variable and the line breaks the bootstrap. Problem reported
2388 by Juan M. Guerrero.
2389
ed2e6384
AD
23902006-04-24 Akim Demaille <akim@lrde.epita.fr>
2391
2392 * doc/bison.texinfo (Multiple start-symbols): New.
2393
3cedc2dc
AD
23942006-04-24 Akim Demaille <akim@lrde.epita.fr>
2395
2396 * etc/README, etc/bench.pl: New.
2397
b2ddc3f3
AD
23982006-04-03 Akim Demaille <akim@lrde.epita.fr>
2399
2400 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
2401 rule.
2402 Reported by Mickael Labau.
2403 * tests/input.at (Torturing the Scanner): Test it.
2404
91e3ac9a
PE
24052006-03-16 Paul Eggert <eggert@cs.ucla.edu>
2406
2407 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
2408 Problem reported by Bob Rossi.
2409
24102006-03-13 Paul Eggert <eggert@cs.ucla.edu>
2411
2412 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
2413 and didn't really work.
2414 For the index, use @ifnotinfo, not @iftex.
2415 Minor cleanups of spacing and terminology.
2416
5cf61e93
AD
24172006-03-12 Akim Demaille <akim@lrde.epita.fr>
2418
2419 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
2420 of AT_NAME_PREFIX when %name-prefix is not used.
2421
aa08666d
AD
24222006-03-12 Akim Demaille <akim@lrde.epita.fr>
2423
2424 Apply --prefix to C++ skeletons too: they change the namespace.
2425 The test suite already exercize these cases.
2426 * data/c++.m4 (b4_namespace): New.
2427 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
2428 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
2429 * data/yacc.c, data/glr.c: Remove a useless `[]'.
2430 * doc/bison.texinfo: Document it.
2431 (Option Cross Key): Use @multitable in all formats. It looks
2432 nicer, even in TeX outputs.
2433 (Rules): Use the same code whatever the output type is.
2434 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
2435 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
2436 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 2437
45567173
AD
24382006-03-10 Akim Demaille <akim@lrde.epita.fr>
2439
2440 * TODO: Remove dead items.
2441
e9d8f881 24422006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
2443
2444 * doc/FAQ: Remove, merged into...
2445 * doc/bison.texinfo (FAQ): this.
2446 * doc/Makefile.am (EXTRA_DIST): Adjust.
2447
c095d689
AD
24482006-03-10 Akim Demaille <akim@lrde.epita.fr>
2449
2450 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
2451 even if empty.
2452 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
2453 * doc/bison.texinfo (Calc++ Scanner): Use it.
2454
6e0f8287
PE
24552006-03-09 Paul Eggert <eggert@cs.ucla.edu>
2456
2457 Fix two nits reported by twlevo, plus one more that I discovered.
2458
2459 * src/assoc.h (assoc_to_string): Give a name to the arg, as
2460 this is the usual Bison style.
2461 * src/location.h (location_print): Likewise.
2462
2463 * src/reader.h (token_name): Likewise.
2464
d6b771c3
PE
24652006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2466
2467 Fix some nits reported by twlevo.
2468 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
2469 and "POSIX". Use more-modern syntax for URLs. Mention C++
2470 and ask for Java. Don't hardwire OS version numbers. Add
2471 copyright notice.
2472 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
2473 * src/conflicts.c (solved_conflicts_obstack): Now static.
2474
1e137b71
JD
24752006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2476
2477 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
2478 page. Say "you can use it" not "you may use it" as on the web page;
2479 we're describing capabilities not granting permission.
2480
73f2e47e
PE
24812006-03-06 Paul Eggert <eggert@cs.ucla.edu>
2482
6d05403d
PE
2483 * data/glr.c (yyresolveLocations): Rename local variables to avoid
2484 shadowing warnings. Use usual patter for iterating through RHS.
2485 * tests/glr-regression.at
2486 (Uninitialized location when reporting ambiguity):
2487 Modify yylex so that it uses its argument, rather than trying
2488 to rely on ARGSUSED (which doesn't work for gcc with warnings).
2489 const char -> char const.
2490
73f2e47e
PE
2491 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
2492 Don't use tabs inside commands; it messes up 'ps'.
2493 Problem reported by twlevo.
2494
8710fc41
JD
24952006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
2496
2497 * tests/glr-regression.at (Uninitialized location when reporting
2498 ambiguity): New test case.
2499 * data/glr.c (yyresolveLocations): New function, which uses
2500 YYLLOC_DEFAULT.
2501 (yyresolveValue): Invoke yyresolveLocations before reporting an
2502 ambiguity.
2503 * doc/bison.texinfo (Default Action for Locations): Note
2504 YYLLOC_DEFAULT's usage for ambiguity locations.
2505 (GLR Semantic Actions): Cross-reference those notes.
2506
ae952af2
JD
25072006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
2508
2509 * tests/glr-regression.at (Leaked semantic values when reporting
2510 ambiguity): Remove unnecessary union and type declarations.
2511 (Leaked lookahead after nondeterministic parse syntax error): New test
2512 case.
2513 * data/glr.c (yyparse): Check for zero stacks remaining before
2514 attempting to shift the lookahead so that you don't lose it.
2515
35ee866a
JD
25162006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2517
2518 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
2519 * tests/glr-regression.at (Leaked semantic values when reporting
2520 ambiguity): New test case.
2521 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
2522 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
2523 now unnecessary yystackp parameter.
2524 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
2525 destructors can be called.
2526
2527 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
2528 in existing testcases.
2529
520181ab
JD
25302006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2531
2532 Don't leak semantic values for parent RHS when a user action cuts the
2533 parser, and clean up related code a bit.
2534 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
2535 cuts parse): Rename to...
2536 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
2537 for leaked parent RHS values.
2538 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
2539 between an unresolved state (non-empty chain of semantic options) and
2540 an incomplete one (signaled by an empty chain).
ae952af2 2541 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
2542 successfully or unsuccessfully resolved yyGLRState to...
2543 (yyresolveValue): ... here so that yyresolveValue always leaves a
2544 yyGLRState with consistent data and thus is easier to understand.
2545 Remove the yyvalp and yylocp parameters since they are always just
2546 taken from the yys parameter. When reporting a discarded merged value
2547 in debugging output, note that it is incompletely merged. Document the
2548 interface.
2549 (yyresolveAction): If resolving any of the RHS states fails, destroy
2550 them all rather than leaking them. Thus, as long as user actions are
2551 written to clean up the RHS correctly, yyresolveAction always cleans up
2552 the RHS of a semantic option. Document the interface.
2553
18d9185c
PE
25542006-02-27 Paul Eggert <eggert@cs.ucla.edu>
2555
2556 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
2557 led to a segmentation fault in GNU Pascal. Problem reported
2558 by Waldek Hebisch.
2559
841a7737
JD
25602006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
2561
2562 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
2563 mid-rule action inside a nonterminal symbol in order to declare a
2564 destructor for its semantic value.
2565
fc3f467f
PE
25662006-02-16 Paul Eggert <eggert@cs.ucla.edu>
2567
2568 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
2569 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
2570 __cplusplus && ! defined _STDLIB_H && !
2571 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
2572 defined free))]: Include <stdlib.h> rather than rolling our own
2573 declarations of malloc and free, to avoid problems with
2574 incompatible declarations (using 'throw') C++'s stdlib.h. This
2575 should fix Debian bug 340012
2576 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
2577 reported by Guillaume Melquiond.
2578
a3af26dd
PE
25792006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2580
4d7bc38c
PE
2581 * NEWS: Clarify symbols versus types in unused-value warnings.
2582
a3af26dd
PE
2583 * configure.ac (AC_INIT): Bump version number.
2584
4e26c69e
PE
25852006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2586
2587 * NEWS: Version 2.1a.
2588 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2589 since C99 requires this.
2590
498e897c
PE
25912006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2592
2593 * m4/c-working.m4: New file.
2594 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2595
57bb17ca
PE
25962006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2597
2598 * Makefile.maint: Merge from coreutils.
2599
0be105dc
PE
26002006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2601
2602 More portability fixes for problems summarized by Nelson H. F. Beebe.
2603
2604 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2605 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2606 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2607 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2608 messes up because C++ code is compiled in 32-bit mode but linked
2609 in 64-bit mode.
2610
6fc0c024
PE
26112006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2612
2613 More portability fixes for problems summarized by Nelson H. F. Beebe.
2614
7870f699
PE
2615 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2616 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2617
6fc0c024
PE
2618 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2619 nodist_PROGRAMS, since we don't need to actually compile the
2620 example if we're just doing a plain 'make'. This avoids bothering
2621 the installer unnecessarily about problems due to weird C++
2622 compilers.
2623
fe6c2fde
PE
26242006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2625
2626 More portability fixes for problems summarized by Nelson H. F. Beebe.
2627
2628 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2629 than #include "...", and compile with -I'.'. The old method was
2630 not portable, according to Posix and the C standard, and it does
2631 not work with Sun C 5.7, where previous #line directives affect
2632 the working directory used in later #include "..." directives.
2633
927b425b
JMG
26342006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2635
2636 Various DJGGP specific issues in /djgpp
2637
d9735e9e
PE
26382006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2639
2640 More portability fixes for problems summarized by Nelson H. F. Beebe.
2641
2642 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2643 '#include <map>' works and that you can apply ++ to iterators.
2644
5a6755af
PE
26452006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2646
67a0dc4f
PE
2647 Work around portability problems summarized by Nelson H. F. Beebe in
2648 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2649
8c86f0ef
PE
2650 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2651 that '#include <string>' works.
2652
de35dd59
PE
2653 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2654 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2655 "warning: sorry: semantics of inline function static data `const
2656 unsigned char translate_table[262]' are wrong (you'll wind up with
2657 multiple copies)".
2658
67a0dc4f
PE
2659 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2660 or, xor to not_, and_, or_, and xor_, respectively. This works
2661 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2662 random system header somewhere that includes the equivalent of
2663 <iso646.h>.
2664
5a6755af
PE
2665 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2666 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 2667 Suite Version 2.0.
5a6755af 2668
3f001415
JD
26692006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2670
2671 During deterministic GLR operation, user actions should be able to
2672 influence the parse by changing yychar. To make this easier to fix and
2673 to make glr.c easier to evolve in general, don't maintain yytoken in
2674 parallel with yychar; just compute yytoken when needed.
2675 * tests/glr-regression.at (Incorrect lookahead during deterministic
2676 GLR): Check that setting yychar in a user action has the intended
2677 effect.
2678 * data/glr.c (yyGLRStack): Remove yytokenp member.
2679 (yyclearin): Don't set *yytokenp.
2680 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2681 yychar rather than *yytokenp to determine the current lookahead.
2682 Compute yytoken locally when needed.
2683 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2684 point to.
2685
2686 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2687 after `--report' documentation.
2688
e2a8c0f5
PE
26892006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2690
2691 * src/parse-gram.y (grammar_declaration): Location of printer
2692 symbol is @1, not list->location. Bug reported by twlevo.
2693 * tests/input.at (Incompatible Aliases): Adjust to above change.
2694
6b702268
PE
26952006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2696
27622431
PE
2697 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2698 all the test at once. This makes the output easier to read in the
2699 normal case.
2700
6b702268
PE
2701 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2702 got from <http://bro-ids.org/download.html>. The bug is that
2703 when two actions appeared in succession, the second one was
2704 scanned before the first one was added to the grammar rule
2705 as a midrule action. Bison then output the incorrect warning
2706 "parse.y:905.17-906.36: warning: unused value: $3".
2707 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2708 associated with a value.
2709 (rhs): Don't invoke grammar_current_rule_action_append.
2710 (action): Invoke it here instead.
2711 * src/reader.c (grammar_midrule_action): Now extern.
2712 (grammar_current_rule_action_append): Don't invoke
2713 grammar_midrule_action; that is now the scanner's job.
2714 * src/reader.h (last_string, last_braced_code_loc):
2715 (grammar_midrule_action): New decls.
2716 * src/scan-gram.l (last_string): Now extern, sigh.
2717 (last_braced_code_loc): New extern variable.
2718 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2719 rule already has an action.
2720 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2721 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2722 Add some tests to check that the above changes fixed the bug.
2723
d40ba6c2
PE
27242006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2725
2726 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2727 All used changed. Check whether the symbol has a destructor,
2728 not whether it is typed.
2729 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2730 that the values are still reported as unused. All line numbers
2731 adjusted.
2732
401aace6
PE
27332006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2734
2735 Work around a bug in bro 0.8, which underparenthesizes its
2736 definition of YYLLOC_DEFAULT.
2737 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2738 their arguments.
2739 * data/lalr1.cc: Likewise.
2740 * data/yacc.cc: Likewise.
2741
06f01bc4
PE
27422006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2743
401aace6
PE
2744 Work around a bug in Pike 7.0, and give the Pike folks a
2745 better way to override the usual int widths.
2746 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2747 user can override the types.
2748 (short): #undef, to work around a bug in Pike 7.0.
2749 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2750 (union yyalloc.yyss): Use yytype_int16 rather than short.
2751 All uses changed.
2752 (yysigned_char): Remove.
2753 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2754 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2755 * tests/regression.at (Web2c Actions): Adjust to above changes.
2756
2757 * src/reader.c (check_and_convert_grammar): New function.
2758 (reader): Close the input file even if something went wrong during
2759 parsing. Minor file descriptor leak reported by twlevo.
2760
06f01bc4
PE
2761 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2762 to pacify gcc -Wswitch-default.
2763 * src/scan-gram.l (adjust_location): Use a default: break; case
2764 to pacify gcc -Wswitch-default.
2765 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2766 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2767 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2768 Move these decls to scan-skel.l, since they don't need to be
2769 visible elsewhere.
2770 * src/scan-skel.l: Accept the above decls.
2771 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2772 is used.
2773
02650b7f
PE
27742006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2775
2776 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2777 since we don't want to insist on a version number at the start
2778 of the changelog every time.
2779 * Makefile.maint: Sync from coreutils a bit better.
2780 (sc_trailing_blank): Renamed from sc_trailing_space.
2781 All uses changed.
2782 (sc_no_if_have_config_h, sc_require_config_h):
2783 (sc_prohibit_assert_without_use): New rules.
2784 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2785 (sc_dd_max_sym_length): Fix leading spaces in rule.
2786 (sc_system_h_headers): Prefix with @.
2787 (sc_useless_cpp_parens, m4-check): Output line numbers.
2788 (changelog-check): Allow version only in head.
2789 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2790 satisfy new Makefile.maint rule.
2791 * data/glr.c: Likewise.
2792 * data/glr.cc: Likewise.
2793 * data/lalr1.cc: Likewise.
2794 * data/yacc.c: Likewise.
2795 * lib/ebitsetv.c: Likewise.
2796 * lib/lbitset.c: Likewise.
2797 * lib/subpipe.c: Likewise.
2798 * lib/timevar.c: Likewise.
2799 * src/system.h: Likewise.
2800 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2801 * djgpp/Makefile.maint: Add copyright notice.
2802 * djgpp/README.in: Likewise.
2803 * djgpp/config.bat: Likewise.
2804 * djgpp/config.site: Likewise.
2805 * djgpp/config_h.sed: Likewise.
2806 * djgpp/djunpack.bat: Likewise.
2807 * djgpp/config.sed: Fix copyright notice to match standard format.
2808 * djgpp/subpipe.h: Likewise.
2809 * lib/bitsetv-print.c: Likewise.
2810 * lib/bitsetv.c: Likewise.
2811 * lib/subpipe.h: Likewise.
2812 * lib/timevar.c: Likewise.
2813 * lib/timevar.h: Likewise.
2814 * djgpp/subpipe.c: Use standard recipe for config.h.
2815 * lib/abitset.c: Likewise.
2816 * lib/bitset.c: Likewise.
2817 * lib/bitset_stats.c: Likewise.
2818 * lib/bitsetv-print.c: Likewise.
2819 * lib/bitsetv.c: Likewise.
2820 * lib/ebitsetv.c: Likewise.
2821 * lib/get-errno.c: Likewise.
2822 * lib/lbitset.c: Likewise.
2823 * lib/subpipe.c: Likewise.
2824 * lib/timevar.c: Likewise.
2825 * lib/vbitset.c: Likewise.
2826 * tests/local.at: Likewise.
2827 * src/scan-gram.l: Don't include verify.h, since system.h does
2828 that for us.
2829 * .x-sc_require_config_h: New file.
2830 * .x-sc_unmarked_diagnostics: New file.
2831
287c78f6
PE
28322006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2833
287c78f6
PE
2834 Be a bit more systematic about using 'abort'.
2835 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2836 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2837 Put 'default: abort ();' before some other case, to satisfy older
2838 pedantic compilers.
2839 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2840 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2841 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2842 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
2843 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2844 (get_decision_str, get_orientation_str, get_node_alignment_str):
2845 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2846 (get_linestyle_str, get_arrowstyle_str): Likewise.
2847 * src/conflicts.c (resolve_sr_conflict):
2848 Use a default case rather than one for the one remaining enum
2849 value, to catch invalid enum values as well.
2850 * src/lalr.c (set_goto_map, map_goto):
2851 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2852 * src/nullable.c (nullable_compute, token_definitions_output):
2853 Likewise.
2854 * src/reader.c (packgram, reader): Likewise.
2855 * src/state.c (transitions_to, state_new, state_reduction_find):
2856 Likewise.
2857 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2858 (symbol_pack): Likewise.
2859 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
2860 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2861 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
2862 * src/system.h: Don't include <assert.h>.
2863 (assert): New macro.
2864
2865 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2866 (Destructor Decl, Parser Function, Pure Calling):
2867 Describe rules for braces inside C code more carefully.
287c78f6 2868
c66dfadd
PE
28692006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2870
c21493b8
PE
2871 Fix some porting glitches found by Nelson H. F. Beebe.
2872 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2873 compilers that don't understand that abort () does not return.
2874 * src/state.c (transitions_to): Likewise.
2875 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2876 that '#include <cstdlib>' works.
2877 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2878 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2879 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2880 for the benefit of some pre-C99 compilers.
2881
b6e3facf
PE
2882 * bootstrap: Undo changes to gnulib files that autoreconf made.
2883
c66dfadd
PE
2884 Minor fixups to get 'make maintainer-check' to work.
2885 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2886 with the new verify.h implementation.
2887 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2888 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2889 * data/yacc.c (YYUSE): Likewise.
2890 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2891 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2892 * src/parse-gram.y (declaration): Don't pass a string constant
2893 to a function that expects char *, since GCC might complain
2894 about the constant value.
2895 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2896 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2897 before #defining them.
2898 * tests/glr-regression.at
2899 (Incorrectly initialized location for empty right-hand side in GLR):
2900 In yyerror, use the msg arg.
2901 (Corrupted semantic options if user action cuts parse):
2902 (Incorrect lookahead during deterministic GLR):
2903 (Incorrect lookahead during nondeterministic GLR):
2904 Don't name a local var 'index'; it shadows string.h's 'index'.
2905
ed94ef2a
AD
29062006-01-19 Akim Demaille <akim@epita.fr>
2907
2908 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2909 location, not just parts of it.
2910
e9ad4aec
PE
29112006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2912
d6ca7905
PE
2913 * NEWS: Document the fact that multiple %unions are now allowed.
2914 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
2915 * TODO: This feature is now implemented, so remove it from
2916 the wishlist.
d6ca7905 2917
ef1b70e0
PE
2918 * Makefile.maint: Merge with coreutils Makefile.maint.
2919 (CVS_LIST): Use build-aux version if available.
2920 (VERSION_REGEXP): New macro.
2921 (syntax-check-rules): Add sc_no_if_have_config_h,
2922 sc_prohibit_assert_without_use, sc_require_config_h,
2923 sc_useless_cpp_parens.
2924 (sc_obsolete_symbols): Check for O_NDELAY.
2925 (sc_dd_max_sym_length): Track coreutils.
2926 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2927 (sc_useless_cpp_parens): New rule.
2928 (news-date-check): Look for version or today's date.
2929 (changelog-check): Don't require version number near head.
2930 (copyright-check): Use current year instead of hardwiring 2005.
2931 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2932 (announcement): Add --gpg-key-ID.
2933
2934 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2935 with "file system".
2936
2073ce56 2937 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
2938 array. Problem reported by twlevo.
2939 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2940 * src/lalr.c (build_relations): Rely on new sentinel.
2941 * src/gram.c (gram_free): Adjust to new sentinel.
2942
b7691f15
JD
29432006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2944
2945 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2946 yylookaheadNeeds. All uses updated.
2947 (yysplitStack): Rename local yynewLookaheadStatuses to
2948 yynewLookaheadNeeds.
2949 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2950 GLR): In comments, change `lookahead status' to `lookahead need'.
2951
ddee1b06
PH
29522006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2953
2954 * data/glr.c (yysplitStack): A little stylistic rewrite.
2955
12f4614d
PH
29562006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2957
2958 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2959
32c29292
JD
29602006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2961
2962 * doc/bison.texinfo: Fix some typos.
2963 (GLR Semantic Actions): New subsection discussing special
2964 considerations because GLR semantic actions might be deferred.
2965 (Actions): Mention look-ahead usage of yylval.
2966 (Actions and Locations): Mention look-ahead usage of yylloc.
2967 (Special Features for Use in Actions): Add YYEOF entry and mention it
2968 in the yychar entry.
2969 In the yychar entry, remove mention of the local yychar case (pure
2970 parser) since this is irrelevant information when writing semantic
2971 actions and since it's already discussed in `Bison Symbols' where
2972 yychar is otherwise described as an external variable.
2973 In the yychar entry, don't call it the `current' look-ahead since it
2974 isn't when semantic actions are deferred.
2975 In the yychar and yyclearin entries, add note about deferred semantic
2976 actions.
2977 Add yylloc and yylval entries discussing look-ahead usage.
2978 (Look-Ahead Tokens): When discussing yychar, don't call it the
2979 `current' look-ahead, and do mention yylval and yylloc.
2980 (Error Recovery): Cross-reference `Action Features' when mentioning
2981 yyclearin.
2982 (Bison Symbols): In the yychar entry, don't call it the `current'
2983 look-ahead.
2984 In the yylloc and yylval entries, mention look-ahead usage.
2985
de366a2f 29862006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
2987
2988 * tests/glr-regression.at: Update copyright year to 2006.
2989
bf70fa87
JD
29902006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2991
2992 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2993 use during nondeterministic operation to track which stacks have
2994 actually needed the current lookahead.
2995 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2996 Allocate, deallocate, resize, and otherwise shuffle space for
2997 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2998 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2999 appropriately during nondeterministic operation.
3000 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
3001 members to store the current lookahead to be used by the deferred
3002 user action.
3003 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
3004 from which the RHS is taken. Set the lookahead members of the new
3005 yySemanticOption according to the lookahead status for stack yyk.
3006 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
3007 yyaddDeferredAction.
3008 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
3009 members of yySemanticOption before invoking yyuserAction, and then set
3010 them back to their current values afterward.
3011 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
3012 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
3013 * tests/glr-regression.at: Remove `.' from the ends of recent test case
3014 titles for consistency.
3015 (Leaked merged semantic value if user action cuts parse): In order to
3016 suppress lint warnings, use arguments in merge function, and assign
3017 char value < 128 in main.
3018 (Incorrect lookahead during deterministic GLR): New test case.
3019 (Incorrect lookahead during nondeterministic GLR): New test case.
3020
05449a2c
JD
30212006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3022
de366a2f 3023 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
3024 !yyvaluep as signal that no semantic value is available to print.
3025 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
3026 to print a semantic value.
3027
4158e0a1 30282006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 3029
4158e0a1
JD
3030 * tests/glr-regression.at: For consistency with my newer test cases,
3031 don't thank myself.
3032
d659304d
JD
30332006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
3034
3035 * data/glr.c (yyresolveValue): When merging semantic options, if at
3036 least one user action succeeds but a later one cuts the parse, then
3037 destroy the semantic value before returning rather than leaking it.
3038 (yyresolveStates): If a user action cuts the parse and thus
3039 yyresolveValue fails, ignore the (unset) semantic value rather than
3040 corrupting the yyGLRState, and empty the semantic options list since
3041 the user actions should have called all necessary destructors.
3042 Simplify code with YYCHK.
3043 * tests/glr-regression.at (Corrupted semantic options if user action
3044 cuts parse): New test case.
3045 (Undesirable destructors if user action cuts parse): New test case.
3046 Before applying any of this patch, this test case never actually failed
3047 for me... but only because the corrupted semantic options usually
3048 masked this bug.
3049 (Leaked merged semantic value if user action cuts parse): New test
3050 case.
3051
6ec2c0f2
AD
30522006-01-05 Akim Demaille <akim@epita.fr>
3053
3054 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
3055
1b9c21fb
PE
30562006-01-04 Paul Eggert <eggert@cs.ucla.edu>
3057
3058 * data/c.m4 (b4_c_modern): New macro, with a new provision for
3059 _MSC_VER. Problem reported by Cenzato Marco.
3060 (b4_c_function_def): Use it.
3061 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
3062 b4_c_modern.
3063 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
3064 than rolling our own.
3065
84866159
AD
30662006-01-04 Akim Demaille <akim@epita.fr>
3067
3068 Also warn about non-used mid-rule values.
3069 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
3070 member.
3071 (symbol_list_new): Adjust.
3072 * src/reader.c (symbol_typed_p): New.
3073 (grammar_rule_check): Use it.
3074 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
3075 Check its rule.
3076 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
3077 Use it.
3078 * tests/actions.at (Exotic Dollars): Adjust.
3079
378f4bd8
AD
30802006-01-04 Akim Demaille <akim@epita.fr>
3081
3082 * src/reader.c (grammar_midrule_action): If $$ is set in a
3083 mid-rule, move the `used' bit to its lhs.
3084 * tests/input.at (Unused values): New.
3085 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
3086
e2a21b6f
PE
30872006-01-03 Paul Eggert <eggert@cs.ucla.edu>
3088
54662697
PE
3089 * doc/bison.texinfo (Bison Options): Say more accurately what
3090 --yacc does.
3091 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
3092 about declarations in the grammar when in Yacc mode, as POSIX does
3093 not require a diagnostic when the grammar uses extensions.
3094
3095 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
3096
073f9288
PE
3097 Warn about dubious constructions like "%token T T".
3098 Reported by twlevo.
3099 * src/symtab.h (struct symbol.declared): New member.
3100 * src/symtab.c (symbol_new): Initialize it to false.
3101 (symbol_class_set): New arg DECLARING, specifying whether
3102 this is a declaration that we want to warn about, if there
3103 is more than one of them. All uses changed.
3104
1221b78a
PE
3105 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
3106 Allow multiple %union directives, whose contents concatenate.
3107 * src/parse-gram.y (grammar_declaration): Likewise.
3108 Use muscle_code_grow, so that we don't need stype_line any more.
3109 All uses changed.
3110
3111 * src/muscle_tab.c (muscle_grow): Fix comment.
3112
e2a21b6f
PE
3113 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
3114 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
3115 Update copyright year to 2006.
3116
8f7e3cf9
AD
31172006-01-03 Akim Demaille <akim@epita.fr>
3118
3119 Have glr.cc pass (some of) the calc.at tests.
3120 * data/glr.cc (b4_parse_param_orig): New.
3121 (b4_parse_param): Improve its definition, and bound it more
3122 clearly in the skeleton.
3123 (b4_epilogue): Append, instead of prepending, in order to keep
3124 #line consistency.
3125 Simplify the generation of auxiliary functions: locations and
3126 purity are mandated.
3127 (b4_global_tokens_and_yystype): Honor it.
3128 * data/location.cc (c++.m4): Don't include it.
3129 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
3130 and AT_SKEL_CC_IF.
3131 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
3132 AT_LALR1_CC_IF.
3133 Be sure to initialize the first position's filename.
3134 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
3135 mandated anyway.
3136 (AT_CHECK_CALC_GLR_CC): New.
3137 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
3138
3953ed88
AD
31392006-01-02 Akim Demaille <akim@epita.fr>
3140
3141 * src/output.c (output_skeleton): Don't hard wire the inclusion of
3142 c.m4.
0a96ba81 3143 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
3144 * data/glr.cc: Do not include stack.hh.
3145
9ecafbbf
AD
31462006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3147
3148 * data/glr.c: Reformat whitespace with tabs.
3149 (b4_lpure_formals): Remove this unused m4 macro.
3150 * tests/cxx-type.at: Reformat whitespace with tabs.
3151 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
3152 since it's a member. Rename type to isNterm for clarity.
3153
c4d497a0
AD
31542005-12-29 Akim <akim@sulaco.local>
3155
3156 Let glr.cc catch up with symbol_value_print.
3157 * data/glr.cc (b4_yysymprint_generate): Replace by...
3158 (b4_yy_symbol_print_generate): this.
3159 (yy_symbol_print, yy_symbol_value_print): Declare them.
3160
4517da37
PE
31612005-12-28 Paul Eggert <eggert@cs.ucla.edu>
3162
3163 * src/location.h (boundary): Note that a line or column equal
3164 to INT_MAX indicates an overflow.
3165 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
3166 (rule_length_overflow, increment_rule_length, add_column_width):
3167 New functions.
3168 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
3169 (<SC_BRACED_CODE>"}"):
3170 Use increment_rule_length rather than incrementing it by hand.
3171 (adjust_location, handle_syncline): Diagnose overflow.
3172 (handle_action_dollar, handle_action_at):
3173 Fix bug with monstrosities like $-2147483648.
3174 Remove now-unnecessary checks.
3175 (scan_integer): Verify assumptions and remove now-unnecessary checks.
3176 (convert_ucn_to_byte): Verify assumptions.
3177 (handle_syncline): New arg LOC. All callers changed.
3178 Don't store through a value derived from char const * pointer.
3179
3180 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
3181 GCC warnings.
3182
e3233bf6
PE
31832005-12-27 Paul Eggert <eggert@cs.ucla.edu>
3184
3185 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
3186 Remove unnecessary forward static decls.
3187
8f3596a6
AD
31882005-12-27 Akim Demaille <akim@epita.fr>
3189
3190 * src/reader.c (grammar_current_rule_check): Also check that $$
3191 is used.
3192 Take the rule to check as argument, hence rename as...
3193 (grammar_rule_check): this.
3194 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
3195 Rename as...
3196 (grammar_rule_begin, grammar_rule_end): these, for consistency.
3197 (grammar_midrule_action, grammar_symbol_append): Now static.
3198 * tests/torture.at (input): Don't rely on the default action
3199 being always performed.
3200 * tests/calc.at: "Set" $$ even when the action is "cut" with
3201 YYERROR or other.
3202 * tests/actions.at (Exotic Dollars): Instead of using unused
3203 values, check that the warning is issued.
3204
721be13c
PE
32052005-12-22 Paul Eggert <eggert@cs.ucla.edu>
3206
3207 * NEWS: Improve wording for unused-value warnings.
3208
a0af42fc
AD
32092005-12-22 Akim Demaille <akim@epita.fr>
3210
3211 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
3212 (b4_yysymprint_generate): Rename as...
3213 (b4_yy_symbol_print_generate): this.
3214 Generate yy_symbol_print instead of yysymprint.
3215 Generate also yy_symbol_value_print, and use it.
3216
affac613
AD
32172005-12-22 Akim Demaille <akim@epita.fr>
3218
721be13c 3219 * NEWS: Warn about unused values.
affac613
AD
3220 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
3221 a `used' member.
3222 (symbol_list_n_get, symbol_list_n_used_set): New.
3223 (symbol_list_n_type_name_get): Use symbol_list_n_get.
3224 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
3225 * src/reader.c (grammar_current_rule_check): Check that values are
3226 used.
3227 * src/symtab.c (symbol_print): Accept 0.
3228 * tests/existing.at: Remove the type information.
3229 Empty the actions.
3230 Remove useless actions (beware of mid-rule actions: perl -000
3231 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
3232 * tests/actions.at (Exotic Dollars): Use unused values.
3233 * tests/calc.at: Likewise.
3234 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3235 Likewise.
3236
3237 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
3238 rule_useful_p.
3239
9d9b8b70
PE
32402005-12-21 Paul Eggert <eggert@cs.ucla.edu>
3241
8bb4c753
PE
3242 Undo 2005-12-01 tentative license wording change. The wording is
3243 still being reviewed by the lawyers, and we don't want to wait for
3244 them before publishing a test release. For now, revert to the
3245 previous wording.
3246 * NEWS: Undo 2005-12-01 change.
3247 * data/glr.c: Revert to previous license wording.
3248 * data/glr.cc: Likewise.
3249 * data/lalr1.cc: Likewise.
3250 * data/location.cc: Likewise.
3251 * data/yacc.c: Likewise.
3252
9d9b8b70
PE
3253 * NEWS: Reword %destructor vs YYABORT etc.
3254 * data/glr.c: Use American spacing, for consistency.
3255 * data/glr.cc: Likewise.
3256 * data/lalr1.cc: Likewise.
3257 * data/yacc.c: Likewise.
3258 * data/yacc.c: Reformat comments slightly.
3259 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
3260 for consistency. Fix some spelling errors and reword recently-included
3261 text slightly.
3262 * tests/cxx-type.at: Cast results of malloc, for C++.
3263
2c3b392a
AD
32642005-12-21 Joel E. Denny <address@hidden>
3265
3266 * tests/cxx-type.at: Construct a tree, count the parents of shared
3267 nodes, and free each node once and only once. Previously, the memory
3268 for semantic values was leaked instead.
3269
d6cff4dc
AD
32702005-12-21 Joel E. Denny <address@hidden>
3271
3272 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
3273 (yylval, yylloc): If pure, #define to yystackp->yyval and
3274 yystackp->yyloc similar to yychar and yynerrs.
3275 (yyparse): If pure, remove local yylval and yylloc. Add local
3276 yystackp to accommodate pure definitions of yylval and yylloc.
3277 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
3278 yylvalp and yyllocp to &yylval and &yylloc.
3279 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
3280 namespace. Previously, nerrs and char were missing, but lval and lloc
3281 weren't necessary.
3282 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
3283 yylvalp and yyllocp parameters since, if pure, these are now always
3284 accessible through yystackp. If not pure, they are still accessible
3285 globally.
3286 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
3287 `if (YYID (N))' to pacify lint.
3288
a85284cf
AD
32892005-12-21 Akim Demaille <akim@epita.fr>
3290
3291 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
3292 destroy the RHS symbols of a rule.
3293 * data/yacc.c (yylen): Initialize to 0.
3294 Keep its value to the number of items to possibly shift.
3295 In particular, a regular successful parse that ends on YYFINAL by
3296 a (internal) YYACCEPT must not have yylen != 0.
3297 (yyerrorlab, yyreturn): Pop the RHS.
3298 Reorder a bit to emphasize the `shifting' bits of code.
3299 (YYPOPSTACK): Now accept a number of items to pop.
3300 * data/lalr1.cc: Likewise.
3301 * data/glr.c: Formatting changes.
3302 Use goto instead of fall through.
3303 * doc/bison.texinfo (Destructor Decl): Complete.
3304
d508c281
JMG
33052005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3306
3307 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3308 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
3309 * djgpp/config.bat: Replace every occurence of the file name
3310 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
3311 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
3312 * djgpp/config.sed: Replace every occurence of the file name
3313 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
3314 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
3315 * djgpp/djunpack.bat: DJGPP specific file.
3316 * djgpp/fnchange.lst: DJGPP specific file.
3317 * djgpp/README.in: Add new information about how to unpack the bison
3318 source on MSDOS and other systems which have 8.3 file name restrictions
3319 using djunpack.bat and fnchange.lst.
3320
3e7a2cd9
PE
33212005-12-12 Paul Eggert <eggert@cs.ucla.edu>
3322
3323 * bootstrap (build_cvs_prefix): Remove; unused.
3324 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
3325 when getting gnulib.
3326
33272005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
3328
3329 * data/glr.c: Reorder typedef declarations for structs to match order
3330 of struct declarations.
3331 Rename yystack everywhere to yystackp except in yyparse where it's not
3332 a pointer.
3333 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
3334 consistency.
3335 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
3336 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
3337 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
3338 lint.
3339
877519f8
PE
33402005-12-09 Paul Eggert <eggert@cs.ucla.edu>
3341
0eca5a39
PE
3342 * tests/sets.at (Accept): Fix typos in regular expression used to
3343 sed out the final state number.
3344
2cec9080
PE
3345 Work around portability problem on Solaris 10: flex-generated
3346 files include <stdio.h> before <config.h>, which messes up
3347 because the latter defines __EXTENSIONS__. Address the problem
3348 by creating two new little files that include <config.h> first,
3349 then include the flex-generated files. Rewrite everyone else
3350 to include <config.h> first, as well.
3351 * lib/timevar.c: Always include "config.h".
3352 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
3353 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
3354 (EXTRA_bison_SOURCES): New macro.
3355 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
3356 * src/system.h: Don't include config.h.
3357 * src/LR0.c: Include <config.h> first.
3358 * src/assoc.c: Likewise.
3359 * src/closure.c: Likewise.
3360 * src/complain.c: Likewise.
3361 * src/conflicts.c: Likewise.
3362 * src/derives.c: Likewise.
3363 * src/files.c: Likewise.
3364 * src/getargs.c: Likewise.
3365 * src/gram.c: Likewise.
3366 * src/lalr.c: Likewise.
3367 * src/location.c: Likewise.
3368 * src/main.c: Likewise.
3369 * src/muscle_tab.c: Likewise.
3370 * src/nullable.c: Likewise.
3371 * src/output.c: Likewise.
3372 * src/parse-gram.y: Likewise.
3373 * src/print.c: Likewise.
3374 * src/print_graph.c: Likewise.
3375 * src/reader.c: Likewise.
3376 * src/reduce.c: Likewise.
3377 * src/relation.c: Likewise.
3378 * src/state.c: Likewise.
3379 * src/symlist.c: Likewise.
3380 * src/symtab.c: Likewise.
3381 * src/tables.c: Likewise.
3382 * src/uniqstr.c: Likewise.
3383 * src/vcg.c: Likewise.
3384
877519f8
PE
3385 * src/parse-gram.y: Fix minor problems uncovered by lint.
3386 (current_lhs, current_lhs_location): Now static.
3387 (current_assoc): Remove unused variable.
3388
3389 Cleanups so that Bison-generated parsers have less lint.
3390 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
3391 Prepend /*ARGSUSED*/, for lint's sake.
3392 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
3393 definition if 'lint' is defined.
3394 (YYID): New macro (or function, if lint).
3395 All uses of /*CONSTCOND*/0 replaced by YYID(0).
3396 * data/yacc.c: Likewise.
3397 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
3398 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
3399 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
3400 is C++ only.
3401 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
3402 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
3403 Use YYID(0) rather than 0, for lint.
3404 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
3405 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
3406
f5228370
PE
34072005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3408
3409 * tests/glr-regression.at
3410 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3411 Close memory leak reported by twlevo.
3412
69ce078b
PE
34132005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
3414
6ff99711
PE
3415 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
3416 all stacks.
3417 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
3418 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3419 New test case.
3420 (Duplicated user destructor for lookahead): This test now is expected
3421 to succeed.
3422
af3412cd
PE
34232005-12-01 Paul Eggert <eggert@cs.ucla.edu>
3424
32b5b719 3425 * NEWS: Document the following change.
af3412cd
PE
3426 * data/yacc.c: Say "parser skeleton" rather than "file", since
3427 it's no longer just a file.
3428 * data/glr.c: Grant a special exception for C GLR parsers, that
3429 reads like the already-existing exception for C LALR(1) parsers.
3430 * data/glr.cc: Likewise.
3431 * data/lalr1.cc: Likewise.
3432 * data/location.cc: Likewise.
3433 * data/yacc.c: Reword the "written by" statement to clarify that
3434 it was the parser skeleton, not the entire output file.
3435 * data/glr.c: Written by Paul Hilfinger.
3436 * data/glr.cc: Written by Akim Demaille.
3437 * data/lalr1.cc: Likewise.
3438
035aa4a0
PE
34392005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3440
d9963c85
PE
3441 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
3442 Fix typos in previous change that broke 'make check'.
3443 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
3444 supported in C.
3445 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
3446 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
3447 We can revert this once things settle down.
3448
035aa4a0
PE
3449 * src/conflicts.c (conflicts_print): Don't print file name twice
3450 when %expect fails because there were no conflicts.
3451 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
3452 change.
3453 * tests/conflicts.at (%expect not enough, %expect too much):
3454 (%expect with reduce conflicts): Adjust to new behavior.
3455
34562005-11-18 Akim Demaille <akim@epita.fr>
3457
3458 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
3459 errors.
3460 * NEWS: Document this.
3461 * doc/bison.texinfo (Expect Decl): Likewise.
3462
d1ff7a7c
AD
34632005-11-16 Akim Demaille <akim@epita.fr>
3464
3465 Generalize the display of semantic values and locations in traces.
3466 * data/glr.c (yy_reduce_print): Fix indices (again).
3467 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
3468 literal integers.
3469 * data/lalr1.cc (yyreduce_print): Rename as...
3470 (yy_reduce_print): this.
3471 Display values and locations.
3472 * data/yacc.c (yy_reduce_print): Likewise.
3473 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
3474 (yysymprint): Move higher to be visible from yy_reduce_print).
3475 (yyparse): Adjust.
3476 * tests/calc.at: Adjust the expected length of the traces.
3477
6de5398d
AD
34782005-11-14 Akim Demaille <akim@epita.fr>
3479
3480 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
3481 from 1 to N, while values and location start at 0.
3482 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
3483
a1373f55
AD
34842005-11-14 Akim Demaille <akim@epita.fr>
3485
3486 * data/glr.c (yy_reduce_print): Fix the $ number.
3487
613d8952
AD
34882005-11-14 Akim Demaille <akim@epita.fr>
3489
3490 "Use" parse parameters.
3491 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
3492 * data/glr.c, data/glr.cc: Use them.
3493 * data/glr.c (YYUSE): Have a C++ definition that supports
3494 non-pointer types.
3495
b2741627
AD
34962005-11-14 Akim Demaille <akim@epita.fr>
3497
3498 * data/glr.c (yyexpandGLRStack): Declare only if defined.
3499
5059b5c8
AD
35002005-11-14 Akim Demaille <akim@epita.fr>
3501
42249483
AD
3502 * data/glr.cc: New.
3503 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 3504
4626a15d
AD
35052005-11-12 Akim Demaille <akim@epita.fr>
3506
3507 Let position and location be PODs.
3508 * data/location.cc (position::initialize, location::initialize): New.
3509 (position::position, location::location): Define only if
3510 b4_location_constructors is defined.
3511 * data/lalr1.cc (b4_location_constructors): Define it for backward
3512 compatibility.
3513 * doc/bison.texinfo (Initial Action Decl): Use initialize.
3514
35152005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
3516
3517 * data/lalr1.cc: Move the body of the ctor and dtor into the
3518 parser file (instead of the header).
3519 Wrap the implementations in a "namespace yy".
3520
35212005-11-12 Akim Demaille <akim@epita.fr>
3522
3523 Have glr.c include its header file when created.
3524 * data/glr.c (b4_shared_declarations): New.
3525 Output them verbatim in the parser if !%defines, otherwise
3526 output then in the header file, and include it instead.
3527
1989d947
AD
35282005-11-11 Akim Demaille <akim@epita.fr>
3529
3530 * data/glr.c: Comment changes.
3531
35322005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
3533
3534 When yydebug, report semantic and location values for reductions.
3535 * data/glr.c (yy_reduce_print): Report the semantic values and the
3536 locations.
3537 (YY_REDUCE_PRINT): Adjust.
3538 (yyglrReduce): Use them.
3539 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
3540 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
3541 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
3542 traces.
3543
02998094
AD
35442005-11-10 Akim Demaille <akim@epita.fr>
3545
3546 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
3547 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
3548 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
3549
5210672f
PE
35502005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
3551
3552 * m4/cxx.m4, examples/Makefile.am: Don't build
3553 examples/calc++ if no C++ compiler is available. (trivial change)
3554
a8991a1d
AD
35552005-11-09 Akim Demaille <akim@epita.fr>
3556
3557 * src/scan-skel.l: Use a couple of asserts.
3558
36b5e963
AD
35592005-11-03 Akim Demaille <akim@epita.fr>
3560
3561 In some (weird) cases, the final state number is incorrect.
3562 Reported by Alexandre Duret-Lutz.
3563 * src/LR0.c (state_list_append): Remove the computation of
3564 final_state.
3565 (save_reductions): Do it here.
3566 (get_state): Alpha conversion.
3567 (generate_states): Use a for loop.
3568 * src/gram.h (item_number_is_rule_number)
3569 (item_number_is_symbol_number): New.
3570 * src/state.c: Use assert.
3571 * src/system.h: Include assert.h.
3572 * tests/sets.at (Accept): New.
3573
44e7ead1
PH
35742005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3575
3576 * data/glr.c (yyfill): Adjust comment.
36b5e963 3577 (yyresolveAction): Initialize default location properly
44e7ead1
PH
3578 for empty right-hand sides.
3579 (yydoAction): Ditto.
3580 Add comment explaining apparently dead code.
36b5e963
AD
3581 * tests/glr-regression.at
3582 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 3583 New test.
36b5e963 3584
e10a80ee
PE
35852005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3586
3587 * bootstrap (cleanup_gnulib): New function. Use it to clean up
3588 gnulib when interrupted. This fixes some race conditions and
3589 works around some portability problems (one noted by Paul
3590 Hilfinger).
3591
067b32ee
AD
35922005-10-22 Akim <akim@epita.fr>
3593
3594 * Makefile.cfg: Adjust to config -> build-aux.
3595 Reported by twledo.
3596
4b367315
AD
35972005-10-21 Akim Demaille <akim@epita.fr>
3598
3599 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3600 the %parse-params.
3601 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3602 * data/yacc.c (b4_Pure_if): Rename as...
3603 (b4_yacc_pure_if): this.
3604 (YY_SYMBOL_PRINT, yyparse): Adjust.
3605 * doc/bison.texinfo: Formatting changes.
3606
24cc23d9
AD
36072005-10-21 Akim Demaille <akim@epita.fr>
3608
3609 Finish the transition config -> build-aux.
3610 * configure.ac, Makefile.am: Use build-aux.
3611 * config/prev-version, config/announce-gen, config/Makefile.am:
3612 Move to...
3613 * build-aux/prev-version, build-aux/announce-gen,
3614 * build-aux/Makefile.am: here.
3615
d4476375
AD
36162005-10-14 Akim Demaille <akim@epita.fr>
3617
3618 * examples/calc++/test: Use set -x only when VERBOSE.
3619
302c0aee
PE
36202005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3621
3622 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3623 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3624
7625ec2c
AD
36252005-10-13 Akim Demaille <akim@epita.fr>
3626
3627 * src/scan-skel.l: Output the base name parts of the parser and
3628 header file names.
302c0aee 3629 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
3630 additional checks.
3631 Use this to exercise C++ outputs in subdirs.
3632 Reported by Oleg Smolsky.
3633
ba0fe3c7
PE
36342005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3635
3636 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3637 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3638 Problem reported by John P. Hartmann.
3639 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3640 already defined it.
3641
9b8a5ce0
AD
36422005-10-12 Akim Demaille <akim@epita.fr>
3643
3644 * src/parse-gram.y (version_check): Exit 63 to please missing
3645 (stands for "version mismatch).
3646 * tests/input.at, doc/bison.texinfo: Adjust.
3647
4f6e011e
PE
36482005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3649
3650 Work around portability problems with Visual Age C compiler
3651 (xlc and xlC_r) reported by John P. Hartmann.
3652 * data/location.cc (initial_column, initial_line): Remove.
3653 All uses replaced by 0 and 1.
3654 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3655 that xlc complains about.
3656 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 3657 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 3658 as __STDC__.
4d7aa45e
PE
3659 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3660 __STDC_VERSION__. Use it everywhere instead of looking at
3661 __STDC__ and __cplusplus.
4f6e011e 3662
a1b3bf8c
AD
36632005-10-10 Akim Demaille <akim@epita.fr>
3664
3665 * examples/calc++/test: Be quiet unless VERBOSE.
3666
412e44aa
PE
36672005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3668
2a4647a3
PE
3669 * data/c.m4 (yydestruct, yysymprint):
3670 Use YYUSE instead of casting to void.
3671 * data/glr.c (YYUSE): New macro.
3672 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3673 Use it instead of rolling our own.
3674 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3675 (YYCHK1):
3676 Use /*CONSTCOND*/ to suppress lint warnings.
3677 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3678 (YY_STACK_PRINT): Use 'false' not '0'.
3679 (YYUSE): New macro.
3680 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3681 * data/yacc.c (YYUSE): New macro.
3682 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3683 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3684 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3685
3686
412e44aa
PE
3687 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3688 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3689
88c6637f
PE
36902005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3691
2f4f028d
PE
3692 Undo the parts of the unlocked-I/O change that substituted
3693 putc or puts for printf. This might hurt performance a bit,
3694 but some people prefer the printf style.
3695 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3696 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3697 All uses replaced by YYFPRINTF and YYDPRINTF.
3698 * data/yacc.c: Likewise.
3699 * lib/bitset.c (bitset_print): Likewise.
3700 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3701 putc and puts.
3702 * lib/lbitset.c (debug_lbitset): Likewise.
3703 * src/closure.c (print_firsts, print_fderives): Likewise.
3704 * src/gram.c (grammar_dump): Likewise.
3705 * src/lalr.c (look_ahead_tokens_print): Likewise.
3706 * src/output.c (escaped_output): Likewise.
3707 (user_actions_output): Break apart two printfs.
3708 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3709 * src/reduce.c (reduce_print): Likewise.
3710 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3711 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3712
88c6637f
PE
3713 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3714 Use assignments rather than casts-to-void to suppress
3715 unused-variable warnings. This pacifies 'lint'.
3716 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3717 unused-variable warnings.
3718
fb32e373
JMG
37192005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3720
3721 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3722
edb8f44f
PE
37232005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3724
fb9c0b33
PE
3725 Use unlocked I/O for a minor performance improvement on hosts like
3726 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3727 is to use the gnlib unlocked-io module, and to prefer putc and
3728 puts to printf when either will work (since the latter doesn't
3729 come in an unlocked flavor).
3730 * bootstrap (gnulib_modules): Add unlocked-io.
3731 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3732 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3733 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3734 and similarly for puts and putc and printf.
3735 * data/yacc.c: Likewise.
3736 * lib/bitset.c (bitset_print): Likewise.
3737 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3738 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3739 to printf.
3740 * lib/lbitset.c (debug_lbitset): Likewise.
3741 * src/closure.c (print_firsts, print_fderives): Likewise.
3742 * src/gram.c (grammar_dump): Likewise.
3743 * src/lalr.c (look_ahead_tokens_print): Likewise.
3744 * src/output.c (escaped_output): Likewise.
3745 (user_actions_output): Coalesce two printfs.
2f4f028d 3746 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
3747 * src/reduce.c (reduce_print): Likewise.
3748 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 3749 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 3750
edb8f44f
PE
3751 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3752 this confuses xgettext.
3753
b50d2359
AD
37542005-10-02 Akim Demaille <akim@epita.fr>
3755
3756 * bootstrap (gnulib_modules): Add strverscmp.
3757 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3758 * m4/.cvsignore: Add strverscmp.m4.
3759 * src/parse-gram.y (%require): New token, new rule.
3760 (version_check): New.
3761 * src/scan-gram.l (%require): Adjust.
3762 * tests/input.at (AT_REQUIRE): New.
3763 Use it.
3764 * doc/bison.texinfo (Require Decl): New.
3765 (Calc++ Parser): Use %require.
3766
21667f64
AD
37672005-10-02 Akim Demaille <akim@epita.fr>
3768
3769 * data/location.cc: New.
3770
2b81e969
AD
37712005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3772 Akim Demaille <akim@epita.fr>
3773
3774 Make sure -odir/foo.cc creates dir/location.hh etc.
3775 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3776 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3777 (spec_defines_file): Now const.
3778 (dir_prefix): New.
3779 (short_base_name): Remove.
3780 * src/files.c: Adjust.
3781 (dirname.h): Include.
3782 (base_name): Don't prototype it.
3783 (finput): Remove, duplicates gram_in.
3784 (full_base_name, short_base_name): Replace by...
3785 (all_but_ext, all_but_tab_ext): these.
3786 (compute_base_names): Rename as...
3787 (compute_file_name_parts): this.
3788 Update to compute the new variables, including dir_prefix.
3789 Adjust dependencies.
3790 * src/output.c (prepare): Output them.
3791 * src/reader.c: Adjust to use gram_in, not finput.
3792 * src/scan-skel.l (@dir_prefix@): New.
3793
ad6a9b97
JMG
37942005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3795
3796 * lib/subpipe.c: New function end_of_output_subpipe() added
3797 to allow support for non-posix systems. This is a no-op function
3798 for posix systems.
3799
3800 * lib/subpipe.h: New function end_of_output_subpipe() added
3801 to allow support for non-posix systems. This is a no-op function
3802 for posix systems.
3803
3804 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3805 handle the lack of pipe/fork functionality on non-posix systems.
3806
3807 * djgpp/Makefile.maint: DJGPP specific file.
3808
3809 * djgpp/README.in: DJGPP specific file.
3810
3811 * djgpp/config.bat: DJGPP specific configuration file.
3812
3813 * djgpp/config.sed: DJGPP specific configuration file.
3814
3815 * djgpp/config.site: DJGPP specific configuration file.
3816
3817 * djgpp/config_h.sed: DJGPP specific configuration file.
3818
3819 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3820
3821 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3822
fc695704
AD
38232005-10-02 Akim Demaille <akim@epita.fr>
3824
3825 * data/location.cc: New, extract from...
3826 * data/lalr1.cc: here.
3827 (location.hh): Include it after the user prologue, in case the
3828 filename type is defined by the user.
3829 Forward declation location and position before the pre-prologue.
3830 (yyresult_): Rename as...
3831 (yyresult): this, it's a local variable, not an attribute.
3832 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3833
38342005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
3835
3836 * examples/extexi: Restore the #line generation.
3837
fb9712a9
AD
38382005-09-30 Akim Demaille <akim@epita.fr>,
3839 Alexandre Duret-Lutz <adl@gnu.org>
3840
3841 Move the token type and YYSTYPE in the parser class.
3842 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3843 (parser::token): New, from the moved free definition of tokens.
3844 (parser::semantic_value): Now a full definition instead of an
3845 indirection to YYSTYPE.
3846 (b4_post_prologue): No longer included in the header file, but
3847 in the implementation file.
3848 * doc/bison.texi (C+ Language Interface): Update.
3849 * src/parse-gram.y: Support unary %define.
3850 * tests/actions.at: Define global_tokens_and_yystype for backward
3851 compatibility until we update the tests.
3852 * tests/calc.at: Idem.
3853 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3854 to simplify the code.
3855
55f0c7b1
PE
38562005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3857
3858 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3859 Ah, the good old days! Problem reported by Peter Klein.
3860 * bootstrap (gnulib_modules): Add strerror, strtoul.
3861 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3862 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3863
fb9712a9 38642005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
3865
3866 * data/c.m4 (b4_error_verbose_if): New.
3867 * data/lalr1.cc: Use it.
3868 (YYERROR_VERBOSE_IF): Remove.
3869 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3870 parser members, replaced by...
3871 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3872 local variables.
3873 (yysyntax_error_): Takes the state number as argument.
3874 (yyreduce_print_): Use the argument yyrule, not the former
3875 attribute yyn_.
3876
8a6f72f3
PE
38772005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3878
3879 * bootstrap (gnulib_modules): Add verify.
3880 * lib/.cvsignore: Add verify.h.
3881 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3882 * src/system.h (verify): Remove.
3883 Include verify.h instead.
3884 * src/tables.c (tables_generate): Use new API for 'verify'.
3885
0d50976f
PE
38862005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3887
ebc3737e
PE
3888 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3889 local variables whose names begin with 'yy'.
3890 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3891 Trivial changes from Joel E. Denny.
3892
0d50976f
PE
3893 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3894 it itself.
3895 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3896 don't use alloca any more.
3897
3898 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3899 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 3900 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
3901 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3902 to match yacc.c, to test more hosts.
3903
a05b79df
PE
39042005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3905
55289366
PE
3906 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3907 doesn't affect behavior.
3908 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3909 Solaris, AIX, MSC.
3910 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3911 This works a bit better with glibc, if user code has already included
3912 stdlib.h.
3913 * doc/bison.texinfo (Bison Parser): Document that users can't
3914 arbitrarily use malloc and free for other purposes. Document
3915 that <alloca.h> and <malloc.h> might be included.
3916 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3917 user must declare alloca.
3918
a05b79df
PE
3919 * HACKING (release): Forwarn the Translation Project about
3920 stable releses.
3921
3ab2ca22
AD
39222005-09-20 Akim Demaille <akim@epita.fr>
3923
3924 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3925
a9739e7c
PE
39262005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3927
a702593e
PE
3928 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3929 (YYSTACK_ALLOC_MAXIMUM): Use it.
3930 (yysyntax_error): New function.
3931 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3932 multiple syntax errors are reported, and alloca is being used.
3933 Instead, reallocate buffers twice as big each time, so that
3934 we waste at most half the allocated memory. Start with a small
3935 (128-byte) buffer that will suffice in most cases anyway.
3936 Use yysyntax_error to do most of the work.
3937
3938 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3939 yynerrs is the number of errors reported, not the number of
3940 errors encountered.
3941
a9739e7c
PE
3942 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3943 Mark it as expected to fail.
3944 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3945 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3946 Don't start user-code symbols with "yy", to avoid name space problems.
3947
f479c6c6
AD
39482005-09-19 Akim Demaille <akim@epita.fr>
3949
3950 Remove the traits, failed experiment.
3951 It never proved useful, and anyway because of the current
3952 definition, it was not possible to have several specialization of
3953 this traits, making it useless.
3954 * data/lalr1.cc (yy:traits): Remove.
3955 Inline its definitions in the parser class.
3956
e2586f82
AD
39572005-09-19 Akim Demaille <akim@epita.fr>
3958
3959 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3960 least Mac OSX with a /usr/local install of gettext.
3961
2e8cf949
AD
39622005-09-19 Akim Demaille <akim@epita.fr>
3963
3964 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3965 and yytoken for similarity with the other skeletons.
3966
c7fb0b90
AD
39672005-09-19 Akim Demaille <akim@epita.fr>
3968
4e26c69e 3969 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 3970
1bd0deda
PE
39712005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3972
3973 * NEWS: Version 2.1.
3974
3975 * NEWS: Remove notice of yytname change, since it was never in an
3976 official release.
3977 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3978 diagnostic.
3979 * src/output.c (prepare): Likewise.
3980 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3981 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3982 is not defined. This is an awful hack, but it's enough for now.
3983 All callers changed.
3984 * tests/glr-regression-at (make_value): Args are const pointers now,
3985 to avoid GCC warning.
3986 (Duplicated user destructor for lookahead): New test. Currently
3987 skipped. It fails on my host but I'm not sure it'll always fail.
3988
39892005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
3990
3991 * src/symtab.h (struct symbol): Declare the printer and destructor
3992 as const, to avoid accidental calls to free.
3993 (symbol_destructor_set, symbol_printer_set): Adjust.
3994 * src/symtab.c: Adjust.
3995
1bd0deda 39962005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
3997
3998 * data/c.m4 (b4_token_enums): New.
3999 (b4_token_defines): Rename as...
4000 (b4_token_enums_defines): this.
4001 (b4_token_defines): New, output only the #defines.
4002 * data/yacc.c, data/glr.c: Adjust.
4003 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
4004 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
4005 as default values.
4006
dbcdae2d
AD
40072005-09-16 Akim Demaille <akim@epita.fr>
4008
4009 * data/lalr1.cc (yylex_): Remove, inline its code.
4010 (yyreport_syntax_error_): Remove, replaced by...
4011 (yysyntax_error_): this which returns a string and leaves to the
4012 caller the call to the users' error function.
4013 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
4014 Move from members of the parser object...
4015 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
4016 to local variables of the parse function.
4017
70d8f291
AD
40182005-09-16 Akim Demaille <akim@epita.fr>
4019
4020 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
4021 since it's in Bison's name space.
4022
b47dbebe
PE
40232005-09-15 Paul Eggert <eggert@cs.ucla.edu>
4024
ae199bf1
PE
4025 * data/glr.c (yyresolveValue): Add default case to pacify
4026 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
4027
b47dbebe
PE
4028 * NEWS: Document when yyparse started to return 2.
4029 * doc/bison.texinfo (Parser Function): Document when yyparse
4030 returns 2.
4031
4032 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
4033 (b4_filename_type): Renamed back from b4_file_name_type. All uses
4034 changed.
4035 (class position): file_name -> filename (reverting). All uses changed.
4036
40372005-09-14 Paul Eggert <eggert@cs.ucla.edu>
4038
4039 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
4040 do anything if $@ exists. This reverts part of the 2005-07-07
4041 patch.
4042
00292f66
PE
40432005-09-11 Paul Eggert <eggert@cs.ucla.edu>
4044
4045 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
4046 contains obsolete information and isn't worth distributing as a
4047 separate file anyway.
4048 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
4049 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
4050 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
4051 (yyparse): Abort if user code uses longjmp to throw an unexpected
4052 value.
4053
a420f962
PE
40542005-09-09 Paul Eggert <eggert@cs.ucla.edu>
4055
00292f66
PE
4056 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
4057 Suggested by twlevo@xs4all.nl.
4058
127287e9
PE
4059 * data/glr.c (YYCHK1): Do not assume YYE is in range.
4060 This avoids a diagnostic from gcc -Wswitch-enum.
4061 Problem reported by twlevo@xs4all.nl.
4062
a420f962
PE
4063 * doc/bison.texinfo: Don't use "filename", as per GNU coding
4064 standards. Use "file name" or "file" or "name", depending on
4065 the context.
4066 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
4067 not to hack/foo.tab.c.
4068 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
4069 * data/glr.c: b4_filename -> b4_file_name.
4070 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
4071 All uses changed.
4072 (class position): filename -> file_name. All uses changed.
4073 * data/yacc.c: b4_filename -> b4_file_name.
4074 * lib/bitset.h: filename -> file_name in local vars.
4075 * lib/bitset_stats.c: Likewise.
4076 * src/files.c: Likewise.
4077 * src/scan-skel.l ("@output ".*\n): Likewise.
4078 * src/files.c (file_name_split): Renamed from filename_split.
4079 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
4080
40812005-09-08 Paul Eggert <eggert@cs.ucla.edu>
4082
4083 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
4084 to accommodate latest gnulib.
4085
4086 * tests/glr-regression.at (Duplicate representation of merged trees):
4087 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
4088
4089 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
4090 needed.
4091
42a6501d
PE
40922005-08-26 Paul Eggert <eggert@cs.ucla.edu>
4093
4094 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
4095 All uses changed. Invoke user destructor after an error during a
4096 split parse (trivial change from Joel E. Denny).
4097
4098 * tests/glr-regression.at
4099 (User destructor after an error during a split parse): New test case.
4100 Problem reported by Joel E. Denny in:
4101 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
4102
ef9a1faf
PE
41032005-08-25 Paul Eggert <eggert@cs.ucla.edu>
4104
5b4aaf78
PE
4105 * README-cvs: Give URLs for recommended tools.
4106 Mention Gzip version problem, and bootstrapping issues.
4107 Remove troubleshooting section, as it's somewhat obsolete.
4108
b5240ba5
PE
4109 * bootstrap (no_cache): New var, to accommodate different wget
4110 variants. Use it instead of '-C off'. Problem reported by
4111 twlevo@xs4all.nl.
4112
ef9a1faf
PE
4113 * data/glr.c (yydestroyStackItem): New function.
4114 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
4115 debugging information. Problem reported by Joel E. Denny.
4116
e6efa9da
AD
41172005-08-25 Akim Demaille <akim@epita.fr>
4118
4119 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
4120
adc90f13
PE
41212005-08-24 Paul Eggert <eggert@cs.ucla.edu>
4122
4123 * data/glr.c (yyrecoverSyntaxError, yyreturn):
4124 Don't invoke destructor on unresolved entries.
4125 * tests/glr-regression.at
4126 (User destructor for unresolved GLR semantic value): New test case.
4127 Problem reported by Joel E. Denny in:
4128 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
4129
f9315de5
PE
41302005-08-21 Paul Eggert <eggert@cs.ucla.edu>
4131
15d29c1f
PE
4132 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
4133 Add strnlen.c.
4134 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
4135 lib-prefix.m4, po.m4.
4136
dd5f2af2
PE
4137 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
4138 in yydestruct diagnostic, since it might not be an error.
4139 Problem reported by Joel Denny near end of
4140 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 4141 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
4142 * data/yacc.c (yyreturn): Likewise.
4143 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
4144
4145 * src/files.c: Remove obsolete FIXME comment.
4146
4147 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
4148 with the other templates, and to fix bogus run-on messages such
4149 as the one reported at the end of
4150 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
4151 All callers changed to avoid the newline.
4152 (yyprocessOneStack): Output two lines rather than one, to accommodate
4153 the above change. This changes the debug output format slightly.
4154
f9315de5
PE
4155 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
4156 reported by Joel E. Denny in
4157 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
4158 (trivial change).
4159 * tests/glr-regression.at (Duplicate representation of merged trees):
4160 New test, from Joel E. Denny in:
4161 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
4162 * THANKS: Add Joel E. Denny.
4163
4164 * configure.ac (AC_INIT): Bump to 2.0c.
4165
04098407
PE
41662005-07-24 Paul Eggert <eggert@cs.ucla.edu>
4167
4168 * NEWS: Version 2.0b.
4169
ca5d2013
PE
4170 * Makefile.am (SUBDIRS): Put examples before tests, so that
4171 "make check" doesn't finish with "All 1 tests passed".
4172
3d54b576
PE
4173 * tests/regression.at (Token definitions): Don't rely on
4174 AT_PARSER_CHECK for data that contains backslashes. It currently
4175 uses 'echo', and 'echo' isn't portable if its argument contains
4176 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
4177 that the byte '\0xff' is not printable in the C locale; it is,
4178 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
4179 not printable, so use '\0x81' to test.
4180
d53ae497
PE
4181 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
4182 version of GCC, since the macro is used with non-GCC compilers.
4183
fc01665e
PE
4184 Fix core dump reported by Pablo De Napoli in
4185 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
4186 * tests/regression.at (Invalid inputs with {}): New test.
4187 * src/parse-gram.y (token_name): Translate type before using
4188 it as an index.
4189
04098407
PE
4190 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
4191 the user's name space. All uses changed to __attribute__
4192 ((__unused__)).
4193 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
4194 Add __attribute__ ((__noreturn__)).
4195
4196 * etc/clcommit: Remove. We weren't using it, and it failed
4197 "make maintainer-distcheck".
4198 * Makefile.maint: Merge from coreutils.
4199 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
4200 (syntax-check-rules): Change list of rules as described below.
4201 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
4202 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
4203 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
4204 (sc_trailing_space): New rules.
4205 (sc_xalloc_h_in_src): Remove.
4206 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
4207 (sc_space_tab, sc_error_exit_success, sc_changelog):
4208 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
4209 (makefile-check, po-check, author_mark_check):
4210 (makefile_path_separator_check, copyright-check):
4211 Use grep -n, to make it easier to find violations.
4212 Use CVS_LIST and CVS_LIST_EXCEPT.
4213 (header_regexp, h_re): Remove.
4214 (dd_c): New macro.
4215 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
4216 (my-distcheck): Use more-modern GCC flags.
4217 (signatures, %.asc): Remove.
4218 (rel-files, announcement): Remove signatures.
4219 Restore old updating code, even though we don't use it, so
4220 that we're the same as coreutils.
4221 (alpha, beta, major): Depend on news-date-check.
4222 Make the upload commands.
4223
4224 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
4225 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
4226 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
4227 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
4228 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
4229 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
4230 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
4231 * tests/sets.at: Likewise.
4232
4233 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
4234 we comment out the Autoconf version number.
4235 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
4236 it's error-prone and "make maintainer-distcheck" rejects it.
4237
4238 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
4239 Indent calls to "error" to pacify "make maintainer-distcheck",
4240 when the calls are not intended to be translated.
4241 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
4242
4243 * src/Makefile.am (DEFS): Use +=, to pacify
4244 "make maintainer-distcheck".
4245 (bison_SOURCES): Add scan-skel.h.
4246 (sc_tight_scope): New rule, from coreutils.
4247
4248 * src/files.c (src_extension, header_extension):
4249 Now static, not extern.
4250 * src/getargs.c (short_options): Likewise.
4251 * src/muscle_tab.c (muscle_table): Likewise.
4252 * src/parse-gram.y (current_class, current_type, current_prec):
4253 Likewise.
4254 * src/reader.c (grammar_end, previous_rule_end): Likewise.
4255 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
4256 * src/main.c (main): Cast bindtextdomain and textdomain calls to
4257 void, to avoid warning when NLS is disabled.
4258 * src/output.c: Include scan-skel.h.
4259 (scan_skel): Remove decl, since scan-skel.h does this.
4260 (output_skeleton):
4261 Indent calls to "error" to pacify "make maintainer-distcheck".
4262 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
4263 * src/reader.h (gram_end, gram_lineno): New decls to pacify
4264 "make maintainer-distcheck".
4265 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
4266 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
4267 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
4268 (skel_lex_destroy, scan_skel): Move these decls to...
4269 * src/scan-skel.h: New file.
4270 * src/uniqstr.c (uniqstr_assert):
4271 Indent calls to "error" to pacify "make maintainer-distcheck".
4272
4273 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
4274 not @VAR@.
4275
4276 * tests/torture.at: Revamp to avoid misuse of atoi that
4277 "make maintainer-distcheck" complained about.
4278
4279 * examples/extexi (message): Don't print a message more than once,
4280 and omit line-number decoration that makes Emacs compile think
4281 that informative messages are worth worrying about.
4282
42832005-07-22 Paul Eggert <eggert@cs.ucla.edu>
4284
4285 * configure.ac: Update version number.
4286
4287 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
4288 accidentally.
4289 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
4290 autogenerated by the maintainer.
4291 * examples/calc++/.cvsignore: Add *.yy.
4292
4293 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
4294 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4295 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4296
4297 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
4298
4299 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
4300 from maintainer-distcheck about casting the argument of 'free'.
4301
4302 * NEWS: Mention recent yytname changes.
4303 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
4304
4305 * bootstrap: For translations that have not yet been upgraded to
4306 the new runtime-po domain, prime the pump by extracting the
4307 relevant strings from the obsolete translations. This code can be
4308 removed once the bison-runtime domain has been translated by each
4309 team.
4310
4311 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
4312 now that token names are already quoted.
4313
4314 Fix problem reported by Anthony Heading.
4315 * data/glr.c (YYTOKEN_TABLE): New macro.
4316 (yytname): Define if YYTOKEN_TABLE.
4317 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
4318 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
4319 (YYERROR_VERBOSE): Define the same way the other skeletons do.
4320 * src/output.c (prepare_symbols): Output token_table_flag.
4321
0ffda363
PE
43222005-07-21 Paul Eggert <eggert@cs.ucla.edu>
4323
4324 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
4325 again if the first call fails.
4326
4327 * data/glr.c (yytnamerr): New function.
4328 (yyreportSyntaxError): Use it to dequote most string literals.
4329 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
4330 with other skeletons. All uses changed.
4331 (yytnameerr_): New function.
4332 (yyreport_syntax_error): Use it to dequote most string literals.
4333 * data/yacc.c (yytnamerr): New function.
4334 (yyerrlab): Use it to decode most string literals.
4335 * doc/bison.texinfo (Decl Summary, Calling Convention):
4336 Clarify quoting convention of yytname.
4337 * src/output.c (prepare_symbols): Quote all names. This undoes
4338 the 2005-04-17 change, which is now accomplished (mostly) via
4339 changes in the parsers as described above.
4340 * tests/regression.at (Token definitions, Web2c Actions):
4341 Undo most 2005-04-17 change here, too.
4342
43432005-07-20 Paul Eggert <eggert@cs.ucla.edu>
4344
4345 Fix more problems reported by twlevo@xs4all.nl.
4346 * tests/cxx-type.at: Don't pipe output of ./types through sed to
4347 remove trailing spaces. This loses the exit status of ./types,
4348 and isn't needed since ./types shouldn't be emitting trailing
4349 spaces.
4350 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
4351 as the stack isn't valid in that case.
4352
4353 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4354 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4355 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4356 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
4357 is used.
4358 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
4359 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4360 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4361 Likewise.
4362
4363 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
4364 overly-picky compilers that reject 'char *foo = "bar";'.
4365
4366 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
4367 to FILE * parameter, not to stderr. This fixes a typo introduced
4368 in the 2005-07-12 change.
4369
4370 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
4371 warnings from GCC 4.
4372
4373 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
4374 (yyglrShiftDefer, yysplitStack):
4375 Remove unused parameters b4_pure_formals. All uses changed.
4376 (yyglrShift): Remove unused parameters b4_user_formals.
4377 All uses changed.
4378 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
4379
6100a9aa
PE
43802005-07-18 Paul Eggert <eggert@cs.ucla.edu>
4381
258b75ca
PE
4382 Destructor cleanups and regularization among the three skeletons.
4383 * NEWS: Document the behavior changes.
4384 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
4385 stack before failing, as the cleanup code will do it for us now.
4386 * data/lalr1.cc (yyerrlab): Likewise.
4387 * data/glr.c (yyparse): Pop everything off the stack before
4388 freeing it, so that destructors get called properly.
4389 * data/lalr1.cc (yyreturn): Likewise.
4390 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
4391 This is more consistent.
4392 * doc/bison.texinfo (Destructor Decl): Mention more reasons
4393 why destructors might be called. 1.875 -> 2.1.
4394 (Destructor Decl, Decl Summary, Table of Symbols):
4395 Some English-language cleanups for %destructor.
4396 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4397 Add output line for destructor of start symbol.
4398 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
4399 because of that same extra output line.
4400
1a059451
PE
4401 * NEWS: Document minor wording changes in diagnostics of
4402 Bison-generated parsers.
4403 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
4404 Remove unused formals. All uses changed.
4405 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
4406 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
4407 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
4408 Rename yyoverflowab to yyexhaustedlab.
4409 When memory exhaustion occurs during syntax-error reporting,
4410 report it separately rather than in a single diagnostic; this
4411 eases translation.
4412 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
4413 (Memory Exhausted): Renamed from Parser Stack Overflow.
4414 Revamp wording slightly to prefer "memory exhaustion".
4415 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
4416
97460c78
PE
4417 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
4418
30757c8c
PE
4419 Add i18n support to the GLR skeleton. Partially fix the C++
4420 skeleton; a C++ expert needs to finish this. Remove debugging
4421 msgids; there's little point to having them translated, since they
4422 can be understood only by someone who can read the
4423 (English-language) source code.
4424
4425 Generate runtime-po/bison-runtime.pot automatically, so that we
4426 don't have to worry about garbage getting in that file. We'll
4427 make sure after the next official release that old msgids don't
4428 get lost. See
4429 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
4430
4431 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
4432 Now auto-generated.
4433 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
4434 Fix typos in explanations of the runtime file.
4435 * bootstrap: Change gettext keyword from YYI18N to YY_.
4436 Use standard Makefile.in.in in runtime-po, since we'll arrange
4437 for backward-compatible bison-runtime.po files in a different way.
4438 * data/glr.c (YY_): New macro, from yacc.c.
4439 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
4440 Translate messages intended for users.
4441 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
4442 the wording in the other skeletons. We don't know that the memory
4443 is virtual.
4444 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
4445 Use same method that yacc.c uses.
4446 Don't translate debugging messages.
4447 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
4448 it doesn't work (yet), and requires C++ expertise to fix.
4449 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
4450 Move defn to a more logical place, to be consistent with other
4451 skeletons.
4452 Don't translate debugging messages.
4453 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
4454 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
4455 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
4456 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
4457
ac8c5689
PE
4458 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
4459 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
4460 void, not int.
4461 * tests/glr-regression.at (Badly Collapsed GLR States):
4462 Likewise.
4463 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4464 yylex should return 0 at EOF rather than aborting.
4465
6100a9aa
PE
4466 Improve tests for stack overflow in GLR parser.
4467 Problem reported by twlevo@xs4all.nl.
4468 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
4469 All uses removed.
4470 (yyStackOverflow): Just longjmp, but with value 2 so that caller
4471 can handle the problem.
4472 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
4473 (yyparse): New local variable yyresult to record the result.
4474 Use result of setjmp to set it, rather than storing itinto
4475 struct.
4476 (yyDone): Remove label.
4477 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
4478 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
4479 if YYABORT is used).
4480 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
4481 yyparse status; put status > 1 into diagnostic.
4482 Check that status==2 works.
4483 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
4484 Use exit status 3 for failure to open (which shouldn't happen).
4485
15f40952
PE
44862005-07-17 Paul Eggert <eggert@cs.ucla.edu>
4487
67fd79c4
PE
4488 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
4489 1 on syntax error; just let yyparse do its thing.
4490 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
4491 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
4492 (Exploding the Stack Size with Alloca):
4493 (Exploding the Stack Size with Malloc):
4494 Expect exit status 2, not 1, since the parser is supposed to blow
4495 its stack. Problem reported by twlevo@xs4all.nl.
4496
15f40952
PE
4497 * data/glr.c (yyparse): Don't assume that the initial calls
4498 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
4499 Print a stack-overflow message and fail instead.
4500 Initialize the line-number information before creating the stack,
4501 so that the stack-overflow message can report line zero safely.
4502
f32c66b5
PE
45032005-07-14 Paul Eggert <eggert@cs.ucla.edu>
4504
a22ff96f 4505 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
4506 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
4507 (yyuserMerge): Provide a default case if b4_mergers is empty.
4508 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
4509 * tests/glr-regression.at
4510 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 4511 Add casts to pacify C++ compilers.
1beb0b24
PE
4512 * tests/glr-regression.at (Improper merging of GLR delayed action
4513 sets): Declare yylex before using it.
f32c66b5 4514 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
4515 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
4516 test for valgrind; valgrind is independent of g++.
4517 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
4518 for compatibility with POSIX 1003.1-2001 (if running coreutils).
4519 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
4520 Use a destructor, so that we can expand the stack. Change
4521 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 4522
d741bd1b
PE
45232005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4524
4525 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
4526 a valgrind failure. Problem reported by twlevo@xs4all.nl.
4527
0410a6e0
PE
45282005-07-13 Paul Eggert <eggert@cs.ucla.edu>
4529
4530 * PACKAGING: New file, suggested by Bruno Haible and taken from
4531 similar wording in gettext's PACKAGING file.
4532 * NEWS: Mention PACKAGING.
4533 * Makefile.am (EXTRA_DIST): Add PACKAGING.
4534
f7ab6a50
PE
45352005-07-12 Paul Eggert <eggert@cs.ucla.edu>
4536
baf785db 4537 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
4538 * bootstrap: Get runtime translations into runtime-po.
4539 Create runtime-po files automatically, if possible.
4540 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
4541 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
4542 does not infringe on the user's name space.
4543 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
4544 * doc/bison.texinfo (Internationalization): Revamp the English
4545 and Texinfo syntax a bit, to try to make it clearer.
4546 (Bison Options, Option Cross Key): Mention --print-localedir.
4547 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
4548 YYENABLE_NLS. Quote a bit more.
4549 * runtime-po/.cvsignore: New file.
4550 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
4551 * runtime-po/Rules-quot: Remove; now created by bootstrap.
4552 * runtime-po/quot.sed: Likewise.
4553 * runtime-po/boldquot.sed: Likewise.
4554 * runtime-po/en@quot.header: Likewise.
4555 * runtime-po/en@boldquot.header: Likewise.
4556 * runtime-po/insert-header.sin: Likewise.
4557 * runtime-po/remove-potcdate.sin: Likewise.
4558 * runtime-po/Makevars: Likewise.
4559 * runtime-po/LINGUAS: Likewise.
4560 * runtime-po/de.po: Likewise; we will rely on the translation project
4561 to maintain this, so "bootstrap" should get it.
0410a6e0 4562 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
4563 its value.
4564 * src/main.c (main): Bind the bison-runtime domain, too.
4565
45662005-07-12 Bruno Haible <bruno@clisp.org>
4567
4568 * data/yacc.c: Include <libintl.h> when NLS is enabled.
4569 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
4570 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
4571 * runtime-po: New directory.
4572 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
4573 $(DOMAIN).pot-update rule, so that old messages are never dropped.
4574 * runtime-po/Rules-quot: New file, copied from po/.
4575 * runtime-po/quot.sed: Likewise.
4576 * runtime-po/boldquot.sed: Likewise.
4577 * runtime-po/en@quot.header: Likewise.
4578 * runtime-po/en@boldquot.header: Likewise.
4579 * runtime-po/insert-header.sin: Likewise.
4580 * runtime-po/remove-potcdate.sin: Likewise.
4581 * runtime-po/Makevars: New file.
4582 * runtime-po/POTFILES.in: New file.
4583 * runtime-po/LINGUAS: New file.
4584 * runtime-po/bison-runtime.pot: New file.
4585 * runtime-po/de.po: New file.
4586 * m4/bison.m4: New file.
4587 * Makefile.am (SUBDIRS): Add runtime-po.
4588 (aclocaldir, aclocal_DATA): New variables.
4589 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4590 Define aclocaldir.
4591 * src/getargs.c (usage): Document --print-localedir option.
4592 (PRINT_LOCALEDIR_OPTION): New enum item.
4593 (long_options): Add --print-localedir option.
4594 (getargs): Handle --print-localedir option.
4595 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4596 (Internationalization): New section.
4597
22dda0f0
AD
45982005-07-12 Akim Demaille <akim@epita.fr>
4599
4600 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4601 for consistency with the rest of the code.
4602 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4603 Add separators.
4604
82b248ad
AD
46052005-07-12 Akim Demaille <akim@epita.fr>
4606
4607 * src/parse-gram.y: Use %printer instead of YYPRINT.
4608
fa0e9314
AD
46092005-07-12 Akim Demaille <akim@epita.fr>
4610
867a3e00
AD
4611 * src/symtab.h, src/symtab.c (symbol_print): New.
4612 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4613 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4614
46152005-07-12 Akim Demaille <akim@epita.fr>
4616
4617 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
4618 b4_at_dollar and b4_dollar_dollar.
4619
e054b190
PE
46202005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4621
4622 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4623 and Pennello's paper.
4624
34160ec4
PE
46252005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4626
407d4a75
PE
4627 * data/yacc.c (yyparse): Undo previous patch. Instead,
4628 set yylsp[0] and yyvsp[0] only if the initial action
4629 sets yylloc and yylval, respectively.
4630
34160ec4
PE
4631 * data/yacc.c (yyparse): In the initial action, set
4632 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4633 This avoids the use of undefined variables if the initial
4634 action does not set yylloc and/or yylval.
4635
c3d5a4a7
PE
46362005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4637
b34d96c1
PE
4638 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4639 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4640 Remove from CVS. These files are automatically generated.
4641 * examples/extexi: Clarify that this file is now part of Bison,
4642 not GNU M4, and that it works with any POSIX-compatible Awk.
4643 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4644 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4645 so that we also get calc++-parser.yy. Geneate it.
4646 Use $(AWK), not gawk, since any conforming Awk will do.
4647 Put comment before action, since older 'make' can't handle comment
4648 in action.
4649 $(BUILT_SOURCES): List all built sources, not just some of them.
4650 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4651 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4652 $($(calc_sources_generated)): Remove unnecessary test for existence
4653 of target. (This had a shell syntax error anyway; a stray "x".)
4654 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4655 calc++-parser.yy.
4656 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4657
c3d5a4a7
PE
4658 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4659 implied by the other modules.
4660
828c373b
AD
46612005-07-06 Akim Demaille <akim@epita.fr>
4662
4663 Bind examples/calc++ to the package.
4664 * examples/calc++/Makefile: Remove, replaced by...
4665 * examples/calc++/Makefile.am: ... this new file.
4666 * examples/calc++/test: Remove input.
4667 * examples/calc++/compile: Remove.
4668 * examples/Makefile.am: New.
4669 * configure.ac, Makefile.am: Adjust.
4670 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4671
63cb01d6
PE
46722005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4673
fd2df2ed
PE
4674 * data/glr.c (yyFail): Drastically simplify; since the format argument
4675 never had any % directives, we can simply pass it to yyerror.
4676 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4677 be modified later, as that is the usual style in glr.c.
4678 Problems reported by Paul Hilfinger.
4679
63cb01d6
PE
4680 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4681 and size overflow errors.
4682 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4683 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4684 (YYSIZEMAX): New macro.
4685 (yystpcpy): New function, taken from yacc.c.
4686 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4687 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4688 so that we don't have to maintain their signatures.
4689 (yyFail): Check for buffer overflow, by using vsnprintf rather
4690 than vsprintf. Allocate a bigger buffer if possible.
4691 Report an error if buffer allocation fails.
4692 (yyStackOverflow): New function.
4693 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4694 the initialization was successful. It might fail if storage was
4695 exhausted.
4696 (yyexpandGLRStack): Add more checks for storage allocation failure.
4697 Use yyStackOverflow to report failures.
4698 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4699 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4700 Don't assume stack number fits in int.
4701 (yysplitStack): Check for storage allocation failure.
4702 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4703 can print diagnostics on storage allocation failure. All callers
4704 changed.
4705 (yyresolveValue): Use yybool for boolean.
4706 (yyreportSyntaxError): Check for size-calculation overflow.
4707 This code is taken from yacc.c.
4708 (yyparse): Check for storage allocation errors when allocating
4709 the initial stack.
4710
1c59e0a1
AD
47112005-07-05 Akim Demaille <akim@epita.fr>
4712
4713 Extract calc++ from the documentation.
4714 * doc/bison.texinfo (Calc++): Add the extraction marks.
4715 * examples/extexi: New, from the aborted GNU Programming 2E.
4716 Separate the different paragraph of a file with empty lines.
4717 * examples/Makefile: Use it to extract the whole calc++ example.
4718
8a0adb01
AD
47192005-06-24 Akim Demaille <akim@epita.fr>
4720
4721 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4722 class typedefs.
4723
12545799
AD
47242005-06-22 Akim Demaille <akim@epita.fr>
4725
4726 * doc/bison.texinfo (C++ Language Interface): First stab.
4727 (C++ Parsers): Remove.
4728
99be0235
AD
47292005-06-22 Akim Demaille <akim@epita.fr>
4730
4731 * data/lalr1.cc (yylex_): Honor %lex-param.
4732
0ffd4fd1
AD
47332005-06-22 Akim Demaille <akim@epita.fr>
4734
4735 Start a set of simple examples.
4736 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4737 * examples/calc++/calc++-driver.hh,
4738 * examples/calc++/calc++-parser.yy,
4739 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4740 * examples/calc++/compile, examples/calc++/test: New.
4741
0925ebb4
PE
47422005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4743
4744 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4745 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4746 which stems from the 2005-05-27 patch.
4747
43d3b664
PH
47482005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4749
4750 * data/glr.c: Modify treatment of unused parameters to permit use
4751 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4752
3062864d
PE
47532005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4754
4755 Fix infringement on user name space reported by Janos Zoltan Szabo.
4756 * data/yacc.c (yyparse): strlen -> yystrlen.
4757
989b5b8e
AD
47582005-05-30 Akim Demaille <akim@epita.fr>
4759
4760 * data/lalr1.cc (_): New.
4761 Translate the various messages.
4762
bedf57f5
PE
47632005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4764
4765 Fix infringement on user name space reported by Bruno Haible.
4766 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4767 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4768 the user's name space.
4769 (alloca): Include <stdlib.h> to get it, if it's not built in.
4770 (YYMALLOC, YYFREE): Define only if needed.
4771 (malloc, free): Declare, but only if needed, as this infringes on
4772 the user name space.
4773
4d1801f1
PE
47742005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4775
4776 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4777 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4778 with %d format.
4779 * lib/ebitset.c (min, max): Undef before defining.
4780 * lib/vbitset.c (min, max): Likewise.
4781 * lib/subpipe.c (create_subpipe): Save local variables in case
4782 vfork clobbers them.
4783
47842005-05-24 Bruno Haible <bruno@clisp.org>
4785
4786 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4787 error message syntax used by gcc-4.0.
4788
b94a9e1e
PE
47892005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4790
85ac3861
PE
4791 * README: Mention m4 1.4.3. Remove obsolete advice about
4792 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4793
b94a9e1e
PE
4794 * bootstrap: Remove workaround for problem I encountered with
4795 gettext 0.14.1; it seems to be fixed now.
4796
51c30d21
PE
47972005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4798
009ce67d
PE
4799 * NEWS: Version 2.0a.
4800
f2a97c62
PE
4801 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4802 the previous change.
4803
c8775f93
PE
4804 Various maintainer cleanups.
4805 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4806 conftest*, for benefit of CVS commands run at the same time as
4807 "configure". Add build-aux, since "bootstrap" now creates it and
4808 its subfiles.
4809 * Makefile.cfg (move_if_change): Remove.
4810 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4811 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4812 (po_repo, do-po-update, po-update, wget_files, get-targets):
4813 (config.guess-url_prefix, config.sub-url_prefix):
4814 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4815 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4816 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4817 Remove.
4818 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4819 this is now the recommended name.
4820 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4821 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4822 ylwrap. These files now go into build-aux.
4823 * config/move-if-change: Remove.
4824 * config/prev-version.txt: Bump from 1.75 to 2.0.
4825
3ea5f0ec
PE
4826 * bootstrap: Add stdio-safer, unistd-safer modules.
4827 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4828 we don't need it).
4829 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4830 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4831 * lib/subpipe.c: Include "unistd-safer.h".
4832 (create_subpipe): Make sure all the newly-created
4833 file descriptors are > 2, so that diagnostics don't
4834 get sent down them (which might cause Bison to hang, in theory).
4835 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4836 * src/files.c (xfopen): Use fopen_safer, not fopen.
4837
51c30d21
PE
4838 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4839 yesterday's yacc.c fix.
4840
cea1469d
PE
48412005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4842
3ea5f0ec
PE
4843 * data/glr.c, data/lalr1.cc: Update copyright date.
4844
cea1469d
PE
4845 Fix a destructor bug reported by Wolfgang Spraul in
4846 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4847 * data/yacc.c (yyabortlab): Don't call destructor, and
4848 don't set yychar to EMPTY.
4849 (yyoverflowlab): Don't call destructor.
4850 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4851 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4852 since we no longer output the message "discarding lookahead token
4853 end of input ()".
4854
5e6f62f2
PH
48552005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4856
4857 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4858 fix a small glitch in debugging output.
4859 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4860 after YY_SYMBOL_PRINT where needed.
4861
4862 (struct yyGLRState): Add some comments.
4863 (struct yySemanticOption): Add some comments.
4864 (union yyGLRStackItem): Add comment.
4865
4866 (yymergeOptionSets): Correct this to properly perform the union,
4867 avoiding infinite reported by Michael Rosien.
4868 Update comment.
4869
4870 * tests/glr-regression.at: Add test for GLR merging error reported
4871 by M. Rosien.
cea1469d 4872
0fb669f9
PE
48732005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4874
4875 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4876 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4877 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4878 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4879 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4880 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4881 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4882 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4883 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4884 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4885 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4886 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4887 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4888 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4889 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4890 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4891 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4892 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4893 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4894 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4895 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4896 src/output.h, src/parse-gram.c, src/parse-gram.h,
4897 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4898 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4899 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4900 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4901 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4902 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4903 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4904 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4905 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4906 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4907 tests/reduce.at, tests/regression.at, tests/sets.at,
4908 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4909 Update FSF postal mail address.
4910
51f4735e
PE
49112005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4912
4913 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4914 Problem reported by Ralf Menzel.
4915
80ce3401
PE
49162005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4917
4918 * tests/actions.at: Test that stack overflow invokes destructors.
4919 From Marcus Holland-Moritz.
4920 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4921 from here....
4922 (yyreturn): to here. That way, destructors are called properly
4923 even if the stack overflows, or the user calls YYACCEPT or
4924 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4925 (yyoverflowlab): Destroy the lookahead.
4926
49272005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4928
4929 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4930
72f000b0
PE
49312005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4932
4933 * NEWS: Bison-generated C parsers no longer quote literal strings
4934 associated with tokens.
4935 * src/output.c (prepare_symbols): Don't escape strings,
4936 since users don't want to see C escapes.
4937 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4938 in diagnostics.
c19683bb 4939 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
4940 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4941
1094323f
PE
49422005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4943
4944 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4945 the data size is known to be too small and we can't increase it.
4946 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4947
ca407bdf
PE
49482005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4949
4950 * src/parse-gram.y: Include quotearg.h.
4951 (string_as_id): Quote $1 before using it as a key, since the
4952 lexer no longer quotes it for us.
4953 (string_content): Don't strip quotes, since lexer no longer
4954 quotes it for us.
4955 * src/scan-gram.l: Include quotearg.h.
4956 ("\""): Omit quote.
4957 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4958 a key, since the rest of the lexer doesn't quote it.
4959 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4960 * tests/regression.at (Token definitions): Check for backslashes
4961 in token strings.
4962
4963 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4964 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4965 (yyparse): Revamp code to generate long syntax error message, to
4966 make it easier to translate, and to avoid problems with arithmetic
4967 overflow. Change "virtual memory" to "memory" in diagnostic, since
4968 we don't know whether the memory is virtual.
4969
1ce59070
PE
49702005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4971
4972 * NEWS: Bison-generated C parsers now use the _ macro to
4973 translate strings.
4974 * data/yacc.c (_) [!defined _]: New macro.
4975 All English strings wrapped inside this macro.
4976 * doc/bison.texinfo (Bison Parser): Document _.
4977 * po/POTFILES.in: Include src/parse-gram.c, since it now
4978 includes translateable strings that parse-gram.y doesn't.
4979
a749a695
PE
49802005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4981
4982 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4983 reverting the 2004-10-11 change to this function.
4984 (symbol_check_alias_consistency): Don't call symbol_type_set
4985 if the type name is already correct.
4986 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4987
8fb1053b
PE
49882005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4989
4990 * tests/regression.at (Token definitions): Don't use a token named
4991 c, as that generates a "#define c ..." that runs afoul of buggy
4992 stdlib.h that uses the identifier c as a member of struct
4993 drand48_data. Problem reported by Horst Wente.
4994
ff498c4a
PE
49952005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4996
4997 * bootstrap: Change translation URL from
4998 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4999 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
5000 redirection glitches. Problem reported by twlevo@xs4all.nl.
5001
65211d70
PE
50022005-03-20 Paul Eggert <eggert@cs.ucla.edu>
5003
5004 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
5005 after operands; POSIX says this isn't portable for the c99 command.
5006
9577fb1f
PE
50072005-03-18 Paul Eggert <eggert@cs.ucla.edu>
5008
5009 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
5010 immediately if a data overrun has occurred; this may help us track
5011 down what may be a spurious failure on MacOS.
5012
78b178f7
PE
50132005-03-17 Paul Eggert <eggert@cs.ucla.edu>
5014
a2599d0f
PE
5015 Respond to problems reported by twlevo@xs4all.nl.
5016
5017 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
5018
78b178f7
PE
5019 * src/vcg.h: Comment fix.
5020 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
5021 (G_CMAX): Change to -1 instead of INT_MAX.
5022
5023 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 5024
7296e729
PE
50252005-03-15 Paul Eggert <eggert@cs.ucla.edu>
5026
5027 * src/tables.c (state_number_to_vector_number): Put it inside an
5028 "#if 0", since it's not currently used. Problem reported by
5029 Roland McGrath.
5030
05ac60f3
PE
50312005-03-06 Paul Eggert <eggert@cs.ucla.edu>
5032
5033 * src/output.c (escaped_output): Renamed from
5034 escaped_file_name_output, since we now use it for symbol tags as
5035 well. All uses changed.
5036 (symbol_destructors_output, symbol_printers_output):
5037 Escape symbol tags too.
5038 Problem reported by Matyas Forstner in
5039 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
5040
5041 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
5042 not needed.
5043 * src/output.c (user_actions_output, token_definitions_output,
5044 symbol_destructors_output, symbol_printers_output): Likewise.
5045 * src/reader.c (prologue_augment): Likewise.
5046 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
5047
5048 * src/vcg.c (output_edge): Don't quote linestyle arg.
5049 Problem reported by twlevo@xs4all.nl.
5050
7eb453ac
PE
50512005-02-28 Paul Eggert <eggert@cs.ucla.edu>
5052
5053 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
5054 example, reported by Derek M Jones. Also, make the example even
5055 more outrageous, to better illustrate how bad the problem is.
5056
4c04c52a
PE
50572005-02-24 Paul Eggert <eggert@cs.ucla.edu>
5058
5059 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
5060 putsym. Typo reported by Sebastian Piping.
5061
a61e1620
PE
50622005-02-23 Paul Eggert <eggert@cs.ucla.edu>
5063
5064 * doc/bison.texinfo (Language and Grammar): some -> same
5065 (Epilogue): int he -> in the
5066 Typos reported by Sebastian Piping via Justin Pence.
5067
9ec93868
PE
50682005-02-07 Paul Eggert <eggert@cs.ucla.edu>
5069
5070 * tests/glr-regression.at (Improper handling of embedded actions
5071 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
5072 embedded actions and $-N in GLR parsers", work around an Autoconf bug
5073 with dollar signs in test names.
5074 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
5075 for a similar reason.
5076
73ce7e7e
PE
50772005-01-28 Paul Eggert <eggert@cs.ucla.edu>
5078
5079 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
5080 wants to redefine G_VIEW.
5081
2e72b98e
PE
50822005-01-27 Paul Eggert <eggert@cs.ucla.edu>
5083
5084 * src/vcg.c (get_view_str): Remove case for normal_view.
5085 Problem reported by twlevo@xs4all.nl.
5086
e0d634e5
PE
50872005-01-24 Paul Eggert <eggert@cs.ucla.edu>
5088
ccf830a4
PE
5089 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
5090 Problem reported by twlevo@xs4all.nl.
5091
e0d634e5
PE
5092 * doc/bison.texinfo: Change @dircategory from "GNU programming
5093 tools" to "Software development". Requested by Richard Stallman
5094 via Karl Berry.
5095
7bbc8cb0
PE
50962005-01-23 Paul Eggert <eggert@cs.ucla.edu>
5097
5098 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
5099 Problem reported by twlevo@xs4all.nl.
5100
08b770bc
PE
51012005-01-21 Paul Eggert <eggert@cs.ucla.edu>
5102
5103 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
5104 keyword; it's not needed with modern compilers, and it doesn't
5105 affect correctness with older compilers. Suggested by
5106 twlevo@xs4all.nl.
5107
95f22ad2
PE
51082005-01-17 Paul Eggert <eggert@cs.ucla.edu>
5109
5110 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
5111 gcc -Wswitch-default.
5112 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5113 * data/yacc.c (yyparse): Likewise.
5114
d229d15c
PE
51152005-01-12 Paul Eggert <eggert@cs.ucla.edu>
5116
5117 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
5118 already. Let config.h define any nonstandard values.
5119
ecadd90f
PE
51202005-01-10 Paul Eggert <eggert@cs.ucla.edu>
5121
5122 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
5123 for the benefit of slower hosts. Problem reported by
5124 Nelson H. F. Beebe.
5125
213744b5
PE
51262005-01-07 Paul Eggert <eggert@cs.ucla.edu>
5127
5128 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
5129 being defined and not used.
5130 * data/lalr1.cc (yyparse): Likewise.
5131 Use "if (false)" rather than "if (0)".
5132
249d3236
PE
51332005-01-05 Paul Eggert <eggert@cs.ucla.edu>
5134
5135 * TODO: Mention that we should allow NUL bytes in tokens.
5136
987cc1fb
PE
51372005-01-02 Paul Eggert <eggert@cs.ucla.edu>
5138
5139 * src/scan-skel.l (<<EOF>>): Don't close standard output.
5140 Problem reported by Hans Aberg.
5141
08fe02d9
PE
51422005-01-01 Paul Eggert <eggert@cs.ucla.edu>
5143
5144 * src/getargs.c (version): Happy new year; update overall
5145 program copyright date from 2004 to 2005.
5146
5147 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
5148 Problem reported by Hans Aberg.
5149 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
5150 (Output file names.): Add a test for the case when standard output
5151 is closed.
5152
010c0266
PE
51532004-12-26 Paul Eggert <eggert@cs.ucla.edu>
5154
5155 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
5156 to fix an oversight in the Bison 2.0 manual.
5157
da12206a
PE
51582004-12-25 Paul Eggert <eggert@cs.ucla.edu>
5159
5160 * NEWS: Version 2.0. Reformat the existing news items since
5161 1.875, so that related items are grouped together.
3a4734aa 5162 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
5163 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
5164
c935d934
PE
5165 * tests/torture.at (Exploding the Stack Size with Alloca): Set
5166 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
5167 otherwise, we're not testing alloca. Unfortunately there's no
5168 simple way to consult HAVE_ALLOCA here.
5169
da12206a
PE
5170 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
5171 for yymsg, too.
5172
5173 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
5174 hand. This avoids a warning about comparing int to size_t when
5175 GCC warnings are enabled.
5176
0a2c5137
PE
51772004-12-22 Paul Eggert <eggert@cs.ucla.edu>
5178
d7e14fc0
PE
5179 * NEWS: Bison-generated parsers no longer default to using the
5180 alloca function (when available) to extend the parser stack, due
5181 to widespread problems in unchecked stack-overflow detection.
5182 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
5183 responsibility to set it to a positive value. This lets the user
5184 specify a value that is not a preprocessor constant.
5185 * data/yacc.c (YYMAXDEPTH): Likewise.
5186 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
5187 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
5188 to be a compile-time constant. However, explain the constraints on it.
5189 Also, explain the constraints on YYINITDEPTH.
5190 (Table of Symbols): Explain that alloca is no longer the default.
5191 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
5192 to 1.
5193
0a2c5137
PE
5194 * doc/bison.texinfo (Location Default Action): Mention that n must
5195 be zero when k is zero. Suggested by Frank Heckenbach.
5196
e019c247
AD
51972004-12-22 Akim Demaille <akim@epita.fr>
5198
5199 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
5200 (parser::state_type, parser::semantic_type, parser::location_type):
5201 Private, not public.
5202 (parser::parse): Return ints, not bool.
5203 Returning a bool introduces a problem: 0 corresponds to false, and
5204 it seems weird to return false on success. Returning true changes
5205 the conventions for yyparse.
5206 Alternatively we could return void and send an exception.
5207 There is no clear consensus (yet?).
5208 (state_stack, semantic_stack, location_stack): Rename as...
5209 (state_stack_type, semantic_stack_type, location_stack_type): these.
5210 Private, not public.
5211 * tests/c++.at: New.
5212 * tests/testsuite.at, tests/Makefile.am: Adjust.
5213
72731bb7
AD
52142004-12-21 Akim Demaille <akim@epita.fr>
5215
5216 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
5217
9a0d8bec
AD
52182004-12-21 Akim Demaille <akim@epita.fr>
5219
5220 Don't impose std::string for filenames.
5221
5222 * data/lalr1.cc (b4_filename_type): New.
5223 (position::filename): Use it.
5224 (parser.hh): Move the inclusion of stack.hh and location.hh below
5225 the user code, so that needed headers for the filename type can be
5226 included first.
72731bb7
AD
5227 Forward declare them before the user code.
5228 * tests/Makefile.am (check-local, installcheck-local): Pass
5229 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 5230
99880de5
AD
52312004-12-20 Akim Demaille <akim@epita.fr>
5232
5233 Use more STL like names: my_class instead of MyClass.
5234
5235 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
5236 (SemanticStack, SemanticType, StateStack, StateType)
5237 (TokenNumberType, Stack, Slice, Traits, Parser::location)
5238 (Parser::value): Rename as...
5239 (location_stack, location_type, rhs_number_type, semantic_stack)
5240 (semantic_type, state_stack, state_type, token_number_type, stack)
5241 (slice, traits, parser::yylloc, parser::yylval): these.
5242
5243 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
5244
9bec482e
PE
52452004-12-19 Paul Eggert <eggert@cs.ucla.edu>
5246
5247 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
5248 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5249
f6fbd3da
PE
52502004-12-17 Paul Eggert <eggert@cs.ucla.edu>
5251
5252 Remove uses of 'short int' and 'unsigned short int'. This raises
5253 some arbitrary limits. It uses more memory but nowadays that's
5254 not much of an issue.
5255
5256 This change does not affect the generated parsers; that's a different
5257 task, as some users will want to conserve memory there.
5258
5259 Ideally we should use size_t to represent all object counts, and
5260 something like ptrdiff_t to represent signed differences of object
5261 counts; but that will require more code-cleanup than I have the
5262 time to do right now.
5263
5264 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
5265 Use size_t, not int or short int, to count objects.
5266 * src/closure.c (nritemset, closure): Likewise.
5267 * src/closure.h (nritemset, closure): Likewise.
5268 * src/nullable.c (nullable_compute): Likewise.
5269 * src/print.c (print_core): Likewise.
5270 * src/print_graph.c (print_core): Likewise.
5271 * src/state.c (state_compare, state_hash): Likewise.
5272 * src/state.h (struct state): Likewise.
5273 * src/tables.c (default_goto, goto_actions): Likewise.
5274
5275 * src/gram.h (rule_number, rule): Use int, not short int.
5276 * src/output.c (prepare_rules): Likewise.
5277 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
5278 errs, reductions): Likewise.
5279 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
5280 Likewise.
5281 * src/tables.c (vector_number, tally, action_number,
5282 ACTION_NUMBER_MINIMUM): Likewise.
5283 * src/output.c (muscle_insert_short_int_table): Remove.
5284
efeed023
AD
52852004-12-17 Akim Demaille <akim@epita.fr>
5286
5287 * data/lalr1.cc: Extensive Doxygenation.
5288 (error_): Rename as...
5289 (error): this, since it is visible to the user.
5290 Adjust callers.
5291 (Parser::message): Now an automatic variable from...
5292 (Parser::yyreport_syntax_error_): here.
5293 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
5294 Parser::error.
5295 * tests/input.at: Escape $.
5296
bc82c5a5
PE
52972004-12-16 Paul Eggert <eggert@cs.ucla.edu>
5298
5299 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
5300 Parenthesize rhs to avoid obscure problems with mistakes like
5301 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
5302 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
5303 b4_rhs_location): Likewise.
5304 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
5305 b4_rhs_location): Likewise.
5306
fd19f271
AD
53072004-12-16 Akim Demaille <akim@epita.fr>
5308
5309 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
5310 yacc.c: be sure to stay within yycheck_.
5311 * tests/actions.at: Re-enable C++ tests.
5312
10454ea4
AD
53132004-12-16 Akim Demaille <akim@epita.fr>
5314
5315 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
5316 real.
5317
c5b95ccf
AD
53182004-12-16 Akim Demaille <akim@epita.fr>
5319
5320 Use #define to handle the %name-prefix.
5321
5322 * data/glr.c, data/yacc.c: Comment changes.
5323 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
5324 so that one can refer to yylex in the parser file, and have it
5325 renamed, as is the case with other skeletons.
5326
617a8f12
AD
53272004-12-16 Akim Demaille <akim@epita.fr>
5328
5329 Move lalr1.cc internals into yy*.
5330
5331 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
5332 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
5333 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
5334 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
5335 (empty_, final_, terror_, errcode_, ntokens_)
5336 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
5337 (looka_, ilooka_, error_range_, nerrs_):
5338 Rename as...
5339 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
5340 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
5341 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
5342 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
5343 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
5344 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
5345 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
5346 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
5347 these.
5348
1e547e6e
PE
53492004-12-15 Paul Eggert <eggert@cs.ucla.edu>
5350
5351 Fix some problems reported by twlevo at xs4all.
5352 * src/symtab.c (symbol_new): Report an error if the input grammar
5353 contains too many symbols. This is better than calling abort() later.
5354 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
5355 (struct node, struct graph):
5356 Rename member expand to stretch. All uses changed.
5357 (struct graph): Remove member layoutalgorithm. All uses removed.
5358 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
5359 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
5360 All uses changed.
5361 (N_STRETCH): Rename from N_EXPAND. All uses changed.
5362
735d6bd4
AD
53632004-12-15 Akim Demaille <akim@epita.fr>
5364
5365 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
5366 Add more Doxygen comments.
5367 (symprint_, stack_print_, reduce_print_, destruct_, pop)
5368 (report_syntax_error_, translate_): Rename as...
5369 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
5370 (yypop_, yyreport_syntax_error_, yytranslate_): this.
5371
2e1f5829
AD
53722004-12-15 Akim Demaille <akim@epita.fr>
5373
5374 * data/lalr1.cc (lex_): Rename as...
5375 (yylex_): this.
5376 Move the trace here.
5377 Take the %name-prefix into account.
5378 Reported by Alexandre Duret-Lutz.
5379
a3cb6248
AD
53802004-12-15 Akim Demaille <akim@epita.fr>
5381
5382 Simplify the C++ parser constructor.
5383
5384 * data/lalr1.cc (debug_): Rename as...
5385 (yydebug_): so that the parser's internals are always in the yy*
5386 pseudo namespace.
5387 Adjust uses.
5388 (b4_parse_param_decl): Remove the leading comma as it is now only
5389 called as unique argument list.
5390 (Parser::Parser): Remove the constructor accepting a location and
5391 an initial debugging level.
5392 Remove from the other ctor the argument for the debugging level.
5393 (debug_level_type, debug_level, set_debug_level): New.
5394
5395 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
5396 constructor calls.
5397
07fed891
AD
53982004-12-15 Akim Demaille <akim@epita.fr>
5399
5400 Remove b4_root related material: failure experiment
a3cb6248 5401 (which goal was to allow to derive from a class).
07fed891
AD
5402
5403 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
5404 definitions and uses.
5405
e603eaa5
PE
54062004-12-14 Paul Eggert <eggert@cs.ucla.edu>
5407
5408 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
5409 not 2, since it's not portable to subtract 1 from the start of an
5410 array. The new item 0 is never set or used. All uses changed.
5411
5412 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
5413 the default definition of YYLLOC_DEFAULT. Problem reported
5414 by Frank Heckenbach.
5415
fafb007d
PE
54162004-12-12 Paul Eggert <eggert@cs.ucla.edu>
5417
5418 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
5419 the normal case and one for the error case. Just use the
5420 first one uniformly. Problem reported by Frank Heckenbach.
5421 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
5422 use exactly the same macro in both places.
5423 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
5424 so that the normal-case YYRHSLOC works for the error case too.
5425 All uses changed.
5426 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
5427 (YYLLOC_DEFAULT): Use the same macro as glr.c.
5428 * doc/bison.texinfo (Location Default Action): Don't claim that
5429 we have an array of locations. Use the same macro for both glr
5430 and lalr parsers. Mention YYRHSLOC. Mention what happens when
5431 the index is 0.
5432
48814dcd
PE
54332004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5434
a4e1a53b
PE
5435 * HACKING: Update email addresses to send announcements to.
5436
48814dcd
PE
5437 * configure.ac (AC_INIT): Bump version to 1.875f.
5438
337116ba
PE
54392004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5440
5441 * NEWS: Version 1.875e.
5442 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
5443
5444 * src/scan-skel.l: Include "complain.h", for "fatal".
5445
5446 * src/relation.h (relation_print, relation_digraph):
5447 Relation sizes are of type relation_node, not size_t (this is
5448 merely a doc fix, since the two types are equivalent).
5449 (relation_transpose): Relation sizes are of type relation_node,
5450 not int.
5451 * src/relation.c: Likewise.
5452 (top, infinity): Now of type relation_node, not int.
5453 (traverse, relation_transpose): Use relation_node, not int.
5454
5455 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
5456 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
5457 (yyparse): Remove unused local introduced in 2004-10-25 patch.
5458
5459 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 5460 specifying whether the test should be skipped. Use it tp
337116ba 5461 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 5462 fail on some hosts, and should be skipped.
337116ba 5463
da2a7671
PE
54642004-12-08 Paul Eggert <eggert@cs.ucla.edu>
5465
5466 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
5467 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
5468 unless otherwise specified below.
5469
5470 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
5471 to allocate kernel_base, kernel_items, kernel_size, since
5472 they needn't be initialized to 0.
5473 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
5474 * src/closure.c (new_closure): Likewise, for itemset.
5475 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
5476 * src/lalr.c (set_goto_map): Likewise, for temp_map.
5477 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
5478 (build_relations): Likewise for edge, states1, includes.
5479 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
5480 * src/reader.c (packgram): Likewise, for ritem, rules.
5481 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
5482 * src/relation.c (relation_digraph): Likewise for VERTICES.
5483 (relation_transpose): Likewise for new_R, end_R.
5484 * src/symtab.c (symbols_token_translations_init): Likewise for
5485 token_translations.
5486 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
5487 (token_actions): Likewise for yydefact, actrow, conflrow,
5488 conflict_list.
5489 (save_column): Likewise for froms[symno], tos[symno].
5490 (goto_actions): Likewise for state_count.
5491 (pack_table): Likewise for base, pos, check.
5492 (tables_generate): Likewise for width.
5493
5494 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
5495 for initial core. Just have a separate core, so we needn't worry
5496 about whether kernel_size and kernel_base are initialized.
5497
5498 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
5499 kernel_size, kernel_items): Remove unnecessary initialization.
5500 * src/conflicts.c (conflicts): Likewise.
5501 * src/derives.c (derives): Likewise.
5502 * src/muscle_tablc (muscle_insert): Likewise.
5503 * src/relation.c (relation_digraph): Likewise.
5504 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
5505 conflrow, conflict_table, conflict_list, table, check):
5506 Likewise.
5507
5508 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
5509 This is because all callers pass unsigned int.
5510 * src/closure.h (new_closure): Likewise.
5511
5512 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
5513 (build_relations): Initialize includes[i] in all cases.
5514 * src/reader.c (packgram): Always initialize rules[ruleno].prec
5515 and rules[ruleno].precsym. Initialize members in order.
5516 * src/relation.c (relation_transpose): Always initialize new_R[i]
5517 and end_R[i].
5518 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
5519
5520 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
5521 conflict_list[0] was always 0, but now it isn't initialized.
5522
5523 * src/table.c (table_grow): When conflict_table grew, the grown
5524 area wasn't cleared. Fix this.
5525
5526 * lib/.cvsignore: Add strdup.c, strdup.h.
5527 * m4/.cvsignore: Add strdup.m4.
5528
00baeeac
PE
55292004-12-07 Paul Eggert <eggert@cs.ucla.edu>
5530
5531 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
5532 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
5533 GOTO_NUMBER_MAXIMUM, since we occasionally compute
5534 ngotos + 1 without checking for overflow.
5535 (build_relations): Use END_NODE, not -1, to denote end of edges.
5536 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
5537 build_relations): Use goto_number, not int, for goto numbers.
5538 * src/tables.c (save_column, default_goto): Likewise.
5539
be3d9d42
AD
55402004-11-23 Akim Demaille <akim@epita.fr>
5541
5542 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
5543 of #defining from yystype.
5544 Don't typedef yystype, C++ does not need it.
5545 This lets it possible to forward declare it as union.
5546
78e526d5
PE
55472004-11-23 Paul Eggert <eggert@cs.ucla.edu>
5548
5549 * bootstrap (gnulib_modules): Add extensions.
5550 Problem reported by Jim Meyering.
5551
afbb696d
PE
55522004-11-22 Paul Eggert <eggert@cs.ucla.edu>
5553
5554 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
5555 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
5556 src/system.h, src/tables.c: XFREE -> free, to accommodate
5557 recent change to gnulib xalloc.h.
78e526d5 5558 Problem reported by Jim Meyering.
afbb696d 5559
c1f8f16a
AD
55602004-11-17 Akim Demaille <akim@epita.fr>
5561
5562 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
5563
db7e5eb5 55642004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
5565 Alexandre Duret-Lutz <adl@gnu.org>
5566
5567 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
5568 changes.
5569 (YYCDEBUG): Adjust.
5570 Use it instead of cdebug_.
5571 (Parser::debug_stream, Parser::set_debug_stream): New.
5572 (Parser::symprint_): Define cdebug_ for temporary backward
5573 compatibility.
5574 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
5575 debug_stream ().
5576
68e11668
AD
55772004-11-17 Akim Demaille <akim@epita.fr>
5578
5579 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
5580 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
5581 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
5582 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5583
97cbc73e
PE
55842004-10-27 Paul Eggert <eggert@cs.ucla.edu>
5585
5586 * data/glr.c (yyloc_default): Remove; not used.
5587 Problem reported by Frank Heckenbach.
5588
e342c3be
AD
55892004-10-25 Akim Demaille <akim@epita.fr>
5590
5591 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5592 Introduce another definition to address simple location arrays.
5593 (yyGLRStack): New member: yyerror_range.
5594 (yyrecoverSyntaxError, yyparse): Update it.
5595 (yyrecoverSyntaxError): Use it when shifting the error token to
5596 have an accurate range, equivalent to the one computed by both
5597 yacc.c and lalr1.cc.
5598 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5599 that column numbers start at column 0, as per GNU Coding
5600 Standards, the others tests, and the doc.
5601 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5602 Adjust to the above change (first column is 0).
5603 And adjust the location of the "<error>", now covering the whole
5604 line.
5605
93602feb 56062004-10-22 Akim Demaille <akim@epita.fr>
04098407 5607 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
5608
5609 Remove some arbitrary limits on goto numbers and relations.
5610 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5611 initial values, since they're never used.
5612 (set_goto_map): ngotos is now unsigned, so test for overflow
5613 by seeing whether it wraps around to zero.
5614 * src/lalr.h (goto_number): Now size_t, not short int.
5615 (GOTO_NUMBER_MAXIMUM): Remove.
5616 * src/relation.c (relation_print, traverse, relation_transpose):
5617 Check for END_NODE rather than looking at sign.
5618 * src/relation.h (END_NODE): New macro.
5619 (relation_node): Now size_t, not short int.
5620
dba08b04
PE
56212004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5622
5623 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5624 keyword, not an identifier. Problem reported by Baron Schwartz in
5625 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5626
df09ef2e
AD
56272004-10-11 Akim Demaille <akim@epita.fr>
5628
5629 * src/symtab.c (symbol_check_alias_consistency): Also check
5630 type names, destructors, and printers.
5631 Reported by Alexandre Duret-Lutz.
5632 Recode the handling of associativity and precedence in terms
5633 of symbol_precedence_set.
5634 Accept no redeclaration at all, not even equal to the previous
5635 value.
5636 (redeclaration): New.
5637 Use it to factor redeclaration complaints.
5638 (symbol_make_alias): Don't set the type of the alias, let
5639 symbol_check_alias_consistency do it as for other features.
5640 * src/symtab.h (symbol): Add new member prec_location, and
5641 type_location.
5642 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5643 * tests/input.at (Incompatible Aliases): New.
5644
146bc99d
PE
56452004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5646
5647 .cvsignore fixes to accommodate gnulib changes,
5648 and the practice of naming build directories "_build".
5649 * .cvsignore: Add "_*". Sort.
5650 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5651 * m4/.cvsignore: Add "*_gl.m4".
5652
e503aa60
AD
56532004-10-06 Akim Demaille <akim@epita.fr>
5654
5655 * src/parse-gram.y (add_param): Fix the truncation of trailing
5656 spaces.
5657
b4a20338
AD
56582004-10-05 Akim Demaille <akim@epita.fr>
5659
5660 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5661 whether the reducion was empty or not. This leaves room to
5662 improve the use of YYLLOC_DEFAULT in such a case.
5663 lalr1.cc is still experimental, so changing this is acceptable.
5664 And finally, there are probably not many users who changed the
5665 handling of locations in GLR, so changing is admissible too.
5666
5667 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5668 empty reduction, set @$ to an empty location ending the previously
5669 stacked symbol.
5670 Adjust uses to make sure the code is triggered on empty
5671 reductions.
5672 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5673 expected output: empty reductions have empty locations.
5674
f85a5e6f
AD
56752004-09-29 Akim Demaille <akim@epita.fr>
5676
5677 * data/lalr1.cc: Move towards a more standard C++ coding style
5678 for templates: Class < T > -> Class<T>.
5679
b203fc2c
AD
56802004-09-29 Akim Demaille <akim@epita.fr>
5681
5682 * data/lalr1.cc: Reinstall the former ctor, for sake of
5683 compatibility, but warn it will be removed.
5684 Move towards a more standard C++ coding style (i.e., type *var ->
5685 type* var).
5686
5b7e1e73
PE
56872004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5688
3fee967f
PE
5689 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5690 since it's less likely to work if NULs are involved in the future.
5b7e1e73 5691
0dcca5c2
AD
56922004-09-27 Akim Demaille <akim@epita.fr>
5693
5694 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5695
6dde1c82
AD
56962004-09-27 Akim Demaille <akim@epita.fr>
5697
5698 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 5699 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
5700 and argument names.
5701 (b4_cc_constructor_call): Likewise.
5702
b233d555
AD
57032004-09-24 Akim Demaille <akim@epita.fr>
5704
5705 * src/parse-gram.y (add_param): Strip the leading and trailing
5706 blanks from a formal argument declaration.
5707 (YY_LOCATION_PRINT): New.
5708
619404e3
AD
57092004-09-24 Akim Demaille <akim@epita.fr>
5710
5711 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5712 after the location.
5713
dd8d9022
AD
57142004-09-24 Akim Demaille <akim@epita.fr>
5715
5716 * doc/bison.texinfo (Table of Symbols): Sort.
5717
0092f063
AD
57182004-09-21 Akim Demaille <akim@epita.fr>
5719
5720 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5721 the useless parentheses.
5722 Suggested by Paul Eggert.
5723
451364ed
AD
57242004-09-20 Akim Demaille <akim@epita.fr>
5725
5726 Let the initial-action act on the look-ahead, and use it for the
5727 "initial push" (corresponding to an hypothetical beginning-of-file).
5728 And let lalr1.cc honor %initial-action.
5729
5730 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5731 example.
5732 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5733 (Parser::Parser): Remove the ctor that used to initialize it.
5734 (Parser::parse): Like in the other skeletons, issue the "starting
5735 parse" message before any action.
5736 Honor %initial-action.
5737 Initialize the stacks with the lookahead.
5738 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5739 look-ahead.
5740 Push them in the stacks.
5741 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5742
18d192f0
AD
57432004-09-20 Akim Demaille <akim@epita.fr>
5744
5745 * doc/bison.texinfo (Initial Action Decl): New.
5746
b8458aa5
AD
57472004-09-20 Akim Demaille <akim@epita.fr>
5748
5749 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5750 clearer criterion to define it.
5751 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5752 When reducing on an empty RHS, use the latest stacked location as
5753 location.
5754 yylloc is not always available.
5755 * data/glr.c: Likewise.
5756 Also, honor initial-actions.
5757
3fc16193
AD
57582004-09-20 Akim Demaille <akim@epita.fr>
5759
5760 * data/yacc.c (YY_LOCATION_PRINT): New.
5761 Define when we know YYLTYPE's structure, i.e., when the default
5762 YYLLOC_DEFAULT is used.
5763 * data/c.m4 (b4_yysymprint_generate): Use it.
5764 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5765 value of the result.
5766 (error_start_): Replace with...
5767 (error_range_): this location array.
5768 This allows to replace code relying on the implementation of
5769 locations by portable code.
5770 * data/yacc.c (yylerrsp): Replace with...
5771 (yyerror_range): this.
5772 Every time a token is popped, update yyerror_range[0], to have an
5773 accurate location for the error token.
5774 * data/glr.c (YY_LOCATION_PRINT): New.
5775 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5776 deference a pointer.
5777 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5778 report the location in %printers.
5779
5780 * src/scan-skel.l: Instead of abort, report error messages to ease
5781 understanding skeleton scanning failures.
5782
ecfe33e7
AD
57832004-09-16 Akim Demaille <akim@epita.fr>
5784
5785 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5786 (iterator, const_iterator): these, to be more in the C++ spirit.
5787 Also, return reverse iterators so that when displaying the stack
5788 we display its bottom first.
5789 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5790 from yacc.c.
5791 We should probably use vector here though.
5792
1576d44d
AD
57932004-09-16 Akim Demaille <akim@epita.fr>
5794
5795 Have more complete shift traces.
5796
5797 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5798 to report Shifts instead of ad hoc YYDPRINTF invocations,
5799 including for the error token.
5800 * data/lalr1.cc (symprint_): Output the location.
5801 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5802 output the location within the %printer.
5803 Activate GLR tests, at least to make sure they compile properly.
5804 They still don't pass though.
5805 * tests/calc.at: Adjust expect verbose output, since now "Entering
5806 state..." is on a different line than the "Shifting" message.
5807
9c66f418
AD
58082004-09-08 Akim Demaille <akim@epita.fr>
5809
5810 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5811 Bison directive from the Bison file to the invocation of this
5812 macro, so that these directives are passed to
5813 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5814 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5815 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5816 the extra Bison directives instead of the whole series.
5817 Change the grammar so that there are recoverable errors, and
5818 unrecoverable errors. Now we can have the parser give up before
5819 consuming the whole input. As a result we now can observe that
5820 the lookahead is freed when needed.
5821 Change the parser source to parse argv[1] instead of a hard coded
5822 string.
5823 Simplify yylex, and give a value and location to EOF.
5824 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5825 passed directives already coded in the file.
5826 Add some tests to check the location of "error".
5827 For some tests, the C++ parser is correct, and not yacc.c.
5828 For other tests, they provide different, but unsatisfying, values,
5829 so keep the C++ value so that at least one parser is "correct"
5830 according to the test suite.
5831 (Actions after errors): Remove, this is subsumed by the
5832 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5833
52d5733f
AD
58342004-09-06 Akim Demaille <akim@epita.fr>
5835
5836 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 5837 (Parser::pop): New.
52d5733f
AD
5838 Use it.
5839
a0e68930
AD
58402004-09-06 Akim Demaille <akim@epita.fr>
5841
5842 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5843 argument, an informative message.
5844 Call YY_SYMBOL_PRINT.
5845 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5846 * data/lalr1.cc (destruct_): Likewise.
5847 In addition, no longer depend on b4_yysymprint_generate and
5848 b4_yydestruct_generate to generate these functions, do it "by
5849 hand".
5850
e757bb10
AD
58512004-09-03 Akim Demaille <akim@epita.fr>
5852
5853 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5854 invoked, yydestruct the lookahead.
5855 * tests/calc.at (Calculator $1): Update the expected lengths of
5856 traces: there is an added line for the discarded lookahead.
5857 * doc/bison.texinfo (Destructor Decl): Some rewording.
5858 Define "discarded" symbols.
5859
0fe1f06d
AD
58602004-09-02 Akim Demaille <akim@epita.fr>
5861
5862 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5863
284acc8b
AD
58642004-09-02 Akim Demaille <akim@epita.fr>
5865
5866 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5867 (YYDSYMPRINTF): Rename as...
5868 (YY_SYMBOL_PRINT): this.
5869 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5870 two.
5871 Use it instead of direct symprint_ calls.
5872 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5873 one.
5874
a5eb1ed2
AD
58752004-09-02 Akim Demaille <akim@epita.fr>
5876
b7c72fe1
AD
5877 * data/lalr1.cc (b4_yysymprint_generate): New.
5878 (symprint_): New member function, defined when YYDEBUG.
5879 Use it consistently instead of token/nterm debugging output by
5880 hand.
a5eb1ed2
AD
5881 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5882 %printer calls to use cdebug_ when using lalr1.cc.
5883
417141dd
AD
58842004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5885
5886 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5887 with #ifdef YYDEBUG.
5888
2fa09258
AD
58892004-08-26 Akim Demaille <akim@epita.fr>
5890
5891 * doc/bison.texinfo (Implementing Loops): Rename as...
5892 (Implementing Gotos/Loops): this.
5893
9378b508
PE
58942004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5895
5896 Adjust to latest gnulib.
5897 * bootstrap (gnulib_modules): Add xalloc-die.
5898 Set LC_ALL=C so that file names sort consistently.
5899 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5900 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5901 uintmax_t.m4, ulonglong.m4.
5902 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5903 po.m4 since we are now using _gl.m4 instead.
5904
87a8ad5c
PE
59052004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5906
5907 * src/scan-action.l: Remove. Scanning of semantic actions is
5908 handled in scan-gram.l.
5909
dca81a78
PE
59102004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5911
5912 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5913
5914 * src/location.h (struct): The file member is a uniqstr.
5915 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5916
c9cbf7c5
PE
59172004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5918
5919 Fix bug with non-%union parsers that have printers or destructors,
5920 which led to a Bison core dump. Reported by Peter Fales in
5921 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 5922
c9cbf7c5
PE
5923 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5924 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5925 not to our own type.
5926 * src/output.c (symbol_destructors_output, symbol_printers_output):
5927 Don't assume %union.
5928 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5929 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5930 UNION-FLAG. All callers changed.
5931 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5932 Use type char, not unsigned int, when declaring an array of char;
5933 this lets us remove a cast.
5934 (Printers and Destructors): Add non-%union test cases.
5935
fa7e68c3
PE
59362004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5937
5938 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5939 GLR writeups. E.g., avoid frenchspacing and the future tense,
5940 change "lookahead" to "look-ahead", and change "wrt" to "with
5941 respect to".
2fa09258 5942
fa7e68c3
PE
59432004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5944
5945 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5946 New sections, split off from the GLR Parsers section. Put the new
5947 Simple GLR Parser near the start of the GLR section, for clarity.
5948 Rewrite connective text.
5949
99a9344e
PE
59502004-06-21 Frank Heckenbach <frank@g-n-u.de>
5951
5952 * doc/bison.texinfo (Simple GLR Parsers): New section.
5953
8dd162d3
PE
59542004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5955
5956 * NEWS, TODO, doc/bison.texinfo:
5957 Use "look-ahead" instead of "lookahead", to be consistent.
5958 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5959 while we're fixing "look-ahead".
5960 * src/conflicts.c (shift_set): Renamed from shiftset.
5961 (look_ahead_set): Renamed from lookaheadset.
5962 * src/print.c: Likewise.
5963 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5964 name for "lookahead".
5965 (report_types, usage): Likewise.
5966 * src/getargs.h (report_look_ahead_tokens): Renamed from
5967 report_lookaheads.
5968 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5969 compute_lookaheads.
5970 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5971 (look_ahead_tokens_print): Renamed from lookaheads_print.
5972 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5973 state_rule_lookaheads_print.
5974 * src/state.h: Likewise.
5975 (reductions.look_ahead_tokens): Renamed from lookaheads.
5976 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5977 AT_DATA_LOOKAHEADS_GRAMMAR.
5978
57a90331
PE
59792004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5980
5981 * README: Update location of patched M4 distribution.
5982
8ed3234a
PE
59832004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5984
5985 Don't assume the C++ compiler takes the same arguments as the C compiler
5986 (trivial change).
5987 * configure.ac (O0CXXFLAGS): New var.
5988 * tests/atlocal.in (CXXFLAGS): Use it.
5989
07971983
PE
59902004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5991
5992 Fix some "make check" problems with C++ reported by
5993 Albert Chin-A-Young for Tru64 C++ in this thread:
5994 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5995
5996 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5997 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5998 Output to a .cc file for C++, not to a .c file.
5999 * tests/calc.at (AT_CHECK_CALC): Likewise.
6000 * tests/regression.at (AT_CHECK_DANCER): Likewise.
6001 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
6002
29058652
PE
60032004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
6004
6005 * tests/calc.at, tests/actions.at: Workaround for SGI
6006 C++ compiler. (trivial change)
6007
62cb8a99
PE
60082004-05-27 Paul Eggert <eggert@cs.ucla.edu>
6009
fd418816
PE
6010 Spent a few hours checking out which prerequisite versions the
6011 current sources actually require. I went all the way back to
6012 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
6013 a seemingly endless set of combinations of versions more recent
6014 than that. The bottom line is that the current sources require
6015 fairly recent versions of the build tools, and it'll be some work
6016 to change this.
6017 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
6018 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
6019 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
6020 Add comments explaining why those particular versions are
6021 currently needed.
2fa09258 6022
62cb8a99
PE
6023 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
6024 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 6025 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
6026
6027 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
6028 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
6029
caa52c10
PE
60302004-05-26 Paul Eggert <eggert@cs.ucla.edu>
6031
6032 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
6033 0.11.5. Suggested by Bruno Haible.
6034 * bootstrap: Remove gettext version checking.
6035
6036 * doc/bison.texinfo (Decl Summary): Also mention that %union
6037 can depend on prerequisite types. Problem reported by Tim
6038 Van Holder.
6039
4bfd5e4e
PE
60402004-05-25 Paul Eggert <eggert@cs.ucla.edu>
6041
2cef3017
PE
6042 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
6043 * README-alpha: Don't tell people not to package this.
6044
b9c85d5c
PE
6045 * bootstrap: Don't assume $(...) works; use `...` instead.
6046 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
6047 gettext better.
6048
4bfd5e4e
PE
6049 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
6050 put into the -d output file, and mention what to do if YYSTYPE is
6051 defined as a macro.
6052
6a36ff94
PE
60532004-05-24 Paul Eggert <eggert@cs.ucla.edu>
6054
6712933e
PE
6055 Undo change made earlier today: it caused autopoint to not bring
6056 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
6057 autopoint's.
6058
6059 * bootstrap: Check that gettext version matches what's in
6060 configure.ac. Warn users to ignore robots.txt ERROR 404.
6061 * bootstrap: Undo today's earlier change (logged below).
6062 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 6063
6a36ff94
PE
6064 The gettext version checking is causing more trouble than it's
6065 curing; remove it. Problem reported by Paul Hilfinger.
6066
6067 * bootstrap: Issue a warning that one can expect a message
6068 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
6069 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
6070
209ea708
PE
60712004-05-23 Paul Eggert <eggert@cs.ucla.edu>
6072
6073 Ensure that the C++ compiler used for testing actually works on a
6074 simple test program; if not, skip the C++-related tests. Problem
6075 reported by Vin Shelton in:
161a71f3 6076 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
6077
6078 * m4/cxx.m4: New file.
6079 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
6080 * tests/atlocal.in (BISON_CXX_WORKS): Add.
6081 * tests/local.at (AT_COMPILE_CXX): Use it.
6082
41ca2549
PE
60832004-05-21 Paul Eggert <eggert@cs.ucla.edu>
6084
383e69dc
PE
6085 * data/glr.c (yylloc): Output this macro even if locations are not
6086 being generated, as the GLR parser needs it even in that case.
6087 Problem reported by Troy A. Johnson
6088 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
6089
41ca2549
PE
6090 * configure.ac (AC_INIT): Update to 1.875e.
6091
e476c87d
PE
60922004-05-21 Paul Eggert <eggert@cs.ucla.edu>
6093
6094 * NEWS: Version 1.875d.
6095 * configure.ac (AC_INIT): Likewise.
6096 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
6097
6098 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
6099 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
6100 lalr1.cc runs afoul of the first, and the last two are no longer
6101 supported by GCC 3.4.0.
6102 * README: Mention GNU m4 1.4 or later; mention m4 patches.
6103 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
6104
233a88ad
PE
61052004-05-06 Paul Eggert <eggert@cs.ucla.edu>
6106
6107 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
6108 unsigned int, for compatibility with latest gnulib hash module.
6109 * src/state.c (state_hash, state_hasher): Likewise.
6110 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
6111 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 6112
12ffdd28
PE
61132004-05-03 Paul Eggert <eggert@cs.ucla.edu>
6114
6115 * NEWS: Unescaped newlines are no longer allowed in char & strings.
6116
6117 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
6118 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
6119 character and string literals.
6120 (unexpected_end): New function.
6121 (unexpected_eof): Use it.
6122 (unexpected_newline): New function.
6123 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
6124 actions.
e476c87d 6125
12ffdd28
PE
6126 * NEWS: Document %expect-rr.
6127
6128 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
6129 Fix typo by replacing $1 with $option.
6130 Remove more 'intl'-related files.
9668e2be 6131 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
6132
6133 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
6134 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
6135 strtoul.c.
6136 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
6137 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
6138 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
6139 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
6140 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
6141 * src/.cvsignore: Add *.output.
6142
6143 * src/parse-gram.y: Put copyright notice inside %{ %} so it
6144 gets copied to the output file.
e476c87d 6145
1f65350a
PE
61462004-04-28 Paul Eggert <eggert@twinsun.com>
6147
6148 Get files from the gnulib and po repositories, instead of relying
6149 on them being in our CVS. Upgrade to latest versions of gnulib
6150 and Automake.
6151
6152 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
6153 * bootstrap: Bootstrap from gnulib and po repositories.
6154 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
6155 * README-cvs: Document these changes. Remove version numbers from
6156 mentions of build tools, since they change so often. Mention Flex.
6157
6158 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
6159 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
6160 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
6161 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 6162 does this for us.
12ffdd28
PE
6163 (AC_ISC_POSIX): Remove; we no longer support this
6164 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
6165 (AC_HEADER_STDC): Remove: we now assume C89 or better.
6166 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
6167 Do not check for C89 headers, except for locale.h which is used
6168 by the Yacc library and must port to K&R hosts.
6169 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
6170 Do not check for C89 functions, except for setlocale which is
6171 used by the Yacc library.
6172 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
6173 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
6174 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
6175 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
6176 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
6177 AM_GNU_GETTEXT): Remove; now done by:
6178 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
6179 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
6180 for us.
6181
6182 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
6183 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
6184 Define to empty, as gnulib.mk will do the rest for us.
6185 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
6186 for us.
6187 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
6188 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
6189
6190 * src/files.c: Include gnulib's xstrndup.h.
6191
6192 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
6193 (REALLOC): Use xnrealloc, for likewise.
6194 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
6195 (strnlen, memrchr): Remove decls; functions no longer used.
6196 Include <stpcpy.h>.
6197
6198 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
6199 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6200 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
6201 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
6202 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
6203 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
6204 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
6205 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
6206 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
6207 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
6208 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
6209 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6210 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
6211 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
6212 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
6213 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
6214 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
6215 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
6216 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
6217 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
6218 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
6219 Remove, as these files are now generated automatically
6220 by bootstrap or automake.
6221
6222 * po/ChangeLog: Remove: all but one entry was a duplicate
6223 of this file, and I moved that 2000-11-02 entry here.
6224
6225 * config/.cvsignore: Add Makefile, depcomp, install-sh.
6226 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
6227 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
6228 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
6229 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
6230 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
6231 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
6232 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
6233 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
6234 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
6235 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
6236 xstrndup.h.
6237 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
6238 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
6239 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
6240 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
6241 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
6242 * src/.cvsignore: Remove *_.c.
6243
6244
6245 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
6246 support it. (The latest stable gzip doesn't.)
6247
62482004-04-27 Paul Eggert <eggert@twinsun.com>
6249
6250 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
6251 case, as stos_ is now used by destructors due to the 2004-02-09
6252 change.
6253
6254 Remove more K&R C support.
6255 * lib/libiberty.y (PARAMS): Remove. All uses removed.
6256 * lib/subpipe.c (errno): Remove decl.
6257 Include <stdlib.h> unconditionally.
6258 (EXIT_FAILURE): Remove macro.
6259 * src/complain.c (vfprintf, strerror): Remove.
6260 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
6261 unconditionally.
6262 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
6263 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
6264 (strchr, strspn, memchr): Remove decls.
6265 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
6266 unconditionally. Do not declare perror.
6267 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
6268 unconditionally.
6269
6270 * src/complain.c (_): Remove useless defn, as system.h defines this.
6271
6272 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
6273 with latest obstack.h.
6274 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
6275 to procedure types, as obstack.h now does that for us.
6276 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
6277
6278 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
6279 so that this include file can stand alone.
6280 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
6281 does this now. Include subpipe.h first after config.h, to
6282 test whether it can stand alone.
6283
6284 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
6285 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
6286 unused declaration.
6287
6288 * tests/synclines.at (%union synch line): Put a dummy member in
6289 the union, because empty unions aren't allowed in C. Caught
6290 by GCC 3.4.0.
6291
4f16766c
PE
62922004-04-13 Jim Meyering <jim@meyering.net>
6293
6294 * src/conflicts.c (conflicts_print): Correct format string typo:
6295 use `%%' to produce literal `%'. (trivial change)
6296
779e7ceb
PE
62972004-03-30 Paul Eggert <eggert@twinsun.com>
6298
6299 * src/getargs.c (version): Update copyright year to 2004.
6300
6301 * data/c.m4 (b4_int_type): Use 'short int' rather than
6302 'short', and similarly for 'long', 'unsigned', etc.
6303 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
6304 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
6305 yy_yypstack, yydumpstack): Likewise.
6306 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
6307 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
6308 Likewise.
6309 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
6310 yy_stack_print, yyparse): Likewise.
6311 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
6312 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
6313 * lib/bitset.c (bitset_print): Likewise.
6314 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
6315 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6316 * lib/bitsetv.c (bitsetv_dump): Likewise.
6317 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
6318 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
6319 Likewise.
6320 * src/LR0.c (allocate_itemsets): Likewise.
6321 * src/gram.h (rule_number, rule): Likewise.
6322 * src/lalr.h (goto_number): Likewise.
6323 * src/nullable.c (nullable_compute): Likewise.
6324 * src/output.c (prepare_rules): Likewise.
6325 * src/relation.c (relation_print, relation_digraph): Likewise.
6326 * src/relation.h (relation_node): Likewise.
6327 * src/state.h (state_number, transitions, errs, reductions,
6328 struct state): Likewise.
6329 * src/symtab.h (symbol_number, struct symbol): Likewise.
6330 * src/tables.c (vector_number, tally, action_number,
6331 default_goto, goto_actions): Likewise.
6332 * tests/existing.at (GNU Cim Grammar): Likewise.
6333 * tests/regression.at (Web2c Actions): Likewise.
6334
6335 * src/output.c (muscle_insert_short_int_table): Renamed from
6336 muscle_insert_short_table. All uses changed.
6337
d6328241
PH
63382004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6339
6340 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
6341 (declaration): Replace expected_conflicts with expected_sr_conflicts.
6342 Add %expect-rr rule.
4f16766c 6343
d6328241
PH
6344 * src/scan-gram.l: Recognize %expect-rr.
6345
4f16766c 6346 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 6347 expected_conflicts.
4f16766c 6348 (expected_rr_conflicts): Declare.
d6328241
PH
6349
6350 * src/conflicts.c (expected_sr_conflicts): Rename from
6351 expected_conflicts.
6352 (expected_rr_conflicts): Define.
6353 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
6354 for GLR parsers.
6355 Use expected_sr_conflicts in place of expected_conflicts.
6356 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 6357
d6328241 6358 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 6359
1452af69
PE
63602004-03-08 Paul Eggert <eggert@gnu.org>
6361
6362 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 6363 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
6364
6365 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
6366 in lalr1.cc.
6367 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
6368 * src/scan-gram.l (scan_integer): New function.
6369 ({int}): Use it.
6370 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
6371 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
6372 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
6373 Say "long int", not "long", for uniformity with GNU style.
6374
006d217d
PE
63752004-02-25 Paul Eggert <eggert@twinsun.com>
6376
6377 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
6378 compilers. This fixes a problem with Intel's C++ compiler being
6379 chatty, reported by Guido Trentalancia in
161a71f3 6380 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 6381
c2729758
ADL
63822004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
6383
6384 Support %destructor and merge error locations in lalr1.cc.
6385
6386 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
6387 (Parser::stos_): Define unconditionally.
6388 (Parser::destruct_): New method. Generate its body with
6389 b4_yydestruct_generate.
6390 (Parser::error_start_): New attribute.
6391 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
6392 token which are discarded.
6393 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
6394 error_start_ when erroneous token are discarded.
6395 (Parser::parse) <yyerrlab1>: Compute the location of the error
6396 token so that it covers all the discarded tokens.
6397 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
6398 it can be called with `%skeleton "lalr1.cc"', and do that.
6399
dd0e0635
PE
64002004-02-02 Paul Eggert <eggert@twinsun.com>
6401
6402 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
6403 $(top_srcdir)/lib and ../lib. This fixes a bug reported
6404 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
6405 There's no need to mention top_builddir since Automake does that
6406 for us.
6407 (INCLUDES): Remove, as Automake says it's obsolescent.
6408 Contents migrated into AM_CPPFLAGS as described above.
6409 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
6410
64112004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6412
6413 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
6414 (yyreportSyntaxError): Handle case where lookahead token is
6415 YYEMPTY.
6416
be16239b
PH
64172004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6418
6419 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
6420 resulting parsers are compilable with C++.
6421
5fa90832
PE
64222003-12-23 Paul Eggert <eggert@twinsun.com>
6423
6424 * config/depcomp, config/install-sh: Sync with Automake 1.8.
6425 * src/output.c (output_skeleton): Rename local var.
6426 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
6427 Bison tokens, as this runs afoul of the 2003-10-07 change that
6428 disallowed NUL bytes in character constants or string literals.
6429
6430 * tests/local.at: Require Autoconf 2.59's Autotest.
6431 * tests/testsuite.at: Don't include local.at, since we now assume
6432 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
6433 including it.
6434 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
6435 multiple inclusion warnings.
dd0e0635 6436
b165c324
AD
64372003-12-02 Akim Demaille <akim@epita.fr>
6438
6439 * doc/bison.texinfo (How Can I Reset the Parser): More about start
6440 conditions.
6441 From Bruno Haible.
6442
26e06a21
ADL
64432003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
6444
6445 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
6446
92ac3705
PE
64472003-10-07 Paul Eggert <eggert@twinsun.com>
6448
6a5ecb38
PE
6449 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
6450 if testsuite doesn't exist.
6451
92ac3705
PE
6452 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
6453 literals, unfortunately.
6454 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
6455 Complain about NUL bytes in character constants or string literals.
6456
91d2c560
PE
64572003-10-05 Paul Eggert <eggert@twinsun.com>
6458
6459 * NEWS: Don't document %no-default-prec, as it's still
6460 too experimental.
6461 * doc/bison.texinfo: Document %no-default-prec only if
6462 the defaultprec flag is set. Normally it's not.
6463
0cc3da3a
PE
64642003-10-04 Paul Eggert <eggert@twinsun.com>
6465
6466 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
6467 non-modifiable lvalue, instead of a modifiable one.
6468 * doc/bison.texinfo (Actions): Document that $$ can
6469 be assigned to. Do not claim that $$ and $N are
6470 array element references: user code should not rely on this.
6471
22fccf95
PE
64722003-10-01 Paul Eggert <eggert@twinsun.com>
6473
6474 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
6475 (grammar_declaration): Use it.
6476 * src/scan-gram.l: New token %no-default-prec.
6477 * tests/conflicts.at: Revamp tests to use %no-default-prec.
6478 * NEWS, doc/bison.texinfo: Document the above.
6479
fc8f2965
AD
64802003-10-01 Akim Demaille <akim@epita.fr>
6481
6482 VCG no longer supports long_straight_phase.
6483
6484 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
6485 * src/print_graph.c (print_graph): Adjust.
6486
39a06c25
PE
64872003-09-30 Frank Heckenbach <frank@g-n-u.de>
6488 and Paul Eggert <eggert@twinsun.com>
6489
6490 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
6491 Table of Symbols): Document %default-prec.
6492 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
6493 (grammar_declaration): Set default_prec on %default-prec.
6494 * src/scan-gram.l (%default-prec): New token.
6495 * src/reader.h (default_prec): New flag.
6496 * src/reader.c: Likewise.
6497 (packgram): Handle it.
6498 * tests/conflicts.at (%default-prec without %prec,
6499 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 6500
39a06c25
PE
65012003-09-30 Paul Eggert <eggert@twinsun.com>
6502
6503 * tests/testsuite.at: Include local.at, not input.at, fixing
6504 a typo in the 2003-08-25 patch.
6505
62b6aef9
AD
65062003-08-27 Akim Demaille <akim@epita.fr>
6507
6508 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
6509 GCC warnings.
6510
89e1cc61
AD
65112003-08-26 Akim Demaille <akim@epita.fr>
6512
6513 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
6514 "<\#" to avoid magic from Gnus when posting parts of this script.
6515
a08460b0
AD
65162003-08-26 Akim Demaille <akim@epita.fr>
6517
6518 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
6519 (Parser::parse): here.
6520 Adjust: nerrs and errstatus is now replaced by...
6521 (Parser::nerrs_, Parser::errstatus_): New.
6522
603f1cfd
AD
65232003-08-25 Akim Demaille <akim@epita.fr>
6524
6525 * config/announce-gen, Makefile.cfg: New.
6526 * Makefile.am: Adjust.
6527 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
6528 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
6529
cd3684cf
AD
65302003-08-25 Akim Demaille <akim@epita.fr>
6531
6532 When reducing initial empty rules, Bison parser read an initial
6533 location that is not defined. This results in garbage, and that
6534 affects Bison's own parser. Therefore we need (i) to extend Bison
6535 to support a means to initialize this location, and (ii) to use
6536 this CVS Bison to fix CVS Bison's parser.
6537
6538 * src/reader.h, reader.c (epilogue_augment): Remove, replace
6539 with...
6540 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
6541 * src/parse-gram.y: Adjust.
6542 (%initial-action): New.
6543 (%error-verbose): Since we require CVS Bison, there is no reason
6544 not to use it.
6545 * src/scan-gram.l: Adjust.
6546 * src/Makefile.am (YACC): New, to make sure we use our own parser.
6547 * data/yacc.c (yyparse): Use b4_initial_action.
6548
4e03e201
AD
65492003-08-25 Akim Demaille <akim@epita.fr>
6550
6551 * doc/bison.texinfo: Don't promote stdout for error messages.
6552
8c182d05
AD
65532003-08-25 Akim Demaille <akim@epita.fr>
6554
6555 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
6556 From Alexandre Duret-Lutz.
6557
6a60c4cf
PE
65582003-08-25 Akim Demaille <akim@epita.fr>
6559
6560 Version 1.875c.
6561
25f66e1a
AD
65622003-08-25 Akim Demaille <akim@epita.fr>
6563
6564 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
6565 Use them.
6566
5348bfbe
AD
65672003-08-25 Akim Demaille <akim@epita.fr>
6568
6569 * data/lalr1.cc (Parser::reduce_print_): New.
6570 Use it.
6571
47301314
AD
65722003-08-25 Akim Demaille <akim@epita.fr>
6573
6574 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
6575 error recovery loops. This patch is based on
161a71f3 6576 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
6577 Also, augment the similarity between lalr1.cc and yacc.c.
6578 Note: the locations of error recovery rules are not correct yet.
6579
6580 * data/lalr1.cc: Comment changes to augment the similarity between
6581 lalr1.cc and yacc.c.
6582 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
6583 (yyerrlab1): Remove, but where it used to be (now the bottom part of
6584 yyerrlab), when hitting EOF, pop the whole stack here instead of
6585 merely falling thru the default error handling mechanism.
6586 (yyerrorlab): New label, with the old contents of YYERROR,
6587 plus the following change: pop the stack of rhs corresponding
6588 to the production that invoked YYERROR. That is how Yacc
6589 behaves (required by POSIX).
6590 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6591 fail.
6592
1f7a61ff
AD
65932003-08-25 Akim Demaille <akim@epita.fr>
6594
6595 Tune local.at so that people can "autom4te -l autotest calc.at -o
6596 calc" for instance, to extract a sub test suite.
6597
6598 * tests/testsuite.at: Move the initialization, Autotest version
6599 requirement, and AT_TESTED invocation into...
6600 * tests/local.at: here.
6601 * tests/testsuite.at: Include it for compatibility with Autoconf
6602 2.57.
6603 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6604 be ignore.
6605
327b5b56
PE
66062003-08-04 Paul Eggert <eggert@twinsun.com>
6607
6608 Rework code slightly to avoid gcc -Wtraditional warnings.
6609 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6610 The returned value is now stored in *YY0. All callers changed.
6611 * src/output.c (merge_output): Adjust to the above change.
6612
0051e3ed
PE
66132003-07-26 Paul Eggert <eggert@twinsun.com>
6614
6615 * data/glr.c (YYASSERT): New macro.
6616 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6617 yyresolveStates, yyprocessOneStack):
6618 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6619 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 6620
137437c6
PE
66212003-07-25 Paul Eggert <eggert@twinsun.com>
6622
5b620e06
PE
6623 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6624 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 6625 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
6626 by Frank Heckenbach, though I have omitted the structure-initialization
6627 part of his glr-knr.diff patch since I recall that the Portable
6628 C Compiler didn't require that change.
6629
137437c6
PE
6630 Let the user specify how to allocate and free memory.
6631 Derived from a suggestion by Frank Heckenbach in
161a71f3 6632 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
6633 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6634 All uses of free, malloc, realloc changed to use these macros,
6635 and unnecessary casts removed.
6636 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6637
ddb85ca5
PE
66382003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6639
6640 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6641 use s.empty() rather than s == "" to test for empty string; see
161a71f3 6642 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
6643 (trivial change)
6644
39910e09
AD
66452003-06-25 Akim Demaille <akim@epita.fr>
6646
6647 * config/depcomp, config/install-sh: Update from masters.
6648
0ae99356
PE
66492003-06-20 Paul Eggert <eggert@twinsun.com>
6650
6651 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6652 and return properly parenthesized result.
6653 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6654 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6655 Remove unnecessary parentheses from uses.
6656 * doc/bison.texinfo (Location Default Action): Describe the
6657 conventions for parentheses.
6658
cd05d13c
PE
66592003-06-19 Paul Eggert <eggert@twinsun.com>
6660
81fd08ca
PE
6661 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6662 yyreportTree): Do not assume that size_t is the same width as int,
6663 when printing sizes. Print sizes using an unsigned format.
6664 Problem reported by Frank Heckenbach in
161a71f3 6665 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 6666
cd05d13c
PE
6667 Port to Forte Developer 7 C compiler.
6668 * data/glr.c (struct YYLTYPE): If locations are not being used,
6669 declare a single dummy member, as empty structs do not conform
6670 to the C standard.
6671 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6672 the Forte Developer 7 C compiler complains that end-of-loop
6673 code is not reached.
6674
4dcf140b
PE
66752003-06-17 Paul Eggert <eggert@twinsun.com>
6676
6677 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6678 avoid warnings from picky compilers about redefinition of PARAMS.
6679
8dd76bee
PE
66802003-06-17 Paul Eggert <eggert@twinsun.com>
6681
6682 Version 1.875b.
6683
6684 * NEWS: Document 1.875b.
6685
6686 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6687 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6688 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6689 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6690 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6691 per recent gettext manual's suggestion.
6692 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6693 Use prototypes, not old-style definitions.
6694 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6695 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6696 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6697 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6698 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6699 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6700 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6701 vbitset_or_and_cmp, vbitset_copy): Likewise.
6702
6703 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6704 Do not include <stdlib.h>.
6705 (PARAMS): Define unconditionally for C89.
6706 (ATTRIBUTE_NORETURN): Remove.
6707 (ATTRIBUTE_UNUSED): Define unconditionally.
6708
6709 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 6710 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
6711 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6712 * lib/vbitset.c, lib/vbitset.h: New files.
6713 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6714 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6715 from libbitset.
6716
6717 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6718 `How Can I Reset @code{yyparse}', since texinfo does not allow
6719 arbitrary @ in node names.
6720
6721 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6722 shouldn't be needed according to the gettext 0.12.1 documentation
6723 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 6724 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 6725 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 6726 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 6727
8dd76bee
PE
6728 * lib/.cvsignore: Add stdbool.h.
6729 * m4/.cvsignore: Add nls.m4, po.m4.
6730
6731 Upgrade to CVS gnulib.
6732 * stdbool_.h: File renamed from stdbool.h.in.
6733 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6734 AC_HEADER_STDBOOL.
6735 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6736 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6737 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6738 (MOSTLYCLEANFILES): New var.
6739 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6740 (stdbool.h): New rule.
6741 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6742 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6743 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6744 m4/quote.m4: Upgrade to today's gnulib.
6745
6746 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6747 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6748 the tests right now.
6749 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6750 yyerror are declared before use; C99 requires this.
6751
25005f6a
PH
67522003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6753
6754 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6755 first.
6756 (yyrecoverSyntaxError): Correct the logic for setting and testing
6757 yyerrState.
6758 Correct comment on handling EOF.
6759 Allow states with only a default reduction, rather than failing
8dd76bee 6760 (I can't quite reconstruct why these were not allowed before).
25005f6a 6761
137437c6 6762 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 6763 buffer overruns, corrupting state.
8dd76bee
PE
6764
6765 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
6766 definition.
6767 * src/reader.h (max_left_semantic_context): New variable declaration.
6768 * src/scan-gram.l (max_left_semantic_context): Define.
6769 (handle_action_dollar): Update max_left_semantic_context.
6770 * data/glr.c (YYMAXLEFT): New definition.
6771 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6772 (yyresolveAction): Ditto.
6773
6774 Fixes to problems with location handling in GLR parsers reported by
6775 Frank Heckenbach (2003/06/05).
6776
6777 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6778 (YYRHSLOC): Add parentheses, and define only if locations used.
6779 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6780 locations not used.
6781 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6782 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 6783
25005f6a
PH
6784 * tests/cxx-type.at: Exercise location information; update tests
6785 to differentiate output with and without locations.
8dd76bee 6786 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
6787 because default YYLTYPE not yet defined.
6788 Change semantic actions to compute strings, rather than printing
6789 them directly (to test proper passing of semantics values). Change
6790 output to prefix notation and update test data and expected results.
6791 (yylex): Track locations.
6792 (stmtMerge): Return value rather than printing, and include arguments
6793 in value.
8dd76bee 6794
711f40b7
PE
67952003-06-03 Paul Eggert <eggert@twinsun.com>
6796
6797 Avoid warnings generated by GCC 2.95.4 when Bison is
6798 configured with --enable-gcc-warnings.
6799 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6800 yy::]b4_parser_class_name[::translate_,
6801 yy::Stack::operator[] (unsigned),
6802 yy::Stack::operator[] (unsigned) const,
6803 yy::Slice::operator[] (unsigned),
6804 yy::Slice::operator[] (unsigned) const):
6805 Rename local vars to avoid warnings.
6806 * tests/glr-regression.at (Improper handling of embedded actions
6807 and $-N in GLR parsers): Remove unused local variable from yylex.
6808 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6809 (void) as arg when not pure, since we now assume C89 when building
6810 Bison. Pacify GCC by using parameter.
6811
ac695f7d
PE
68122003-06-02 Paul Eggert <eggert@twinsun.com>
6813
6814 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6815 yy::Location::lines, yy::Location::columns): Rename arguments
6816 to avoid shadowing; this removes a warning generated by GCC 3.3.
6817
26ec81e0
PE
68182003-06-01 Paul Eggert <eggert@twinsun.com>
6819
6820 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6821 to g++, as GCC 3.3 complains if you do it.
6822 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6823 everything that WARNING_CFLAGS has, except omit warnings
6824 not suitable for C++.
6825 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6826 * tests/atlocal.in (CXXFLAGS): New var.
6827 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6828
6829 Fix a GLR parser bug I reported in February; see
161a71f3 6830 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
6831 The problem was that GLR parsers did not conform to the C standard,
6832 because actions like { $1 = $2 + $3; } expanded to expressions
6833 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6834 to a local variable. The C standard says that expressions
6835 like (var = f ()) + (var = f ()) have undefined behavior.
6836 Another problem was that GCC sometimes issues warnings that
6837 yyfill and its parameters are unused.
6838
6839 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6840 as possibly unused.
6841 (yyfill): New function.
6842 (YYFILL): Use it.
6843 (yyuserAction): Change type of yynormal to bool, so that it matches
6844 the new yyfill signature. Mark it as possibly unused.
6845
6846
6847 Follow up on a bug I reported in February, where a Bison-generated
6848 parser can loop. Provide a test case and a fix for yacc.c. I
6849 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6850 The original bug report is in:
161a71f3 6851 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
6852
6853 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6854 macro's size was becoming unwieldy.
6855 (yyerrlab): Do not discard an empty lookahead symbol, as this
6856 might destroy garbage.
6857 (yyerrorlab): New label, with the old contents of YYERROR,
6858 plus the following change: pop the stack of rhs corresponding
6859 to the production that invoked YYERROR. That is how Yacc
6860 behaves, and POSIX requires this behavior.
6861 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6862 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6863 Define 'alarm' to do nothing if unistd.h is not available.
6864 Add a new rule "exp: '-' error;" to test the above change to
6865 data/yacc.c. Use 'alarm' to abort any test taking longer than
6866 10 seconds, as it's probably looping.
6867 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6868 Also, the new yacc.c generates two fewer diagnostics for an
6869 existing test.
6870
d0829076
PE
68712003-05-24 Paul Eggert <eggert@twinsun.com>
6872
c6ae27df
PE
6873 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6874 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6875 This fixes a problem reported by John Bowman when the Compaq/HP
6876 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6877 -ansi -Wall -gall).
6878 * data/yacc.c (union yyalloc): Likewise.
6879 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 6880
d0829076
PE
6881 Switch from 'int' to 'bool' where that makes sense.
6882
6883 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6884 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6885 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6886 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6887 Return or accept bool, not int. All callers changed.
6888 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6889 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6890 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6891 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6892 bitset_or_and_cmp_): Likewise.
6893 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6894 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6895 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6896 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6897 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6898 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6899 bitset_stats_or_and_cmp): Likewise.
6900 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6901 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6902 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6903 ebitset_xor_cmp): Likewise.
6904 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6905 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6906 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6907 lbitset_xor_cmp): Likewise.
6908 * lib/bbitset.h: Include <stdbool.h>.
6909 (struct bitset_vtable): The following members now return bool, not
6910 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6911 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6912 or_and_cmp).
6913 * src/conflicts.c (count_rr_conflicts): Likewise.
6914 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6915 All uses changed.
6916 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6917 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6918 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6919 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6920 graph_flag): Likewise.
6921 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6922 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6923 graph_flag): Likewise.
6924 * src/output.c (error_verbose): Likewise.
6925 * src/output.h (error_verbose): Likewise.
6926 * src/reader.c (start_flag, typed): Likewise.
6927 * src/reader.h (typed): Likewise.
6928 * src/getargs.c (LOCATIONS_OPTION): New constant.
6929 (long_options, getargs): Use it.
6930 * src/lalr.c (build_relations): Use bool, not int.
6931 * src/nullable.c (nullable_compute): Likewise.
6932 * src/print.c (print_reductions): Likewise.
6933 * src/tables.c (action_row, pack_vector): Likewise.
6934 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6935 * src/output.c (prepare): Use it.
6936 * src/output.c (token_definitions_output,
6937 symbol_destructors_output, symbol_destructors_output): Use string,
6938 not boolean integer, to keep track of whether to output separator.
6939 * src/print_graph.c (print_core): Likewise.
6940 * src/state.c (state_rule_lookaheads_print): Likewise.
6941
6942 * config/install-sh: Sync from automake 1.7.5.
6943
6b2584b7
PE
69442003-05-14 Paul Eggert <eggert@twinsun.com>
6945
6946 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6947 semicolon after a grammar declaration, in the interest of possible
6948 future changes to the Bison input language.
6949 Do not allow a stray semicolon at the start of the grammar.
6950 (rhses.1): Allow one or more semicolons after any rule, including
6951 just before "|" as required by POSIX.
6952 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6953 grammar.
6954
caf37a36
ADL
69552003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6956
6957 %parse-param support for lalr1.cc.
6958
6959 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6960 b4_cc_constructor_calls, b4_cc_constructor_call,
6961 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6962 definitions.
6963 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6964 parse-param arguments.
6965 (yy::b4_parser_class_name): Declare instance variables to
6966 hold parse-param arguments.
6967 * tests/calc.at: s/value/semantic_value/ because value clashes
6968 with a member of yy::b4_parser_class_name. Adjust C++ code
6969 to handle %parse-param. Enable %parse-param test in C++.
6970
3ab37077
PE
69712003-05-12 Paul Eggert <eggert@twinsun.com>
6972
6973 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6974 English a bit. Fix fclose typo. Change "const char" to "char
6975 const", and use ANSI C rather than K&R for "main". Suggest
6976 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6977 and suggest yy_switch_to_buffer.
6978
69792003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
6980
6981 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6982 C89. This avoids a diagnostic on compilers that define __STDC__
6983 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 6984 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 6985
e743727f
PE
69862003-05-03 Paul Eggert <eggert@twinsun.com>
6987
6988 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6989 Do not overrun array bounds.
6990 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 6991 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 6992
916708d5
AD
69932003-04-29 Akim Demaille <akim@epita.fr>
6994
6995 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6996 * src/getargs.c, src/getargs.h: here, as bool, not int.
6997 (nondeterministic_parser): New.
6998 * src/parse-gram.y, src/scan-gram.l: Support
6999 %nondeterministic-parser.
7000 * src/output.c (prepare): Use nondeterministic_parser instead
7001 of glr_parser where appropriate.
7002 * src/tables.c (conflict_row, action_row, save_row)
7003 (token_actions, token_actions, pack_vector): Ditto.
7004
a06ea4aa
AD
70052003-04-29 Akim Demaille <akim@epita.fr>
7006
7007 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
7008
211074ca
AD
70092003-04-29 Akim Demaille <akim@epita.fr>
7010
7011 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
7012 with %pure-parser and %locations to exercise the patch from Yakov
7013 Markovitch below.
7014
6175ffe3
PE
70152003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
7016
7017 * data/yacc.c: (b4_lex_param): Corrected for the case where
7018 %lex-param is provided and %pure-parser isn't.
7019
b1e95857
PE
70202003-04-27 Paul Eggert <eggert@twinsun.com>
7021
7022 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 7023 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
7024 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
7025 if it is not defined.
7026 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
7027
acda9df6
PE
70282003-04-26 Paul Eggert <eggert@twinsun.com>
7029
3470c57b
PE
7030 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
7031 Declare to be of type suitable for the ninf value itself, not of
7032 type suitable for the corresponding table, since the latter might
7033 be unsigned but the ninf value might be negative. This fixes a
7034 bug reported by Alexandre Duret-Lutz in
161a71f3 7035 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 7036
acda9df6
PE
7037 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
7038 invokes it. We shouldn't invoke it twice because it will attempt
7039 to put error.o in the archive twice. This fixes a glitch reported
7040 by Martin Mokrejs in
161a71f3 7041 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 7042
b5250f26
PE
70432003-04-21 Paul Eggert <eggert@twinsun.com>
7044
7045 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
7046 to gnulib.
7047
089ac0f1
PE
70482003-04-21 Yakov Markovitch <Markovitch@iso.ru>
7049
7050 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
7051 Fix obvious typo that results in uncompilable GLR parsers
7052 when both %pure-parser and %locations are used. (trivial change)
7053
5ededac6
PE
70542003-04-17 Paul Eggert <eggert@twinsun.com>
7055
1b8f2fff
PE
7056 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
7057 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
7058 Do not insert the expected token via unput, as this runs afoul
7059 of a POSIX-compatibility bug in flex 2.5.31.
7060 All uses changed to BEGIN the parent state,
7061 since we no longer insert the expected token via unput.
7062 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
7063 that is no longer emitted after the above change.
7064
5ededac6
PE
7065 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
7066 the first one. This change is from Paul Hilfinger, and it fixes
7067 regression reported by Werner Lemberg in
161a71f3 7068 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
7069
7070 (resolve_sr_conflict): Don't invoke state_errs_set
7071 unless one or more tokens have been explicitly made errors.
7072 Otherwise, the above change causes Bison to abort.
7073
7074 * tests/existing.at (GNU pic Grammar): New test case, taken from
7075 Lemberg's email.
7076
b8be9132
AD
70772003-03-31 Akim Demaille <akim@epita.fr>
7078
7079 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
7080
d423d460
AD
70812003-03-31 Akim Demaille <akim@epita.fr>
7082
7083 * src/output.c (prepare_symbols): Avoid trailing spaces in the
7084 output.
7085
c7e441b4
AD
70862003-03-31 Akim Demaille <akim@epita.fr>
7087
7088 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
7089 From Paul Hilfinger.
7090
231897ad
AD
70912003-03-29 Akim Demaille <akim@epita.fr>
7092
7093 * m4/error.m4: Do not put under dynamic conditions some code which
7094 expansion is under static control.
7095
5b066063
AD
70962003-03-29 Akim Demaille <akim@epita.fr>
7097
7098 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
7099
22a74fec
AD
71002003-03-29 Akim Demaille <akim@epita.fr>
7101
7102 * doc/bison.texinfo (Strings are Destroyed): New.
7103
0eee27e7
PE
71042003-03-13 Paul Eggert <eggert@twinsun.com>
7105
7106 * .cvsignore: Add configure.lineno.
7107 * src/.cvsignore: Add yacc.
7108 * tests/.cvsignore: Add testsuite.log.
7109 * doc/fdl.texi: Sync with latest FSF version.
7110
f61aad93
PE
71112003-03-12 Paul Eggert <eggert@twinsun.com>
7112
537636c7
PE
7113 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
7114 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
7115 cursor, instead of leaving it undefined. This fixes a bug
7116 reported by Tim Van Holder in
161a71f3 7117 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
7118 * tests/input.at (Torturing the Scanner): Test the scanner on
7119 an empty input file, which was Tim Van Holder's test case.
7120
7121 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
7122 <sys/resource.h> can be included, include sys/time.h and
7123 sys/times.h first, if available. This works around the SunOS
7124 4.1.4 porting bug reported by Bruce Becker in
161a71f3 7125 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
7126
7127 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
7128 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
7129 AC_HEADER_SYS_WAIT.
7130
f61aad93
PE
7131 Merge changes from gnulib. This was prompted because the CVS
7132 snapshot didn't build on Solaris 7 due to strnlen problems.
7133
7134 These changes need to be merged back into gnulib:
7135 * lib/hash.c: Include <stdbool.h> unconditionally.
7136 * m4/onceonly.m4 (m4_quote): New macro.
7137 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
7138 Quote AC_FOREACH variable-expansions properly.
7139 The 2003-01-03 obstack.h change also needs merging.
7140 {end of changes requiring merging}
5b066063 7141
f61aad93
PE
7142 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
7143 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
7144 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
7145 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
7146 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
7147 New files, imported from gnulib.
7148 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
7149 above.
7150
7151 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
7152 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
7153 gnulib sources.
7154
7155 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
7156 Add.
7157 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
7158 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
7159 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
7160 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
7161 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
7162 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
7163 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
7164 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
7165 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
7166 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
7167 (jm_PREREQ_ARGMATCH): Remove.
7168 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
7169 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
7170
7171 * src/system.h: Include <stdbool.h> unconditionally.
7172
7173 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
7174 assuming at least C89 in the bitset code for some time now.
7175
d2ffe116
AD
71762003-03-03 Akim Demaille <akim@epita.fr>
7177
7178 * ro.po: New.
7179
052826fd
AD
71802003-03-02 Akim Demaille <akim@epita.fr>
7181
7182 * doc/bison.texinfo (Table of Symbols): Reactivate the
7183 documentation for %lex-param, and %parse-param.
7184
c4749565
AD
71852003-03-02 Akim Demaille <akim@epita.fr>
7186
7187 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
7188 generate verbose error messages.
7189 Use the number of tokens as an upper bound in yytname, as it
7190 cannot be a non terminal.
7191
d5286af1
AD
71922003-03-02 Akim Demaille <akim@epita.fr>
7193
7194 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
7195 message.
7196
22e304a6
AD
71972003-03-02 Akim Demaille <akim@epita.fr>
7198
22e304a6
AD
7199 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
7200 Use them to exercise yycheck overrun.
7201 Based on Andrew Suffield's grammar.
7202
67a25fed
AD
72032003-03-02 Akim Demaille <akim@epita.fr>
7204
7205 Create tests/local.at for Bison generic testing macros.
7206
7207 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
7208 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
7209 This new file.
7210 * tests/calc.at (AT_CHECK_CALC): Adjust.
7211 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
7212 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
7213 * tests/local.at: here.
7214 (AT_COMPILE_CXX): Tags the tests using it as c++.
7215 Ignore the test if CXX is not functional.
7216
9c2b381f
PE
72172003-03-01 Paul Eggert <eggert@twinsun.com>
7218
7219 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
7220 not loc->end, since loc->end might contain garbage and this leads
7221 to undefined behavior on some platforms.
7222 (id_loc, token_start): Use (IF_LINTed) initial values that do not
7223 depend on *loc, so that the reader doesn't give the the false
7224 impression that *loc is initialized.
7225 (<INITIAL>"%%"): Do not bother setting code_start, since its value
7226 does not survive the return.
7227
0433ba88
AD
72282003-03-01 Akim Demaille <akim@epita.fr>
7229
7230 * src/scan-gram.l (code_start): Always initialize it when entering
7231 into yylex, as SC_EPILOGUE is activated *before* the corresponding
7232 yylex invocation. An alternative would be making it static, but
7233 then it starts with the second %%'s beginning, instead of its end.
7234
b305ea69
PE
72352003-02-28 Paul Eggert <eggert@twinsun.com>
7236
7237 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
7238 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 7239 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 7240
c3d25e01
PE
72412003-02-26 Paul Eggert <eggert@twinsun.com>
7242
7243 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
7244 Remove Sequent/Pyramid discussion (nobody uses them any more).
7245 Merge VMS and MS-DOS discussion; these ports may well be dead
7246 but let's keep mentioning them for now. Put <> around email
7247 addresses. Add copyright notice.
7248
c267ffbc
PE
72492003-02-24 Paul Eggert <eggert@twinsun.com>
7250
7251 * data/glr.c (yy_reduce_print): yylineno -> yylno,
7252 to avoid collision with flex use of yylineno.
7253 Problem reported by Bruce Lilly in
161a71f3 7254 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
7255 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7256 * data/yacc.c (yy_reduce_print): Likewise.
7257
7258 * config/depcomp: Sync with Automake 1.7.3.
7259
f939fc12
AD
72602003-02-21 Akim Demaille <akim@epita.fr>
7261
7262 * data/lalr1.cc: Use temporary variables instead of casts to
7263 change integer types.
7264 Suggested by Paul Eggert.
7265
95923bd6
AD
72662003-02-21 Akim Demaille <akim@epita.fr>
7267
7268 * doc/bison.texinfo: Use "location" consistently to refer to @n,
7269 to avoid confusions with lalr1.cc's notion of Position.
7270 Suggested by Paul Eggert.
7271
2cdc240e
AD
72722003-02-20 Akim Demaille <akim@epita.fr>
7273
7274 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
7275 before initial_columns.
7276 (location.hh): Use consistent variable names when defining the
7277 operator<<.
7278 Use "last" so that we subtract from Positions, not from unsigned.
7279
5d003116
AD
72802003-02-20 Akim Demaille <akim@epita.fr>
7281
7282 * data/lalr1.cc (position.hh): New subfile, including the extended
7283 and Doxygen'ed documentation of class Position.
7284 (location.hh): Use it.
7285 Document a` la Doxygen.
ba1ecc07 7286 With the help of Benoit Perrot.
5d003116 7287
d02b25f9
AD
72882003-02-20 Akim Demaille <akim@epita.fr>
7289
7290 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
7291 AT_YACC_IF.
7292 Redefine AT_YYERROR_SEES_LOC_IF using it.
7293 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
7294 not defined.
7295 Don't use the location in yy::Parser::error_ and
7296 yy::Parser::print_ when not %locations.
7297 Activate more lalr1.cc tests.
7298
0d1c3a04
AD
72992003-02-19 Akim Demaille <akim@epita.fr>
7300
7301 * data/lalr1.cc: When displaying a line number, be sure to make it
7302 an int.
7303
60a777aa
AD
73042003-02-19 Akim Demaille <akim@epita.fr>
7305
7306 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
7307 Remove, useless.
7308 (YYABORT, YYACCEPT, YYERROR): New.
7309 * tests/calc.at: Renable the lalr1.cc test.
7310
0b86fc41
AD
73112003-02-19 Akim Demaille <akim@epita.fr>
7312
7313 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
7314 error recovery, mixing with/without pops and discarding of the
7315 lookahead.
7316 Exercise YYERROR.
7317 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
7318
da99a5dc
PE
73192003-02-17 Paul Eggert <eggert@twinsun.com>
7320
7321 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
7322 * tests/testsuite.at (AT_COMPILE): Use them.
7323 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 7324 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 7325
93b8c255
PE
73262003-02-12 Paul Eggert <eggert@twinsun.com>
7327
7328 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
7329 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 7330 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
7331 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
7332 Check for malloc failure, for consistency with yacc.c.
7333 (yytname_size): Remove, for consistency with yacc.c.
7334
7335 The bug still remains in data/lalr1.cc, as I didn't have time
7336 to fix it there.
7337
7548fed2
AD
73382003-02-06 Akim Demaille <akim@epita.fr>
7339
7340 * configure.ac (GXX): Rename as...
7341 (CXX): this, to keep the original Autoconf semantics.
7342 Require 2.57.
7343 * data/lalr1.cc: Fix b4_copyright invocations.
7344 If YYDEBUG is not defined, don't depend upon name_ being defined.
7345 (location.hh): Include string and iostream.
7346 (Position::filename): New member.
7347 (Position::Position ()): New.
7348 (operator<< (Position)): New.
7349 (operator- (Position, int)): New.
7350 (Location::first, Location::last): Rename as...
7351 (Location::begin, Location::end): these, to mock the conventional
7352 iterator names.
7353 (operator<< (Location)): New.
7354 * tests/atlocal.in (CXX): New.
7355 * tests/testsuite.at (AT_COMPILE_CXX): New.
7356 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
7357 locations in a more synthetic way.
7358 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
7359 lalr1.cc is used.
7360 Adjust the C locations to match those from Emacs: first column is
7361 column 0.
7362 Change all the expected results.
7363 Conform to the GCS: simplify the locations when applicable.
7364 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
7365 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
7366 these CPP macros with the m4 macros new defined by...
7367 (AT_CHECK_PUSHDEFS): this, i.e.:
7368 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 7369 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
7370 New macros.
7371 (AT_CHECK_POPDEFS): Undefine them.
7372 (AT_CHECK_CALC_LALR1_CC): New.
7373 Use it for the first lalr1.cc test.
7374
43a176ef
AD
73752003-02-04 Akim Demaille <akim@epita.fr>
7376
7377 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
7378 Location as is defined.
7379
fc049e9c
AD
73802003-02-04 Akim Demaille <akim@epita.fr>
7381
7382 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
7383 name_ being defined.
7384
a737b216
PE
73852003-02-03 Paul Eggert <eggert@twinsun.com>
7386
7387 * src/gram.h (start_symbol): Remove unused decl.
7388
7389 Use more-consistent naming conventions for local vars.
7390
7391 * src/derives.c (derives_compute): Change type of local var from
7392 int to rule_number.
7393 * src/gram.c (grammar_rules_partial_print): Likewise.
7394 * src/print.c (print_core): Likewise.
7395 * src/reduce.c (reduce_grammar_tables): Likewise.
7396
7397 * src/gram.c (grammar_dump): Change name of item_number *
7398 local var from r to rp.
7399 * src/nullable.c (nullable_compute): Likewise.
7400
7401 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
7402
7403 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
7404 for symbol or symbol_number var.
7405 * src/reader.c (grammar_start_symbol_set): Likewise.
7406 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
7407 Likewise.
7408 * src/state.c (transitions_to): Likewise.
7409 * src/state.h: Likewise.
7410 * src/tables.c (symbol_number_to_vector_number): Likewise.
7411
7412 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
7413 char * var.
7414
7415 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
7416 var.
7417
7418 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
7419 var.
7420
7421 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
7422 Use str, not s, for char * var. Use ch, not c, for character var.
7423 Use size for size var.
7424
7425 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
7426 char * var.
7427 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
7428 uniqstr var.
7429 * src/uniqstr.h: Likewise.
7430
7431 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7432 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7433 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
7434 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
7435 param to have same name as that of enum, so that we don't use
7436 "s" to stand for a non-state.
7437
68e93ad5
AD
74382003-02-02 Akim Demaille <akim@epita.fr>
7439
7440 * src/scan-skel.l: Scan more than one inert character per yylex
7441 invocation.
7442
92898986
PE
74432003-02-01 Paul Eggert <eggert@twinsun.com>
7444
7445 Version 1.875a.
7446
1d9d5d71
PE
7447 * po/LINGUAS: Add ms.
7448
0435d061
AD
74492003-01-30 Akim Demaille <akim@epita.fr>
7450
7451 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
7452
6029a57f
PH
74532003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7454
7455 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
7456 of $1.
0435d061
AD
7457
7458 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 7459 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 7460 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 7461
6029a57f
PH
7462 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
7463 (b4_rhs_location): Ditto.
0435d061 7464 (yyfill): New function to copy from stack tree into array
6029a57f 7465 incrementally.
0435d061
AD
7466 (yyuserAction): Modify to allow incremental move of semantic values
7467 to rhs array when in GLR mode.
7468 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
7469 as needed.
7470 Remove dummy use of yystack, as there is now a guaranteed use.
7471 (yydoAction): Modify to allow incremental move of semantic values
7472 to rhs array when in GLR mode.
7473 (yyresolveAction): Ditto.
7474 (yyglrShiftDefer): Update comment.
0435d061 7475 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
7476 (yyglrReduce): Ditto.
7477 (yydoAction): Ditto
0435d061 7478
6029a57f
PH
7479 * tests/glr-regr1.at: Rename to ...
7480 * tests/glr-regression.at: Add new regression test for the problems
7481 described above (adapted from S. Eken).
7482 Update copyright notice.
7483 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
7484 * tests/Makefile.am: Ditto.
7485
6cee6297
PE
74862003-01-28 Paul Eggert <eggert@twinsun.com>
7487
7488 * data/lalr1.cc: Do not use @output_header_name@ unless
7489 b4_defines_flag is set. This fixes two bugs reported by
7490 Tim Van Holder in
161a71f3
PE
7491 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
7492 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 7493
b2a836b5
PE
74942003-01-21 Paul Eggert <eggert@twinsun.com>
7495
7496 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
7497 we don't need to worry about yyerrlab1 being reported as an
7498 "unused label" by non-GCC C compilers. The downside is that if
7499 locations are used then a couple of statements are duplicated each
7500 time YYERROR is invoked, but the upside is that the warnings
7501 should vanish.
7502 (yyerrlab1): Move code to YERROR.
7503 (yyerrlab2): Remove. Change uses back to yyerrlab1.
7504 This reverts some of the 2002-12-27 change.
7505
4196b931
PE
75062003-01-17 Paul Eggert <eggert@twinsun.com>
7507
7508 * src/output.c (symbol_printers_output): Fix typo that led
7509 to core dump. Problem reported by Antonio Rus in
161a71f3 7510 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 7511
3ae831b4
AD
75122003-01-13 Akim Demaille <akim@epita.fr>,
7513 Quoc Peyrot <chojin@lrde.epita.fr>,
7514 Robert Anisko <anisko_r@lrde.epita.fr>
7515
7516 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
7517 when the stacks contain one element, as the loop would otherwise
7518 free the last state, and then use the top state (the one we just
7519 popped). This means that the initial elements will not be freed
7520 explicitly, as is the case in yacc.c; it is not a problem, as
7521 these elements have fake values.
7522
e3aa65c5
PE
75232003-01-11 Paul Eggert <eggert@twinsun.com>
7524
7525 * NEWS: %expect-violations are now just warnings, reverting
7526 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
7527 bootstrapping problem reported by Matthias Klose; see
161a71f3 7528 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
7529 * src/conflicts.c (conflicts_print): Likewise.
7530 * tests/conflicts.at (%expect not enough, %expect too much,
7531 %expect with reduce conflicts): Likewise.
7532 * doc/bison.texinfo (Expect Decl): Document this. Also mention
7533 that the warning is enabled if the number of conflicts changes
7534 (not necessarily increases).
7535
7536 * src/getargs.c (version): Update copyright year.
7537
f0057011
AD
75382003-01-09 Akim Demaille <akim@epita.fr>
7539
7540 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
7541
1ee6d2a0
PE
75422003-01-08 Paul Eggert <eggert@twinsun.com>
7543
7544 * Makefile.maint (WGETFLAGS):
7545 New macro, containing "-C off" to disable proxy caches.
7546 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
7547 (rel-check): Use $(WGET) instead of wget.
7548
d4fd77c4
PE
75492003-01-06 Paul Eggert <eggert@twinsun.com>
7550
7551 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
7552 the GLR paper of Scott, Johnstone and Hussain.
7553
464c6927
PE
75542003-01-04 Paul Eggert <eggert@twinsun.com>
7555
d600ee67
PE
7556 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
7557 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
7558 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
7559 (EXTRA_LIBRARIES): New var, for liby.a.
7560 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
7561 (EXTRA_SCRIPTS): New var, for yacc.
7562
464c6927
PE
7563 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
7564 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
7565 Problem reported by Nelson H. F. Beebe.
7566
75672003-01-03 Paul Eggert <eggert@twinsun.com>
7568
7569 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
7570 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7571 when compiling Bison 1.875's `bitset bset = obstack_alloc
7572 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7573
7574 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
7575 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
7576 grow to a huge size with typical invocation.
d600ee67 7577
464c6927
PE
7578 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
7579 Use the pattern recommended by Autoconf 2.57, except also protect
7580 against double-definition.
7581 * src/system.h: Likewise.
7582 Portability issues reported by Nelson H. F. Beebe.
d600ee67 7583
464c6927
PE
7584 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
7585 All uses changed. Provide a definition in both C and C++.
7586 (yytrue, yyfalse): Define even if defined (__cplusplus).
7587
7588 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7589 Reported by Nelson H. F. Beebe.
d600ee67 7590
464c6927
PE
7591 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7592
0f42c7d5
PE
75932003-01-02 Paul Eggert <eggert@twinsun.com>
7594
7595 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7596 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7597 Bug reported by Nelson H. F. Beebe.
7598
dc546b0f
PE
75992003-01-01 Paul Eggert <eggert@twinsun.com>
7600
7601 * Version 1.875.
7602
2c09b6a7
PE
76032002-12-30 Paul Eggert <eggert@twinsun.com>
7604
7605 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7606 Moved here from...
7607 (<INITIAL>","): Here. This causes stray "," to be treated
7608 more uniformly.
7609
dc546b0f 7610 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
7611 last brace in braced code when not in Yacc mode, for compatibility
7612 with Bison 1.35. This resurrects the 2001-12-15 patch to
7613 src/reader.c.
7614
7615 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7616 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7617
535c0f63
PE
76182002-12-28 Paul Eggert <eggert@twinsun.com>
7619
7620 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7621 that of SYM's type. This fixes Debian bug 168069, reported by
7622 Thomas Olsson.
d600ee67 7623
963fcc17
PE
76242002-12-28 Paul Eggert <eggert@twinsun.com>
7625
7626 Version 1.75f.
7627
7628 Switch back to the Yacc style of conflict reports, undoing some
7629 of the 2002-07-30 change.
7630 * doc/bison.texinfo (Understanding): Use Yacc style for
7631 conflict reports. Also, use new way of locating rules.
7632 * src/conflicts.c (conflict_report):
7633 Renamed from conflict_report_yacc, removing the old
7634 'conflict_report'. Translate the entire conflict report at once,
7635 so that we don't assume that "," has the same interpretation in
7636 all languages.
7637 (conflicts_output): Use Yacc-style conflict report for each state,
7638 instead of our more-complicated style.
7639 (conflicts_print): Use Yacc-style conflict report, except print
7640 the input file name when not emulating Yacc.
7641 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7642 Conflicted Reduction, %expect not enough, %expect too much,
7643 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7644 * tests/existing.at (GNU Cim Grammar): Likewise.
7645 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7646
7647 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7648 fatal): Don't invoke fflush; it's not needed and it might even be
7649 harmful for stdout, as stdout might not be open.
7650 * src/reduce.c (reduce_print): Likewise.
7651
b1efe548
PE
76522002-12-27 Paul Eggert <eggert@twinsun.com>
7653
7654 Fix a bug where error locations were not being recorded correctly.
7655 This problem was originally reported by Paul Hilfinger in
161a71f3 7656 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
7657
7658 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7659 top of the location stack's error locations.
7660 (yyerrlab): Set it. When discarding a token, push its location
7661 onto yylerrsp so that we don't lose track of the error's end.
7662 (yyerrlab1): Now is only the target of YYERROR, so that we can
7663 properly record the location of the action that failed. For GCC
7664 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7665 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7666 (yyerrlab2): New label, which yyerrlab now falls through to.
7667 Compute the error's location by applying YYLLOC_DEFAULT to
7668 the locations of all the symbols that went into the error.
7669 * doc/bison.texinfo (Location Default Action): Mention that
7670 YYLLOC_DEFAULT is also invoked for syntax errors.
7671 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7672 Error locations include the locations of all the tokens that were
7673 discarded, not just the last token.
d600ee67 7674
983c5c2c
PE
76752002-12-26 Paul Eggert <eggert@twinsun.com>
7676
b1efe548
PE
7677 * src/files.c: Include quote.h.
7678 (compute_output_file_names): Warn if we detect conflicting
7679 outputs to the same file. This should catch the misunderstanding
7680 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7681
7682 * src/conflicts.c (conflicts_print): If the user specifies
7683 "%expect N", report an error if there are any reduce/reduce
7684 conflicts. This is what the manual says should happen.
7685 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7686 * tests/conflicts.at (%expect with reduce conflicts): New test.
7687
983c5c2c
PE
7688 Don't use m4_include on relative file names, as it doesn't work as
7689 desired if there happens to be a file with that name under ".".
d600ee67 7690
983c5c2c
PE
7691 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7692 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7693 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7694 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7695 * src/output.c (output_skeleton): Use full path names when
7696 specifying a file to include; don't rely on include path, as
7697 it's unreliable when the working file contains a file with
7698 that name.
d600ee67 7699
983c5c2c
PE
77002002-12-25 Paul Eggert <eggert@twinsun.com>
7701
7702 Remove obsolete references to bison.simple and bison.hairy.
7703 Problem mentioned by Aubin Mahe in
161a71f3 7704 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
7705 * data/glr.c: Comment fix.
7706 * doc/bison.1: Remove references. Also, mention "yacc".
7707
7708 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7709 with -g option.
7710
7711 * src/parse-gram.y (declaration): Use enum "report_states" rather
7712 than its numeric value 1.
7713
7714 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7715 opening a new one. This fixes Debian bug 165349, reported by
7716 Bruce Stephens.
7717
23f2d9dc
PE
77182002-12-24 Paul Eggert <eggert@twinsun.com>
7719
7720 Version 1.75e.
7721
7722 * Makefile.maint (cvs-update): Don't assume that the shell
7723 supports $(...), as Solaris sh doesn't.
7724
7725 * src/parse-gram.y (lloc_default): Remove test for empty
7726 nonterminals at the end, since it didn't change the result.
7727
77282002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
7729
7730 If the user does not define YYSTYPE as a macro, Bison now declares it
7731 using typedef instead of defining it as a macro. POSIX requires this.
7732 For consistency, YYLTYPE is also declared instead of defined.
7733
7734 %union directives can now have a tag before the `{', e.g., the
7735 directive `%union foo {...}' now generates the C code
7736 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7737 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7738 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7739 instead of `yyltype'.
7740
7741 `yystype' and `yyltype' are now obsolescent macros instead of being
7742 typedefs or tags; they are no longer documented and will be
7743 withdrawn in a future release.
7744
7745 * data/glr.c (b4_location_type): Remove.
7746 (YYSTYPE): Renamed from yystype.
7747 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7748 (struct YYLTYPE): Renamed from struct yyltype.
7749 (YYLTYPE): Renamed from yyltype.
7750 (yyltype, yystype): New (and obsolescent) macros,
7751 for backward compatibility.
7752 * data/yacc.c: Likewise.
7753
7754 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7755 does not specify a union tag. This is for compatibility with
7756 Solaris 9 yacc.
7757
7758 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7759 const *, since it is now modified by stripping surrounding { }.
7760 (current_braced_code): Remove.
7761 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7762 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7763 trailing " {...}". Now of type <chars>.
7764 (grammar_declaration): Adjust to bundled tokens.
7765 (code_content): Remove; stripping is now done by add_param.
7766 (print_token_value): Print contents of bundled tokens.
7767 (token_name): New function.
7768
7769 * src/reader.h (braced_code, current_braced_code): Remove.
7770 (token_name): New decl.
7771
7772 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7773 token_type, not braced_code code_kind. All uses changed.
7774 (SC_PRE_CODE): New state, for scanning after a keyword that
7775 has (or usually has) an immediately-following braced code.
7776 (token_type): New local var, to keep track of which token type
7777 to return when scanning braced code.
7778 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 7779 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
7780 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7781 instead of returning a token type immediately.
7782 (<INITIAL>"{"): Set token type.
7783 (<SC_BRACED_CODE>"}"): Use it.
7784 (handle_action_dollar, handle_action_at): Now returns bool
7785 indicating success. Fail if ! current_rule; this prevents a core dump.
7786 (handle_symbol_code_dollar, handle_symbol_code_at):
7787 Remove; merge body into caller.
7788 (handle_dollar, handle_at): Complain in invalid contexts.
7789
7790 * NEWS, doc/bison.texinfo: Document the above.
7791 * NEWS: Fix years and program names in copyright notice.
7792
879ca4f8
PE
77932002-12-17 Paul Eggert <eggert@twinsun.com>
7794
7795 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7796 Reporting, Table of Symbols): Omit mentions of %lex-param and
7797 %parse-param from the documentation for now.
7798
1c5fe69d
PE
77992002-12-15 Paul Eggert <eggert@twinsun.com>
7800
7801 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7802 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7803 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
7804 disagreed with the Bison documentation. Bug
7805 reported by Andrew Walrond.
d600ee67 7806
1c5fe69d
PE
7807 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7808 as the caller now does that.
7809 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7810 (YYEMPTY): Parenthesize right hand side, since others use it.
7811 (yyparse): Don't assume that our generated code is the only code
7812 that sets yychar.
7813
d1de5372
PE
78142002-12-13 Paul Eggert <eggert@twinsun.com>
7815
7816 Version 1.75d.
7817
7818 POSIX requires a "yacc" command.
7819 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7820 (MOSTLYCLEANFILES): Add yacc.
7821 (yacc): New rule.
1c5fe69d 7822 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
7823 as an alias for bison y.
7824
7825 * po/LINGUAS: Add da.
d600ee67 7826
d1de5372
PE
7827 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7828 problem with latest <getopt.h>.
7829 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7830
7831 * doc/fdl.texi: Upgrade to 1.2.
7832 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7833 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7834 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7835 gnulib.
7836 * config/install-sh: Sync with autotools.
7837
7838 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 7839 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
7840 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7841 locations are requested.
7842 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7843 locations are requested.
7844
d0f3fe23
PE
78452002-12-12 Paul Eggert <eggert@twinsun.com>
7846
7847 Remove unportable casts and storage allocation tricks.
7848 While we're at it, remove almost all casts, since they
7849 usually aren't needed and are a sign of trouble.
7850
7851 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7852
7853 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7854 the pointer DSET returned by malloc; this isn't portable.
7855 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7856 Similarly for DERIVES.
7857 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7858 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7859 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7860
7861 * src/derives.c (derives_compute): Do not bother invoking
7862 int_of_rule_number, since rule numbers are integers.
7863
7864 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7865 rather than XMALLOC (char, N).
7866
7867 * src/files.c (filename_split): Rewrite to avoid cast.
7868
7869 * src/gram.h (symbol_number_as_item_number,
7870 item_number_as_symbol_number, rule_number_as_item_number,
7871 item_number_as_rule_number):
7872 Now inline functions rather than macros, to avoid casts.
7873 * src/state.h (state_number_as_int): Likewise.
7874 * src/tables.c (state_number_to_vector_number,
7875 symbol_number_to_vector_number): Likewise.
7876
7877 * src/gram.h (int_of_rule_number): Remove; no longer used.
7878
7879 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7880 since the resulting storage is always stored into.
7881
7882 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7883 where it's needed.
7884
7885 * src/muscle_tab.c (muscle_m4_output):
7886 Now inline. Return bool, not int.
7887 * src/state.c (state_compare): Likewise.
7888 * src/symtab.c (symbol_check_defined,
7889 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7890 hash_compare_symbol, hash_symbol):
7891 Likewise.
7892 * src/uniqstr.c (uniqstr_print): Likewise.
7893 * src/muscle_tab.c (muscle_m4_output_processor):
7894 New function, to avoid casts.
7895 * src/state.c (state_comparator, stage_hasher): Likewise.
7896 * src/symtab.c (symbol_check_defined_processor,
7897 symbol_check_alias_consistency_processor, symbol_pack_processor,
7898 symbol_translation_processor, hash_symbol_comparator,
7899 hash_symbol_hasher): Likewise.
7900 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7901 * src/muscle_tab.c (muscles_m4_output):
7902 Use new functions instead of casting old functions unportably.
7903 * src/state.c (state_hash_new): Likewise.
7904 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7905 symbols_token_translations_init):
7906 Likewise.
7907 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7908
7909 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7910 var instead of casting to long, to avoid casts.
7911 (prepare_states): Use MALLOC rather than alloca, so that we don't
7912 have to worry about alloca.
7913 * src/state.c (state_hash_lookup): Likewise.
7914
7915 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7916 local var instead of casting to unsigned char, to avoid casts.
7917
7918 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7919 STATE_ALLOC): Remove.
7920 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7921 rather than calloc, and use offsetof to avoid allocating slightly
7922 too much storage.
7923 (state_new): Initialize all members.
7924
7925 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7926
7927 * src/symtab.c (symbol_free): Remove; unused.
7928 (symbol_get): Remove cast in lhs of assignment.
7929 (symbols_do): Now static. Accept generic arguments, not
7930 hashing-related ones.
7931
7932 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7933 (symbol_processor): Remove.
7934 (symbols_do): Remove decl; now static.
7935
7936 * src/system.h (alloca): Remove; decl no longer needed.
7937 (<stddef.h>): Include, for offsetof.
7938 (<inttypes.>, <stdint.h>): Include if available.
7939 (uintptr_t): New type, if system lacks it.
7940 (CALLOC, MALLOC, REALLOC): New macros.
7941 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7942 new macros.
7943
7944 * src/tables.c (table_size): Now int, to pacify GCC.
7945 (table_grow, table_ninf_remap): Use signed table size.
7946 (save_row): Don't bother initializing locals when not needed.
7947 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7948 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7949
7950 * src/vcg.h: Correct misspellings.
7951
7952 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7953
7954
7955 * src/getargs.c (getargs): Don't assume EOF == -1.
7956
26b4a969
PE
79572002-12-09 Paul Eggert <eggert@twinsun.com>
7958
7959 Change identifier spellings to avoid collisions with names
7960 that are reserved by POSIX.
7961
7962 Don't use names ending in _t, since POSIX reserves them.
7963 For consistency, remove _e and _s endings -- they're weren't
7964 needed to remove ambiguity. All uses changed.
7965 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7966 turn was just renamed from struniq_t.
7967 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7968 which in turn was just renamed from struniq_processor_t.
7969 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7970 in turn was renamed from hash_compare_struniq_t.
7971 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7972 (state_list): Renamed from state_list_t.
7973 * src/assoc.h (assoc): Renamed from assoc_t.
7974 * src/conflicts.c (enum conflict_resolution): Renamed from
7975 enum conflict_resolution_e.
7976 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7977 (rule_list): Renamed from rule_list_t.
7978 * src/getargs.h (enum trace): Renamed from enum trace_e.
7979 (enum report): Renamed from enum report_e.
7980 * src/gram.h (item_number): Renamed from item_number_t.
7981 (rule_number): Renamed from rule_number_t.
7982 (struct rule_s): Remove the "rule_s" part; not used.
7983 (rule): Renamed from rule_t.
7984 (rule_filter): Renamed from rule_filter_t.
7985 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7986 (goto_list): Renamed from goto_list_t.
7987 * src/lalr.h (goto_number): Renamed from goto_number_t.
7988 * src/location.h (location): Renamed from location_t.
7989 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7990 and moved here from:
7991 * src/muscle_tab.h (muscle_entry_t): here.
7992 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7993 (rule_list): Renamed from rule_list_t.
7994 * src/print_graph.c (static_graph): Renamed from graph.
7995 * src/reader.h (braced_code): Renamed from braced_code_t.
7996 Remove brace_code_e tag.
7997 * src/relation.h (relation_node): Renamed from relation_node_t.
7998 (relation_nodes): Renamed from relation_nodes_t.
7999 (relation): Renamed from relation_t.
8000 * src/state.h (state_number): Renamed from state_number_t.
8001 (struct state): Renamed from struct state_s.
8002 (state): Renamed from state_t.
8003 (transitions): Renamed from transitions_t. Unused (and
8004 misspelled) transtion_s tag removed.
8005 (errs): Renamed from errs_t. Unused errs_s tag removed.
8006 (reductions): Renamed from reductions_t. Unused tag
8007 reductions_s removed.
8008 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
8009 (struct symbol_list): Renamed from struct symbol_list_s.
8010 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
8011 (struct symbol): Renamed from struct symbol_s.
8012 (symbol): Renamed from symbol_t.
8013 * src/tables.c (vector_number): Renamed from vector_number_t.
8014 (action_number): Renamed from action_t.
8015 * src/tables.h (base_number): Renamed from base_t.
8016 * src/vcg.h (enum color): Renamed from enum color_e.
8017 (enum textmode): Renamed from enum textmode_e.
8018 (enum shape): Renamed from enum shape_e.
8019 (struct colorentry): Renamed from struct colorentry_s.
8020 (struct classname): Renamed from struct classname_s.
8021 (struct infoname): Renamed from struct infoname_s.
8022 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
8023 (enum decision): Renamed from enum decision_e.
8024 (enum orientation): Renamed from enum orientation_e.
8025 (enum alignment): Renamed from enum alignment_e.
8026 (enum arrow_mode): Renamed from enum arrow_mode_e.
8027 (enum crossing_type): Renamed from enum crossing_type_e.
8028 (enum view): Renamed from enum view_e.
8029 (struct node): Renamed from struct node_s.
8030 (node): Renamed from node_t.
8031 (enum linestyle): Renamed from enum linestyle_e.
8032 (enum arrowstyle): Renamed from enum arrowstyle_e.
8033 (struct edge): Renamed from struct edge.
8034 (edge): Renamed from edge_t.
8035 (struct graph): Renamed from struct graph_s.
8036 (graph): Renamed from graph_t.
8037 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
8038 Rename value_t -> value.
8039 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
8040 value_t_as_yystype -> value_as_yystype.
8041
8042 Don't include <errno.h> in the mainstream code, since it
8043 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
8044 * lib/get-errno.c, lib/get-errno.h: New files.
8045 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
8046 get-errno.c.
8047 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
8048 * src/output.c (output_skeleton): Likewise.
8049 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
8050 instead of errno.
8051 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
8052 Likewise.
8053 (handle_action_dollar, handle_action_at): Likewise.
8054 * src/system.h: Do not include <errno.h>.
8055 (TAB_EXT): Renamed from EXT_TAB.
8056 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
8057
8058 Avoid str[a-z]*, since <string.h> reserves that name space.
8059 Change all instances of "struniq" in names to "uniqstr", and
8060 likewise for "STRUNIQ" and "UNIQSTR".
8061 * src/uniqstr.c: Renamed from src/struniq.c.
8062 * src/uniqstr.h: Renamed from src/struniq.h.
8063 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
8064 * src/files.c (strsuffix): Remove; unused.
8065 (concat2): Renamed from stringappend. Now static.
8066 * src/files.h (strsuffix, stringappend): Remove; unused.
8067 * src/parse-gram.y (<chars>): Renamed from <string>.
8068 (<uniqstr>): Renamed from <struniq>.
8069 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
8070 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
8071 (struct graph_s.expand): Renamed from struct graph_s.stretch.
8072 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
8073 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
8074 (N_EXPAND): Renamed from N_STRETCH.
8075
8076 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
8077 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
8078 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
8079 Remove; unused.
8080 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
8081 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
8082 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
8083 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
8084 (BASE_MAXIMUM): Renamed from BASE_MAX.
8085 (BASE_MINIMUM): Renamed from BASE_MIN.
8086 (ACTION_MAX): Remove; unused.
8087 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
8088 Unnecessary casts removed from above defines.
8089
8090
8091 Fix misspelling in names.
8092 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
8093 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
8094 G_NODE_ALIGNEMENT.
8095
8096
8097 * lib/timevar.c (timevar_report): Renamed from time_report,
8098 for consistency with other names.
8099 * lib/timevar.h (timevar_report): New decl.
8100 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
8101
8102
8103 Sort include-file uses.
8104
8105 Reorder all include files under src to be in the order "system.h".
8106 then the ../lib include files in angle brackets (alphabetized),
8107 then the . include files in double-quotes (alphabetized). Fix
8108 dependency breakages encountered in this process, as follows:
8109 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
8110 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
8111 * src/state.h: Include "symtab.h".
8112
996b1c7e
PE
81132002-12-08 Paul Eggert <eggert@twinsun.com>
8114
8115 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
8116 since this causes problems when __file__ contains character
8117 sequences like "@" that are treated specially by src/scan-skel.l.
8118 Instead, just use the file's basename. This fixes the bug
8119 reported by Martin Mokrejs in
161a71f3 8120 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 8121
e19c4e5d
PE
81222002-12-06 Paul Eggert <eggert@twinsun.com>
8123
8124 Add support for rules that do not have trailing semicolons, as
8125 POSIX requires. Improve the quality of locations in Bison
8126 diagnostics.
26b4a969 8127
e19c4e5d
PE
8128 * src/location.c: Include <quotearg.h>.
8129 (empty_location): Now const.
8130 (location_print): New function. Follow the recommendation of the
8131 GNU Coding Standards for locations that span file boundaries.
8132 * src/location.h: Do not include <quotearg.h>; no longer needed.
8133 (boundary): New type.
8134 (location_t): Use it. This allows locations to span file boundaries.
8135 All member uses changed: file -> start.file or end.file (as needed),
8136 first_line -> start.line, first_column -> start.column,
8137 last_line -> end.line, last_column -> end.column.
8138 (equal_boundaries): New function.
8139 (LOCATION_RESET, LOCATION_STEP): Remove.
8140 (LOCATION_PRINT): Remove. All callers changed to use location_print.
8141 (empty_location): Now const.
8142 (location_print): New decl.
8143 * src/parse-gram.y (lloc_default): New function, which handles
8144 empty locations more accurately.
8145 (YYLLOC_DEFAULT): Use it.
8146 (%token COLON): Remove.
8147 (%token ID_COLON): New token.
26b4a969 8148 (rules): Use it.
e19c4e5d
PE
8149 (declarations, rules): Remove trailing semicolon.
8150 (declaration, rules_or_grammar_declaration):
8151 Allow empty (";") declaration.
8152 (symbol_def): Remove empty actions; no longer needed.
8153 (rules_or_grammar_declaration): Remove trailing semicolon.
8154 (semi_colon.opt): Remove.
8155 * src/reader.h: Include location.h.
8156 (scanner_cursor): New decl.
8157 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
8158 rolling our own.
8159 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
8160 of *loc.
8161 (STEP): Remove. No longer needed, now that adjust_location does
8162 the work. All uses removed.
8163 (scanner_cursor): New var.
8164 (adjust_location): Renamed from extend_location. It now sets
8165 *loc and adjusts the scanner cursor. All uses changed.
8166 Don't bother testing for CR.
8167 (handle_syncline): Remove location arg; now updates scanner cursor.
8168 All callers changed.
8169 (unexpected_end_of_file): Now accepts start boundary of token or
8170 comment, not location. All callers changed. Update scanner cursor,
8171 not the location.
8172 (SC_AFTER_IDENTIFIER): New state.
8173 (context_state): Renamed from c_context. All uses changed.
8174 (id_loc, code_start, token_start): New local vars.
8175 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
8176 processing of Yacc white space and equivalents here.
8177 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
8178 instead of returning ID immediately, since we need to search for
8179 a subsequent colon.
8180 (<INITIAL>"'", "\""): Save token_start.
8181 (<INITIAL>"%{", "{", "%%"): Save code_start.
8182 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
8183 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
8184 BEGIN context_state at end, not INITIAL.
8185 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
8186 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
8187 Return correct token start.
8188 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
8189 the start of a character, string or multiline comment is found.
8190 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
8191 Reduction): Adjust reported locations to match the more-precise
8192 results now expected.
8193 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
8194 * tests/reduce.at (Useless Rules, Reduced Automaton,
8195 Underivable Rules): Likewise.
8196 * tests/regression.at (Invalid inputs): No longer `expecting ";"
8197 or "|"' now that so many other tokens are allowed by the new grammar.
8198
8199 * src/complain.h (current_file): Remove duplicate decl;
8200 current_file is now owned by files.h.
8201 * src/complain.c, src/scan-gram.l: Include files.h.
8202
82032002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 8204
e19c4e5d
PE
8205 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
8206 promotes to int; it might be unsigned int.
8207 * data/yacc.c (yy_reduce_print): Likewise.
8208
8209 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
8210 be #defined in the prologue, not in the Bison declarations.
8211 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 8212
b64755e3
PE
82132002-12-02 Paul Eggert <eggert@twinsun.com>
8214
8215 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
8216 * lib/strtoul.c: New file, from gnulib.
8217 This fixes a porting bug reported by Peter Klein in
161a71f3 8218 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 8219
6e746484
PE
82202002-11-30 Paul Eggert <eggert@twinsun.com>
8221
b64755e3
PE
8222 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
8223 and put only a forward declaration in the prologue. This is for
8224 consistency with the other scanner helper functions.
8225
6ba55592
PE
8226 Type clashes now generate warnings, not errors, since it
8227 appears that POSIX may allow some grammars with type clashes.
8228 * src/reader.c (grammar_current_rule_check): Warn about
8229 type clashes instead of complaining.
8230 * tests/input.at (Type Clashes): Expect warnings, not complaints.
8231
6e746484
PE
8232 Add Yacc library, since POSIX requires it.
8233 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
8234 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
8235 * lib/main.c, lib/yyerror.c: New files.
8236
8237 gram_error can be static; it need not be extern.
8238 * src/reader.h (gram_error): Remove decl.
8239 * src/parse-gram.y (gram_error): Now static. Add static decl.
8240 (print_token_value): Omit parameter names from forward decl,
8241 for consistency.
8242
88510f9c
PE
82432002-11-29 Paul Eggert <eggert@twinsun.com>
8244
6e746484
PE
8245 * doc/bison.texinfo: Emphasize that yylex and yyerror must
8246 be declared before being used. E.g., one should typically
8247 declare them in the prologue. Use GNU coding style in examples.
8248 Put "const" consistently after the type it modifies. Mention
8249 that C99 supports "inline". Mention that yyerror traditionally
8250 returns "int".
8251
88510f9c
PE
8252 %parse-param and %lex-param now take just one argument, the
8253 declaration; the argument name is deduced from the declaration.
8254
8255 * doc/bison.texinfo (Parser Function, Pure Calling, Error
8256 Reporting, Table of Symbols): Document this.
8257 * src/parse-gram.y (add_param): New function.
8258 (COMMA): Remove.
8259 (declaration): Implement new rule for %parse-param and %lex-param.
8260 * src/scan-gram.l: "," now elicits a warning, rather than being
8261 a token; this is more compatible with byacc.
8262 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
8263
bb92250c
PE
82642002-11-27 Paul Eggert <eggert@twinsun.com>
8265
8266 Rename identifiers to avoid real and potential collisions.
8267
8268 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
8269 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 8270 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
8271 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8272 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
8273 * src/parse-gram.y (print_token_value): Renamed from yyprint.
8274 All uses changed.
8275 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
8276 The name "yycontrol" violates the name space rules, and this stuff
8277 wasn't being used anyway.
8278 (input): Remove action; this stuff wasn't being used.
8279 (gram_error): Rename local variable yylloc -> loc.
8280 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
8281 (YY_DECL): Don't use "yy" at start of local variables.
8282 All uses changed, e.g., yylloc -> loc.
8283 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
8284 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
8285 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
8286 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
8287
8288 * src/parse-gram.y (gram_error): loc is now const *.
8289 * src/reader.h (gram_error): Likewise.
8290
3af4feb2
PE
82912002-11-24 Paul Eggert <eggert@twinsun.com>
8292
8293 Version 1.75c.
8294
8295 * tests/actions.at (Actions after errors): Use an output format
8296 more similar to that of the Printers and Destructors test.
8297 Test the position of the ';' token too.
8298 (Printers and Destructors): Likewise.
8299 (Printers and Destructors: %glr-parser): Remove for now, to avoid
8300 unnecessarily alarming people when the test fails.
8301
8302 * data/yacc.c (yyerrlab1): Move this label down, so that the
8303 parser does not discard the lookahead token if the user code
8304 invokes YYERROR. This change is required for POSIX conformance.
8305
8306 * lib/error.c: Sync with gnulib.
8307
83082002-11-22 Paul Eggert <eggert@twinsun.com>
8309
8310 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
8311 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
8312 * lib/xmalloc.c: Likewise.
26b4a969 8313
58004308
PE
83142002-11-20 Paul Eggert <eggert@twinsun.com>
8315
8316 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
8317
83182002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 8319
58004308
PE
8320 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
8321 should use `if (! x) abort ();' rather than `assert (x);', and
8322 anyway it's one less thing to worry about configuring.
8323
8324 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
8325 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
8326 and replace all instances of assert with abort.
8327 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8328 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
8329
8330 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
8331 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
8332 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
8333 hash_find_entry, hash_rehash, hash_insert): Likewise.
8334 * src/conflicts.c (resolve_sr_conflict): Likewise.
8335 * src/lalr.c (set_goto_map, map_goto): Likewise.
8336 * src/nullable.c (nullable_compute): Likewise.
8337 * src/output.c (prepare_rules, token_definitions_output): Likewise.
8338 * src/reader.c (packgram, reader): Likewise.
8339 * src/state.c (state_new, state_free, state_transitions_set,
8340 state_reduction_find): Likewise.
8341 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
8342 symbol_pack): Likewise.
8343 * src/tables.c (conflict_row, pack_vector): Likewise.
8344 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
8345 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
8346 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
8347 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
8348
8349 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
8350 (ARGMATCH_CONSTRAINT): New macro.
8351 (ARGMATCH_ASSERT): Use it.
8352
8353 * src/system.h (verify): New macro.
8354 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
8355 rather than assert.
8356 * src/tables.c (tables_generate): Likewise.
8357
8358 * src/struniq.c (struniq_assert): Now returns void, and aborts
8359 if the assertion is false.
8360 (struniq_assert_p): Remove.
8361 * src/struniq.h: Likewise.
8362
76ae8198
PE
83632002-11-18 Paul Eggert <eggert@twinsun.com>
8364
8365 * data/glr.c (yygetLRActions): Replace `yyindex' with
8366 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
8367 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 8368 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 8369
d3c4e709
AD
83702002-11-18 Akim Demaille <akim@epita.fr>
8371
8372 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
8373 space.
8374 From Tim Van Holder.
8375
8d8a7238
PE
83762002-11-17 Paul Eggert <eggert@twinsun.com>
8377
8378 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
8379 to "SyntaxError" for consistency with my 2002-11-15 change.
8380
8381 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
8382 not define to {}, since this breaks the common use of `YYDPRINTF
8383 ((...));' if a single statement is desired (e.g. before `else').
8384 Work around GCC warnings by surrounding corresponding calls with
8385 {} if needed.
8386 (yyhasResolvedValue): Remove unused function.
8387 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
8388 loop body.
8389 (yyreportSyntaxError): Renamed from yyreportParseError.
8390 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
8391 All uses changed.
8392 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
8393 extern when possible. Remove unused initializations.
8394
b0937b22
AD
83952002-11-16 Akim Demaille <akim@epita.fr>
8396
8397 Augment the similarity between GLR and LALR traces.
8398
8399 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
8400 (YY_REDUCE_PRINT): New.
8401 (yyparse): Use them.
8402 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
8403 YYDPRINT here.
8404 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
8405 state reached after the reduction/recovery, since...
8406 (yyparse, yyprocessOneStack): Report the state we are entering in.
8407
c5e3e510
AD
84082002-11-16 Akim Demaille <akim@epita.fr>
8409
8410 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
8411 Add support for --trace=skeleton.
8412 * src/scan-skel.l: %option debug.
8413 Scan strings of non-@ or \n instead of character by character.
8414 (scan_skel): Handle trace_skeleton.
8415 (QPUTS): New.
8416 (@output_parser_name@, @output_header_name@): ``Restore'' their
8417 support (used to be M4 macros).
8418 * data/yacc.c: Quote larger chunks, a la glr.c.
8419 * data/lalr1.cc: Likewise.
8420 The header guards are no longer available, so use some other
8421 string than `YYLSP_NEEDED'.
8422
4c6cc1db
AD
84232002-11-16 Akim Demaille <akim@epita.fr>
8424
8425 Make the ``Printers and Destructors'' test more verbose, taking
8426 `yacc.c''s behavior as (possibly wrong) reference.
8427
8428 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
8429 instead of fprint on stdout.
8430 Set and report the last_line of the symbols.
8431 Consistently display values and locations.
8432
6d9e8019
PE
84332002-11-16 Paul Eggert <eggert@twinsun.com>
8434
8435 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
8436
6e649e65
PE
84372002-11-15 Paul Eggert <eggert@twinsun.com>
8438
b25d88f6
PE
8439 * tests/actions.at (Actions after errors): New test case.
8440
6e649e65
PE
8441 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
8442 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
8443 tests/action.at, tests/calc.at, tests/conflicts.at,
8444 tests/cxx-type.at, tests/regression.at:
8445 "parse error" -> "syntax error" for POSIX compatibility.
8446 "parsing stack overflow..." -> "parser stack overflow" so
8447 that code matches Bison documentation.
8448
0f39aab9
AD
84492002-11-15 Akim Demaille <akim@epita.fr>
8450
8451 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
8452 take two BRACED_CODE, not two string_content.
8453 Free the scanner's obstack when we are done.
8454 (code_content): New.
8455 * tests/calc.at: Adjust.
8456 * doc/bison.texinfo: Adjust.
8457 Also, make sure to include the `,' for these declarations.
8458
761c1926
AD
84592002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
8460
8461 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
8462 definition; avoids potential autoreconf problems.
8463
b0f98b10
AD
84642002-11-15 Akim Demaille <akim@epita.fr>
8465
8466 Always check the value returned by yyparse.
8467
8468 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
8469 returned by yyparse.
8470 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
8471 Adjust calls.
8472 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
8473 returned by yyparse.
8474
970785f1
PH
84752002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8476
8477 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
8478 on input.at test.
8479
8fcc7db1
PE
84802002-11-14 Paul Eggert <eggert@twinsun.com>
8481
7ec1b48e
PE
8482 * src/output.c (output_skeleton): Call xfopen instead of
8483 duplicating xfopen's body.
8484
cfff7583 8485 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 8486 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 8487
8fcc7db1
PE
8488 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
8489 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
8490 Group compiler. Instead, use "$CC -E bar.c". Include the .h
8491 file twice in the grammar, as an extra check.
8492
8493 * tests/input.at (Torturing the Scanner): Surround the
8494 backslash-newline tests with "#if 0", to make it less likely that
8495 we'll run into compiler bugs. Bring back solitary \ inside
8496 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 8497 test backslash-newline in C character constant.
8fcc7db1 8498
4e8d992c
AD
84992002-11-14 Akim Demaille <akim@epita.fr>
8500
8501 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
8502 status of the compiler.
f32b346d 8503 Calling `exit 1' is no longer needed.
4e8d992c
AD
8504 Reported by Nelson H. F. Beebe.
8505
9501dc6e
AD
85062002-11-14 Akim Demaille <akim@epita.fr>
8507
8508 * tests/atlocal.in (CPPFLAGS): We have config.h.
8509 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
8510 New.
8511 * tests/actions.at, tests/calc.at, tests/conflicts.at,
8512 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
8513 * tests/regression.at, tests/torture.at: Use them for all the
8514 grammars that are to be compiled.
8515 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
8516 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
8517 * doc/bison.texinfo (GLR Parsers): Document `inline'.
8518
18b519c0
AD
85192002-11-14 Akim Demaille <akim@epita.fr>
8520
8521 * doc/bison.texinfo: Various formatting changes (alignments in
8522 samples, additional @group/@end group, GCS in samples.
8523 Use @deffn instead of simple @table to define the directives,
8524 macros, variables etc.
8525
9a86cdb9
PE
85262002-11-13 Paul Eggert <eggert@twinsun.com>
8527
daa33def 8528 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 8529 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 8530
daa33def 8531 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 8532 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
8533 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
8534 * tests/headers.at (export YYLTYPE): Likewise.
8535
8536 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 8537 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 8538
9a86cdb9
PE
8539 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
8540 comments, since they're not portable. Use GNU coding style.
8541
9c1e26bd
AD
85422002-11-13 Akim Demaille <akim@epita.fr>
8543
8544 * data/yacc.c: Leave bigger chunks of quoted text.
8545 (YYDSYMPRINTF): New.
8546 Use it to report symbol activities.
8547 * data/glr.c (YYDSYMPRINTF): New.
8548 Use it.
8549
87f721cc
PE
85502002-11-12 Paul Eggert <eggert@twinsun.com>
8551
8552 Version 1.75b.
8553
8554 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
8555 (yyglrReduce): Return yyok, not 0.
8556 This should avoid the enumerated-type warnings reported
464c6927 8557 by Nelson H. F. Beebe in
161a71f3 8558 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
8559
8560 * lib/bbitset.h (BITSET_INLINE): Remove.
8561 * lib/bitset.h [! BITSET_INLINE]: Remove.
8562 (bitset_set, bitset_reset, bitset_test): Rename local vars
8563 to avoid shadowing warnings by GCC.
8564
8565 * data/glr.c (inline): Remove #define. It's the user's
8566 responsibility to #define it away, just like 'const'.
464c6927 8567 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 8568 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 8569
87f721cc
PE
8570 * Makefile.maint (po-check): Scan .l and .y files instead of the
8571 .c and the .h files that they generate. This fixes the bug
8572 reported by Tim Van Holder in:
161a71f3 8573 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
8574 Look for N_ as well as for _. Try to avoid matching #define for
8575 N_ and _.
8576 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
8577 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
8578 * src/scan-gram.l: Revamp regular expressions so that " and '
8579 do not confuse xgettext.
8580
8581 * src/struniq.h (struniq_new): Do not declare the return type
8582 to be 'const'; this violates the C standard.
8583 * src/struniq.c (struniq_new): Likewise.
8584
be14ade5
AD
85852002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
8586
8587 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
8588 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8589 linker.
8590
05291fbc
AD
85912002-11-12 Akim Demaille <akim@epita.fr>
8592
8593 * Makefile.maint: Sync with Autoconf:
8594 (local_updates): New.
8595
1f5fd52e
AD
85962002-11-12 Akim Demaille <akim@epita.fr>
8597
8598 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8599
283f1e64
AD
86002002-11-12 Akim Demaille <akim@epita.fr>
8601
8602 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8603 locations.
8604
886b69d1
AD
86052002-11-12 Akim Demaille <akim@epita.fr>
8606
8607 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8608 not yyvalue.
8609
3df37415
AD
86102002-11-12 Akim Demaille <akim@epita.fr>
8611
8612 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8613 Use it to test the GLR parser.
8614
7bd6c77e
AD
86152002-11-12 Akim Demaille <akim@epita.fr>
8616
8617 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8618 defines it.
8619 * data/glr.c (yystos): New.
8620 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8621 (YYDSYMPRINT): New.
8622 (yyval): Don't define it, it is handled via M4.
8623 (yyrecoverParseError): Free verbosely the discarded symbols.
8624 * data/yacc.c (yysymprint): Remove, rather...
8625 (b4_yysymprint_generate): invoke.
8626 * data/c.m4 (b4_yysymprint_generate): New.
8627 Accept pointers as arguments, as opposed to the version from
8628 yacc.c.
8629 (b4_yydestruct_generate): Likewise.
8630 * tests/cations.at (Printers and Destructors): Use Bison directives
8631 instead of CPP macros.
8632 Don't rely on internal details.
8633
b0400cc6
AD
86342002-11-12 Akim Demaille <akim@epita.fr>
8635
8636 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8637 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8638 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8639 it against YYEMPTY and so forth), work on yytoken (i.e., set
8640 it to YYEMPTY etc.).
8641 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8642 (b4_symbol_actions): Remove.
8643 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8644 for 0, end-of-input.
8645
72f889cc
AD
86462002-11-12 Akim Demaille <akim@epita.fr>
8647
8648 * doc/bison.texinfo (Destructor Decl): New.
8649
b1ae9233
AD
86502002-11-12 Akim Demaille <akim@epita.fr>
8651
8652 * src/tables.c (tables_generate): Use free for pointers that
8653 cannot be NULL, not XFREE.
8654 (pack_vector): Use assert, not fatal, for bound violations.
8655 * src/state.c (state_new): Likewise.
8656 * src/reader.c (reader): Likewise.
8657 * src/lalr.c (set_goto_map): Likewise.
72f889cc 8658 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
8659 the file name.
8660
7ec2d4cd
AD
86612002-11-12 Akim Demaille <akim@epita.fr>
8662
8663 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8664 Restore.
8665 * src/scan-gram.l (last_string): Is global to the file, not to
8666 yylex.
8667 * src/parse-gram.y (input): Don't append the epilogue here,
8668 (epilogue.opt): do it here, and free the scanner's obstack.
8669 * src/reader.c (epilogue_set): Rename as...
8670 (epilogue_augment): this.
8671 * data/c.m4 (b4_epilogue): Defaults to empty.
8672
573a6cd3
AD
86732002-11-12 Akim Demaille <akim@epita.fr>
8674
8675 * src/getargs.c (long_options): Remove duplicates.
8676 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8677 Remove.
8678 * doc/bison.rnh: Remove.
8679 * doc/bison.texinfo (VMS Invocation): Remove.
8680
95612cfa
AD
86812002-11-12 Akim Demaille <akim@epita.fr>
8682
8683 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8684 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8685
8686 Use struniq for symbols.
8687
8688 * src/symtab.h (symbol_t): The tag member is a struniq.
8689 (symbol_type_set): Adjust.
8690 * src/symtab.c (symbol_new): Takes a struniq.
8691 (symbol_free): Don't free the tag member.
8692 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8693 (hash_compare_symbol, hash_symbol): these.
8694 Use the fact that tags as struniqs.
8695 (symbol_get): Use struniq_new.
8696 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8697 Returns a strniq.
8698 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8699 and type members are struniqs.
8700 * src/reader.c (get_merge_function)
8701 (grammar_current_rule_merge_set): Adjust.
8702 (TYPE, current_type): Are struniq.
8703
8704 Use struniq for file names.
8705
8706 * src/files.h, src/files.c (infile): Split into...
8707 (grammar_file, current_file): these.
8708 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8709 * src/reduce.c (reduce_print): Likewise.
8710 * src/getargs.c (getargs): Likewise.
8711 * src/complain.h, src/complain.c: Likewise.
8712 * src/main.c (main): Call struniqs_new early enough to use it for
8713 file names.
8714 Don't free the input file name.
8715
3e6656f9
AD
87162002-11-12 Akim Demaille <akim@epita.fr>
8717
8718 * src/symtab.c (symbol_free): Remove dead deactivated code:
8719 type_name are properly removed.
8720 Don't use XFREE to free items that cannot be NULL.
8721 * src/struniq.h, src/struniq.c: New.
8722 * src/main.c (main): Initialize/free struniqs.
8723 * src/parse-gram.y (%union): Add astruniq member.
8724 (yyprint): Adjust.
8725 * src/scan-gram.l (<{tag}>): Return a struniq.
8726 Free the obstack bit that used to store it.
8727 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8728
7672019c
PE
87292002-11-11 Paul Eggert <eggert@twinsun.com>
8730
8731 Revamp to fix many (but not all) of the C- and M4-related quoting
8732 problems. Among other things, this fixes the Bison bug reported
8733 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 8734 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
8735
8736 Use new @ escapes consistently. Represent brackets with @{ and @}
8737 rather than @<:@ and @:>@, since this works a bit better with dumb
8738 editors like vi. Represent @ with @@, since @ is now consistently
8739 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8740 __ofile__, to avoid unexpected expansions. Similarly, use @output
8741 rather than #output.
8742
8743 * data/c.m4 (b4_copyright): Omit file name from comment, since
8744 the file name could contain "*/".
8745 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8746 be quoted. All uses changed.
8747
8748 * data/glr.c: Use new @ escapes consistently.
8749 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8750 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8751 Remove, since they couldn't handle arbitrary characters in file
8752 names.
8753 * data/lalr1.cc: Likewise.
8754 * data/yacc.c: Likewise.
8755
8756 * src/files.c (output_infix): Remove; all uses removed.
8757 * src/files.h: Likewise.
8758
8759 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8760 mishandled funny characters in file names, and anyway it isn't
8761 needed any more.
8762 * data/yacc.c: Likewise.
8763 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8764
8765 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8766 * data/yacc.c: Likewise.
8767
8768 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8769 strings now.
8770 (muscle_init): Quote filename as a C string.
8771 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8772 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8773 * src/output.c (escaped_file_name_output): New function.
8774 (prepare_symbols): Quote tokens for M4.
8775 (prepare): Don't insert output_infix, output_prefix,
8776 output_parser_name, output_header_name; this is now down by scan-skel.
8777 Insert skeleton as a C string.
8778
8779 * src/output.c (user_actions_output, symbol_destructors_output,
8780 symbol_printers_output): Quote filenames for C and M4.
8781 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8782
8783 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8784 escapes other than \\ and \'; this simplifies the code.
8785 (<SC_STRING>): Likewise, for \\ and \".
8786 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8787 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8788 Use new escapes @{ and @} for [ and ].
8789
8790 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8791 them with auto vars.
8792 Switch to new escape scheme, where @ is the escape character uniformly.
8793 Abort if a stray escape character is found. Avoid unbounded input
8794 buffer when parsing non-escaped text.
8795
8796 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8797 __oline__, #output, $@, and @{ do not have unintended meanings.
8798
acea4f3b
PE
87992002-11-09 Paul Eggert <eggert@twinsun.com>
8800
8801 Fix the test failure due to GCC warnings described in
161a71f3 8802 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
8803 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8804 evaluate to 0 if it's impossible for NINF to be in the respective
8805 table.
8806 (yygetLRActions, yyrecoverParseError): Use them.
8807
8808 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8809 counted in the token inserted at end of file. Now takes
8810 location_t *, not location_t, so that the location can be
8811 adjusted. All uses changed.
8812
8813 * tests/regression.at (Invalid inputs): Adjust wording in
8814 diagnostic to match the new behavior.
8815
8816 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8817 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8818 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8819 abort ();'. This reduces the runtime of the "Many lookaheads"
8820 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8821 GCC 3.2.
8822
20ef1ad5
PE
88232002-11-07 Paul Eggert <eggert@twinsun.com>
8824
8825 * src/parse-gram.y (CHARACTER): Remove unused token.
8826 All uses removed.
8827
8828 * src/scan-gram.l: Remove stack option. We no longer use the
8829 stack, since the stack was never deeper than 1; instead, use the
8830 new auto var c_context to record the stacked value.
8831
8832 Remove nounput option. At an unexpected end of file, we now unput
8833 the minimal input necessary to end cleanly; this simplifies the
8834 code.
8835
8836 Avoid unbounded token sizes where this is easy.
8837
8838 (unexpected_end_of_file): New function.
8839 Use it to systematize the error message on unexpected EOF.
8840 (last-string): Now auto, not static.
8841 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8842 (scanner_last_string_free): Remove; not used.
8843 (percent_percent_count): Move decl to just before use.
8844 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8845 not the (never otherwised-used) CHARACTER.
8846
93724f13
AD
88472002-11-07 Akim Demaille <akim@epita.fr>
8848
8849 Let yyerror always receive the msg as last argument, so that
8850 yyerror can be variadic.
8851
8852 * data/yacc.c (b4_yyerror_args): New.
8853 Use it when calling yyerror.
8854 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8855 Use it when calling yyerror.
8856 * doc/bison.texinfo (Error Reporting): Adjust.
8857 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8858 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8859
6e40b4eb
AD
88602002-11-06 Akim Demaille <akim@epita.fr>
8861
8862 #line should have quoted strings.
8863 Ideally, this should be done by m4_quotearg.
8864
8865 * src/scan-skel.l: Include quotearg.h.
8866 Quote __ofile__.
8867 * src/output.c (symbol_printers_output)
8868 (symbol_destructors_output): Quote the file name.
8869
2dfbfc12
AD
88702002-11-06 Akim Demaille <akim@epita.fr>
8871
8872 * tests/regression.at (Invalid inputs): Adjust to the recent
8873 messages.
8874
437c2d80
AD
88752002-11-06 Akim Demaille <akim@epita.fr>
8876
8877 Restore --no-lines.
8878 Reported by Jim Kent.
8879
8880 * data/c.m4 (b4_syncline): New.
8881 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8882 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8883 * src/output.c (user_actions_output): Likewise.
8884 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 8885 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 8886
900c5db5
AD
88872002-11-06 Akim Demaille <akim@epita.fr>
8888
8889 * src/main.c (main): Free `infile'.
8890 * src/scan-gram.l (handle_syncline): New.
8891 Recognize `#line'.
8892 * src/output.c (user_actions_output, symbol_destructors_output)
8893 (symbol_printers_output): Use the location's file name, not
8894 infile.
8895 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8896
e183b123 88972002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 8898
e183b123 8899 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 8900 either has GLR conflict entries.
e183b123 8901
193eb6b7
PE
89022002-11-05 Paul Eggert <eggert@twinsun.com>
8903
e183b123
PE
8904 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8905 "integer out of range" rather than "invalid value".
8906 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8907 accordingly.
8908
193eb6b7
PE
8909 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8910 Also, remove one static variable in the scanner.
8911
8912 * src/scan-gram.l (braces_level): Now auto, not static.
8913 Initialize to zero if the compiler is being picky.
8914 (INITIAL): Clear braces_level instead of incrementing it.
8915 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8916 as POSIX 1003.1-2001 requires.
8917 * src/system.h (IF_LINT): New macro, taken from coreutils.
8918 * configure.ac: Define "lint" if --enable-gcc-warnings.
8919
29c01725
AD
89202002-11-05 Akim Demaille <akim@epita.fr>
8921
8922 * src/scan-gram.l: When it starts with `%', complain about the
8923 whole directive, not just that `invalid character: %'.
8924
8aeac3ca
AD
89252002-11-04 Akim Demaille <akim@epita.fr>
8926
8927 * Makefile.maint: Update from Autoconf.
8928 (update, cvs-update, po-update, do-po-update): New.
8929
793a58bb
AD
89302002-11-04 Akim Demaille <akim@epita.fr>
8931
8932 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8933 and yyerror.
8934 Have yyerror `use' its arguments.
8935 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8936 returns true when location & yacc & pure & parse-param.
8937 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8938
c4d720cd
AD
89392002-11-04 Akim Demaille <akim@epita.fr>
8940
8941 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8942 clashes.
8943 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8944 font-lock-mode.
8945 Use complain_at.
8946 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8947 slot 0.
8948
613a0dc5
PE
89492002-11-03 Paul Eggert <eggert@twinsun.com>
8950
8951 * src/reader.c (get_merge_function, grammar_current_rule_check):
8952 Use consistent diagnostics for reporting type name clashes.
8953 Quote the types with <>, for consistency with Yacc.
8954 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8955
2a8d363a
AD
89562002-11-03 Akim Demaille <akim@epita.fr>
8957
8958 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8959 New.
8960 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8961 (b4_parse_param): Remove.
8962 Use b4_identification.
8963 Propagate b4_pure_args where needed to pass them to yyerror.
8964 * data/glr.m4 (b4_parse_param): Remove.
8965 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8966 (b4_lpure_formals): New.
8967 Use b4_identification.
8968 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8969 b4_user_formals and b4_user_args.
8970 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8971 (yyreportAmbiguity): When using a pure parser, also need
8972 the location, and the parse-params.
8973 Adjust callers.
8974 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8975 When using a pure parser, also need the parse-params.
8976 Adjust callers.
8977 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8978 (%pure-parser + %parse-param) LALR and GLR parsers.
8979 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8980 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8981 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8982 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8983 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8984 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8985 * doc/bison.texinfo: Untabify the whole file.
8986 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8987 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8988 (Error Reporting): Adjust to these new directives.
8989 Document %error-verbose, deprecate YYERROR_VERBOSE.
8990
9e32add8
AD
89912002-11-03 Akim Demaille <akim@epita.fr>
8992
8993 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8994 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8995 command line options.
8996 * tests/cxx-type.at: Formatting changes.
8997
b02d90a5
PE
89982002-11-03 Paul Eggert <eggert@twinsun.com>
8999
9000 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
9001 to count columns correctly, and to check for invalid inputs.
9e32add8 9002
b02d90a5
PE
9003 Use mbsnwidth to count columns correctly. Account for tabs, too.
9004 Include mbswidth.h.
9005 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
9006 (extend_location): New function.
9007 (YY_LINES): Remove.
9008
9009 Handle CRLF in C code rather than in Lex code.
9010 (YY_INPUT): New macro.
9011 (no_cr_read): New function.
9012
9013 Scan UCNs, even though we don't fully handle them yet.
9014 (convert_ucn_to_byte): New function.
9015
9016 Handle backslash-newline correctly in C code.
9017 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
9018 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
9019 all uses changed.
9020 (tag, splice): New EREs. Do not allow NUL or newline in tags.
9021 Use {splice} wherever C allows backslash-newline.
9022 YY_STEP after space, newline, vertical-tab.
9023 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 9024
b02d90a5
PE
9025 (letter, id): Don't assume ASCII; e.g., spell out a-z.
9026
9027 ({int}, handle_action_dollar, handle_action_at): Check for integer
9028 overflow.
9e32add8 9029
b02d90a5
PE
9030 (YY_STEP): Omit trailing semicolon, so that it's more like C.
9031
9032 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
9033 as well as \000. Check for UCHAR_MAX, not 255.
9034 Allow \x with an arbitrary positive number of digits, as in C.
9035 Check for overflow here.
9036 Allow \? and UCNs, for compatibility with C.
9037
9038 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
9039 with quote slot used by complain_at.
9040
9041 * tests/input.at: Add tests for backslash-newline, m4 quotes
9042 in symbols, long literals, and funny escapes in strings.
9043
9044 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
9045 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
9046 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
9047 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
9048 * m4/mbswidth.m4: New file, from GNU coreutils.
9049
9050 * doc/bison.texinfo (Grammar Outline): Document // comments.
9051 (Symbols): Document that trigraphs have no special meaning in Bison,
9052 nor is backslash-newline allowed.
9053 (Actions): Document that trigraphs have no special meaning.
9054
9055 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
9056 no longer used.
9057
90582002-11-02 Paul Eggert <eggert@twinsun.com>
9059
9060 * src/reader.c: Don't include quote.h; not needed.
9061 (get_merge_function): Reword warning to be consistent with
9062 type clash diagnostic in grammar_current_rule_check.
9063
9064 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
9065 bug in trigraph handling.
9066
9067 * src/output.c (prepare_symbols): When printing token names,
9068 escape "[" as "@<:@" and likewise for "]".
9069
9070 * src/system.h (errno): Remove declaration, as we are now
9071 assuming C89 or better, and C89 guarantees errno.
9072
762b212b
PE
90732002-10-30 Paul Eggert <eggert@twinsun.com>
9074
9075 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
9076 Check for close failures.
9077 * src/files.h (xfclose): Return void, not int, since it always
9078 returned zero.
9079 * src/files.c (xfclose): Likewise. Report I/O error if ferror
9080 indicates one.
9081 * src/output.c (output_skeleton): Use xfclose rather than fclose
9082 and ferror. xfclose now checks ferror.
9083
9084 * data/glr.c (YYLEFTMOST_STATE): Remove.
9085 (yyreportTree): Use a stack-based leftmost state. This avoids
9086 our continuing battles with bogus warnings about initializers.
9087
56100c60
AD
90882002-10-30 Akim Demaille <akim@epita.fr>
9089
9090 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
9091 #if.
9092
51b4a04c
PH
90932002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9094
9095 * tests/glr-regr1.at: New test for reported regressions.
9096 * tests/testsuite.at: Add glr-regr1.at test.
9097 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 9098
bf1ebda2
PE
90992002-10-24 Paul Eggert <eggert@twinsun.com>
9100
5c16c6b1
PE
9101 Version 1.75a.
9102
bf1ebda2
PE
9103 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
9104 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
9105 we use malloc. Don't assume 'A' through 'Z' are contiguous.
9106 Don't assume strdup exists; POSIX says its an XSI extension.
9107 Check for buffer overflow on input.
9108
b526ee61
AD
91092002-10-24 Akim Demaille <akim@epita.fr>
9110
9111 * src/output.c (output_skeleton): Don't disable M4sugar comments
9112 too soon: it results in comments being expanded.
9113 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
9114 first output.
9115
f1886bb2
AD
91162002-10-24 Akim Demaille <akim@epita.fr>
9117
9118 * data/yacc.c (m4_int_type): New.
9119 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
9120 char' as only yacc.c wants K&R portability.
9121 * data/glr.c (yysigned_char): Remove.
9122 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
9123 Reported by Quoc Peyrot.
9124
c5576256
PE
91252002-10-23 Paul Eggert <eggert@twinsun.com>
9126
9127 * src/main.c (main): With --trace=time, report times even if a
9128 non-fatal error occurs. Formerly, the times were reported in some
9129 such cases but not in others.
9130 * src/reader.c (reader): Just return if a complaint has been issued,
9131 instead of exiting, so that 'main' can report times.
9132
27b0ffea
AD
91332002-10-22 Akim Demaille <akim@epita.fr>
9134
9135 * src/system.h: Include sys/types.
9136 Reported by Bert Deknuydt.
9137
223a7883
PE
91382002-10-23 Paul Eggert <eggert@twinsun.com>
9139
9140 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
9141 Suggested by Art Haas.
9142
91432002-10-22 Paul Eggert <eggert@twinsun.com>
9144
9145 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
9146 decl; not needed any more.
9147 * src/main.c (main): Use return to exit, undoing yesterday's change.
9148 The last OS that we could find where this wouldn't work is
9149 SunOS 3.5, and that's too old to worry about now.
9150
9151 * data/glr.c (struct yyltype): Define members even when not
9152 doing locations. This is more consistent with yacc.c, and it
9153 works around the following bug reports:
161a71f3
PE
9154 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
9155 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 9156
223a7883
PE
9157 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
9158 @acronym consistently. Standardize on "Yacc" instead of "YACC",
9159 "Algol" instead of "ALGOL". Give a bit more history about BNF.
9160
8b76775a
AD
91612002-10-22 Akim Demaille <akim@epita.fr>
9162
9163 * data/README: New.
9164
6db10d14
PE
91652002-10-21 Paul Eggert <eggert@twinsun.com>
9166
9167 Be consistent about 'bool'; the old code used an enum in one
9168 module and an int in another, and this violates the C standard.
9169 * m4/stdbool.m4: New file, from coreutils 4.5.3.
9170 * configure.ac (AC_HEADER_STDBOOL): Add.
9171 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
9172 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
9173 * src/symtab.c (hash_compare_symbol_t): Likewise.
9174 * src/system.h (bool, false, true): Use a definition consistent
9175 with ../lib/hash.c. All uses changed.
9176
9177 * src/complain.c (warning_issued): Renamed from warn_message_count,
9178 so that we needn't worry about integer overflow (!).
9179 Now of type bool. All uses changed.
9180 (complaint_issued): Renamed from complain_message_count; likewise.
9181
9182 * src/main.c (main): Use exit to exit with failure.
27b0ffea 9183
6db10d14
PE
9184 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
9185 rather than 1 and 0.
9186 * src/main.c (main): Likewise.
9187 * src/getargs.c (getargs): Likewise.
9188 * src/reader.c (reader): Likewise.
9189
9190 * src/getarg.c (getargs): Remove duplicate code for
9191 "Try `bison --help'".
9192
9193 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
9194 What was that "2" for?
9195
9196 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
9197 * src/getargs.c (usage): Likewise.
9198
9199 * src/getargs.c (getargs): When there are too few operands, report
9200 the last one. When there are too many, report the first extra
9201 one. This is how diffutils does it.
9202
92a060fd
PE
92032002-10-20 Paul Eggert <eggert@twinsun.com>
9204
9205 Remove K&R vestiges.
9206 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
9207 * src/complain.c (VA_START): Remove. Assume prototypes.
9208 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
9209 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
9210 fatal): Assume prototypes.
9211 * src/complain.h: Assume prototypes.
9212 * src/system.h (PARAMS): Remove.
9213 Include <limits.h> unconditionally, since it's guaranteeed even
9214 for a freestanding C89 compiler.
9215 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
9216 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 9217
e7cb57c0
AD
92182002-10-20 Akim Demaille <akim@epita.fr>
9219
9220 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
9221 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
9222 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
9223 (yyresolveStates, yyresolveAction, yyresolveStack)
9224 (yyprocessOneStack): Use them.
9225 (yy_reduce_print): New.
9226 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
9227
0245f82d
AD
92282002-10-20 Akim Demaille <akim@epita.fr>
9229
9230 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
9231 arguments and output `void'.
9232 (b4_c_function): Rename as...
9233 (b4_c_function_def): this.
9234 (b4_c_function_decl, b4_c_ansi_function_def)
9235 (b4_c_ansi_function_decl): New.
9236 Change the interpretation of the arguments: before `int, foo', now
9237 `int foo, foo'.
9238 * data/yacc.c (yyparse): Prototype and define thanks to these.
9239 Adjust b4_c_function_def uses.
9240 * data/glr.c (yyparse): Likewise, but ANSI only.
9241
39912f52
AD
92422002-10-20 Akim Demaille <akim@epita.fr>
9243
9244 * src/output.c (prepare): Move the definition of `tokens_number',
9245 `nterms_number', `undef_token_number', `user_token_number_max'
9246 to...
9247 (prepare_tokens): Here.
9248 (prepare_tokens): Rename as...
9249 (prepare_symbols): this.
9250 (prepare): Move the definition of `rules_number' to...
9251 (prepare_rules): here.
9252 (prepare): Move the definition of `last', `final_state_number',
9253 `states_number' to...
9254 (prepare_states): here.
9255 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
9256
20c1e2ad
AD
92572002-10-20 Akim Demaille <akim@epita.fr>
9258
9259 * src/tables.h, src/tables.c, src/output.c: Comment changes.
9260
21964f43
AD
92612002-10-20 Akim Demaille <akim@epita.fr>
9262
9263 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
9264 * data/c.m4: here.
9265
66d30cd4
AD
92662002-10-20 Akim Demaille <akim@epita.fr>
9267
9268 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
9269 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
9270 `pair'.
9271 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
9272 `name' to...
9273 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
9274 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
9275 These.
9276
95f2c9fe
PE
92772002-10-19 Paul Eggert <eggert@twinsun.com>
9278
9279 Do not create a temporary file, as that involves security and
9280 cleanup headaches. Instead, use a pair of pipes.
9281 Derived from a suggestion by Florian Krohm.
9282 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
9283 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
9284 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
9285 (BISON_PREREQ_SUBPIPE): Add.
9286 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
9287 Add subpipe.h, subpipe.c.
9288 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
9289 * po/POTFILES.in: Add lib/subpipe.c.
9290 * src/output.c: Include "subpipe.h".
9291 (m4_invoke): Remove decl.
9292 (scan_skel): New decl.
9293 (output_skeleton): Use pipe rather than temporary file for m4 input.
9294 Check that m4sugar.m4 is readable, to avoid deadlock.
9295 Check for pipe I/O error.
9296 * src/scan-skel.l (readpipe): Remove decl.
9297 (scan_skel): New function, to be used in place of m4_invoke.
9298 Read from stream rather than file.
66d30cd4 9299
95f2c9fe
PE
9300 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
9301 float, as this generates a warning on Solaris 8 + GCC 3.2 with
9302 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
9303 this generates a more-accurate value anyway.
9304
9305 * lib/timevar.c (timervar_accumulate): Rename locals to
9306 avoid confusion with similarly-named more-global.
9307 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
9308
9309 * src/output.c (prepare): Use xstrdup to convert char const *
9310 to char *, to avoid GCC warning.
9311
c19988b7
AD
93122002-10-19 Akim Demaille <akim@epita.fr>
9313
9314 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
9315 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
9316 Use them to have `calc.y' ready for %pure-parser.
9317 * data/yacc.c (YYLEX): Pass a yylex return type to
9318 b4_c_function_call.
9319
ae7453f2
AD
93202002-10-19 Akim Demaille <akim@epita.fr>
9321
9322 Prototype support of %lex-param and %parse-param.
9323
9324 * src/parse-gram.y: Add the definition of the %lex-param and
9325 %parse-param tokens, plus their rules.
9326 Drop the `_' version of %glr-parser.
9327 Add the "," token.
9328 * src/scan-gram.l (INITIAL): Scan them.
9329 * src/muscle_tab.c: Comment changes.
9330 (muscle_insert, muscle_find): Rename `pair' as `probe'.
9331 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
9332 (muscle_entry_s): The `value' member is no longer const.
9333 Adjust all dependencies.
9334 * src/muscle_tab.c (muscle_init): Adjust: use
9335 MUSCLE_INSERT_STRING.
9336 Initialize the obstack earlier.
9337 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
9338 (muscle_pair_list_grow): New.
9339 * data/c.m4 (b4_c_function_call, b4_c_args): New.
9340 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
9341 * tests/calc.at: Use %locations, not --locations.
9342 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
9343
0e575721
AD
93442002-10-19 Akim Demaille <akim@epita.fr>
9345
9346 * src/getargs.c (usage): Take status as argument and exit
9347 accordingly.
9348 Report the traditional `Try ... --help' message when status != 0.
9349 (usage, version): Don't take a FILE * as arg, it is pointless.
9350 (getargs): When there is an incorrect number of arguments, make it
9351 an error, and report it GNUlically thanks to `usage ()'.
9352
724ce7f5
PE
93532002-10-18 Paul Eggert <eggert@twinsun.com>
9354
3a781eb2
PE
9355 * data/glr.c (yyreportParseError): Don't assume that sprintf
9356 yields the length of the printed string, as this is not true
9357 on SunOS 4.1.4. Reported by Peter Klein.
9358
724ce7f5
PE
9359 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
9360 * tests/conflicts.at (%nonassoc and eof): Likewise.
9361 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
9362
473d0a75
AD
93632002-10-17 Akim Demaille <akim@epita.fr>
9364
9365 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
9366 * src/getargs.c (trace_types, trace_args): Adjust.
9367 * src/reader.c (grammar_current_rule_prec_set)
9368 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
9369 Standardize error messages.
9370 And s/@prec/%prec/!
9371 (reader): Use trace_flag to enable scanner/parser debugging,
9372 instead of an adhoc scheme.
9373 * src/scan-gram.l: Remove trailing debugging code.
9374
e76d2469
PE
93752002-10-16 Paul Eggert <eggert@twinsun.com>
9376
93e2236a
PE
9377 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
9378 MUSCLE_TAB_H.
9379
e76d2469
PE
9380 * NEWS: Officially drop support for building Bison with K&R C,
9381 since it didn't work anyway and it's not worth worrying about.
9382 * Makefile.maint (wget_files): Remove ansi2knr.c.
9383 (ansi2knr.c-url_prefix): Remove.
9384 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
9385 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9386 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9387
5bd1c419
PE
93882002-10-15 Paul Eggert <eggert@twinsun.com>
9389
9390 Stop using the "enum_" trick for K&R-style function definitions;
9391 it confused me, and I was the author! Instead, assume that people
9392 who want to use K&R C compilers (when using these modules in GCC,
9393 perhaps?) will run ansi2knr.
9394
9395 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
9396 All uses of "enum_" changed to "enum ".
9397 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9398 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 9399
5bd1c419
PE
9400 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
9401 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
9402 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
9403 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
9404 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
9405 abitset_not, abitset_ones, abitset_or, abitset_or_and,
9406 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
9407 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
9408 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
9409 Use function prototypes; this removes the need for declaring
9410 static functions simply to provide their prototypes.
9411 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
9412 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
9413 bitset_count_, bitset_create, bitset_dump, bitset_first,
9414 bitset_free, bitset_init, bitset_last, bitset_next,
9415 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
9416 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
9417 bitset_print, bitset_release_memory, bitset_toggle_,
9418 bitset_type_choose, bitset_type_get, bitset_type_name_get,
9419 debug_bitset): Likewise.
9420 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
9421 * lib/bitset_stats.c (bitset_log_histogram_print,
9422 bitset_percent_histogram_print, bitset_stats_and,
9423 bitset_stats_and_cmp, bitset_stats_and_or,
9424 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
9425 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
9426 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
9427 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
9428 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
9429 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
9430 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
9431 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
9432 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
9433 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
9434 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
9435 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
9436 bitset_stats_zero): Likewise.
9437 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9438 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9439 bitsetv_dump, debug_bitsetv): Likewise.
9440 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
9441 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
9442 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
9443 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
9444 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
9445 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
9446 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
9447 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
9448 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
9449 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
9450 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
9451 Likewise.
9452 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
9453 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
9454 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
9455 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
9456 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
9457 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
9458 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
9459 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
9460 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
9461 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
9462 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 9463
ae26e1f0
AD
94642002-10-14 Akim Demaille <akim@epita.fr>
9465
9466 Version 1.75.
9467
d43baf71
AD
94682002-10-14 Akim Demaille <akim@epita.fr>
9469
9470 * tests/Makefile.am (maintainer-check-posix): New.
9471
7ebc83e3
AD
94722002-10-14 Akim Demaille <akim@epita.fr>
9473
9474 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
9475 member.
9476
05846dae
AD
94772002-10-14 Akim Demaille <akim@epita.fr>
9478
9479 * src/tables.c (table_ninf_remap): base -> tab.
9480 Reported by Matt Rosing.
9481
1318e37d
PE
94822002-10-14 Paul Eggert <eggert@twinsun.com>
9483
447fbb17
PE
9484 * tests/action.at, tests/calc.at, tests/conflicts.at,
9485 tests/cxx-type.at, tests/headers.at, tests/input.at,
9486 tests/regression.at, tests/synclines.at, tests/torture.at:
9487 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
9488 so that the tests still work even if POSIXLY_CORRECT is set.
9489 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 9490
1318e37d
PE
9491 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
9492 for portability to K&R hosts. Fix typo: signed char is guaranteed
9493 only to 127, not to 128.
9494 * data/glr.c (yysigned_char): New type.
9495 * data/yacc.c (yysigned_char): Likewise.
9496 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
9497
cc0f0794
PE
94982002-10-13 Paul Eggert <eggert@twinsun.com>
9499
5038f418
PE
9500 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
9501 true due to limited range of data type" warning from GCC.
9502
cc0f0794
PE
9503 * data/c.m4 (b4_token_defines): Protect against double-inclusion
9504 by wrapping enum yytokentype's definition inside #ifndef
9505 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
9506
6fed0802
AD
95072002-10-13 Akim Demaille <akim@epita.fr>
9508
9509 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
9510 Un yy- yyrhs to avoid the name clash with the global YYRHS.
9511
32f0598d
AD
95122002-10-13 Akim Demaille <akim@epita.fr>
9513
9514 * Makefile.maint: Update from Autoconf 2.54.
9515 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
9516
7ea9a33f
AD
95172002-10-13 Akim Demaille <akim@epita.fr>
9518
9519 * src/print.c (print_state): Separate the list of solved conflicts
9520 from the other items.
9521 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
9522
ea99527d
AD
95232002-10-13 Akim Demaille <akim@epita.fr>
9524
9525 Let nondeterministic skeletons be usable with deterministic
9526 tables.
9527
9528 With the patch, GAWK compiled by GCC without -O2 passes its test
9529 suite using a GLR parser driven by LALR tables. It fails with -O2
9530 because `struct stat' gives two different answers on my machine:
9531 88 (definition of an auto var) and later 96 (memset on this var).
9532 Hence the stack is badly corrumpted. The headers inclusion is to
9533 blame: if I move the awk.h inclusion before GLR's system header
9534 inclusion, the two struct stat have the same size.
9535
9536 * src/tables.c (pack_table): Always create conflict_table.
9537 (token_actions): Always create conflict_list.
9538 * data/glr.c (YYFLAG): Remove, unused.
9539
f377f69f
AD
95402002-10-13 Akim Demaille <akim@epita.fr>
9541
9542 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
9543 (O0FLAGS): New.
9544 (VALGRIND, GXX): New.
9545 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
9546 * tests/bison.in: Run $PREBISON a pre-command.
9547 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9548 (maintainer-check-g++): New.
9549 * Makefile.am (maintainer-check): New.
9550
2a1fe6ed
AD
95512002-10-13 Akim Demaille <akim@epita.fr>
9552
9553 * data/glr.c: Formatting changes.
9554 Tweak some trace messages to match yacc.c's.
9555
f50adbbd
AD
95562002-10-13 Akim Demaille <akim@epita.fr>
9557
9558 GLR parsers sometimes raise parse errors instead of performing the
9559 default reduction.
9560 Reported by Charles-Henry de Boysson.
9561
9562 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 9563 check the length of the traces when %glr.
f50adbbd
AD
9564 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
9565 GLR's traces.
9566 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
9567 Test GLR parsers.
9568 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
9569 (yyltype): Remove the yy prefix from the member names.
9570 (yytable): Complete its comment.
9571 (yygetLRActions): Map error action number from YYTABLE from
9572 YYTABLE_NINF to 0.
9573 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
9574 (which was a bug: it should have been YYTABEL_NINF, and yet it was
9575 not satisfying as we could compare an YYACTION computed from
9576 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
9577 only value for error actions.
9578 (yyreportParseError): In verbose parse error messages, don't issue
9579 `error' in the list of expected tokens.
9580 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
9581 next action to perform to match glr.c's decoding.
9582 (yytable): Complete its comment.
9583
bcbad5b9
PE
95842002-10-13 Paul Eggert <eggert@twinsun.com>
9585
9586 Fix problem reported by Henrik Grubbstroem in
161a71f3 9587 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
9588 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9589 because the Bison parser reads the second action before reducing
9590 the first one.
9591 * src/scan-gram.l (rule_length): New static var.
9592 Use it to keep track of the rule length in the scanner, since
9593 we can't expect the parser to be in lock-step sync with the scanner.
9594 (handle_action_dollar, handle_action_at): Use this var.
9595 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 9596
14904b89
PE
95972002-10-12 Paul Eggert <eggert@twinsun.com>
9598
1fe611e5
PE
9599 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9600 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9601 Include <sys/time.h> when checking for clock_t and struct tms.
9602 Use same include order as source.
9603 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 9604 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 9605
1fe611e5
PE
9606 * lib/timevar.c: Update copyright date and clarify comments.
9607 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 9608
1fe611e5
PE
9609 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9610 GCC version as of today, then merge Bison's changes.
9611 Change "GCC" to "Bison" in copyright notice. timevar.def's
9612 author is Akim, so change that too.
9613
98194095
PE
9614 * src/reader.c (grammar_current_rule_check):
9615 Don't worry about the default action if $$ is untyped.
9616 Prevents bogus warnings reported by Jim Gifford in
161a71f3 9617 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 9618
14904b89
PE
9619 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9620 * data/glr.c, data/lalr1.cc, data/yacc.c:
9621 Output token definitions before the first part of user declarations.
9622 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 9623 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 9624
ff6dca18
PE
96252002-10-11 Paul Eggert <eggert@twinsun.com>
9626
9627 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9628 (yyparse): here. This undoes some of the 2002-07-25 change.
9629 Compatibility problem reported by Ralf S. Engelschall with
9630 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9631
eb714592
AD
96322002-10-11 Akim Demaille <akim@epita.fr>
9633
9634 * tests/regression.at Characters Escapes): New.
9635 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9636 characters.
9637 Reported by Jan Nieuwenhuizen.
9638
b7195100
AD
96392002-10-11 Akim Demaille <akim@epita.fr>
9640
9641 * po/id.po: New.
9642
f28a0f2d
PE
96432002-10-10 Paul Eggert <eggert@twinsun.com>
9644
9645 Portability fixes for bitsets; this also avoids several GCC
9646 warnings.
9647
9648 * lib/abitset.c: Include <stddef.h>, for offsetof.
9649 * lib/lbitset.c: Likewise.
9650
9651 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9652 properly for vectors of objects. Do not assume that adding a
9653 header size to a multiple of a word size yields a value that is
9654 properly aligned for the whole union.
9655 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9656
9657 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9658 unique names for structures.
9659 * lib/ebitset.c (ebitset_bytes): Likewise.
9660 * lib/lbitset.c (lbitset_bytes): Likewise.
9661
9662 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9663 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9664 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9665 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9666 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9667 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9668 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9669 to improve the type-checking that GCC can do.
9670 * lib/bitset.c (bitset_op4_cmp): Likewise.
9671 * lib/bitset_stats.c (bitset_stats_count,
9672 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9673 bitset_stats_copy, bitset_stats_disjoint_p,
9674 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9675 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9676 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9677 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9678 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9679 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9680 bitset_stats_or_and_cmp): Likewise.
9681 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9682 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9683 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9684 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9685
9686 * lib/abitset.h: Include bitset.h, not bbitset.h.
9687 * lib/ebitset.h: Likewise.
9688 * lib/lbitset.h: Likewise.
9689
9690 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9691 All instances of parameters of type enum bitset_opts are now of
9692 type enum_bitset_opts, to conform to the C Standard, and similarly
9693 for enum_bitset_type.
9694 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9695 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9696
9697 Do not use "struct bitset_struct" to mean different things in
9698 different modules. Not only is this confusing, it violates
9699 the C Standard, which requires that structure types in different
9700 modules must be compatible if one is to be passed to the other.
9701 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9702 All instances of "struct bitset_struct *" replaced with "bitset".
9703 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9704 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9705 struct lbitset_struct, struct bitset_stats_struct): New types.
9706 All uses of struct bitset_struct changed to union bitset_union,
9707 etc.
ba0fe3c7 9708 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
9709 struct bitset_struct): Remove.
9710 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9711 struct bitset_struct): Remove.
9712 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9713 bitset_struct): Remove.
9714 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9715 Likewise.
9716
9717 Do not call a function of type T using a call that assumes the
9718 function is of a different type U. Standard C requires that a
9719 function must be called with a type that is compatible with its
9720 definition.
9721 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9722 New decls.
9723 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9724 New functions.
9725 * lib/ebitset.c (PFV): Remove.
9726 * lib/lbitset.c (PFV): Likewise.
9727 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9728 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9729 decls.
9730 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9731 (ebitset_vtable): Use them.
9732 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9733 lbitset_xor): New functions.
9734 (lbitset_vtable): Use them.
9735
9736 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9737 Declare.
9738
9739 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9740 GCC warning.
9741 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9742 Use offsetof, for simplicity.
9743
6fbe4984
PE
97442002-10-06 Paul Eggert <eggert@twinsun.com>
9745
9746 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9747 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 9748 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
9749 which was inadvertently undone by the 2002-09-30 patch.
9750 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9751 the same width as int.
9752
420f93c8
PE
97532002-10-04 Paul Eggert <eggert@twinsun.com>
9754
9755 Version 1.50.
9756
9757 * configure.ac (AC_INIT), NEWS: Increment version number.
9758
9759 * doc/bison.texinfo: Minor spelling, grammar, and white space
9760 fixes.
9761 (Symbols): Mention that any negative value returned from yylex
9762 signifies end-of-input. Warn about negative chars. Mention
9763 the portable Standard C character set.
9764
9765 The GNU coding standard says CFLAGS and YFLAGS are reserved
9766 for the installer to set.
9767 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9768 * src/Makefile.am (AM_CFLAGS): Likewise.
9769 (AM_YFLAGS): Renamed from YFLAGS.
9770
9771 Fix some MAX and MIN problems.
9772 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9773 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9774 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9775 * src/reader.c (reader): Use it.
9776
9777 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9778 POSIX 1003.1-2001 has removed fgrep.
9779
97802002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9781
9782 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9783 interpreted as signed.
9784 * lib/ebitset.c (ebitset_list): Fix bug.
9785
ff68026d
PE
97862002-10-01 Paul Eggert <eggert@twinsun.com>
9787
9788 More fixes for 64-bit hosts and large bitsets.
9789
9790 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9791 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9792 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9793 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9794 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9795 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9796 bitset_count_): Likewise.
9797 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9798 bitset_first, bitset_last): Likewise.
9799 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9800 bitset_stats_list_reverse, bitset_stats_size,
9801 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9802 Likewise.
9803 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9804 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9805 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9806 bitsetv_reflexive_transitive_closure): Likewise.
9807 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9808 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9809 Likewise.
9810 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9811 Likewise.
420f93c8 9812
ff68026d
PE
9813 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9814 Use size_t, not unsigned int, to count bytes.
9815 * lib/abitset.h (abitset_bytes): Likewise.
9816 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9817 Likewise.
9818 * lib/bitset.h (bitset_bytes): Likewise.
9819 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9820 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9821 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9822 * lib/ebitset.c (ebitset_bytes): Likewise.
9823 * lib/ebitset.h (ebitset_bytes): Likewise.
9824 * lib/lbitset.c (lbitset_bytes): Likewise.
9825 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 9826
ff68026d
PE
9827 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9828 abitset_subset_p, abitset_disjoint_p, abitset_and,
9829 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9830 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9831 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9832 abitset_or_and, abitset_or_and_cmp):
9833 Use bitset_windex instead of unsigned int.
9834 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9835 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9836 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9837 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9838 Likewise.
9839 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 9840
ff68026d
PE
9841 * lib/bitset.c (bitset_print):
9842 Use proper printf formats for widths of integer types.
9843 * lib/bitset_stats.c (bitset_percent_histogram_print,
9844 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9845 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9846 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9847 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 9848
ff68026d
PE
9849 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9850 BITSET_SIZE_MAX): New macros.
9851 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9852 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9853 to BITSET_WINDEX_MAX.
9854
9855 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9856 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9857 since we now return the bitset_bindex type (not int).
9858
9859 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9860 when computing sizes.
9861 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9862
9863 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9864 and avoid cast to unsigned.
9865
6aa452a6
AD
98662002-09-30 Akim Demaille <akim@epita.fr>
9867
9868 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9869 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9870 Updates from Michael Hayes.
9871
927f7817
AD
98722002-09-30 Art Haas <ahaas@neosoft.com>
9873
9874 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9875 invocations.
9876 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9877 defined.
9878
9738f41e
AD
98792002-09-27 Akim Demaille <akim@epita.fr>
9880
9881 Version 1.49c.
9882
a5c75d7f
AD
98832002-09-27 Akim Demaille <akim@epita.fr>
9884
9885 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9886 (Because of AC_LIBSOURCE).
9887
8280e179
AD
98882002-09-27 Akim Demaille <akim@epita.fr>
9889
9890 Playing with Autoscan.
9891
9892 * configure.ac: Remove the old LIBOBJ tweaks.
9893 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9894 * lib/strrchr.c: New.
9895 * lib/strtol.c: New, from the Coreutils 4.5.1.
9896
ae64af35
AD
98972002-09-27 Akim Demaille <akim@epita.fr>
9898
9899 Playing with Autoscan.
9900
9901 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9902 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9903 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9904 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9905 Coreutils 4.5.1.
9906
d1a1114f
AD
99072002-09-24 Akim Demaille <akim@epita.fr>
9908
9909 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9910 (Frequently Asked Questions, Parser Stack Overflow): New.
9911
b906441c
AD
99122002-09-13 Akim Demaille <akim@epita.fr>
9913
9914 Playing with autoscan.
9915
9916 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9917 * src/files.c (skeleton_find): Remove, unused.
9918 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9919 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9920
bd701811
AD
99212002-09-13 Akim Demaille <akim@epita.fr>
9922
9923 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9924 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9925
e0a13e7b
AD
99262002-09-13 Akim Demaille <akim@epita.fr>
9927
9928 * configure.ac: Require 2.54.
9929 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9930 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9931 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9932 Remove, provided by Autoconf macros.
9933
c97011bf
AD
99342002-09-12 Akim Demaille <akim@epita.fr>
9935
9936 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9937
d862b1be
AD
99382002-09-12 Akim Demaille <akim@epita.fr>
9939
9940 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9941 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9942 Reported by Martin Mokrejs.
9943
3d38c03a
AD
99442002-09-10 Akim Demaille <akim@epita.fr>
9945
9946 * src/parse-gram.y: Associate a human readable string to each
9947 token type.
9948 * tests/regression.at (Invalid inputs): Adjust.
9949
b6347355
AD
99502002-09-10 Gary V. Vaughan <gary@gnu.org>
9951
9952 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9953 with an Autoconf-2.5x style configure.ac.
9954
09ba4ab2
PE
99552002-09-06 Paul Eggert <eggert@twinsun.com>
9956
9957 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9958 exception applies only to yacc.c. This is a modification of a
9959 patch originally suggested by Akim Demaille.
9960
21846f69
AD
99612002-09-06 Akim Demaille <akim@epita.fr>
9962
09ba4ab2
PE
9963 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9964 here to...
9965 * data/yacc.c: here.
9966
21846f69
AD
9967 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9968 LocationType.
9969 (b4_ltype): Default to yy::Location from location.hh.
9970
c0ad8bf3
AD
99712002-09-04 Jim Meyering <jim@meyering.net>
9972
9973 * data/yacc.c: Guard the declaration of yytoknum also with
9974 `#ifdef YYPRINT', so it is declared only when used.
9975
3a93251e
AD
99762002-09-04 Akim Demaille <akim@epita.fr>
9977
9978 * configure.in: Rename as...
9979 * configure.ac: this.
9980 Bump to 1.49c.
9981
427c0dda
AD
99822002-09-04 Akim Demaille <akim@epita.fr>
9983
9984 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9985 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9986 translate maintainer only messages.
9987
6a254321
PE
99882002-08-12 Paul Eggert <eggert@twinsun.com>
9989
645e30d1
PE
9990 Version 1.49b.
9991
6a254321
PE
9992 * Makefile.am (SUBDIRS): Remove intl.
9993 (DISTCLEANFILES): Remove.
9994 * NEWS: Mention that GNU M4 is now required. Clarify what is
9995 meant by "larger grammars". Mention the pt_BR translation.
9996 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9997 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9998 Bump version from 0.11.2 to 0.11.5.
9999 (BISON_PREREQ_STAGE): Remove.
10000 (AM_GNU_GETTEXT): Use external gettext.
10001 (AC_OUTPUT): Remove intl/Makefile.
10002
10003 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
10004
10005 * data/glr.c: Include string.h, for strlen.
10006 (yyreportParseError): Use size_t for yysize.
10007 (yy_yypstack): No longer nested inside yypstates, as nested
10008 functions are not portable. Do not assume size_t is the
10009 same width as int.
10010 (yypstates): Do not assume that ptrdiff_t is the same width
10011 as int, and similarly for yyposn and YYINDEX.
10012
10013 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
10014
10015 * lib/Makefile.am (INCLUDES): Do not include from the intl
10016 directory, which has been removed.
10017 * src/Makefile.am (INCLUDES): Likewise.
10018
10019 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
10020 (bitsets_sources, additional_bitsets_sources, timevars_sources):
10021 New vars.
10022
10023 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
10024 * tests/Makefile.am (EXTRA_DIST): Likewise.
10025
10026 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
10027 Do not assume that bitset_windex is the same width as unsigned.
10028
10029 * lib/abitset.c (abitset_unused_clear): Do not assume that
10030 bitset_word is the same width as int.
10031 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
10032 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
10033 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
10034 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
10035 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
10036
10037 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
10038 portability to one's complement hosts!).
10039 * lib/ebitset.c (ebitset_op1): Likewise.
10040 * lib/lbitset.c (lbitset_op1): Likewise.
10041
10042 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
10043 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10044 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
10045 Sync with fileutils.
10046 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
10047 lib/gettext.h: Sync with diffutils.
10048
10049 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
10050 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
10051
10052 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
10053 PROTOTYPES to check for prototypes, and "defined __STDC__" to
10054 check for void *.
10055
10056 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
10057 size_t; the old version tried to do this but casted improperly.
10058 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
10059 (bitset_test): Now returns int, not unsigned long.
10060
10061 * lib/bitset_stats.c: Include "gettext.h".
10062 (_): New macro.
10063 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
10064 name locals "index", as it generates unnecessary warnings on some
10065 hosts that have an "index" function.
10066
10067 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
10068 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
10069 they need translation.
10070 * src/LR0.c (state_list_append, new_itemsets, get_state,
10071 append_states, generate_states): Likewise.
10072 * src/assoc.c (assoc_to_string): Likewise.
10073 * src/closure.c (print_closure, set_firsts, closure): Likewise.
10074 * src/gram.c (grammar_dump): Likewise.
10075 * src/injections.c (injections_compute): Likewise.
10076 * src/lalr.c (lookaheads_print): Likewise.
10077 * src/relation.c (relation_transpose): Likewise.
10078 * src/scan-gram.l: Likewise.
10079 * src/tables.c (table_grow, pack_vector): Likewise.
10080
10081 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
10082 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
10083 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
10084 * m4/mbstate_t.m4: Sync with fileutils.
10085 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
10086
10087 * po/LINGUAS: Add pt_BR.
10088 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
10089 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
10090 lib/timevar.c.
10091 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
10092 manual recommends.
10093 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
10094
10095 * src/complain.c (strerror_r): Remove decl; not needed.
10096 (strerror): Use same pattern as ../lib/error.c.
10097
10098 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
10099
10100 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
10101
10102 * src/main.c (main): Cast result of bindtextdomain and textdomain
10103 to void, to avoid a GCC warning when --disable-nls is in effect.
10104
10105 * src/scan-gram.l: Use strings rather than escapes when possible,
10106 to minimize the number of warnings from xgettext.
10107 (handle_action_dollar, handle_action_at): Don't use isdigit,
10108 as it mishandles negative chars and it may not work as expected
10109 outside the C locale.
10110
10111 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
10112 this is a GCC extension and is not portable to other compilers.
10113
10114 * src/system.h (alloca): Use same pattern as ../lib/error.c.
10115 Do not include <ctype.h>; no longer needed.
10116 Do not include <malloc.h>; no longer needed (and generates
10117 warnings on OpenBSD 3.0).
10118
10119 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
10120 it's not portable.
10121
10122 * tests/regression.at: Do not use 'cc -c input.c -o input';
10123 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
10124
10125 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
10126 exit status as failure, not just exit status 1. Sun C exits
10127 with status 2 sometimes.
10128
10129 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
10130 Use it for the two large tests.
10131
c8f002c7
AD
101322002-08-02 Akim Demaille <akim@epita.fr>
10133
10134 * src/conflicts.c (conflicts_output): Don't output rules never
10135 reduced here, since anyway that computation doesn't work.
10136 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
10137 (rule_useless_p, rule_never_reduced_p): New.
10138 (grammar_rules_partial_print): Use a filter instead of a range.
10139 Display the title only if needed.
10140 (grammar_rules_print): Adjust.
10141 (grammar_rules_never_reduced_report): New.
10142 * src/tables.c (action_row): Move the computation of rules never
10143 reduced to...
10144 (token_actions): here.
10145 * src/main.c (main): Make the parser before making the report, so
10146 that rules never reduced are computed.
10147 Call grammar_rules_never_reduced_report.
10148 * src/print.c (print_results): Report rules never reduced.
10149 * tests/conflicts.at, tests/reduce.at: Adjust.
10150
cd08e51e
AD
101512002-08-01 Akim Demaille <akim@epita.fr>
10152
10153 Instead of attaching lookaheads and duplicating the rules being
10154 reduced by a state, attach the lookaheads to the reductions.
10155
10156 * src/state.h (state_t): Remove the `lookaheads',
10157 `lookaheads_rule' member.
10158 (reductions_t): Add a `lookaheads' member.
10159 Use a regular array for the `rules'.
10160 * src/state.c (reductions_new): Initialize the lookaheads member
10161 to 0.
10162 (state_rule_lookaheads_print): Adjust.
10163 * src/state.h, src/state.c (state_reductions_find): New.
10164 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
10165 (count_rr_conflicts): Adjust.
10166 * src/lalr.c (LArule): Remove.
10167 (add_lookback_edge): Adjust.
10168 (state_lookaheads_count): New.
10169 (states_lookaheads_initialize): Merge into...
10170 (initialize_LA): this.
10171 (lalr_free): Adjust.
10172 * src/main.c (main): Don't free nullable and derives too early: it
10173 is used by --verbose.
10174 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
10175
bb0027a9
AD
101762002-08-01 Akim Demaille <akim@epita.fr>
10177
10178 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
10179 `rule_number_t**'.
10180 (set_derives, free_derives): Rename as...
10181 (derives_compute, derives_free): this.
10182 Adjust all dependencies.
10183 * src/nullable.c (set_nullable, free_nullable): Rename as...
10184 (nullable_compute, nullable_free): these.
10185 (rule_list_t): Store rule_t *, not rule_number_t.
10186 * src/state.c (state_rule_lookaheads_print): Directly compare rule
10187 pointers, instead of their numbers.
10188 * src/main.c (main): Call nullable_free, and derives_free earlier,
10189 as they were lo longer used.
10190
3325ddc4
AD
101912002-08-01 Akim Demaille <akim@epita.fr>
10192
10193 * lib/timevar.c (get_time): Include children time.
10194 * src/lalr.h (LA, LArule): Don't export them: used with the
10195 state_t.
10196 * src/lalr.c (LA, LArule): Static.
10197 * src/lalr.h, src/lalr.c (lalr_free): New.
10198 * src/main.c (main): Call it.
10199 * src/tables.c (pack_vector): Check whether loc is >= to the
10200 table_size, not >.
10201 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
10202 (tables_generate): do it, since that's also it which allocates
10203 them.
10204 Don't free LA and LArule, main does.
10205
c6f1a33c
AD
102062002-07-31 Akim Demaille <akim@epita.fr>
10207
10208 Separate parser tables computation and output.
10209
10210 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
10211 (conflict_list, conflict_list_cnt, table, check, table_ninf)
10212 (yydefgoto, yydefact, high): Move to...
10213 * src/tables.h, src/tables.c: here.
10214 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10215 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10216 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
10217 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
10218 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
10219 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
10220 (action_row, save_row, token_actions, save_column, default_goto)
10221 (goto_actions, sort_actions, matching_state, pack_vector)
10222 (table_ninf_remap, pack_table, prepare_actions): Move to...
10223 * src/tables.c: here.
10224 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
10225 * src/output.c (token_actions, output_base, output_conflicts)
10226 (output_check): Merge into...
10227 (prepare_actions): this.
10228 (actions_output): Rename as...
10229 (user_actions_output): this.
10230 * src/main.c (main): Call tables_generate and tables_free.
10231
1509d42f
AD
102322002-07-31 Akim Demaille <akim@epita.fr>
10233
10234 Steal GCC's --time-report support.
10235
10236 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
10237 stolen/adjusted from GCC.
10238 * m4/stage.m4: Remove time related checks.
10239 * m4/timevar.m4: New.
10240 * configure.in: Adjust.
10241 * src/system.h: Adjust to using timevar.h.
10242 * src/getargs.h, src/getargs.c: Support trace_time for
10243 --trace=time.
10244 * src/main.c (stage): Remove.
10245 (main): Replace `stage' invocations with timevar calls.
10246 * src/output.c: Insert pertinent timevar calls.
10247
273a74fa
AD
102482002-07-31 Akim Demaille <akim@epita.fr>
10249
10250 Let --trace have arguments.
10251
10252 * src/getargs.h (enum trace_e): New.
10253 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
10254 (long_options, short_options): --trace/-T takes an optional
10255 argument.
10256 Change all the uses of trace_flag to reflect the new flags.
10257 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
10258
10259 Strengthen `stage' portability.
10260
10261 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
10262 * configure.in: Use it.
10263 Don't check for malloc.h and sys/times.h.
10264 * src/system.h: Include them when appropriate.
10265 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
10266 times and struct tms are available.
10267
217598da
AD
102682002-07-30 Akim Demaille <akim@epita.fr>
10269
10270 In verbose parse error message, don't report `error' as an
10271 expected token.
10272 * tests/actions.at (Printers and Destructors): Adjust.
10273 * tests/calc.at (Calculator $1): Adjust.
10274 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
10275 error message, do not report the parser accepts the error token in
10276 that state.
10277
52489d44
AD
102782002-07-30 Akim Demaille <akim@epita.fr>
10279
10280 Normalize conflict related messages.
10281
10282 * src/complain.h, src/complain.c (warn, complain): New.
10283 * src/conflicts.c (conflicts_print): Use them.
10284 (conflict_report_yacc): New, extracted from...
10285 (conflicts_print): here.
10286 * tests/conflicts.at, tests/existing.at: Adjust.
10287
e8832397
AD
102882002-07-30 Akim Demaille <akim@epita.fr>
10289
10290 Report rules which are never reduced by the parser: those hidden
10291 by conflicts.
10292
10293 * src/LR0.c (save_reductions): Don't make the final state too
10294 different: save its reduction (accept) instead of having a state
10295 without any action (no shift or goto, no reduce).
10296 Note: the final state is now a ``regular'' state, i.e., the
10297 parsers now contain `reduce 0' as default reduction.
10298 Nevertheless, since they decide to `accept' when yystate =
10299 final_state, they still will not reduce rule 0.
10300 * src/print.c (print_actions, print_reduction): Adjust.
10301 * src/output.c (action_row): Track reduced rules.
10302 (token_actions): Report rules never reduced.
10303 * tests/conflicts.at, tests/regression.at: Adjust.
10304
caf23d24
AD
103052002-07-30 Akim Demaille <akim@epita.fr>
10306
10307 `stage' was accidently included in a previous patch.
10308 Initiate its autoconfiscation.
10309
10310 * configure.in: Look for malloc.h and sys/times.h.
10311 * src/main.c (stage): Adjust.
10312 Report only when trace_flag.
10313
640748ee
AD
103142002-07-29 Akim Demaille <akim@epita.fr>
10315
10316 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
10317 state_number_t.
10318 (errs_t): symbol_t*, not symbol_number_t.
10319 (reductions_t): rule_t*, not rule_number_t.
10320 (FOR_EACH_SHIFT): New.
10321 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
10322 * src/print.c, src/print_graph.c: Adjust.
10323
88bce5a2
AD
103242002-07-29 Akim Demaille <akim@epita.fr>
10325
10326 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
10327
10328 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
10329 (endtoken, accept): these.
10330 * src/reader.c (reader): Set endtoken's default tag to "$end".
10331 Set undeftoken's tag to "$undefined" instead of "$undefined.".
10332 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
10333 Adjust.
10334
1bfb97db
AD
103352002-07-29 Akim Demaille <akim@epita.fr>
10336
10337 * src/reduce.c (reduce_grammar): When the language is empty,
10338 complain about the start symbol, not the axiom.
10339 Use its location.
10340 * tests/reduce.at (Empty Language): New.
10341
fc5734fe
AD
103422002-07-26 Akim Demaille <akim@epita.fr>
10343
10344 * src/reader.h, src/reader.c (gram_error): ... can't get
10345 yycontrol without making too strong assumptions on the parser
10346 itself.
10347 * src/output.c (prepare_tokens): Use the real 0th value of
10348 token_translations instead of `0'.
10349 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
10350 visible here.
10351 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
10352 for the time being: %locations ought to provide it to yyerror.
10353
3650b4b8
AD
103542002-07-25 Akim Demaille <akim@epita.fr>
10355
10356 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
10357 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
10358 * tests/regression.at (Web2c Actions): Adjust.
10359
4b3d3a8e
AD
103602002-07-25 Akim Demaille <akim@epita.fr>
10361
10362 Stop storing rules from 1 to nrules + 1.
10363
10364 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
10365 * src/nullable.c, src/output.c, src/print.c, src/reader.c
10366 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
10367 Iterate from 0 to nrules.
10368 Use rule_number_as_item_number and item_number_as_rule_number.
10369 Adjust to `derive' now containing possibly 0.
10370 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
10371 Handle the `- 1' part in rule numbers from/to item numbers.
10372 * src/conflicts.c (log_resolution): Fix the message which reversed
10373 shift and reduce.
10374 * src/output.c (action_row): Initialize default_rule to -1.
10375 (token_actions): Adjust.
10376 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
10377 expected output.
10378 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
10379
4a2a22f4
AD
103802002-07-25 Akim Demaille <akim@epita.fr>
10381
10382 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
10383 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
10384 (b4_c_knr_arg_decl): New.
10385 * data/yacc.c: Use it to define yysymprint, yydestruct, and
10386 yyreport_parse_error.
10387
b8df3223
AD
103882002-07-25 Akim Demaille <akim@epita.fr>
10389
10390 * data/yacc.c (yyreport_parse_error): New, extracted from...
10391 (yyparse): here.
10392 (yydestruct, yysymprint): Move above yyparse.
10393 Be K&R compliant.
10394
a762e609
AD
103952002-07-25 Akim Demaille <akim@epita.fr>
10396
10397 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
10398 replace...
10399 (b4_sint_type, b4_uint_type): these.
10400 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
10401 * tests/regression.at (Web2c Actions): Adjust.
10402
12b0043a
AD
104032002-07-25 Akim Demaille <akim@epita.fr>
10404
10405 * src/gram.h (TIEM_NUMBER_MAX): New.
10406 (item_number_of_rule_number, rule_number_of_item_number): Rename
10407 as...
10408 (rule_number_as_item_number, item_number_as_rule_number): these.
10409 Adjust dependencies.
10410 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10411 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10412 (symbol_number_to_vector_number): New.
10413 (order): Of vector_number_t* type.
10414 (base_t, BASE_MAX, BASE_MIN): New.
10415 (froms, tos, width, pos, check): Of base_t type.
10416 (action_number_t, ACTION_MIN, ACTION_MAX): New.
10417 (actrow): Of action_number_t type.
10418 (conflrow): Of unsigned int type.
10419 (table_ninf, base_ninf): New.
10420 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
10421 (muscle_insert_int_table, muscle_insert_base_table)
10422 (muscle_insert_rule_number_table): New.
10423 (prepare_tokens): Output `toknum' as int_table.
10424 (action_row): Returns a rule_number_t.
10425 Use ACTION_MIN, not SHRT_MIN.
10426 (token_actions): yydefact is rule_number_t*.
10427 (table_ninf_remap): New.
10428 (pack_table): Use it for `base' and `table'.
10429 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
10430 replaced with...
10431 (YYPACT_NINF, YYTABLE_NINF): these.
10432 (yypact, yytable): Compute their types instead of hard-coded
10433 `short'.
10434 * tests/regression.at (Web2c Actions): Adjust.
10435
5dde258a
AD
104362002-07-19 Akim Demaille <akim@epita.fr>
10437
10438 * src/scan-gram.l (id): Can start with an underscore.
10439
a945ec39
AD
104402002-07-16 Akim Demaille <akim@epita.fr>
10441
10442 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
10443 Adjust all former `associativity' dependencies.
10444 * src/symtab.c (symbol_new): Default associativity is `undef', not
10445 `right'.
10446 (symbol_check_alias_consistence): Adjust.
10447
fae437e8
AD
104482002-07-09 Akim Demaille <akim@epita.fr>
10449
10450 * doc/bison.texinfo: Properly set the ``header'' part.
10451 Use @dircategory ``GNU programming tools'' as per Texinfo's
10452 documentation.
10453 Use @copying.
10454
1a715ef2
AD
104552002-07-09 Akim Demaille <akim@epita.fr>
10456
10457 * lib/quotearg.h: Protect against multiple inclusions.
10458 * src/location.h (location_t): Add a `file' member.
10459 (LOCATION_RESET, LOCATION_PRINT): Adjust.
10460 * src/complain.c (warn_at, complain_at, fatal_at): Drop
10461 `error_one_per_line' support.
10462
a5d50994
AD
104632002-07-09 Akim Demaille <akim@epita.fr>
10464
10465 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
10466 * src/reader.c (lineno): Remove.
10467 Adjust all dependencies.
10468 (get_merge_function): Take a location and use complain_at.
10469 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
10470 * tests/regression.at (Invalid inputs, Mixing %token styles):
10471 Adjust.
10472
b275314e
AD
104732002-07-09 Akim Demaille <akim@epita.fr>
10474
10475 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
10476 recovery rule, and forbid extensions when --yacc.
10477 (gram_error): Use complain_at.
10478 * src/reader.c (reader): Exit if there were parse errors.
10479
865b9df1
AD
104802002-07-09 Akim Demaille <akim@epita.fr>
10481
10482 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
10483 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
10484 Reported by R Blake <blakers@mac.com>.
10485
c76e14da
AD
104862002-07-09 Akim Demaille <akim@epita.fr>
10487
10488 * data/yacc.c: Output the copyright notive in the header.
10489
7db2ed2d
AD
104902002-07-03 Akim Demaille <akim@epita.fr>
10491
10492 * src/output.c (froms, tos): Are state_number_t.
10493 (save_column): sp, sp1, and sp2 are state_number_t.
10494 (prepare): Rename `final' as `final_state_number', `nnts' as
10495 `nterms_number', `nrules' as `rules_number', `nstates' as
10496 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
10497 unused.
10498 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
10499 * data/lalr1.cc (nsym_): Remove, unused.
10500
e68e0410
AD
105012002-07-03 Akim Demaille <akim@epita.fr>
10502
10503 * src/lalr.h, src/lalr.c (goto_number_t): New.
10504 * src/lalr.c (goto_list_t): New.
10505 Propagate them.
10506 * src/nullable.c (rule_list_t): New.
10507 Propagate.
10508 * src/types.h: Remove.
10509
e1a4f3a4
AD
105102002-07-03 Akim Demaille <akim@epita.fr>
10511
10512 * src/closure.c (print_fderives): Use rule_rhs_print.
10513 * src/derives.c (print_derives): Use rule_rhs_print.
10514 (rule_list_t): New, replaces `shorts'.
10515 (set_derives): Add comments.
10516 * tests/sets.at (Nullable, Firsts): Adjust.
10517
536545f3
AD
105182002-07-03 Akim Demaille <akim@epita.fr>
10519
10520 * src/output.c (prepare_actions): Free `tally' and `width'.
10521 (prepare_actions): Allocate and free `order'.
10522 * src/symtab.c (symbols_free): Free `symbols'.
10523 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
10524 * src/output.c (m4_invoke): Move to...
10525 * src/scan-skel.l: here.
10526 (<<EOF>>): Close yyout, and free its name.
10527
8b752b00
AD
105282002-07-03 Akim Demaille <akim@epita.fr>
10529
10530 Fix some memory leaks, and fix a bug: state 0 was examined twice.
10531
10532 * src/LR0.c (new_state): Merge into...
10533 (state_list_append): this.
10534 (new_states): Merge into...
10535 (generate_states): here.
10536 (set_states): Don't ensure a proper `errs' state member here, do it...
10537 * src/conflicts.c (conflicts_solve): here.
10538 * src/state.h, src/state.c: Comment changes.
10539 (state_t): Rename member `shifts' as `transitions'.
10540 Adjust all dependencies.
10541 (errs_new): For consistency, also take the values as argument.
10542 (errs_dup): Remove.
10543 (state_errs_set): New.
10544 (state_reductions_set, state_transitions_set): Assert that no
10545 previous value was assigned.
10546 (state_free): New.
10547 (states_free): Use it.
10548 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
10549 temporary storage: use `errs' and `nerrs' as elsewhere.
10550 (set_conflicts): Allocate and free this `errs'.
10551
613f5e1a
AD
105522002-07-02 Akim Demaille <akim@epita.fr>
10553
10554 * lib/libiberty.h: New.
10555 * lib: Update the bitset implementation from upstream.
10556 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
10557 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
10558 * src/main.c: Adjust bitset stats calls.
10559
26e0cadc
PE
105602002-07-01 Paul Eggert <eggert@twinsun.com>
10561
10562 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
10563 char, so that negative chars don't collide with $.
10564
1154cced
AD
105652002-06-30 Akim Demaille <akim@epita.fr>
10566
10567 Have the GLR tests be `warning' checked, and fix the warnings.
10568
10569 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
10570 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
10571 (yyremoveDeletes): `yyi' and `yyj' are size_t.
10572 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
10573 (yyaddDeferredAction): static.
10574 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
10575 (yyreportParseError): yyprefix is const.
10576 yytokenp is used only when verbose.
10577 (yy__GNUC__): Replace with __GNUC__.
10578 (yypdumpstack): yyi is size_t.
10579 (yypreference): Un-yy local variables and arguments, to avoid
10580 clashes with `yyr1'. Anyway, we are not in the user name space.
10581 (yytname_size): be an int, as is compared with ints.
10582 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
10583 Use them.
10584 * tests/cxx-gram.at: Use quotation to protect $1.
10585 Use AT_COMPILE to enable warnings hunts.
10586 Prototype yylex and yyerror.
10587 `Use' argc.
10588 Include `string.h', not `strings.h'.
10589 Produce and prototype stmtMerge only when used.
10590 yylex takes a location.
10591
97650f4e
AD
105922002-06-30 Akim Demaille <akim@epita.fr>
10593
10594 We spend a lot of time in quotearg, in particular when --verbose.
10595
10596 * src/symtab.c (symbol_get): Store a quoted version of the key.
10597 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10598 Adjust all callers.
10599
d2576365
AD
106002002-06-30 Akim Demaille <akim@epita.fr>
10601
10602 * src/state.h (reductions_t): Rename member `nreds' as num.
10603 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10604 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10605
ccaf65bc
AD
106062002-06-30 Akim Demaille <akim@epita.fr>
10607
10608 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10609 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10610 (shifts_to): Rename as...
10611 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10612 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10613 (TRANSITION_IS_DISABLED, transitions_to): these.
10614
87675353
AD
106152002-06-30 Akim Demaille <akim@epita.fr>
10616
10617 * src/print.c (print_shifts, print_gotos): Merge into...
10618 (print_transitions): this.
10619 (print_transitions, print_errs, print_reductions): Align the
10620 lookaheads columns.
10621 (print_core, print_transitions, print_errs, print_state,
10622 print_grammar): Output empty lines separator before, not after.
10623 (state_default_rule_compute): Rename as...
10624 (state_default_rule): this.
10625 * tests/conflicts.at (Defaulted Conflicted Reduction),
10626 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10627 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10628
ce4ccb4b
AD
106292002-06-30 Akim Demaille <akim@epita.fr>
10630
10631 Display items as we display rules.
10632
10633 * src/gram.h, src/gram.c (rule_lhs_print): New.
10634 * src/gram.c (grammar_rules_partial_print): Use it.
10635 * src/print.c (print_core): Likewise.
10636 * tests/conflicts.at (Defaulted Conflicted Reduction),
10637 (Unresolved SR Conflicts): Adjust.
10638 (Unresolved SR Conflicts): Adjust and rename as...
10639 (Resolved SR Conflicts): this, as was meant.
10640 * tests/regression.at (Web2c Report): Adjust.
10641
bc933ef1
AD
106422002-06-30 Akim Demaille <akim@epita.fr>
10643
10644 * src/print.c (state_default_rule_compute): New, extracted from...
10645 (print_reductions): here.
10646 Pessimize, but clarify the code.
10647 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10648
53d4308d
AD
106492002-06-30 Akim Demaille <akim@epita.fr>
10650
10651 * src/output.c (action_row): Let default_rule be always a rule
10652 number.
10653
574fb2d5
AD
106542002-06-30 Akim Demaille <akim@epita.fr>
10655
10656 * src/closure.c (print_firsts, print_fderives, closure):
10657 Use BITSET_EXECUTE.
10658 * src/lalr.c (lookaheads_print): Likewise.
10659 * src/state.c (state_rule_lookaheads_print): Likewise.
10660 * src/print_graph.c (print_core): Likewise.
10661 * src/print.c (print_reductions): Likewise.
10662 * src/output.c (action_row): Likewise.
10663 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10664
05811fd7
AD
106652002-06-30 Akim Demaille <akim@epita.fr>
10666
10667 * src/print_graph.c: Use report_flag.
10668
0e4d5753
AD
106692002-06-30 Akim Demaille <akim@epita.fr>
10670
10671 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10672 to...
10673 * src/relation.h, src/relation.c (traverse, relation_digraph)
10674 (relation_print, relation_transpose): New.
10675
24c7d800
AD
106762002-06-30 Akim Demaille <akim@epita.fr>
10677
10678 * src/state.h, src/state.c (shifts_to): New.
10679 * src/lalr.c (build_relations): Use it.
10680
9222837b
AD
106812002-06-30 Akim Demaille <akim@epita.fr>
10682
10683 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10684 (item_number_of_rule_number, rule_number_of_item_number): New.
10685 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10686 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10687 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10688 Propagate their use.
10689 Much remains to be done, in particular wrt `shorts' from types.h.
10690
260008e5
AD
106912002-06-30 Akim Demaille <akim@epita.fr>
10692
10693 * src/symtab.c (symbol_new): Initialize the `printer' member.
10694
8a731ca8
AD
106952002-06-30 Akim Demaille <akim@epita.fr>
10696
10697 * src/LR0.c (save_reductions): Remove, replaced by...
10698 * src/state.h, src/state.c (state_reductions_set): New.
10699 (reductions, errs): Rename as...
10700 (reductions_t, errs_t): these.
10701 Adjust all dependencies.
10702
32e1e0a4
AD
107032002-06-30 Akim Demaille <akim@epita.fr>
10704
10705 * src/LR0.c (state_list_t, state_list_append): New.
10706 (first_state, last_state): Now symbol_list_t.
10707 (this_state): Remove.
10708 (new_itemsets, append_states, save_reductions): Take a state_t as
10709 argument.
10710 (set_states, generate_states): Adjust.
10711 (save_shifts): Remove, replaced by...
10712 * src/state.h, src/state.c (state_shifts_set): New.
10713 (shifts): Rename as...
10714 (shifts_t): this.
10715 Adjust all dependencies.
10716 * src/state.h (state_t): Remove the `next' member.
10717
e5fb6710
AD
107182002-06-30 Akim Demaille <akim@epita.fr>
10719
10720 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10721 escaped in slot 0.
10722
c7ca99d4
AD
107232002-06-30 Akim Demaille <akim@epita.fr>
10724
10725 Use hash.h for the state hash table.
10726
10727 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10728 (allocate_storage): Use state_hash_new.
10729 (free_storage): Use state_hash_free.
10730 (new_state, get_state): Adjust.
10731 * src/lalr.h, src/lalr.c (states): Move to...
10732 * src/states.h (state_t): Remove the `link' member, no longer
10733 used.
10734 * src/states.h, src/states.c: here.
10735 (state_hash_new, state_hash_free, state_hash_lookup)
10736 (state_hash_insert, states_free): New.
10737 * src/states.c (state_table, state_compare, state_hash): New.
10738 * src/output.c (output_actions): Do not free states now, since we
10739 still need to know the final_state number in `prepare', called
10740 afterwards. Do it...
10741 * src/main.c (main): here: call states_free after `output'.
10742
df0e7316
AD
107432002-06-30 Akim Demaille <akim@epita.fr>
10744
10745 * src/state.h, src/state.c (state_new): New, extracted from...
10746 * src/LR0.c (new_state): here.
10747 * src/state.h (STATE_ALLOC): Move to...
10748 * src/state.c: here.
10749 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10750 * src/state.h, src/state.c: here.
10751
39f41916
AD
107522002-06-30 Akim Demaille <akim@epita.fr>
10753
10754 * src/reader.c (gensym): Rename as...
10755 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10756 (getsym): Rename as...
10757 (symbol_get): this.
10758
d57650a5
AD
107592002-06-30 Akim Demaille <akim@epita.fr>
10760
10761 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10762 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10763 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10764 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10765
5a08f1ce
AD
107662002-06-30 Akim Demaille <akim@epita.fr>
10767
10768 Make the test suite pass with warnings checked.
10769
10770 * tests/actions.at (Printers and Destructors): Improve.
10771 Avoid unsigned vs. signed issues.
10772 * tests/calc.at: Don't exercise the scanner here, do it...
10773 * tests/input.at (Torturing the Scanner): here.
10774
720623af
PH
107752002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10776
88e7e941 10777 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
10778 reorganize first lines parallel to yacc.c.
10779
fb8135fa
AD
107802002-06-28 Akim Demaille <akim@epita.fr>
10781
10782 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10783 (b4_token_enum, b4_token_defines): New, factored from...
10784 * data/lalr1.cc, data/yacc.c, glr.c: here.
10785
41442480
AD
107862002-06-28 Akim Demaille <akim@epita.fr>
10787
10788 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10789 unused variables.
10790 * src/output.c (merger_output): static.
10791
e0e5bf84
AD
107922002-06-28 Akim Demaille <akim@epita.fr>
10793
ba0fe3c7 10794 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
10795 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10796 pacify GCC.
10797 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 10798
676385e2
PH
107992002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10800
10801 Accumulated changelog for new GLR parsing features.
10802
6a254321 10803 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
10804 conflicts_total_count.
10805 * src/conflicts.h: Ditto.
10806 * src/output.c (token_actions): Use the new name.
10807 (output_conflicts): Change conflp => conflict_list_heads, and
10808 confl => conflict_list for better readability.
10809 * data/glr.c: Use the new names.
10810 * NEWS: Add self to GLR announcement.
e0e5bf84 10811
676385e2
PH
10812 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10813
10814 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10815 Akim Demaille.
10816
10817 * data/bison.glr: Change name to glr.c
10818 * data/glr.c: Renamed from bison.glr.
10819 * data/Makefile.am: Add glr.c
e0e5bf84
AD
10820
10821 * src/getargs.c:
10822
676385e2 10823 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 10824 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 10825
676385e2
PH
10826 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10827
10828 * data/bison.glr: Be sure to restore the
10829 current #line when returning to the skeleton contents after having
10830 exposed the input file's #line.
10831
10832 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10833
10834 * data/bison.glr: Bring up to date with changes to bison.simple.
10835
10836 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10837
10838 * data/bison.glr: Correct definitions that use b4_prefix.
10839 Various reformatting.
10840 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10841 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10842 yytokenp argument; now part of stack.
10843 (yychar): Define to behave as documented.
10844 (yyclearin): Ditto.
e0e5bf84 10845
676385e2
PH
10846 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10847
10848 * src/reader.h: Add declaration for free_merger_functions.
10849
10850 * src/reader.c (merge_functions): New variable.
10851 (get_merge_function): New function.
10852 (free_merger_functions): New function.
10853 (readgram): Check for %prec that is not followed by a symbol.
10854 Handle %dprec and %merge declarations.
10855 (packgram): Initialize dprec and merger fields in rules array.
10856
10857 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10858 conflict_list_cnt, conflict_list_free): New variables.
10859 (table_grow): Also grow conflict_table.
e0e5bf84 10860 (prepare_rules): Output dprec and merger tables.
676385e2 10861 (conflict_row): New function.
e0e5bf84 10862 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
10863 default reduction in conflicted states for GLR parser so that there
10864 are spaces for the conflict lists.
10865 (save_row): Also save conflict information.
10866 (token_actions): Allocate conflict list.
10867 (merger_output): New function.
10868 (pack_vector): Pack conflict table, too.
10869 (output_conflicts): New function to output yyconflp and yyconfl.
10870 (output_check): Allocate conflict_tos.
10871 (output_actions): Output conflict tables, also.
10872 (output_skeleton): Output b4_mergers definition.
10873 (prepare): Output b4_max_rhs_length definition.
10874 Use 'bison.glr' as default skeleton for GLR parsers.
10875
10876 * src/gram.c (glr_parser): New flag.
10877 (grammar_free): Call free_merger_functions.
10878
10879 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10880 all pairs of conflicting reductions, rather than just all tokens
10881 causing conflicts. Needed to size conflict tables.
e0e5bf84 10882 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
10883 interface.
10884 (conflicts_print): Ditto.
10885 (count_total_conflicts): New function.
10886
10887 * src/reader.h (merger_list): New type.
10888 (merge_functions): New variable.
10889
10890 * src/lex.h (tok_dprec, tok_merge): New token types.
10891
10892 * src/gram.h (rule_s): Add dprec and merger fields.
10893 (glr_parser): New flag.
10894
10895 * src/conflicts.h (count_total_conflicts): New function.
10896
10897 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10898
10899 * doc/bison.texinfo (Generalized LR Parsing): New section.
10900 (GLR Parsers): New section.
10901 (Language and Grammar): Mention GLR parsing.
10902 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10903 Correct typo ("tge" -> "the").
10904
10905 * data/bison.glr: New skeleton for GLR parsing.
10906
10907 * tests/cxx-gram.at: New tests for GLR parsing.
10908
10909 * tests/testsuite.at: Include cxx-gram.at.
10910
10911 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 10912
676385e2
PH
10913 * src/parse-gram.y:
10914
10915 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10916
10917 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 10918
b5480d74 109192002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
10920
10921 * src/options.h, src/options.c: Remove.
10922 * src/getargs.c (short_options, long_options): New.
10923
60491a94
AD
109242002-06-27 Akim Demaille <akim@epita.fr>
10925
10926 * data/bison.simple, data/bison.c++: Rename as...
10927 * data/yacc.c, data/lalr1.cc: these.
10928 * doc/bison.texinfo (Environment Variables): Remove.
10929
9be0c25b
AD
109302002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10931
10932 * src/getargs.c (report_argmatch): Initialize strtok().
10933
1ae72863
AD
109342002-06-20 Akim Demaille <akim@epita.fr>
10935
10936 * data/bison.simple (b4_symbol_actions): New, replaces...
10937 (b4_symbol_destructor, b4_symbol_printer): these.
10938 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10939 user token numbers.
10940
87542d29
AD
109412002-06-20 Akim Demaille <akim@epita.fr>
10942
10943 * data/bison.simple (yydestructor): Rename as...
10944 (yydestruct): this.
10945
1a31ed21
AD
109462002-06-20 Akim Demaille <akim@epita.fr>
10947
10948 * src/symtab.h, src/symtab.c (symbol_type_set)
10949 (symbol_destructor_set, symbol_precedence_set): The location is
10950 the last argument.
10951 Adjust all callers.
10952
e776192e
AD
109532002-06-20 Akim Demaille <akim@epita.fr>
10954
10955 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10956 internals.
10957 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10958 Takes a location.
10959 * src/symtab.h, src/symtab.c (symbol_class_set)
10960 (symbol_user_token_number_set): Likewise.
10961 Adjust all callers.
10962 Promote complain_at.
10963 * tests/input.at (Type Clashes): Adjust.
10964
5c1180b3
AD
109652002-06-20 Akim Demaille <akim@epita.fr>
10966
10967 * data/bison.simple (YYLEX): Fix the declaration when
10968 %pure-parser.
10969
e3170060
AD
109702002-06-20 Akim Demaille <akim@epita.fr>
10971
10972 * data/bison.simple (yysymprint): Don't print the token number,
10973 just its name.
10974 * tests/actions.at (Destructors): Rename as...
10975 (Printers and Destructors): this.
10976 Also exercise %printer.
10977
253862fd
AD
109782002-06-20 Akim Demaille <akim@epita.fr>
10979
10980 * data/bison.simple (YYDSYMPRINT): New.
10981 Use it to remove many of the #if YYDEBUG/if (yydebug).
10982
366eea36
AD
109832002-06-20 Akim Demaille <akim@epita.fr>
10984
10985 * src/symtab.h, src/symtab.c (symbol_t): printer and
10986 printer_location are new members.
10987 (symbol_printer_set): New.
10988 * src/parse-gram.y (PERCENT_PRINTER): New token.
10989 Handle its associated rule.
10990 * src/scan-gram.l: Adjust.
10991 (handle_destructor_at, handle_destructor_dollar): Rename as...
10992 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10993 * src/output.c (symbol_printers_output): New.
10994 (output_skeleton): Call it.
10995 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10996 since there are already many grammar files with a user `yyprint'.
10997 Replace the calls to YYPRINT to calls to yysymprint.
10998 * tests/calc.at: Adjust.
10999 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
11000 taking advantage of parser very internal details (stack size!).
11001
4f25ebb0
AD
110022002-06-20 Akim Demaille <akim@epita.fr>
11003
11004 * src/scan-gram.l: Complete the scanner with the missing patterns
11005 to pacify Flex.
11006 Use `quote' and `symbol_tag_get' where appropriate.
11007
93b68a0e
AD
110082002-06-19 Akim Demaille <akim@epita.fr>
11009
11010 * tests/actions.at (Destructors): Augment to test locations.
11011 * data/bison.simple (yydestructor): Pass it the current location
11012 if locations are enabled.
11013 Prototype only when __STDC__ or C++.
11014 Change the argument names to move into the yy name space: there is
11015 user code here.
11016
58612f1d
AD
110172002-06-19 Akim Demaille <akim@epita.fr>
11018
74310291
AD
11019 * data/bison.simple (b4_pure_if): New.
11020 Use it instead of #ifdef YYPURE.
11021
110222002-06-19 Akim Demaille <akim@epita.fr>
11023
11024 * data/bison.simple (b4_location_if): New.
58612f1d
AD
11025 Use it instead of #ifdef YYLSP_NEEDED.
11026
f25bfb75
AD
110272002-06-19 Akim Demaille <akim@epita.fr>
11028
11029 Prepare @$ in %destructor, but currently don't bind it in the
11030 skeleton, as %location use is not cleaned up yet.
11031
11032 * src/scan-gram.l (handle_dollar, handle_destructor_at)
11033 (handle_action_at): New.
11034 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
11035 a braced_code_t and a location as additional arguments.
11036 (handle_destructor_dollar): Instead of requiring `b4_eval', just
11037 unquote one when outputting `b4_dollar_dollar'.
11038 Adjust callers.
11039 * data/bison.simple (b4_eval): Remove.
11040 (b4_symbol_destructor): Adjust.
11041 * tests/input.at (Invalid @n): Adjust.
11042
c732d2c6
AD
110432002-06-19 Zack Weinberg <zack@codesourcery.com>
11044
11045 * doc/bison.texinfo: Document ability to have multiple
11046 prologue sections.
11047
8c165d89
AD
110482002-06-18 Akim Demaille <akim@epita.fr>
11049
11050 * src/files.c (compute_base_names): When computing the output file
11051 names from the input file name, strip the directory part.
11052
ca98bf57
AD
110532002-06-18 Akim Demaille <akim@epita.fr>
11054
11055 * data/bison.simple.new: Comment changes.
11056 Reported by Andreas Schwab.
11057
0bfb02ff
AD
110582002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
11059
11060 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
11061 there are no `label `yyoverflowlab' defined but not used' warnings
11062 when yyoverflow is defined.
11063
24c0aad7
AD
110642002-06-18 Akim Demaille <akim@epita.fr>
11065
11066 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
11067 new member.
11068 (symbol_destructor_set): Adjust.
11069 * src/output.c (symbol_destructors_output): Output the destructor
11070 locations.
11071 Output the symbol name.
11072 * data/bison.simple (b4_symbol_destructor): Adjust.
11073
5719c109
AD
110742002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
11075 and Akim Demaille <akim@epita.fr>
11076
11077 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
11078 what's left on the stack when the error recovery hits EOF.
11079 * tests/actions.at (Destructors): Complete to exercise this case.
11080
9280d3ef
AD
110812002-06-17 Akim Demaille <akim@epita.fr>
11082
11083 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
11084 arguments is really empty, not only equal to `[]'.
11085 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
11086 member.
11087 (symbol_destructor_set): New.
11088 * src/output.c (symbol_destructors_output): New.
11089 * src/reader.h (brace_code_t, current_braced_code): New.
11090 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
11091 (handle_dollar): Rename as...
11092 (handle_action_dollar): this.
11093 (handle_destructor_dollar): New.
11094 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
11095 (grammar_declaration): Use it.
11096 * data/bison.simple (yystos): Is always defined.
11097 (yydestructor): New.
11098 * tests/actions.at (Destructors): New.
11099 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
11100
dafdc66f
AD
111012002-06-17 Akim Demaille <akim@epita.fr>
11102
11103 * src/symlist.h, src/symlist.c (symbol_list_length): New.
11104 * src/scan-gram.l (handle_dollar, handle_at): Compute the
11105 rule_length only when needed.
11106 * src/output.c (actions_output, token_definitions_output): Output
11107 the full M4 block.
11108 * src/symtab.c: Don't access directly to the symbol tag, use
11109 symbol_tag_get.
11110 * src/parse-gram.y: Use symbol_list_free.
11111
56c47203
AD
111122002-06-17 Akim Demaille <akim@epita.fr>
11113
11114 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
11115 (symbol_list_prepend, get_type_name): Move to...
11116 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
11117 (symbol_list_prepend, symbol_list_n_type_name_get): here.
11118 Adjust all callers.
11119 (symbol_list_free): New.
11120 * src/scan-gram.l (handle_dollar): Takes a location.
11121 * tests/input.at (Invalid $n): Adjust.
11122
1e0bab92
AD
111232002-06-17 Akim Demaille <akim@epita.fr>
11124
11125 * src/reader.h, src/reader.c (symbol_list_new): Export it.
11126 (symbol_list_prepend): New.
11127 * src/parse-gram.y (%union): `list' is a new member.
11128 (symbols.1): New, replaces...
11129 (terms_to_prec.1, nterms_to_type.1): these.
11130 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
11131 Take a location as additional argument.
11132 Adjust all callers.
11133
04e60654
AD
111342002-06-15 Akim Demaille <akim@epita.fr>
11135
11136 * src/parse-gram.y: Move %token in the declaration section so that
11137 we don't depend upon CVS Bison.
11138
10e5b8bd
AD
111392002-06-15 Akim Demaille <akim@epita.fr>
11140
11141 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
11142 * src/print.c (print_core): Use it.
11143
9801d40c
AD
111442002-06-15 Akim Demaille <akim@epita.fr>
11145
11146 * src/conflicts.c (log_resolution): Accept the rule involved in
11147 the sr conflicts instead of the lookahead number that points to
11148 that rule.
11149 (flush_reduce): Accept the current lookahead vector as argument,
11150 instead of the index in LA.
11151 (resolve_sr_conflict): Accept the current number of lookahead
11152 bitset to consider for the STATE, instead of the index in LA.
11153 (set_conflicts): Adjust.
11154 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
11155
c0263492
AD
111562002-06-15 Akim Demaille <akim@epita.fr>
11157
11158 * src/state.h (state_t): Replace the `lookaheadsp' member, a
11159 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
11160 Adjust all dependencies.
11161 * src/lalr.c (initialize_lookaheads): Split into...
11162 (states_lookaheads_count, states_lookaheads_initialize): these.
11163 (lalr): Adjust.
11164
9757c359
AD
111652002-06-15 Akim Demaille <akim@epita.fr>
11166
11167 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
11168 out of...
11169 (grammar_rules_print): here.
11170 * src/reduce.c (reduce_output): Use it.
11171 * tests/reduce.at (Useless Rules, Reduced Automaton)
11172 (Underivable Rules): Adjust.
11173
6b98e4b5
AD
111742002-06-15 Akim Demaille <akim@epita.fr>
11175
11176 Copy BYacc's nice way to report the grammar.
11177
11178 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
11179 New.
11180 Don't print the rules' location, it is confusing and useless.
11181 (rule_print): Use grammar_rhs_print.
11182 * src/print.c (print_grammar): Use grammar_rules_print.
11183
6b98e4b5
AD
111842002-06-15 Akim Demaille <akim@epita.fr>
11185
11186 Complete and rationalize `useless thing' warnings.
11187
11188 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
11189 (symbol_tag_print): New.
11190 Use them everywhere in place of accessing directly the tag member.
11191 * src/gram.h, src/gram.c (rule_print): New.
11192 Use it where a rule used to be printed `by hand'.
11193 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
11194 (reduce_grammar_tables): Report the useless rules.
11195 (reduce_print): Useless things are a warning, not an error.
11196 Report it as such.
11197 * tests/reduce.at (Useless Nonterminals, Useless Rules):
11198 (Reduced Automaton, Underivable Rules): Adjust.
11199 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
11200 * tests/conflicts.at (Unresolved SR Conflicts)
11201 (Solved SR Conflicts): Adjust.
11202
ee000ba4
AD
112032002-06-15 Akim Demaille <akim@epita.fr>
11204
11205 Let symbols have a location.
11206
11207 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
11208 (getsym): Adjust.
11209 Adjust all callers.
11210 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
11211 Use location_t, not int.
11212 * src/symtab.c (symbol_check_defined): Take advantage of the
11213 location.
11214 * tests/regression.at (Invalid inputs): Adjust.
11215
8efe435c
AD
112162002-06-15 Akim Demaille <akim@epita.fr>
11217
11218 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
11219 (input): Don't try to initialize yylloc here, do it in the
11220 scanner.
11221 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
11222 * src/gram.h (rule_t): Change line and action_line into location
11223 and action_location, of location_t type.
11224 Adjust all dependencies.
11225 * src/location.h, src/location.c (empty_location): New.
11226 * src/reader.h, src/reader.c (grammar_start_symbol_set)
11227 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
11228 (grammar_current_rule_symbol_append)
11229 (grammar_current_rule_action_append): Expect a location as argument.
11230 * src/reader.c (grammar_midrule_action): Adjust to attach an
11231 action's location as dummy symbol location.
11232 * src/symtab.h, src/symtab.c (startsymbol_location): New.
11233 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
11234 the line numbers.
11235
1921f1d7
AD
112362002-06-14 Akim Demaille <akim@epita.fr>
11237
11238 Grammar declarations may be found in the grammar section.
11239
11240 * src/parse-gram.y (rules_or_grammar_declaration): New.
11241 (declarations): Each declaration may end with a semicolon, not
11242 just...
11243 (grammar_declaration): `"%union"'.
11244 (grammar): Branch to rules_or_grammar_declaration.
11245
4515534c
AD
112462002-06-14 Akim Demaille <akim@epita.fr>
11247
11248 * src/main.c (main): Invoke scanner_free.
11249
f958596b
AD
112502002-06-14 Akim Demaille <akim@epita.fr>
11251
11252 * src/output.c (m4_invoke): Extracted from...
11253 (output_skeleton): here.
11254 Free tempfile.
11255
2c569025
AD
112562002-06-14 Akim Demaille <akim@epita.fr>
11257
11258 * src/parse-gram.y (directives, directive, gram)
11259 (grammar_directives, precedence_directives, precedence_directive):
11260 Rename as...
11261 (declarations, declaration, grammar, grammar_declaration)
11262 (precedence_declaration, precedence_declarator): these.
11263 (symbol_declaration): New.
11264
592e8d4d
AD
112652002-06-14 Akim Demaille <akim@epita.fr>
11266
11267 * src/files.c (action_obstack): Remove, unused.
11268 (output_obstack): Remove it, and all its dependencies, as it is no
11269 longer needed.
11270 * src/reader.c (epilogue_set): Build the epilogue in the
11271 muscle_obstack.
11272 * src/output.h, src/output.c (muscle_obstack): Move to...
11273 * src/muscle_tab.h, src/muscle_tab.h: here.
11274 (muscle_init): Initialize muscle_obstack.
11275 (muscle_free): New.
11276 * src/main.c (main): Call it.
11277
0c15323d
AD
112782002-06-14 Akim Demaille <akim@epita.fr>
11279
11280 * src/location.h: New, extracted from...
11281 * src/reader.h: here.
11282 * src/Makefile.am (noinst_HEADERS): Merge into
11283 (bison_SOURCES): this.
11284 Add location.h.
11285 * src/parse-gram.y: Use location_t instead of Bison's.
11286 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
11287 Use location_t instead of ints.
11288
e96c9728
AD
112892002-06-14 Akim Demaille <akim@epita.fr>
11290
11291 * data/bison.simple, data/bison.c++: Be sure to restore the
11292 current #line when returning to the skeleton contents after having
11293 exposed the input file's #line.
11294
75d1fe16
AD
112952002-06-12 Akim Demaille <akim@epita.fr>
11296
11297 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
11298 eager.
11299 * tests/actions.at (Exotic Dollars): New.
11300
6c35d22c
AD
113012002-06-12 Akim Demaille <akim@epita.fr>
11302
11303 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
11304 ['"/] too eagerly.
11305 * tests/input.at (Torturing the Scanner): New.
11306
1d6412ad
AD
113072002-06-11 Akim Demaille <akim@epita.fr>
11308
11309 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
11310 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
11311 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
11312 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
11313 * src/reader.c (reader): Use it.
11314
4cdb01db
AD
113152002-06-11 Akim Demaille <akim@epita.fr>
11316
11317 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
11318 Adjust all callers.
11319 (scanner_last_string_free): New.
11320
44995b2e
AD
113212002-06-11 Akim Demaille <akim@epita.fr>
11322
11323 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
11324 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
11325 (last_string, YY_OBS_FREE): New.
11326 Use them when returning an ID.
11327
e9955c83
AD
113282002-06-11 Akim Demaille <akim@epita.fr>
11329
11330 Have Bison grammars parsed by a Bison grammar.
11331
11332 * src/reader.c, src/reader.h (prologue_augment): New.
11333 * src/reader.c (copy_definition): Remove.
11334
11335 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
11336 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
11337 (grammar_current_rule_prec_set, grammar_current_rule_check)
11338 (grammar_current_rule_symbol_append)
11339 (grammar_current_rule_action_append): Export.
11340 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
11341 (symbol_list_action_append): Remove.
11342 Hook the routines from reader.
11343 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
11344 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
11345
11346 * src/reader.c (read_declarations): Remove, unused.
11347
11348 * src/parse-gram.y: Handle the epilogue.
11349 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
11350 (grammar_start_symbol_set): this.
11351 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
11352 * src/reader.c (readgram): Remove, unused.
11353 (reader): Adjust to insert eoftoken and axiom where appropriate.
11354
11355 * src/reader.c (copy_dollar): Replace with...
11356 * src/scan-gram.h (handle_dollar): this.
11357 * src/parse-gram.y: Remove `%thong'.
11358
11359 * src/reader.c (copy_at): Replace with...
11360 * src/scan-gram.h (handle_at): this.
11361
11362 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
11363 New.
11364
11365 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
11366 time being.
11367
11368 * src/reader.h, src/reader.c (grammar_rule_end): New.
11369
11370 * src/parse.y (current_type, current_class): New.
11371 Implement `%nterm', `%token' support.
11372 Merge `%term' into `%token'.
11373 (string_as_id): New.
11374 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
11375 type name.
11376
11377 * src/parse-gram.y: Be sure to handle properly the beginning of
11378 rules.
11379
11380 * src/parse-gram.y: Handle %type.
11381 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
11382
11383 * src/parse-gram.y: More directives support.
11384 * src/options.c: No longer handle source directives.
11385
11386 * src/parse-gram.y: Fix %output.
11387
11388 * src/parse-gram.y: Handle %union.
11389 Use the prologue locations.
11390 * src/reader.c (parse_union_decl): Remove.
11391
11392 * src/reader.h, src/reader.c (epilogue_set): New.
11393 * src/parse-gram.y: Use it.
11394
11395 * data/bison.simple, data/bison.c++: b4_stype is now either not
11396 defined, then default to int, or to the contents of %union,
11397 without `union' itself.
11398 Adjust.
11399 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
11400
11401 * src/output.c (actions_output): Don't output braces, as they are
11402 already handled by the scanner.
11403
11404 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
11405 characters to themselves.
11406
11407 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
11408 that the epilogue has a proper #line.
11409
11410 * src/parse-gram.y: Handle precedence/associativity.
11411
11412 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
11413 a terminal.
11414 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
11415 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
11416 at all to define terminals that cannot be emitted.
11417
11418 * src/scan-gram.l: Escape M4 characters.
11419
11420 * src/scan-gram.l: Working properly with escapes in user
11421 strings/characters.
11422
11423 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
11424 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
11425 grammar.
11426 Use more modest sizes, as for the time being the parser does not
11427 release memory, and therefore the process swallows a huge amount
11428 of memory.
11429
11430 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
11431 stricter %token grammar.
11432
11433 * src/symtab.h (associativity): Add `undef_assoc'.
11434 (symbol_precedence_set): Do nothing when passed an undef_assoc.
11435 * src/symtab.c (symbol_check_alias_consistence): Adjust.
11436
11437 * tests/regression.at (Invalid %directive): Remove, as it is now
11438 meaningless.
11439 (Invalid inputs): Adjust to the new error messages.
11440 (Token definitions): The new grammar doesn't allow too many
11441 eccentricities.
11442
11443 * src/lex.h, src/lex.c: Remove.
11444 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
11445 (copy_character, copy_string2, copy_string, copy_identifier)
11446 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
11447 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
11448 (parse_action): Remove.
11449 * po/POTFILES.in: Adjust.
11450
2e047461
AD
114512002-06-11 Akim Demaille <akim@epita.fr>
11452
cd05d13c 11453 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
11454 rule's action member: return the action as a string.
11455 Don't require `rule_length' as an argument: compute it.
11456 (grammar_current_rule_symbol_append)
11457 (grammar_current_rule_action_append): New, eved out from
11458 (readgram): here.
11459 Remove `action_flag', `rulelength', unused now.
11460
9af3fbce
AD
114612002-06-11 Akim Demaille <akim@epita.fr>
11462
11463 * src/reader.c (grammar_current_rule_prec_set).
11464 (grammar_current_rule_check): New, eved out from...
11465 (readgram): here.
11466 Remove `xaction', `first_rhs': useless.
11467 * tests/input.at (Type clashes): New.
11468 * tests/existing.at (GNU Cim Grammar): Adjust.
11469
1485e106
AD
114702002-06-11 Akim Demaille <akim@epita.fr>
11471
11472 * src/reader.c (grammar_midrule_action): New, Eved out from
11473 (readgram): here.
11474
da4160c3
AD
114752002-06-11 Akim Demaille <akim@epita.fr>
11476
11477 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
11478 New.
11479 (readgram): Use them as replacement of inlined code, crule and
11480 crule1.
11481
f6d0f937
AD
114822002-06-11 Akim Demaille <akim@epita.fr>
11483
11484 * src/reader.c (grammar_end, grammar_symbol_append): New.
11485 (readgram): Use them.
11486 Make the use of `p' as local as possible.
11487
69078d4b
AD
114882002-06-10 Akim Demaille <akim@epita.fr>
11489
11490 GCJ's parser requires the tokens to be defined before the prologue.
11491
11492 * data/bison.simple: Output the token definition before the user's
11493 prologue.
11494 * tests/regression.at (Braces parsing, Duplicate string)
11495 (Mixing %token styles): Check the output from bison.
11496 (Early token definitions): New.
11497
5e424082
AD
114982002-06-10 Akim Demaille <akim@epita.fr>
11499
11500 * src/symtab.c (symbol_user_token_number_set): Don't complain when
11501 assigning twice the same user number to a token, so that we can
11502 use it in...
11503 * src/lex.c (lex): here.
11504 Also use `symbol_class_set' instead of hand written code.
11505 * src/reader.c (parse_assoc_decl): Likewise.
11506
44536b35
AD
115072002-06-10 Akim Demaille <akim@epita.fr>
11508
11509 * src/symtab.c, src/symtab.c (symbol_class_set)
11510 (symbol_user_token_number_set): New.
11511 * src/reader.c (parse_token_decl): Use them.
11512 Use a switch instead of ifs.
11513 Use a single argument.
11514
8b9f2372
AD
115152002-06-10 Akim Demaille <akim@epita.fr>
11516
11517 Remove `%thong' support as it is undocumented, unused, duplicates
11518 `%token's job, and creates useless e-mail traffic with people who
11519 want to know what it is, why it is undocumented, unused, and
11520 duplicates `%token's job.
11521
11522 * src/reader.c (parse_thong_decl): Remove.
11523 * src/options.c (option_table): Remove "thong".
11524 * src/lex.h (tok_thong): Remove.
11525
3ae2b51f
AD
115262002-06-10 Akim Demaille <akim@epita.fr>
11527
11528 * src/symtab.c, src/symtab.c (symbol_type_set)
11529 (symbol_precedence_set): New.
11530 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
11531 (value_components_used): Remove, unused.
11532
2f1afb73
AD
115332002-06-09 Akim Demaille <akim@epita.fr>
11534
11535 Move symbols handling code out of the reader.
11536
11537 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
11538 (axiom): Move to...
11539 * src/symtab.h, src/symtab.c: here.
11540
11541 * src/gram.c (start_symbol): Remove: use startsymbol->number.
11542 * src/reader.c (startval): Rename as...
11543 * src/symtab.h, src/symtab.c (startsymbol): this.
11544 * src/reader.c: Adjust.
11545
11546 * src/reader.c (symbol_check_defined, symbol_make_alias)
11547 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11548 (token_translations_init)
11549 Move to...
11550 * src/symtab.c: here.
11551 * src/reader.c (packsymbols): Move to...
11552 * src/symtab.h, src/symtab.c (symbols_pack): here.
11553 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
11554 argument.
11555
e9bca3ad
AD
115562002-06-03 Akim Demaille <akim@epita.fr>
11557
11558 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
11559 then statements.
11560
86eff183
AD
115612002-06-03 Akim Demaille <akim@epita.fr>
11562
11563 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
11564 structs with non literals.
11565 * src/scan-skel.l: never-interactive.
11566 * src/conflicts.c (enum conflict_resolution_e): No trailing
11567 comma.
11568 * src/getargs.c (usage): Split long literal strings.
11569 Reported by Hans Aberg.
11570
717be197
AD
115712002-05-28 Akim Demaille <akim@epita.fr>
11572
11573 * data/bison.c++: Use C++ ostreams.
11574 (cdebug_): New member.
11575
670ddffd
AD
115762002-05-28 Akim Demaille <akim@epita.fr>
11577
11578 * src/output.c (output_skeleton): Be sure to allocate enough room
11579 for `/' _and_ for `\0' in full_skeleton.
11580
769b430f
AD
115812002-05-28 Akim Demaille <akim@epita.fr>
11582
11583 * data/bison.c++: Catch up with bison.simple:
11584 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11585 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11586 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
11587 and popping traces.
11588
7067cb36
PH
115892002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11590
11591 * src/output.c (output_skeleton): Put an explicit path in front of
11592 the skeleton file name, rather than relying on the -I directory,
11593 to partially alleviate effects of having a skeleton file lying around
11594 in the current directory.
769b430f 11595
4a713ec2
PH
115962002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11597
769b430f 11598 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
11599 obstack_printf should be obstack_fgrow1.
11600
b408954b
AD
116012002-05-26 Akim Demaille <akim@epita.fr>
11602
11603 * src/state.h (state_t): `solved_conflicts' is a new member.
11604 * src/LR0.c (new_state): Set it to 0.
11605 * src/conflicts.h, src/conflicts.c (print_conflicts)
11606 (free_conflicts, solve_conflicts): Rename as...
11607 (conflicts_print, conflicts_free, conflicts_solve): these.
11608 Adjust callers.
11609 * src/conflicts.c (enum conflict_resolution_e)
11610 (solved_conflicts_obstack): New, used by...
11611 (log_resolution): this.
11612 Adjust to attach the conflict resolution to each state.
11613 Complete the description with the precedence/associativity
11614 information.
11615 (resolve_sr_conflict): Adjust.
11616 * src/print.c (print_state): Output its solved_conflicts.
11617 * tests/conflicts.at (Unresolved SR Conflicts)
11618 (Solved SR Conflicts): Exercise --report=all.
11619
a49aecd5
AD
116202002-05-26 Akim Demaille <akim@epita.fr>
11621
11622 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11623 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11624 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11625 (token_number_t, item_number_as_token_number)
11626 (token_number_as_item_number, muscle_insert_token_number_table):
11627 Rename as...
11628 (symbol_number_t, item_number_as_symbol_number)
11629 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11630 these, since it is more appropriate.
11631
5504898e
AD
116322002-05-26 Akim Demaille <akim@epita.fr>
11633
11634 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11635 `Error:' lines.
11636 * data/bison.simple (yystos) [YYDEBUG]: New.
11637 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11638 error recovery.
11639 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11640
ec3bc396
AD
116412002-05-25 Akim Demaille <akim@epita.fr>
11642
11643 * doc/bison.texinfo (Debugging): Split into...
11644 (Tracing): this new section, its former contents, and...
11645 (Understanding): this new section.
11646 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11647 by...
11648 (report_flag): this.
11649 Adjust all dependencies.
11650 (report_args, report_types, report_argmatch): New.
11651 (usage, getargs): Report/support -r, --report.
11652 * src/options.h
11653 (struct option_table_struct): Rename as..,
11654 (struct option_table_s): this.
11655 Rename the `set_flag' member to `flag' to match with getopt_long's
11656 struct.
11657 * src/options.c (option_table): Split verbose into an entry for
11658 %verbose, and another for --verbose.
11659 Support --report/-r, so remove -r from the obsolete --raw.
11660 * src/print.c: Attach full item sets and lookaheads reports to
11661 report_flag instead of trace_flag.
11662 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11663
78df8250
PE
116642002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11665 and Paul Eggert <eggert@twinsun.com>
769b430f 11666
78df8250
PE
11667 * data/bison.simple (yyparse): Correct error handling to conform to
11668 POSIX and yacc. Specifically, after syntax error is discovered,
11669 do not reduce further before shifting the error token.
11670 Clean up the code a bit by removing the labels yyerrdefault,
11671 yyerrhandle, yyerrpop.
11672 * NEWS: Document the above.
11673
c0c9ea05
PH
116742002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11675
11676 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11677 type; it isn't always big enough, since it doesn't necessarily
11678 include non-terminals.
769b430f 11679 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
11680 the latter can be removed.
11681 (yy_token_number_type): Remove, only one use.
11682 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11683 don't use TokenNumberType as element type.
769b430f 11684
c0c9ea05
PH
11685 * tests/regression.at: Modify expected output to agree with change
11686 to yyr1 and yytranslate.
769b430f 11687
6390a83f
FK
116882002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11689
11690 * src/reader.c (parse_action): Use copy_character instead of
11691 obstack_1grow.
11692
db7c8e9a
AD
116932002-05-13 Akim Demaille <akim@epita.fr>
11694
11695 * tests/regression.at (Token definitions): Prototype yylex and
11696 yyerror.
11697
fcc61800
PH
116982002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11699
158c687b 11700 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
11701 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11702 32-bit arithmetic.
11703 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11704
5683e9b2
AD
117052002-05-07 Akim Demaille <akim@epita.fr>
11706
11707 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11708 avoid GCC warnings.
11709
0c2d3f4c
AD
117102002-05-07 Akim Demaille <akim@epita.fr>
11711
11712 Kill GCC warnings.
11713
11714 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11715 over the RHS of each rule.
11716 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11717 * src/state.h (state_t): Member `nitems' is unsigned short.
11718 * src/LR0.c (get_state): Adjust.
11719 * src/reader.c (packgram): Likewise.
11720 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11721 `Type'.
11722 (muscle_insert_int_table): Remove, unused.
11723 (prepare_rules): Remove `max'.
11724
1565b720
AD
117252002-05-06 Akim Demaille <akim@epita.fr>
11726
11727 * src/closure.c (print_firsts): Display of the symbol tags.
11728 (bitmatrix_print): Move to...
11729 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11730 here.
11731 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11732
cfaee611
AD
117332002-05-06 Akim Demaille <akim@epita.fr>
11734
11735 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11736 hash_do_for_each.
11737
458be8e0
AD
117382002-05-06 Akim Demaille <akim@epita.fr>
11739
11740 * src/LR0.c (new_state, get_state): Instead of using the global
11741 `kernel_size' and `kernel_base', have two new arguments:
11742 `core_size' and `core'.
11743 Adjust callers.
11744
a900a624
AD
117452002-05-06 Akim Demaille <akim@epita.fr>
11746
11747 * src/reader.c (packgram): No longer end `ritem' with a 0
11748 sentinel: it is not used.
11749
d4e7d3a1
AD
117502002-05-05 Akim Demaille <akim@epita.fr>
11751
11752 New experimental feature: display the lookaheads in the report and
11753 graph.
11754
11755 * src/print (print_core): When --trace-flag, display the rules
11756 lookaheads.
11757 * src/print_graph.c (print_core): Likewise.
11758 Swap the arguments.
11759 Adjust caller.
11760
39ceb25b
AD
117612002-05-05 Akim Demaille <akim@epita.fr>
11762
11763 * tests/torture.at (Many lookaheads): New test.
11764
5372019f
AD
117652002-05-05 Akim Demaille <akim@epita.fr>
11766
11767 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11768 (GENERATE_MUSCLE_INSERT_TABLE): this.
11769 (output_int_table, output_unsigned_int_table, output_short_table)
11770 (output_token_number_table, output_item_number_table): Replace with...
11771 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11772 (muscle_insert_short_table, muscle_insert_token_number_table)
11773 (muscle_insert_item_number_table): these.
11774 Adjust all callers.
11775 (prepare_tokens): Don't free `translations', since...
11776 * src/reader.h, src/reader.c (grammar_free): do it.
11777 Move to...
11778 * src/gram.h, src/gram.c (grammar_free): here.
11779 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11780 b4_translate_max.
11781
5df5f6d5
AD
117822002-05-05 Akim Demaille <akim@epita.fr>
11783
11784 * src/output.c (output_unsigned_int_table): New.
11785 (prepare_rules): `i' is unsigned.
11786 `prhs', `rline', `r2' are unsigned int.
11787 Rename muscle `rhs_number_max' as `rhs_max'.
11788 Output muscles `prhs_max', `rline_max', and `r2_max'.
11789 Free rline and r1.
11790 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11791 to compute types instead of constant types.
11792 * tests/regression.at (Web2c Actions): Adjust.
11793
b87f8b21
AD
117942002-05-04 Akim Demaille <akim@epita.fr>
11795
11796 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11797 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11798 Adjust dependencies.
11799 * src/output.c (token_definitions_output): Be sure not to output a
11800 `#define 'a'' when fed with `%token 'a' "a"'.
11801 * tests/regression.at (Token definitions): New.
11802
8bb936e4
PE
118032002-05-03 Paul Eggert <eggert@twinsun.com>
11804
11805 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11806 for K&R C.
11807
118082002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11809
11810 * Makefile.am (SUBDIRS): Remove intl.
11811 (EXTRA_DIST): Add config/config.rpath.
11812
53c71a12
AD
118132002-05-03 Akim Demaille <akim@epita.fr>
11814
11815 * data/bison.simple (m4_if): Don't output empty enums.
11816 And actually, output valid enum definitions :(.
11817
289dd0cf
AD
118182002-05-03 Akim Demaille <akim@epita.fr>
11819
11820 * configure.bat: Remove, completely obsolete.
11821 * Makefile.am (EXTRA_DIST): Adjust.
11822 Don't distribute config.rpath...
11823 * config/Makefile.am (EXTRA_DIST): Do it.
11824
db85e524
AD
118252002-05-03 Akim Demaille <akim@epita.fr>
11826
11827 * configure.in (GETTEXT_VERSION): New.
11828 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11829
83ccf991
AD
118302002-05-03 Akim Demaille <akim@epita.fr>
11831
11832 * data/bison.simple (b4_token_enum): New.
11833 (b4_token_defines): Use it to output tokens both as #define and
11834 enums.
11835 Suggested by Paul Eggert.
11836 * src/output.c (token_definitions_output): Don't output spurious
11837 white spaces.
11838
1f418995
AD
118392002-05-03 Akim Demaille <akim@epita.fr>
11840
11841 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11842
45119f04
RA
118432002-05-02 Robert Anisko <robert@lrde.epita.fr>
11844
11845 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11846 Update the stack class, give a try to deque as the default container.
11847
b2d52318
AD
118482002-05-02 Akim Demaille <akim@epita.fr>
11849
11850 * data/bison.simple (yyparse): Do not implement @$ = @1.
11851 (YYLLOC_DEFAULT): Adjust to do it.
11852 * doc/bison.texinfo (Location Default Action): Fix.
11853
3a8b4109
AD
118542002-05-02 Akim Demaille <akim@epita.fr>
11855
11856 * src/reader.c (parse_braces): Merge into...
11857 (parse_action): this.
11858
84614e13
AD
118592002-05-02 Akim Demaille <akim@epita.fr>
11860
11861 * configure.in (ALL_LINGUAS): Remove.
11862 * po/LINGUAS, hr.po: New.
11863
fdbcd8e2
AD
118642002-05-02 Akim Demaille <akim@epita.fr>
11865
11866 Remove the so called hairy (semantic) parsers.
11867
11868 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11869 * src/gram.h, src/gram.c (semantic_parser): Remove.
11870 (rule_t): Remove the guard and guard_line members.
11871 * src/lex.h (token_t): remove tok_guard.
11872 * src/options.c (option_table): Remove %guard and %semantic_parser
11873 support.
11874 * src/output.c, src/output.h (guards_output): Remove.
11875 (prepare): Adjust.
11876 (token_definitions_output): Don't output the `T'
11877 tokens (???).
11878 (output_skeleton): Don't output the guards.
11879 * src/files.c, src/files.c (attrsfile): Remove.
11880 * src/reader.c (symbol_list): Remove the guard and guard_line
11881 members.
11882 Adjust dependencies.
11883 (parse_guard): Remove.
11884 * data/bison.hairy: Remove.
11885 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11886 BISON_HAIRY.
11887
82b6cb3f
AD
118882002-05-02 Akim Demaille <akim@epita.fr>
11889
11890 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11891 (parse_guard): Rename the formal argument `stack_offset' as
11892 `rule_length', which is more readable.
11893 Adjust callers.
11894 (copy_at, copy_dollar): Instead of outputting the hard coded
11895 values of $$, $n and so forth, output invocation to b4_lhs_value,
11896 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
11897 Note: this patch partially drops `semantic-parser' support: it
11898 always does `rule_length - n', where semantic parsers ought to
11899 always use `-n'.
82b6cb3f
AD
11900 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11901 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11902
6cbfbcc5
AD
119032002-05-02 Akim Demaille <akim@epita.fr>
11904
11905 * configure.in (AC_INIT): Bump to 1.49b.
11906 (AM_INIT_AUTOMAKE): Short invocation.
11907
b8548114
AD
119082002-05-02 Akim Demaille <akim@epita.fr>
11909
11910 Version 1.49a.
11911
c20cd1fa
AD
119122002-05-01 Akim Demaille <akim@epita.fr>
11913
11914 * src/skeleton.h: Remove.
11915
8a9566d4
AD
119162002-05-01 Akim Demaille <akim@epita.fr>
11917
11918 * src/skeleton.h: Fix the #endif.
11919 Reported by Magnus Fromreide.
11920
8c6d399a
PE
119212002-04-26 Paul Eggert <eggert@twinsun.com>
11922
11923 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11924 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 11925 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 11926
2b7ed18a
RA
119272002-04-25 Robert Anisko <robert@lrde.epita.fr>
11928
11929 * src/scan-skel.l: Postprocess quadrigraphs.
11930
11931 * src/reader.c (copy_character): New function, used to output
11932 single characters while replacing `[' and `]' with quadrigraphs, to
11933 avoid troubles with M4 quotes.
11934 (copy_comment): Output characters with copy_character.
11935 (read_additionnal_code): Likewise.
11936 (copy_string2): Likewise.
11937 (copy_definition): Likewise.
11938
11939 * tests/calc.at: Exercise M4 quoting.
11940
34a89c50
AD
119412002-04-25 Akim Demaille <akim@epita.fr>
11942
11943 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11944 between `!' and the command.
11945 Reported by Paul Eggert.
11946
0dd1580a
RA
119472002-04-24 Robert Anisko <robert@lrde.epita.fr>
11948
11949 * tests/calc.at: Exercise prologue splitting.
11950
11951 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11952 `b4_post_prologue' instead of `b4_prologue'.
11953
11954 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11955 muscles.
11956 (output): Free pre_prologue_obstack and post_prologue_obstack.
11957 * src/files.h, src/files.c (attrs_obstack): Remove.
11958 (pre_prologue_obstack, post_prologue_obstack): New.
11959 * src/reader.c (copy_definition): Add a parameter to specify the
11960 obstack to fill, instead of using attrs_obstack unconditionally.
11961 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11962 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11963
83c1796f
PE
119642002-04-23 Paul Eggert <eggert@twinsun.com>
11965
11966 * data/bison.simple: Remove unnecessary commentary and white
11967 space differences from 1_29-branch.
11968 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11969
11970 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11971 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11972 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11973 constructors or destructors.
11974
11975 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11976
1207eeac
AD
119772002-04-23 Akim Demaille <akim@epita.fr>
11978
11979 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11980 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11981 location with columns.
11982 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11983 All reported by Paul Eggert.
11984
78ab8f67
AD
119852002-04-22 Akim Demaille <akim@epita.fr>
11986
11987 * src/reduce.c (dump_grammar): Move to...
11988 * src/gram.h, src/gram.c (grammar_dump): here.
11989 Be sure to separate long item numbers.
11990 Don't read the members of a rule's prec if its nil.
11991
133c20e2
AD
119922002-04-22 Akim Demaille <akim@epita.fr>
11993
11994 * src/output.c (table_size, table_grow): New.
11995 (MAXTABLE): Remove, replace uses with table_size.
11996 (pack_vector): Instead of dying when the table is too big, grow it.
11997
9515e8a7
AD
119982002-04-22 Akim Demaille <akim@epita.fr>
11999
12000 * data/bison.simple (yyr1): Its type is that of a token number.
12001 * data/bison.c++ (r1_): Likewise.
12002 * tests/regression.at (Web2c Actions): Adjust.
12003
23c5a174
AD
120042002-04-22 Akim Demaille <akim@epita.fr>
12005
12006 * src/reader.c (token_translations_init): 256 is now the default
12007 value for the error token, i.e., it will be assigned another
12008 number if the user assigned 256 to one of her tokens.
12009 (reader): Don't force 256 to error.
12010 * doc/bison.texinfo (Symbols): Adjust.
12011 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
12012 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
12013 etc. instead of 10, 20, 30 (which was used to `jump' over error
12014 (256) and undefined (2)).
12015
5fbb0954
AD
120162002-04-22 Akim Demaille <akim@epita.fr>
12017
12018 Propagate more token_number_t.
12019
12020 * src/gram.h (token_number_as_item_number)
12021 (item_number_as_token_number): New.
12022 * src/output.c (GENERATE_OUTPUT_TABLE): New.
12023 Use it to create output_item_number_table and
12024 output_token_number_table.
12025 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
12026 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
12027 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
12028 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
12029
4f940944
AD
120302002-04-22 Akim Demaille <akim@epita.fr>
12031
12032 * src/output.h, src/output.c (get_lines_number): Remove.
12033
3ded9a63
AD
120342002-04-19 Akim Demaille <akim@epita.fr>
12035
12036 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
12037 as Lex/Flex'.
12038 (Debugging): More details about enabling the debugging features.
12039 (Table of Symbols): Describe $$, $n, @$, and @n.
12040 Suggested by Tim Josling.
12041
e0c471a9
AD
120422002-04-19 Akim Demaille <akim@epita.fr>
12043
12044 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
12045
fecc10cd
AD
120462002-04-10 Akim Demaille <akim@epita.fr>
12047
12048 * src/system.h: Rely on HAVE_LIMITS_H.
12049 Suggested by Paul Eggert.
12050
51dec47b
AD
120512002-04-09 Akim Demaille <akim@epita.fr>
12052
12053 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
12054 full stderr, and strip it according to the bison options, instead
12055 of composing the error message from different bits.
12056 This makes it easier to check for several error messages.
12057 Adjust all the invocations.
12058 Add an invocation exercising the error token.
12059 Add an invocation demonstrating a stupid error message.
12060 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
12061 Adjust the tests.
12062 Error message are for stderr, not stdout.
12063
007a50a4
AD
120642002-04-09 Akim Demaille <akim@epita.fr>
12065
12066 * src/gram.h, src/gram.c (error_token_number): Remove, use
12067 errtoken->number.
12068 * src/reader.c (reader): Don't specify the user token number (2)
12069 for $undefined, as it uselessly prevents using it.
12070 * src/gram.h (token_number_t): Move to...
12071 * src/symtab.h: here.
12072 (state_t.number): Is a token_number_t.
12073 * src/print.c, src/reader.c: Use undeftoken->number instead of
12074 hard coded 2.
12075 (Even though this 2 is not the same as above: the number of the
12076 undeftoken remains being 2, it is its user token number which
12077 might not be 2).
12078 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
12079 `user_token_number_max'.
12080 Output `undef_token_number'.
12081 * data/bison.simple, data/bison.c++: Use them.
12082 Be sure to map invalid yylex return values to
12083 `undef_token_number'. This saves us from gratuitous SEGV.
12084
12085 * tests/conflicts.at (Solved SR Conflicts)
12086 (Unresolved SR Conflicts): Adjust.
12087 * tests/regression.at (Web2c Actions): Adjust.
12088
06446ccf
AD
120892002-04-08 Akim Demaille <akim@epita.fr>
12090
12091 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
12092 Adding #line.
12093 Remove the duplicate `typedefs'.
12094 (RhsNumberType): Fix the declaration and various other typos.
12095 Use __ofile__.
12096 * data/bison.simple: Use __ofile__.
12097 * src/scan-skel.l: Handle __ofile__.
12098
62a3e4f0
AD
120992002-04-08 Akim Demaille <akim@epita.fr>
12100
12101 * src/gram.h (item_number_t): New, the type of item numbers in
12102 RITEM. Note that it must be able to code symbol numbers as
12103 positive number, and the negation of rule numbers as negative
12104 numbers.
12105 Adjust all dependencies (pretty many).
12106 * src/reduce.c (rule): Remove this `short *' pointer: use
12107 item_number_t.
12108 * src/system.h (MINSHORT, MAXSHORT): Remove.
12109 Include `limits.h'.
12110 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
12111 (shortcpy): Remove.
12112 (MAXTABLE): Move to...
12113 * src/output.c (MAXTABLE): here.
12114 (prepare_rules): Use output_int_table to output rhs.
12115 * data/bison.simple, data/bison.c++: Adjust.
12116 * tests/torture.at (Big triangle): Move the limit from 254 to
12117 500.
12118 * tests/regression.at (Web2c Actions): Ajust.
12119
12120 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
12121 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
12122 passes, but produces negative #line number, once fixed, GCC is
12123 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
12124 C), it passes.
12125 * src/state.h (state_h): Code input lines on ints, not shorts.
12126
bb88b0fc
AD
121272002-04-08 Akim Demaille <akim@epita.fr>
12128
12129 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
12130 and then the grammar.
12131
9a636f47
AD
121322002-04-08 Akim Demaille <akim@epita.fr>
12133
12134 * src/system.h: No longer using strndup.
12135
680e8701
AD
121362002-04-07 Akim Demaille <akim@epita.fr>
12137
12138 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
12139 * src/output.c (output_table_data): Return the longest number.
12140 (prepare_tokens): Output `token_number_max').
12141 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
12142 New.
12143 Use them to define yy_token_number_type/TokenNumberType.
12144 Use this type for yytranslate.
12145 * tests/torture.at (Big triangle): Push the limit from 124 to
12146 253.
12147 * tests/regression.at (Web2c Actions): Adjust.
12148
817e9f41
AD
121492002-04-07 Akim Demaille <akim@epita.fr>
12150
12151 * tests/torture.at (Big triangle): New.
12152 (GNU AWK Grammar, GNU Cim Grammar): Move to...
12153 * tests/existing.at: here.
12154
5123689b
AD
121552002-04-07 Akim Demaille <akim@epita.fr>
12156
12157 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
12158 nritems.
12159 Adjust dependencies.
12160
f3849179
AD
121612002-04-07 Akim Demaille <akim@epita.fr>
12162
12163 * src/reader.c: Normalize increments to prefix form.
12164
bd02036a
AD
121652002-04-07 Akim Demaille <akim@epita.fr>
12166
12167 * src/reader.c, symtab.c: Remove debugging code.
12168
db8837cb
AD
121692002-04-07 Akim Demaille <akim@epita.fr>
12170
12171 Rename all the `bucket's as `symbol_t'.
12172
12173 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
12174 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
12175 * src/symtab.c, src/symtab.h (bucket): Rename as...
12176 (symbol_t): this.
12177 (symbol_list_new, bucket_check_defined, bucket_make_alias)
12178 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
12179 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
12180 (buckets_new, buckets_free, buckets_do): Rename as...
12181 (symbol_list_new, symbol_check_defined, symbol_make_alias)
12182 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
12183 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
12184 (symbols_new, symbols_free, symbols_do): these.
12185
72a23c97
AD
121862002-04-07 Akim Demaille <akim@epita.fr>
12187
12188 Use lib/hash for the symbol table.
12189
12190 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
12191 EOF.
12192 * src/lex.c (lex): Set the `number' member of new terminals.
12193 * src/reader.c (bucket_check_defined, bucket_make_alias)
12194 (bucket_check_alias_consistence, bucket_translation): New.
12195 (reader, grammar_free, readgram, token_translations_init)
12196 (packsymbols): Adjust.
12197 (reader): Number the predefined tokens.
12198 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
12199 for predefined tokens.
12200 * src/symtab.h (bucket): Remove all the hash table related
12201 members.
12202 * src/symtab.c (symtab): Replace by...
12203 (bucket_table): this.
12204 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
12205 (buckets_new, buckets_do): New.
12206
280a38c3
AD
122072002-04-07 Akim Demaille <akim@epita.fr>
12208
12209 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
12210 (start_symbol, max_user_token_number, semantic_parser)
12211 (error_token_number): Initialize.
12212 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
12213 Initialize.
12214 (reader): Don't.
12215 (errtoken, eoftoken, undeftoken, axiom): Extern.
12216
03b31c0c
AD
122172002-04-07 Akim Demaille <akim@epita.fr>
12218
12219 * src/gram.h (rule_s): prec and precsym are now pointers
12220 to the bucket giving the priority/associativity.
12221 Member `associativity' removed: useless.
12222 * src/reduce.c, src/conflicts.c: Adjust.
12223
8b3df748
AD
122242002-04-07 Akim Demaille <akim@epita.fr>
12225
12226 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
12227 Properly escape the symbols' TAG when outputting them.
12228
e601aa1d
AD
122292002-04-07 Akim Demaille <akim@epita.fr>
12230
12231 * src/lalr.h (LA): Is a bitsetv, not bitset*.
12232
b0299a2e
AD
122332002-04-07 Akim Demaille <akim@epita.fr>
12234
12235 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
12236 (LArule): this, which is an array to rule_t*.
12237 * src/print.c, src/conflicts.c: Adjust.
12238
d7e1f00c
AD
122392002-04-07 Akim Demaille <akim@epita.fr>
12240
12241 * src/gram.h (rule_t): Rename `number' as `user_number'.
12242 `number' is a new member.
12243 Adjust dependencies.
12244 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
12245
cc9305dd
AD
122462002-04-07 Akim Demaille <akim@epita.fr>
12247
12248 As a result of the previous patch, it is no longer needed
12249 to reorder ritem itself.
12250
12251 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
12252
b0940840
AD
122532002-04-07 Akim Demaille <akim@epita.fr>
12254
12255 Be sure never to walk through RITEMS, but use only data related to
12256 the rules themselves. RITEMS should be banished.
12257
12258 * src/output.c (output_token_translations): Rename as...
12259 (prepare_tokens): this.
12260 In addition to `translate', prepare the muscles `tname' and
12261 `toknum', which were handled by...
12262 (output_rule_data): this.
12263 Remove, and move the remainder of its outputs into...
12264 (prepare_rules): this new routines, which also merges content from
12265 (output_gram): this.
12266 (prepare_rules): Be sure never to walk through RITEMS.
12267 (output_stos): Rename as...
12268 (prepare_stos): this.
12269 (output): Always invoke prepare_states, after all, just don't use it
12270 in the output if you don't need it.
12271
643a5994
AD
122722002-04-07 Akim Demaille <akim@epita.fr>
12273
12274 * src/LR0.c (new_state): Display `nstates' as the name of the
12275 newly created state.
12276 Adjust to initialize first_state and last_state if needed.
12277 Be sure to distinguish the initial from the final state.
12278 (new_states): Create the itemset of the initial state, and use
12279 new_state.
12280 * src/closure.c (closure): Now that the initial state has its
12281 items properly set, there is no need for a special case when
12282 creating `ruleset'.
12283
12284 As a result, now the rule 0, reducing to $axiom, is visible in the
12285 outputs. Adjust the test suite.
12286
12287 * tests/conflicts.at (Solved SR Conflicts)
12288 (Unresolved SR Conflicts): Adjust.
12289 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
12290 * tests/conflicts.at (S/R in initial): New.
12291
b4c4ccc2
AD
122922002-04-07 Akim Demaille <akim@epita.fr>
12293
12294 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
12295 the RHS of the rules.
12296 * src/output.c (output_gram): Likewise.
12297
bba97eb2
AD
122982002-04-07 Akim Demaille <akim@epita.fr>
12299
12300 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
12301 bucket.
12302 Adjust all dependencies.
12303 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
12304 `number' of the buckets too.
12305 * src/gram.h: Include `symtab.h'.
12306 (associativity): Move to...
12307 * src/symtab.h: here.
12308 No longer include `gram.h'.
12309
c3b407f4
AD
123102002-04-07 Akim Demaille <akim@epita.fr>
12311
12312 * src/gram.h, src/gram.c (rules_rhs_length): New.
12313 (ritem_longest_rhs): Use it.
12314 * src/gram.h (rule_t): `number' is a new member.
12315 * src/reader.c (packgram): Set it.
12316 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
12317 the end of `rules', and count them out of `nrules'.
12318 (reduce_output, dump_grammar): Adjust.
12319 * src/print.c (print_grammar): It is no longer needed to check for
12320 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
12321 * tests/reduce.at (Reduced Automaton): New test.
12322
11652ab3
AD
123232002-04-07 Akim Demaille <akim@epita.fr>
12324
12325 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
12326 lacking `+ 1' to nrules, Bison reported as useless a token if it
12327 was used solely to set the precedence of the last rule...
12328
26b23c1a
AD
123292002-04-07 Akim Demaille <akim@epita.fr>
12330
12331 * data/bison.c++, data/bison.simple: Don't output the current file
12332 name in #line, to avoid useless diffs between two identical
12333 outputs under different names.
12334
18bcecb0
AD
123352002-04-07 Akim Demaille <akim@epita.fr>
12336
12337 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
12338 Normalize loops to using `< nrules + 1', not `<= nrules'.
12339
fa770c86
AD
123402002-04-07 Akim Demaille <akim@epita.fr>
12341
12342 * TODO: Update.
12343
d9b739c3
AD
123442002-04-07 Akim Demaille <akim@epita.fr>
12345
12346 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
12347 bucket.value as bucket.number.
12348
99013900
AD
123492002-04-07 Akim Demaille <akim@epita.fr>
12350
12351 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
12352 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
12353 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
12354 RHS, instead of being an index in RITEMS.
12355
e966383b
PE
123562002-04-04 Paul Eggert <eggert@twinsun.com>
12357
12358 * doc/bison.texinfo: Update copyright date.
12359 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
12360 (Symbols): Warn about running Bison in one character set,
12361 but compiling and/or running in an incompatible one.
12362 Warn about character code 256, too.
12363
123642002-04-03 Paul Eggert <eggert@twinsun.com>
12365
12366 * src/bison.data (YYSTACK_ALLOC): Depend on whether
12367 YYERROR_VERBOSE is nonzero, not whether it is defined.
12368
12369 Merge changes from bison-1_29-branch.
c307773e 12370
8d6c48b9
PE
123712002-03-20 Paul Eggert <eggert@twinsun.com>
12372
12373 Merge fixes from Debian bison_1.34-1.diff.
12374
12375 * configure.in (AC_PREREQ): 2.53.
12376
e53c6322
AD
123772002-03-20 Akim Demaille <akim@epita.fr>
12378
12379 * src/conflicts.c (log_resolution): Argument `resolution' is const.
12380
9ffbeca7
PE
123812002-03-19 Paul Eggert <eggert@twinsun.com>
12382
21db0b2a
PE
12383 * src/bison.simple (YYCOPY): New macro.
12384 (YYSTACK_RELOCATE): Use it.
12385 Remove Type arg; no longer needed. All callers changed.
12386 (yymemcpy): Remove; no longer needed.
12387
9ffbeca7
PE
12388 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
12389 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12390
642cb8f8
AD
123912002-03-19 Akim Demaille <akim@epita.fr>
12392
12393 Test and fix the #line outputs.
12394
12395 * tests/atlocal.at (GCC): New.
12396 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 12397 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
12398 (Action synch line, Epilogue synch line): New tests.
12399 * src/reader.c (parse_union_decl): Define the muscle stype_line.
12400 * data/bison.simple, data/bison.c++: Use it.
12401
3c31a486
AD
124022002-03-19 Akim Demaille <akim@epita.fr>
12403
12404 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
12405 (Solved SR Conflicts, %expect not enough, %expect right)
12406 (%expect too much): Move to...
12407 * tests/conflicts.at: this new file.
12408
0d8bed56
AD
124092002-03-19 Akim Demaille <akim@epita.fr>
12410
12411 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12412 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
12413 that we can move to enums for instance.
12414 * src/output.c (token_definitions_output): Output a list of
12415 `token-name, token-number' instead of the #define.
12416 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
12417
9208d17f
AD
124182002-03-14 Akim Demaille <akim@epita.fr>
12419
12420 Use Gettext 0.11.1.
12421
af27eacb
RA
124222002-03-09 Robert Anisko <robert@lrde.epita.fr>
12423
12424 * data/bison.c++: Make the user able to add members to the generated
12425 parser by subclassing.
12426
9101a310
RA
124272002-03-05 Robert Anisko <robert@lrde.epita.fr>
12428
12429 * src/reader.c (read_additionnal_code): `c' should be an integer, not
12430 a character.
12431 Reported by Nicolas Tisserand and Nicolas Burrus.
12432
fff9bf0b
RA
124332002-03-04 Robert Anisko <robert@lrde.epita.fr>
12434
12435 * src/reader.c: Warn about lacking semi-colons, do not complain.
12436
64dba31e
RA
124372002-03-04 Robert Anisko <robert@lrde.epita.fr>
12438
12439 * data/bison.c++: Remove a debug line.
12440
374f5a14
RA
124412002-03-04 Robert Anisko <robert@lrde.epita.fr>
12442
12443 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
12444 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
12445 provide a default implementation.
12446
bfcf1f3a
AD
124472002-03-04 Akim Demaille <akim@epita.fr>
12448
12449 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
12450 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
12451 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
12452 * tests/semantic.at (Parsing Guards): Similarly.
12453 * src/reader.at (readgram): Complain if the last rule is not ended
12454 with a semi-colon.
12455
65ccf9fc
AD
124562002-03-04 Akim Demaille <akim@epita.fr>
12457
12458 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
12459 * src/closure.c: here.
12460 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
12461 RTC.
12462 * src/warshall.h, src/warshall.c: Remove.
12463 * tests/sets.at (Broken Closure): Adjust.
12464
d0039cbc
AD
124652002-03-04 Akim Demaille <akim@epita.fr>
12466
12467 * src/output.c (output_skeleton): tempdir is const.
12468 bytes_read is unused.
12469
345cea78
AD
124702002-03-04 Akim Demaille <akim@epita.fr>
12471
12472 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12473 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
12474 Update.
12475 From Michael Hayes.
12476
564801f7
AD
124772002-03-04 Akim Demaille <akim@epita.fr>
12478
12479 * src/closure.c (closure): `r' is unused.
12480
e5352bc7
AD
124812002-03-04 Akim Demaille <akim@epita.fr>
12482
12483 * tests/sets.at (Broken Closure): Add the ending `;'.
12484 * src/reader.at (readgram): Complain if a rule is not ended with a
12485 semi-colon.
12486
914feea9
AD
124872002-03-04 Akim Demaille <akim@epita.fr>
12488
12489 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
12490 (count_sr_conflicts): Use bitset_count.
12491 * src/reduce.c (inaccessable_symbols): Ditto.
12492 (bits_size): Remove.
12493 * src/warshall.h, src/warshall.c: Convert to bitsetv.
12494
f0250de6
AD
124952002-03-04 Akim Demaille <akim@epita.fr>
12496
12497 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
12498 * src/reduce.c: Remove the `bitset_zero's following the
12499 `bitset_create's, as now it is performed by the latter.
12500
ef017502
AD
125012002-03-04 Akim Demaille <akim@epita.fr>
12502
12503 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
12504 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
12505 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
12506 latest sources from Michael.
12507
76514394
AD
125082002-03-04 Akim Demaille <akim@epita.fr>
12509
12510 * src/output.c (output): Don't free the grammar.
12511 * src/reader.c (grammar_free): New.
12512 * src/main.c (main): Call it and don't free symtab here.
12513
55024580
AD
125142002-03-04 Akim Demaille <akim@epita.fr>
12515
12516 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
12517 before returning.
12518 Reported by Benoit Perrot.
12519
f9abaa2c
AD
125202002-03-04 Akim Demaille <akim@epita.fr>
12521
12522 Use bitset operations when possible, not loops over bits.
12523
12524 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
12525 bitset_or.
12526 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
12527 * src/reduce.c (useless_nonterminals): Formatting changes.
12528 * src/warshall.c (TC): Use bitset_or.
12529
0e721e75
AD
125302002-03-04 Akim Demaille <akim@epita.fr>
12531
12532 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
12533 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
12534 Ditto.
12535
0fb1ffb1
AD
125362002-03-04 Akim Demaille <akim@epita.fr>
12537
12538 * src/lalr.c (F): Now a bitset*.
12539 Adjust all dependencies.
12540
b86796bf
AD
125412002-03-04 Akim Demaille <akim@epita.fr>
12542
12543 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
12544 Adjust all dependencies.
12545
602bbf31
AD
125462002-03-04 Akim Demaille <akim@epita.fr>
12547
12548 * src/L0.c, src/LR0.h (nstates): Be size_t.
12549 Adjust comparisons (signed vs unsigned).
12550 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
12551 bitset*.
12552 Adjust all dependencies.
12553
d8a0245c
AD
125542002-03-04 Akim Demaille <akim@epita.fr>
12555
12556 * src/closure.c (firsts): Now, also a bitset.
12557 Adjust all dependencies.
12558 (varsetsize): Remove, now unused.
12559 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
12560
34ba9743
AD
125612002-03-04 Akim Demaille <akim@epita.fr>
12562
12563 * src/print.c: Convert to use bitset.h, not hand coded iterations
12564 over ints.
12565
ed86e78c
AD
125662002-03-04 Akim Demaille <akim@epita.fr>
12567
12568 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
12569
dfdb1797
AD
125702002-03-04 Akim Demaille <akim@epita.fr>
12571
12572 * src/closure.c (ruleset): Be a bitset.
12573 (rulesetsize): Remove.
12574
7086e707
AD
125752002-03-04 Akim Demaille <akim@epita.fr>
12576
12577 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12578 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
12579 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12580 * src/closure.c (fderives): Be an array of bitsets.
12581
98254360
RA
125822002-02-28 Robert Anisko <robert@lrde.epita.fr>
12583
12584 * data/bison.c++: Merge the two generated headers. Insert a copyright
12585 notice in each output file.
12586
a75c057f
AD
125872002-02-28 Akim Demaille <akim@epita.fr>
12588
12589 * data/bison.c++: Copy the prologue of bison.simple to fetch
12590 useful M4 definitions, such as b4_header_guard.
12591
06b00abc
AD
125922002-02-25 Akim Demaille <akim@epita.fr>
12593
12594 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
12595 translator friendly scheme for the bgr
12596 copyright notice.
06b00abc 12597
70e7d534
AD
125982002-02-25 Akim Demaille <akim@epita.fr>
12599
12600 * src/output.c (header_output): Remove, now handled completely via
12601 M4.
12602
abe017f6
AD
126032002-02-25 Akim Demaille <akim@epita.fr>
12604
12605 * m4/m4.m4: New, from CVS Autoconf.
12606 * configure.in: Invoke it.
12607 * src/output.c (output_skeleton): Use its result instead of the
12608 hard coded name.
12609
381fb12e
AD
126102002-02-25 Akim Demaille <akim@epita.fr>
12611
12612 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12613 Fileutils 4.1.5.
12614 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12615 * src/output.c (output_skeleton): Use mkstemp to create a real
12616 temporary file.
12617 Move the filling of `skeleton' and its muscle to...
12618 (prepare): here.
12619 (output): Move the definition of the prologue muscle to...
12620 (prepare): here.
12621 * src/system.h (DEFAULT_TMPDIR): New.
12622
6f38107f
PE
126232002-02-14 Paul Eggert <eggert@twinsun.com>
12624
12625 Remove the support for C++ namespace cleanliness; it was
12626 causing more problems than it was curing, since it didn't work
12627 properly on some nonstandard C++ compilers. This can wait
12628 for a proper C++ parser.
12629
12630 * NEWS: Document this.
12631 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12632 of C++, as it's treated like C now.
12633 * src/bison.simple (YYSTD): Remove.
12634 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12635 Treat C++ just like Standard C instead of trying to support
12636 namespace cleanliness.
12637
80cce3da
AD
126382002-02-14 Akim Demaille <akim@epita.fr>
12639
12640 * tests/regression.at (else): Adjust to Andreas' change.
12641
842e8679
AD
126422002-02-14 Akim Demaille <akim@epita.fr>
12643
12644 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12645
4bda3f10
AD
126462002-02-13 Andreas Schwab <schwab@suse.de>
12647
12648 * src/output.c (output_rule_data): Don't output NULL, it might
12649 not be defined yet.
12650
4162fa07 126512002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 12652
4162fa07
RA
12653 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12654 (Copyright notice): Update.
b418ecd8 12655
bd16a5dc
AD
126562002-02-11 Akim Demaille <akim@epita.fr>
12657
12658 * tests/regression.at (%nonassoc and eof): Don't include
12659 nonportable headers.
12660
8d69a1a3
RA
126612002-02-08 Robert Anisko <robert@lrde.epita.fr>
12662
12663 * data/bison.c++: Correct error recovery. Make the user able to
12664 initialize the starting location.
12665
9b2d0677
AD
126662002-02-07 Akim Demaille <akim@epita.fr>
12667
12668 * tests/input.at: New.
12669
69e2658b
RA
126702002-02-07 Robert Anisko <robert@lrde.epita.fr>
12671
12672 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 12673 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
12674 directives around tables only needed for debugging.
12675
4aacc3a7
RA
126762002-02-07 Robert Anisko <robert@lrde.epita.fr>
12677
12678 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12679 C++ parsers.
12680 (yy::b4_name::parse): Use print_.
12681
762a801e
RA
126822002-02-07 Robert Anisko <robert@lrde.epita.fr>
12683
12684 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12685
4bb2bc3f
RA
126862002-02-07 Robert Anisko <robert@lrde.epita.fr>
12687
12688 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12689 C++ parsers.
12690 (yy::b4_name::parse): Build verbose error messages, and use error_.
12691
6b45a3ca
RA
126922002-02-06 Robert Anisko <robert@lrde.epita.fr>
12693
12694 * data/bison.c++: Fix m4 quoting in comments.
12695
50997c6e
RA
126962002-02-06 Robert Anisko <robert@lrde.epita.fr>
12697
12698 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12699 not expanded by m4.
12700
3f3eed27
AD
127012002-02-05 Akim Demaille <akim@epita.fr>
12702
12703 * data/bison.c++: Adjust to the M4 back end.
12704 More is certainly needed.
12705
be2a1a68
AD
127062002-02-05 Akim Demaille <akim@epita.fr>
12707
12708 Give a try to M4 as a back end.
12709
12710 * lib/readpipe.c: New, from wdiff.
12711 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12712 BISON_HAIRY.
12713 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12714 specific values. Now it is m4 that performs the lookup.
12715 * src/parse-skel.y: Remove.
12716 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12717 * src/output.c (actions_output, guards_output)
12718 (token_definitions_output): No longer keeps track of the output
12719 line number, hence remove the second argument.
12720 (guards_output): Check against the guard member of a rule, not the
12721 action member.
12722 Adjust callers.
12723 (output_skeleton): Don't look for the skeleton location, let m4 do
12724 that.
12725 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12726 file will be used.
12727 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12728 (prepare): Given that for the time being changesyntax is not
12729 usable in M4, rename the muscles using `-' to `_'.
12730 Define `defines_flag', `output_parser_name' and `output_header_name'.
12731 * src/output.h (actions_output, guards_output)
12732 (token_definitions_output): Adjust prototypes.
12733 * src/scan-skel.l: Instead of scanning the skeletons, it now
12734 processes the output of m4: `__oline__' and `#output'.
12735 * data/bison.simple: Adjust to be used by M4(sugar).
12736 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12737 to date.
12738 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12739 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12740 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12741 shamelessly stolen from CVS Autoconf.
12742
beda758b
AD
127432002-02-05 Akim Demaille <akim@epita.fr>
12744
12745 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12746 * configure.in: Check for the declarations of free and malloc.
12747 * src/muscle_tab.c: Adjust.
12748
5ece6d43
AD
127492002-02-05 Akim Demaille <akim@epita.fr>
12750
12751 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12752 which have no values.
12753
5bb18f9a
AD
127542002-02-05 Akim Demaille <akim@epita.fr>
12755
12756 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12757 * data/: here.
12758
894dd62e
PE
127592002-01-29 Paul Eggert <eggert@twinsun.com>
12760
12761 * src/bison.simple (YYSIZE_T): Do not define merely because
12762 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12763 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12764
82841af7
AD
127652002-01-27 Akim Demaille <akim@epita.fr>
12766
12767 Fix `%nonassoc and eof'.
12768
12769 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12770 which were not properly copied! Replace
12771 memcpy (res->errs, src->errs, src->nerrs);
12772 with
12773 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12774 !!!
12775 * tests/regression.at (%nonassoc and eof): Adjust to newest
12776 Autotest: `.' is not in the PATH.
12777
318b76e9
AD
127782002-01-27 Akim Demaille <akim@epita.fr>
12779
12780 * tests/sets.at (AT_EXTRACT_SETS): New.
12781 (Nullable): Use it.
12782 (Firsts): New.
12783
30d2f3d5
AD
127842002-01-26 Akim Demaille <akim@epita.fr>
12785
12786 * tests/actions.at, tests/calc.at, tests/headers.at,
12787 * tests/torture.at: Adjust to the newest Autotest which no longer
12788 forces `.' in the PATH.
12789
30f8c395
AD
127902002-01-25 Akim Demaille <akim@epita.fr>
12791
12792 * tests/regression.at (%nonassoc and eof): New.
12793 Suggested by Robert Anisko.
12794
29ae55f1
AD
127952002-01-24 Akim Demaille <akim@epita.fr>
12796
12797 Bison dumps core when trying to complain about broken input files.
12798 Reported by Cris van Pelt.
12799
12800 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12801 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12802 into...
12803 (Invalid inputs): Strengthen: exercise parse_percent_token.
12804
2b548aa6
RA
128052002-01-24 Robert Anisko <robert.anisko@epita.fr>
12806
12807 * src/Makefile.am: Add bison.c++.
12808 * src/bison.c++: New skeleton.
12809
bb0146c2
AD
128102002-01-21 Paolo Bonzini <bonzini@gnu.org>
12811
12812 * po/it.po: New.
12813
bec30531
AD
128142002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12815
12816 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12817
fc6edc45
MA
128182002-01-20 Marc Autret <marc@gnu.org>
12819
12820 * src/files.c (compute_output_file_names): Fix
12821
5e5d5415
MA
128222002-01-20 Marc Autret <marc@gnu.org>
12823
12824 * tests/output.at: New test.
12825 * src/files.c (compute_base_names): Don't map extensions when
12826 the YACC flag is set, use defaults.
12827 Reported by Evgeny Stambulchik.
12828
44ea3fbd
MA
128292002-01-20 Marc Autret <marc@gnu.org>
12830
ba0fe3c7
PE
12831 * src/system.h: Need to define __attribute__ away for non-GCC
12832 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
12833 Suggested by Albert Chin-A-Young.
12834
338963d1
TVH
128352002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12836
12837 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12838 canonical definition.
12839 * src/system.h: Use the canonical definition for PARAMS (avoids
12840 a conflict with the macro from lib/hash.h).
12841
c57b2479
AD
128422002-01-11 Akim Demaille <akim@epita.fr>
12843
12844 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 12845 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 12846
b85810ae
AD
128472002-01-09 Akim Demaille <akim@epita.fr>
12848
12849 * src/files.c, src/files.h (output_infix): New.
12850 (tab_extension): Remove.
12851 (compute_base_names): Compute the former, drop the latter.
12852 * src/output.c (prepare): Insert the muscles `output-infix', and
12853 `output-suffix'.
12854 * src/parse-skel.y (string, string.1): New.
12855 (section.header): Use it.
12856 (section.yacc): Remove.
12857 (prefix): Remove too.
12858 * src/scan-skel.l: Adjust.
12859 * src/bison.simple, src/bison.hairy: Adjust.
12860
cae60122
AD
128612002-01-09 Akim Demaille <akim@epita.fr>
12862
12863 * configure.in (WERROR_CFLAGS): Compute it.
12864 * src/Makefile.am (CFLAGS): Pass it.
12865 * tests/atlocal.in (CFLAGS): Idem.
12866 * src/files.c: Fix a few warnings.
12867 (get_extension_index): Remove, unused.
12868
ae404801
AD
128692002-01-08 Akim Demaille <akim@epita.fr>
12870
12871 * src/getargs.c (AS_FILE_NAME): New.
12872 (getargs): Use it to convert DOSish file names.
12873 * src/files.c (base_name): Rename as full_base_name to avoid
12874 clashes with `base_name ()'.
12875 (filename_split): New.
12876 (compute_base_names): N-th rewrite, using filename_split.
12877
22312b71
AD
128782002-01-08 Akim Demaille <akim@epita.fr>
12879
12880 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12881 New, stolen from the Fileutils 4.1.
12882 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12883 * configure.in: Check for the presence of memrchr, and of its
12884 prototype.
12885
a67cef01
TVH
128862002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12887
12888 * lib/hash.h (__P): Added definition for this macro.
12889 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12890 BUILT_SOURCES, to ensure they are generated first.
12891 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12892 %error-verbose to allow bootstrapping with bison 1.30x.
12893
2b25d624
AD
128942002-01-06 Akim Demaille <akim@epita.fr>
12895
12896 * src/reader.c (parse_braces): Don't fetch the next char, the
12897 convention is to fetch on entry.
12898 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12899 'switch' without a following semicolon.
12900 * tests/regression.at (braces parsing): New.
12901
3460813b
AD
129022002-01-06 Akim Demaille <akim@epita.fr>
12903
12904 Bison is dead wrong in its RR conflict reports.
12905
12906 * tests/torture.at (GNU Cim Grammar): New.
12907 * src/conflicts.c (count_rr_conflicts): Fix.
12908
73784c64
AD
129092002-01-06 Akim Demaille <akim@epita.fr>
12910
12911 Creating package.m4 from configure.ac causes too many problems.
12912
12913 * tests/Makefile.am (package.m4): Create it by hand,
12914 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12915
25d81090
AD
129162002-01-06 Akim Demaille <akim@epita.fr>
12917
12918 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12919 skeleton.h.
12920
a9b8959e
PE
129212002-01-04 Paul Eggert <eggert@twinsun.com>
12922
12923 * doc/bison.texinfo (Debugging):
12924 Remove YYSTDERR; it's no longer defined or used.
12925 Also, s/cstdio.h/cstdio/.
12926
25d81090
AD
129272002-01-03 Akim Demaille <akim@epita.fr>
12928
12929 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12930
1109455c
AD
129312002-01-03 Akim Demaille <akim@epita.fr>
12932
12933 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12934 tracing code to --trace, wait for a better --trace option, with
12935 args.
12936
7ea5e977
AD
129372002-01-03 Akim Demaille <akim@epita.fr>
12938
12939 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12940 The ISO C++ standard is extremely clear about it: stderr is
12941 considered a macro, not a regular symbol (see table 94 `Header
12942 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12943 Therefore std:: does not apply to it. It still does with fprintf.
12944 Also, s/cstdio.h/cstdio/.
12945
fab5b110
AD
129462002-01-03 Akim Demaille <akim@epita.fr>
12947
12948 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12949 for non system headers.
12950
aed7fd9b
AD
129512002-01-02 Akim Demaille <akim@epita.fr>
12952
12953 Equip the skeleton chain with location tracking, runtime trace,
12954 pure parser and scanner.
12955
12956 * src/parse-skel.y: Request a pure parser, locations, and prefix
12957 renaming.
12958 (%union): Having several members with the same type does not help
12959 type mismatches, simplify.
12960 (YYPRINT, yyprint): New.
12961 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12962 (skel_error): this.
12963 Handle locations.
12964 * src/scan-skel.l: Adjust to these changes.
12965 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12966 (LOCATION_PRINT, skel_control_t): New.
12967
24fad99e
AD
129682001-12-30 Akim Demaille <akim@epita.fr>
12969
12970 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12971 replace `gb' with BLANKS.
12972 * src/scan-skel.l: Adjust.
12973
a4b36db4
AD
129742001-12-30 Akim Demaille <akim@epita.fr>
12975
12976 * src/system.h: We don't need nor want bcopy.
12977 Throw away MS-DOS crap: we don't need getpid.
12978 * configure.in: We don't need strndup. It was even causing
12979 problems: because Flex includes the headers *before* us,
12980 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12981 not visible.
12982 * lib/xstrndup.c: New.
12983 * src/scan-skel.l: Use it.
12984 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12985 * src/parse-skel.y: Use %directives instead of #defines.
12986
1239777d
AD
129872001-12-30 Akim Demaille <akim@epita.fr>
12988
12989 * src/skeleton.h: New.
12990 * src/output.c (output_parser, output_master_parser): Remove, dead
12991 code.
12992 * src/output.h (get_lines_number, actions_output, guards_output)
12993 (token_definitions_output): Prototype them.
12994 * src/parse-skel.y: Add the license notice.
12995 Include output.h and skeleton.h.
12996 (process_skeleton): Returns void, and takes a single parameter.
12997 * src/scan-skel.l: Add the license notice.
12998 Include skeleton.h.
12999 Don't use %option yylineno: it seems that then Flex imagines
13000 REJECT has been used, and therefore it won't reallocate its
13001 buffers (which makes no other sense to me than a bug). It results
13002 in warnings for `unused: yy_flex_realloc'.
13003
9b3add5b
RA
130042001-12-30 Robert Anisko <robert.anisko@epita.fr>
13005
13006 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13007 (MUSCLE_INSERT_PREFIX): ...to there.
13008 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13009 (MUSCLE_INSERT_PREFIX): Move from here...
13010
13011 * src/bison.hairy: Add a section directive. Put braces around muscle
13012 names. This parser skeleton is still broken, but Bison should not
13013 choke on a bad muscle 'syntax'.
13014 * src/bison.simple: Add a section directive. Put braces around muscle
13015 names.
13016
13017 * src/files.h (strsuffix, stringappend): Add declarations.
13018 (tab_extension): Add declaration.
13019 (short_base_name): Add declaration.
13020
13021 * src/files.c (strsuffix, stringappend): No longer static. These
13022 functions are used in the skeleton parser.
13023 (tab_extension): New.
13024 (compute_base_names): Use the computations done in this function
fab5b110 13025 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
13026 names.
13027 (short_base_name): No longer static.
13028
13029 * src/output.c (output_skeleton): New.
13030 (output): Disable call to output_master_parser, and give a try to
13031 a new skeleton handling system.
13032 (guards_output, actions_output): No longer static.
13033 (token_definitions_output, get_lines_number): No longer static.
13034
13035 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
13036
fab5b110 13037 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
13038 parse-skel.y.
13039
13040 * src/parse-skel.y: New file.
13041 * src/scan-skel.l: New file.
13042
b5b61c61
AD
130432001-12-29 Akim Demaille <akim@epita.fr>
13044
13045 %name-prefix is broken.
13046
13047 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
13048 Adjust all dependencies.
13049 * tests/headers.at (export YYLTYPE): Strengthen this test: use
13050 %name-prefix.
13051
13052 Renaming yylval but not yylloc is not consistent. Now we do.
13053
13054 * src/bison.simple: Prefix yylloc if used.
13055 * doc/bison.texinfo (Decl Summary): Document that.
13056
8c9a50be
AD
130572001-12-29 Akim Demaille <akim@epita.fr>
13058
13059 * doc/bison.texinfo: Promote `%long-directive' over
13060 `%long_directive'.
13061 Remove all references to fixed-output-files, yacc is enough.
13062
d99361e6
AD
130632001-12-29 Akim Demaille <akim@epita.fr>
13064
13065 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
13066 user prologue. These are defaults.
13067 * tests/actions.at (Mid-rule actions): Make sure the user can
13068 define YYDEBUG and YYERROR_VERBOSE.
13069
b9cecb91
AD
130702001-12-29 Akim Demaille <akim@epita.fr>
13071
13072 * src/output.c (header_output): Don't forget to export YYLTYPE and
13073 yylloc.
13074 * tests/headers.at (export YYLTYPE): New, make sure it does.
13075 * tests/regression.at (%union and --defines, Invalid CPP headers):
13076 Move to...
13077 * tests/headers.at: here.
13078
aea13e97
AD
130792001-12-29 Akim Demaille <akim@epita.fr>
13080
13081 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
13082
931394cb
AD
130832001-12-29 Akim Demaille <akim@epita.fr>
13084
13085 * tests/actions.at (Mid-rule actions): Output on a single line
13086 instead of several.
13087
704a47c4
AD
130882001-12-29 Akim Demaille <akim@epita.fr>
13089
13090 * doc/bison.texinfo: Formatting changes.
13091
091e20bb
AD
130922001-12-29 Akim Demaille <akim@epita.fr>
13093
13094 Don't store the token defs in a muscle, just be ready to output it
13095 on command. Now possible via `symbols'. Fixes a memory leak.
13096
13097 * src/output.c (token_definitions_output): New.
13098 (output_parser, header_output): Use it.
13099 * src/reader.c (symbols_save): Remove.
13100
cce71710
AD
131012001-12-29 Akim Demaille <akim@epita.fr>
13102
13103 * src/bison.simple: Do not provide a default for YYSTYPE and
13104 YYLTYPE before the user's prologue. Otherwise it's hardly... a
13105 default.
13106
82c035a8
AD
131072001-12-29 Akim Demaille <akim@epita.fr>
13108
13109 Mid-rule actions are simply... ignored!
13110
13111 * src/reader.c (readgram): Be sure to attach mid-rule actions to
13112 the empty-rule associated to the dummy symbol, not to the host
13113 rule.
13114 * tests/actions.at (Mid-rule actions): New.
13115
8419d367
AD
131162001-12-29 Akim Demaille <akim@epita.fr>
13117
13118 Memory leak.
13119
13120 * src/reader.c (reader): Free grammar.
13121
375d5806
AD
131222001-12-29 Akim Demaille <akim@epita.fr>
13123
13124 Memory leak.
13125
13126 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
13127 since it allocates it for each state, although only one is needed.
13128 (allocate_storage): Do it here.
13129
f51cb8ff
AD
131302001-12-29 Akim Demaille <akim@epita.fr>
13131
13132 * src/options.h, src/options.c (create_long_option_table): Rename
13133 as...
13134 (long_option_table_new): this, with a clearer prototype.
13135 (percent_table): Remove, unused,
13136 * src/getargs.c (getargs): Adjust.
13137
29e88316
AD
131382001-12-29 Akim Demaille <akim@epita.fr>
13139
13140 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
13141 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
13142 as states.
13143
b9f71f19
AD
131442001-12-29 Akim Demaille <akim@epita.fr>
13145
13146 * src/lalr.c (build_relations): Rename `states' as `states1'.
13147 Sorry, I don't understand exactly what it is, no better name...
13148
1a2b5d37
AD
131492001-12-29 Akim Demaille <akim@epita.fr>
13150
13151 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
13152 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
13153 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
13154 as rules.
13155
1cca533e
AD
131562001-12-29 Akim Demaille <akim@epita.fr>
13157
13158 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
13159 ago.
13160
c03ae966
AD
131612001-12-29 Akim Demaille <akim@epita.fr>
13162
13163 * src/reader.c, src/reader.h (user_toknums): Remove.
13164 Adjust all users to use symbols[i]->user_token_number.
13165
5a670b1e
AD
131662001-12-29 Akim Demaille <akim@epita.fr>
13167
13168 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
13169 Adjust all users to use symbols[i]->prec or ->assoc.
13170
ad949da9
AD
131712001-12-29 Akim Demaille <akim@epita.fr>
13172
13173 * src/reader.c, src/reader.h (tags): Remove.
13174 Adjust all users to use symbols[i]->tag.
13175
0e78e603
AD
131762001-12-29 Akim Demaille <akim@epita.fr>
13177
13178 * src/gram.h, src/gram.c (symbols): New, similar to state_table
13179 and rule_table.
13180 * src/reader.c (packsymbols): Fill this table.
13181 Drop sprec.
13182 * src/conflicts.c (resolve_sr_conflict): Adjust.
13183 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
13184 single table.
13185 Use symbols[i]->tag instead of tags[i].
13186
213e640e
AD
131872001-12-29 Akim Demaille <akim@epita.fr>
13188
13189 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
13190 In addition, put a comment in there, to replace...
13191 * tests/regression.at (%union and C comments): Remove.
13192
e7b8bef1
AD
131932001-12-29 Akim Demaille <akim@epita.fr>
13194
13195 * tests/regression.at (Web2c Actions): Blindly move the actual
13196 output as expected output. The contents *seem* right to me, but I
13197 can't pretend reading perfectly parser tables... Nonetheless, all
13198 the other tests pass correctly, the table look OK, even though the
13199 presence of `$axiom' is to be noted: AFAICS it is useless (but
13200 harmless).
13201
b68e7744
AD
132022001-12-29 Akim Demaille <akim@epita.fr>
13203
13204 * src/reader.c (readgram): Don't add the rule 0 if there were no
13205 rules read. In other words, add it _after_ having performed
13206 grammar sanity checks.
13207 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
13208
78d5bae9
AD
132092001-12-29 Akim Demaille <akim@epita.fr>
13210
13211 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
13212 visible, and some states have now a different number.
13213
ff442794
AD
132142001-12-29 Akim Demaille <akim@epita.fr>
13215
13216 * src/reader.c (readgram): Bind the initial rule's lineno to that
13217 of the first rule.
13218 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
13219 (Solved SR Conflicts): Adjust rule 0's line number.
13220
610ab194
AD
132212001-12-29 Akim Demaille <akim@epita.fr>
13222
13223 Fix the `GAWK Grammar' failure.
13224
13225 * src/LR0.c (final_state): Initialize to -1 so that we do compute
13226 the reductions of the first state which was mistakenly confused
13227 with the final state because precisely final_state was initialized
13228 to 0.
13229 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
13230 now noticed by Bison.
13231 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
13232 have a reduction on $default.
13233
29d29c8f
AD
132342001-12-29 Akim Demaille <akim@epita.fr>
13235
13236 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
13237 rule line numbers.
13238 * src/closure.c (print_closure): Likewise.
13239 * src/derives.c (print_derives): Likewise.
13240 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
13241 now.
13242
7c6b64d0
AD
132432001-12-29 Akim Demaille <akim@epita.fr>
13244
13245 * src/lalr.c (lookaheads_print): New.
13246 (lalr): Call it when --trace-flag.
13247 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
13248 are dumped.
13249
3d4daee3
AD
132502001-12-29 Akim Demaille <akim@epita.fr>
13251
13252 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
13253 when walking through ritem, even via rule->rhs.
13254 * src/reduce.c (dump_grammar, useful_production, reduce_output)
13255 (useful_production, useless_nonterminals): Likewise.
13256 (reduce_grammar_tables): Likewise, plus update nritems.
13257 * src/nullable.c (set_nullable): Likewise.
13258 * src/lalr.c (build_relations): Likewise.
13259 * tests/sets.at (Nullable): Adjust.
13260 Fortunately, now, the $axiom is no longer nullable.
13261
9e7f6bbd
AD
132622001-12-29 Akim Demaille <akim@epita.fr>
13263
13264 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
13265 the 0-sentinel.
13266 * src/gram.c (ritem_longest_rhs): Likewise.
13267 * src/reduce.c (nonterminals_reduce): Likewise.
13268 * src/print_graph.c (print_graph): Likewise.
13269 * src/output.c (output_rule_data): Likewise.
13270 * src/nullable.c (set_nullable): Likewise.
13271
255ef638
AD
132722001-12-29 Akim Demaille <akim@epita.fr>
13273
13274 * src/output.c: Comment changes.
13275
0d8a7363
AD
132762001-12-27 Paul Eggert <eggert@twinsun.com>
13277
13278 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
13279 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
13280 Sparc, as they were causing more porting problems than the
13281 (minor) performance improvement was worth.
13282
13283 Also, catch up with 1.31's YYSTD.
13284
3db472b9
AD
132852001-12-27 Akim Demaille <akim@epita.fr>
13286
13287 * src/output.c (output_gram): Rely on nritems, not the
13288 0-sentinel. See below.
13289 Use -1 as separator, not 0.
13290 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
13291 Rely on -1 as separator in yyrhs, instead of 0.
13292 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
13293 twice `Now at end of input', therefore there are two lines less to
13294 expect.
13295
b365aa05
AD
132962001-12-27 Akim Demaille <akim@epita.fr>
13297
13298 * tests/regression.at (Unresolved SR Conflicts):
13299 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
13300 below.
13301
30171f79
AD
133022001-12-27 Akim Demaille <akim@epita.fr>
13303
13304 * src/LR0.c (new_state): Recognize the final state by the fact it
13305 is reached by eoftoken.
13306 (insert_start_shifting_state, insert_eof_shifting_state)
13307 (insert_accepting_state, augment_automaton): Remove, since now
13308 these states are automatically computed from the initial state.
13309 (generate_states): Adjust.
13310 * src/print.c: When reporting a rule number to the user, substract
13311 1, so that the axiom rule is rule 0, and the first user rule is 1.
13312 * src/reduce.c: Likewise.
13313 * src/print_graph.c (print_core): For the time being, just as for
13314 the report, depend upon --trace-flags to dump the full set of
13315 items.
13316 * src/reader.c (readgram): Once the grammar read, insert the rule
13317 0: `$axiom: START-SYMBOL $'.
13318 * tests/set.at: Adjust: rule 0 is now displayed, and since the
13319 number of the states has changed (the final state is no longer
13320 necessarily the last), catch up.
13321
75142d45
AD
133222001-12-27 Akim Demaille <akim@epita.fr>
13323
13324 Try to make the use of the eoftoken valid. Given that its value
13325 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
13326 is used instead of > 0 where appropriate, (ii), depend upon nritems
13327 instead of the 0-sentinel.
13328
13329 * src/gram.h, src/gram.c (nritems): New.
13330 Expected to be duplication of nitems, but for the time being...
13331 * src/reader.c (packgram): Assert nritems and nitems are equal.
13332 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
13333 * src/closure.c (print_closure, print_fderives): Likewise.
13334 * src/gram.c (ritem_print): Likewise.
13335 * src/print.c (print_core, print_grammar): Likewise.
13336 * src/print_graph.c: Likewise.
13337
b7c49edf
AD
133382001-12-27 Akim Demaille <akim@epita.fr>
13339
13340 * src/main.c (main): If there are complains after grammar
13341 reductions, then output the report anyway if requested, then die.
13342 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
13343 * src/reader.c (eoftoken): New.
13344 (parse_token_decl): If the token being defined has value `0', it
13345 is the eoftoken.
13346 (packsymbols): No longer hack `tags' to insert `$' by hand.
13347 Be sure to preserve the value of the eoftoken.
13348 (reader): Make sure eoftoken is defined.
13349 Initialize nsyms to 0: now eoftoken is created just like the others.
13350 * src/print.c (print_grammar): Don't special case the eof token.
13351 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
13352 lie anyway, albeit pleasant.
13353 * tests/calc.at: Exercise error messages with eoftoken.
13354 Change the grammar so that empty input is invalid.
13355 Adjust expectations.
13356 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
13357
ec2da99f
AD
133582001-12-27 Akim Demaille <akim@epita.fr>
13359
13360 * configure.in: Check the protos of strchr ans strspn.
13361 Replace strchr if needed.
13362 * src/system.h: Provide the protos of strchr, strspn and memchr if
13363 missing.
13364 * lib/strchr.c: New.
13365 * src/reader.c (symbols_save): Use strchr.
13366
8adfa272
AD
133672001-12-27 Akim Demaille <akim@epita.fr>
13368
13369 * src/print.c, src/print_graph.c (escape): New.
13370 Use it to quote the TAGS outputs.
13371 * src/print_graph.c (print_state): Now errors are in red, and
13372 reductions in green.
13373 Prefer high to wide: output the state number on a line of its own.
13374
80dac38c
AD
133752001-12-27 Akim Demaille <akim@epita.fr>
13376
13377 * src/state.h, src/state.c (reductions_new): New.
13378 * src/LR0.c (set_state_table): Let all the states have a
13379 `reductions', even if reduced to 0.
13380 (save_reductions): Adjust.
13381 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
13382 * src/print.c (print_reductions, print_actions): Adjust.
13383 * src/output.c (action_row): Adjust.
13384
2cec70b9
AD
133852001-12-27 Akim Demaille <akim@epita.fr>
13386
13387 * src/state.h, src/state.c (errs_new, errs_dup): New.
13388 * src/LR0.c (set_state_table): Let all the states have an errs,
13389 even if reduced to 0.
13390 * src/print.c (print_errs, print_reductions): Adjust.
13391 * src/output.c (output_actions, action_row): Adjust.
13392 * src/conflicts.c (resolve_sr_conflict): Adjust.
13393
13ca549a
AD
133942001-12-27 Akim Demaille <akim@epita.fr>
13395
13396 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
13397
5092aba5
AD
133982001-12-27 Akim Demaille <akim@epita.fr>
13399
13400 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
13401 * src/print.c: here.
13402 (lookaheadset, shiftset): New, used as additional storage by
13403 print_reductions.
13404 (print_results): Adjust.
13405 (print_shifts, print_gotos, print_errs): New, extracted from...
13406 (print_actions): here.
13407 * src/print_graph.c (print_actions): Remove dead code.
13408
11e2beca
AD
134092001-12-27 Akim Demaille <akim@epita.fr>
13410
13411 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
13412 `$n' and `@n'.
13413
dac3c910
AD
134142001-12-27 Akim Demaille <akim@epita.fr>
13415
13416 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
13417 (build_relations): Adjust.
13418
d0b0fefa
AD
134192001-12-27 Akim Demaille <akim@epita.fr>
13420
13421 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
13422 duplication.
13423
adc8c848
AD
134242001-12-27 Akim Demaille <akim@epita.fr>
13425
13426 * src/reader.c (packgram): Catch nitems overflows.
13427
14d293ac
AD
134282001-12-27 Akim Demaille <akim@epita.fr>
13429
13430 * src/files.c, src/files.h (guard_obstack): Remove.
13431 * src/output.c (output): Adjust.
13432 * src/reader.c (parse_braces): New, factoring...
13433 (copy_action, copy_guard): these two which are renamed as...
13434 (parse_action, parse_guard): these.
13435 As a voluntary consequence, using braces around guards is now
13436 mandatory.
13437
f499b062
AD
134382001-12-27 Akim Demaille <akim@epita.fr>
13439
13440 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
13441 * src/reader.c (symbol_list): `guard' and `guard_line' are new
13442 members.
13443 (symbol_list_new): Adjust.
13444 (copy_action): action_line is the first line, not the last.
13445 (copy_guard): Just as for actions, store the `action' only, not
13446 the switch/case/break flesh.
13447 Don't parse the user action that might follow the guard, let...
13448 (readgram): do it, i.e., now, there can be an action after a
13449 guard.
13450 In other words the guard is just explicitly optional.
13451 (packgram): Adjust.
13452 * src/output.c (guards_output): New.
13453 (output_parser): Call it when needed.
13454 (output): Also free the guard and attrs obstacks.
13455 * src/files.c, src/files.h (obstack_save): Remove.
13456 (output_files): Remove.
13457 As a result, if one needs the former `.act' file, using an
13458 appropriate skeleton which requires actions and guards is now
13459 required.
13460 * src/main.c (main): Adjust.
13461 * tests/semantic.at: New.
13462 * tests/regression.at: Use `input.y' as input file name.
13463 Avoid 8+3 problems by requiring input.c when the test needs the
13464 parser.
13465
d945f5cd
AD
134662001-12-27 Akim Demaille <akim@epita.fr>
13467
13468 * src/reader.c (symbol_list_new): Be sure to initialize all the
13469 fields.
13470
d200e455
AD
134712001-12-27 Akim Demaille <akim@epita.fr>
13472
13473 All the hacks using a final pseudo state are now useless.
13474
13475 * src/LR0.c (set_state_table): state_table holds exactly nstates.
13476 * src/lalr.c (nLA): New.
13477 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
13478 instead of lookaheadsp from the pseudo state (nstate + 1).
13479
f9507c28
AD
134802001-12-27 Akim Demaille <akim@epita.fr>
13481
13482 * src/output.c (action_row, token_actions): Use a state_t instead
13483 of a integer, and nlookaheads instead of the following state's
13484 lookaheadsp.
13485
065fbd27
AD
134862001-12-27 Akim Demaille <akim@epita.fr>
13487
13488 * src/conflicts.c (log_resolution, flush_shift)
13489 (resolve_sr_conflict, set_conflicts, solve_conflicts)
13490 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13491 (conflicts_print, print_reductions): Use a state_t instead of an
13492 integer when referring to a state.
13493 As much as possible, depend upon nlookaheads, instead of the
13494 `lookaheadsp' member of the following state (since lookaheads of
13495 successive states are successive, the difference between state n + 1
13496 and n served as the number of lookaheads for state n).
13497 * src/lalr.c (add_lookback_edge): Likewise.
13498 * src/print.c (print_core, print_actions, print_state)
13499 (print_results): Likewise.
13500 * src/print_graph.c (print_core, print_actions, print_state)
13501 (print_graph): Likewise.
13502 * src/conflicts.h: Adjust.
13503
1b177bd7
AD
135042001-12-27 Akim Demaille <akim@epita.fr>
13505
13506 * src/bison.hairy: Formatting/comment changes.
13507 ANSIfy.
13508 Remove `register' indications.
13509 Add plenty of `static'.
13510
7742ddeb
AD
135112001-12-27 Akim Demaille <akim@epita.fr>
13512
13513 * src/output.c (prepare): Drop the muscle `ntbase' which
13514 duplicates ntokens.
13515 * src/bison.simple: Formatting/comment changes.
13516 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
13517 is an undocumented synonym.
13518
1fa14068
AD
135192001-12-22 Akim Demaille <akim@epita.fr>
13520
13521 * src/output.c (output_table_data): Change the prototype to use
13522 `int' for array ranges: some invocations do pass an int, not a
13523 short.
13524 Reported by Wayne Green.
13525
b9752825
AD
135262001-12-22 Akim Demaille <akim@epita.fr>
13527
13528 Some actions of web2c.y are improperly triggered.
13529 Reported by Mike Castle.
13530
13531 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
13532 * tests/regression.at (Web2c): Rename as...
13533 (Web2c Report): this.
13534 (Web2c Actions): New.
13535
776209d6
AD
135362001-12-22 Akim Demaille <akim@epita.fr>
13537
13538 Reductions in web2c.y are improperly reported.
13539 Reported by Mike Castle.
13540
13541 * src/conflicts.c (print_reductions): Fix.
13542 * tests/regression.at (Web2c): New.
13543
275fc3ad
AD
135442001-12-18 Akim Demaille <akim@epita.fr>
13545
13546 Some host fail on `assert (!"foo")', which expands to
13547 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
13548 Reported by Nelson Beebee.
13549
13550 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
13551 `#define it_succeeded 0' and `assert (it_succeeded)'.
13552
897668ee
MA
135532001-12-17 Marc Autret <autret_m@epita.fr>
13554
13555 * src/bison.simple: Don't hard code the skeleton line and filename.
13556 * src/output.c (output_parser): Rename 'line' as 'output_line'.
13557 New line counter 'skeleton_line' (skeleton-line muscle).
13558
ab3399e0
PE
135592001-12-17 Paul Eggert <eggert@twinsun.com>
13560
13561 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
13562 YYDEBUG must be defined to a nonzero value.
13563
13564 * src/bison.simple (yytname): Do not assume that the user defines
13565 YYDEBUG to a properly parenthesized expression.
13566
3877f72b
AD
135672001-12-17 Akim Demaille <akim@epita.fr>
13568
13569 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
13570 nlookaheads is a new member.
13571 Adjust all users.
13572 * src/lalr.h (nlookaheads): Remove this orphan declaration.
13573 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
13574 state.
776209d6 13575
331dbc1b
AD
135762001-12-17 Akim Demaille <akim@epita.fr>
13577
13578 * src/files.h, src/files.c (open_files, close_files): Remove.
13579 * src/main.c (main): Don't open/close files, nor invoke lex_free,
13580 let...
13581 * src/reader.c (reader): Do it.
776209d6 13582
be750e4c
AD
135832001-12-17 Akim Demaille <akim@epita.fr>
13584
13585 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 13586
709ae8c6
AD
135872001-12-17 Akim Demaille <akim@epita.fr>
13588
13589 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13590 (flush_reduce): New.
13591 (resolve_sr_conflict): Adjust.
776209d6 13592
f87685c3
AD
135932001-12-17 Akim Demaille <akim@epita.fr>
13594
13595 * src/output.c (output_obstack): Be static and rename as...
13596 (format_obstack): this, to avoid any confusion with files.c's
13597 output_obstack.
13598 * src/reader.h (muscle_obstack): Move to...
13599 * src/output.h: here, since it's defined in output.c.
13600
837491d8
AD
136012001-12-17 Akim Demaille <akim@epita.fr>
13602
13603 * src/output.c (action_row, save_column, default_goto)
13604 (sort_actions, matching_state, pack_vector): Better variable
13605 locality.
13606
796d61fb
AD
136072001-12-17 Akim Demaille <akim@epita.fr>
13608
13609 * src/output.c: Various formatting changes.
776209d6 13610
64d15509
AD
136112001-12-17 Akim Demaille <akim@epita.fr>
13612
13613 * src/files.c (output_files): Free the output_obstack.
13614 * src/main.c (main): Call print and print_graph conditionally.
13615 * src/print.c (print): Work unconditionally.
13616 * src/print_graph.c (print_graph): Work unconditionally.
13617 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13618
fbc8ecb7
MA
136192001-12-16 Marc Autret <autret_m@epita.fr>
13620
13621 * src/output.c (actions_output): Fix. When we use %no-lines,
13622 there is one less line per action.
13623
f0440388
MA
136242001-12-16 Marc Autret <autret_m@epita.fr>
13625
13626 * src/bison.simple: Remove a useless #line directive.
13627 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13628 * src/output.c (get_lines_number): New.
776209d6 13629 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
13630 output muscles.
13631 Fix line numbering.
13632 (actions_output): Computes the number of lines taken by actions.
13633 (output_master_parser): Insert new skeleton which is the name of
13634 the output parser file name.
13635
a79986b8
MA
136362001-12-15 Marc Autret <autret_m@epita.fr>
13637
13638 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13639
4ec8e00f
MA
136402001-12-15 Marc Autret <autret_m@epita.fr>
13641
13642 * src/output.c (output_gram): Keep track of the hairy one.
13643
1a4648ff
AD
136442001-12-15 Akim Demaille <akim@epita.fr>
13645
13646 Make `make distcheck' work.
13647
13648 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13649 system.h which uses libgettext.h.
13650
9c2c67e6
AD
136512001-12-15 Akim Demaille <akim@epita.fr>
13652
13653 * src/nullable.c (set_nullable): Useless rules must be skipped,
13654 otherwise, since we range over their symbols, we might look at a
13655 nonterminal which no longer ``exists'', i.e., it is not counted in
13656 `nvars', hence we overflow our arrays.
13657
93ede233
AD
136582001-12-15 Akim Demaille <akim@epita.fr>
13659
13660 The header can also be produced directly, without any obstack!
13661 Yahoo!
13662
13663 * src/files.c, src/files.h (defines_obstack): Remove.
13664 (compute_header_macro): Global.
13665 (defines_obstack_save): Remove.
13666 * src/reader.c (parse_union_decl): No longer output to
13667 defines_obstack: its content can be found in the `stype' muscle
13668 anyway.
13669 (output_token_translations): Merge into...
13670 (symbols_output): this.
13671 Rename as...
13672 (symbols_save): this.
13673 (reader): Adjust.
13674 * src/output.c (header_output): New.
13675 (output): Call it.
13676
2666f928
AD
136772001-12-15 Akim Demaille <akim@epita.fr>
13678
13679 * src/reader.c (parse_union_decl): Instead of handling two obstack
13680 simultaneously, use one to define the `stype' muscle, and use the
13681 value of the latter to fill defines_obstack.
13682 (copy_comment): Remove.
13683 (copy_comment2): Work for a single obstack.
13684 Rename as...
13685 (copy_comment): this.
13686
428046f8
AD
136872001-12-15 Akim Demaille <akim@epita.fr>
13688
13689 * src/lex.c, src/lex.h (xgetc): No longer static.
13690 * src/reader.c (parse_union_decl): Revamp.
13691
ea52d706
AD
136922001-12-15 Akim Demaille <akim@epita.fr>
13693
13694 Still making progress in separating Bison into (i) input, (ii)
13695 process, (iii) output: now we can directly output the parser file
13696 without using table_obstack at all.
13697
13698 * src/files.c, src/files.h (table_obstack): Bye bye.
13699 (parser_file_name): New.
13700 * src/files.c (compute_output_file_names): Compute it.
13701 * src/output.c (actions_output, output_parser)
13702 (output_master_parser): To a file instead of an obstack.
13703
3f96f4dc
AD
137042001-12-15 Akim Demaille <akim@epita.fr>
13705
13706 Attach actions to rules, instead of pre-outputting them to
13707 actions_obstack.
13708
13709 * src/gram.h (rule_t): action and action_line are new members.
13710 * src/reader.c (symbol_list): Likewise.
13711 (copy_action): Save the actions within the rule.
13712 (packgram): Save them in rule_table.
13713 * src/output.c (actions_output): New.
13714 (output_parser): Use it on `%%actions'.
13715 (output_rule_data): Don't free rule_table.
13716 (output): Do it.
13717 (prepare): Don't save the `action' muscle.
13718 * src/bison.simple: s/%%action/%%actions/.
13719
51576fb3
AD
137202001-12-15 Akim Demaille <akim@epita.fr>
13721
13722 * src/reader.c (copy_action): When --yacc, don't append a `;'
13723 to the user action: let it fail if lacking.
dee049eb 13724 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 13725
2648a72d
AD
137262001-12-14 Akim Demaille <akim@epita.fr>
13727
13728 * src/lex.c (literalchar): Simply return the char you decoded, non
13729 longer mess around with obstacks and int pointers.
13730 Adjust all callers.
13731
92790e5b
AD
137322001-12-14 Akim Demaille <akim@epita.fr>
13733
13734 * src/lex.c (literalchar): Don't escape the special characters,
13735 just decode them, and keep them as char (before, eol was output as
13736 the 2 char string `\n' etc.).
13737 * src/output.c (output_rule_data): Use quotearg to output the
13738 token strings.
13739
927c1557
PE
137402001-12-13 Paul Eggert <eggert@twinsun.com>
13741
13742 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13743 Do not infringe on the global user namespace when using C++.
13744 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13745 All uses of `fprintf' and `stderr' changed.
13746
13747 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13748
ed8e1f68
AD
137492001-12-13 Akim Demaille <akim@epita.fr>
13750
13751 The computation of nullable is broken: it doesn't handle empty
13752 RHS's properly.
13753
13754 * tests/torture.at (GNU AWK Grammar): New.
13755 * tests/sets.at (Nullable): New.
13756 * src/nullable.c (set_nullable): Instead of blindly looping over
13757 `ritems', loop over the rules, and then over their rhs's.
13758
13759 Work around Autotest bugs.
13760
13761 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13762 frame, because Autotest understand lines starting with a `+' as
13763 traces from the shell. Then, they are not processed properly.
13764 Admittedly an Autotest bug, but we don't have time to wait for
13765 Autotest to catch up.
13766 * tests/regression.at (Broken Closure): Adjust to the new table
13767 frames.
13768 Move to...
13769 * tests/sets.at: here.
13770
cb581495
AD
137712001-12-13 Akim Demaille <akim@epita.fr>
13772
13773 * src/closure.c (closure): Use nrules instead of playing tricks
13774 with BITS_PER_WORD.
13775
2e729273
AD
137762001-12-13 Akim Demaille <akim@epita.fr>
13777
13778 * src/print.c (print_actions): Output the handling of `$' as the
13779 traces do: shifting the token EOF. Before EOF was treated as a
13780 nonterminal.
13781 * tests/regression.at: Adjust some tests.
13782 * src/print_graph.c (print_core): Complete the set of items via
13783 closure. The next-to-final and final states are still unsatisfying,
13784 but that's to be addressed elsewhere.
13785 No longer output the rule numbers, but do output the state number.
13786 A single loop for the shifts + gotos is enough, but picked a
13787 distinct color for each.
13788 (print_graph): Initialize and finalize closure.
13789
107f7dfb
AD
137902001-12-13 Akim Demaille <akim@epita.fr>
13791
13792 * src/reader.c (readgram): Remove dead code, an strip useless
13793 braces.
13794 (get_type): Remove, unused.
13795
9b53a24f
AD
137962001-12-12 Akim Demaille <akim@epita.fr>
13797
13798 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13799 on that of lib/error.c.
13800
dbfb6dcd
AD
138012001-12-12 Akim Demaille <akim@epita.fr>
13802
13803 Some hosts don't like `/' in includes.
13804
13805 * src/system.h: Include libgettext.h without qualifying the path.
13806 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13807 $(top_srcdir).
13808
c25fb648
MA
138092001-12-11 Marc Autret <autret_m@epita.fr>
13810
13811 * src/output.c (output_parser): Remove useless muscle.
13812
710ddc4f
MA
138132001-12-11 Marc Autret <autret_m@epita.fr>
13814
13815 * src/bison.simple: Remove #line just before %%epilogue. It
13816 is now handled in ...
13817 * src/reader.c (read_additionnal_code): Add the output of a
13818 #line for the epilogue.
13819
e83d80b8
MA
138202001-12-10 Marc Autret <autret_m@epita.fr>
13821
927c1557 13822 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
13823 replace precedent remove.
13824 * src/bison.simple: Remove #line before %%prologue because
13825 %%input-line is wrong at this time.
13826
971d5158
MA
138272001-12-10 Marc Autret <autret_m@epita.fr>
13828
13829 * src/reader.c (symbols_output): Clean up.
927c1557 13830 * src/output.c (output_gram, output): Clean up.
971d5158 13831
5edafffd
AD
138322001-12-10 Akim Demaille <akim@epita.fr>
13833
13834 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13835 * src/LR0.c (set_state_table): here.
13836 * src/lalr.c (lalr): Call it.
13837
0279f8e9
AD
138382001-12-10 Akim Demaille <akim@epita.fr>
13839
13840 * src/state.h (shifts): Remove the `number' member: shifts are
13841 attached to state, hence no longer need to be labelled with a
13842 state number.
13843
190c4f5f
AD
138442001-12-10 Akim Demaille <akim@epita.fr>
13845
13846 Now that states have a complete set of members, the linked list of
13847 shifts is useless: just fill directly the state's shifts member.
13848
13849 * src/state.h (shifts): Remove the `next' member.
13850 * src/LR0.c (first_state, last_state): Remove.
13851 Adjust the callers.
13852 (augment_automaton): Don't look for the shifts that must be added
13853 a shift on EOF: it is those of the state we looked for! But now,
13854 since shifts are attached, it is no longer needed to looking
13855 merely by its id: its number.
13856
2a73b93d
AD
138572001-12-10 Akim Demaille <akim@epita.fr>
13858
13859 * src/LR0.c (augment_automaton): Better variable locality.
13860 Remove an impossible branch: if there is a state corresponding to
13861 the start symbol being shifted, then there is shift for the start
13862 symbol from the initial state.
13863
74392f6a
AD
138642001-12-10 Akim Demaille <akim@epita.fr>
13865
13866 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13867 only when appropriate: when insert_start_shifting_state' is not
13868 invoked.
13869 * tests/regression.at (Rule Line Numbers): Adjust.
13870
37c82725
AD
138712001-12-10 Akim Demaille <akim@epita.fr>
13872
13873 * src/LR0.c (augment_automaton): Now that all states have shifts,
13874 merge the two cases addition shifts to the initial state.
13875
6a164e0c
AD
138762001-12-10 Akim Demaille <akim@epita.fr>
13877
13878 * src/lalr.c (set_state_table): Move to...
13879 * src/LR0.c: here.
13880 * src/lalr.c (lalr): Don't call it...
13881 * src/LR0.c (generate_states): do it.
13882 * src/LR0.h (first_state): Remove, only the table is used.
13883
7215de24
AD
138842001-12-10 Akim Demaille <akim@epita.fr>
13885
13886 * src/LR0.h (first_shift, first_reduction): Remove.
13887 * src/lalr.c: Don't use first_shift: find shifts through the
13888 states.
13889
80e25d4d
AD
138902001-12-10 Akim Demaille <akim@epita.fr>
13891
13892 * src/LR0.c: Attach shifts to states as soon as they are
13893 computed.
13894 * src/lalr.c (set_state_table): Instead of assigning shifts to
13895 state, just assert that the mapping was properly done.
13896
0ab3728b
AD
138972001-12-10 Akim Demaille <akim@epita.fr>
13898
13899 * src/LR0.c (insert_start_shift): Rename as...
13900 (insert_start_shifting_state): this.
13901 (insert_eof_shifting_state, insert_accepting_state): New.
13902 (augment_automaton): Adjust.
13903 Better locality of the variables.
13904 When looking if the start_symbol is shifted from the initial
13905 state, using `while (... symbol != start_symbol ...)' sounds
13906 better than `while (... symbol < start_symbol ...)': If fail
13907 to see how the order between symbols could be relevant!
13908
78af9bbc
AD
139092001-12-10 Akim Demaille <akim@epita.fr>
13910
13911 * src/getargs.h: Don't declare `spec_name_prefix' and
13912 `spec_file_prefix', declared by src/files.h.
13913 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13914 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13915 * src/output.c (prepare): Adjust.
13916 * src/reader.c (symbols_output): Likewise.
13917 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13918
bdef2a41
AD
139192001-12-10 Akim Demaille <akim@epita.fr>
13920
13921 * src/muscle_tab.c (muscle_init): NULL is a better default than
13922 `"0"'.
13923
3735969c
AD
139242001-12-10 Akim Demaille <akim@epita.fr>
13925
13926 * src/reader.c (reader): Calling symbols_output once is enough.
13927
49701457
AD
139282001-12-10 Akim Demaille <akim@epita.fr>
13929
13930 Now that states have a complete set of members, the linked list of
13931 reductions is useless: just fill directly the state's reductions
13932 member.
13933
13934 * src/state.h (struct reductions): Remove member `number' and
13935 `next'.
13936 * src/LR0.c (first_reduction, last_reduction): Remove.
13937 (save_reductions): Don't link the new reductions, store them in
13938 this_state.
13939 * src/lalr.c (set_state_table): No need to attach reductions to
13940 states, it's already done.
13941 * src/output.c (output_actions): No longer free the shifts, then
13942 the reductions, then the states: free all the states and their
13943 members.
13944
0edad749
AD
139452001-12-10 Akim Demaille <akim@epita.fr>
13946
13947 * src/options.c (OPTN, DRTV, BOTH): New.
13948 (option_table): Use them.
13949
0edad749
AD
13950 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13951 the job of system.h.
13952 * src/options.c: Don't include stdio.h and xalloc.h for the same
13953 reasons.
13954
5449dd0f
AD
139552001-12-10 Akim Demaille <akim@epita.fr>
13956
13957 * src/output.c (output, prepare): Make sure the values of the
13958 muscles `action' and `prologue' are 0-terminated.
13959
a870c567
AD
139602001-12-10 Akim Demaille <akim@epita.fr>
13961
13962 Clean up GCC warnings.
13963
13964 * src/reader.c (copy_action): `buf' is not used.
13965 (parse_skel_decl): Be static.
13966 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13967 * src/options.h (create_long_option_table): Have a real prototype.
13968 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13969 (hash_delete_at): Return const void *.
13970 Adjust casts to preserve the const.
13971
80df8768
AD
139722001-12-10 Akim Demaille <akim@epita.fr>
13973
13974 * configure.in: Require 2.52g.
13975 M4 is not needed, but AUTOM4TE is.
13976 * m4/m4.m4: Remove.
13977 * tests/Makefile.am: Adjust.
13978
f693ad14
AD
139792001-12-10 Akim Demaille <akim@epita.fr>
13980
13981 One structure for states is enough, even though theoretically
13982 there are LR(0) states and LALR(1) states.
13983
13984 * src/lalr.h (state_t): Remove.
13985 (state_table): Be state_t **, not state_t *.
13986 * src/state.h (core, CORE_ALLOC): Rename as...
13987 (state_t, STATE_ALLOC): this.
13988 Add the LALR(1) members: shifts, reductions, errs.
13989 * src/LR0.c (state_table): Rename as...
13990 (state_hash): this, to avoid name clashes with the global
13991 `state_table'.
13992 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13993 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13994
74ffbcb6
AD
139952001-12-10 Akim Demaille <akim@epita.fr>
13996
13997 Bison dumps core on bash.y.
13998 Reported by Pascal Bart.
13999
14000 * src/warshall.c (bitmatrix_print): New.
14001 (TC): Use it.
ba0fe3c7 14002 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
14003 j must be the outer loop.
14004 * tests/regression.at (Broken Closure): New.
14005
07708e19
AD
140062001-12-05 Akim Demaille <akim@epita.fr>
14007
14008 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
14009 its argument.
ba1ecc07 14010 Reported by Peter Hamorsky.
07708e19 14011
92b16366
AD
140122001-12-05 Akim Demaille <akim@epita.fr>
14013
14014 * src/conflicts.c (err_table): Remove.
14015 (resolve_sr_conflict): Adjust.
14016 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
14017 Rename as...
14018 (state_t.reductions, state_t.shifts): this.
14019
076ab033
AD
140202001-12-05 Akim Demaille <akim@epita.fr>
14021
14022 * src/reduce.c (reduce_grammar_tables): No longer disable the
14023 removal of useless rules via CPP but via `if (0)', so that the
14024 compiler still check the code is valid.
14025 For instance, it should have noticed `rline' no longer exists: use
14026 the `line' member of rule_t.
14027 * src/gram.c (dummy, rline): Remove, unused.
14028
3843c413
AD
140292001-12-05 Akim Demaille <akim@epita.fr>
14030
14031 * src/output.c (pack_vector): Use assert, not berror.
14032 * src/main.c (berror): Remove, unused.
14033
43168960
AD
140342001-12-05 Akim Demaille <akim@epita.fr>
14035
14036 New experimental feature: if --verbose --trace output all the
14037 items of a state, not only its kernel.
14038
14039 * src/print.c (print_core): If `trace_flag', then invoke closure
14040 before outputting the items of the state (print_core is no longer
14041 a correct name them).
14042 (print_results): Invoke new_closure/free_closure if needed.
14043
b2872512
AD
140442001-12-05 Akim Demaille <akim@epita.fr>
14045
14046 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
14047 * src/closure.c, src/closure.h (itemsetsize): Rename as...
14048 (nitemset): for consistency with the rest of the project.
14049
23cbcc6c
AD
140502001-12-05 Akim Demaille <akim@epita.fr>
14051
14052 * src/closure.c (print_closure): Improve.
14053 (closure): Use it for printing input and output.
14054
03ec521c
AD
140552001-12-05 Akim Demaille <akim@epita.fr>
14056
14057 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
14058 indexed by nonterminals.
14059
3a7456dd
AD
140602001-12-05 Akim Demaille <akim@epita.fr>
14061
14062 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
14063 what it was!).
14064 * src/warshall.h: Remove accidental duplication of the content.
14065
1cbcf2e7
AD
140662001-12-05 Akim Demaille <akim@epita.fr>
14067
14068 * src/closure.c (set_fderives): De-obfuscate.
14069
84182270
AD
140702001-12-05 Akim Demaille <akim@epita.fr>
14071
14072 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
14073
3f6f053c
AD
140742001-12-05 Akim Demaille <akim@epita.fr>
14075
14076 * src/closure.c (set_firsts): De-obfuscate.
14077
7a5350ba
AD
140782001-12-05 Akim Demaille <akim@epita.fr>
14079
14080 * src/output.c (action_row): De-obfuscate
14081 using the good o' techniques: arrays not pointers, variable
14082 locality, BITISSET, RESETBIT etc.
14083
d954473d
AD
140842001-12-05 Akim Demaille <akim@epita.fr>
14085
14086 Pessimize the code to simplify it: from now on, all the states
14087 have a valid SHIFTS, which NSHIFTS is possibly 0.
14088
14089 * src/LR0.c (shifts_new): Be global and move to..
14090 * src/state.c, src/state.h: here.
14091 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
14092 * src/print_graph: Adjust.
14093
9839bbe5
AD
140942001-12-05 Akim Demaille <akim@epita.fr>
14095
14096 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
14097 * src/conflicts.c: Use it.
14098 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
14099 incorrectly ``simplified''.
14100
9f136c07
AD
141012001-12-05 Akim Demaille <akim@epita.fr>
14102
14103 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
14104 using the good o' techniques: arrays not pointers, variable
14105 locality, BITISSET, RESETBIT etc.
14106
b608206e
AD
141072001-12-05 Akim Demaille <akim@epita.fr>
14108
14109 * src/state.h (SHIFT_SYMBOL): New.
14110 * src/conflicts.c: Use it to deobfuscate.
14111
52afa962
AD
141122001-12-05 Akim Demaille <akim@epita.fr>
14113
14114 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
14115 (print_reductions): De-obfuscate using the good o' techniques:
14116 arrays not pointers, variable locality, BITISSET.
14117
e74dc321
AD
141182001-12-05 Akim Demaille <akim@epita.fr>
14119
14120 * src/conflicts.c (print_reductions): Arrays, not pointers.
14121 Use BITISSET.
14122
768fca83
AD
141232001-12-05 Akim Demaille <akim@epita.fr>
14124
14125 * src/conflicts.c (print_reductions): Pessimize, but clarify.
14126
a17e599f
AD
141272001-12-05 Akim Demaille <akim@epita.fr>
14128
14129 * src/conflicts.c (print_reductions): Improve variable locality.
14130
a04bc341
AD
141312001-12-05 Akim Demaille <akim@epita.fr>
14132
14133 * src/conflicts.c (print_reductions): Pessimize, but clarify.
14134
c8ea038e
AD
141352001-12-05 Akim Demaille <akim@epita.fr>
14136
14137 * src/conflicts.c (print_reductions): Improve variable locality.
14138
aa2aab3c
AD
141392001-12-05 Akim Demaille <akim@epita.fr>
14140
14141 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
14142 * src/lalr.c: Use them.
14143
b178c8cc
AD
141442001-12-05 Akim Demaille <akim@epita.fr>
14145
14146 * src/LR0.c (augment_automaton): Formatting changes.
14147 Better variable locality.
14148
f67d13aa
AD
141492001-12-05 Akim Demaille <akim@epita.fr>
14150
14151 * src/lalr.c (matrix_print): New.
14152 (transpose): Use it.
14153 Use arrays instead of pointers.
14154
c2713865
AD
141552001-12-05 Akim Demaille <akim@epita.fr>
14156
14157 * src/lalr.c (maxrhs): Move to...
14158 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
14159 * src/lalr.c (build_relations): Adjust.
14160
9887c18a
AD
141612001-12-05 Akim Demaille <akim@epita.fr>
14162
14163 * src/lalr.c (transpose): Free the memory allocated to the
14164 argument, as it is replaced by the results by the unique caller.
14165 (build_relations): Merely invoke transpose: it handles the memory
14166 deallocation.
14167 Improve variable locality.
14168 Avoid variables used as mere abbreviations.
14169 (compute_lookaheads): Use arrays instead of pointers.
14170
4d4f699c
AD
141712001-12-05 Akim Demaille <akim@epita.fr>
14172
14173 * src/lalr.c (initialize_F): Improve variable locality.
14174 Avoid variables used as mere abbreviations.
14175
80a69750
AD
141762001-12-05 Akim Demaille <akim@epita.fr>
14177
14178 * src/derives.c (print_derives): Display the ruleno.
14179 * src/lalr.c (initialize_F, transpose): Better variable locality
14180 to improve readability.
14181 Avoid variables used as mere abbreviations.
14182
fe961097
AD
141832001-12-05 Akim Demaille <akim@epita.fr>
14184
14185 * src/lalr.c (traverse): Use arrays instead of pointers.
14186
e3e4e814
AD
141872001-12-05 Akim Demaille <akim@epita.fr>
14188
14189 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
14190 the handling of squeue.
14191 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
14192
630e182b
AD
141932001-12-05 Akim Demaille <akim@epita.fr>
14194
14195 Because useless nonterminals are now kept alive (instead of being
14196 `destroyed'), we now sometimes examine them, and store information
14197 related to them. Hence we need to know their number, and adjust
14198 memory allocations.
14199
14200 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
14201 static.
14202 * src/LR0.c (allocate_itemsets): The memory allocated to
14203 `symbol_count' was used for two different purpose: once to count
14204 the number of occurrences of each symbol, and later reassigned to
14205 `shift_symbol', containing the symbol that can be shifted from a
14206 given state.
14207 Deobfuscate, i.e., allocate, use and free `symbol_count' here
14208 only, and...
14209 (new_itemsets): Allocate `shift_symbol' here.
14210 (allocate_itemsets): symbol_count includes useless nonterminals.
14211 Make room for them.
14212 (free_storage): Use `free', not `XFREE', for pointers that cannot
14213 be null.
14214
81b51460
AD
142152001-12-05 Akim Demaille <akim@epita.fr>
14216
14217 * src/nullable.c (set_nullable): Deobfuscate the handling of
14218 ritem.
14219 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
14220
3067fbef
AD
142212001-12-05 Akim Demaille <akim@epita.fr>
14222
14223 * src/gram.c, src/gram.h (ritem_print): New.
14224 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
14225 (This useless function was defined only to work around VMS linkers
14226 that can't handle compilation units with variables only).
14227 * src/reduce.c (dump_grammar): Use it to trace the construction of
14228 ritem.
14229
c2bea5f9
PE
142302001-12-04 Paul Eggert <eggert@twinsun.com>
14231
7d27c823
PE
14232 * src/bison.simple (union yyalloc): Change member names
14233 to be the same as the stack names.
14234 (yyparse): yyptr is now union yyalloc *, not char *.
14235 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
14236 and may generate better code on some machines.
c2bea5f9
PE
14237 (yystpcpy): Use prototype if __STDC__ is defined, not just
14238 if __cplusplus is defined.
35687a9d 14239
2c8a9dfa
AD
142402001-11-30 Akim Demaille <akim@epita.fr>
14241
14242 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
14243 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
14244 Gettext doesn't compile cleanly, and dies with -Werror.
14245 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
14246 Include WARNING_CFLAGS here.
14247 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
14248 before being defined.
14249
f4e421e6
AD
142502001-11-27 Paul Eggert <eggert@twinsun.com>
14251
14252 * lib/quotearg.h (quotearg_n, quotearg_n_style):
14253 First arg is int, not unsigned.
14254 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
14255 (SIZE_MAX, UINT_MAX): New macros.
14256 (quotearg_n_options): Abort if N is negative.
14257 Avoid overflow check on hosts where size_t is 64 bits and int
14258 is 32 bits, as overflow is impossible there.
14259 Fix off-by-one typo that caused unnecessary reallocation.
14260
7093d0f5
AD
142612001-11-29 Paul Eggert <eggert@twinsun.com>
14262
14263 Name space cleanup in generated parser.
14264
14265 * doc/bison.texinfo (Bison Parser): Discuss system headers
14266 and their effect on the user name space.
14267
14268 * src/bison.simple:
14269 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
14270 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
14271 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
14272
14273 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
14274 on user names when possible.
14275
14276 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
14277 Simplify test for whather <alloca.h> exists.
14278
14279 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
14280
14281 (<stdio.h>): Include if YYDEBUG.
14282
14283 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
14284 ! defined (yyoverflow) && ! defined (yymemcpy).
14285
14286 (yymemcpy, yyparse): Rename local variables as needed so that
14287 they all begin with 'yy'.
14288
14289 (yystrlen, yystpcpy): New functions.
14290
14291 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
14292 All uses changed.
14293
14294 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
14295 instead of relying on string.h functions. Use YYSTACK_ALLOC
14296 and YYSTACK_FREE instead of malloc and free.
14297
fd51e5ff
AD
142982001-11-30 Akim Demaille <akim@epita.fr>
14299
14300 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
14301 before their first uses.
14302 (YYBISON, YYPURE): Move to the top of the output.
14303
7d13ff5f
AD
143042001-11-30 Akim Demaille <akim@epita.fr>
14305
14306 * tests/reduce.at (Useless Nonterminals): Fix.
14307
892a3995
AD
143082001-11-30 Akim Demaille <akim@epita.fr>
14309
14310 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
14311 if body instead of `;' to pacify GCC's warnings.
14312
68f1e3ed
AD
143132001-11-30 Akim Demaille <akim@epita.fr>
14314
14315 Instead of mapping the LHS of unused rules to -1, keep the LHS
14316 valid, but flag the rules as invalid.
14317
14318 * src/gram.h (rule_t): `useful' is a new member.
14319 * src/print.c (print_grammar): Adjust.
14320 * src/derives.c (set_derives): Likewise.
14321 * src/reader.c (packgram, reduce_output): Likewise.
14322 * src/reduce.c (reduce_grammar_tables): Likewise.
14323 * tests/reduce.at (Underivable Rules, Useless Rules): New.
14324
d2d1b42b
AD
143252001-11-30 Akim Demaille <akim@epita.fr>
14326
14327 * src/reduce.c (reduce_output): Formatting changes.
14328 * src/print.c (print_results, print_grammar): Likewise.
14329 * tests/regression.at (Rule Line Numbers)
14330 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
14331
760b53a8
AD
143322001-11-30 Akim Demaille <akim@epita.fr>
14333
14334 * src/reduce.c (nonterminals_reduce): Instead of throwing away
14335 useless nonterminals, move them at the end of the symbol arrays.
14336 (reduce_output): Adjust.
14337 * tests/reduce.at (Useless Nonterminals): Adjust.
14338
00238958
AD
143392001-11-30 Akim Demaille <akim@epita.fr>
14340
14341 * src/reduce.c: Various comment/formatting changes.
14342 (nonterminals_reduce): New, extracted from...
14343 (reduce_grammar_tables): here.
14344 (reduce_grammar): Call nonterminals_reduce.
14345
396452de
PE
143462001-11-29 Paul Eggert <eggert@twinsun.com>
14347
14348 * src/bison.simple (YYSTACK_REALLOC): Remove.
14349 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
14350 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
14351 New macros.
14352 (union yyalloc): New type.
14353 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
14354 an arbitrary restriction on hosts where size_t is wider than int.
14355
14356 (yyparse): Don't dump core if alloca or malloc fails; instead, report
14357 a parser stack overflow. Allocate just one block of memory for all
14358 three stacks, instead of allocating three blocks; this typically is
14359 faster and reduces fragmentation.
14360
14361 Do not limit the number of items in the stack to a value that fits
14362 in 'int', as this is an arbitrary limit on hosts with 64-bit
14363 size_t and 32-bit int.
14364
147e184c
MA
143652001-11-29 Marc Autret <autret_m@epita.fr>
14366
14367 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
14368 of defining YYERROR_VERBOSE.
14369 [AT_DATA]: $4 is now out of C declarations in the prologue.
14370
426cf563
MA
143712001-11-28 Marc Autret <autret_m@epita.fr>
14372
14373 * src/reader.c (parse_dquoted_param): New.
14374 (parse_skel_decl): Use it.
14375 * src/lex.h: Add its prototype.
14376 * src/lex.c (literalchar): Become not static.
14377
c7925b99
MA
143782001-11-28 Marc Autret <autret_m@epita.fr>
14379
14380 * src/output.h: And put its extern declaration here.
14381 * src/output.c (error_verbose): Define here.
14382 (prepare): Echo name modification.
14383 * src/getargs.h: Clean its extern declaration.
14384 * src/getargs.c (error_verbose_flag): Remove.
14385 (getargs): Remove case 'e'.
14386 * src/options.c (option_table): 'error-verbose' is now seen as simple
14387 percent option.
14388 Include output.h.
14389
14390 * src/reader.c (read_declarations): Remove case tok_include.
14391 (parse_include_decl): Remove.
14392 * src/lex.h (token_t): Remove tok_include.
14393 * src/options.c (option_table): 'include' is now a simple command line
14394 option.
14395
5b5d1929
MA
143962001-11-28 Marc Autret <autret_m@epita.fr>
14397
14398 * src/bison.simple: Adjust muscle names.
14399 * src/muscle_tab.c (muscle_init): Also rename the muscles.
14400 * src/output.c (prepare): s/_/-/ for the muscles names.
14401 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
14402
8850be4b
MA
144032001-11-28 Marc Autret <autret_m@epita.fr>
14404
14405 * src/bison.simple: Fix debug.
14406 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
14407
4a38e613
AD
144082001-11-28 Akim Demaille <akim@epita.fr>
14409
14410 * src/LR0.c (shifts_new): New.
14411 (save_shifts, insert_start_shift, augment_automaton): Use it.
14412
4b35e1c1
AD
144132001-11-28 Akim Demaille <akim@epita.fr>
14414
14415 * src/closure.c (closure): `b' and `ruleno' denote the same value:
14416 keep ruleno only.
14417
d2b04478
AD
144182001-11-28 Akim Demaille <akim@epita.fr>
14419
14420 * src/closure.c (closure): Instead of looping over word in array
14421 then bits in words, loop over bits in array.
14422
2c4c30aa
AD
144232001-11-28 Akim Demaille <akim@epita.fr>
14424
14425 * src/closure.c (closure): No longer optimize the special case
14426 where all the bits of `ruleset[r]' are set to 0, to make the code
14427 clearer.
14428
576890b7
AD
144292001-11-28 Akim Demaille <akim@epita.fr>
14430
14431 * src/closure.c (closure): `r' and `c' are new variables, used to
14432 de-obfuscate accesses to RULESET and CORE.
14433
cb487d7d
AD
144342001-11-28 Akim Demaille <akim@epita.fr>
14435
14436 * src/reduce.c (reduce_print): Use ngettext.
14437 (dump_grammar): Improve the trace accuracy.
14438
6013d43f
AD
144392001-11-28 Akim Demaille <akim@epita.fr>
14440
14441 * src/reduce.c (dump_grammar): Don't translate trace messages.
14442
cb4956ee
AD
144432001-11-28 Akim Demaille <akim@epita.fr>
14444
14445 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
14446 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
14447 as all tags are free'ed afterwards.
14448 From Enrico Scholz.
14449
648185ab
PE
144502001-11-27 Paul Eggert <eggert@twinsun.com>
14451
14452 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
14453 use alloca when we didn't want to, and vice versa.
14454
68254a03
MA
144552001-11-27 Marc Autret <autret_m@epita.fr>
14456
9113b58f
AD
14457 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
14458 initialization.
68254a03
MA
14459 * src/output.c (prepare): Remove its update.
14460
04d843a2
MA
144612001-11-27 Marc Autret <autret_m@epita.fr>
14462
14463 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
14464 Use %error-verbose.
14465
d2079671 144662001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
14467
14468 * src/bison.simple: Remove YYERROR_VERBOSE using.
14469 Use %%error_verbose.
14470 (yyparse): Likewise.
14471 * src/output.c (prepare): Give its final value.
14472 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
14473 * src/getargs.h: Add its extern declaration.
14474 * src/getargs.c (error_verbose_flag): New int.
14475 (getargs): Update to catch new case.
14476 * src/options.c (option_table): 'error-verbose' is a new option.
14477 (shortopts): Update.
14478
e0327bc8
AD
144792001-11-27 Akim Demaille <akim@epita.fr>
14480
14481 * src/system.h: Use intl/libgettext.h.
14482 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
14483
000f1a3c
AD
144842001-11-27 Akim Demaille <akim@epita.fr>
14485
14486 * tests/torture.at (Exploding the Stack Size with Malloc):
14487 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
14488
26cfe0be
AD
144892001-11-27 Akim Demaille <akim@epita.fr>
14490
14491 * src/files.c: Include error.h.
14492 Reported by Hans Aberg.
14493
f6bd5427
MA
144942001-11-26 Marc Autret <autret_m@epita.fr>
14495
d2079671 14496 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
14497 (read_declarations): Add case tok_include.
14498 * src/getargs.h (include): Add its extern definition.
14499 * src/getargs.c (include): New const char *.
14500 (getargs): Add case '-I'.
14501 * src/options.c (option_table): Add include as command line and
14502 percent option.
14503 * src/lex.h (token_t): Add tok_include.
14504
2ca209c1
AD
145052001-11-26 Akim Demaille <akim@epita.fr>
14506
14507 * src/reader.c (readgram): Make sure rules for mid-rule actions
14508 have a lineno equal to that of their host rule.
14509 Reported by Hans Aberg.
14510 * tests/regression.at (Rule Line Numbers): New.
14511
0e41b407
AD
145122001-11-26 Akim Demaille <akim@epita.fr>
14513
14514 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
14515 size_ts.
14516
145172001-11-26 Akim Demaille <akim@epita.fr>
14518
14519 * src/complain.c, src/complain.h (error): Remove, provided by
14520 lib/error.[ch].
14521
e0c40012
AD
145222001-11-26 Akim Demaille <akim@epita.fr>
14523
14524 * src/reader.c (read_declarations): Don't abort on tok_illegal,
14525 issue an error message.
14526 * tests/regression.at (Invalid %directive): New.
14527 Reported by Hans Aberg.
14528
5e147124
AD
145292001-11-26 Akim Demaille <akim@epita.fr>
14530
14531 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
14532 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14533
a034c8b8
AD
145342001-11-26 Akim Demaille <akim@epita.fr>
14535
14536 * src/conflicts.c (conflicts_print): Don't complain at all when
14537 there are no reduce/reduce conflicts, and as many shift/reduce
14538 conflicts as expected.
14539 * tests/regression.at (%expect right): Adjust.
14540
c64a20f3
AD
145412001-11-23 Akim Demaille <akim@epita.fr>
14542
14543 * lib/alloca.c: Update, from fileutils.
14544
5b0d29bb
AD
145452001-11-23 Akim Demaille <akim@epita.fr>
14546
14547 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
14548
722c4bfe
AD
145492001-11-23 Akim Demaille <akim@epita.fr>
14550
14551 * src/system.h: Include alloca.h.
14552 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
14553
6255b435
AD
145542001-11-23 Akim Demaille <akim@epita.fr>
14555
14556 * src/print_graph.c (print_actions): Remove `rule', unused.
14557 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
14558 pacify GCC's signed < unsigned warnings.
14559 * src/closure.c (itemsetsize): Likewise.
14560 * src/reader.c (symbol_list_new): Static.
14561
b29b2ed5
AD
145622001-11-23 Akim Demaille <akim@epita.fr>
14563
14564 Attaching lineno to buckets is stupid, since only one copy of each
14565 symbol is kept, only the line of the first occurrence is kept too.
14566
14567 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
14568 * src/reader.c (rline_allocated): Remove, unused.
14569 (symbol_list): Have a `line' member.
14570 (symbol_list_new): New.
14571 (readgram): Use it.
14572 * src/print.c (print_grammar): Output the rule line numbers.
14573 * tests/regression.at (Solved SR Conflicts)
14574 (Unresolved SR Conflicts): Adjust.
14575 Reported by Hans Aberg.
14576
a81b1d4a
MA
145772001-11-22 Marc Autret <autret_m@epita.fr>
14578
14579 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
14580
c1ecb3c1
MA
145812001-11-22 Marc Autret <autret_m@epita.fr>
14582
14583 * src/muscle_tab.c (muscle_init): Remove initialization of
14584 skeleton muscle.
14585 * src/output.c (output_master_parser): Do it here.
14586
fbe01355
AD
145872001-11-20 Akim Demaille <akim@epita.fr>
14588
14589 * po/sv.po: New.
14590 * configure.in (ALL_LINGUAS): Adjust.
14591 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14592 longer contains strings to translate.
14593
81e895c0
AD
145942001-11-19 Akim Demaille <akim@epita.fr>
14595
14596 * src/conflicts.c (conflicts_print): Add a missing \n.
14597
6bb1878b
AD
145982001-11-19 Akim Demaille <akim@epita.fr>
14599
14600 * src/nullable.c (nullable_print): New.
14601 (set_nullable): Call it when tracing.
14602 Better locality of variables.
14603
d9ec2d07
AD
146042001-11-19 Akim Demaille <akim@epita.fr>
14605
14606 * src/print.c (print_actions): Better locality of variables.
14607
720e5c1b
AD
146082001-11-19 Akim Demaille <akim@epita.fr>
14609
14610 * src/derives.c (print_derives): Fix and enrich.
14611 * src/closure.c (print_fderives): Likewise.
14612
fb908786
AD
146132001-11-19 Akim Demaille <akim@epita.fr>
14614
14615 * src/closure.c (itemsetend): Remove, replaced with...
14616 (itemsetsize): new.
14617
125ecb56
AD
146182001-11-19 Akim Demaille <akim@epita.fr>
14619
14620 * src/LR0.c (kernel_end): Remove, replaced with...
14621 (kernel_size): new.
14622
d8cf039f
AD
146232001-11-19 Akim Demaille <akim@epita.fr>
14624
14625 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14626 to clarify.
14627
7bec0760
AD
146282001-11-19 Akim Demaille <akim@epita.fr>
14629
14630 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14631
c87d4863
AD
146322001-11-19 Akim Demaille <akim@epita.fr>
14633
14634 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14635 trace messages.
14636 * src/LR0.c: Likewise.
14637 (allocate_itemsets): Use arrays instead of pointers to clarify.
14638
9bfe901c
AD
146392001-11-19 Akim Demaille <akim@epita.fr>
14640
14641 * src/getargs.c (statistics_flag): Replace with...
14642 (trace_flag): New.
14643 (longopts): Accept --trace instead of --statistics.
14644 * src/getargs.h, src/options.c: Adjust.
14645 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14646 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14647
97db7bd4
AD
146482001-11-19 Akim Demaille <akim@epita.fr>
14649
cc72668c 14650 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
14651 pointers to clarify the code.
14652 (save_reductions, save_shifts): Factor common parts of alternatives.
14653
2c5f66ed
AD
146542001-11-19 Akim Demaille <akim@epita.fr>
14655
14656 * src/LR0.c (new_state, get_state): Complete TRACE code.
14657 * src/closure.c: Include `reader.h' to get `tags', needed by the
14658 trace code.
14659 Rename the conditional DEBUG as TRACE.
14660 Output consistently TRACEs to stderr, not stdout.
14661 * src/derives.c: Likewise.
14662 * src/reduce.c: (inaccessable_symbols): Using if is better style
14663 than goto.
14664 Use `#if TRACE' instead of `#if 0' for tracing code.
14665
300f275f
AD
146662001-11-19 Akim Demaille <akim@epita.fr>
14667
14668 * src/system.h (LIST_FREE, shortcpy): New.
14669 * src/LR0.c: Use them.
14670 * src/output.c (free_itemsets, free_reductions, free_shifts):
14671 Remove, replaced by LIST_FREE.
14672
f59c437a
AD
146732001-11-19 Akim Demaille <akim@epita.fr>
14674
14675 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14676 (REDUCTIONS_ALLOC): New.
14677 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14678 allocation.
14679
6986fd9e
AD
146802001-11-19 Akim Demaille <akim@epita.fr>
14681
14682 * src/LR0.c (new_state): Complete trace code.
14683 * src/nullable.c (set_nullable): Don't translate traces.
14684
4bc30f78
AD
146852001-11-19 Akim Demaille <akim@epita.fr>
14686
14687 * src/print_graph.c (print_core): Better locality of variables.
14688 * src/print.c (print_core): Likewise.
14689
08a946e0
AD
146902001-11-19 Akim Demaille <akim@epita.fr>
14691
14692 * src/vcg.c: You do the output, so you are responsible of the
14693 handling of VCG syntax, in particular: use quotearg.
14694 * src/print_graph.c: Don't.
14695 (print_actions): Don't output the actions as part of the nodes,
14696 since that's the job of the edges.
14697 (print_state): Don't output by hand: fill the node description,
9bfe901c 14698 and ask for its output.
08a946e0 14699
f0473484
AD
147002001-11-19 Akim Demaille <akim@epita.fr>
14701
cc72668c
AD
14702 * src/bison.simple (yyparse): When verbosely reporting an error,
14703 no longer put additional quotes around token names.
f0473484
AD
14704 * tests/calc.at: Adjust.
14705
e41dc700
AD
147062001-11-19 Akim Demaille <akim@epita.fr>
14707
14708 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14709 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14710 * src/output.c: Adjust.
14711
652a871c
AD
147122001-11-19 Akim Demaille <akim@epita.fr>
14713
14714 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14715 (rule_t): this.
14716 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14717
b2ed6e58
AD
147182001-11-19 Akim Demaille <akim@epita.fr>
14719
14720 * src/gram.h (rule_t): New.
14721 (rule_table): New.
14722 (rrhs, rlhs): Remove, part of state_t.
14723 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14724 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14725 * src/reader.c, src/reduce.c: Adjust.
14726
edad7067
AD
147272001-11-19 Akim Demaille <akim@epita.fr>
14728
14729 * src/reader.c (symbols_output): New, extracted from...
14730 (packsymbols): Here.
14731 (reader): Call it.
14732
3feec034
AD
147332001-11-19 Akim Demaille <akim@epita.fr>
14734
14735 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14736 (maxrhs): this new function.
14737
ddcd5fdf
AD
147382001-11-19 Akim Demaille <akim@epita.fr>
14739
cc72668c 14740 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
14741 Adjust.
14742
bb527fc2
AD
147432001-11-19 Akim Demaille <akim@epita.fr>
14744
cc72668c 14745 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
14746 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14747 * src/lalr.c: Adjust.
14748
a845a697
AD
147492001-11-19 Akim Demaille <akim@epita.fr>
14750
14751 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14752 (set_state_table): handle the `lookaheads' members.
14753
f004bf6a
AD
147542001-11-19 Akim Demaille <akim@epita.fr>
14755
cc72668c
AD
14756 * src/lalr.h (lookaheads): Removed array, whose contents is now
14757 a member of...
f004bf6a
AD
14758 (state_t): this structure.
14759 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14760 Adjust.
14761
de326cc0
AD
147622001-11-19 Akim Demaille <akim@epita.fr>
14763
cc72668c
AD
14764 * src/lalr.h (consistent): Removed array, whose contents is now
14765 a member of...
de326cc0
AD
14766 (state_t): this structure.
14767 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14768 Adjust.
14769
90b4416b
AD
147702001-11-19 Akim Demaille <akim@epita.fr>
14771
cc72668c
AD
14772 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14773 contents are now members of...
90b4416b
AD
14774 (state_t): this structure.
14775 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14776 Adjust.
14777
9703cc49
AD
147782001-11-19 Akim Demaille <akim@epita.fr>
14779
14780 * src/lalr.h (state_t): New.
14781 (state_table): Be a state_t * instead of a core **.
14782 (accessing_symbol): Remove, part of state_t.
14783 * src/lalr.c: Adjust.
14784 (set_accessing_symbol): Merge into...
14785 (set_state_table): this.
14786 * src/print_graph.c, src/conflicts.c: Adjust.
14787
d803322e
AD
147882001-11-14 Akim Demaille <akim@epita.fr>
14789
14790 * tests/calc.at, tests/output.at, tests/regression.at,
14791 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14792 now the tests are run in private dirs, therefore AC_CLEANUP and
14793 family can be simplified to 0-ary.
14794 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14795 use abs. path to find config.h.
14796 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14797 stderr, there can be way too much random noise.
14798 Instead pass -Werror to GCC and rely on the exit status.
14799 Reported by Wolfram Wagner.
14800
3d76b07d
AD
148012001-11-14 Akim Demaille <akim@epita.fr>
14802
14803 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14804 defined only if yyoverflow is defined, to avoid `warning: unused
14805 variable `yyvs1''.
14806 Reported by The Test Suite.
14807
09b503c8
AD
148082001-11-14 Akim Demaille <akim@epita.fr>
14809
14810 * src/print.c: Include reduce.h.
14811 Reported by Hans Aberg.
14812
148132001-11-14 Akim Demaille <akim@epita.fr>
14814
14815 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14816 Revert a previous patch: these are really const.
14817 * src/conflicts.c (conflict_report): Additional useless pair of
14818 braces to pacify GCC's warnings for `if () if () {} else {}'.
14819 * src/lex.c (parse_percent_token): Replace equal_offset with
14820 arg_offset.
14821 arg is const.
14822 Be sure to strdup `arg' when used, since there is no reason for
14823 token_buffer not to change.
14824
0f37a994
AD
148252001-11-14 Akim Demaille <akim@epita.fr>
14826
14827 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14828 definition.
14829 * src/main.c (main): Use them.
14830 Suggested by Hans Aberg.
14831
d39d93b8
AD
148322001-11-12 Akim Demaille <akim@epita.fr>
14833
14834 * src/system.h (ngettext): Now that we use ngettext, be sure to
14835 provide a default definition when NLS are not used.
14836
9edcd895
AD
148372001-11-12 Akim Demaille <akim@epita.fr>
14838
14839 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14840 Use @kbd to denote user input.
14841 (Language and Grammar): ANSIfy the example.
14842 Adjust its layout for info/notinfo.
14843 (Location Tracking Calc): Output error messages to stderr.
14844 Output locations in a more GNUtically correct way.
14845 Fix a couple of Englishos.
14846 Adjust @group/@end group pairs.
14847
7da99ede
AD
148482001-11-12 Akim Demaille <akim@epita.fr>
14849
e3aa65c5 14850 %expect was not functioning at all.
7da99ede
AD
14851
14852 * src/conflicts.c (expected_conflicts): Set to -1.
14853 (conflict_report): Use ngettext.
14854 (conflicts_print): Check %expect and make its violation an error.
14855 * doc/bison.texinfo (Expect Decl): Adjust.
14856 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14857 * tests/regression.at (%expect not enough, %expect right)
14858 (%expect too much): New.
14859
ba9dda1a
AD
148602001-11-12 Akim Demaille <akim@epita.fr>
14861
14862 * tests/regression.at (Conflicts): Rename as...
14863 (Unresolved SR Conflicts): this.
14864 (Solved SR Conflicts): New.
14865
337c5bd1
AD
148662001-11-12 Akim Demaille <akim@epita.fr>
14867
14868 * src/reduce.c (print_results): Rename as...
14869 (reduce_output): This.
14870 Output to OUT, passed as argument, instead of output_obstack.
14871 (dump_grammar): Likewise.
14872 (reduce_free): New.
14873 Also free V1.
14874 (reduce_grammar): No longer call reduce_output, since...
14875 * src/print.c (print_results): do it.
14876 * src/main.c (main): Call reduce_free;
14877
c73a41af
AD
148782001-11-12 Akim Demaille <akim@epita.fr>
14879
14880 * src/conflicts.c (print_reductions): Accept OUT as argument.
14881 Output to it, not to output_obstack.
14882 * src/print.c (print_actions): Adjust.
14883
0df87bb6
AD
148842001-11-12 Akim Demaille <akim@epita.fr>
14885
14886 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14887 the result instead of using...
14888 (src_total, rrc_total, src_count, rrc_count): Remove.
14889 (any_conflicts): Remove.
14890 (print_conflicts): Split into...
14891 (conflicts_print, conflicts_output): New.
14892 * src/conflicts.h: Adjust.
14893 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 14894 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
14895 * tests/regression.at (Conflicts): New.
14896 Reported by Tom Lane.
14897
e4d3d4de
AD
148982001-11-12 Akim Demaille <akim@epita.fr>
14899
14900 * tests/regression.at (Invalid input): Remove, duplicate with
14901 ``Invalid input: 1''.
14902
6d7d248e
AD
149032001-11-12 Akim Demaille <akim@epita.fr>
14904
14905 * tests/torture.at (AT_DATA_STACK_TORTURE)
14906 (Exploding the Stack Size with Alloca)
14907 (Exploding the Stack Size with Malloc): New.
14908
e9e4c321
AD
149092001-11-12 Akim Demaille <akim@epita.fr>
14910
14911 * src/bison.simple (YYSTACK_REALLOC): New.
14912 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 14913 Reported by Per Allansson.
e9e4c321 14914
5f7e0832
AD
149152001-11-12 Pascal Bart <pascal.bart@epita.fr>
14916
14917 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14918 define CPP macro, which substitute YYSTYPE by yystype.
14919 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14920 with yyltype/YYLTYPE. This allows inclusion of the generated
14921 header within the parser if the compiler, such as GGC, accepts
14922 multiple equivalent #defines.
14923 From Akim.
14924
e3f1699f
AD
149252001-11-05 Akim Demaille <akim@epita.fr>
14926
14927 * src/reader.c (symbols_output): New, extracted from...
14928 (packsymbols): here.
14929 (reader): Adjust.
14930
65be0866
AD
149312001-11-05 Akim Demaille <akim@epita.fr>
14932
14933 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14934
e4d910bf
AD
149352001-11-05 Akim Demaille <akim@epita.fr>
14936
14937 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14938 pattern.
14939
951366c1
AD
149402001-11-05 Akim Demaille <akim@epita.fr>
14941
14942 * src/options.h (struct option_table_struct): set_flags is void*.
14943 * src/options.c (longopts): Support `--output' and `%output'.
14944 (usage): Adjust.
14945 * src/lex.h (tok_setopt): Remove, replaced with...
14946 (tok_intopt, tok_stropt): these new guys.
14947 * src/lex.c (getopt.h): Not needed.
14948 (token_buffer, unlexed_token_buffer): Not const.
14949 (percent_table): Promote `-' over `_' in directive names.
14950 Active `%name-prefix', `file-prefix', and `output'.
14951 (parse_percent_token): Accept possible arguments to directives.
14952 Promote `-' over `_' in directive names.
14953
d8988b2f
AD
149542001-11-04 Akim Demaille <akim@epita.fr>
14955
14956 * doc/bison.texinfo (Decl Summary): Split the list into
14957 `directives for grammars' and `directives for bison'.
14958 Sort'em.
14959 Add description of `%name-prefix', `file-prefix', and `output'.
14960 Promote `-' over `_' in directive names.
14961 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14962 Simplify the description of `--name-prefix'.
14963 Promote `-' over `_' in directive names.
14964 Promote `--output' over `--output-file'.
14965 Fix the description of `--defines'.
14966 * tests/output.at: Exercise %file-prefix and %output.
14967
6468d18e
AD
149682001-11-02 Akim Demaille <akim@epita.fr>
14969
14970 * doc/refcard.tex: Update.
14971
6b7e85b9
AD
149722001-11-02 Akim Demaille <akim@epita.fr>
14973
14974 * src/symtab.h (SUNDEF): New.
14975 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14976 stand for `uninitialized', instead of 0.
14977 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14978 * src/lex.c (lex): Adjust.
14979
14980 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14981 Number it 0.
14982 Let yylex return it instead of a plain 0.
14983 Reported by Dick Streefland.
14984
cd5aafcf
AD
149852001-11-02 Akim Demaille <akim@epita.fr>
14986
14987 * tests/regression.at (Mixing %token styles): New test.
14988
037ca2f1
AD
149892001-11-02 Akim Demaille <akim@epita.fr>
14990
14991 * src/reader.c (parse_thong_decl): Formatting changes.
14992 (token_translations_init): New, extracted from...
14993 (packsymbols): Here.
14994 Adjust.
14995
270a173c
AD
149962001-11-01 Akim Demaille <akim@epita.fr>
14997
14998 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14999 Check that `9foo.y' produces correct cpp guards.
15000 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
15001 guards.
15002 Reported by Wwp.
15003
561f9a30
AD
150042001-11-01 Akim Demaille <akim@epita.fr>
15005
15006 * tests/regression.at (Invalid input: 2): New.
15007 * src/lex.c (unlexed_token_buffer): New.
15008 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
15009 too.
15010 Reported by Wwp.
15011
f987e9d2
AD
150122001-11-01 Akim Demaille <akim@epita.fr>
15013
15014 * tests/calc.at: Catch up with 1.30.
15015 * configure.in: Bump to 1.49a.
15016 Adjust to newer Autotest.
15017
0846f581
PB
150182001-10-19 Pascal Bart <pascal.bart@epita.fr>
15019
15020 * src/conflicts.c: Move global variables rrc_total and src_total ...
15021 (print_conflicts): here.
15022 * src/output.c (output): Free global variable user_toknums.
15023 * src/lex.c (token_obstack): Become static.
15024
3c1a79b3
AD
150252001-10-18 Akim Demaille <akim@epita.fr>
15026
15027 * tests/atlocal.in (GCC): Add.
15028 * tests/calc.at: s/m4_match/m4_bmatch/.
15029 s/m4_patsubst/m4_bpatsubst/.
15030 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
15031 * configure.in: AC_SUBST(GCC).
15032
5d52e7d0
MA
150332001-10-14 Marc Autret <autret_m@epita.fr>
15034
15035 * src/options.c (create_long_option_table): Fix.
15036
631aa1d3
AD
150372001-10-10 Akim Demaille <akim@epita.fr>
15038
15039 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
15040
f6ec6d13
AD
150412001-10-04 Akim Demaille <akim@epita.fr>
15042
15043 * src/reader.c (parse_union_decl): Push the caracters in
15044 union_obstack, not attrs_obstack.
15045
342b8b6e
AD
150462001-10-04 Akim Demaille <akim@epita.fr>
15047
15048 Merge in the branch 1.29.
15049
15050 * src/reader.c (packsymbols): Use a temporary obstack for
15051 `%%tokendef', since output_stack is already used elsewhere.
15052
15053 2001-10-02 Akim Demaille <akim@epita.fr>
15054
15055 Bump 1.29d.
15056
15057 2001-10-02 Akim Demaille <akim@epita.fr>
15058
15059 Version 1.29c.
15060
15061 2001-10-02 Akim Demaille <akim@epita.fr>
15062
15063 * tests/regression.at (Invalid CPP headers): New.
15064 From Alexander Belopolsky.
15065 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
15066
15067 2001-10-02 Akim Demaille <akim@epita.fr>
15068
15069 * tests/regression.at (Invalid input): New.
15070 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
15071 Reported by Shura.
15072
15073 2001-10-02 Akim Demaille <akim@epita.fr>
15074
15075 * tests/calc.at: Now that --debug works, the tests must be adjusted.
15076
15077 2001-10-02 Akim Demaille <akim@epita.fr>
15078
15079 * src/output.c (output_parser): Assert `skeleton'.
15080 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
15081 systems.
15082 From Shura.
15083
15084 2001-10-01 Marc Autret <autret_m@epita.fr>
15085
15086 * src/lex.h: Echo modifications.
15087 * src/lex.c (unlex): Parameter is now token_t.
15088 From Hans Aberg.
15089
15090 2001-10-01 Marc Autret <autret_m@epita.fr>
15091
15092 * src/main.c: Include lex.h.
15093 From Hans Aberg.
15094
15095 2001-09-29 Akim Demaille <akim@epita.fr>
15096
15097 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
15098
15099 2001-09-28 Akim Demaille <akim@epita.fr>
15100
15101 * tests/testsuite.at: Update to newer Autotest.
15102 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
15103
15104 2001-09-27 Akim Demaille <akim@epita.fr>
15105
15106 Position independent wrapper.
15107
15108 * tests/bison: Remove.
15109 * tests/bison.in: New.
15110 * configure.in: Adjust.
15111
15112 2001-09-27 Paul Eggert <eggert@twinsun.com>
15113
15114 Port quotearg fixes from tar 1.13.24.
15115
15116 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
15117 tm to be declared.
15118 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
15119 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
15120
15121 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
15122 * m4/mbrtowc.m4: New file.
15123 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
15124 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
15125
15126 2001-09-27 Akim Demaille <akim@epita.fr>
15127
15128 Bump to 1.29c.
15129
15130 2001-09-27 Akim Demaille <akim@epita.fr>
15131
15132 Version 1.29b.
15133
15134 2001-09-25 Akim Demaille <akim@epita.fr>
15135
15136 * src/system.h: Include `xalloc.h'.
15137 Remove it from the C files.
15138 * src/files.c (output_files): Free the obstacks.
15139 * src/lex.c (init_lex): Rename as...
15140 (lex_init): this.
15141 (lex_free): New.
15142 * src/main.c (main): Use it.
15143
15144 2001-09-24 Marc Autret <autret_m@epita.fr>
15145
15146 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
15147 to output informations in fout (FILE*).
15148 (open_graph, close_graph): Likewise.
15149 (output_graph, output_edge, output_node): Likewise.
15150 * src/vcg.h: Update function prototypes.
15151 * src/print_graph.c (print_graph): Open output graph file.
15152 (print_actions): Adjust.
15153 * src/files.h: Remove extern declaration.
15154 * src/files.c: Remove graph_obstack declaration.
15155 (open_files): Remove graph_obstack initialization.
15156 (output_files): Remove graph_obstack saving.
15157
15158 2001-09-24 Marc Autret <autret_m@epita.fr>
15159
15160 * src/files.c (compute_output_file_names): Fix.
15161
15162 2001-09-24 Marc Autret <autret_m@epita.fr>,
15163 Akim Demaille <akim@epita.fr>
15164
15165 * src/reader.c (reader): Remove call to free_symtab ().
15166 * src/main.c (main): Call it here.
15167 Include symtab.h.
15168 * src/conflicts.c (initialize_conflicts): Rename as...
15169 (solve_conflicts): this.
15170 * src/print.c (print_core, print_actions, print_state)
15171 (print_grammar): Dump to a file instead a `output_obstack'.
15172 (print_results): Dump `output_obstack', and then proceed with the
15173 FILE *.
15174 * src/files.c (compute_output_file_names, close_files): New.
15175 (output_files): Adjust.
15176 * src/main.c (main): Adjust.
15177
15178 2001-09-23 Marc Autret <autret_m@epita.fr>
15179
15180 * src/files.c (compute_header_macro): Computes header macro name
15181 from spec_defines_file when given.
15182
15183 2001-09-23 Marc Autret <autret_m@epita.fr>
15184
15185 * src/files.c (output_files): Add default extensions.
15186
15187 2001-09-22 Akim Demaille <akim@epita.fr>
15188
15189 * src/conflicts.c (finalize_conflicts): Rename as...
15190 (free_conflicts): this.
15191
15192 2001-09-22 Akim Demaille <akim@epita.fr>
15193
15194 * src/gram.c (gram_free): Rename back as...
15195 (dummy): this.
15196 (output_token_translations): Free `token_translations'.
15197 * src/symtab.c (free_symtab): Free the tag field.
15198
15199 2001-09-22 Akim Demaille <akim@epita.fr>
15200
15201 Remove `translations' as it is always set to true.
15202
15203 * src/gram.h: Adjust.
15204 * src/reader.c (packsymbols, parse_token_decl): Adjust
15205 * src/print.c (print_grammar): Adjust.
15206 * src/output.c (output_token_translations): Adjust.
15207 * src/lex.c (lex): Adjust.
15208 * src/gram.c: Be sure the set pointers to NULL.
15209 (dummy): Rename as...
15210 (gram_free): this.
15211
15212 2001-09-22 Akim Demaille <akim@epita.fr>
15213
15214 * configure.in: Invoke AM_LIB_DMALLOC.
15215 * src/system.h: Use dmalloc.
15216 * src/LR0.c: Be sure to have pointers initialized to NULL.
15217 (allocate_itemsets): Allocate kernel_items only if needed.
15218
15219 2001-09-22 Akim Demaille <akim@epita.fr>
15220
15221 * configure.in: Bump to 1.29b.
15222 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
15223 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
15224 need xmalloc.c in calc.y.
15225 From Pascal Bart.
15226
15227 2001-09-21 Akim Demaille <akim@epita.fr>
15228
15229 Version 1.29a.
15230 * Makefile.maint, config/config.guess, config/config.sub,
15231 * config/missing: Update from masters.
15232 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
15233 upon package.m4.
15234 * configure.in (ALL_LINGUAS): Add `tr'.
15235
15236 2001-09-21 Akim Demaille <akim@epita.fr>
15237
15238 * tests/Makefile.am (package.m4): Move to...
15239 ($(srcdir)/$(TESTSUITE)): here.
15240
15241 2001-09-20 Akim Demaille <akim@epita.fr>
15242
15243 * src/complain.c: No longer try to be standalone: use system.h.
15244 Don't assume __STDC__ is defined to 1. Just test if it is defined.
15245 * src/complain.h: Likewise.
15246 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
15247 Remove the unused variable `n'.
15248 From Albert Chin-A-Young.
15249
15250 2001-09-18 Marc Autret <autret_m@epita.fr>
15251
15252 * doc/bison.1: Update.
15253 * doc/bison.texinfo (Bison Options): Update --defines and --graph
15254 descriptions.
15255 (Option Cross Key): Update.
15256 Add --graph.
15257
15258 2001-09-18 Marc Autret <autret_m@epita.fr>
15259
15260 * tests/regression.at: New test (comment in %union).
15261
15262 2001-09-18 Marc Autret <autret_m@epita.fr>
15263
15264 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
15265 do that.
15266 Reported by Keith Browne.
15267
15268 2001-09-18 Marc Autret <autret_m@epita.fr>
15269
15270 * tests/output.at: Add tests for --defines and --graph.
15271
15272 2001-09-18 Marc Autret <autret_m@epita.fr>
15273
15274 * tests/output.at: Removes tests of %{header,src}_extension features.
15275
15276 2001-09-18 Akim Demaille <akim@epita.fr>
15277
15278 * tests/Makefile.am (package.m4): New.
15279 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
15280 (_AT_CHECK_CALC_ERROR): Likewise.
15281 Factor the `, ' part of verbose error messages.
15282
15283 2001-09-18 Marc Autret <autret_m@epita.fr>
15284
15285 * src/getargs.c (longopts): Declare --defines and --graph as options
15286 with optional arguments.
15287 * src/files.h: Add extern declarations.
15288 * src/files.c (spec_graph_file, spec_defines_file): New.
15289 (output_files): Update.
15290 Remove CPP-outed code.
15291
15292 2001-09-18 Marc Autret <autret_m@epita.fr>
15293
15294 Turn off %{source,header}_extension feature.
15295
15296 * src/files.c (compute_exts_from_gf): Update.
15297 (compute_exts_from_src): Update.
15298 (output_files): CPP-out useless code.
15299 * src/files.h: Remove {header,source}_extension extern declarations.
15300 * src/reader.c (parse_dquoted_param): CPP-out.
15301 (parse_header_extension_decl): Remove.
15302 (parse_source_extension_decl): Remove.
15303 (read_declarations): Remove cases tok_{hdrext,srcext}.
15304 * src/lex.c (percent_table): Remove {header,source}_extension entries.
15305 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
15306
15307 2001-09-10 Akim Demaille <akim@epita.fr>
15308
15309 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
15310 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
15311 (AT_CHECK_OUTPUT): this.
15312 Merely check ls' exit status, its output is useless.
15313
15314 2001-09-10 Akim Demaille <akim@epita.fr>
15315
15316 * tests/calc.at: Use m4_match.
15317 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
15318
15319 2001-09-10 Marc Autret <autret_m@epita.fr>,
15320 Akim Demaille <akim@epita.fr>
15321
15322 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
15323 enum color_e.
15324 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
15325 to `normal'.
15326 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
15327 * src/lex.h: Adjust prototype.
15328 (token_t): Add `tok_undef'.
15329 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
15330 (parse_percent_token): Now returns token_t.
15331 Add default statement in switch.
15332 (lex): Separate `c' as an input variable, from the token_t result
15333 part.
15334 (unlexed): Is a token_t.
15335
15336 2001-09-10 Akim Demaille <akim@epita.fr>
15337
15338 * configure.in: Bump to 1.29a.
15339
15340 2001-09-07 Akim Demaille <akim@epita.fr>
15341
15342 Version 1.29.
15343
15344 2001-08-30 Akim Demaille <akim@epita.fr>
15345
15346 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
15347 * m4/atconfig.m4: Remove.
15348 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
15349 * tests/bison: New.
15350 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
15351 m4_if, m4_patsubst, and m4_regexp.
15352 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
15353 `input' file instead of echo.
15354
15355 2001-08-29 Akim Demaille <akim@epita.fr>
15356
15357 Bump to 1.28e.
15358
15359 2001-08-29 Akim Demaille <akim@epita.fr>
15360
15361 Version 1.28d.
15362
15363 2001-08-29 Paul Eggert <eggert@twinsun.com>
15364
15365 * src/bison.simple (yyparse): Don't take the address of an
15366 item before the start of an array, as that doesn't conform to
15367 the C Standard.
15368
15369 2001-08-29 Robert Anisko <anisko_r@epita.fr>
15370
15371 * doc/bison.texinfo (Location Tracking Calc): New node.
15372
15373 2001-08-29 Paul Eggert <eggert@twinsun.com>
15374
15375 * src/output.c (output): Do not define const, as this now
15376 causes more problems than it cures.
15377
15378 2001-08-29 Akim Demaille <akim@epita.fr>
15379
15380 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
15381 the nodes.
15382 Be sure to tag the `detailmenu'.
15383
15384 2001-08-29 Akim Demaille <akim@epita.fr>
15385
15386 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
15387 download in a tmp dir.
15388
15389 2001-08-28 Marc Autret <autret_m@epita.fr>
15390
15391 * config/depcomp: New file.
15392
15393 2001-08-28 Marc Autret <autret_m@epita.fr>
15394
15395 * doc/bison.1 (mandoc): Adjust.
15396 From Juan Manuel Guerrero.
15397
15398 2001-08-28 Marc Autret <autret_m@epita.fr>
15399
15400 * src/print_graph.c (print_state): Fix.
15401
15402 2001-08-27 Marc Autret <autret_m@epita.fr>
15403
15404 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
15405 char * members.
15406 Echo modifications to the functions prototypes.
15407 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
15408
15409 2001-08-27 Marc Autret <autret_m@epita.fr>
15410
15411 * src/vcg.c: Include `xalloc.h'.
15412 (add_colorentry): New.
15413 (add_classname): New.
15414 (add_infoname): New.
15415 * src/vcg.h: Add new prototypes.
15416
15417 2001-08-27 Akim Demaille <akim@epita.fr>
15418
15419 * Makefile.maint: Sync. again with CVS Autoconf.
15420
15421 2001-08-27 Akim Demaille <akim@epita.fr>
15422
15423 * Makefile.maint: Formatting changes.
15424 (po-update, cvs-update, update): New targets.
15425 (AMTAR): Remove.
15426
15427 2001-08-27 Akim Demaille <akim@epita.fr>
15428
15429 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15430 * Makefile.maint: Sync. with CVS Autoconf.
15431
15432 2001-08-27 Marc Autret <autret_m@epita.fr>
15433
15434 * src/vcg.h (struct infoname_s): New.
15435 (struct colorentry_s): New.
15436 (graph_s): New fields {vertical,horizontal}_order in structure.
15437 Add `infoname' field.
15438 Add `colorentry' field;
15439 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
15440 (G_HORIZONTAL_ORDER): New.
15441 (G_INFONAME): New.
15442 (G_COLORENTRY): New.
15443 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
15444 Add output of `infoname'.
15445 Add output of `colorentry'.
15446
15447 2001-08-27 Marc Autret <autret_m@epita.fr>
15448
15449 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
15450 This one shadowed a global parameter.
15451
15452 2001-08-24 Marc Autret <autret_m@epita.fr>
15453
15454 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
15455 instead of `unsigned'.
15456 (print_state): Do not call obstack_object_size () in obstack_grow ()
15457 to avoid macro variables shadowing.
15458
15459 2001-08-23 Marc Autret <autret_m@epita.fr>
15460
15461 * src/lex.c (percent_table): Typo: s/naem/name/.
15462 Add graph option.
15463 Normalize new options declarations.
15464
15465 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
15466
15467 * tests/suite.at: Exercise %header_extension and %source_extension.
15468
15469 2001-08-16 Marc Autret <autret_m@epita.fr>
15470
15471 * src/reader.c (parse_dquoted_param): New.
15472 (parse_header_extension_decl): Use it.
15473 (parse_source_extension_decl): Likewise.
15474
15475 2001-08-16 Marc Autret <autret_m@epita.fr>
15476
15477 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
15478 (get_xxxx_str): Use assert () instead of complain ().
15479 Remove return invokations in default cases.
15480 (get_decision_str): Modify default behaviour. Remove second argument.
15481 Echo modifications on calls.
15482 (output_graph): Fix.
15483
15484 2001-08-16 Marc Autret <autret_m@epita.fr>
15485
15486 * src/getargs.c (usage): Update with ``-g, --graph''.
15487
15488 2001-08-16 Marc Autret <autret_m@epita.fr>
15489
15490 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
15491 (Option Cross Key): Likewise.
15492 * doc/bison.1: Update.
15493
1c8c2190
PB
154942001-09-25 Pascal Bart <pascal.bart@epita.fr>
15495
15496 * src/output.c (output_master_parser): Don't finish action_obstack.
15497 (output_parser): Don't care about the muscle action, here.
15498 (prepare): Copy the action_obstack in the action muscle.
15499 (output): Free action_obstack.
15500
180d45ba
PB
155012001-09-23 Pascal Bart <pascal.bart@epita.fr>
15502
15503 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
15504 will contain `%union' declaration.
15505 (parse_union_decl): Delete #line directive output.
15506 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
15507 informations about %union.
15508 (parse_union_decl): Copy the union_obstack in the muscle stype.
15509 * src/bison.simple: Add new #line directive.
15510 Add typdef %%stype YYSTYPE.
15511
c51d1a19
PB
155122001-09-23 Pascal Bart <pascal.bart@epita.fr>
15513
15514 * src/bison.simple: Add new `#line' directive.
15515
6f9344da
PB
155162001-09-22 Pascal Bart <pascal.bart@epita.fr>
15517
15518 * src/bison.simple: New `#line' directive.
15519 * src/output.c (output_parser): Support new dynamic muscle input_line.
15520
652def80
MA
155212001-09-22 Marc Autret <autret_m@epita.fr>
15522
15523 * src/output.c (output_master_parser): New.
15524 (output_parser): Be more re-entrant.
15525
25b222fa
MA
155262001-09-21 Marc Autret <autret_m@epita.fr>
15527
15528 * src/reader.c (copy_definition, parse_union_decl): Update and use
15529 `linef' muscle.
15530 (copy_action): Likewise.
15531 Use obstack_1grow ().
15532 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
15533
6bc35ae5
MA
155342001-09-21 Marc Autret <autret_m@epita.fr>
15535
15536 * src/options.c (option_table): Adjust.
15537 * src/lex.c (parse_percent_token): Fix.
15538
c0629aa1
PB
155392001-09-20 Pascal Bart <pascal.bart@epita.fr>
15540
15541 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 15542
82b6d266
PB
155432001-09-20 Pascal Bart <pascal.bart@epita.fr>
15544
15545 * src/lex.c (parse_percent_token): Change type of variable `tx', which
15546 is now an option_table_struct*.
15547 (option_strcmp): New function option_strcmp.
15548 (parse_percent_token): Call option_strcmp.
15549 * src/getargs.c (xalloc.h, options.h): Include it.
15550 (getargs): Call create_long_option_table.
15551 (getargs): Free longopts at the end of the function.
15552 (shortopts): Move in options.c.
15553 * src/options.c (create_long_option_table): New function. Convert
15554 information from option_table to option structure.
15555 * src/reader.c (options.h): Include it.
15556
15557 * src/Makefile.am: Adjust.
15558 * src/options.c (option_table): Create from longopts and percent_table.
15559 * src/getargs.c (longopts): Delete.
15560 * src/lex.c (struct percent_table_struct): Delete.
15561 (percent_table): Delete.
15562 (options.h): Include it.
15563 * src/options.c: Create.
15564 * src/options.h: Create.
15565 Declare enum opt_access_e.
15566 Define struct option_table_struct.
15567
75f5aaea
MA
155682001-09-20 Marc Autret <autret_m@epita.fr>
15569
15570 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
15571 sections of Bison.
15572
f508cb0a
PB
155732001-09-19 Pascal Bart <pascal.bart@epita.fr>
15574
15575 * src/bison.simple: s/%%filename/%%skeleton.
15576 * src/muscle_tab.c (getargs.h): Include it.
15577 (muscle_init): Insert new muscle skeleton.
15578
13105fc1
PB
155792001-09-18 Pascal Bart <pascal.bart@epita.fr>
15580
15581 * src/output.c (output_parser): Delete unused variable actions_dumped.
15582
b0c4483e
PB
155832001-09-07 Pascal Bart <pascal.bart@epita.fr>
15584
15585 * src/output.c (output): Delete call to reader_output_yylsp.
15586 * src/reader.c (reader): Likewise.
ba0fe3c7 15587 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 15588
11d82f03
MA
155892001-09-02 Marc Autret <autret_m@epita.fr>
15590
15591 * src/reader.c: Include muscle_tab.h.
15592 (parse_union_decl): Update.
15593 (parse_macro_decl): Rename parse_muscle_decl.
15594 Update to use renamed functions and variable.
15595 (read_declarations, copy_action, read_additionnal_code, : Updated
15596 with correct variables and functions names.
15597 (packsymbols, reader): Likewise.
342b8b6e 15598
11d82f03 15599 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 15600
11d82f03
MA
15601 * src/output.c: Include muscle_tab.h
15602 In all functions using macro_insert, change by using muscle_insert ().
15603 (macro_obstack): Rename muscle_obstack.
15604 Echo modifications in the whole file.
15605 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15606 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15607 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15608
15609 * src/muscle_tab.h: Update double inclusion macros.
15610 (macro_entry_s): Rename muscle_entry_s.
15611 Update prototypes.
342b8b6e 15612
11d82f03
MA
15613 * src/muscle_tab.c: Include muscle_tab.h.
15614 Rename macro_tabble to muscle_table.
15615 (mhash1, mhash2, mcmp): Use muscle_entry.
15616 (macro_init): Rename muscle_init. Update.
15617 (macro_insert): Rename muscle_insert. Update.
15618 (macro_find): Rename muscle_find. Update.
15619
15620 * src/main.c: Include muscle_tab.h.
15621 (main): Call muscle_init ().
15622 * src/Makefile.am (bison_SOURCES): Echo modifications.
15623
93a37297
MA
156242001-09-02 Marc Autret <autret_m@epita.fr>
15625
f753cd62 15626 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 15627
f753cd62
MA
15628 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15629
156302001-09-02 Marc Autret <autret_m@epita.fr>
15631
15632 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 15633
682d48cd
PB
156342001-09-01 Pascal Bart <pascal.bart@epita.fr>
15635
342b8b6e 15636 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
15637 filename.
15638
087c8fda
MA
156392001-09-01 Marc Autret <autret_m@epita.fr>
15640
15641 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15642 to an explicit value to activate the feature. We do it here.
15643
dda680cb
PB
156442001-08-31 Pascal Bart <pascal.bart@epita.fr>
15645
15646 * src/output.c (prepare): Delete the `filename' muscule insertion.
15647 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15648 (parse_union_decl): Likewise.
15649 * src/macrotab.c (macro_init): Initialize filename by infile.
15650
9e644e64
MA
156512001-08-31 Marc Autret <autret_m@epita.fr>
15652
15653 * src/bison.simple (YYLSP_NEEDED): New definition.
15654 * src/output.c (prepare): Add macro insertion of `locations_flag'
15655
17da6427
PB
156562001-08-31 Pascal Bart <pascal.bart@epita.fr>
15657
15658 * src/output.c (prepare): Delete insertion of previous muscles,
15659 and insert the `prefix' muscles.
15660 * src/macrotab.c (macro_init): Likewise.
15661 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 15662 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
15663 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15664 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 15665 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
15666 name_prefix.
15667
e8cb70b9
PB
156682001-08-31 Pascal Bart <pascal.bart@epita.fr>
15669
15670 * src/main.c (main): Standardize.
15671 * src/output.c (output_table_data, output_parser): Likewise.
15672 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15673
63c2d5de
MA
156742001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15675
342b8b6e 15676 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
15677 %%epilogue.
15678 * src/output.c (output): Rename %%declarations to %%prologue.
15679 * src/bison.simple: Echo modifications.
342b8b6e 15680
d8cb5183
MA
156812001-08-31 Marc Autret <autret_m@epita.fr>
15682
15683 * src/reader.c (readgram): CleanUp.
15684 (output_token_defines): Likewise.
15685 (packsymbols): Likewise.
15686 (reader): Likewise.
15687 * src/output.c (output): CPP-out useless code.
15688
6c686258
PB
156892001-08-31 Pascal Bart <pascal.bart@epita.fr>
15690
342b8b6e 15691 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
15692 output_trailers and output_headers.
15693 * src/output.h: Remove obsolete functions prototypes of output_headers
15694 and output_trailers.
15695
8f451ef7
PB
156962001-08-30 Pascal Bart <pascal.bart@epita.fr>
15697
15698 * src/main.c: Include macrotab.h.
342b8b6e 15699 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
15700 Adjust functions prototypes.
15701 * src/macrotab.c (macro_insert): Constify key and value.
15702 (macro_find): Constify key.
15703 (macro_insert): Include 'xalloc.h'
15704 (macro_insert): Use XMALLOC.
15705 (macro_find): Constify return value.
15706 * src/output.c (output_table_data): Rename table to table_data.
15707 (output_parser): Constify macro_key, macro_value.
15708
997b6fd0 157092001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
15710
15711 * src/reader.c (parse_skel_decl): New.
342b8b6e 15712 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
15713 * src/lex.h (token_t): New token `tok_skel'.
15714 * src/lex.c (percent_table): Add skeleton option entry.
15715 Standardize.
15716
ff48177d
MA
157172001-08-29 Marc Autret <autret_m@epita.fr>
15718
15719 * src/bison.simple: Add %%user_code directive at the end.
15720 * src/reader.c (read_additionnal_code): New.
15721 (reader): Use it.
15722 * src/output.c (output_program): Remove.
15723 (output): Update.
15724
b33160bf
MA
157252001-08-28 Marc Autret <autret_m@epita.fr>
15726
15727 * src/output.c (output_actions): Clean up.
4e5caae2 15728 (output_gram): CPP-out useless code.
b33160bf
MA
15729 * src/reader.c (reader): Clean up, CPP-out useless code.
15730
d1a2daf7
PB
157312001-08-28 Pascal Bart <pascal.bart@epita.fr>
15732
342b8b6e 15733 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 15734 directive.
d1a2daf7
PB
15735 * src/bison.simple: Add `%%definitions'.
15736
2b763dfe
MA
157372001-08-28 Marc Autret <autret_m@epita.fr>
15738
15739 * config/depcomp: New file.
15740
f1a87ef6
PE
157412001-08-27 Paul Eggert <eggert@twinsun.com>
15742
15743 * src/bison.simple (yyparse): Don't take the address of an
15744 item before the start of an array, as that doesn't conform to
15745 the C Standard.
15746
82e236e2
RA
157472001-08-27 Robert Anisko <robert.anisko@epita.fr>
15748
f1a87ef6 15749 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
15750 obstack. It was done too late here.
15751
15752 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15753 completely wrong.
15754 (reader): Initialize the macro obstack here, since we need it to grow
15755 '%define' directives.
15756
15757 * src/reader.h: Declare the macro obstack as extern.
15758
b0cfa28a
RA
157592001-08-27 Robert Anisko <robert.anisko@epita.fr>
15760
15761 * src/output.c (output_parser): Fix. Store single '%' characters in
15762 the output obstack instead of throwing them away.
15763
6fc74234
AD
157642001-08-27 Akim Demaille <akim@epita.fr>
15765
15766 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15767
9c76d118
RA
157682001-08-25 Robert Anisko <robert.anisko@epita.fr>
15769
15770 * lib/Makefile.am: Adjust.
15771
a8289c62
RA
157722001-08-25 Robert Anisko <robert.anisko@epita.fr>
15773
15774 * src/bison.simple: Update and add '%%' directives.
15775
b6610515
RA
157762001-08-25 Robert Anisko <robert.anisko@epita.fr>
15777
15778 * src/reader.c (reader): Remove calls to 'output_headers' and
15779 'output_trailers'. Remove some C output.
15780 (readgram): Disable a piece of code that was writing a default
15781 definition for 'YYSTYPE'.
15782 (reader_output_yylsp): Remove.
15783 (packsymbols): Output token defintions to a macro.
15784 (copy_definition): Disable C output.
6fc74234 15785
b6610515
RA
15786 * src/reader.c (parse_macro_decl): New function used to parse macro
15787 declarations.
15788 (copy_string2): Put the body of copy_string into this new function.
15789 Add a parameter to let the caller choose whether he wants to copy the
15790 string delimiters or not.
15791 (copy_string): Be a simple call to copy_string2 with the last argument
15792 bound to true.
15793 (read_declarations): Add case for macro definition.
15794 (copy_identifier): New.
6fc74234 15795 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
15796 rather than lex.
15797
26f609ff
RA
157982001-08-25 Robert Anisko <robert.anisko@epita.fr>
15799
15800 * src/output.c (prepare): Add prefixed names.
15801 (output_parser): Output semantic actions.
15802 (output_parser): Fix bug on '%%line' directives.
6fc74234 15803
26f609ff
RA
15804 * src/output.c (output_headers): Remove. The C code printed by this
15805 function should now be in the skeletons.
15806 (output_trailers): Remove.
15807 (output): Disable call to 'reader_output_yylsp'.
15808 (output_rule_data): Do not output tables to the table obstack.
15809
15810 * src/output.c: Remove some C dedicated output.
15811 Improve the use of macro and output obstacks.
15812 (output_defines): Remove.
6fc74234 15813
26f609ff
RA
15814 * src/output.c (output_token_translations): Associate 'translate'
15815 table with a macro. No output to the table obstack.
15816 (output_gram): Same for 'rhs' and 'prhs'.
15817 (output_stos): Same for 'stos'.
15818 (output_rule_data): Same for 'r1' and 'r2'.
15819 (token_actions): Same for 'defact'.
15820 (goto_actions): Same for 'defgoto'.
15821 (output_base): Same for 'pact' and 'pgoto'.
15822 (output_table): Same for 'table'.
15823 (output_check): Same for 'check'.
6fc74234 15824
26f609ff
RA
15825 * src/output.c (output_table_data): New function.
15826 (output_short_table): Remove.
15827 (output_short_or_char_table): Remove.
6fc74234 15828
26f609ff
RA
15829 * src/output.c (output_parser): Replace most of the skeleton copy code
15830 with something new. Skeletons are now processed character by character
15831 rather than line by line, and Bison looks for '%%' macros. This is the
15832 first step in making Bison's output process (a lot) more flexible.
15833 (output_parser): Use the macro table.
15834
6f43b113
RA
158352001-08-25 Robert Anisko <robert.anisko@epita.fr>
15836
15837 * src/main.c (main): Initialize the macro table.
15838
dd3127cf
RA
158392001-08-25 Robert Anisko <robert.anisko@epita.fr>
15840
15841 * src/lex.c (percent_table): Add tok_define.
15842 * src/lex.h: Add tok_define.
15843
aa321494
RA
158442001-08-25 Robert Anisko <robert.anisko@epita.fr>
15845
15846 * src/macrotab.c: New file.
15847 * src/macrotab.h: New file.
15848 * src/Makefile.am: Update.
15849
68bd3b6b
RA
158502001-08-25 Robert Anisko <robert.anisko@epita.fr>
15851
15852 * lib/hash.c: New file.
15853 * lib/hash.h: New file.
15854 * lib/Makefile.am: Update.
15855
45f8dd1e
AD
158562001-08-15 Akim Demaille <akim@epita.fr>
15857
15858 Version 1.28c.
15859
40a64a7a 158602001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
15861
15862 * src/reader.c (readgram): Indent output macro YYSTYPE.
15863 (packsymbols): Likewise.
15864 (output_token_defines): Likewise.
15865 * src/files.c: Standardize.
15866 (compute_header_macro): New.
15867 (defines_obstack_save): New. Use compute_header_macro.
15868 (output_files): Update. Use defines_obstack_save.
15869
f9a8293a
AD
158702001-08-15 Akim Demaille <akim@epita.fr>
15871
15872 * doc/bison.texinfo (Table of Symbols): Document
15873 YYSTACK_USE_ALLOCA.
15874
150ca7a7
AD
158752001-08-15 Akim Demaille <akim@epita.fr>
15876
15877 * missing: Update from CVS Automake.
15878 * config/config.guess, config/config.sub, config/texinfo.tex:
15879 Update from gnu.org.
15880
69b5cec4
AD
158812001-08-15 Akim Demaille <akim@epita.fr>
15882
15883 * Makefile.maint: Sync with CVS Autoconf.
15884
f2b5126e
PB
158852001-08-14 Pascal Bart <pascal.bart@epita.fr>
15886
69b5cec4 15887 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
15888 `fdl.texi'.
15889 * doc/fdl.texi: Add to package.
15890
4ecbf796
MA
158912001-08-14 Marc Autret <autret_m@epita.fr>
15892
15893 Turn on %{source,header}_extension features.
15894
69b5cec4 15895 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
15896 source_extension.
15897 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 15898 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
15899 between options.
15900
95fb5662
MA
159012001-08-14 Marc Autret <autret_m@epita.fr>
15902
15903 * src/files.c (compute_base_names): Add extensions computing when
15904 `--file-prefix' used.
15905 Standardize function calls.
15906
78d09da9
MA
159072001-08-13 Marc Autret <autret_m@epita.fr>
15908
69b5cec4 15909 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
15910 defining it (defined but null disables alloca).
15911
5a009f2c
MA
159122001-08-13 Marc Autret <autret_m@epita.fr>
15913
15914 * src/bison.simple (_yy_memcpy): CPP reformat.
15915
1e41465a
PB
159162001-08-13 Pascal Bart <pascal.bart@epita.fr>
15917
15918 * tests/atconfig.in (CPPFLAGS): Fix.
15919
c67a198d
PB
159202001-08-10 Pascal Bart <pascal.bart@epita.fr>
15921
79282c6c 15922 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
15923 `gpl.texi'.
15924 * doc/gpl.texi: Add to package.
15925
09a6de7e
MA
159262001-08-10 Marc Autret <autret_m@epita.fr>
15927
15928 * src/print_graph.h: Fix.
15929 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15930
b77b9ee0
AD
159312001-08-10 Akim Demaille <akim@epita.fr>
15932
15933 * src/system.h: Provide default declarations for stpcpy, strndup,
15934 and strnlen.
15935
3e259915
MA
159362001-08-10 Robert Anisko <anisko_r@epita.fr>
15937
15938 * doc/bison.texinfo (Locations): Update @$ stuff.
15939
ca96bc2d
MA
159402001-08-09 Robert Anisko <anisko_r@epita.fr>
15941
15942 * src/bison.simple (YYLLOC_DEFAULT): Update.
15943 (yyparse): Adjust.
15944
fdc6758b
MA
159452001-08-08 Marc Autret <autret_m@epita.fr>
15946
b77b9ee0 15947 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
15948 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15949 Reported by Fabrice Bauzac.
957d4dbf 15950
600cad3b
MA
159512001-08-08 Marc Autret <autret_m@epita.fr>
15952
15953 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15954 * src/vcg.c (output_node): Fix.
15955 * src/vcg.h: Cleanup.
15956 * src/print_graph.c: Add comments.
b77b9ee0 15957 (node_output_size): New global variable. Simplify the formatting of
600cad3b 15958 the VCG graph output.
b77b9ee0 15959 (print_actions): Unused code is now used. It notifies the final state
600cad3b 15960 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 15961 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
15962 blue.
15963 Get the current node name and node_obstack by argument.
15964 (node_obstack): New variable.
15965 (print_state): Manage node_obstack.
15966 (print_core): Use node_obstack given by argument.
15967 A node is not only computed here but in print_actions also.
15968 (print_graph): CPP out useless code instead of commenting it.
15969
976e528f
AD
159702001-08-07 Pascal Bart <pascal.bart@epita.fr>
15971
15972 * tests/atconfig.in (CPPFLAGS): Fix.
15973
20e8e5ca
AD
159742001-08-07 Akim Demaille <akim@epita.fr>
15975
15976 * src/print_graph.c (quote): New.
15977 (print_core): Use it.
15978
957d4dbf 159792001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 15980
3e3da797
AD
15981 * src/vcg.c (complain.h): Include it.
15982 Unepitaize `return' invocations.
c4b66126 15983 [NDEBUG] (main): Remove.
79282c6c 15984 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
15985 * src/files.c (open_files): Initialize graph_obstack.
15986 * src/print_graph.c (print_actions): CPP out useless code.
15987 (print_core): Don't output the last `\n' in labels.
15988 Use `quote'.
15989 * src/files.c (output_files): Output the VCG file.
15990 * src/main.c (main): Invoke print_graph ();
3e3da797 15991
957d4dbf 159922001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
15993
15994 Automaton VCG graph output.
15995 Using option ``-g'' or long option ``--graph'', you can generate
15996 a gram_filename.vcg file containing a VCG description of the LALR (1)
15997 automaton of your grammar.
15998
15999 * src/main.c: Call to print_graph() function.
16000 * src/getargs.h: Update.
16001 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
16002 (graph_flag): New flag.
16003 (longopts): Update.
16004 (getargs): Add case `g'.
16005 * src/files.c (graph_obstack): New obstack struct.
16006 (open_files): Initialize new obstack.
16007 (output_files): Saves graph_obstack if required.
16008 * src/files.h (graph_obstack): New extern declaration.
16009 * src/Makefile.am: Add new source files.
16010
927c1557 160112001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
16012
16013 * src/print_graph.c, src/print_graph.h (graph): New.
16014 * src/vcg.h: New file.
16015 * src/vcg.c: New file, VCG graph handling.
16016
7333d403
AD
160172001-08-06 Marc Autret <autret_m@epita.fr>
16018
16019 Add of %source_extension and %header_extension which specify
16020 the source or/and the header output file extension.
16021
16022 * src/files.c (compute_base_names): Remove initialisation of
16023 src_extension and header_extension.
16024 (compute_exts_from_gf): Update.
16025 (compute_exts_from_src): Update.
16026 (output_files): Update.
16027 * src/reader.c (parse_header_extension_decl): New.
16028 (parse_source_extension_decl): New.
16029 (read_declarations): New case statements for the new tokens.
16030 * src/lex.c (percent_table): Add entries for %source_extension
16031 and %header_extension.
16032 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
16033
84163231
AD
160342001-08-06 Marc Autret <autret_m@epita.fr>
16035
16036 * configure.in: Bump to 1.28c.
16037 * doc/bison.texinfo: Texinfo thingies.
16038
8303fc42
AD
160392001-08-04 Pascal Bart <pascal.bart@epita.fr>
16040
16041 * tests/atconfig.in (CPPFLAGS): Add.
16042 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
16043
70a84437
AD
160442001-08-03 Akim Demaille <akim@epita.fr>
16045
16046 Version 1.28b.
16047
2ce10144
AD
160482001-08-03 Akim Demaille <akim@epita.fr>
16049
16050 * tests/Makefile.am (check-local): Ship testsuite.
16051 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
16052 Include `string.h'.
16053
1e3e4bc1
AD
160542001-08-03 Akim Demaille <akim@epita.fr>
16055
16056 * configure.in: Try using -Wformat when compiling.
16057
42b45b7f
AD
160582001-08-03 Akim Demaille <akim@epita.fr>
16059
16060 * configure.in: Bump to 1.28b.
16061
8f13fe33
AD
160622001-08-03 Akim Demaille <akim@epita.fr>
16063
16064 * src/complain.c: Adjust strerror_r portability issues.
16065
b37ba92c
AD
160662001-08-03 Akim Demaille <akim@epita.fr>
16067
16068 Version 1.28a.
16069
b0ce6046
AD
160702001-08-03 Akim Demaille <akim@epita.fr>
16071
16072 * src/getargs.c, src/getarg.h (skeleton)): Constify.
16073 * src/lex.c (literalchar): Avoid name clashes on `buf'.
16074 * src/getargs.c: Include complain.h.
16075 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
16076 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
16077
d01c415b
AD
160782001-08-03 Akim Demaille <akim@epita.fr>
16079
16080 * src/reader.c (readgram): Display hidden chars in error messages.
16081
459dd1a6
AD
160822001-08-03 Akim Demaille <akim@epita.fr>
16083
16084 Update to gettext 0.10.39.
16085
53b74c0c
AD
160862001-08-03 Akim Demaille <akim@epita.fr>
16087
16088 * lib/strspn.c: New.
16089
234a3be3
AD
160902001-08-01 Marc Autret <autret_m@epita.fr>
16091
16092 * doc/bison.texinfo: Update.
16093 * doc/bison.1 (mandoc): Update.
16094 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
16095 * src/files.c: Support output files extensions computing.
16096 (src_extension): New static variable.
16097 (header_extension): New static variable.
16098 (tr): New function.
16099 (get_extension_index): New function, gets the index of an extension
16100 filename in a string.
16101 (compute_exts_from_gf): New function, computes extensions from the
16102 grammar file extension.
16103 (compute_exts_from_src): New functions, computes extensions from the
16104 C source file extension, file given by ``-o'' option.
16105 (compute_base_names): Update.
16106 (output_files): Update.
16107
847bf1f5
AD
161082001-08-01 Robert Anisko <anisko_r@epita.fr>
16109
d995fee7 16110 * doc/bison.texi: Document @$.
847bf1f5
AD
16111 (Locations): New section.
16112
d074a105
AD
161132001-07-18 Akim Demaille <akim@epita.fr>
16114
16115 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
16116 * config/prev-version.txt, config/move-if-change: New.
16117 * Makefile.am: Adjust.
16118
3419715d
AD
161192001-07-08 Pascal Bart <pascal.bart@epita.fr>
16120
16121 * src/bison.simple (yyparse): Suppress warning `comparaison
16122 between signed and unsigned'.
16123
62ab6972
AD
161242001-07-05 Pascal Bart <pascal.bart@epita.fr>
16125
16126 * src/getargs.h (raw_flag): Remove.
16127 * src/getargs.c: Die on `-r'/`--raw'.
16128 * src/lex.c (parse_percent_token): Die on `%raw'.
16129 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
16130 * tests/calc.at: Suppress test with option `--raw'.
16131
1e24cc5b
AD
161322001-07-14 Akim Demaille <akim@epita.fr>
16133
16134 * config/: New.
16135 * configure.in: Require Autoconf 2.50.
16136 Update to gettext 0.10.38.
16137
32dfccf8
AD
161382001-03-16 Akim Demaille <akim@epita.fr>
16139
16140 * doc/bison.texinfo: ANSIfy the examples.
16141
cd5bd6ac
AD
161422001-03-16 Akim Demaille <akim@epita.fr>
16143
16144 * getargs.c (skeleton): New variable.
16145 (longopts): --skeleton is a new option.
16146 (shortopts, getargs): -S is a new option.
16147 * getargs.h: Declare skeleton.
16148 * output.c (output_parser): Use it.
16149
5141b016
AD
161502001-03-16 Akim Demaille <akim@epita.fr>
16151
16152 * m4/strerror_r.m4: New.
16153 * m4/error.m4: Run AC_FUNC_STRERROR_R.
16154 * lib/error.h, lib/error.c: Update.
16155
447992b9
AD
161562001-03-16 Akim Demaille <akim@epita.fr>
16157
16158 * src/getargs.c (longopts): Clean up.
16159
274d42ce
AD
161602001-02-21 Akim Demaille <akim@epita.fr>
16161
16162 * src/reader.c (gensym): `gensym_count' is your own.
16163 Use a static buf to create the symbol name, as token_buffer is no
16164 longer a buffer.
16165
22c821f3
AD
161662001-02-08 Akim Demaille <akim@epita.fr>
16167
16168 * src/conflicts.c (conflict_report): Be sure not to append to res
16169 between two calls, which could happen if both first sprintf were
16170 skipped, but not the first cp += strlen.
16171
18569462
AD
161722001-02-08 Akim Demaille <akim@epita.fr>
16173
16174 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
16175 New, from fileutils 4.0.37.
16176 * configure.in: Require Autoconf 2.49c. I took some time before
16177 making this decision. This is the only way out for portability
16178 issues in Bison, it would mean way too much duplicate effort to
16179 import in Bison features implemented in 2.49c since 2.13.
16180 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
16181
0d8f3c8a
AD
161822001-02-02 Akim Demaille <akim@epita.fr>
16183
16184 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 16185 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 16186
f17bcd1f
AD
161872001-01-19 Akim Demaille <akim@epita.fr>
16188
16189 Get rid of the ad hoc handling of token_buffer in the scanner: use
16190 the obstacks.
16191
16192 * src/lex.c (token_obstack): New.
16193 (init_lex): Initialize it. No longer call...
16194 (grow_token_buffer): this. Remove it.
16195 Adjust all the places which used it to use the obstack.
16196
511e79b3
AD
161972001-01-19 Akim Demaille <akim@epita.fr>
16198
16199 * src/lex.h: Rename all the tokens:
16200 s/\bENDFILE\b/tok_eof/g;
16201 s/\bIDENTIFIER\b/tok_identifier/g;
16202 etc.
16203 Let them be enums, not #define, to ease debugging.
16204 Adjust all the code.
16205
0d6508ef
AD
162062001-01-18 Akim Demaille <akim@epita.fr>
16207
16208 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
16209 * src/lex.c (maxtoken, grow_token_buffer): Static.
16210
6deb4447
AD
162112001-01-18 Akim Demaille <akim@epita.fr>
16212
16213 Since we now use obstacks, more % directives can be enabled.
16214
16215 * src/lex.c (percent_table): Also accept `%yacc',
16216 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
16217 `%debug'.
16218 Handle the actions for `%semantic_parser' and `%pure_parser' here,
16219 instead of returning a token.
16220 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
16221 * src/reader.c (read_declarations): Adjust.
16222 * src/files.c (open_files): Don't call `compute_base_names', don't
16223 compute `attrsfile' since they depend upon data which might be
16224 *in* the input file now.
16225 (output_files): Do it here.
16226 * src/output.c (output_headers): Document the fact that this patch
16227 introduces a guaranteed SEGV for semantic parsers.
16228 * doc/bison.texinfo: Document them.
16229 * tests/suite.at: Exercise these %options.
16230
ff4423cc
AD
162312000-12-20 Akim Demaille <akim@epita.fr>
16232
16233 Also handle the output file (--verbose) with obstacks.
16234
16235 * files.c (foutput): Remove.
16236 (output_obstack): New.
16237 Adjust all dependencies.
16238 * src/conflicts.c: Return a string.
16239 * src/system.h (obstack_grow_string): Rename as...
16240 (obstack_sgrow): this. Be ready to work with non literals.
16241 (obstack_fgrow4): New.
16242
956dba3a
AD
162432000-12-20 Akim Demaille <akim@epita.fr>
16244
16245 * src/files.c (open_files): Fix the computation of short_base_name
16246 in the case of `-o foo.tab.c'.
16247
337bab46
AD
162482000-12-20 Akim Demaille <akim@epita.fr>
16249
16250 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
16251 (copy_dollar): Now that everything uses obstacks, get rid of the
16252 FILE * parameters.
16253
5d3214b8
AD
162542000-12-20 Akim Demaille <akim@epita.fr>
16255
16256 * src/files.c (open_files): Actually the `.output' file is based
16257 on the short_base_name, not base_name.
16258 * tests/suite.at (Checking output file names): Adjust.
16259
29092a57
AD
162602000-12-20 Akim Demaille <akim@epita.fr>
16261
16262 * src/bison.s1: Remove, we now use directly...
16263 * src/bison.simple: this.
16264 * src/Makefile.am: Use pkgdata instead of data.
16265
ea5607fd
AD
162662000-12-20 Akim Demaille <akim@epita.fr>
16267
16268 * src/files.c (guard_obstack): New.
16269 (open_files): Initialize it.
16270 (output_files): Dump it...
16271 * src/files.h: Export it.
16272 * src/reader.c (copy_guard): Use it.
16273
27110317
AD
162742000-12-19 Akim Demaille <akim@epita.fr>
16275
16276 * src/files.c (outfile, defsfile, actfile): Removed as global
16277 vars.
16278 (open_files): Don't compute them.
16279 (output_files): Adjust.
16280 (base_name, short_base_name): Be global.
16281 Adjust dependencies.
16282
19c50364
AD
162832000-12-19 Akim Demaille <akim@epita.fr>
16284
16285 * src/files.c (strsuffix): New.
16286 (stringappend): Be just like strcat but allocate.
16287 (base_names): Eve out from open_files.
16288 Try to simplify the rather hairy computation of base_name and
16289 short_base_name.
16290 (open_files): Use it.
16291 * tests/suite.at (Checking output file names): New test.
16292
573c1d9f
AD
162932000-12-19 Akim Demaille <akim@epita.fr>
16294
16295 * src/system.h (obstack_grow_literal_string): Rename as...
16296 (obstack_grow_string): this.
16297 * src/output.c (output_parser): Recognize `%% actions' instead of
16298 `$'.
16299 * src/bison.s1: s/$/%% actions/.
16300 * src/bison.hairy: Likewise.
16301
ef7ddedd
AD
163022000-12-19 Akim Demaille <akim@epita.fr>
16303
16304 * src/output.c (output_parser): Compute the `#line' lines when
16305 there are.
16306 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
16307 Suggested by Hans Aberg.
16308
ff61dabd
AD
163092000-12-19 Akim Demaille <akim@epita.fr>
16310
16311 Let the handling of the skeleton files be local to the procedures
16312 that use it.
16313
16314 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
16315 longer static.
16316 (fparser, open_extra_files): Remove.
16317 (open_files, output_files): Don't take care of fparser.
16318 * src/files.h: Adjust.
16319 * src/output.c (output_parser): Open and close the file to the
16320 skeleton.
16321 * src/reader.c (read_declarations): When %semantic_parser, open
16322 fguard.
16323
55b96341
AD
163242000-12-19 Akim Demaille <akim@epita.fr>
16325
16326 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
16327 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
16328
358c15b7
AD
163292000-12-19 Akim Demaille <akim@epita.fr>
16330
16331 * src/files.c (open_files): Yipee! We no longer need all the code
16332 looking for `/tmp' since we have no tmp file.
16333
7de3329e
AD
163342000-12-19 Akim Demaille <akim@epita.fr>
16335
16336 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
16337 New macros.
16338 * src/files.c (open_files): Less dependency on MSDOS etc.
16339
3abcd459
AD
163402000-12-14 Akim Demaille <akim@epita.fr>
16341
16342 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
16343 Provide a default definition.
16344 Use it when executing the default @ action.
16345 * src/reader.c (reader_output_yylsp): No longer include
16346 `timestamp' and `text' in the default YYLTYPE.
16347
2a91a95e
AD
163482000-12-12 Akim Demaille <akim@epita.fr>
16349
16350 * src/reader.c (copy_definition, parse_union_decl, copy_action)
16351 (copy_guard): Quote the file names.
16352 Reported by Laurent Mascherpa.
16353
14d3eb9b
AD
163542000-12-12 Akim Demaille <akim@epita.fr>
16355
16356 * src/output.c (output_headers, output_program, output): Be sure
16357 to escape special characters when outputting filenames.
16358 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
16359 (output_headers): Don't depend on them, Use ACTSTR.
16360
d7045ec6
AD
163612000-11-17 Akim Demaille <akim@epita.fr>
16362
16363 * lib/obstack.h: Formatting changes.
16364 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
16365 prevents type checking.
16366 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
16367 cast the value to (void *): assigning a `foo *' to a `void *'
16368 variable is valid.
16369 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
16370 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
16371 append characters.
16372
6fd54b73
AD
163732000-11-17 Akim Demaille <akim@epita.fr>
16374
16375 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
16376 as...
16377 (suite.m4, regression.m4, calc.m4): these.
16378 * tests/atgeneral.m4: Update from CVS Autoconf.
16379
4c50eae6
AD
163802000-11-17 Akim Demaille <akim@epita.fr>
16381
16382 * tests/regression.m4 (%union and --defines): New test,
16383 demonstrating a current bug in the obstack implementation.
16384
a35f64ea
AD
163852000-11-17 Akim Demaille <akim@epita.fr>
16386
16387 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
16388 macros.
16389 Use them to declare the variables which are global or local to
16390 `yyparse'.
16391
7de23534
AD
163922000-11-17 Akim Demaille <akim@epita.fr>
16393
16394 * acconfig.h: Remove, no longer used.
16395
aa7815f5
AD
163962000-11-07 Akim Demaille <akim@epita.fr>
16397
16398 * src: s/Copyright (C)/Copyright/g.
16399
5af1f549
AD
164002000-11-07 Akim Demaille <akim@epita.fr>
16401
16402 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
16403 defining.
16404 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
16405
553e2b22
AD
164062000-11-07 Akim Demaille <akim@epita.fr>
16407
16408 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
16409 Merge in a single CPP if/else.
16410
8a4f41d6
AD
164112000-11-07 Akim Demaille <akim@epita.fr>
16412
16413 * src/output.c (output): Remove useless variables.
16414 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
16415 argument `data' for consistency with the prototypes.
16416 Qualify it `const'.
16417 (obstack_copy, obstack_copy0): Rename the second argument as
16418 `address' for consistency. Qualify it `const'.
16419 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
16420 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
16421 `const' their input argument (`data' or `address').
16422 Adjust the corresponding macros to include `const' in casts.
16423
095a3fb5
AD
164242000-11-03 Akim Demaille <akim@epita.fr>
16425
16426 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
16427 s/PFILE1/BISON_HAIRY/.
16428 Adjust dependencies.
16429
d1cdce7c
AD
164302000-11-03 Akim Demaille <akim@epita.fr>
16431
090c5ebf 16432 For some reason, this was not applied.
d1cdce7c
AD
16433
16434 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16435 `unlink': it's no longer used.
16436
9311529b
AD
164372000-11-03 Akim Demaille <akim@epita.fr>
16438
16439 * src/files.c (skeleton_find): New function, eved out of...
16440 (open_files, open_extra_files): here.
16441
d8880f69
AD
164422000-11-03 Akim Demaille <akim@epita.fr>
16443
16444 Don't use `atexit'.
16445
16446 * src/files.c (obstack_save): New function.
16447 (done): Rename as...
16448 (output_files): this.
16449 Use `obstack_save'.
16450 * src/main.c (main): Don't use `atexit' to register `done', since
16451 it no longer has to remove tmp files, just call `output_files'
16452 when there are no errors.
16453
0dbb648e
AD
164542000-11-02 Akim Demaille <akim@epita.fr>
16455
16456 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16457 `unlink': it's no longer used.
16458 * src/files.h: Formatting changes.
16459
896fe5c1
AD
164602000-11-02 Akim Demaille <akim@epita.fr>
16461
16462 Remove the last uses of mktemp and unlink/delete.
16463
16464 * src/files.c (fdefines, ftable): Removed.
16465 (defines_ostack, table_obstack): New.
16466 Adjust dependencies of the former into uses of the latter.
16467 * src/output.c (output_short_or_char_table, output_short_table):
16468 Convert to using obstacks.
16469 * src/reader.c (copy_comment2): Accept one FILE * and two
16470 obstacks.
16471 (output_token_defines, reader_output_yylsp): Use obstacks.
16472 * src/system.h (obstack_fgrow3): New.
1f65350a 16473 * po/POTFILES.in: Adjust.
896fe5c1 16474
dd60faec
AD
164752000-11-01 Akim Demaille <akim@epita.fr>
16476
16477 Change each use of `fattrs' into a use of `attrs_obstack'.
16478
16479 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
16480 * src/files.c (fattrs): Remove.
16481 (attrs_obstack): New.
16482 Adjust all dependencies.
16483 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
16484
8c7ebe49
AD
164852000-11-01 Akim Demaille <akim@epita.fr>
16486
16487 Introduce obstacks.
16488 Change each use of `faction' into a use of `action_obstack'.
16489
16490 * lib/obstack.h, lib/obstack.c: New files.
16491 * src/files.c (faction): Remove.
16492 (action_obstack): New.
16493 Adjust all dependencies.
16494
77aee789
AD
164952000-10-20 Akim Demaille <akim@epita.fr>
16496
16497 * lib/quote.h (PARAMS): New macro. Use it.
16498
43591cec
AD
164992000-10-16 Akim Demaille <akim@epita.fr>
16500
16501 * src/output.c (output_short_or_char_table): New function.
16502 (output_short_table, output_token_translations): Use it.
16503 (goto_actions): Use output_short_table.
16504
1e9798d5
AD
165052000-10-16 Akim Demaille <akim@epita.fr>
16506
16507 * src/symtab.c (bucket_new): New function.
16508 (getsym): Use it.
16509
16510 * src/output.c (output_short_table): New argument to display the
16511 comment associated with the table.
16512 Adjust dependencies.
16513 (output_gram): Use it.
16514 (output_rule_data): Nicer output layout for YYTNAME.
16515
f282676b
AD
165162000-10-16 Akim Demaille <akim@epita.fr>
16517
16518 * src/lex.c (read_typename): New function.
16519 (lex): Use it.
16520 * src/reader.c (copy_dollar): Likewise.
16521
550a72a3
AD
165222000-10-16 Akim Demaille <akim@epita.fr>
16523
16524 * src/reader.c (copy_comment2): Expect the input stream to be on
16525 the `/' which is suspected to open a comment, instead of being
16526 called after `//' or `/*' was read.
16527 (copy_comment, copy_definition, parse_union_decl, copy_action)
16528 (copy_guard): Adjust.
16529
131e2fef
AD
165302000-10-16 Akim Demaille <akim@epita.fr>
16531
16532 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
16533 `read_signed_integer'.
16534
79282c5a
AD
165352000-10-16 Akim Demaille <akim@epita.fr>
16536
16537 * src/reader.c (copy_dollar): New function.
16538 (copy_guard, copy_action): Use it.
16539
ff4a34be
AD
165402000-10-16 Akim Demaille <akim@epita.fr>
16541
16542 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
16543 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
16544 New files, from Fileutils 4.0.27.
16545 * src/main.c (printable_version): Remove.
16546 * src/lex.c, src/reader.c: Use `quote'.
16547
165482000-10-04 Akim Demaille <akim@epita.fr>
16549
16550 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
16551
14ded682
AD
165522000-10-04 Akim Demaille <akim@epita.fr>
16553
16554 * doc/bison.texinfo: Various typos spotted by Neil Booth.
16555
8e03724b
AD
165562000-10-04 Akim Demaille <akim@epita.fr>
16557
16558 When a literal string is used to define two different tokens,
16559 `bison -v' segfaults.
16560 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
16561
16562 * tests/regression.m4: New file.
16563 Include the core of the sample provided by Piotr Gackiewicz.
16564 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
16565 properly.
16566
a9e64249
AD
165672000-10-04 Akim Demaille <akim@epita.fr>
16568
16569 * src/reader.c (parse_expect_decl): Keep `count' within the size
16570 of `buffer'.
16571 From Neil Booth.
16572
da9abf43
AD
165732000-10-02 Paul Eggert <eggert@twinsun.com>
16574
16575 * bison.s1 (yyparse): Assign the default value
16576 unconditionally, to avoid a GCC warning and make the parser a
16577 tad smaller.
16578
c33638bb
AD
165792000-10-02 Akim Demaille <akim@epita.fr>
16580
16581 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
16582 options.
16583
444c570a
AD
165842000-10-02 Akim Demaille <akim@epita.fr>
16585
16586 * src/derives.c, src/print.c, src/reduce.c: To ease the
16587 translation, move some `\n' out of the translated strings.
16588
89cab50d
AD
165892000-10-02 Akim Demaille <akim@epita.fr>
16590
16591 The location tracking mechanism is precious for parse error
16592 messages. Nevertheless, it is enabled only when `@n' is used in
16593 the grammar, which is a different issue (you can use it in error
16594 message, but not in the grammar per se). Therefore, there should
16595 be another means to enable it.
16596
16597 * src/getargs.c (getargs): Support `--locations'.
16598 (usage): Report it.
16599 * src/getargs.h (locationsflag): Export it.
16600 * src/lex.c (percent_table): Support `%locations'.
16601 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16602 with `locationsflag'.
16603 * doc/bison.texinfo: Document `--locations' and `%locations'.
16604 Sort the options.
16605 * tests/calc.m4: Test it.
16606
16607 For regularity of the names, replace each
16608 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16609 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16610 In addition replace each `flag' with `_flag'.
16611
d6c2cba0
AD
166122000-10-02 Akim Demaille <akim@epita.fr>
16613
16614 Also test parse error messages, including with YYERROR_VERBOSE.
16615
16616 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16617 associative).
16618 Use it to check the computations.
16619 Use it to check `nonassoc' is honored.
16620 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16621 `--yyerror-verbose'.
16622 (_AT_CHECK_CALC): Adjust to this option.
16623 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16624
5a35a6cb
AD
166252000-10-02 Akim Demaille <akim@epita.fr>
16626
16627 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16628 the latter demonstrates a flaw in the handling of non debugging
16629 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16630 was used in order to simplify:
16631
16632 #if YYDEBUG
16633 if (yydebug)
16634 {
16635 ...
16636 }
16637 #endif
16638
16639 into
16640
16641 if (yydebug)
16642 {
16643 ...
16644 }
16645
16646 unfortunately this leads to a CPP conflict when
16647 `--name-prefix=foo' is used since it produces `#define yydebug
16648 foodebug'.
16649
16650 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16651 (YYDPRINTF): New macro.
16652 Spread its use.
16653 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16654 the bison options.
16655 Also test `--verbose', `--defines' and `--name-prefix'.
16656
71da9eea
AD
166572000-10-02 Akim Demaille <akim@epita.fr>
16658
16659 Improve the readability of the produced parsers.
16660
16661 * src/bison.s1: Formatting changes.
16662 Improve the comment related to the `$' mark.
16663 (yydefault): Don't fall through to `yyresume': `goto' there.
16664 * src/output.c (output_parser): When the `$' is met, skip the end
16665 of its line.
16666 New variable, `number_of_dollar_signs', to check there's exactly
16667 one `$' in the parser skeleton.
16668
95e36146
AD
166692000-10-02 Akim Demaille <akim@epita.fr>
16670
16671 * lib/xstrdup.c: New file, from the fileutils.
16672 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16673 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16674 instead of strlen + xmalloc + strcpy.
16675 * src/symtab.c (copys): Remove, use xstrdup instead.
16676
d7020c20
AD
166772000-10-02 Akim Demaille <akim@epita.fr>
16678
16679 * src/gram.h (associativity): New enum type which replaces the
16680 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16681 `right_assoc', `left_assoc' and `non_assoc'.
16682 Adjust all dependencies.
16683 * src/reader.c: Formatting changes.
16684 (LTYPESTR): Don't define it, use it as a literal in
16685 `reader_output_yylsp'.
16686 * src/symtab.h (symbol_class): New enum type which replaces the
16687 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16688 `sunknown', `stoken and `snterm'.
16689
1916f98e
AD
166902000-10-02 Akim Demaille <akim@epita.fr>
16691
16692 * src/getargs.c (fixed_outfiles): Rename as...
16693 (yaccflag): for consistency and accuracy.
16694 Adjust dependencies.
16695
d7913476
AD
166962000-10-02 Akim Demaille <akim@epita.fr>
16697
16698 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16699 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16700 difficult and introduced a lot of core dump. It turns out that
16701 Bison used an implementation of `xmalloc' based on `calloc', and
16702 at various places it does depend upon the initialization to 0. I
16703 have not tried to isolate the pertinent places, and all the former
16704 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16705 someone should address this issue.
16706
16707 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16708 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16709 files.
16710 Adjust dependencies.
16711 * src/warshall.h: New file.
16712 Propagate.
16713
340ef489
AD
167142000-10-02 Akim Demaille <akim@epita.fr>
16715
16716 Various anti-`extern in *.c' changes.
16717
16718 * src/system.h: Include `assert.h'.
16719
b2ca4022
AD
167202000-10-02 Akim Demaille <akim@epita.fr>
16721
16722 * src/state.h (nstates, final_state, first_state, first_shift)
16723 (first_reduction): Move their exportation from here...
16724 * src/LR0.h: to here.
16725 Adjust dependencies.
16726 * src/getargs.c (statisticsflag): New variable.
16727 Add support for `--statistics'.
16728 Adjust dependencies.
16729
16730 Remove a lot of now useless `extern' statements in most files.
16731
403b315b
AD
167322000-10-02 Akim Demaille <akim@epita.fr>
16733
16734 * src/LR0.h: New file.
16735 Propagate its use.
16736
07a58c13
AD
167372000-10-02 Akim Demaille <akim@epita.fr>
16738
16739 * src/print.h: New file.
16740 Propagate its use.
16741 * src/print.c: Formatting and ordering changes.
16742 (verbose, terse): Replace with...
16743 (print_results): this new function.
16744 Adjust dependencies.
16745
0619caf0
AD
167462000-10-02 Akim Demaille <akim@epita.fr>
16747
16748 * src/conflicts.c (conflict_report): New function.
16749 (conflict_log, verbose_conflict_log): Replace with...
16750 (print_conflicts): this function.
16751 Adjust dependencies.
16752 * src/conflicts.h: New file.
16753 Propagate its inclusion.
16754
3519ec76
AD
167552000-10-02 Akim Demaille <akim@epita.fr>
16756
16757 * src/nullable.h: New file.
16758 Propagate its inclusion.
16759 * src/nullable.c: Formatting changes.
16760
015acc48
AD
167612000-10-02 Akim Demaille <akim@epita.fr>
16762
16763 * src/reduce.h: New file.
16764 Propagate its inclusion.
16765 * src/reduce.c: Topological sort and other formatting changes.
16766 (bool, TRUE, FALSE): Move their definition to...
16767 * src/system.h: here.
16768
8963a27b
AD
167692000-10-02 Akim Demaille <akim@epita.fr>
16770
16771 * src/files.c: Formatting changes.
16772 (tryopen, tryclose, openfiles): Rename as...
16773 (xfopen, xfclose, open_files): this.
16774 (stringappend): static.
16775 * src/files.h: Complete the list of exported symbols.
16776 Propagate its use.
16777
a70083a3
AD
167782000-10-02 Akim Demaille <akim@epita.fr>
16779
16780 * src/reader.h: New file.
16781 Propagate its use instead of tedious list of `extern' and
16782 prototypes.
16783 * src/reader.c: Formatting changes, topological sort,
16784 s/register//.
16785
abadc117
AD
167862000-10-02 Akim Demaille <akim@epita.fr>
16787
16788 * src/lex.h: Prototype `lex.c' exported functions.
16789 * src/reader.c: Adjust.
16790 * src/lex.c: Formatting changes.
16791 (safegetc): Rename as...
16792 (xgetc): this.
16793
720d742f
AD
167942000-10-02 Akim Demaille <akim@epita.fr>
16795
16796 * src/lalr.h: New file.
16797 Propagate its inclusion instead of prototypes and `extern'.
16798 * src/lalr.c: Formatting changes, topological sorting etc.
16799
f2acea59
AD
168002000-10-02 Akim Demaille <akim@epita.fr>
16801
16802 * src/output.c (token_actions): Introduce a temporary array,
16803 YYDEFACT, that makes it possible for this function to use
16804 output_short_table.
16805
d019d655
AD
168062000-10-02 Akim Demaille <akim@epita.fr>
16807
16808 `user_toknums' is output as a `short[]' in `output.c', while it is
16809 defined as a `int[]' in `reader.c'. For consistency with the
16810 other output tables, `user_toknums' is now defined as a table of
16811 shorts.
16812
16813 * src/reader.c (user_toknums): Be a short table instead of an int
16814 table.
16815 Adjust dependencies.
16816
16817 Factor the short table outputs.
16818
16819 * src/output.c (output_short_table): New function.
16820 * src/output.c (output_gram, output_stos, output_rule_data)
16821 (output_base, output_table, output_check): Use it.
16822
6c89f1c1
AD
168232000-10-02 Akim Demaille <akim@epita.fr>
16824
16825 * src/output.c (output): Topological sort of the functions, in
16826 order to get rid of the `static' prototypes.
16827 No longer use `register'.
16828 * src/output.h: New file.
16829 Propagate its inclusion in files explicitly prototyping functions
16830 from output.c.
16831
d9efd181
AD
168322000-09-21 Akim Demaille <akim@epita.fr>
16833
16834 * src/atgeneral.m4: Update from Autoconf.
16835
c29240e7 168362000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
16837
16838 * src/closure.h: New file.
16839 * src/closure.c: Formatting changes, topological sort over the
16840 functions, use of closure.h.
16841 (initialize_closure, finalize_closure): Rename as...
16842 (new_closure, free_closure): these. Adjust dependencies.
16843 * src/LR0.c: Formatting changes, topological sort, use of
16844 cloture.h.
16845 (initialize_states): Rename as...
16846 (new_states): this.
16847 * src/Makefile.am (noinst_HEADERS): Adjust.
16848
499daa50
AD
168492000-09-20 Akim Demaille <akim@epita.fr>
16850
16851 * src/acconfig.h: Don't protect config.h against multiple
16852 inclusion.
16853 Don't define PARAMS.
16854 * src/system.h: Define PARAMS.
16855 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16856 purpose of config.h. system.h must not try to fix wrong
16857 definitions in config.h.
16858
cc84fd5d
AD
168592000-09-20 Akim Demaille <akim@epita.fr>
16860
16861 * src/derives.h: New file.
16862 * src/main.c, src/derives.h: Use it.
16863 Formatting changes.
16864 * src/Makefile.am (noinst_HEADERS): Adjust.
16865
db5b3a89
AD
168662000-09-20 Akim Demaille <akim@epita.fr>
16867
16868 * tests/atgeneral.m4: Update from Autoconf.
16869 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16870 (AT_CHECK_CALC): New macros.
16871 Use these macros to test bison with options `', `--raw',
16872 `--debug', `--yacc', `--yacc --debug'.
16873
ceed8467
AD
168742000-09-19 Akim Demaille <akim@epita.fr>
16875
16876 * src/output.c: Formatting changes.
16877 * src/machine.h: Remove, leaving its contents in...
16878 * src/system.h: here.
16879 Include stdio.h.
16880 Adjust all dependencies on stdio.h and machine.h.
16881 * src/getargs.h: New file.
16882 Let all `extern' declarations about getargs.c be replaced with
16883 inclusion of `getargs.h'.
16884 * src/Makefile.am (noinst_HEADERS): Adjust.
16885
16886 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16887 scope.
16888 (yyerror): Returns void, not int.
16889 * doc/bison.texinfo: Formatting changes.
16890
05a1d24b
AD
168912000-09-19 Akim Demaille <akim@epita.fr>
16892
16893 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16894 portable.
16895
cbd25751
AD
168962000-09-18 Akim Demaille <akim@epita.fr>
16897
16898 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16899 * src/Makefile.am (INCLUDES): Don't.
16900 Be ready to fetch headers in lib/.
16901
13863333
AD
169022000-09-18 Akim Demaille <akim@epita.fr>
16903
16904 * doc/bison.texinfo: Update the copyright.
16905 ANSIfy and GNUify the examples.
16906 Remove the old menu.
16907
0d533154
AD
169082000-09-18 Akim Demaille <akim@epita.fr>
16909
16910 First set of tests: use the `calc' example from the documentation.
16911
16912 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16913 is defined only when YYDEBUG is.
16914 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16915 * src/files.c (tryopen, tryclose): Formatting changes.
16916 Move to the top and be static.
16917 * src/reader.c (read_signed_integer): Likewise.
16918 * tests/calc.m4: New file.
16919 * Makefile.am, suite.m4: Adjust.
16920 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16921
e79137ac
AD
169222000-09-18 Akim Demaille <akim@epita.fr>
16923
16924 Add support for an Autotest test suite for Bison.
16925
16926 * m4/m4.m4, m4/atconfig.m4: New files.
16927 * m4/Makefile.am (EXTRA_DIST): Adjust.
16928 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16929 files.
16930 * src/getargs.c: Display a more standard --version message.
16931 * src/reader.c (reader): Formatting changes.
16932 No longer depend upon VERSION_STRING.
16933 * configure.in: No longer use `dnl'.
16934 Set up the test suite and the new directory `tests/.
16935 (VERSION_STRING): Remove.
16936
27821bff
AD
169372000-04-14 Akim Demaille <akim@epita.fr>
16938
16939 * src/reader.c (copy_comment2): New function, same as former
16940 `copy_comment', but outputs into two FILE *.
16941 (copy_comment): Use it.
16942 (parse_union_decl): Use it.
16943 (get_type, parse_start_decl): Use the same `invalid' message.
16944 (parse_start_decl, parse_union_decl): Use the same `multiple'
16945 message.
16946 (parse_union_decl, copy_guard, copy_action): Use the same
16947 `unmatched' message.
16948 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16949
cfe5fbc0
AD
169502000-03-31 Akim Demaille <akim@epita.fr>
16951
16952 * src/files.c (tryopen, tryclose): Move to the top.
16953 Be static.
16954
cb7db13e
AD
169552000-03-31 Akim Demaille <akim@epita.fr>
16956
16957 * src/main.c (main): Don't call `done', exit does it.
16958
a0f6b076
AD
169592000-03-31 Akim Demaille <akim@epita.fr>
16960
36281465
AD
16961 * allocate.c: s/return (foo)/return foo/.
16962 * lalr.c: Likewise.
16963 * LR0.c: Likewise.
16964 * output.c: Likewise.
16965 * reader.c: Likewise.
16966 * symtab.c: Likewise.
16967 * vmsgetargs.c: Likewise.
16968
169692000-03-31 Akim Demaille <akim@epita.fr>
16970
16971 Clean up the error reporting functions.
a0f6b076
AD
16972
16973 * src/report.c: New file.
16974 * src/report.h: Likewise.
16975 * src/Makefile.am: Adjust.
16976 * m4/error.m4: New file.
16977 * m4/Makefile.am: Adjust.
16978 * configure.in (jm_PREREQ_ERROR): Call it.
16979 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16980 Remove.
16981 (fatal, fatals): Remove. All callers use complain.c::fatal.
16982 (warn, warni, warns, warnss, warnss): Remove. All callers use
16983 complain.c::complain.
16984 (toomany): Remove, use fatal instead.
16985 * src/files.c (done): No argument, use complain_message_count.
16986 * src/main.c (main): Register `done' to `atexit'.
16987
16988 * src/getargs.c (usage): More `fputs', less `fprintf'.
16989
18539825
AD
169902000-03-28 Akim Demaille <akim@epita.fr>
16991
16992 * lib/: New directory.
16993 * Makefile.am (SUBDIRS): Adjust.
16994 * configure.in: Adjust.
16995 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16996 useless.
16997 * src/alloca.c: Moved to lib/.
16998 * src/getopt.c: Likewise.
16999 * src/getopt1.c: Likewise.
17000 * src/getopt.h: Likewise.
17001 * src/ansi2knr.c: Likewise.
17002 * src/ansi2knr.1: Likewise.
17003 * src/Makefile.am: Adjust.
17004 * lib/Makefile.am: New file.
17005
9f306f2a
AD
170062000-03-28 Akim Demaille <akim@epita.fr>
17007
17008 * src/getargs.c (usage): Refresh the help message.
17009
0ba347b6
AD
170102000-03-17 Akim Demaille <akim@epita.fr>
17011
17012 * src/getopt1.c: Updated from textutils 2.0e
17013 * src/getopt.c: Likewise.
17014 * src/getopt.h: Likewise.
17015
dbe7f271
AD
170162000-03-17 Akim Demaille <akim@epita.fr>
17017
17018 * src/Makefile.am (bison.simple): Fix the awk program: quote only
17019 the file name, not the whole `#line LINE FILE'.
17020
75bbe78d
AD
170212000-03-17 Akim Demaille <akim@epita.fr>
17022
17023 On syntax errors, report the token on which we choked.
17024
aa5fd0ee
AD
17025 * src/bison.s1 (yyparse): In the label yyerrlab, when
17026 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 17027
7b306f52
AD
170282000-03-17 Akim Demaille <akim@epita.fr>
17029
aa5fd0ee 17030 * src/reader.c (copy_at): New function.
7b306f52
AD
17031 (copy_guard): Use it.
17032 (copy_action): Use it.
17033
e87b5700
AD
170342000-03-17 Akim Demaille <akim@epita.fr>
17035
17036 Be kind to translators, save some useless translations.
17037
aa5fd0ee 17038 * src/main.c (banner): New function.
e87b5700
AD
17039 (fatal_banner): Use it.
17040 (warn_banner): Use it.
17041
ae3c3164
AD
170422000-03-17 Akim Demaille <akim@epita.fr>
17043
aa5fd0ee
AD
17044 * src/reader.c (copy_definition): Use copy_string and
17045 copy_comment. Removed now unused `match', `ended',
17046 `cplus_comment'.
ae3c3164
AD
17047 (copy_comment, copy_string): Moved, to be visible from
17048 copy_definition.
17049
4dc58e7c
AD
170502000-03-17 Akim Demaille <akim@epita.fr>
17051
aa5fd0ee
AD
17052 * src/reader.c (copy_string): Declare `static inline'. No
17053 problems with inline, since it is checked by configure.
4dc58e7c
AD
17054 (copy_comment): Likewise.
17055
0a6384c4
AD
170562000-03-17 Akim Demaille <akim@epita.fr>
17057
aa5fd0ee 17058 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 17059
3cef001a
AD
170602000-03-17 Akim Demaille <akim@epita.fr>
17061
aa5fd0ee 17062 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
17063 (copy_action): Use it. Removed now unused `match', `ended',
17064 `cplus_comment'.
17065 (copy_guard): Likewise.
17066
ca36d2ef
AD
170672000-03-17 Akim Demaille <akim@epita.fr>
17068
aa5fd0ee 17069 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
17070 (copy_action): Use it.
17071 (copy_guard): Likewise.
17072
6666f98f
AD
170732000-03-17 Akim Demaille <akim@epita.fr>
17074
17075 Change the handling of @s so that they behave exactly like $s.
17076 There is now a pseudo variable @$ (readble and writable), location
17077 of the lhs of the rule (by default ranging from the location of
17078 the first symbol of the rhs, to the location of the last symbol,
17079 or, if the rhs is empty, YYLLOC).
17080
17081 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
17082 yyval.
17083 (yyparse): When providing a default semantic action, provide a
17084 default location action.
17085 (after the $): No longer change `*YYLSP', just stack YYLOC the
17086 same way you stack YYVAL.
17087 * src/reader.c (read_declarations): Use warns.
17088 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
17089 (copy_action, case '@'): Likewise.
17090 Use a standard error message, to save useless work from
17091 translators.
17092
41aca2e0
AD
170932000-03-17 Akim Demaille <akim@epita.fr>
17094
aa5fd0ee
AD
17095 * src/bison.s1: Formatting and cosmetics changes.
17096 * src/reader.c: Likewise.
41aca2e0
AD
17097 Update the Copyright notice.
17098
dc08c1d5
AD
170992000-03-17 Akim Demaille <akim@epita.fr>
17100
aa5fd0ee
AD
17101 * src/bison.s1 (#line): All set to `#line' only, since the
17102 Makefile now handles them.
dc08c1d5 17103
9ee3c97b
AD
171042000-03-16 Akim Demaille <akim@epita.fr>
17105
17106 * src/output.c (output_rule_data): Output the documentation of
17107 some of the tables.
17108 (Copyright notice): Update.
17109 Formatting changes.
17110
0de741ca
AD
171112000-03-16 Akim Demaille <akim@epita.fr>
17112
17113 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
17114 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
17115 One `#if YYDEBUG' remains, since it uses variables which are
17116 defined only if `YYDEBUG != 0'.
17117
bb10be54
AD
171182000-03-16 Akim Demaille <akim@epita.fr>
17119
17120 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
17121 and related variables so that the similarities are highlighted.
17122
b07b484a
AD
171232000-03-16 Akim Demaille <akim@epita.fr>
17124
17125 * src/bison.s1: Properly indent CPP directives.
17126
361f60b3
AD
171272000-03-16 Akim Demaille <akim@epita.fr>
17128
17129 * src/bison.s1: Properly indent the `alloca' CPP section.
17130
8c44d3ec
AD
171312000-03-16 Akim Demaille <akim@epita.fr>
17132
17133 Do not hard code values of directories in `configure.in'.
17134 Update the `configure' tool chain.
17135
17136 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
17137 src/makefile.am.
17138 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
17139 (AC_OUTPUT): Add m4/Makefile.
17140 Bump to bison 1.28a, 1.29 has never been released.
17141 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
17142 handled via src/Makefile.am.
17143 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
17144 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
17145 autoheader.
17146 * Makefile.am (SUBDIRS): Add m4.
17147 (ACLOCAL_AM_FLAGS): New variable.
17148 (AUTOMAKE_OPTIONS): Add check-news.
17149 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
17150 the proper line number and file name.
17151 (DEFS): Propagate the location of bison library files and of the
17152 locale files.
17153 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
17154 builddir.
17155 * acinclude.m4: Remove, replaced by the directory m4.
17156 * m4/Makefile.am (EXTRA_DIST): New variable.
17157 * m4/gettext.m4: New file, from the fileutils.
17158 * m4/lcmessage.m4: Likewise
17159 * m4/progtest.m4: Likewise.
17160 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
17161
f95997e7
AD
171622000-03-10 Akim Demaille <akim@epita.fr>
17163
17164 * src/closure.c:
17165 Formatting changes of various comments.
17166 Respect the GNU coding standards at various places.
17167 Don't use `_()' when no translation is needed.
17168
171691999-12-13 Jesse Thilo <jthilo@gnu.org>
17170
17171 * src/files.c:
17172 OS/2 honors TMPDIR environment variable.
17173
171741999-12-13 Jesse Thilo <jthilo@gnu.org>
17175
17176 * doc/bison.texinfo: Tweaked spelling and grammar.
17177 Updated ISBN.
17178 Removed reference to price of printed copy.
17179 Mention BISON_SIMPLE and BISON_HAIRY.
17180
171811999-12-13 Jesse Thilo <jthilo@gnu.org>
17182
17183 * configure.in, NEWS:
17184 Bison 1.29 released.
17185
171861999-10-27 Jesse Thilo <jthilo@gnu.org>
17187
17188 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
17189 Added reference card.
17190
171911999-07-26 Jesse Thilo <jthilo@gnu.org>
17192
17193 * po/ru.po: Added Russian translation.
17194
171951999-07-26 Jesse Thilo <jthilo@gnu.org>
17196
17197 * configure.in: Added Russian translation.
17198
171991999-07-06 Jesse Thilo <jthilo@gnu.org>
17200
17201 * configure.in, NEWS, README:
17202 Released version 1.28.
17203
172041999-06-14 Jesse Thilo <jthilo@gnu.org>
17205
17206 * src/system.h:
17207 Squashed redefinition warning on some systems.
17208
17209 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
17210 Have configure build version string instead of relying on ANSI string
17211 concatentation.
17212
172131999-06-14 Jesse Thilo <jthilo@gnu.org>
17214
17215 * po/POTFILES.in: Got rid of version.c.
17216
172171999-06-14 Jesse Thilo <jthilo@gnu.org>
17218
17219 * acconfig.h, configure.in:
17220 Have configure build version string instead of relying on ANSI string
17221 concatentation.
17222
172231999-06-08 Jesse Thilo <jthilo@gnu.org>
17224
17225 * doc/bison.1:
17226 Dropped mention of `+' for long-named options.
17227
172281999-05-30 Jesse Thilo <jthilo@gnu.org>
17229
17230 * src/files.c: Added <unistd.h> for unlink().
17231
17232 * src/Makefile.am, src/system.h:
17233 I18n fixes.
17234
172351999-05-30 Jesse Thilo <jthilo@gnu.org>
17236
17237 * README: Added a FAQ list.
17238
17239 * configure.in, acconfig.h:
17240 I18n fixes.
17241
172421999-05-30 Jesse Thilo <jthilo@gnu.org>
17243
17244 * doc/FAQ, doc/Makefile.am:
17245 Added a FAQ list.
17246
172471999-05-19 Jesse Thilo <jthilo@gnu.org>
17248
17249 * src/alloc.h, src/symtab.h, src/version.c:
17250 Protected inclusion of "config.h" with HAVE_CONFIG_H.
17251
172521999-04-18 Jesse Thilo <jthilo@gnu.org>
17253
17254 * src/.cvsignore, src/Makefile.am:
17255 Reorganized: sources in `src', documentation in `doc'.
17256
17257 * src/lex.c (literalchar):
17258 fixed the code for escaping double quotes (thanks
17259 Jonathan Czisny.)
17260
172611999-04-18 Jesse Thilo <jthilo@gnu.org>
17262
17263 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
17264 Adjusted paths to reflect directory reorganization.
17265
172661999-04-18 Jesse Thilo <jthilo@gnu.org>
17267
17268 * doc/.cvsignore, doc/Makefile.am:
17269 Reorganized: sources in `src', documentation in `doc'.
17270
172711999-04-18 Jesse Thilo <jthilo@gnu.org>
17272
17273 * configure.in:
17274 Updated AC_INIT file to reflect directory reorganization.
17275
17276 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
17277 Reorganized: sources in `src', documentation in `doc'.
17278
172791999-04-13 Jesse Thilo <jthilo@gnu.org>
17280
17281 * src/allocate.c:
17282 Don't declare calloc() and realloc() if not necessary.
17283
172841999-04-13 Jesse Thilo <jthilo@gnu.org>
17285
17286 * configure.in, acconfig.h, acinclude.m4:
17287 Don't declare calloc() and realloc() if not necessary.
17288
172891999-03-23 Jesse Thilo <jthilo@gnu.org>
17290
17291 * po/.cvsignore: Added i18n support.
17292
172931999-03-23 Jesse Thilo <jthilo@gnu.org>
17294
17295 * acconfig.h, configure.in, Makefile.am:
17296 Added i18n support.
17297
172981999-03-22 Jesse Thilo <jthilo@gnu.org>
17299
17300 * src/bison.s1: Fixed #line numbers.
17301
173021999-03-15 Jesse Thilo <jthilo@gnu.org>
17303
17304 * po/es.po, po/fr.po, po/nl.po, po/de.po:
17305 Added PO files from Translation Project.
17306
173071999-03-03 Jesse Thilo <jthilo@gnu.org>
17308
17309 * Makefile.am:
17310 Added support for non-ANSI compilers (ansi2knr).
17311
173121999-02-16 Jesse Thilo <jthilo@gnu.org>
17313
17314 * configure.in: Bumped version number to 1.27.
17315
17316 * Makefile.am:
17317 Added `bison.simple' to list of files removed by `make distclean'.
17318
173191999-02-12 Jesse Thilo <jthilo@gnu.org>
17320
17321 * src/files.c, src/files.h:
17322 Defined locations of parser files in config.h instead of Makefile.
17323
173241999-02-12 Jesse Thilo <jthilo@gnu.org>
17325
17326 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
17327 Defined locations of parser files in config.h instead of Makefile.
17328
173291999-02-09 Jesse Thilo <jthilo@gnu.org>
17330
17331 * Makefile.am:
17332 Removed inappropriate use of $< macro.
17333
173341999-02-05 Jesse Thilo <jthilo@gnu.org>
17335
17336 * po/Makefile.in.in, po/POTFILES.in:
17337 Add `po' directory skeleton.
17338
173391999-01-27 Jesse Thilo <jthilo@gnu.org>
17340
17341 * README: Document help-bison list.
17342
17343 * configure.in: Add check for mkstemp().
17344
173451999-01-20 Jesse Thilo <jthilo@gnu.org>
17346
17347 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
17348 Hush a few compiler warnings.
17349
17350 * src/files.c:
17351 Add tryclose(), which verifies that fclose was successful.
17352 Hush a couple of compiler warnings.
17353
173541999-01-20 Jesse Thilo <jthilo@gnu.org>
17355
17356 * Makefile.am, OChangeLog:
17357 ChangeLog is now automatically generated. Include the old version as
17358 OChangeLog.
17359
173601999-01-14 Jesse Thilo <jthilo@gnu.org>
17361
17362 * 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:
17363 Update FSF address.
17364
173651999-01-14 Jesse Thilo <jthilo@gnu.org>
17366
17367 * doc/bison.texinfo: Fix formatting glitch.
17368
17369 * doc/bison.texinfo: Update FSF address.
17370
173711999-01-14 Jesse Thilo <jthilo@gnu.org>
17372
17373 * acconfig.h: Update FSF address.
17374
173751999-01-08 Jesse Thilo <jthilo@gnu.org>
17376
17377 * src/system.h:
17378 Don't define PACKAGE here, since config.h defines it.
17379
173801998-12-30 Jesse Thilo <jthilo@gnu.org>
17381
17382 * src/reader.c: Update copyright date.
17383
17384 * src/main.c:
17385 Ditch sprintf to statically-sized buffers in fatal/warn functions in
17386 favor of output directly to stderr (avoids buffer overruns).
17387
17388 * src/reader.c: Some checks for premature EOF.
17389
17390 * 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:
17391 Use prototypes if the compiler understands them.
17392
17393 * src/files.c: Honor TMPDIR on Unix hosts.
17394 Use prototypes if the compiler understands them.
17395
17396 * src/reader.c:
17397 Fix a couple of buffer overrun bugs.
17398 Use prototypes if the compiler understands them.
17399
17400 * src/system.h: Include unistd.h and ctype.h.
17401 Use #ifdef instead of #if for NLS symbols.
17402
174031998-12-30 Jesse Thilo <jthilo@gnu.org>
17404
17405 * doc/bison.texinfo:
17406 Delete comment "consider using @set for edition number, etc..." since
17407 we now are doing so.
17408
174091998-12-30 Jesse Thilo <jthilo@gnu.org>
17410
17411 * configure.in:
17412 Use prototypes if the compiler understands them.
17413
17414 * NEWS: Document 1.26 highlights.
17415
17416 * Makefile.am: Require Automake 1.3 or later.
17417
17418 * acconfig.h:
17419 Use prototypes if the compiler understands them.
17420
174211998-12-29 Jesse Thilo <jthilo@gnu.org>
17422
17423 * src/version.c:
17424 Use VERSION symbol from automake for version number.
17425
174261998-12-29 Jesse Thilo <jthilo@gnu.org>
17427
17428 * acconfig.h, configure.in, version.cin:
17429 Use VERSION symbol from automake for version number.
17430
174311998-11-28 Jesse Thilo <jthilo@gnu.org>
17432
17433 * Makefile.am:
17434 Distribute original version of simple parser (bison.s1), not built
17435 version (bison.simple).
17436
174371998-11-28 Jesse Thilo <jthilo@gnu.org>
17438
17439 * doc/bison.texinfo: Add info dir entry.
17440
17441 * doc/bison.texinfo:
17442 Let automake put version number into documentation.
17443
174441998-11-26 Jesse Thilo <jthilo@gnu.org>
17445
17446 * src/bison.cld, src/build.com, src/vmshlp.mar:
17447 Add non-RCS files from /gd/gnu/bison.
17448
174491998-11-26 Jesse Thilo <jthilo@gnu.org>
17450
17451 * doc/bison.1:
17452 Document the BISON_HAIRY and BISON_SIMPLE variables.
17453
174541998-11-25 Jesse Thilo <jthilo@gnu.org>
17455
17456 * src/version.c: Build version.c automatically.
17457
17458 * src/reader.c:
17459 Fix token numbering (used to start at 258, not 257).
17460
17461 * src/system.h: Include config.h.
17462
17463 * src/getargs.c: Update bug report address.
17464
17465 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
17466 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
17467
174681998-11-25 Jesse Thilo <jthilo@gnu.org>
17469
17470 * Makefile.am:
17471 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17472
17473 * configure.in, version.cin:
17474 Build version.c automatically.
17475
17476 * AUTHORS: Add AUTHORS file.
17477
17478 * README: Update bug report address.
17479
17480 * bison.simple:
17481 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17482
17483 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
17484 Add automake stuff.
17485
174861998-11-25 Jesse Thilo <jthilo@gnu.org>
17487
17488 * doc/bison.texinfo: Clean up some formatting.
17489
174901998-05-05 Richard Stallman <rms@gnu.org>
17491
17492 * doc/bison.texinfo:
17493 Explain better why to make a pure parser.
17494
174951998-01-05 Richard Stallman <rms@gnu.org>
17496
17497 * src/files.c (openfiles):
17498 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
17499 find a temporary directory, if possible. Do not unlink files while
17500 they are open.
17501
175021997-08-25 Richard Stallman <rms@gnu.org>
17503
17504 * src/reader.c (stack_offset;):
17505 Change some warni to warns.
17506
17507 * src/lex.c (literalchar): Use warns, not warni.
17508
175091997-06-28 Richard Stallman <rms@gnu.org>
17510
17511 * src/bison.s1: Add a Bison version comment.
17512
17513 * src/main.c (fatal, warn, berror):
17514 Use program_name.
17515
175161997-06-28 Richard Stallman <rms@gnu.org>
17517
17518 * Makefile.in (bison_version): New variable.
17519 (dist): Use that variable.
17520 (bison.s1): Substitute the Bison version into bison.simple.
17521
17522 * bison.simple: Add a Bison version comment.
17523
175241997-06-18 Richard Stallman <rms@gnu.org>
17525
17526 * src/main.c (fatal, warn, berror):
17527 Make error messages standard.
17528 (toomany): Improve error message text.
17529
17530 * 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:
17531 new.h renamed to alloc.h.
17532
175331997-06-18 Richard Stallman <rms@gnu.org>
17534
17535 * Makefile.in: new.h renamed to alloc.h.
17536
175371997-05-24 Richard Stallman <rms@gnu.org>
17538
17539 * src/lex.c (literalchar):
17540 Fix the code for escaping \, " and '.
17541
17542 (lex): Avoid trouble when there are many chars
17543 to discard in a char literal with just several chars in it.
17544
175451997-05-17 Richard Stallman <rms@gnu.org>
17546
17547 * src/bison.s1:
17548 Use malloc, if using alloca is troublesome.
17549 (YYSTACK_USE_ALLOCA): New flag macro.
17550 Define it for some systems and compilers.
17551 (YYSTACK_ALLOC): New macro.
17552 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17553 If it was malloc'd, free it.
17554
175551997-05-17 Richard Stallman <rms@gnu.org>
17556
17557 * bison.simple:
17558 Use malloc, if using alloca is troublesome.
17559 (YYSTACK_USE_ALLOCA): New flag macro.
17560 Define it for some systems and compilers.
17561 (YYSTACK_ALLOC): New macro.
17562 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17563 If it was malloc'd, free it.
17564
175651997-04-23 Richard Stallman <rms@gnu.org>
17566
17567 * src/bison.s1:
17568 (alloca) [__hpux]: Always define as __builtin_alloca.
17569
175701997-04-23 Richard Stallman <rms@gnu.org>
17571
17572 * bison.simple:
17573 (alloca) [__hpux]: Always define as __builtin_alloca.
17574
175751997-04-22 Richard Stallman <rms@gnu.org>
17576
17577 * src/bison.s1:
17578 [__hpux]: Include alloca.h (right for HPUX 10)
17579 instead of declaring alloca (right for HPUX 9).
17580
17581 * src/bison.s1 (__yy_memcpy):
17582 Declare arg `count' as unsigned int.
17583 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17584
175851997-04-22 Richard Stallman <rms@gnu.org>
17586
17587 * bison.simple:
17588 [__hpux]: Include alloca.h (right for HPUX 10)
17589 instead of declaring alloca (right for HPUX 9).
17590
17591 * bison.simple (__yy_memcpy):
17592 Declare arg `count' as unsigned int.
17593 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17594
175951997-01-03 Richard Stallman <rms@gnu.org>
17596
17597 * src/allocate.c: [__STDC__ or _MSC_VER]:
17598 Declare calloc and realloc to return void *.
17599
176001997-01-02 Richard Stallman <rms@gnu.org>
17601
17602 * src/system.h:
17603 [_MSC_VER]: Include stdlib.h and process.h.
17604 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17605
17606 * src/main.c (main): Return FAILURE as a value.
17607 (printable_version): Declare arg as int, not char.
17608
176091997-01-02 Richard Stallman <rms@gnu.org>
17610
17611 * Makefile.in (dist):
17612 Explicitly check for symlinks, and copy them.
17613
176141996-12-19 Richard Stallman <rms@gnu.org>
17615
17616 * src/files.c:
17617 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17618
176191996-12-18 Paul Eggert <eggert@gnu.org>
17620
17621 * src/bison.s1 (yyparse):
17622 If __GNUC__ and YYPARSE_PARAM are both defined,
17623 declare yyparse to have a void * argument.
17624
176251996-12-18 Paul Eggert <eggert@gnu.org>
17626
17627 * bison.simple (yyparse):
17628 If __GNUC__ and YYPARSE_PARAM are both defined,
17629 declare yyparse to have a void * argument.
17630
176311996-12-17 Richard Stallman <rms@gnu.org>
17632
17633 * src/reduce.c (nbits): Add some casts.
17634
176351996-08-12 Richard Stallman <rms@gnu.org>
17636
17637 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17638
176391996-08-12 Richard Stallman <rms@gnu.org>
17640
17641 * bison.simple: Test _MSDOS as well as _MSDOS_.
17642
176431996-07-31 Richard Stallman <rms@gnu.org>
17644
17645 * src/bison.s1:
17646 [__sun && __i386]: Include alloca.h.
17647
176481996-07-31 Richard Stallman <rms@gnu.org>
17649
17650 * bison.simple:
17651 [__sun && __i386]: Include alloca.h.
17652
176531996-07-30 Richard Stallman <rms@gnu.org>
17654
17655 * src/bison.s1: Comment change.
17656
17657 * src/bison.s1: Test _MSDOS_, not MSDOS.
17658
176591996-07-30 Richard Stallman <rms@gnu.org>
17660
17661 * bison.simple: Comment change.
17662
17663 * bison.simple: Test _MSDOS_, not MSDOS.
17664
176651996-06-01 Richard Stallman <rms@gnu.org>
17666
17667 * 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:
17668 Insert `_' macro around many string constants.
17669
17670 * src/main.c:
17671 Insert `_' macro around many string constants.
17672
17673 (main): Call setlocale, bindtextdomain and textdomain.
17674
17675 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17676 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17677 [ENABLE_NLS]: Include libintl.h.
17678 [ENABLE_NLS] (gettext): Define.
17679 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17680 (N_, PACKAGE, LOCALEDIR): New macros.
17681
176821996-06-01 Richard Stallman <rms@gnu.org>
17683
17684 * POTFILES.in: New file.
17685
17686 * Makefile.in (allocate.o):
17687 Define target explicitly.
17688
17689 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17690 (LDFLAGS): Set to @LDFLAGS@.
17691 (configure): Run autoconf only if preceding `cd' succeeds.
17692 (bison.s1): Redirect output to temporary file then move the
17693 temporary to the target, rather than redirecting directly to bison.s1.
17694 (clean): Remove config.status and config.log.
17695 (distclean): Don't remove config.status here.
17696
176971996-05-12 Richard Stallman <rms@gnu.org>
17698
17699 * src/bison.s1:
17700 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17701
177021996-05-12 Richard Stallman <rms@gnu.org>
17703
17704 * bison.simple:
17705 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17706
177071996-05-11 Richard Stallman <rms@gnu.org>
17708
17709 * src/bison.s1 (__yy_memcpy):
17710 Really reorder the args, as was supposedly done on Feb 14 1995.
17711 (yyparse): Calls changed accordingly.
17712
177131996-05-11 Richard Stallman <rms@gnu.org>
17714
17715 * Makefile.in (dist): Don't use $(srcdir).
17716
17717 * bison.simple (__yy_memcpy):
17718 Really reorder the args, as was supposedly done on Feb 14 1995.
17719 (yyparse): Calls changed accordingly.
17720
177211996-01-27 Richard Stallman <rms@gnu.org>
17722
17723 * src/output.c (output_rule_data):
17724 Test YYERROR_VERBOSE in the conditional
17725 around the definition of ttyname.
17726
177271995-12-29 Richard Stallman <rms@gnu.org>
17728
17729 * src/bison.s1:
17730 Fix line numbers in #line commands.
17731
177321995-12-29 Richard Stallman <rms@gnu.org>
17733
17734 * bison.simple:
17735 Fix line numbers in #line commands.
17736
177371995-12-27 Richard Stallman <rms@gnu.org>
17738
17739 * src/bison.s1 (YYPARSE_PARAM_DECL):
17740 In C++, make it always null.
17741 (YYPARSE_PARAM_ARG): New macro.
17742 (yyparse): Use YYPARSE_PARAM_ARG.
17743
177441995-12-27 Richard Stallman <rms@gnu.org>
17745
17746 * bison.simple (YYPARSE_PARAM_DECL):
17747 In C++, make it always null.
17748 (YYPARSE_PARAM_ARG): New macro.
17749 (yyparse): Use YYPARSE_PARAM_ARG.
17750
177511995-11-29 Richard Stallman <rms@gnu.org>
17752
17753 * doc/bison.texinfo:
17754 Describe literal string tokens, %raw, %no_lines, %token_table.
17755
177561995-11-29 Daniel Hagerty <hag@gnu.org>
17757
17758 * doc/bison.texinfo: Fixed update date
17759
177601995-10-16 Richard Stallman <rms@gnu.org>
17761
17762 * src/version.c: Version 1.25.
17763
177641995-10-16 Richard Stallman <rms@gnu.org>
17765
17766 * NEWS: *** empty log message ***
17767
177681995-10-16 Richard Stallman <rms@gnu.org>
17769
17770 * doc/bison.1, doc/bison.rnh:
17771 Add new options.
17772
177731995-10-15 Richard Stallman <rms@gnu.org>
17774
17775 * src/vmsgetargs.c, src/getargs.c:
17776 Added -n, -k, and -raw switches.
17777 (noparserflag, toknumflag, rawtoknumflag): New variables.
17778
17779 * src/symtab.h (SALIAS):
17780 New #define for adding aliases to %token.
17781 (struct bucket): Added `alias' field.
17782
17783 * src/reduce.c (reduce_grammar):
17784 Revise error message.
17785 (print_notices): Remove final `.' from error message.
17786
17787 * src/reader.c (reader_output_yylsp):
17788 New function.
17789 (readgram): Use `#if 0' around code that accepted %command
17790 inside grammar rules: The documentation doesn't allow it,
17791 and it will fail since the %command processors scan for the next %.
17792 (parse_token_decl): Extended the %token
17793 declaration to allow a multi-character symbol as an alias.
17794 (parse_thong_decl): New function.
17795 (read_declarations): Added %thong declarations.
17796 (read_declarations): Handle NOOP to deal with allowing
17797 % declarations as another means to specify the flags.
17798 (readgram): Allow %prec prior to semantics embedded in a rule.
17799 (skip_to_char, read_declarations, copy_definition)
17800 (parse_token_decl, parse_start_decl, parse_type_decl)
17801 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17802 (get_type_name, copy_guard, copy_action, readgram)
17803 (get_type, packsymbols): Revised most error messages.
17804 Changed `fatal' to `warnxxx' to avoid aborting for error.
17805 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17806 (read_declarations): Improve the error message for
17807 an invalid character. Do not abort.
17808 (read_declarations, copy_guard, copy_action): Use
17809 printable_version to avoid unprintable characters in printed output.
17810 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17811 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17812 Allow the type of a non-terminal can be given
17813 more than once, as long as all specifications give the same type.
17814
17815 * src/output.c:
17816 (output_headers, output_trailers, output, output_gram)
17817 (output_rule_data): Implement noparserflag variable.
17818 Implement toknumflag variable.
17819 (output): Call reader_output_yylsp to output LTYPESTR.
17820
17821 * src/main.c (main):
17822 If reader sees an error, don't process the grammar.
17823 (fatals): Updated to not use VARARGS1.
17824 (printable_version, int_to_string, warn, warni, warns, warnss)
17825 (warnsss): New error reporting functions. Avoid abort for error.
17826
17827 * src/lex.h:
17828 Added THONG and NOOP for alias processing.
17829 Added SETOPT for the new code that allows setting options with %flags.
17830
17831 * src/lex.c:
17832 Include getopt.h. Add some extern decls.
17833 (safegetc): New function to deal with EOF gracefully.
17834 (literalchar); new function to deal with reading \ escapes.
17835 (lex): Use literalchar.
17836 (lex): Implemented "..." tokens.
17837 (literalchar, lex, parse_percent_token): Made tokenbuffer
17838 always contain the token. This includes growing the token
17839 buffer while reading an integer.
17840 (parse_percent_token): Replaced if-else statement with percent_table.
17841 (parse_percent_token): Added % declarations as another
17842 way to specify the flags -n, -l, and -r. Also added hooks for
17843 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17844 major changes to files.c.
17845 (lex) Retain in the incoming stream a character following
17846 an incorrect '/'.
17847 (skip_white_space, lex): Revised most error messages
17848 and changed fatal to warn to avoid aborting.
17849 (percent_table): Added %thong declarations.
17850
17851 * src/gram.h: Comment changes.
17852
17853 * src/files.c (openfiles, open_extra_files, done):
17854 Add faction flag
17855 and actfile file. Handle noparserflag. Both for -n switch.
17856
17857 * src/conflicts.c (resolve_sr_conflict):
17858 Remove use of alloca.
17859
178601995-06-01 Jim Meyering <meyering@gnu.org>
17861
17862 * doc/bison.texinfo: *** empty log message ***
17863
178641995-05-06 Richard Stallman <rms@gnu.org>
17865
17866 * src/bison.s1: Comment change.
17867
178681995-05-06 Richard Stallman <rms@gnu.org>
17869
17870 * bison.simple: Comment change.
17871
178721995-05-03 Richard Stallman <rms@gnu.org>
17873
17874 * src/version.c: Version now 1.24.
17875
17876 * src/bison.s1: Change distribution terms.
17877
17878 * src/version.c: Version now 1.23.
17879
178801995-05-03 Richard Stallman <rms@gnu.org>
17881
17882 * doc/bison.texinfo:
17883 Rewrite "Conditions for Using Bison".
17884 Update version to 1.24.
17885
178861995-05-03 Richard Stallman <rms@gnu.org>
17887
17888 * bison.simple: Change distribution terms.
17889
178901995-02-23 Richard Stallman <rms@gnu.org>
17891
17892 * src/files.c: Test __VMS_POSIX as well as VMS.
17893
178941995-02-14 Jim Meyering <meyering@gnu.org>
17895
17896 * src/bison.s1 (__yy_memcpy):
17897 Renamed from __yy_bcopy to avoid
17898 confusion. Reverse FROM and TO arguments to be consistent with
17899 those of memcpy.
17900
179011995-02-14 Jim Meyering <meyering@gnu.org>
17902
17903 * bison.simple (__yy_memcpy):
17904 Renamed from __yy_bcopy to avoid
17905 confusion. Reverse FROM and TO arguments to be consistent with
17906 those of memcpy.
17907
179081994-11-10 David J. MacKenzie <djm@gnu.org>
17909
17910 * NEWS: reformat
17911
17912 * NEWS: New file.
17913
17914 * Makefile.in (DISTFILES): Include NEWS.
17915
17916 * Makefile.in (DISTFILES):
17917 Include install-sh, not install.sh.
17918
17919 * configure.in: Update to Autoconf v2 macro names.
17920
179211994-10-05 David J. MacKenzie <djm@gnu.org>
17922
17923 * Makefile.in: fix typo
17924
17925 * Makefile.in (prefix, exec_prefix):
17926 Let configure set them.
17927
179281994-09-28 David J. MacKenzie <djm@gnu.org>
17929
17930 * Makefile.in: Set datadir to $(prefix)/share.
17931
179321994-09-15 Richard Stallman <rms@gnu.org>
17933
17934 * src/bison.s1:
17935 Update copyright notice and GPL version.
17936
179371994-09-15 Richard Stallman <rms@gnu.org>
17938
17939 * bison.simple:
17940 Update copyright notice and GPL version.
17941
179421994-07-12 Richard Stallman <rms@gnu.org>
17943
17944 * src/reduce.c, src/reader.c:
17945 entered into RCS
17946
179471994-05-05 David J. MacKenzie <djm@gnu.org>
17948
17949 * Makefile.in: entered into RCS
17950
179511994-03-26 Richard Stallman <rms@gnu.org>
17952
17953 * src/bison.s1: entered into RCS
17954
179551994-03-26 Richard Stallman <rms@gnu.org>
17956
17957 * bison.simple: entered into RCS
17958
179591994-03-25 Richard Stallman <rms@gnu.org>
17960
17961 * src/main.c: entered into RCS
17962
179631994-03-24 Richard Stallman <rms@gnu.org>
17964
17965 * src/conflicts.c: entered into RCS
17966
179671994-01-02 Richard Stallman <rms@gnu.org>
17968
17969 * Makefile.in: *** empty log message ***
17970
179711993-11-21 Richard Stallman <rms@gnu.org>
17972
17973 * src/bison.s1: *** empty log message ***
17974
179751993-11-21 Richard Stallman <rms@gnu.org>
17976
17977 * doc/bison.texinfo: entered into RCS
17978
17979 * doc/bison.texinfo: *** empty log message ***
17980
179811993-11-21 Richard Stallman <rms@gnu.org>
17982
17983 * bison.simple: *** empty log message ***
17984
179851993-10-25 David J. MacKenzie <djm@gnu.org>
17986
17987 * doc/bison.texinfo: *** empty log message ***
17988
179891993-10-19 Richard Stallman <rms@gnu.org>
17990
17991 * src/bison.s1: *** empty log message ***
17992
179931993-10-19 Richard Stallman <rms@gnu.org>
17994
17995 * bison.simple: *** empty log message ***
17996
179971993-10-14 Richard Stallman <rms@gnu.org>
17998
17999 * src/bison.s1: *** empty log message ***
18000
180011993-10-14 Richard Stallman <rms@gnu.org>
18002
18003 * bison.simple: *** empty log message ***
18004
180051993-09-14 David J. MacKenzie <djm@gnu.org>
18006
18007 * doc/bison.texinfo: *** empty log message ***
18008
180091993-09-13 Noah Friedman <friedman@gnu.org>
18010
18011 * Makefile.in: *** empty log message ***
18012
180131993-09-10 Richard Stallman <rms@gnu.org>
18014
18015 * src/conflicts.c: *** empty log message ***
18016
18017 * src/system.h: entered into RCS
18018
180191993-09-10 Richard Stallman <rms@gnu.org>
18020
18021 * doc/bison.1: entered into RCS
18022
180231993-09-06 Noah Friedman <friedman@gnu.org>
18024
18025 * src/version.c: entered into RCS
18026
180271993-09-06 Noah Friedman <friedman@gnu.org>
18028
18029 * Makefile.in: *** empty log message ***
18030
180311993-07-30 David J. MacKenzie <djm@gnu.org>
18032
18033 * Makefile.in: *** empty log message ***
18034
180351993-07-24 Richard Stallman <rms@gnu.org>
18036
18037 * src/bison.s1: *** empty log message ***
18038
180391993-07-24 Richard Stallman <rms@gnu.org>
18040
18041 * bison.simple: *** empty log message ***
18042
180431993-07-08 David J. MacKenzie <djm@gnu.org>
18044
18045 * Makefile.in: *** empty log message ***
18046
180471993-07-04 Richard Stallman <rms@gnu.org>
18048
18049 * src/bison.s1: *** empty log message ***
18050
180511993-07-04 Richard Stallman <rms@gnu.org>
18052
18053 * bison.simple: *** empty log message ***
18054
180551993-06-26 David J. MacKenzie <djm@gnu.org>
18056
18057 * src/getargs.c: entered into RCS
18058
180591993-06-26 David J. MacKenzie <djm@gnu.org>
18060
18061 * doc/bison.texinfo: *** empty log message ***
18062
18063 * doc/bison.1: New file.
18064
180651993-06-25 Richard Stallman <rms@gnu.org>
18066
18067 * src/getargs.c: New file.
18068
180691993-06-16 Richard Stallman <rms@gnu.org>
18070
18071 * src/bison.s1: *** empty log message ***
18072
180731993-06-16 Richard Stallman <rms@gnu.org>
18074
18075 * bison.simple: *** empty log message ***
18076
180771993-06-03 Richard Stallman <rms@gnu.org>
18078
18079 * src/bison.s1: New file.
18080
180811993-06-03 Richard Stallman <rms@gnu.org>
18082
18083 * doc/bison.texinfo: *** empty log message ***
18084
180851993-06-03 Richard Stallman <rms@gnu.org>
18086
18087 * bison.simple: New file.
18088
180891993-05-19 Richard Stallman <rms@gnu.org>
18090
18091 * doc/bison.texinfo: New file.
18092
180931993-05-07 Noah Friedman <friedman@gnu.org>
18094
18095 * Makefile.in: *** empty log message ***
18096
180971993-04-28 Noah Friedman <friedman@gnu.org>
18098
18099 * src/reader.c: *** empty log message ***
18100
181011993-04-23 Noah Friedman <friedman@gnu.org>
18102
18103 * src/alloc.h: entered into RCS
18104
181051993-04-20 David J. MacKenzie <djm@gnu.org>
18106
18107 * src/version.c: *** empty log message ***
18108
18109 * src/files.c, src/allocate.c:
18110 entered into RCS
18111
18112 * src/reader.c: *** empty log message ***
18113
18114 * src/lex.c: entered into RCS
18115
18116 * src/conflicts.c: New file.
18117
18118 * src/symtab.c: entered into RCS
18119
18120 * src/alloc.h: New file.
18121
18122 * src/LR0.c: entered into RCS
18123
181241993-04-18 Noah Friedman <friedman@gnu.org>
18125
18126 * src/reader.c: New file.
18127
18128 * src/version.c: *** empty log message ***
18129
181301993-04-18 Noah Friedman <friedman@gnu.org>
18131
18132 * Makefile.in: *** empty log message ***
18133
181341993-04-17 Noah Friedman <friedman@gnu.org>
18135
18136 * Makefile.in: *** empty log message ***
18137
181381993-04-15 Richard Stallman <rms@gnu.org>
18139
18140 * src/main.c, src/files.c:
18141 New file.
18142
181431993-04-15 Noah Friedman <friedman@gnu.org>
18144
18145 * configure.in: entered into RCS
18146
18147 * configure.in: *** empty log message ***
18148
18149 * configure.in: New file.
18150
181511993-04-14 Richard Stallman <rms@gnu.org>
18152
18153 * Makefile.in: New file.
18154
181551993-04-13 Richard Stallman <rms@gnu.org>
18156
18157 * src/version.c: New file.
18158
181591993-03-25 Richard Stallman <rms@gnu.org>
18160
18161 * src/output.c: entered into RCS
18162
181631992-09-25 Richard Stallman <rms@gnu.org>
18164
18165 * configure.bat: entered into RCS
18166
181671992-06-22 Richard Stallman <rms@gnu.org>
18168
18169 * src/vmsgetargs.c: entered into RCS
18170
181711992-06-22 Richard Stallman <rms@gnu.org>
18172
18173 * doc/bison.rnh: entered into RCS
18174
181751992-04-20 David J. MacKenzie <djm@gnu.org>
18176
18177 * README: entered into RCS
18178
181791992-01-22 Richard Stallman <rms@gnu.org>
18180
18181 * src/machine.h: entered into RCS
18182
181831991-12-21 Richard Stallman <rms@gnu.org>
18184
18185 * src/lalr.c, src/closure.c:
18186 entered into RCS
18187
181881991-12-20 Richard Stallman <rms@gnu.org>
18189
18190 * src/state.h: entered into RCS
18191
181921991-12-18 Richard Stallman <rms@gnu.org>
18193
18194 * src/print.c, src/nullable.c, src/derives.c:
18195 entered into RCS
18196
181971991-11-03 David J. MacKenzie <djm@gnu.org>
18198
18199 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
18200 entered into RCS
18201
182021988-09-09 Richard Stallman <rms@gnu.org>
18203
18204 * src/bison.hairy: entered into RCS
18205
182061987-12-16 Richard Stallman <rms@gnu.org>
18207
18208 * REFERENCES: entered into RCS
dc546b0f 18209
f294a2c2 18210
04098407 18211 -----
f294a2c2 18212
04098407 18213 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e2a21b6f
PE
18214 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
18215 Software Foundation, Inc.
f294a2c2 18216
04098407
PE
18217 Copying and distribution of this file, with or without
18218 modification, are permitted provided the copyright notice and this
18219 notice are preserved.
e9071366
AD
18220
18221$Id$