]> git.saurik.com Git - bison.git/blob - ChangeLog
Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
[bison.git] / ChangeLog
1 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4 unreliable -- especially when they're hidden inside another macro.
5 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
6 data/c.m4: Remove m4_divert(-1).
7 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
8 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
9 m4_divert_push(0) and m4_divert_pop(0).
10 * data/output.c (output_skeleton): Don't add an m4_divert_push(0) and
11 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
12 pushed and popped by m4sugar, should be first on the stack.
13
14 Provide warn, complain, and fatal function callbacks to the skeletons.
15 This provides more flexibility than m4_fatal, improves the error
16 message format, and captures messages for translation. Discussed
17 starting at
18 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
19 * data/bison.m4 (b4_error): New, invoked by...
20 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
21 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
22 directives. Because these M4 macros might be called when the current
23 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
24 the previous removal of uses of m4_divert, which caused trouble.
25 (b4_check_percent_code_qualifiers): Use b4_complain instead of
26 m4_fatal to report unrecognized %code qualifiers.
27 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
28 push parser requests.
29 * data/glr.c: Use b4_complain instead of m4_fatal to report
30 non-deterministic push parser requests.
31 Update @output usage to @output(...@) form.
32 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
33 report missing %defines. Update @output usage to @output(...@) form.
34 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
35 @output(...@) form.
36 * src/main.c (main): Invoke skel_scanner_free.
37 * src/scan-skel.h (skel_scanner_free): Prototype new function.
38 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
39 obstack_for_string from flex-scanner.h.
40 (YY_DECL): Use to declare skel_lex static.
41 (decode_at_digraphs): Remove; now handled in the new
42 SC_AT_DIRECTIVE_ARG start condition.
43 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
44 functions.
45 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
46 at_directive_argv): New static globals.
47 (INITIAL): Use fail_for_invalid_at.
48 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
49 recognize the start of a generalized `@directive(...@)' form and
50 start...
51 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
52 directive args (using the new obstack_for_string), to decode the
53 contained @ diagraphs, and to perform the directive. It recognizes
54 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
55 @output(...@).
56 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
57 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
58 `@,'.
59 (scan_skel): Initialize obstack_for_string on the first call.
60 (skel_scanner_free): New function to free obstack_for_string.
61 * tests/input.at (Reject bad %code qualifiers): Update test output.
62
63 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
64
65 Consolidate the 4 prologue alternative directives (%code, %requires,
66 %provides, and %code-top) into a single %code directive with an
67 optional qualifier field. Discussed at
68 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
69 * NEWS (2.3a+): Rewrite the existing entry for the prologue
70 alternatives.
71 * doc/bison.texinfo (Prologue Alternatives): Update.
72 (Decl Summary): Update to %code "requires" and %code "provides".
73 (Calc++ Parser): Update to %code "requires".
74 (Bison Symbols): Remove entries for %requires, %provides, and
75 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
76 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
77 are replaced by b4_percent_code_provides and b4_percent_code_requires,
78 which are skeleton-specific.
79 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
80 declare what %code qualifiers it supports and to complain if any other
81 qualifiers were used in the grammar.
82 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
83 and b4_user_code([b4_percent_code_provides]) in place of
84 b4_user_requires and b4_user_provides.
85 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
86 Add b4_user_code([b4_percent_code_top]) and
87 b4_user_code([b4_percent_code]).
88 Invoke b4_check_percent_code_qualifiers.
89 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
90 PERCENT_REQUIRES): Remove.
91 (grammar_declaration): Remove RHS's for %code-top, %provides, and
92 %requires. Rewrite the %code RHS as the unqualified form defining the
93 muscle b4_percent_code. Add another RHS for the qualified %code form,
94 which defines muscles of the form b4_percent_code_QUALIFIER and the
95 b4_used_percent_code_qualifiers muscle.
96 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
97 PERCENT_REQUIRES): Remove.
98 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
99 %code "requires" and %code "provides".
100 * tests/input.at (Reject bad %code qualifiers): New.
101
102 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
103
104 Use the new code_props interface for destructors and printers.
105 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
106 printer_location members, and change the type of the destructor and
107 printer members to code_props.
108 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
109 symbol_printer_get, semantic_type_destructor_set,
110 semantic_type_printer_set, default_tagged_destructor_set,
111 default_tagless_destructor_set, default_tagged_printer_set,
112 default_tagless_printer_set): Use code_props in arguments and return
113 types in place of char const * and location.
114 (symbol_destructor_location_get, symbol_printer_location_get): Remove
115 since the locations are now contained in the return of
116 symbol_destructor_get and symbol_printer_get.
117 * src/output.c (symbol_destructors_output, symbol_printers_output):
118 Replace with...
119 (symbol_code_props_output): ... this to eliminate duplicate code.
120 (output_skeleton): Update to use symbol_code_props_output.
121 * src/reader.c (symbol_should_be_used): Update use of
122 symbol_destructor_get.
123 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
124 Update uses of the various _destructor_set and _printer_set functions.
125 * src/symtab.c: (default_tagged_destructor_location,
126 default_tagless_destructor_location, default_tagged_printer_location,
127 default_tagless_printer_location): Remove since we...
128 (default_tagged_destructor, default_tagless_destructor,
129 default_tagged_printer, default_tagless_printer): ... change the type
130 of these to code_props.
131 (symbol_new, semantic_type_new, symbol_destructor_set,
132 semantic_type_destructor_set, symbol_destructor_get,
133 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
134 symbol_check_alias_consistency, default_tagged_destructor_set,
135 default_tagless_destructor_set, default_tagged_printer_set,
136 default_tagless_printer_set): Update.
137 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
138 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
139 code_props members.
140 (symbol_print): Use SYMBOL_CODE_PRINT.
141
142 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
143
144 Use the new code_props interface for rule actions.
145 * src/symlist.h (symbol_list): Replace action, action_location, and
146 used members with a code_props action_props member.
147 * src/reader.c (symbol_should_be_used, grammar_rule_check,
148 grammar_midrule_action, grammar_current_rule_merge_set,
149 grammar_current_rule_symbol_append, packgram): Update.
150 * src/scan-code.h (translate_rule_action): Remove, no longer used.
151 * src/scan-code.l (handle_action_dollar): Update.
152 (translate_rule_action): Remove, no longer used.
153 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
154
155 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
156
157 Use the new code_props interface in parse-gram.y.
158 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
159 Update all uses of translate_* functions to use the new code_props
160 interface and to use gram_scanner_last_string_free and
161 code_scanner_last_string_free where possible.
162 (grammar_declaration): symbol_list_destructor_set and
163 symbol_list_printer_set now perform the translation, so don't do it
164 here. Use gram_scanner_last_string_free where possible.
165 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
166 translate_code): Remove, no longer used.
167 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
168 symbol_list_printer_set): Perform code translation here rather than
169 depending on the caller to do so.
170
171 * src/symlist.h (struct symbol_list): Correct some documentation typos.
172 * src/scan-gram.h (gram_last_string): Remove declaration.
173 * src/scan-gram.l (last_string): Declare it static.
174
175 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
176
177 Encapsulate code properties and related functionality for the various
178 destructors, printers, and actions into a code_props structure and
179 interface. This patch merely implements code_props in scan-code.h and
180 scan-code.l. Future patches will rewrite other modules to use it.
181 Discussed starting at
182 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
183 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
184 consistently initialize const structs that have an empty location
185 field.
186 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
187 to ensure consistency.
188 * src/scan-code.h (code_props): New structure.
189 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
190 function, macro, and const global variable for initializing a
191 code_props with no code.
192 (code_props_plain_init, code_props_symbol_action_init,
193 code_props_rule_action_init, code_props_translate_code): The rest of
194 the new code_props functional interface. Among other things, the init
195 functions set the code_props kind field so that
196 code_props_translate_code will know whether to behave like
197 translate_symbol_action, translate_rule_action, or translate_code.
198 These old translate functions must remain until all other modules are
199 updated to use the new code_props interface.
200 (code_scanner_last_string_free): New function similar to
201 gram_scanner_last_string_free.
202 (code_scanner_free): Add documentation.
203 * src/scan-code.l: Implement the new interface.
204 (code_lex): Make it static, add a code_props* argument, and remove the
205 rule argument.
206 (last_string): New static global similar to the one in scan-gram.l.
207 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
208 instead of rule.
209 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
210 code_props since Bison may one day use this information for destructors
211 and printers.
212 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
213 (handle_action_dollar): Use symbol_list_n_get and set used flag
214 directly since symbol_list_n_used_set is removed.
215 (translate_action): Add a code_props* argument and remove the rule,
216 action, and location arguments. Pass the code_props* on to code_lex.
217 (translate_rule_action, translate_symbol_action, translate_code):
218 Rewrite as wrappers around the new code_props interface.
219 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
220 it would eventually need to break the encapsulation of code_props.
221
222 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
223
224 * etc/.cvsignore: New.
225
226 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
227
228 Add maintainer-push-check to run maintainer-check using push parsing in
229 place of pull parsing where available.
230 * Makefile.am (maintainer-push-check): New.
231 * data/bison.m4 (b4_use_push_for_pull_if): New.
232 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
233 appropriately based on their existing values.
234 (yypush_parse): Don't print push-parser-specific diagnostics if push
235 parsing is being used in place of pull parsing.
236 * data/yacc.c: If push parsing should replace pull parsing, redirect to
237 push.c.
238 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
239 variable, and insert b4_use_push_for_pull_flag into muscles.
240 * tests/Makefile.am (maintainer-push-check): New.
241
242 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
243
244 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
245 (whether successful or failed) so that yypush_parse can be invoked
246 again to start a new parse using the same yypstate.
247 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
248 check multiple yypull_parse invocations on the same yypstate. For pull
249 mode, extend to check multiple yyparse invocations.
250 (Exploding the Stack Size with Alloca): Extend to try with
251 %push-pull-parser.
252 (Exploding the Stack Size with Malloc): Likewise.
253
254 * tests/calc.at (Simple LALR Calculator): Don't specify
255 %skeleton "push.c" since %push-pull-parser implies that now.
256 * tests/headers.at (export YYLTYPE): Don't check for the push
257 declarations. Otherwise, this test case can't be used to see if push
258 mode can truly emulate pull mode.
259 * tests/input.at (Torturing the Scanner): Likewise.
260 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
261 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
262 AT_YACC_IF, which now includes the case of push mode since %skeleton
263 need not be used for push mode. This will be more intuitive once
264 push.c is renamed to yacc.c.
265
266 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
267
268 For push mode, convert yyparse from a macro to a function, invoke yylex
269 instead of passing a yylexp argument to yypull_parse, and don't
270 generate yypull_parse or yyparse unless %push-pull-parser is declared.
271 Discussed starting at
272 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
273 * data/bison.m4 (b4_pull_if): New.
274 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
275 * data/push.c: Improve M4 quoting a little.
276 (b4_generate_macro_args, b4_parenthesize): Remove.
277 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
278 any time a pull parser is requested.
279 Don't #define this as a wrapper around yypull_parse. Instead, when
280 both push and pull are requested, make it a function that does that
281 same thing.
282 (yypull_parse): If there's a b4_prefix, #define this to
283 b4_prefix[pull_parse] when both push and pull are requested.
284 Don't define this as a function unless both push and pull are
285 requested.
286 Remove the yylexp argument and hard-code yylex invocation instead.
287 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
288 %push-parser.
289 * src/getargs.c (pull_parser): New global initialized to true.
290 * getargs.h (pull_parser): extern it.
291 * src/output.c (prepare): Insert pull_flag muscle.
292 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
293 (prologue_declaration): Set both push_parser and pull_parser = true for
294 %push-pull-parser. Set push_parser = true and pull_parser = false for
295 %push-parser.
296 * src/scan-gram.l: Don't accept %push_parser as an alternative to
297 %push-parser since there's no backward-compatibility concern here.
298 Scan %push-pull-parser.
299 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
300 instead of %push-parser.
301 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
302 prototype it in the module that calls yyparse.
303 * tests/input.at (Torturing the Scanner): Likewise.
304 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
305
306 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
307
308 Update etc/bench.pl. Optimize push mode a little (the yyn change
309 deserves most of the credit).
310 * Makefile.am (SUBDIRS): Add etc subdirectory.
311 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
312 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
313 yytoken, yyval, and yyloc declarations to...
314 (yyparse or yypush_parse): ... here to improve performance. For
315 yypush_parse invocations after the first, be sure to assign yyn its old
316 value again.
317 (yypstate_new): Don't bother initializing the yyresult field since the
318 initial value isn't used.
319 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
320 remove the #define that, in push mode, set it to yyps->NAME.
321 * etc/Makefile.am: New.
322 * etc/bench.pl: Remove and build it instead from...
323 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
324 "tests/bison" from the build directory by default rather than just
325 invoking "bison" from $PATH.
326 (calc_grammar): Update push parser code: don't declare yylval globally,
327 don't define yyparse_wrapper, and don't #define yyparse.
328 (bench_grammar): Update to check all working combinations of yacc.c,
329 push.c, impure, pure, pull, and push.
330
331 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
332
333 For push mode, add pull wrappers around yypush_parse.
334 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
335 (yypull_parse): New function wrapping yypush_parse.
336 (yyparse): New #define wrapping yypull_parse.
337 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
338 is declared.
339 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
340 prototype yylex in the module that calls yyparse, and don't prototype
341 yyparse there. Otherwise, the yyparse expansion won't compile.
342 * tests/input.at (Torturing the Scanner): Likewise.
343
344 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
345
346 Enable push parsers to operate in impure mode. Thus, %push-parser no
347 longer implies %pure-parser. The point of this change is to move
348 towards being able to test the push parser code by running the entire
349 test suite as if %push-parser had been declared.
350 * data/push.c (yypush_parse): For impure mode, remove the
351 yypushed_char, yypushed_val, and yypushed_loc arguments.
352 Instead, declare these as local variables initialized to the global
353 yychar, yylval, and yylloc.
354 For the first yypush_parse invocation only, restore the initial values
355 of these global variables when it's time to read a token since they
356 have been overwritten.
357 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
358 %push-parser.
359 * tests/calc.at (Simple LALR(1) Calculator): Always declare
360 %pure-parser along with %push-parser since this test case was designed
361 for pure push parsers.
362 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
363 (AT_YACC_OR_PUSH_IF): New.
364 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
365 add a note that it's still wrong for some cases (as it has been for a
366 while).
367 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
368 %push-parser no longer implies %pure-parser.
369
370 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
371
372 Remove some unnecessary differences between the pull parser code and
373 the push parser code. This patch enables yynerrs in push mode.
374 * data/push.c: Reformat M4 a little.
375 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
376 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
377 because push mode is on. Instead, if pure mode is on, move yynerrs
378 to...
379 (b4_declare_parser_state_variables): ... here.
380 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
381 to yyps->NAME so it can be used in yypush_parse.
382 (yypush_parse): Don't omit uses of yynerrs in push mode.
383
384 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
385
386 Fix bug such that the first pushed token's value and location are
387 sometimes overwritten (sometimes by %initial-action) before being used.
388 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
389 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
390 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
391 more closely mimic the pull parser logic.
392 Don't copy the pushed token to yychar, yylval, and yylloc until it's
393 time to read a token, which is after any initialization of yylval and
394 yylloc.
395 (gottoken): Rename label to...
396 (yyread_pushed_token): ... for clarity and to avoid infringing on the
397 user namespace.
398
399 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
400
401 Rearrange initialization of the parser state variables so that the
402 skeleton doesn't have to have a copy for pull mode and another for push
403 mode. This patch also fixes at least a bug such that yylloc was not
404 initialized (with b4_location_initial_line and
405 b4_location_initial_column) upon calling yypush_parse. However, that
406 initialization now overwrites the first token's location;
407 %initial-action assigning @$ already did the same thing, and both bugs
408 will be fixed in a later patch.
409 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
410 (b4_declare_parser_state_variables): Remove initialization of yytoken,
411 yyss, yyvs, yyls, and yystacksize.
412 (yypstate_new): Remove initialization of some yypstate fields: yystate,
413 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
414 yylsp.
415 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
416 yyps->NAME so it can be used in yypush_parse.
417 (yyparse or yypush_parse): For yypush_parse, don't print the
418 "Starting parse" diagnostic for invocations after the first.
419 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
420 yypush_parse, only do it for the first invocation.
421 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
422 initialization to occur in yypush_parse but only on the first
423 invocation.
424
425 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
426
427 * data/push.c: Add CPP guards around push parser declarations in both
428 the header and the code file.
429 In the code file, move the push parser declarations to the same place
430 they appear in the header file.
431 Clean up the M4 some, especially the inconsistent underquoting in
432 some b4_c_function_def and b4_c_function_decl uses.
433
434 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
435
436 Encapsulate the push parser state variables into an M4 macro so the
437 push skeleton doesn't have to list them again for pull mode's yyparse.
438 For push mode, remove yypush_parse's local equivalents of these
439 variables to eliminate unnecessary copying between the two sets at
440 run-time. This patch also fixes at least a bug related to multiple
441 %initial-action invocations in push mode.
442 * data/push.c (b4_declare_parser_variables): Rename to...
443 (b4_declare_scanner_communication_variables): ... this for clarity and
444 update both uses.
445 (b4_declare_yyparse_variables): Remove and move its contents to the one
446 spot where it was invoked.
447 (b4_declare_parser_state_variables): New macro containing the parser
448 state variables required by push mode.
449 (struct yypstate): Replace all fields but yynew with
450 b4_declare_parser_state_variables.
451 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
452 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
453 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
454 (yyparse or yypush_parse): For yyparse in pull mode, replace local
455 parser state variable declarations with
456 b4_declare_parser_state_variables.
457 Don't initialize parser state variables when calling yypush_parse since
458 yypstate_new already does that.
459 Invoke the user's initial action only upon the first yypush_parse
460 invocation.
461 Remove all code that copies between the local parser state variables
462 and the yypstate.
463
464 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
465
466 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
467 prevent a name collision in a future patch where these names will
468 sometimes be #define'd.
469 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
470 since it no longer has the same name as the existing argument.
471 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
472
473 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
474 and Joel E. Denny <jdenny@ces.clemson.edu>
475
476 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
477 that the argument is case-insensitive, and there's no `=' here.
478 For the %skeleton entry, mention that %language is better.
479 (Bison Options): Likewise for --language and --skeleton. Move the
480 --skeleton entry so that the `Tuning the parser' section is sorted
481 alphabetically on long options.
482 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
483 %language directive in detail here; cross-reference the %language
484 documentation instead.
485 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
486 `%require "2.3b"' so that the example is always up-to-date.
487 (Bison Symbols): Add entries for %language and %skeleton.
488 * examples/extexi (normalize): Instead of replacing every %require
489 argument with the current Bison version, just substitute for
490 `@value{VERSION}'. This guarantees that we're testing what actually
491 appears in the documentation.
492 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
493 rather than `@VERSION@'.
494
495 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
496
497 * NEWS: Reword the %language news a bit, and put it earlier.
498
499 * src/getargs.c (skeleton_arg): Last arg is now location const *.
500 Rewrite to simplify the logic.
501 (language_argmatch): Likewise.
502 (program_name): We now own this var.
503 * src/getargs.h (struct bison_language): Use char[] rather than
504 const char *.
505
506 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
507 Java is supported.
508 * src/complain.c (program_name): Remove decl; no longer needed.
509 * src/main.c (program_name): Remove; now belongs to getargs.
510
511 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
512
513 * NEWS: Document %language.
514
515 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
516
517 * data/c-skel.m4, data/c++-skel.m4: New files.
518 * data/glr.c: Complain on push parsers.
519
520 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
521 over %skeleton.
522 (Directives): Document %language and %skeleton.
523 (Command line): Document -L.
524
525 * examples/extexi: Rewrite %require directive.
526 * examples/calc++/Makefile.am: Pass VERSION to extexi.
527
528 * src/files.c (compute_exts_from_gc): Look in language structure
529 for .y extension.
530 (compute_file_name_parts): Check whether .tab should be added.
531 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
532 (language, skeleton_arg, language_argmatch): New.
533 (long_options): Add --language.
534 (getargs): Use skeleton_arg, add -L/--language.
535 * src/getargs.h: Include location.h.
536 (struct bison_language, language, skeleton_arg, language_argmatch): New.
537 * src/output.c (prepare): Pick default skeleton from struct language.
538 Don't dispatch C skeletons here.
539 * src/parse-gram.y (PERCENT_LANGUAGE): New.
540 (prologue_declaration): Add "%language" rule, use skeleton_arg.
541 * src/scan-gram.l ("%language"): New rule.
542
543 * tests/calc.at: Test %skeleton and %language.
544 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
545 (AT_GLR_IF): Look for %skeleton "glr.cc".
546 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
547 (AT_YACC_IF): Reject %language.
548
549 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
550
551 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
552 since it wasn't used; only the typedef name 'semantic_type' is needed.
553 Also, omit trailing white space.
554
555 * bootstrap: Sync from coreutils.
556 (gnulib_extra_files): Add build-aux/announce.gen.
557 (slurp): Adjust .gitignore files like .cvsignore files.
558 * build-aux/announce-gen: Remove from CVS, since bootstrap
559 now creates this.
560
561 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
562
563 Make %push-parser imply %pure-parser. This fixes several bugs; see
564 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
565 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
566 pure_parser = true.
567 * data/push.c: Don't bother testing b4_push_if when deciding whether
568 to expand b4_declare_parser_variables globally.
569 (yypush_parse): Likewise in here.
570
571 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
572 (yy_reduce_print): Reformat M4 for readability.
573
574 2006-12-15 Bob Rossi <bob@brasko.net>
575 and Joel Denny <jdenny@ces.clemson.edu>
576
577 * data/push.c (yypstate): Add typedef, and update all uses of
578 struct yypstate to just yypstate.
579 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
580
581 2006-12-14 Bob Rossi <bob@brasko.net>
582
583 * data/push.c (yypush_parse): Declare prototype regardless of
584 %locations option.
585
586 2006-12-14 Bob Rossi <bob@brasko.net>
587
588 * data/push.c (yyparse): Remove the prototype and the #define when in
589 push-parser mode.
590
591 2006-12-13 Bob Rossi <bob@brasko.net>
592
593 * data/push.c (yypstate_init): Rename to...
594 (yypstate_new): ... this and use b4_c_function_def.
595 (yypstate_delete): New.
596 (yypush_parse): Change parameters yynval and yynlloc to be const.
597 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
598 yypstate_delete functions.
599
600 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
601
602 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
603 strange test case titles. Reported by Bob Rossi.
604
605 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
606
607 * TODO: Add pointer to Sylvain Schmitz's work on static detection
608 of potential ambiguities in GLR grammers.
609
610 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
611
612 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
613 `bison ', use m4_index instead of m4_substr since chopping up a string
614 containing M4-special characters causes problems here.
615
616 Fix a couple of bugs related to special characters in user-specified
617 file names, and make it easier for skeletons to compute output file
618 names with the same file name prefix as Bison-computed output file
619 names.
620 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
621 b4_parser_file_name and b4_spec_defines_file instead of
622 @output_parser_name@ and @output_header_name@, which are now redundant.
623 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
624 b4_parser_file_name, b4_spec_defines_file, and the new
625 @basename(FILENAME@) instead of @output_parser_name@ and
626 @output_header_name@, which inappropriately escaped the file names as
627 C string literals.
628 * src/files.c (all_but_ext): Remove static qualifier.
629 (compute_output_file_names): Move `free (all_but_ext)' to...
630 (output_file_names_free): ... here since all_but_ext is needed later.
631 * src/files.h (all_but_ext): Extern.
632 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
633 exactly what MUSCLE_INSERT_STRING used to do.
634 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
635 characters are escaped properly.
636 * src/output.c (prepare): Define muscle file_name_all_but_ext as
637 all_but_ext.
638 For pkgdatadir muscle, maintain previous functionality by using
639 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
640 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
641 digraphs would never be expanded. Hopefully no one has M4-special
642 characters in his Bison installation path.
643 * src/scan-skel.l: Don't parse @output_header_name@ and
644 @output_parser_name@ anymore since they're now redundant.
645 In @output, use decode_at_digraphs.
646 Parse a new @basename command that invokes last_component.
647 (decode_at_digraphs): New.
648 (BASE_QPUTS): Remove unused.
649 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
650 (Output file name): New tests.
651
652 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
653
654 Warn about output files that are generated by the skeletons and that
655 conflict with other output files.
656 * data/glr.c: Don't generate the header file here when glr.cc does.
657 * src/files.c (file_names, file_names_count): New static globals.
658 (compute_output_file_names): Invoke output_file_name_check for files
659 not generated by the skeletons and remove existing checks.
660 (output_file_name_check): New function that warns about conflicting
661 output file names.
662 (output_file_names_free): Free file_names.
663 * src/files.h (output_file_name_check): Declare.
664 * src/scan-skel.l: Invoke output_file_name_check for files generated by
665 the skeletons.
666 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
667 (Conflicting output files): New tests.
668
669 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
670
671 * doc/bison.texinfo: Fix a couple of typos.
672
673 2006-12-08 Bob Rossi <bob@brasko.net>
674
675 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
676 Rename to...
677 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
678 update all uses.
679 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
680 (yypush_parse): Rename yypvars argument to yyps and remove redundant
681 local pv.
682 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
683 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
684
685 2006-12-07 Bob Rossi <bob@brasko.net>
686 and Joel Denny <jdenny@ces.clemson.edu>
687
688 * data/push.c (yypvarsinit): Change return type from void* to struct
689 yypvars*. No longer cast to void* on return.
690 (struct yypvars): Remove yylen since it need not be remembered between
691 yypushparse invocations.
692 (yypushparse): Don't copy between yylen and pv->yylen.
693
694 2006-12-05 Bob Rossi <bob@brasko.net>
695
696 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
697 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
698 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
699 (struct yypvars): Remove b4_declare_parser_variables.
700 (yypvarsinit): Remove init code for removed variables.
701 (global scope): Do not declare b4_declare_parser_variables if
702 push or pure mode.
703 (yypushparse): Add b4_declare_parser_variables.
704 Init new local variables, and remove init code for removed
705 yypvars variables.
706 (yyparse): Delete.
707 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
708 and yyparse for other modes.
709 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
710 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
711 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
712 (AT_PURE_LEX_IF): True if pure or push parser.
713
714 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
715
716 Document Yacc prologue alternatives and default %destructor's and
717 %printer's as experimental. Don't mention Java yet. Discussed at
718 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
719 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
720 (2.3a): Annotate this entry to say the old forms of these features were
721 also experimental.
722 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
723 Bison Symbols): Say they're experimental. Comment out any mention
724 of Java (we'll want this back eventually).
725
726 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
727
728 Support a file name argument to %defines. Deprecate `=' in
729 %file-prefix, %name-prefix, and %output. Discussed at
730 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
731 * NEWS (2.3a+): Mention.
732 * doc/bison.texinfo (Decl Summary, Bison Symbols): Add entry for new
733 form of %defines, and remove `=' from entries for %file-prefix,
734 %name-prefix, and %output.
735 * src/parse-gram.y (prologue_declaration): Implement.
736 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
737 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
738 all but one occurrence of %name-prefix.
739 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
740 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
741 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
742 occurrence of each of %file-prefix and %output. Add check for %defines
743 with argument.
744 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
745 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
746 Remove the `=' from %output.
747
748 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
749
750 Don't escape $ in test case titles since Autoconf 2.61 now does that
751 correctly.
752 * tests/actions.at (Default %printer and %destructor are not for error
753 or $undefined): Here.
754 (Default %printer and %destructor are not for $accept): Here.
755 * tests/input.at (Invalid $n and @n): Here.
756
757 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
758
759 Rename <!> to <>. Discussed starting at
760 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
761 * NEWS (2.3a+): Update.
762 * doc/bison.texinfo (Freeing Discarded Symbols, Bison Symbols):
763 Update.
764 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
765 * src/scan-gram.l (INITIAL): Implement.
766 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
767 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
768 comment.
769 * tests/actions.at (Default tagless %printer and %destructor,
770 Default tagged and per-type %printer and %destructor,
771 Default %printer and %destructor are not for error or $undefined,
772 Default %printer and %destructor are not for $accept,
773 Default %printer and %destructor for mid-rule values): Update.
774 * tests/input.at (Default %printer and %destructor redeclared,
775 Unused values with default %destructor): Update.
776
777 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
778
779 Don't let %prec take a nonterminal.
780 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
781 token.
782 * tests/input.at (%prec takes a token): New test checking that %prec
783 won't take a nonterminal.
784
785 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
786
787 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
788 it was double-quoted.
789 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
790 grammar is maintained with Bison's highest standards.
791 * src/getargs.c: Fix some typos in Doxygen comments.
792
793 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
794
795 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
796 later. Reported by Paul Eggert in
797 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
798 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
799 * src/scan-code.l (translate_action): Don't bother invoking
800 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
801 (code_scanner_free): Instead of invoking
802 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
803 which frees more.
804 * src/scan-gram.l (gram_scanner_free): Likewise.
805 * src/scan-skel.l (scan_skel): Likewise.
806
807 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
808
809 * src/files.c (tr): Change return type to void.
810 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
811 has been called previously for the same key.
812 (muscle_find): Return storage instead of value so that
813 --enable-gcc-warnings doesn't produce warnings that the return discards
814 const. aver that the value and storage are the same since storage
815 could potentially be NULL when value is not.
816 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
817 same as 0.
818
819 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
820
821 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
822 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
823 us a slightly cleaner distribution, and also works.
824 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
825 gnulib changes.
826
827 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
828 and Paul Eggert <eggert@cs.ucla.edu>
829
830 Don't let Bison leak memory except when it complains.
831 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
832 (spec_defines_file, dir_prefix): Now char *, not const char *,
833 since they are freed.
834 * src/files.c: Likewise.
835 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
836 Likewise.
837 (tr): Now operates in-place. All uses changed.
838 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
839 values.
840 (compute_file_name_parts, compute_output_file_names): Don't store
841 read-only data in variables that will be freed.
842 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
843 src_extension, and header_extension.
844 (output_file_names_free): New public function to free
845 spec_verbose_file, spec_graph_file, spec_defines_file,
846 parser_file_name, and dir_prefix.
847 * src/getargs.c (getargs): Don't store read-only data in variables that
848 will be freed.
849 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
850 (which previously existed but was unused), and quotearg_free.
851 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
852 * src/muscle_tab.c: Likewise.
853 (muscle_entry): Make the value char const *,
854 and add a new storage member that is char * and can be freed.
855 (muscle_entry_free): New private function.
856 (muscle_init): Use it instead of free.
857 (muscle_insert, muscle_grow): Update and use new storage member.
858 (muscle_code_grow): Free the string passed to muscle_grow
859 since it's not needed anymore.
860 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
861 add a new `char *code' member.
862 ("{...}"): Declare semantic type as code.
863 * src/scan-code.h (translate_rule_action):
864 (translate_symbol_action, translate_code, translate_action): Return
865 `char const *' rather than `char *' since external code should not free
866 these strings.
867 * src/scan-code.l: Likewise.
868 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
869 which is "{...}" in the parser.
870 * tests/Makefile.am (maintainer-check-valgrind): Set
871 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
872 Valgrind.
873 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
874 complain.
875 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
876 expecting a non-zero exit status sets --leak-check=summary and
877 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
878 this case, and we don't want to hear about it.
879
880 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
881
882 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
883 instead of from the template, to simplify configuration a bit.
884 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
885 and m4/wint_t.m4, as they are needed with the latest gnulib.
886
887 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
888
889 Disable unset/unused mid-rule value warnings by default, and recognize
890 --warnings=midrule-values to enable them. Discussed starting at
891 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
892 * NEWS (2.3a+): Mention.
893 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
894 warnings): Add entry for midrule-values subargument.
895 * src/reader.c (symbol_should_be_used): Don't return true just because
896 the value is a set/used mid-rule value unless
897 --warnings=midrule-values was specified.
898 * tests/input.at (Unused values, Unused values before symbol
899 declarations): Run tests with and without --warnings=midrule-values.
900
901 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
902 than LIST_FREE directly.
903
904 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
905
906 Finish implementing --warnings=error, which should not be implied by
907 --warnings=all (or by its synonyms -W and --warnings without
908 subarguments).
909 * src/complain.c (set_warning_issued): New function to report that
910 warnings are being treated as errors and to record an error if so.
911 Invoke...
912 (warn_at, warn): ... here.
913 * src/getargs.c (warnings_args, warnings_types): Reorder so that
914 "error - warnings are errors" does not appear above "all - all of the
915 above".
916 (getargs): For -W and --warnings without subarguments, don't let
917 FLAGS_ARGMATCH set warnings_error in warnings_flag.
918 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
919
920 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
921
922 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
923 empty subargument list. For example: `bison --warnings= parser.y'.
924
925 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
926
927 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
928 the parser header file so that gcc doesn't warn.
929
930 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
931
932 Split the default %destructor/%printer into two kinds: <*> and <!>.
933 Discussed starting at
934 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
935 * NEWS (2.3a+): Mention.
936 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
937 previous change today related to mid-rules.
938 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
939 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
940 (TYPE_TAG_ANY): Add as <*>.
941 (TYPE_TAG_NONE): Add as <!>.
942 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
943 for <*> and <!>.
944 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
945 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
946 * src/symlist.c (symbol_list_default_new): Split into tagged and
947 tagless versions.
948 (symbol_list_destructor_set, symbol_list_printer_set): Split
949 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
950 SYMLIST_DEFAULT_TAGLESS.
951 * src/symlist.h: Update symbol_list_default*_new prototypes.
952 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
953 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
954 * src/symtab.c (default_destructor, default_destructor_location,
955 default_printer, default_printer_location): Split each into tagged and
956 tagless versions.
957 (symbol_destructor_get, symbol_destructor_location_get,
958 symbol_printer_get, symbol_printer_location_get): Implement tagged
959 default and tagless default cases.
960 (default_destructor_set, default_printer_set): Split each into tagged
961 and tagless versions.
962 * src/symtab.h: Update prototypes.
963 * tests/actions.at (Default %printer and %destructor): Rename to...
964 (Default tagless %printer and %destructor): ... this, and extend.
965 (Per-type %printer and %destructor): Rename to...
966 (Default tagged and per-type %printer and %destructor): ... this, and
967 extend.
968 (Default %printer and %destructor for user-defined end token): Extend.
969 (Default %printer and %destructor are not for error or $undefined):
970 Update.
971 (Default %printer and %destructor are not for $accept): Update.
972 (Default %printer and %destructor for mid-rule values): Extend.
973 * tests/input.at (Default %printer and %destructor redeclared): Extend.
974 (Unused values with default %destructor): Extend.
975
976 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
977
978 Don't apply the default %destructor/%printer to an unreferenced midrule
979 value. Mentioned at
980 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
981 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
982 like $@n instead of just @n so that the default %destructor/%printer
983 logic doesn't see them as user-defined symbols.
984 (symbol_is_dummy): Check for both forms of the name.
985 * src/reader.c (packgram): Remove the `$' from each midrule symbol
986 name for which the midrule value is referenced in any action.
987 * tests/actions.at (Default %printer and %destructor for mid-rule
988 values): New test.
989 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
990 for change to dummy symbol names.
991
992 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
993
994 Warn about unset midrule $$ if the corresponding $n is used.
995 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
996 $n usage.
997 (packgram): Before invoking grammar_rule_check on any rule, make sure
998 all actions have already been scanned in order to set `used' flags.
999 Otherwise, checking that a midrule's $$ is set will not always work
1000 properly because the midrule check must forward-reference the midrule's
1001 parent rule.
1002 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
1003 warning.
1004
1005 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
1006
1007 More improvements to the documentation of the prologue alternatives:
1008 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
1009 Bison manual.
1010 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
1011 some text to clarify the relative importance of the new directives and
1012 to show how these directives may be viewed as code labels.
1013
1014 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
1015
1016 Similar to the recently removed %before-header, add %code-top as the
1017 alternative to the pre-prologue. Mentioned at
1018 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
1019 Also, let the prologue alternatives appear in the grammar section.
1020 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
1021 (prologue_declaration): Move the existing prologue alternatives to...
1022 (grammar_declaration): ... here and add %code-top.
1023 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
1024
1025 Clean up and extend documentation for the prologue alternatives.
1026 * NEWS (2.3a+): Describe prologue alternatives.
1027 * doc/bison.texinfo (Prologue): Move discussion of prologue
1028 alternatives to...
1029 (Prologue Alternatives): ... this new section, and extend it to discuss
1030 all 4 directives in detail.
1031 (Bison Symbols): Clean up discussion of prologue alternatives and add
1032 %code-top.
1033
1034 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1035
1036 DJGPP specific issues.
1037
1038 * djgpp/config.bat: config.hin has been moved to lib. Adjust
1039 config.bat accordingly.
1040 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
1041 * djgpp/config.site: Likewise.
1042
1043 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
1044
1045 Replace %*-header with %provides, %requires, %code. See discussion at
1046 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
1047
1048 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
1049 (b4_user_start_header): Remove.
1050 * data/glr.c: Use new macros instead of b4_*start_header
1051 and b4_*end_header.
1052 * data/glr.cc: Likewise.
1053 * data/lalr1.cc: Likewise.
1054 * data/push.c: Likewise.
1055 * data/yacc.c: Likewise.
1056
1057 * doc/bison.texinfo: Remove %before-header, rename
1058 %{start,end,after}-header to %requires, %provides, %code.
1059
1060 * src/parse-gram.y: Likewise (also rename token names accordingly).
1061 * src/scan-gram.l: Likewise.
1062 * tests/actions.at: Likewise.
1063
1064 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
1065
1066 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
1067 Problem reported by Joel E. Denny.
1068
1069 2006-10-14 Jim Meyering <jim@meyering.net>
1070
1071 (Sync from coreutils.)
1072 Work also when the working directory (with e.g. coreutils sources)
1073 is version controlled with git, rather than CVS.
1074 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
1075 rather than CVS.
1076 In messages and comments, say e.g., "checked-out sources",
1077 rather than "CVS sources".
1078 (version_controlled_file): New function. Work for git as well as
1079 for CVS. Don't use grep's -q option.
1080 (slurp): Call it here, in place of CVS-specific code.
1081
1082 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
1083
1084 Fix testsuite for ./configure --enable-gcc-warnings:
1085 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
1086 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
1087 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
1088 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
1089 * test/regression.at (Diagnostic that expects two alternatives):
1090 Likewise.
1091
1092 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
1093
1094 * bootstrap.conf (gnulib_modules): Add config-h.
1095 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
1096 worry about HAVE_CONFIG_H.
1097 * lib/abitset.c: Likewise.
1098 * lib/bitset.c: Likewise.
1099 * lib/bitset_stats.c: Likewise.
1100 * lib/bitsetv-print.c: Likewise.
1101 * lib/bitsetv.c: Likewise.
1102 * lib/ebitset.c: Likewise.
1103 * lib/get-errno.c: Likewise.
1104 * lib/lbitset.c: Likewise.
1105 * lib/subpipe.c: Likewise.
1106 * lib/timevar.c: Likewise.
1107 * lib/vbitset.c: Likewise.
1108 * lib/bitset.c: Include "bitset.h" first, to test interface.
1109 * lib/bitset_stats.c: Include "bitset_stats.h" first.
1110 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
1111 * lib/bitsetv.c: Include "bitsetv.h" first.
1112 * lib/get-errno.c: Include "get-errno.h" first.
1113 * m4/.cvsignore: Add config-h.m4.
1114 * tests/actions.at (Default %printer and %destructor for ...):
1115 Adjust expected line numbers in output to reflect removal of #if
1116 HAVE_CONFIG_H lines.
1117 * tests/glr-regression.at (Missed %merge type warnings when ...):
1118 Likewise.
1119 * tests/regression.at (Braced code in declaration in rules section):
1120 Likewise.
1121 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
1122 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
1123 Include <config.h> unconditionally.
1124
1125 * bootstrap: Sync from coreutils, as follows:
1126
1127 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1128
1129 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
1130 variable was sometimes used without being initialized. This
1131 messed up the installation of the INSTALL file in some cases.
1132
1133 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1134
1135 * bootstrap (usage, main program, symlink_to_gnulib): Add option
1136 --copy. Inspired by a suggestion from Bruno Haible.
1137
1138 2006-10-03 Jim Meyering <jim@meyering.net>
1139
1140 * bootstrap: Undo last change to this file, since now gnulib-tool
1141 sticks with the automake default in generating dependencies.
1142
1143 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
1144
1145 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
1146 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
1147
1148 * doc/bison.1: Add copyright notice.
1149
1150 * data/glr.c: Don't include <stdarg.h>; not used.
1151
1152 * NEWS: The -g and --graph options now output graphs in Graphviz
1153 DOT format, not VCG format.
1154 * doc/bison.1: Likewise.
1155 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
1156 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
1157 of this change in
1158 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
1159 * TODO: Remove Graphviz entry.
1160 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
1161 remove vcg.c, vcg.h, vcg_defaults.h.
1162 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
1163 * src/graphviz.c, src/graphviz.h: New files.
1164 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
1165 * src/files.h: Make comment more generic.
1166 * src/main.c (main): Likewise.
1167 * src/print_graph.h: Likewise.
1168 * src/getargs.c (usage): Make usage description more generic.
1169 * src/print_graph.c: Include graphviz.h rather than vcg.h.
1170 (static_graph, fgraph): Remove. All uses changed to pass
1171 arguments instead of sharing a static var.
1172 (print_core, print_actions, print_state, print_graph):
1173 Output graphviz format rather than VCG format.
1174 * tests/.cvsignore: Remove *.vcg; add *.dot.
1175 * tests/output.at: Expect *.dot files, not *.vcg files.
1176
1177 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
1178 accommodates the 2006-10-08 change.
1179
1180 2006-10-11 Bob Rossi <bob@brasko.net>
1181
1182 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
1183 (b4_yyssa, b4_yyerror_range): New macros.
1184 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
1185 (yypvarsinit): Remove init of removed fields.
1186 (yypushparse): Remove use of removed fields; use new macros instead.
1187
1188 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1189
1190 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
1191 in a push parser. Reindent slightly to match yacc.c better.
1192
1193 2006-10-11 Bob Rossi <bob@brasko.net>
1194
1195 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
1196 yymsg_alloc fields.
1197 (yypvarsinit, yypushparse): Remove init of removed fields.
1198 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
1199
1200 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1201
1202 * THANKS: Add Paolo Bonzini and Bob Rossi.
1203
1204 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
1205
1206 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
1207 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
1208 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
1209 b4_define_user_cde and uses): Remove.
1210 (b4_comment, b4_prefix, b4_sync_start): New.
1211 * data/bison.m4: New file, with most of the content removed from c.m4.
1212 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
1213 * src/output.c (output_skeleton): Pass bison.m4.
1214 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
1215 only if specified.
1216
1217 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
1218
1219 Fix test failure reported by Tom Lane in
1220 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
1221 and try to make such failures easier to catch in the future.
1222 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
1223 that's now the caller's responsibility.
1224 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
1225 Set yychar = YYEOF if it's negative.
1226 * tests/actions.at (yylex): Abort if asked to read past EOF.
1227 * tests/conflicts.at (yylex): Likewise.
1228 * tests/cxx-type.at (yylex): Likewise.
1229 * tests/glr-regression.at (yylex): Likewise.
1230 * tests/input.at (yylex): Likewise.
1231 * tests/regression.at (yylex): Likewise.
1232 * tests/torture.at (yylex): Likewise.
1233
1234 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
1235
1236 Fix problems with translating English-language diagnostics.
1237 * bootstrap: Fix bug introduced in recent bootstrap changes, with
1238 respect to bison-runtime pot generation. The YY_ stuff
1239 wasn't being captured.
1240 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
1241 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
1242 * runtime-po/POTFILES.in: Add data/push.c.
1243
1244 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
1245
1246 Merge bootstrap changes from coreutils.
1247
1248 2006-09-28 Jim Meyering <jim@meyering.net>
1249
1250 Automatically generated dependencies are important even
1251 when all of the sources in a directory come from gnulib.
1252 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
1253 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
1254
1255 2006-09-23 Jim Meyering <jim@meyering.net>
1256
1257 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
1258
1259 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1260
1261 * bootstrap: Add support for --force.
1262 (usage): New function. Describe usage less tersely.
1263 (CVS_only_file): New var.
1264
1265 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
1266
1267 * data/push.c (YYPUSH_MORE): Make it an enum instead.
1268 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
1269 Adjust white space and comments to match GNU style better.
1270
1271 2006-09-20 Bob Rossi <bob@brasko.net>
1272
1273 * data/push.c (yyresult_get): Remove function.
1274 (YYPUSH_MORE): Add #define.
1275 (yypushparse): Modify return value.
1276
1277 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1278
1279 * stamp-h.in: Remove; no longer needed.
1280 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
1281 Remove config.h, config.hin, intl (no longer created).
1282 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
1283 stamp-h1.
1284
1285 Sync bootstrap from coreutils, as follows:
1286
1287 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
1288
1289 * bootstrap (symlink_to_gnulib): New function.
1290 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
1291 to copies-of-gnulib.
1292 (cp_mark_as_generated, slurp, gnulib_files):
1293 Avoid making a copy if it's the same as the old version.
1294 (gnulib_files): Add support for this variable (used by Bison).
1295
1296 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1297
1298 * src/getargs.c (usage): Rework to use conventions similar to
1299 coreutils, to make translation a bit easier and the code a bit
1300 smaller. Problem reported by Tim Van Holder.
1301
1302 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
1303
1304 Use some of gnulib's new modules, taken from coreutils.
1305
1306 * bootstrap: Sync from coreutils, except add support for gnulib_files.
1307 * bootstrap.conf: New file.
1308 (gnulib_modules): Add configmake, inttypes, unistd.
1309 (XGETTEXT_OPTIONS): Add complain, complain_at,
1310 fatal, fatal_at, warn, warn_at, unexpected_end.
1311 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
1312 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
1313 (gl_EARLY): Add.
1314 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
1315 (gl_INIT): Add
1316 (GNULIB_AUTOCONF_SNIPPET): Remove.
1317 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
1318 the pickiest.
1319 * lib/.cvsignore: Add inttypes_.h.
1320 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
1321 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
1322 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
1323 no-longer-necessary initializations.
1324 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
1325 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
1326 use the unistd module.
1327 * src/system.h: Likewise.
1328 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
1329 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
1330 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
1331 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
1332 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
1333 * src/system.h: Include inttypes.h unconditionally, now that we
1334 use the inttypes module. Don't bother to include stdint.h, since
1335 inttypes.h now does that for us.
1336 (LOCALEDIR): Remove, now that we use the configmake module.
1337 * src/getargs.c: Include configmake.h.
1338 * src/main.c: Likewise.
1339 * src/output.c: Likewise.
1340 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
1341 not from $abs_top_builddir, since config.h moved.
1342
1343
1344 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
1345 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
1346
1347 * src/parse-gram.y (symbol_declaration): Don't put statements
1348 before declarations; it's not portable to C89.
1349 * src/scan-code.l (handle_action_at): Likewise.
1350
1351 * src/scan-code.l: Always initialize braces_level; the old code
1352 left it uninitialized and therefore had undefined behavior.
1353
1354 Don't attempt to redefine 'assert', since it runs afoul of
1355 systems where standard headers (mistakenly) include <assert.h>.
1356 Instead, define and use our own alternative, called 'aver'.
1357 * src/reader.c: Don't include assert.h, since we no longer
1358 use assert.
1359 * src/scan-code.l: Likewise.
1360 * src/system.h (assert): Remove, replacing with....
1361 (aver): New function, taking a bool arg. All uses changed.
1362 * src/tables.c (pack_vector): Ensure that aver arg is bool,
1363 not merely an integer.
1364
1365 2006-09-15 Bob Rossi <bob@brasko.net>
1366
1367 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
1368 * data/c.m4 (YYPUSH): New.
1369 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
1370 * src/getargs.c (push_parser): New var.
1371 * src/getargs.h (push_parser): New declaration.
1372 * src/output.c (prepare): Add macro insertion of `push_flag'.
1373 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
1374 (prologue_declaration): Parse %push-parser.
1375 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
1376 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
1377 list of removed lines from the traces observed.
1378 (AT_CHECK_CALC_LALR): Added push parser tests.
1379
1380 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
1381
1382 * NEWS: Version 2.3a.
1383 * configure.ac (AC_INIT): Likewise.
1384
1385 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
1386 "#define YYSTYPE int" that caused "make maintainer-check" to fail
1387 due to header ordering dependencies. I don't know why the #define
1388 was there.
1389
1390 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
1391 runtime cost when YYDEBUG is not defined, and so that some tests
1392 that used to fail now work. Problem and initial suggestion by
1393 Paolo Bonzini.
1394 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
1395 * data/glr.cc (b4_parser_class_name):
1396 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
1397 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
1398 (yydebug_) [YYDEBUG]: New member.
1399 (yycdebug_): Now defined only if YYDEBUG.
1400 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
1401 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
1402 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
1403 if YYYDEBUG.
1404 (debug_stream, set_debug_stream, debug_level, set_debug_level):
1405 Define only if YYDEBUG.
1406 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
1407 set_debug_level.
1408 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
1409 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
1410 AT_CHECK_CALC_GLR_CC that are working now.
1411
1412 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
1413
1414 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
1415 We don't need them in glr.cc, and glr.c defines them.
1416 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
1417 assumes that defining it to anything is the same as defining
1418 it to 1. Problem reported by Paolo Bonzini.
1419
1420 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
1421
1422 * data/c.m4 (b4_null, b4_case): Define.
1423 * src/output.c (prepare_symbols): Use b4_null.
1424 (user_actions_output): Use b4_case.
1425
1426 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
1427
1428 * data/glr.c (b4_shared_declarations): Put start-header first,
1429 before any #includes that we generate, so that feature-test
1430 macros work. Problem reported by Michael Deutschmann in
1431 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
1432 * data/lalr1.cc: Likewise.
1433 * doc/bison.texinfo (Prologue): Document that feature-test macros
1434 should be defined before any Bison declarations.
1435 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
1436 that depend on location.hh after, not before, Bison decls, since
1437 we now include location.hh after the first user prologue.
1438
1439 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
1440 Sander Brandenburg in
1441 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
1442 Also, fix minor white space and comment issues.
1443 (Prologue): Mention that it's better to define feature-test macros
1444 before Bison declarations. Problem reported by Michael Deutschmann.
1445
1446 * README-cvs: Fix typo: "&" should be "&&". Problem reported
1447 by Jim Meyering.
1448 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
1449 This adjusts to recent gnulib changes.
1450
1451 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
1452
1453 Finish implementation of per-type %destructor/%printer. Discussed
1454 starting at
1455 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
1456 and
1457 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
1458 * NEWS (2.3+): Add a description of this feature to the default
1459 %destructor/%printer description.
1460 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
1461 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1462 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
1463 list node contains a semantic type.
1464 * src/symtab.c, src/symtab.h: Extend with a table that associates
1465 semantic types with their %destructor's and %printer's.
1466 (semantic_type_from_uniqstr, semantic_type_get,
1467 semantic_type_destructor_set, semantic_type_printer_set): New functions
1468 composing the public interface of that table.
1469 (symbol_destructor_get, symbol_destructor_location_get,
1470 symbol_printer_get, symbol_printer_location_get): If there's no
1471 per-symbol %destructor/%printer, look up the per-type before trying
1472 the default.
1473 * tests/actions.at (Per-type %printer and %destructor): New test case.
1474 * tests/input.at (Default %printer and %destructor redeclared):
1475 Extend to check that multiple occurrences of %symbol-default in a
1476 single %destructor/%printer declaration is an error.
1477 (Per-type %printer and %destructor redeclared, Unused values with
1478 per-type %destructor): New test cases.
1479
1480 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
1481
1482 Require default %destructor/%printer to be declared using
1483 %symbol-default instead of an empty symbol list, and start working on
1484 new per-type %destructor/%printer. Discussed at
1485 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
1486 * NEWS (2.3+): Add %symbol-default to example.
1487 * bison.texinfo (Freeing Discarded Symbols): Likewise.
1488 (Bison Symbols): Add entry for %symbol-default.
1489 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
1490 (generic_symlist, generic_symlist_item): New nonterminals for creating
1491 a list in which each item is a symbol, semantic type, or
1492 %symbol-default.
1493 (grammar_declaration): Use generic_symlist in %destructor and %printer
1494 declarations instead of symbols.1 or an empty list.
1495 (symbol_declaration, precedence_declaration, symbols.1): Update actions
1496 for changes to symbol_list.
1497 * src/reader.c: Update for changes to symbol_list.
1498 * src/scan-code.l: Likewise.
1499 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
1500 * src/symlist.c, src/symlist.h: Extend such that a list node may
1501 represent a semantic type or a %symbol-default in addition to just an
1502 ordinary symbol. Add switched functions for setting %destructor's and
1503 %printer's.
1504 * tests/actions.at, tests/input.at: Add %symbol-default to all default
1505 %destructor/%printer declarations.
1506
1507 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
1508
1509 Whether the default %destructor/%printer applies to a particular symbol
1510 isn't a question of whether the user *declares* that symbol (in %token,
1511 for example). It's a question of whether the user by any means
1512 *defines* the symbol at all (by simply using a char token, for
1513 example). $end is defined by Bison whereas any other token with token
1514 number 0 is defined by the user. The error token is always defined by
1515 Bison regardless of whether the user declares it with %token, but we
1516 may one day let the user define error as a nonterminal instead.
1517 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
1518 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
1519 the meaning of "user-defined".
1520 * tests/actions.at (Default %printer and %destructor for user-declared
1521 end token): Rename to...
1522 (Default %printer and %destructor for user-defined end token): ...
1523 this.
1524
1525 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
1526 computation of whether to apply the default, don't maintain a list of
1527 every Bison-defined symbol. Instead, just check for a first character
1528 of '$', which a user symbol cannot have, and check for the error token.
1529
1530 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
1531
1532 Don't apply the default %destructor or %printer to the error token,
1533 $undefined, or $accept. This change fits the general rule that the
1534 default %destructor and %printer are only for user-declared symbols,
1535 and it solves several difficulties that are described in the new test
1536 cases listed below.
1537 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
1538 * tests/actions.at (Default %printer and %destructor are not for error
1539 or $undefined, Default %printer and %destructor are not for $accept):
1540 New test cases.
1541
1542 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
1543
1544 Allow %start after the first rule.
1545 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
1546 when parsing the first rule.
1547 (check_and_convert_grammar): Search for it here after all grammar
1548 declarations have been parsed. Skip midrules, which have dummy LHS
1549 nonterminals.
1550 * src/symtab.c (symbol_is_dummy): New function.
1551 * src/symtab.h (symbol_is_dummy): Declare it.
1552 * tests/input.at (%start after first rule): New test.
1553
1554 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
1555
1556 Redo some of the previous commit: add back the ability to use
1557 non-aliased/undeclared string literals since it might be useful to
1558 those declaring %token-table.
1559 * src/reader.c (check_and_convert_grammar): Undo changes in previous
1560 commit: don't worry about complaints from symbols_pack.
1561 * src/symtab.c (symbol_new, symbol_class_set,
1562 symbol_check_alias_consistency): Undo changes in previous commit: count
1563 each string literal as a new symbol and token, assign it a symbol
1564 number, and don't complain about non-aliased string literals.
1565 (symbols_pack): Since symbol_make_alias still does not decrement symbol
1566 and token counts but does still set aliased tokens to the same number,
1567 symbol_pack_processor now leaves empty slots in the symbols array.
1568 Remove those slots.
1569 * tests/regression.at (Undeclared string literal): Remove test case
1570 added in previous commit since non-aliased string literals are allowed
1571 again.
1572 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
1573 remove unnecessary string literal declarations.
1574 * tests/sets.at (Firsts): Likewise.
1575
1576 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
1577
1578 Don't allow an undeclared string literal, but allow a string literal to
1579 be used before its declaration.
1580 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
1581 symbols_pack complained.
1582 * src/symtab.c (symbol_new): Don't count a string literal as a new
1583 symbol.
1584 (symbol_class_set): Don't count a string literal as a new token, and
1585 don't assign it a symbol number since symbol_make_alias does that.
1586 (symbol_make_alias): It's not necessary to decrement the symbol and
1587 token counts anymore. Don't assume that an alias declaration occurs
1588 before any uses of the identifier or string, and thus don't assert that
1589 one of them has the highest symbol number so far.
1590 (symbol_check_alias_consistency): Complain if there's a string literal
1591 that wasn't declared as an alias.
1592 (symbols_pack): Bail if symbol_check_alias_consistency failed since
1593 symbol_pack asserts that every token has been assigned a symbol number
1594 although undeclared string literals have not.
1595 * tests/regression.at (String alias declared after use, Undeclared
1596 string literal): New test cases.
1597 (Characters Escapes, Web2c Actions): Declare string literals as
1598 aliases.
1599 * tests/sets.at (Firsts): Likewise.
1600
1601 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
1602
1603 In the grammar scanner, STRING_FINISH unclosed constructs and return
1604 them to the parser in order to improve error messages.
1605 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
1606 SC_BRACED_CODE, SC_PROLOGUE): Implement.
1607 * tests/input.at (Unclosed constructs): New test case.
1608 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
1609 seen.
1610
1611 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
1612 unused global.
1613
1614 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
1615
1616 Handle string aliases for character tokens correctly.
1617 * src/symtab.c (symbol_user_token_number_set): If the token has an
1618 alias, check and set its alias's user token number instead of its own,
1619 which is set to indicate the alias. Previously, every occurrence of
1620 the character token in the grammar overwrote that alias indicator with
1621 the character code.
1622 * tests/input.at (String aliases for character tokens): New test.
1623
1624 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
1625
1626 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
1627
1628 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
1629
1630 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
1631 to prevent failures when building on older platforms.
1632 Check for autopoint failure.
1633 Set XGETTEXT_OPTIONS to values that check for C format strings,
1634 so that translators are warned about them (this also helps
1635 prevent core dumps).
1636
1637 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
1638 function, since it simplifies our code a bit.
1639
1640 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
1641 rather than -W, so we don't get bogus warnings about sign comparisons.
1642 Add -Wpointer-arith, since that warning is useful (it reports code
1643 that does not conform to C89 and that some compilers reject).
1644 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
1645 since it's no longer needed.
1646
1647 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
1648
1649 Clean up scanners a bit.
1650 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
1651 definitions so gcc won't warn when obstack_for_string is unused.
1652 * src/scan-code.l: config.h and system.h are already #include'd by
1653 scan-code-c.c, so get rid of them here.
1654 * src/scan-gram.l: Likewise.
1655 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
1656 definitions rather than duplicating the rest of it.
1657 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
1658
1659 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
1660
1661 Suppress signed/unsigned comparison warnings for yycheck.
1662 * data/c.m4 (b4_safest_int_type): New macro.
1663 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
1664 a signed int type, cast it to b4_safest_int_type first.
1665 * data/yacc.c: Likewise.
1666 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
1667 also overwritten.
1668
1669 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
1670
1671 * doc/bison.texinfo: Fix some typos.
1672
1673 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
1674
1675 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
1676 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
1677
1678 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
1679 the latest gnulib does this a different way.
1680 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
1681 translation was patched, so stop omitting it.
1682
1683 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1684
1685 Enable declaration of default %printer/%destructor. Make the parser
1686 use these for all user-declared grammar symbols for which the user does
1687 not declare a specific %printer/%destructor. Thus, the parser uses it
1688 for token 0 if the user declares it but not if Bison generates it as
1689 $end. Discussed starting at
1690 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
1691 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
1692 and
1693 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
1694 * NEWS (2.3+): Mention.
1695 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
1696 declare a %destructor for a mid-rule's semantic value. It's just
1697 impossible to declare one specific to it.
1698 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
1699 code. Describe default %destructor form.
1700 * src/parse-gram.y (grammar_declaration): Parse default
1701 %printer/%destructor declarations.
1702 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
1703 and symbol_destructor_location_get rather than accessing the destructor
1704 and destructor_location members of struct symbol.
1705 (symbol_printers_output): Likewise but for %printer's.
1706 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
1707 again.
1708 * src/symtab.c (default_destructor, default_destructor_location,
1709 default_printer, default_printer_location): New static global
1710 variables to record the default %destructor and %printer.
1711 (symbol_destructor_get, symbol_destructor_location_get,
1712 symbol_printer_get, symbol_printer_location_get): New functions to
1713 compute the appropriate %destructor and %printer for a symbol.
1714 (default_destructor_set, default_printer_set): New functions to set the
1715 default %destructor and %printer.
1716 * src/symtab.h: Prototype all those new functions.
1717 * tests/actions.at (Default %printer and %destructor): New test to
1718 check that the right %printer and %destructor are called, that they're
1719 not called for $end, and that $$ and @$ work correctly.
1720 (Default %printer and %destructor for user-declared end token): New
1721 test to check that the default %printer and %destructor are called for
1722 a user-declared end token.
1723 * tests/input.at (Default %printer and %destructor redeclared, Unused
1724 values with default %destructor): New tests to check related grammar
1725 warnings and errors.
1726
1727 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1728
1729 Clean up handling of %destructor for the end token (token 0).
1730 Discussed starting at
1731 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
1732 and
1733 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
1734
1735 Make the skeletons consistent in how they pop the end token and invoke
1736 its %destructor.
1737 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
1738 state, which has token number 0, since this would invoke the
1739 %destructor for the end token.
1740 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
1741 until after shifting the end token, or else it won't be popped.
1742 * data/yacc.c (yyparse): Likewise.
1743
1744 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
1745 it's the end token. Upon termination, destroy an unshifted lookahead
1746 even when it's the end token.
1747 * data/lalr1.cc (yy::parser::parse): Likewise.
1748 * data/yacc.c (yyparse): Likewise.
1749
1750 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
1751 value warnings for the end token when the user gives the end token a
1752 %destructor.
1753
1754 * tests/actions.at (Printers and Destructors): Test all the above.
1755
1756 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
1757
1758 Update to latest gnulib and gettext versions.
1759 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
1760 Add fopen-safer.
1761 (gnulib_files): Add m4/warning.m4. Don't worry about files
1762 overwritten by autopoint.
1763 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
1764 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
1765 rejects them.
1766 Don't use autoreconf; instead, invoke autopoint etc. by hand,
1767 so that we can remove the intl files at a better time.
1768 (intl_files_to_remove): Remove aclocal.m4, since it gets
1769 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
1770 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
1771 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
1772 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
1773 Remove datarootdir hack; no longer needed.
1774 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
1775 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
1776 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
1777 strdup.h.
1778 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
1779 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
1780
1781 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
1782
1783 * bootstrap: Adjust to today's change to gnulib-tool by invoking
1784 it with --assume-autoconf='latest-stable'.
1785
1786 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
1787
1788 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
1789 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
1790 YYSTYPE' and `{'.
1791 * src/muscle_tab.h (muscle_grow): Replace the header comments with
1792 those from muscle_tab.c since the old ones are misleading.
1793
1794 2006-07-13 Akim Demaille <akim@epita.fr>
1795
1796 Support %define "KEY" {VALUE}.
1797 * src/scan-code.h, src/scan-code.l (translate_action)
1798 (translate_rule_action, translate_symbol_action, translate_code):
1799 Return char *, not const char *.
1800 * src/parse-gram.y (declaration): Rename as...
1801 (prologue_declaration): this.
1802 (string_content): Remove this nonterminal, use STRING.
1803 (braceless, content, content.opt): New nonterminal.
1804 Use them.
1805 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
1806 as value.
1807 * src/scan-gram.l (getargs.h): Don't include it.
1808
1809 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
1810
1811 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
1812 rather than a for-loop that declares a local bool variable. This
1813 should work around a compatibility problem with a Cray x1e C++
1814 compiler reported by Hung Nguyen in
1815 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
1816 The for-loop was introduced in the 2004-11-17 change but I don't
1817 know why it was needed.
1818
1819 2006-07-12 Akim Demaille <akim@epita.fr>
1820
1821 * data/c.m4: Comment changes.
1822
1823 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
1824
1825 * src/complain.c (error_message, ERROR_MESSAGE): New.
1826 To factor...
1827 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
1828 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
1829
1830 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1831
1832 * NEWS: Instead of %union, you can define and use your own union type
1833 YYSTYPE if your grammar contains at least one <type> tag.
1834 Your YYSTYPE need not be a macro; it can be a typedef.
1835 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
1836 (Union Decl, Decl Summary): Document this.
1837 * data/glr.c (YYSTYPE): Implement this.
1838 * data/glr.cc (YYSTYPE): Likewise.
1839 * data/lalr1.cc (YYSTYPE): Likewise.
1840 * data/yacc.c (YYSTYPE): Likewise.
1841 * src/output.c (prepare): Output tag_seen_flag.
1842 * src/parse-gram.y (declaration, grammar_declaration):
1843 Use 'union_seen' rather than 'typed' to determine whether
1844 %union has been seen, since grammars can now be typed without
1845 %union.
1846 (symbol_declaration, type.opt, symbol_def):
1847 Keep track of whether a tag has been seen.
1848 * src/reader.c (union_seen, tag_seen): New vars.
1849 (typed): remove.
1850 * src/reader.h (union_seen, tag_seen, typed): Likewise.
1851 * src/scan-code.l (untyped_var_seen): New variable.
1852 (handle_action_dollar): Adjust to above changes.
1853 (handle_action_dollar, handle_action_at):
1854 Improve overflow checking for outlandish numbers.
1855 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
1856 avoid new diagnostics generated by above changes.
1857 * tests/regression.at (YYSTYPE typedef): Add test to check
1858 for type tags without %union.
1859
1860 * src/symlist.c (symbol_list_length): Return int, not unsigned
1861 int, since callers expect int. This may need to get revisited
1862 once we have proper integer overflow checking.
1863
1864 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
1865 object is now static.
1866
1867 * src/getargs.c (flags_argmatch): Return void, not int,
1868 to pacify ./configure --enable-gcc-warnings.
1869
1870 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
1871 since last_string is already defined to FLEX_PREFIX (last_string).
1872
1873 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1874
1875 Implement --warnings/-W.
1876 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
1877 replaced by...
1878 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
1879 Adjust callers.
1880 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
1881 (warnings_args, warnings_types): New.
1882 (getargs, short_options, long_options): Accept -W/--warnings.
1883 Sort the options by alphabetical order, upper case letter right
1884 before its lower case.
1885
1886 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1887
1888 Change %merge result type clash warnings to errors. Discussed at
1889 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
1890 * src/reader.c (record_merge_function_type): Use complain_at.
1891 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1892 declared later): Update test case results.
1893
1894 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1895
1896 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
1897 to be in alphabetical order.
1898 (trace_args): Spelling fixes.
1899
1900 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1901
1902 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
1903 so they don't collide with user-defined macros.
1904 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
1905 this was never guaranteed, and now that we're using gnulib stdint,
1906 which defines int_fast16_t to long int, the problem is exposed.
1907
1908 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
1909
1910 * data/c.m4 (b4_basename): Simplify a bit, since we don't
1911 need the full POSIX semantics (and weren't implementing them
1912 anyway).
1913
1914 Adjust to Autoconf 2.60 and today's gnulib.
1915 * bootstrap (gnulib_modules): Add stdint.
1916 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
1917 no longer copies it.
1918 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1919 since stdint needs the former and wcwidth (which is now required
1920 by mbswidth) needs the latter.
1921 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1922 work around a compatibility glitch between gettext 0.14.6 and
1923 Autoconf 2.60.
1924 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1925 Do not check for uintptr_t, since new stdint module does the right
1926 thing.
1927 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1928 Add stdint.h, stdint_.h, wcwidth.h.
1929 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1930 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1931 stdint.m4, wchar_t.m4, wcwidth.m4.
1932 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1933 usual order for ../lib/*.h files.
1934 (file_name_split): Use last_component, not base_name, to adjust
1935 to gnulib changes.
1936 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1937 for ../lib/*.h files.
1938 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1939 Define unconditionally, since we now assume the stdint module.
1940 * src/scan-skel.l: Include <dirname.h>.
1941 (BASE_QPUTS): Use last_component, not base_name.
1942 * src/system.h: Include <unlocked-io.h> in the usual order
1943 for ../lib/*.h files. Include <stdint.h> unconditionally,
1944 since we now use the stdint module.
1945 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1946 HAVE_UINTPTR_T, since we now use the stdint module.
1947 (base_name): Remove decl, since files now include <dirname.h>
1948 to get the decl.
1949
1950 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1951
1952 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1953 New, default to 1.
1954 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1955 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1956 default.
1957 * tests/calc.at: Adjust.
1958
1959 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1960
1961 * data/c.m4 (b4_basename): New.
1962 (b4_syncline): Also output the location of its invocation (from
1963 the skeleton).
1964 (b4_user_action, b4_define_user_action, b4_user_actions)
1965 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1966 (b4_user_stype): New.
1967 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1968
1969 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1970
1971 In the grammar file, the first column is 1 not 0 on the first line as
1972 on every other line.
1973 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1974 * tests/input.at (Torturing the Scanner): Update output.
1975
1976 * src/scan-gram.l (scanner_cursor): Declare it static.
1977
1978 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1979
1980 In warnings, say "previous declaration" rather than "first
1981 declaration".
1982 * src/symtab.c (redeclaration): Do that here.
1983 * src/reader.c (record_merge_function_type): In the case of a result
1984 type clash, report the previous declaration rather than the very first
1985 one in the grammar file.
1986 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1987 declared later): Add a third declaration to check this behavior.
1988 * tests/input.at (Incompatible Aliases): Update output.
1989
1990 2006-06-27 Akim Demaille <akim@epita.fr>
1991
1992 * doc/Doxyfile.in: New.
1993 * doc/Makefile.am: Use it.
1994 * src/lalr.h, src/symtab.h: Initial doxygenation.
1995
1996 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1997
1998 Don't miss %merge result type warnings just because the LHS types are
1999 declared after the %merge. This continues the effort of the previous
2000 patch.
2001 * src/reader.c (get_merge_function): Don't set the merger type yet.
2002 (record_merge_function_type): New function for setting the merger type
2003 and checking for clashes.
2004 (grammar_current_rule_merge_set): Set the location of the %merge for
2005 the current rule.
2006 (packgram): Invoke record_merge_function_type for each rule now that
2007 all symbol type declarations have been parsed.
2008 * src/reader.h (merger_list.type_declaration_location): New member
2009 storing the location of the first %merge from which the type for this
2010 merging function was derived.
2011 * src/symlist.h (symbol_list.merger_declaration_location): New member
2012 storing the location of a rule's %merge, if any.
2013 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2014 declared later): New test to catch the error fixed by the above patch.
2015
2016 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2017
2018 Get action warnings (grammar_rule_check) right even when symbol
2019 declarations appear after the rules. Discussed at
2020 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
2021 and
2022 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
2023 Don't mistake the type of $$ in a midrule to be that of its parent
2024 rule's $$.
2025 * src/reader.c (grammar_current_rule_end): Don't invoke
2026 grammar_rule_check yet since not all symbol declarations may have been
2027 parsed yet.
2028 (grammar_midrule_action): Likewise.
2029 Don't record whether the midrule's $$ has been used yet since actions
2030 haven't been translated yet.
2031 Record the midrule's parent rule and its RHS index within the parent
2032 rule.
2033 (grammar_current_rule_action_append): Don't translate the action yet
2034 since not all symbol declarations may have been parsed yet and, thus,
2035 warnings about types for $$, $n, @$, and @n can't be reported yet.
2036 (packgram): Translate the action and invoke grammar_rule_check now that
2037 all symbol declarations have been parsed.
2038 * src/scan-code.l (handle_action_dollar): Now that this is invoked
2039 after parsing the entire grammar file, the symbol list here in the case
2040 of a midrule is actually the midrule's empty RHS, so reference its
2041 parent rule's RHS where necessary.
2042 On the other hand, now that you can already know it's a midrule, you
2043 aren't forced to think $$ has the same type as its parent rule's $$.
2044 (handle_action_at): In the case of a midrule, reference the parent rule
2045 where necessary.
2046 * src/symlist.c (symbol_list_new): Initialize new midrule-related
2047 members.
2048 (symbol_list_length): Now that this is invoked after all rules have
2049 been parsed, a NULL symbol (rather than a NULL symbol list node)
2050 terminates a rule. symbol_list_print already does this correctly.
2051 * src/symlist.h (symbol_list.midrule_parent_rule,
2052 symbol_list.midrule_parent_rhs_index): New members so that midrules can
2053 remember their relationships with their parents.
2054 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
2055 fixed by the above patch.
2056 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
2057 implementing...
2058 (Unused values): ... this old test case and...
2059 (Unused values before symbol declarations): ... this new test case.
2060 This one is the same as `Unused values' except that all symbol
2061 declarations appear after the rules in order to catch the rest of the
2062 errors fixed by the above patch.
2063
2064 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2065
2066 More cleanup.
2067 * src/reader.c (current_rule): Declare it static since it's no longer
2068 used outside this file.
2069 (grammar_current_rule_action_append): Remove redundant arguments from
2070 translate_rule_action invocation.
2071 * src/reader.h (current_rule): Remove this unused extern.
2072 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
2073 * src/scan-code.l (translate_rule_action): Likewise.
2074
2075 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
2076
2077 Clean up yesterday's patch.
2078 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
2079 to...
2080 * src/reader.c (grammar_current_rule_action_append): ... here for
2081 consistency with grammar_current_rule_symbol_append.
2082 * tests/regression.at (Braced code in declaration in rules section):
2083 Make yyerror and yylex static as usual.
2084
2085 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
2086
2087 Fix bug that mistakes braced code in a declaration in the rules section
2088 to be a rule action. Mentioned at
2089 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
2090 * src/scan-gram.l: Move midrule action detection from the start of the
2091 scanning of any braced code to...
2092 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
2093 action. For readability, use $2 and @2 rather than the equivalent
2094 global variables.
2095 * tests/regression.at (Braced code in declaration in rules section):
2096 New test to catch the error fixed by the above patch.
2097
2098 Work on code readability some.
2099 * src/scan-code.l (current_rule): Get rid of this misleading and
2100 redundant declaration: it's actually extern'ed in reader.h.
2101 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
2102 translate_action): Add a rule argument and use it instead of the global
2103 current_rule.
2104 (translate_rule_action): This already receives current_rule through an
2105 argument, so pass it on to translate_action instead of assigning
2106 current_rule to current_rule.
2107 (translate_symbol_action, translate_code): Pass rule = NULL to
2108 translate_action.
2109
2110 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
2111
2112 Rename %before-definitions to %start-header and %after-definitions to
2113 %end-header. Don't use these declarations to separate pre-prologue
2114 blocks from post-prologue blocks. Add new order-independent
2115 declarations %before-header and %after-header as alternatives to the
2116 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
2117 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
2118 * NEWS (2.3+): Update for these changes.
2119 * data/glr.c (b4_before_definitions): Update to...
2120 (b4_start_header): ... this.
2121 (b4_after_definitions): Update to...
2122 (b4_end_header): ... this.
2123 * data/glr.cc: Likewise.
2124 * data/lalr1.cc: Likewise.
2125 * data/yacc.c: Likewise.
2126 * doc/bison.texinfo (The prologue): Update names, and replace remaining
2127 prologue blocks with %*-header declarations.
2128 (Calc++ Parser): Likewise.
2129 (Bison Declaration Summary): Update names.
2130 (Bison Symbols): Update description.
2131 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
2132 (PERCENT_END_HEADER): ... this.
2133 (PERCENT_BEFORE_DEFINITIONS): Update to...
2134 (PERCENT_START_HEADER): ... this.
2135 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
2136 (declaration): Update token names and m4 macro names.
2137 When parsing %end-header and %start-header, invoke translate_code
2138 before muscle_code_grow, and no longer set global booleans to remember
2139 whether these declarations have been seen.
2140 Parse new %after-header and %before-header.
2141 * src/reader.c (before_definitions, after_definitions): Remove.
2142 (prologue_augment): Accept a new bool argument to specify whether to
2143 augment the pre-prologue or post-prologue.
2144 * src/reader.h (before_definitions, after_definitions): Remove these
2145 extern's.
2146 (prologue_augment): Add new bool argument.
2147 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
2148 (PERCENT_END_HEADER): ... this.
2149 (PERCENT_BEFORE_DEFINITIONS): Update to...
2150 (PERCENT_START_HEADER): ... this.
2151 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
2152 * tests/actions.at (Printers and Destructors): Update names.
2153
2154 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
2155
2156 Add comparison operators for C++ location classes. Discussed at
2157 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
2158 * data/c++.m4 (b4_define_location_comparison): New boolean %define
2159 declaration indicating whether filename_type has an operator==. If
2160 filename_type is `std::string', it defaults to `1', `0' otherwise.
2161 * data/location.cc: Iff b4_define_location_comparison is `1', add
2162 operator== and operator!= for class position and for class location.
2163
2164 Some minor fixes.
2165 * src/scan-action.l: Remove unused file.
2166 * src/symtab.c (symbol_printer_set): Use printer_location not
2167 destructor_location.
2168 * src/symtab.h (struct symbol): Replace incorrect source comment for
2169 printer members.
2170 * tests/input.at (Incompatible Aliases): Update output with correct
2171 printer location.
2172
2173 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
2174
2175 Don't put the pre-prologue in the header file. For the yacc.c code
2176 file and the glr.c header and code files, move the pre-prologue before
2177 the token definitions. Add new %before-definitions and
2178 %after-definitions to declare code that will go in both the header file
2179 and code file. Discussed at
2180 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
2181 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
2182 and
2183 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
2184 * NEWS (2.3+): Describe these changes.
2185 * data/glr.c (b4_pre_prologue): Move from within to before...
2186 (b4_shared_declarations): ... this.
2187 Add new b4_before_definitions before b4_token_enums.
2188 Add new b4_after_definitions at the end.
2189 * data/glr.cc (b4_pre_prologue): Replace with...
2190 (b4_before_definitions): ... this in the header file.
2191 (b4_after_definitions): New near the end of the header file.
2192 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
2193 code file right before including the header file.
2194 (b4_before_definitions): New in the previous position of
2195 b4_pre_prologue in the header file.
2196 (b4_after_definitions): New near the end of the header file.
2197 * data/yacc.c: Clean up some m4 quoting especially in the header file.
2198 (b4_token_enums_defines): In the code file, move to right before
2199 YYSTYPE for consistency with the header file.
2200 (b4_before_definitions): New right before b4_token_enums_defines in
2201 both the header and code file.
2202 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
2203 header and code file.
2204 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
2205 of prologues for %union dependencies.
2206 (Bison Declaration Summary): In %defines description, mention the
2207 effect of %before-definitions and %after-definitions on the header
2208 file.
2209 (Calc++ Parser): Forward declare driver in a %before-definitions rather
2210 than in the pre-prologue so that make check succeeds.
2211 (Bison Symbols): Add entries for %before-definitions and
2212 %after-definitions.
2213 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
2214 %before-definitions.
2215 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
2216 (declaration): Parse those declarations and append to
2217 b4_before_definitions and b4_after_definitions, respectively.
2218 * src/reader.c (before_definitions, after_definitions): New bools to
2219 track whether those declarations have been seen.
2220 (prologue_augment): Add to the post-prologue if %union,
2221 %before-definitions, or %after-definitions has been seen.
2222 * src/reader.h (before_definitions, after_definitions): New extern's.
2223 * src/scan-gram.l: Scan the new declarations.
2224 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
2225 prologue block in a %before-definitions or a %after-definitions based
2226 on whether the %union is declared.
2227 * tests/regression.at (Early token definitions with --yacc, Early token
2228 definitions without --yacc): Move tests for token definitions into the
2229 post-prologue since token names are no longer defined in the
2230 pre-prologue.
2231
2232 2006-06-20 Akim Demaille <akim@epita.fr>
2233
2234 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
2235 (symbol_get): Use it.
2236 * src/parse-gram.y: Use it.
2237
2238 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
2239
2240 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
2241 build succeeds when configured with --enable-gcc-warnings.
2242
2243 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
2244
2245 * src/parse-gram.y (char_name): New function.
2246 (CHAR, STRING, string_content): For %printer, properly escape.
2247 (ID): Prefer fputs to fprintf.
2248 (id): Reindent to be consistent with other rules.
2249 Properly quote char.
2250
2251 The Translation Project changed its way of publishing translations
2252 to maintainers. I haven't received any responses to my request
2253 for supporting the old way, or for documenting the new way. I
2254 have modified 'bootstrap' to use screen scraping
2255 (in this case, HTML scraping). This is unreliable and inelegant,
2256 but I don't see any better way. Yuck.
2257 * bootstrap (TP_URL, WGET_COMMAND): New vars.
2258 (get_translations): New function, which uses HTML scraping to
2259 deduce locations of latest translations.
2260 Use this function to grab both bison and bison-runtime .po files.
2261 Don't bother priming the pump for the runtime-po domain any more,
2262 as it's now translated better than bison is.
2263
2264 2006-06-19 Akim Demaille <akim@epita.fr>
2265
2266 * src/scan-gram.l: No longer "parse" things after `%union' until
2267 `{'. Rather, return a single "%union" token.
2268 No longer make symbols: return strings, and leave the conversion
2269 to symbols to the parser.
2270 (SC_PRE_CODE, token_type): Remove.
2271 * src/parse-gram.y (%union): New field `character'.
2272 Sort tokens.
2273 (CHAR): New token.
2274 (ID, ID_COLON): Now that the scanner no longer makes them
2275 identifiers, adjust all uses to invoke symbol_get.
2276 (id_colon): New, wraps the conversion from string to symbol.
2277 (%union): Accept a possible union_name.
2278 (symbol): Now can be a char.
2279 * data/c.m4 (b4_union_name): Leave a default value.
2280 * data/glr.c, data/yacc.c: Use it.
2281
2282 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
2283
2284 For associating token numbers with token names for "yacc.c", don't use
2285 #define statements unless `--yacc' is specified; always use enum
2286 yytokentype. Most important discussions start at:
2287 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
2288 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
2289 and
2290 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
2291 * NEWS (2.3+): Mention.
2292 * data/c.m4 (b4_yacc_if): New.
2293 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
2294 token #define's.
2295 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
2296 on token name definitions.
2297 * src/getargs.c (usage): Capitalize `Yacc' in English.
2298 * src/output.c (prepare): Define b4_yacc_flag.
2299 * tests/regression.at (Early token definitions): Test that tokens names
2300 are defined before the pre-prologue not just before the post-prologue.
2301 Remove this test case and copy to...
2302 (Early token definitions with --yacc): ... this to test #define's.
2303 (Early token definitions without --yacc): ... and this to test enums.
2304
2305 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
2306
2307 * NEWS: Reword the post-2.3 change to not be so optimistic about
2308 removing the old "look-ahead" spelling.
2309 Update previous look-ahead/lookahead change reports.
2310 * REFERENCES: look-ahead -> lookahead (since that's
2311 what he actually wrote).
2312 * doc/refcard.tex: look ahead -> lookahead,
2313 look-ahead -> lookahead
2314
2315 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
2316
2317 For consistency, use `lookahead' instead of `look-ahead' or
2318 `look_ahead'. Discussed starting at
2319 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
2320 and then at
2321 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
2322 * NEWS: For the next release, note the change to `--report'.
2323 * TODO, doc/bison.1: Update English.
2324 * doc/bison.texinfo: Update English.
2325 (Understanding Your Parser, Bison Options): Document as
2326 `--report=lookahead' rather than `--report=look-ahead'.
2327 * src/conflicts.c: Update English in comments.
2328 (lookahead_set): Rename from look_ahead_set.
2329 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
2330 (resolve_sr_conflict): Rename local look_ahead_tokens to
2331 lookahead_tokens, and update other uses.
2332 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
2333 count_rr_conflicts, conflicts_free): Update uses.
2334 * src/getargs.c (report_args): Move "lookahead" before alternate
2335 spellings.
2336 (report_types): Update uses.
2337 (usage): For `--report' usage description, state `lookahead' spelling
2338 rather than `look-ahead'.
2339 * src/getargs.h (report.report_lookahead_tokens): Rename from
2340 report_look_ahead_tokens.
2341 * src/lalr.c: Update English in comments.
2342 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
2343 (state_lookahead_tokens_count): Rename from
2344 state_look_ahead_tokens_count.
2345 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2346 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
2347 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2348 Update other uses.
2349 Update English in output.
2350 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
2351 * src/print.c: Update English in comments.
2352 (lookahead_set): Rename from look_ahead_set.
2353 (print_reduction): Rename argument lookahead_token from
2354 look_ahead_token.
2355 (print_core, state_default_rule, print_reductions, print_results):
2356 Update uses.
2357 * src/print_graph.c: Update English in comments.
2358 (print_core): Update uses.
2359 * src/state.c: Update English in comments.
2360 (reductions_new): Update uses.
2361 (state_rule_lookahead_tokens_print): Rename from
2362 state_rule_look_ahead_tokens_print, and update other uses.
2363 * src/state.h: Update English in comments.
2364 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
2365 (state_rule_lookahead_tokens_print): Rename from
2366 state_rule_look_ahead_tokens_print.
2367 * src/tables.c: Update English in comments.
2368 (conflict_row, action_row): Update uses.
2369 * tests/glr-regression.at
2370 (Incorrect lookahead during deterministic GLR,
2371 Incorrect lookahead during nondeterministic GLR): Rename
2372 print_look_ahead to print_lookahead.
2373 * tests/torture.at: Update English in comments.
2374 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
2375 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
2376 (Many lookahead tokens): Update uses.
2377 * data/glr.c: Update English in comments.
2378 * lalr1.cc: Likewise.
2379 * yacc.c: Likewise.
2380 * src/conflicts.h: Likewise.
2381 * src/lalr.h: Likewise.
2382 * src/main.c: Likewise.
2383 * src/output.c: Likewise.
2384 * src/parse-gram.c: Likewise.
2385 * src/tables.h: Likewise.
2386 * tests/calc.at: Likewise.
2387
2388 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
2389
2390 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
2391
2392 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
2393
2394 * TODO: Add request from Nelson H. F. Beebe to be able to install
2395 Bison without installing the yacc script.
2396
2397 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
2398
2399 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
2400 and yytext if they're already #define'd.
2401 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
2402 * src/scan-code-c.c: ... here.
2403 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
2404 <config.h>.
2405
2406 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
2407
2408 Get Bison to build again when configured with --enable-gcc-warnings.
2409 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
2410 missing #include's.
2411 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
2412 loc argument as it shadows a global.
2413 * src/scan-gram.l: Remove stray comma that prevents boundary_set
2414 invocation.
2415
2416 * src/.cvsignore: Add scan-code.c.
2417
2418 2006-06-07 Akim Demaille <akim@epita.fr>
2419
2420 * src/scan-gram.l: Move the "add a trailing ; to actions" code
2421 to...
2422 * src/scan-code.l: here.
2423 * tests/input.at (Torturing the Scanner): Fix another location
2424 error.
2425
2426 2006-06-07 Akim Demaille <akim@epita.fr>
2427
2428 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
2429
2430 2006-06-06 Akim Demaille <akim@epita.fr>
2431
2432 Extract the parsing of user actions from the grammar scanner.
2433 As a consequence, the relation between the grammar scanner and
2434 parser is much simpler. We can also split "composite tokens" back
2435 into simple tokens.
2436 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
2437 * src/scan-gram.l (add_column_width, adjust_location): Move to and
2438 rename as...
2439 * src/location.h, src/location.c (add_column_width)
2440 (location_compute): these.
2441 Fix the column count: the initial column is 0.
2442 (location_print): Be robust to ending column being 0.
2443 * src/location.h (boundary_set): New.
2444 * src/main.c: Adjust to scanner_free being renamed as
2445 gram_scanner_free.
2446 * src/output.c: Include scan-code.h.
2447 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
2448 Use boundary_set.
2449 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
2450 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
2451 which is now, again, a separate token.
2452 Adjust all dependencies.
2453 Whereever actions with $ and @ are used, use translate_code.
2454 (action): Remove this nonterminal which is now useless.
2455 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
2456 (grammar_current_rule_action_append): Use translate_code.
2457 (packgram): Bound check ruleno, itemno, and rule_length.
2458 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
2459 (last_string, last_braced_code_loc, max_left_semantic_context)
2460 (scanner_initialize, scanner_free, scanner_last_string_free)
2461 (gram_out, gram_lineno, YY_DECL_): Move to...
2462 * src/scan-gram.h: this new file.
2463 (YY_DECL): Rename as...
2464 (GRAM_DECL): this.
2465 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
2466 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2467 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2468 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2469 Move these declarations, and...
2470 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
2471 these to...
2472 * src/flex-scanner.h: this new file.
2473 * src/scan-gram.l (rule_length, rule_length_overflow)
2474 (increment_rule_length): Remove.
2475 (last_braced_code_loc): Rename as...
2476 (gram_last_braced_code_loc): this.
2477 Adjust to the changes of the parser.
2478 Move all the handling of $ and @ into...
2479 * src/scan-code.l: here.
2480 * src/scan-gram.l (handle_dollar, handle_at): Remove.
2481 (handle_action_dollar, handle_action_at): Move to...
2482 * src/scan-code.l: here.
2483 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
2484 scan-code.h, scan-code-c.c, scan-gram.h.
2485 (EXTRA_bison_SOURCES): Add scan-code.l.
2486 (BUILT_SOURCES): Add scan-code.c.
2487 (yacc): Be robust to white spaces.
2488
2489 * tests/conflicts.at, tests/input.at, tests/reduce.at,
2490 * tests/regression.at: Adjust the column numbers.
2491 * tests/regression.at: Adjust the error message.
2492
2493 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
2494
2495 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
2496 Use Akim's wording from
2497 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
2498
2499 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
2500
2501 Between Bison releases, manually append `+' to the previous Bison
2502 release number, and use that as a signal to automatically print the
2503 ChangeLog's CVS Id keyword from --version. Discussed starting at
2504 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
2505 * ChangeLog: Add Id header.
2506 * configure.ac (AC_INIT): Append `+' to `2.3'.
2507 * src/.cvsignore: Add revision.c.
2508 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
2509 (BUILT_SOURCES): Add revision.c.
2510 (revision.c): New target rule. This file defines a new global variable
2511 named revision. It initializes it with either the Id from ChangeLog
2512 or, if VERSION doesn't contain `+', with the empty string.
2513 * src/getargs.c (version): Print the value of revision.
2514 * src/revision.h: Extern revision.
2515
2516 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
2517
2518 * NEWS: Version 2.3.
2519 * configure.ac (AC_INIT): Likewise.
2520
2521 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
2522
2523 * data/glr.c (YYRECOVERING): Define to be a function-like macro
2524 with no arguments, not as an object-like macro. This is for
2525 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
2526 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
2527 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
2528 Document this.
2529
2530 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
2531
2532 * src/getargs.c (usage): Back out yesterday's modification of the
2533 --help output so that we don't have to wait for translation before
2534 releasing 2.3.
2535
2536 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
2537
2538 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
2539 Problem reported by Akim Demaille.
2540
2541 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2542
2543 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
2544
2545 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
2546
2547 * data/yacc.c (yy_reduce_print): Omit trailing white space in
2548 generated source code. Problem reported by Frans Englich in
2549 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
2550
2551 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
2552
2553 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
2554 shell, not within 'make', so that 'make' by an ordinary builder
2555 (using GNU make) does not worry about configuring gzip. This also
2556 works around a bug reported independently by Keith Thompson and by
2557 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
2558 stderr rather than stdout, messing up the build logs.
2559
2560 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
2561
2562 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
2563 to make sure that YYID will never be unused. This fixes a 'make
2564 maintainer-check' failure caused by the recent changes to the 'Trivial
2565 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
2566 not used.
2567 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
2568
2569 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
2570
2571 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
2572 state before an empty RHS is always resolved here. Only the location
2573 of that state is guaranteed to be resolved, and that's enough. This
2574 fixes the remaining bug reported by Derek M. Jones in
2575 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
2576 * tests/glr-regression.at (Uninitialized location when reporting
2577 ambiguity): Test the above case.
2578 Also, the embedded comments in this test case claim it checks the case
2579 of an empty RHS that has inherited the initial location. However, the
2580 corresponding LHS was already resolved, so yyresolveLocations didn't
2581 actually have reason to modify it. Fix this by forcing
2582 nondeterministic operation at the beginning of the parse.
2583
2584 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
2585
2586 * data/c.m4 (b4_yy_symbol_print_generate):
2587 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
2588 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
2589 of the bugs reported today by Derek M Jones in
2590 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
2591 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
2592 defined to be a type name without parens or brackets.
2593 (Location Type): Similarly for YYLTYPE.
2594 * tests/regression.at (Trivial grammars): Put in a test for this
2595 bug that will be caught by 'make maintainer-check' (though not,
2596 alas, by 'make check' unless your compiler is picky).
2597
2598 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
2599
2600 * NEWS: Version 2.2.
2601 * configure.ac (AC_INIT): Likewise.
2602
2603 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
2604
2605 * data/glr.c (yyreportTree): Make room in yystates for the state
2606 preceding the RHS. This fixes the segmentation fault reported by Derek
2607 M. Jones in
2608 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
2609 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
2610 to the user. Reported for yyreportTree by Derek M. Jones later in the
2611 same thread.
2612 * THANKS: Add Derek M. Jones.
2613 Update my email address.
2614 Fix typo in Steve Murphy's name.
2615
2616 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
2617
2618 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
2619 checking against YYLAST that caused the parser to miss a potential
2620 alternative in its diagnostic.
2621 Problem reported by Maria Jose Moron Fernandez in
2622 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
2623 * data/lalr1.cc (yysyntax_error_): Likewise.
2624 * data/yacc.c (yysyntax_error): Likewise.
2625 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
2626 tokens, in case we run into an older C compiler.
2627 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
2628 Use them to check for the off-by-one error fixed above.
2629
2630 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
2631 YYSIZE_T, not size_t.
2632 * tests/regression.at (Trivial grammars): New test, to catch
2633 the error fixed by the above patch.
2634
2635 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2636
2637 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
2638 scheme.
2639 Reported by Steve Murphy.
2640
2641 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2642
2643 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
2644 * data/glr.cc: b4_location_flag is now b4_locations_flag.
2645
2646 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2647
2648 Implement --trace=m4.
2649 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
2650 * src/output.c (output_skeleton): When set, pass -dV to m4.
2651
2652 Factor the handling of flags in m4.
2653 * src/output.c (prepare): Rename the muscle names debug, defines,
2654 error_verbose to debug_flag, defines_flag, error_verbose_flag.
2655 * data/c.m4: Adjust.
2656 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
2657 Use b4_define_flag_if to define other b4_FLAG_if macros.
2658 (b4_location_if): As a consequence, rename as...
2659 (b4_locations_if): this, for consistency.
2660 Adjust all the skeletons.
2661
2662 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2663
2664 * etc/bench.pm: Shorten bench names.
2665
2666 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2667
2668 * src/output.h, src/output.c (error_verbose): Move to...
2669 * src/getargs.h, src/getargs.c: here.
2670 Sort the flags.
2671 Adjust dependencies.
2672
2673 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
2674
2675 * data/c.m4 (b4_copyright): Put the special exception for Bison
2676 skeletons here, so we don't have to put it in each skeleton. All
2677 uses changed. Suggested by Akim Demaille. Also, wrap the
2678 copyright notice, in case it is longer than 80 columns. Replace
2679 comma by newline after title.
2680
2681 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
2682
2683 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
2684 incompatibility, not a bug. Mention that it wasn't fixed as of
2685 flex 2.5.33.
2686
2687 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
2688
2689 * examples/extexi: Enforce the precedence of concatenation over
2690 >>.
2691 Reported by Tommy Nordgren.
2692
2693 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
2694
2695 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
2696 with the member "token".
2697 Reported by Martin Nylin.
2698
2699 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
2700
2701 * data/glr.c: Switch to Bison 2.2 special-exception language in
2702 the copyright notice. Use more-regular format for titles and
2703 copyright notices.
2704 * data/glr.cc: Likewise.
2705 * data/location.cc: Likewise.
2706 * data/yacc.cc: Likewise.
2707 * doc/bison.texinfo (Conditions): Document this.
2708 * NEWS: likewise. Upgrade version to 2.2.
2709
2710 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
2711
2712 * data/glr.cc: Remove dead code.
2713
2714 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2715
2716 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
2717 that variable and the line breaks the bootstrap. Problem reported
2718 by Juan M. Guerrero.
2719
2720 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
2721
2722 * doc/bison.texinfo (Multiple start-symbols): New.
2723
2724 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
2725
2726 * etc/README, etc/bench.pl: New.
2727
2728 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
2729
2730 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
2731 rule.
2732 Reported by Mickael Labau.
2733 * tests/input.at (Torturing the Scanner): Test it.
2734
2735 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
2736
2737 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
2738 Problem reported by Bob Rossi.
2739
2740 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
2741
2742 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
2743 and didn't really work.
2744 For the index, use @ifnotinfo, not @iftex.
2745 Minor cleanups of spacing and terminology.
2746
2747 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
2748
2749 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
2750 of AT_NAME_PREFIX when %name-prefix is not used.
2751
2752 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
2753
2754 Apply --prefix to C++ skeletons too: they change the namespace.
2755 The test suite already exercize these cases.
2756 * data/c++.m4 (b4_namespace): New.
2757 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
2758 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
2759 * data/yacc.c, data/glr.c: Remove a useless `[]'.
2760 * doc/bison.texinfo: Document it.
2761 (Option Cross Key): Use @multitable in all formats. It looks
2762 nicer, even in TeX outputs.
2763 (Rules): Use the same code whatever the output type is.
2764 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
2765 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
2766 * tests/calc.at: Use it, instead of hard coding `yy'.
2767
2768 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2769
2770 * TODO: Remove dead items.
2771
2772 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2773
2774 * doc/FAQ: Remove, merged into...
2775 * doc/bison.texinfo (FAQ): this.
2776 * doc/Makefile.am (EXTRA_DIST): Adjust.
2777
2778 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2779
2780 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
2781 even if empty.
2782 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
2783 * doc/bison.texinfo (Calc++ Scanner): Use it.
2784
2785 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
2786
2787 Fix two nits reported by twlevo, plus one more that I discovered.
2788
2789 * src/assoc.h (assoc_to_string): Give a name to the arg, as
2790 this is the usual Bison style.
2791 * src/location.h (location_print): Likewise.
2792
2793 * src/reader.h (token_name): Likewise.
2794
2795 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2796
2797 Fix some nits reported by twlevo.
2798 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
2799 and "POSIX". Use more-modern syntax for URLs. Mention C++
2800 and ask for Java. Don't hardwire OS version numbers. Add
2801 copyright notice.
2802 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
2803 * src/conflicts.c (solved_conflicts_obstack): Now static.
2804
2805 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2806
2807 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
2808 page. Say "you can use it" not "you may use it" as on the web page;
2809 we're describing capabilities not granting permission.
2810
2811 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
2812
2813 * data/glr.c (yyresolveLocations): Rename local variables to avoid
2814 shadowing warnings. Use usual patter for iterating through RHS.
2815 * tests/glr-regression.at
2816 (Uninitialized location when reporting ambiguity):
2817 Modify yylex so that it uses its argument, rather than trying
2818 to rely on ARGSUSED (which doesn't work for gcc with warnings).
2819 const char -> char const.
2820
2821 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
2822 Don't use tabs inside commands; it messes up 'ps'.
2823 Problem reported by twlevo.
2824
2825 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
2826
2827 * tests/glr-regression.at (Uninitialized location when reporting
2828 ambiguity): New test case.
2829 * data/glr.c (yyresolveLocations): New function, which uses
2830 YYLLOC_DEFAULT.
2831 (yyresolveValue): Invoke yyresolveLocations before reporting an
2832 ambiguity.
2833 * doc/bison.texinfo (Default Action for Locations): Note
2834 YYLLOC_DEFAULT's usage for ambiguity locations.
2835 (GLR Semantic Actions): Cross-reference those notes.
2836
2837 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
2838
2839 * tests/glr-regression.at (Leaked semantic values when reporting
2840 ambiguity): Remove unnecessary union and type declarations.
2841 (Leaked lookahead after nondeterministic parse syntax error): New test
2842 case.
2843 * data/glr.c (yyparse): Check for zero stacks remaining before
2844 attempting to shift the lookahead so that you don't lose it.
2845
2846 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2847
2848 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
2849 * tests/glr-regression.at (Leaked semantic values when reporting
2850 ambiguity): New test case.
2851 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
2852 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
2853 now unnecessary yystackp parameter.
2854 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
2855 destructors can be called.
2856
2857 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
2858 in existing testcases.
2859
2860 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2861
2862 Don't leak semantic values for parent RHS when a user action cuts the
2863 parser, and clean up related code a bit.
2864 * tests/glr-regression.at (Leaked merged semantic value if user action
2865 cuts parse): Rename to...
2866 (Leaked semantic values if user action cuts parse): ... this. Add check
2867 for leaked parent RHS values.
2868 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
2869 between an unresolved state (non-empty chain of semantic options) and
2870 an incomplete one (signaled by an empty chain).
2871 (yyresolveStates): Document the interface. Move all manipulation of a
2872 successfully or unsuccessfully resolved yyGLRState to...
2873 (yyresolveValue): ... here so that yyresolveValue always leaves a
2874 yyGLRState with consistent data and thus is easier to understand.
2875 Remove the yyvalp and yylocp parameters since they are always just
2876 taken from the yys parameter. When reporting a discarded merged value
2877 in debugging output, note that it is incompletely merged. Document the
2878 interface.
2879 (yyresolveAction): If resolving any of the RHS states fails, destroy
2880 them all rather than leaking them. Thus, as long as user actions are
2881 written to clean up the RHS correctly, yyresolveAction always cleans up
2882 the RHS of a semantic option. Document the interface.
2883
2884 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
2885
2886 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
2887 led to a segmentation fault in GNU Pascal. Problem reported
2888 by Waldek Hebisch.
2889
2890 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
2891
2892 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
2893 mid-rule action inside a nonterminal symbol in order to declare a
2894 destructor for its semantic value.
2895
2896 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
2897
2898 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
2899 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
2900 __cplusplus && ! defined _STDLIB_H && !
2901 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
2902 defined free))]: Include <stdlib.h> rather than rolling our own
2903 declarations of malloc and free, to avoid problems with
2904 incompatible declarations (using 'throw') C++'s stdlib.h. This
2905 should fix Debian bug 340012
2906 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
2907 reported by Guillaume Melquiond.
2908
2909 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2910
2911 * NEWS: Clarify symbols versus types in unused-value warnings.
2912
2913 * configure.ac (AC_INIT): Bump version number.
2914
2915 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2916
2917 * NEWS: Version 2.1a.
2918 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2919 since C99 requires this.
2920
2921 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2922
2923 * m4/c-working.m4: New file.
2924 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2925
2926 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2927
2928 * Makefile.maint: Merge from coreutils.
2929
2930 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2931
2932 More portability fixes for problems summarized by Nelson H. F. Beebe.
2933
2934 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2935 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2936 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2937 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2938 messes up because C++ code is compiled in 32-bit mode but linked
2939 in 64-bit mode.
2940
2941 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2942
2943 More portability fixes for problems summarized by Nelson H. F. Beebe.
2944
2945 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2946 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2947
2948 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2949 nodist_PROGRAMS, since we don't need to actually compile the
2950 example if we're just doing a plain 'make'. This avoids bothering
2951 the installer unnecessarily about problems due to weird C++
2952 compilers.
2953
2954 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2955
2956 More portability fixes for problems summarized by Nelson H. F. Beebe.
2957
2958 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2959 than #include "...", and compile with -I'.'. The old method was
2960 not portable, according to Posix and the C standard, and it does
2961 not work with Sun C 5.7, where previous #line directives affect
2962 the working directory used in later #include "..." directives.
2963
2964 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2965
2966 Various DJGGP specific issues in /djgpp
2967
2968 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2969
2970 More portability fixes for problems summarized by Nelson H. F. Beebe.
2971
2972 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2973 '#include <map>' works and that you can apply ++ to iterators.
2974
2975 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2976
2977 Work around portability problems summarized by Nelson H. F. Beebe in
2978 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2979
2980 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2981 that '#include <string>' works.
2982
2983 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2984 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2985 "warning: sorry: semantics of inline function static data `const
2986 unsigned char translate_table[262]' are wrong (you'll wind up with
2987 multiple copies)".
2988
2989 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2990 or, xor to not_, and_, or_, and xor_, respectively. This works
2991 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2992 random system header somewhere that includes the equivalent of
2993 <iso646.h>.
2994
2995 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2996 -E" works; it apparently doesn't work with PathScale EKO Compiler
2997 Suite Version 2.0.
2998
2999 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
3000
3001 During deterministic GLR operation, user actions should be able to
3002 influence the parse by changing yychar. To make this easier to fix and
3003 to make glr.c easier to evolve in general, don't maintain yytoken in
3004 parallel with yychar; just compute yytoken when needed.
3005 * tests/glr-regression.at (Incorrect lookahead during deterministic
3006 GLR): Check that setting yychar in a user action has the intended
3007 effect.
3008 * data/glr.c (yyGLRStack): Remove yytokenp member.
3009 (yyclearin): Don't set *yytokenp.
3010 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
3011 yychar rather than *yytokenp to determine the current lookahead.
3012 Compute yytoken locally when needed.
3013 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
3014 point to.
3015
3016 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
3017 after `--report' documentation.
3018
3019 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
3020
3021 * src/parse-gram.y (grammar_declaration): Location of printer
3022 symbol is @1, not list->location. Bug reported by twlevo.
3023 * tests/input.at (Incompatible Aliases): Adjust to above change.
3024
3025 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
3026
3027 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
3028 all the test at once. This makes the output easier to read in the
3029 normal case.
3030
3031 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
3032 got from <http://bro-ids.org/download.html>. The bug is that
3033 when two actions appeared in succession, the second one was
3034 scanned before the first one was added to the grammar rule
3035 as a midrule action. Bison then output the incorrect warning
3036 "parse.y:905.17-906.36: warning: unused value: $3".
3037 * src/parse-gram.y (BRACED_CODE, action): These are no longer
3038 associated with a value.
3039 (rhs): Don't invoke grammar_current_rule_action_append.
3040 (action): Invoke it here instead.
3041 * src/reader.c (grammar_midrule_action): Now extern.
3042 (grammar_current_rule_action_append): Don't invoke
3043 grammar_midrule_action; that is now the scanner's job.
3044 * src/reader.h (last_string, last_braced_code_loc):
3045 (grammar_midrule_action): New decls.
3046 * src/scan-gram.l (last_string): Now extern, sigh.
3047 (last_braced_code_loc): New extern variable.
3048 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
3049 rule already has an action.
3050 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
3051 * tests/input.at (AT_CHECK_UNUSED_VALUES):
3052 Add some tests to check that the above changes fixed the bug.
3053
3054 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
3055
3056 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
3057 All used changed. Check whether the symbol has a destructor,
3058 not whether it is typed.
3059 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
3060 that the values are still reported as unused. All line numbers
3061 adjusted.
3062
3063 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
3064
3065 Work around a bug in bro 0.8, which underparenthesizes its
3066 definition of YYLLOC_DEFAULT.
3067 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
3068 their arguments.
3069 * data/lalr1.cc: Likewise.
3070 * data/yacc.cc: Likewise.
3071
3072 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
3073
3074 Work around a bug in Pike 7.0, and give the Pike folks a
3075 better way to override the usual int widths.
3076 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
3077 user can override the types.
3078 (short): #undef, to work around a bug in Pike 7.0.
3079 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
3080 (union yyalloc.yyss): Use yytype_int16 rather than short.
3081 All uses changed.
3082 (yysigned_char): Remove.
3083 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
3084 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
3085 * tests/regression.at (Web2c Actions): Adjust to above changes.
3086
3087 * src/reader.c (check_and_convert_grammar): New function.
3088 (reader): Close the input file even if something went wrong during
3089 parsing. Minor file descriptor leak reported by twlevo.
3090
3091 * src/assoc.c (assoc_to_string): Use a default: abort (); case
3092 to pacify gcc -Wswitch-default.
3093 * src/scan-gram.l (adjust_location): Use a default: break; case
3094 to pacify gcc -Wswitch-default.
3095 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
3096 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3097 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3098 Move these decls to scan-skel.l, since they don't need to be
3099 visible elsewhere.
3100 * src/scan-skel.l: Accept the above decls.
3101 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
3102 is used.
3103
3104 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
3105
3106 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
3107 since we don't want to insist on a version number at the start
3108 of the changelog every time.
3109 * Makefile.maint: Sync from coreutils a bit better.
3110 (sc_trailing_blank): Renamed from sc_trailing_space.
3111 All uses changed.
3112 (sc_no_if_have_config_h, sc_require_config_h):
3113 (sc_prohibit_assert_without_use): New rules.
3114 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
3115 (sc_dd_max_sym_length): Fix leading spaces in rule.
3116 (sc_system_h_headers): Prefix with @.
3117 (sc_useless_cpp_parens, m4-check): Output line numbers.
3118 (changelog-check): Allow version only in head.
3119 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
3120 satisfy new Makefile.maint rule.
3121 * data/glr.c: Likewise.
3122 * data/glr.cc: Likewise.
3123 * data/lalr1.cc: Likewise.
3124 * data/yacc.c: Likewise.
3125 * lib/ebitsetv.c: Likewise.
3126 * lib/lbitset.c: Likewise.
3127 * lib/subpipe.c: Likewise.
3128 * lib/timevar.c: Likewise.
3129 * src/system.h: Likewise.
3130 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
3131 * djgpp/Makefile.maint: Add copyright notice.
3132 * djgpp/README.in: Likewise.
3133 * djgpp/config.bat: Likewise.
3134 * djgpp/config.site: Likewise.
3135 * djgpp/config_h.sed: Likewise.
3136 * djgpp/djunpack.bat: Likewise.
3137 * djgpp/config.sed: Fix copyright notice to match standard format.
3138 * djgpp/subpipe.h: Likewise.
3139 * lib/bitsetv-print.c: Likewise.
3140 * lib/bitsetv.c: Likewise.
3141 * lib/subpipe.h: Likewise.
3142 * lib/timevar.c: Likewise.
3143 * lib/timevar.h: Likewise.
3144 * djgpp/subpipe.c: Use standard recipe for config.h.
3145 * lib/abitset.c: Likewise.
3146 * lib/bitset.c: Likewise.
3147 * lib/bitset_stats.c: Likewise.
3148 * lib/bitsetv-print.c: Likewise.
3149 * lib/bitsetv.c: Likewise.
3150 * lib/ebitsetv.c: Likewise.
3151 * lib/get-errno.c: Likewise.
3152 * lib/lbitset.c: Likewise.
3153 * lib/subpipe.c: Likewise.
3154 * lib/timevar.c: Likewise.
3155 * lib/vbitset.c: Likewise.
3156 * tests/local.at: Likewise.
3157 * src/scan-gram.l: Don't include verify.h, since system.h does
3158 that for us.
3159 * .x-sc_require_config_h: New file.
3160 * .x-sc_unmarked_diagnostics: New file.
3161
3162 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
3163
3164 Be a bit more systematic about using 'abort'.
3165 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
3166 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
3167 Put 'default: abort ();' before some other case, to satisfy older
3168 pedantic compilers.
3169 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3170 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
3171 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
3172 * src/conflicts.c (resolve_sr_conflict): Likewise.
3173 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
3174 (get_decision_str, get_orientation_str, get_node_alignment_str):
3175 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
3176 (get_linestyle_str, get_arrowstyle_str): Likewise.
3177 * src/conflicts.c (resolve_sr_conflict):
3178 Use a default case rather than one for the one remaining enum
3179 value, to catch invalid enum values as well.
3180 * src/lalr.c (set_goto_map, map_goto):
3181 Prefer "assert (FOO);" to "if (!FOO) abort ();".
3182 * src/nullable.c (nullable_compute, token_definitions_output):
3183 Likewise.
3184 * src/reader.c (packgram, reader): Likewise.
3185 * src/state.c (transitions_to, state_new, state_reduction_find):
3186 Likewise.
3187 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
3188 (symbol_pack): Likewise.
3189 * src/tables.c (conflict_row, pack_vector): Likewise.
3190 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
3191 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
3192 * src/system.h: Don't include <assert.h>.
3193 (assert): New macro.
3194
3195 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
3196 (Destructor Decl, Parser Function, Pure Calling):
3197 Describe rules for braces inside C code more carefully.
3198
3199 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
3200
3201 Fix some porting glitches found by Nelson H. F. Beebe.
3202 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
3203 compilers that don't understand that abort () does not return.
3204 * src/state.c (transitions_to): Likewise.
3205 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
3206 that '#include <cstdlib>' works.
3207 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
3208 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
3209 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
3210 for the benefit of some pre-C99 compilers.
3211
3212 * bootstrap: Undo changes to gnulib files that autoreconf made.
3213
3214 Minor fixups to get 'make maintainer-check' to work.
3215 * configure.ac: Don't use -Wnested-externs, as it's incompatible
3216 with the new verify.h implementation.
3217 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
3218 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
3219 * data/yacc.c (YYUSE): Likewise.
3220 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
3221 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
3222 * src/parse-gram.y (declaration): Don't pass a string constant
3223 to a function that expects char *, since GCC might complain
3224 about the constant value.
3225 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
3226 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
3227 before #defining them.
3228 * tests/glr-regression.at
3229 (Incorrectly initialized location for empty right-hand side in GLR):
3230 In yyerror, use the msg arg.
3231 (Corrupted semantic options if user action cuts parse):
3232 (Incorrect lookahead during deterministic GLR):
3233 (Incorrect lookahead during nondeterministic GLR):
3234 Don't name a local var 'index'; it shadows string.h's 'index'.
3235
3236 2006-01-19 Akim Demaille <akim@epita.fr>
3237
3238 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
3239 location, not just parts of it.
3240
3241 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
3242
3243 * NEWS: Document the fact that multiple %unions are now allowed.
3244 * doc/bison.texinfo (Union Decl): Likewise.
3245 * TODO: This feature is now implemented, so remove it from
3246 the wishlist.
3247
3248 * Makefile.maint: Merge with coreutils Makefile.maint.
3249 (CVS_LIST): Use build-aux version if available.
3250 (VERSION_REGEXP): New macro.
3251 (syntax-check-rules): Add sc_no_if_have_config_h,
3252 sc_prohibit_assert_without_use, sc_require_config_h,
3253 sc_useless_cpp_parens.
3254 (sc_obsolete_symbols): Check for O_NDELAY.
3255 (sc_dd_max_sym_length): Track coreutils.
3256 (sc_unmarked_diagnostics): Look in all files, not just *.c.
3257 (sc_useless_cpp_parens): New rule.
3258 (news-date-check): Look for version or today's date.
3259 (changelog-check): Don't require version number near head.
3260 (copyright-check): Use current year instead of hardwiring 2005.
3261 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
3262 (announcement): Add --gpg-key-ID.
3263
3264 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
3265 with "file system".
3266
3267 Avoid undefined behavior that addressed just before the start of an
3268 array. Problem reported by twlevo.
3269 * src/reader.c (packgram): Prepend a new sentinel before ritem.
3270 * src/lalr.c (build_relations): Rely on new sentinel.
3271 * src/gram.c (gram_free): Adjust to new sentinel.
3272
3273 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
3274
3275 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
3276 yylookaheadNeeds. All uses updated.
3277 (yysplitStack): Rename local yynewLookaheadStatuses to
3278 yynewLookaheadNeeds.
3279 * data/glr-regression.at (Incorrect lookahead during nondeterministic
3280 GLR): In comments, change `lookahead status' to `lookahead need'.
3281
3282 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3283
3284 * data/glr.c (yysplitStack): A little stylistic rewrite.
3285
3286 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3287
3288 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
3289
3290 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
3291
3292 * doc/bison.texinfo: Fix some typos.
3293 (GLR Semantic Actions): New subsection discussing special
3294 considerations because GLR semantic actions might be deferred.
3295 (Actions): Mention look-ahead usage of yylval.
3296 (Actions and Locations): Mention look-ahead usage of yylloc.
3297 (Special Features for Use in Actions): Add YYEOF entry and mention it
3298 in the yychar entry.
3299 In the yychar entry, remove mention of the local yychar case (pure
3300 parser) since this is irrelevant information when writing semantic
3301 actions and since it's already discussed in `Bison Symbols' where
3302 yychar is otherwise described as an external variable.
3303 In the yychar entry, don't call it the `current' look-ahead since it
3304 isn't when semantic actions are deferred.
3305 In the yychar and yyclearin entries, add note about deferred semantic
3306 actions.
3307 Add yylloc and yylval entries discussing look-ahead usage.
3308 (Look-Ahead Tokens): When discussing yychar, don't call it the
3309 `current' look-ahead, and do mention yylval and yylloc.
3310 (Error Recovery): Cross-reference `Action Features' when mentioning
3311 yyclearin.
3312 (Bison Symbols): In the yychar entry, don't call it the `current'
3313 look-ahead.
3314 In the yylloc and yylval entries, mention look-ahead usage.
3315
3316 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3317
3318 * tests/glr-regression.at: Update copyright year to 2006.
3319
3320 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3321
3322 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
3323 use during nondeterministic operation to track which stacks have
3324 actually needed the current lookahead.
3325 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
3326 Allocate, deallocate, resize, and otherwise shuffle space for
3327 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
3328 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
3329 appropriately during nondeterministic operation.
3330 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
3331 members to store the current lookahead to be used by the deferred
3332 user action.
3333 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
3334 from which the RHS is taken. Set the lookahead members of the new
3335 yySemanticOption according to the lookahead status for stack yyk.
3336 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
3337 yyaddDeferredAction.
3338 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
3339 members of yySemanticOption before invoking yyuserAction, and then set
3340 them back to their current values afterward.
3341 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
3342 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
3343 * tests/glr-regression.at: Remove `.' from the ends of recent test case
3344 titles for consistency.
3345 (Leaked merged semantic value if user action cuts parse): In order to
3346 suppress lint warnings, use arguments in merge function, and assign
3347 char value < 128 in main.
3348 (Incorrect lookahead during deterministic GLR): New test case.
3349 (Incorrect lookahead during nondeterministic GLR): New test case.
3350
3351 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3352
3353 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
3354 !yyvaluep as signal that no semantic value is available to print.
3355 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
3356 to print a semantic value.
3357
3358 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3359
3360 * tests/glr-regression.at: For consistency with my newer test cases,
3361 don't thank myself.
3362
3363 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
3364
3365 * data/glr.c (yyresolveValue): When merging semantic options, if at
3366 least one user action succeeds but a later one cuts the parse, then
3367 destroy the semantic value before returning rather than leaking it.
3368 (yyresolveStates): If a user action cuts the parse and thus
3369 yyresolveValue fails, ignore the (unset) semantic value rather than
3370 corrupting the yyGLRState, and empty the semantic options list since
3371 the user actions should have called all necessary destructors.
3372 Simplify code with YYCHK.
3373 * tests/glr-regression.at (Corrupted semantic options if user action
3374 cuts parse): New test case.
3375 (Undesirable destructors if user action cuts parse): New test case.
3376 Before applying any of this patch, this test case never actually failed
3377 for me... but only because the corrupted semantic options usually
3378 masked this bug.
3379 (Leaked merged semantic value if user action cuts parse): New test
3380 case.
3381
3382 2006-01-05 Akim Demaille <akim@epita.fr>
3383
3384 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
3385
3386 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
3387
3388 * data/c.m4 (b4_c_modern): New macro, with a new provision for
3389 _MSC_VER. Problem reported by Cenzato Marco.
3390 (b4_c_function_def): Use it.
3391 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
3392 b4_c_modern.
3393 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
3394 than rolling our own.
3395
3396 2006-01-04 Akim Demaille <akim@epita.fr>
3397
3398 Also warn about non-used mid-rule values.
3399 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
3400 member.
3401 (symbol_list_new): Adjust.
3402 * src/reader.c (symbol_typed_p): New.
3403 (grammar_rule_check): Use it.
3404 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
3405 Check its rule.
3406 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
3407 Use it.
3408 * tests/actions.at (Exotic Dollars): Adjust.
3409
3410 2006-01-04 Akim Demaille <akim@epita.fr>
3411
3412 * src/reader.c (grammar_midrule_action): If $$ is set in a
3413 mid-rule, move the `used' bit to its lhs.
3414 * tests/input.at (Unused values): New.
3415 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
3416
3417 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
3418
3419 * doc/bison.texinfo (Bison Options): Say more accurately what
3420 --yacc does.
3421 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
3422 about declarations in the grammar when in Yacc mode, as POSIX does
3423 not require a diagnostic when the grammar uses extensions.
3424
3425 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
3426
3427 Warn about dubious constructions like "%token T T".
3428 Reported by twlevo.
3429 * src/symtab.h (struct symbol.declared): New member.
3430 * src/symtab.c (symbol_new): Initialize it to false.
3431 (symbol_class_set): New arg DECLARING, specifying whether
3432 this is a declaration that we want to warn about, if there
3433 is more than one of them. All uses changed.
3434
3435 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
3436 Allow multiple %union directives, whose contents concatenate.
3437 * src/parse-gram.y (grammar_declaration): Likewise.
3438 Use muscle_code_grow, so that we don't need stype_line any more.
3439 All uses changed.
3440
3441 * src/muscle_tab.c (muscle_grow): Fix comment.
3442
3443 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
3444 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
3445 Update copyright year to 2006.
3446
3447 2006-01-03 Akim Demaille <akim@epita.fr>
3448
3449 Have glr.cc pass (some of) the calc.at tests.
3450 * data/glr.cc (b4_parse_param_orig): New.
3451 (b4_parse_param): Improve its definition, and bound it more
3452 clearly in the skeleton.
3453 (b4_epilogue): Append, instead of prepending, in order to keep
3454 #line consistency.
3455 Simplify the generation of auxiliary functions: locations and
3456 purity are mandated.
3457 (b4_global_tokens_and_yystype): Honor it.
3458 * data/location.cc (c++.m4): Don't include it.
3459 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
3460 and AT_SKEL_CC_IF.
3461 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
3462 AT_LALR1_CC_IF.
3463 Be sure to initialize the first position's filename.
3464 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
3465 mandated anyway.
3466 (AT_CHECK_CALC_GLR_CC): New.
3467 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
3468
3469 2006-01-02 Akim Demaille <akim@epita.fr>
3470
3471 * src/output.c (output_skeleton): Don't hard wire the inclusion of
3472 c.m4.
3473 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3474 * data/glr.cc: Do not include stack.hh.
3475
3476 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3477
3478 * data/glr.c: Reformat whitespace with tabs.
3479 (b4_lpure_formals): Remove this unused m4 macro.
3480 * tests/cxx-type.at: Reformat whitespace with tabs.
3481 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
3482 since it's a member. Rename type to isNterm for clarity.
3483
3484 2005-12-29 Akim <akim@sulaco.local>
3485
3486 Let glr.cc catch up with symbol_value_print.
3487 * data/glr.cc (b4_yysymprint_generate): Replace by...
3488 (b4_yy_symbol_print_generate): this.
3489 (yy_symbol_print, yy_symbol_value_print): Declare them.
3490
3491 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
3492
3493 * src/location.h (boundary): Note that a line or column equal
3494 to INT_MAX indicates an overflow.
3495 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
3496 (rule_length_overflow, increment_rule_length, add_column_width):
3497 New functions.
3498 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
3499 (<SC_BRACED_CODE>"}"):
3500 Use increment_rule_length rather than incrementing it by hand.
3501 (adjust_location, handle_syncline): Diagnose overflow.
3502 (handle_action_dollar, handle_action_at):
3503 Fix bug with monstrosities like $-2147483648.
3504 Remove now-unnecessary checks.
3505 (scan_integer): Verify assumptions and remove now-unnecessary checks.
3506 (convert_ucn_to_byte): Verify assumptions.
3507 (handle_syncline): New arg LOC. All callers changed.
3508 Don't store through a value derived from char const * pointer.
3509
3510 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
3511 GCC warnings.
3512
3513 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
3514
3515 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
3516 Remove unnecessary forward static decls.
3517
3518 2005-12-27 Akim Demaille <akim@epita.fr>
3519
3520 * src/reader.c (grammar_current_rule_check): Also check that $$
3521 is used.
3522 Take the rule to check as argument, hence rename as...
3523 (grammar_rule_check): this.
3524 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
3525 Rename as...
3526 (grammar_rule_begin, grammar_rule_end): these, for consistency.
3527 (grammar_midrule_action, grammar_symbol_append): Now static.
3528 * tests/torture.at (input): Don't rely on the default action
3529 being always performed.
3530 * tests/calc.at: "Set" $$ even when the action is "cut" with
3531 YYERROR or other.
3532 * tests/actions.at (Exotic Dollars): Instead of using unused
3533 values, check that the warning is issued.
3534
3535 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
3536
3537 * NEWS: Improve wording for unused-value warnings.
3538
3539 2005-12-22 Akim Demaille <akim@epita.fr>
3540
3541 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
3542 (b4_yysymprint_generate): Rename as...
3543 (b4_yy_symbol_print_generate): this.
3544 Generate yy_symbol_print instead of yysymprint.
3545 Generate also yy_symbol_value_print, and use it.
3546
3547 2005-12-22 Akim Demaille <akim@epita.fr>
3548
3549 * NEWS: Warn about unused values.
3550 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
3551 a `used' member.
3552 (symbol_list_n_get, symbol_list_n_used_set): New.
3553 (symbol_list_n_type_name_get): Use symbol_list_n_get.
3554 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
3555 * src/reader.c (grammar_current_rule_check): Check that values are
3556 used.
3557 * src/symtab.c (symbol_print): Accept 0.
3558 * tests/existing.at: Remove the type information.
3559 Empty the actions.
3560 Remove useless actions (beware of mid-rule actions: perl -000
3561 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
3562 * tests/actions.at (Exotic Dollars): Use unused values.
3563 * tests/calc.at: Likewise.
3564 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3565 Likewise.
3566
3567 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
3568 rule_useful_p.
3569
3570 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
3571
3572 Undo 2005-12-01 tentative license wording change. The wording is
3573 still being reviewed by the lawyers, and we don't want to wait for
3574 them before publishing a test release. For now, revert to the
3575 previous wording.
3576 * NEWS: Undo 2005-12-01 change.
3577 * data/glr.c: Revert to previous license wording.
3578 * data/glr.cc: Likewise.
3579 * data/lalr1.cc: Likewise.
3580 * data/location.cc: Likewise.
3581 * data/yacc.c: Likewise.
3582
3583 * NEWS: Reword %destructor vs YYABORT etc.
3584 * data/glr.c: Use American spacing, for consistency.
3585 * data/glr.cc: Likewise.
3586 * data/lalr1.cc: Likewise.
3587 * data/yacc.c: Likewise.
3588 * data/yacc.c: Reformat comments slightly.
3589 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
3590 for consistency. Fix some spelling errors and reword recently-included
3591 text slightly.
3592 * tests/cxx-type.at: Cast results of malloc, for C++.
3593
3594 2005-12-21 Joel E. Denny <address@hidden>
3595
3596 * tests/cxx-type.at: Construct a tree, count the parents of shared
3597 nodes, and free each node once and only once. Previously, the memory
3598 for semantic values was leaked instead.
3599
3600 2005-12-21 Joel E. Denny <address@hidden>
3601
3602 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
3603 (yylval, yylloc): If pure, #define to yystackp->yyval and
3604 yystackp->yyloc similar to yychar and yynerrs.
3605 (yyparse): If pure, remove local yylval and yylloc. Add local
3606 yystackp to accommodate pure definitions of yylval and yylloc.
3607 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
3608 yylvalp and yyllocp to &yylval and &yylloc.
3609 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
3610 namespace. Previously, nerrs and char were missing, but lval and lloc
3611 weren't necessary.
3612 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
3613 yylvalp and yyllocp parameters since, if pure, these are now always
3614 accessible through yystackp. If not pure, they are still accessible
3615 globally.
3616 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
3617 `if (YYID (N))' to pacify lint.
3618
3619 2005-12-21 Akim Demaille <akim@epita.fr>
3620
3621 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
3622 destroy the RHS symbols of a rule.
3623 * data/yacc.c (yylen): Initialize to 0.
3624 Keep its value to the number of items to possibly shift.
3625 In particular, a regular successful parse that ends on YYFINAL by
3626 a (internal) YYACCEPT must not have yylen != 0.
3627 (yyerrorlab, yyreturn): Pop the RHS.
3628 Reorder a bit to emphasize the `shifting' bits of code.
3629 (YYPOPSTACK): Now accept a number of items to pop.
3630 * data/lalr1.cc: Likewise.
3631 * data/glr.c: Formatting changes.
3632 Use goto instead of fall through.
3633 * doc/bison.texinfo (Destructor Decl): Complete.
3634
3635 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3636
3637 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3638 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
3639 * djgpp/config.bat: Replace every occurence of the file name
3640 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
3641 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
3642 * djgpp/config.sed: Replace every occurence of the file name
3643 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
3644 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
3645 * djgpp/djunpack.bat: DJGPP specific file.
3646 * djgpp/fnchange.lst: DJGPP specific file.
3647 * djgpp/README.in: Add new information about how to unpack the bison
3648 source on MSDOS and other systems which have 8.3 file name restrictions
3649 using djunpack.bat and fnchange.lst.
3650
3651 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
3652
3653 * bootstrap (build_cvs_prefix): Remove; unused.
3654 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
3655 when getting gnulib.
3656
3657 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
3658
3659 * data/glr.c: Reorder typedef declarations for structs to match order
3660 of struct declarations.
3661 Rename yystack everywhere to yystackp except in yyparse where it's not
3662 a pointer.
3663 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
3664 consistency.
3665 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
3666 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
3667 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
3668 lint.
3669
3670 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
3671
3672 * tests/sets.at (Accept): Fix typos in regular expression used to
3673 sed out the final state number.
3674
3675 Work around portability problem on Solaris 10: flex-generated
3676 files include <stdio.h> before <config.h>, which messes up
3677 because the latter defines __EXTENSIONS__. Address the problem
3678 by creating two new little files that include <config.h> first,
3679 then include the flex-generated files. Rewrite everyone else
3680 to include <config.h> first, as well.
3681 * lib/timevar.c: Always include "config.h".
3682 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
3683 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
3684 (EXTRA_bison_SOURCES): New macro.
3685 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
3686 * src/system.h: Don't include config.h.
3687 * src/LR0.c: Include <config.h> first.
3688 * src/assoc.c: Likewise.
3689 * src/closure.c: Likewise.
3690 * src/complain.c: Likewise.
3691 * src/conflicts.c: Likewise.
3692 * src/derives.c: Likewise.
3693 * src/files.c: Likewise.
3694 * src/getargs.c: Likewise.
3695 * src/gram.c: Likewise.
3696 * src/lalr.c: Likewise.
3697 * src/location.c: Likewise.
3698 * src/main.c: Likewise.
3699 * src/muscle_tab.c: Likewise.
3700 * src/nullable.c: Likewise.
3701 * src/output.c: Likewise.
3702 * src/parse-gram.y: Likewise.
3703 * src/print.c: Likewise.
3704 * src/print_graph.c: Likewise.
3705 * src/reader.c: Likewise.
3706 * src/reduce.c: Likewise.
3707 * src/relation.c: Likewise.
3708 * src/state.c: Likewise.
3709 * src/symlist.c: Likewise.
3710 * src/symtab.c: Likewise.
3711 * src/tables.c: Likewise.
3712 * src/uniqstr.c: Likewise.
3713 * src/vcg.c: Likewise.
3714
3715 * src/parse-gram.y: Fix minor problems uncovered by lint.
3716 (current_lhs, current_lhs_location): Now static.
3717 (current_assoc): Remove unused variable.
3718
3719 Cleanups so that Bison-generated parsers have less lint.
3720 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
3721 Prepend /*ARGSUSED*/, for lint's sake.
3722 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
3723 definition if 'lint' is defined.
3724 (YYID): New macro (or function, if lint).
3725 All uses of /*CONSTCOND*/0 replaced by YYID(0).
3726 * data/yacc.c: Likewise.
3727 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
3728 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
3729 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
3730 is C++ only.
3731 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
3732 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
3733 Use YYID(0) rather than 0, for lint.
3734 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
3735 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
3736
3737 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3738
3739 * tests/glr-regression.at
3740 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3741 Close memory leak reported by twlevo.
3742
3743 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
3744
3745 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
3746 all stacks.
3747 (yyparse): Iterate another stack in order to call user destructors.
3748 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3749 New test case.
3750 (Duplicated user destructor for lookahead): This test now is expected
3751 to succeed.
3752
3753 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
3754
3755 * NEWS: Document the following change.
3756 * data/yacc.c: Say "parser skeleton" rather than "file", since
3757 it's no longer just a file.
3758 * data/glr.c: Grant a special exception for C GLR parsers, that
3759 reads like the already-existing exception for C LALR(1) parsers.
3760 * data/glr.cc: Likewise.
3761 * data/lalr1.cc: Likewise.
3762 * data/location.cc: Likewise.
3763 * data/yacc.c: Reword the "written by" statement to clarify that
3764 it was the parser skeleton, not the entire output file.
3765 * data/glr.c: Written by Paul Hilfinger.
3766 * data/glr.cc: Written by Akim Demaille.
3767 * data/lalr1.cc: Likewise.
3768
3769 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3770
3771 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
3772 Fix typos in previous change that broke 'make check'.
3773 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
3774 supported in C.
3775 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
3776 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
3777 We can revert this once things settle down.
3778
3779 * src/conflicts.c (conflicts_print): Don't print file name twice
3780 when %expect fails because there were no conflicts.
3781 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
3782 change.
3783 * tests/conflicts.at (%expect not enough, %expect too much):
3784 (%expect with reduce conflicts): Adjust to new behavior.
3785
3786 2005-11-18 Akim Demaille <akim@epita.fr>
3787
3788 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
3789 errors.
3790 * NEWS: Document this.
3791 * doc/bison.texinfo (Expect Decl): Likewise.
3792
3793 2005-11-16 Akim Demaille <akim@epita.fr>
3794
3795 Generalize the display of semantic values and locations in traces.
3796 * data/glr.c (yy_reduce_print): Fix indices (again).
3797 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
3798 literal integers.
3799 * data/lalr1.cc (yyreduce_print): Rename as...
3800 (yy_reduce_print): this.
3801 Display values and locations.
3802 * data/yacc.c (yy_reduce_print): Likewise.
3803 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
3804 (yysymprint): Move higher to be visible from yy_reduce_print).
3805 (yyparse): Adjust.
3806 * tests/calc.at: Adjust the expected length of the traces.
3807
3808 2005-11-14 Akim Demaille <akim@epita.fr>
3809
3810 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
3811 from 1 to N, while values and location start at 0.
3812 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
3813
3814 2005-11-14 Akim Demaille <akim@epita.fr>
3815
3816 * data/glr.c (yy_reduce_print): Fix the $ number.
3817
3818 2005-11-14 Akim Demaille <akim@epita.fr>
3819
3820 "Use" parse parameters.
3821 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
3822 * data/glr.c, data/glr.cc: Use them.
3823 * data/glr.c (YYUSE): Have a C++ definition that supports
3824 non-pointer types.
3825
3826 2005-11-14 Akim Demaille <akim@epita.fr>
3827
3828 * data/glr.c (yyexpandGLRStack): Declare only if defined.
3829
3830 2005-11-14 Akim Demaille <akim@epita.fr>
3831
3832 * data/glr.cc: New.
3833 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
3834
3835 2005-11-12 Akim Demaille <akim@epita.fr>
3836
3837 Let position and location be PODs.
3838 * data/location.cc (position::initialize, location::initialize): New.
3839 (position::position, location::location): Define only if
3840 b4_location_constructors is defined.
3841 * data/lalr1.cc (b4_location_constructors): Define it for backward
3842 compatibility.
3843 * doc/bison.texinfo (Initial Action Decl): Use initialize.
3844
3845 2005-11-12 Akim Demaille <akim@epita.fr>
3846
3847 * data/lalr1.cc: Move the body of the ctor and dtor into the
3848 parser file (instead of the header).
3849 Wrap the implementations in a "namespace yy".
3850
3851 2005-11-12 Akim Demaille <akim@epita.fr>
3852
3853 Have glr.c include its header file when created.
3854 * data/glr.c (b4_shared_declarations): New.
3855 Output them verbatim in the parser if !%defines, otherwise
3856 output then in the header file, and include it instead.
3857
3858 2005-11-11 Akim Demaille <akim@epita.fr>
3859
3860 * data/glr.c: Comment changes.
3861
3862 2005-11-11 Akim Demaille <akim@epita.fr>
3863
3864 When yydebug, report semantic and location values for reductions.
3865 * data/glr.c (yy_reduce_print): Report the semantic values and the
3866 locations.
3867 (YY_REDUCE_PRINT): Adjust.
3868 (yyglrReduce): Use them.
3869 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
3870 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
3871 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
3872 traces.
3873
3874 2005-11-10 Akim Demaille <akim@epita.fr>
3875
3876 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
3877 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
3878 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
3879
3880 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
3881
3882 * m4/cxx.m4, examples/Makefile.am: Don't build
3883 examples/calc++ if no C++ compiler is available. (trivial change)
3884
3885 2005-11-09 Akim Demaille <akim@epita.fr>
3886
3887 * src/scan-skel.l: Use a couple of asserts.
3888
3889 2005-11-03 Akim Demaille <akim@epita.fr>
3890
3891 In some (weird) cases, the final state number is incorrect.
3892 Reported by Alexandre Duret-Lutz.
3893 * src/LR0.c (state_list_append): Remove the computation of
3894 final_state.
3895 (save_reductions): Do it here.
3896 (get_state): Alpha conversion.
3897 (generate_states): Use a for loop.
3898 * src/gram.h (item_number_is_rule_number)
3899 (item_number_is_symbol_number): New.
3900 * src/state.c: Use assert.
3901 * src/system.h: Include assert.h.
3902 * tests/sets.at (Accept): New.
3903
3904 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3905
3906 * data/glr.c (yyfill): Adjust comment.
3907 (yyresolveAction): Initialize default location properly
3908 for empty right-hand sides.
3909 (yydoAction): Ditto.
3910 Add comment explaining apparently dead code.
3911 * tests/glr-regression.at
3912 (Incorrectly initialized location for empty right-hand side in GLR):
3913 New test.
3914
3915 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3916
3917 * bootstrap (cleanup_gnulib): New function. Use it to clean up
3918 gnulib when interrupted. This fixes some race conditions and
3919 works around some portability problems (one noted by Paul
3920 Hilfinger).
3921
3922 2005-10-22 Akim <akim@epita.fr>
3923
3924 * Makefile.cfg: Adjust to config -> build-aux.
3925 Reported by twledo.
3926
3927 2005-10-21 Akim Demaille <akim@epita.fr>
3928
3929 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3930 the %parse-params.
3931 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3932 * data/yacc.c (b4_Pure_if): Rename as...
3933 (b4_yacc_pure_if): this.
3934 (YY_SYMBOL_PRINT, yyparse): Adjust.
3935 * doc/bison.texinfo: Formatting changes.
3936
3937 2005-10-21 Akim Demaille <akim@epita.fr>
3938
3939 Finish the transition config -> build-aux.
3940 * configure.ac, Makefile.am: Use build-aux.
3941 * config/prev-version, config/announce-gen, config/Makefile.am:
3942 Move to...
3943 * build-aux/prev-version, build-aux/announce-gen,
3944 * build-aux/Makefile.am: here.
3945
3946 2005-10-14 Akim Demaille <akim@epita.fr>
3947
3948 * examples/calc++/test: Use set -x only when VERBOSE.
3949
3950 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3951
3952 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3953 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3954
3955 2005-10-13 Akim Demaille <akim@epita.fr>
3956
3957 * src/scan-skel.l: Output the base name parts of the parser and
3958 header file names.
3959 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
3960 additional checks.
3961 Use this to exercise C++ outputs in subdirs.
3962 Reported by Oleg Smolsky.
3963
3964 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3965
3966 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3967 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3968 Problem reported by John P. Hartmann.
3969 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3970 already defined it.
3971
3972 2005-10-12 Akim Demaille <akim@epita.fr>
3973
3974 * src/parse-gram.y (version_check): Exit 63 to please missing
3975 (stands for "version mismatch).
3976 * tests/input.at, doc/bison.texinfo: Adjust.
3977
3978 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3979
3980 Work around portability problems with Visual Age C compiler
3981 (xlc and xlC_r) reported by John P. Hartmann.
3982 * data/location.cc (initial_column, initial_line): Remove.
3983 All uses replaced by 0 and 1.
3984 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3985 that xlc complains about.
3986 * src/scan-skel.l (skel_wrap): Likewise.
3987 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
3988 as __STDC__.
3989 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3990 __STDC_VERSION__. Use it everywhere instead of looking at
3991 __STDC__ and __cplusplus.
3992
3993 2005-10-10 Akim Demaille <akim@epita.fr>
3994
3995 * examples/calc++/test: Be quiet unless VERBOSE.
3996
3997 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3998
3999 * data/c.m4 (yydestruct, yysymprint):
4000 Use YYUSE instead of casting to void.
4001 * data/glr.c (YYUSE): New macro.
4002 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
4003 Use it instead of rolling our own.
4004 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
4005 (YYCHK1):
4006 Use /*CONSTCOND*/ to suppress lint warnings.
4007 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
4008 (YY_STACK_PRINT): Use 'false' not '0'.
4009 (YYUSE): New macro.
4010 (yysymprint_, yydestruct_): Use it instead of rolling our own.
4011 * data/yacc.c (YYUSE): New macro.
4012 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
4013 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
4014 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
4015
4016
4017 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
4018 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
4019
4020 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
4021
4022 Undo the parts of the unlocked-I/O change that substituted
4023 putc or puts for printf. This might hurt performance a bit,
4024 but some people prefer the printf style.
4025 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
4026 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
4027 All uses replaced by YYFPRINTF and YYDPRINTF.
4028 * data/yacc.c: Likewise.
4029 * lib/bitset.c (bitset_print): Likewise.
4030 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
4031 putc and puts.
4032 * lib/lbitset.c (debug_lbitset): Likewise.
4033 * src/closure.c (print_firsts, print_fderives): Likewise.
4034 * src/gram.c (grammar_dump): Likewise.
4035 * src/lalr.c (look_ahead_tokens_print): Likewise.
4036 * src/output.c (escaped_output): Likewise.
4037 (user_actions_output): Break apart two printfs.
4038 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
4039 * src/reduce.c (reduce_print): Likewise.
4040 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
4041 * src/system.h: Include unlocked-io.h rathe than stdio.h.
4042
4043 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
4044 Use assignments rather than casts-to-void to suppress
4045 unused-variable warnings. This pacifies 'lint'.
4046 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
4047 unused-variable warnings.
4048
4049 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4050
4051 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
4052
4053 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
4054
4055 Use unlocked I/O for a minor performance improvement on hosts like
4056 GNU/Linux and Solaris that support unlocked I/O. The basic idea
4057 is to use the gnlib unlocked-io module, and to prefer putc and
4058 puts to printf when either will work (since the latter doesn't
4059 come in an unlocked flavor).
4060 * bootstrap (gnulib_modules): Add unlocked-io.
4061 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
4062 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
4063 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
4064 and similarly for puts and putc and printf.
4065 * data/yacc.c: Likewise.
4066 * lib/bitset.c (bitset_print): Likewise.
4067 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
4068 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
4069 to printf.
4070 * lib/lbitset.c (debug_lbitset): Likewise.
4071 * src/closure.c (print_firsts, print_fderives): Likewise.
4072 * src/gram.c (grammar_dump): Likewise.
4073 * src/lalr.c (look_ahead_tokens_print): Likewise.
4074 * src/output.c (escaped_output): Likewise.
4075 (user_actions_output): Coalesce two printfs.
4076 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
4077 * src/reduce.c (reduce_print): Likewise.
4078 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
4079 * src/system.h: Include unlocked-io.h rather than stdio.h.
4080
4081 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
4082 this confuses xgettext.
4083
4084 2005-10-02 Akim Demaille <akim@epita.fr>
4085
4086 * bootstrap (gnulib_modules): Add strverscmp.
4087 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
4088 * m4/.cvsignore: Add strverscmp.m4.
4089 * src/parse-gram.y (%require): New token, new rule.
4090 (version_check): New.
4091 * src/scan-gram.l (%require): Adjust.
4092 * tests/input.at (AT_REQUIRE): New.
4093 Use it.
4094 * doc/bison.texinfo (Require Decl): New.
4095 (Calc++ Parser): Use %require.
4096
4097 2005-10-02 Akim Demaille <akim@epita.fr>
4098
4099 * data/location.cc: New.
4100
4101 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
4102 Akim Demaille <akim@epita.fr>
4103
4104 Make sure -odir/foo.cc creates dir/location.hh etc.
4105 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
4106 (spec_file_prefix, spec_verbose_file, spec_graph_file)
4107 (spec_defines_file): Now const.
4108 (dir_prefix): New.
4109 (short_base_name): Remove.
4110 * src/files.c: Adjust.
4111 (dirname.h): Include.
4112 (base_name): Don't prototype it.
4113 (finput): Remove, duplicates gram_in.
4114 (full_base_name, short_base_name): Replace by...
4115 (all_but_ext, all_but_tab_ext): these.
4116 (compute_base_names): Rename as...
4117 (compute_file_name_parts): this.
4118 Update to compute the new variables, including dir_prefix.
4119 Adjust dependencies.
4120 * src/output.c (prepare): Output them.
4121 * src/reader.c: Adjust to use gram_in, not finput.
4122 * src/scan-skel.l (@dir_prefix@): New.
4123
4124 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4125
4126 * lib/subpipe.c: New function end_of_output_subpipe() added
4127 to allow support for non-posix systems. This is a no-op function
4128 for posix systems.
4129
4130 * lib/subpipe.h: New function end_of_output_subpipe() added
4131 to allow support for non-posix systems. This is a no-op function
4132 for posix systems.
4133
4134 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
4135 handle the lack of pipe/fork functionality on non-posix systems.
4136
4137 * djgpp/Makefile.maint: DJGPP specific file.
4138
4139 * djgpp/README.in: DJGPP specific file.
4140
4141 * djgpp/config.bat: DJGPP specific configuration file.
4142
4143 * djgpp/config.sed: DJGPP specific configuration file.
4144
4145 * djgpp/config.site: DJGPP specific configuration file.
4146
4147 * djgpp/config_h.sed: DJGPP specific configuration file.
4148
4149 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
4150
4151 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
4152
4153 2005-10-02 Akim Demaille <akim@epita.fr>
4154
4155 * data/location.cc: New, extract from...
4156 * data/lalr1.cc: here.
4157 (location.hh): Include it after the user prologue, in case the
4158 filename type is defined by the user.
4159 Forward declation location and position before the pre-prologue.
4160 (yyresult_): Rename as...
4161 (yyresult): this, it's a local variable, not an attribute.
4162 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
4163
4164 2005-10-01 Akim Demaille <akim@epita.fr>
4165
4166 * examples/extexi: Restore the #line generation.
4167
4168 2005-09-30 Akim Demaille <akim@epita.fr>,
4169 Alexandre Duret-Lutz <adl@gnu.org>
4170
4171 Move the token type and YYSTYPE in the parser class.
4172 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
4173 (parser::token): New, from the moved free definition of tokens.
4174 (parser::semantic_value): Now a full definition instead of an
4175 indirection to YYSTYPE.
4176 (b4_post_prologue): No longer included in the header file, but
4177 in the implementation file.
4178 * doc/bison.texi (C+ Language Interface): Update.
4179 * src/parse-gram.y: Support unary %define.
4180 * tests/actions.at: Define global_tokens_and_yystype for backward
4181 compatibility until we update the tests.
4182 * tests/calc.at: Idem.
4183 (first_line, first_column, last_line, last_column): Define for lalr1.cc
4184 to simplify the code.
4185
4186 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
4187
4188 Port to SunOS 4.1.4, which lacks strtoul and strerror.
4189 Ah, the good old days! Problem reported by Peter Klein.
4190 * bootstrap (gnulib_modules): Add strerror, strtoul.
4191 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
4192 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
4193
4194 2005-09-29 Akim Demaille <akim@epita.fr>
4195
4196 * data/c.m4 (b4_error_verbose_if): New.
4197 * data/lalr1.cc: Use it.
4198 (YYERROR_VERBOSE_IF): Remove.
4199 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
4200 parser members, replaced by...
4201 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
4202 local variables.
4203 (yysyntax_error_): Takes the state number as argument.
4204 (yyreduce_print_): Use the argument yyrule, not the former
4205 attribute yyn_.
4206
4207 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
4208
4209 * bootstrap (gnulib_modules): Add verify.
4210 * lib/.cvsignore: Add verify.h.
4211 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
4212 * src/system.h (verify): Remove.
4213 Include verify.h instead.
4214 * src/tables.c (tables_generate): Use new API for 'verify'.
4215
4216 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
4217
4218 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
4219 local variables whose names begin with 'yy'.
4220 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4221 Trivial changes from Joel E. Denny.
4222
4223 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
4224 it itself.
4225 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
4226 don't use alloca any more.
4227
4228 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
4229 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
4230 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
4231 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
4232 to match yacc.c, to test more hosts.
4233
4234 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
4235
4236 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
4237 doesn't affect behavior.
4238 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
4239 Solaris, AIX, MSC.
4240 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
4241 This works a bit better with glibc, if user code has already included
4242 stdlib.h.
4243 * doc/bison.texinfo (Bison Parser): Document that users can't
4244 arbitrarily use malloc and free for other purposes. Document
4245 that <alloca.h> and <malloc.h> might be included.
4246 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
4247 user must declare alloca.
4248
4249 * HACKING (release): Forwarn the Translation Project about
4250 stable releses.
4251
4252 2005-09-20 Akim Demaille <akim@epita.fr>
4253
4254 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
4255
4256 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
4257
4258 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
4259 (YYSTACK_ALLOC_MAXIMUM): Use it.
4260 (yysyntax_error): New function.
4261 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
4262 multiple syntax errors are reported, and alloca is being used.
4263 Instead, reallocate buffers twice as big each time, so that
4264 we waste at most half the allocated memory. Start with a small
4265 (128-byte) buffer that will suffice in most cases anyway.
4266 Use yysyntax_error to do most of the work.
4267
4268 * doc/bison.texinfo (Error Reporting, Table of Symbols):
4269 yynerrs is the number of errors reported, not the number of
4270 errors encountered.
4271
4272 * tests/glr-regression.at (Duplicated user destructor for lookahead):
4273 Mark it as expected to fail.
4274 Cast result of malloc; problem reported by twlevo@xs4all.nl.
4275 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
4276 Don't start user-code symbols with "yy", to avoid name space problems.
4277
4278 2005-09-19 Akim Demaille <akim@epita.fr>
4279
4280 Remove the traits, failed experiment.
4281 It never proved useful, and anyway because of the current
4282 definition, it was not possible to have several specialization of
4283 this traits, making it useless.
4284 * data/lalr1.cc (yy:traits): Remove.
4285 Inline its definitions in the parser class.
4286
4287 2005-09-19 Akim Demaille <akim@epita.fr>
4288
4289 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
4290 least Mac OSX with a /usr/local install of gettext.
4291
4292 2005-09-19 Akim Demaille <akim@epita.fr>
4293
4294 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
4295 and yytoken for similarity with the other skeletons.
4296
4297 2005-09-19 Akim Demaille <akim@epita.fr>
4298
4299 * NEWS, configure.ac: update version number to 2.1a.
4300
4301 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
4302
4303 * NEWS: Version 2.1.
4304
4305 * NEWS: Remove notice of yytname change, since it was never in an
4306 official release.
4307 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
4308 diagnostic.
4309 * src/output.c (prepare): Likewise.
4310 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
4311 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
4312 is not defined. This is an awful hack, but it's enough for now.
4313 All callers changed.
4314 * tests/glr-regression-at (make_value): Args are const pointers now,
4315 to avoid GCC warning.
4316 (Duplicated user destructor for lookahead): New test. Currently
4317 skipped. It fails on my host but I'm not sure it'll always fail.
4318
4319 2005-09-16 Akim Demaille <akim@epita.fr>
4320
4321 * src/symtab.h (struct symbol): Declare the printer and destructor
4322 as const, to avoid accidental calls to free.
4323 (symbol_destructor_set, symbol_printer_set): Adjust.
4324 * src/symtab.c: Adjust.
4325
4326 2005-09-16 Akim Demaille <akim@epita.fr>
4327
4328 * data/c.m4 (b4_token_enums): New.
4329 (b4_token_defines): Rename as...
4330 (b4_token_enums_defines): this.
4331 (b4_token_defines): New, output only the #defines.
4332 * data/yacc.c, data/glr.c: Adjust.
4333 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
4334 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
4335 as default values.
4336
4337 2005-09-16 Akim Demaille <akim@epita.fr>
4338
4339 * data/lalr1.cc (yylex_): Remove, inline its code.
4340 (yyreport_syntax_error_): Remove, replaced by...
4341 (yysyntax_error_): this which returns a string and leaves to the
4342 caller the call to the users' error function.
4343 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
4344 Move from members of the parser object...
4345 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
4346 to local variables of the parse function.
4347
4348 2005-09-16 Akim Demaille <akim@epita.fr>
4349
4350 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
4351 since it's in Bison's name space.
4352
4353 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
4354
4355 * data/glr.c (yyresolveValue): Add default case to pacify
4356 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
4357
4358 * NEWS: Document when yyparse started to return 2.
4359 * doc/bison.texinfo (Parser Function): Document when yyparse
4360 returns 2.
4361
4362 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
4363 (b4_filename_type): Renamed back from b4_file_name_type. All uses
4364 changed.
4365 (class position): file_name -> filename (reverting). All uses changed.
4366
4367 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
4368
4369 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
4370 do anything if $@ exists. This reverts part of the 2005-07-07
4371 patch.
4372
4373 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
4374
4375 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
4376 contains obsolete information and isn't worth distributing as a
4377 separate file anyway.
4378 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
4379 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
4380 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
4381 (yyparse): Abort if user code uses longjmp to throw an unexpected
4382 value.
4383
4384 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
4385
4386 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
4387 Suggested by twlevo@xs4all.nl.
4388
4389 * data/glr.c (YYCHK1): Do not assume YYE is in range.
4390 This avoids a diagnostic from gcc -Wswitch-enum.
4391 Problem reported by twlevo@xs4all.nl.
4392
4393 * doc/bison.texinfo: Don't use "filename", as per GNU coding
4394 standards. Use "file name" or "file" or "name", depending on
4395 the context.
4396 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
4397 not to hack/foo.tab.c.
4398 (Calc++ Top Level): 2nd arg of main is not const.
4399 * data/glr.c: b4_filename -> b4_file_name.
4400 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
4401 All uses changed.
4402 (class position): filename -> file_name. All uses changed.
4403 * data/yacc.c: b4_filename -> b4_file_name.
4404 * lib/bitset.h: filename -> file_name in local vars.
4405 * lib/bitset_stats.c: Likewise.
4406 * src/files.c: Likewise.
4407 * src/scan-skel.l ("@output ".*\n): Likewise.
4408 * src/files.c (file_name_split): Renamed from filename_split.
4409 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
4410
4411 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
4412
4413 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
4414 to accommodate latest gnulib.
4415
4416 * tests/glr-regression.at (Duplicate representation of merged trees):
4417 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
4418
4419 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
4420 needed.
4421
4422 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
4423
4424 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
4425 All uses changed. Invoke user destructor after an error during a
4426 split parse (trivial change from Joel E. Denny).
4427
4428 * tests/glr-regression.at
4429 (User destructor after an error during a split parse): New test case.
4430 Problem reported by Joel E. Denny in:
4431 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
4432
4433 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
4434
4435 * README-cvs: Give URLs for recommended tools.
4436 Mention Gzip version problem, and bootstrapping issues.
4437 Remove troubleshooting section, as it's somewhat obsolete.
4438
4439 * bootstrap (no_cache): New var, to accommodate different wget
4440 variants. Use it instead of '-C off'. Problem reported by
4441 twlevo@xs4all.nl.
4442
4443 * data/glr.c (yydestroyStackItem): New function.
4444 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
4445 debugging information. Problem reported by Joel E. Denny.
4446
4447 2005-08-25 Akim Demaille <akim@epita.fr>
4448
4449 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
4450
4451 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
4452
4453 * data/glr.c (yyrecoverSyntaxError, yyreturn):
4454 Don't invoke destructor on unresolved entries.
4455 * tests/glr-regression.at
4456 (User destructor for unresolved GLR semantic value): New test case.
4457 Problem reported by Joel E. Denny in:
4458 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
4459
4460 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
4461
4462 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
4463 Add strnlen.c.
4464 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
4465 lib-prefix.m4, po.m4.
4466
4467 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
4468 in yydestruct diagnostic, since it might not be an error.
4469 Problem reported by Joel Denny near end of
4470 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
4471 * data/lalr1.cc (yyerturn): Likewise.
4472 * data/yacc.c (yyreturn): Likewise.
4473 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
4474
4475 * src/files.c: Remove obsolete FIXME comment.
4476
4477 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
4478 with the other templates, and to fix bogus run-on messages such
4479 as the one reported at the end of
4480 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
4481 All callers changed to avoid the newline.
4482 (yyprocessOneStack): Output two lines rather than one, to accommodate
4483 the above change. This changes the debug output format slightly.
4484
4485 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
4486 reported by Joel E. Denny in
4487 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
4488 (trivial change).
4489 * tests/glr-regression.at (Duplicate representation of merged trees):
4490 New test, from Joel E. Denny in:
4491 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
4492 * THANKS: Add Joel E. Denny.
4493
4494 * configure.ac (AC_INIT): Bump to 2.0c.
4495
4496 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
4497
4498 * NEWS: Version 2.0b.
4499
4500 * Makefile.am (SUBDIRS): Put examples before tests, so that
4501 "make check" doesn't finish with "All 1 tests passed".
4502
4503 * tests/regression.at (Token definitions): Don't rely on
4504 AT_PARSER_CHECK for data that contains backslashes. It currently
4505 uses 'echo', and 'echo' isn't portable if its argument contains
4506 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
4507 that the byte '\0xff' is not printable in the C locale; it is,
4508 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
4509 not printable, so use '\0x81' to test.
4510
4511 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
4512 version of GCC, since the macro is used with non-GCC compilers.
4513
4514 Fix core dump reported by Pablo De Napoli in
4515 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
4516 * tests/regression.at (Invalid inputs with {}): New test.
4517 * src/parse-gram.y (token_name): Translate type before using
4518 it as an index.
4519
4520 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
4521 the user's name space. All uses changed to __attribute__
4522 ((__unused__)).
4523 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
4524 Add __attribute__ ((__noreturn__)).
4525
4526 * etc/clcommit: Remove. We weren't using it, and it failed
4527 "make maintainer-distcheck".
4528 * Makefile.maint: Merge from coreutils.
4529 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
4530 (syntax-check-rules): Change list of rules as described below.
4531 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
4532 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
4533 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
4534 (sc_trailing_space): New rules.
4535 (sc_xalloc_h_in_src): Remove.
4536 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
4537 (sc_space_tab, sc_error_exit_success, sc_changelog):
4538 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
4539 (makefile-check, po-check, author_mark_check):
4540 (makefile_path_separator_check, copyright-check):
4541 Use grep -n, to make it easier to find violations.
4542 Use CVS_LIST and CVS_LIST_EXCEPT.
4543 (header_regexp, h_re): Remove.
4544 (dd_c): New macro.
4545 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
4546 (my-distcheck): Use more-modern GCC flags.
4547 (signatures, %.asc): Remove.
4548 (rel-files, announcement): Remove signatures.
4549 Restore old updating code, even though we don't use it, so
4550 that we're the same as coreutils.
4551 (alpha, beta, major): Depend on news-date-check.
4552 Make the upload commands.
4553
4554 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
4555 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
4556 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
4557 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
4558 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
4559 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
4560 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
4561 * tests/sets.at: Likewise.
4562
4563 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
4564 we comment out the Autoconf version number.
4565 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
4566 it's error-prone and "make maintainer-distcheck" rejects it.
4567
4568 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
4569 Indent calls to "error" to pacify "make maintainer-distcheck",
4570 when the calls are not intended to be translated.
4571 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
4572
4573 * src/Makefile.am (DEFS): Use +=, to pacify
4574 "make maintainer-distcheck".
4575 (bison_SOURCES): Add scan-skel.h.
4576 (sc_tight_scope): New rule, from coreutils.
4577
4578 * src/files.c (src_extension, header_extension):
4579 Now static, not extern.
4580 * src/getargs.c (short_options): Likewise.
4581 * src/muscle_tab.c (muscle_table): Likewise.
4582 * src/parse-gram.y (current_class, current_type, current_prec):
4583 Likewise.
4584 * src/reader.c (grammar_end, previous_rule_end): Likewise.
4585 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
4586 * src/main.c (main): Cast bindtextdomain and textdomain calls to
4587 void, to avoid warning when NLS is disabled.
4588 * src/output.c: Include scan-skel.h.
4589 (scan_skel): Remove decl, since scan-skel.h does this.
4590 (output_skeleton):
4591 Indent calls to "error" to pacify "make maintainer-distcheck".
4592 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
4593 * src/reader.h (gram_end, gram_lineno): New decls to pacify
4594 "make maintainer-distcheck".
4595 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
4596 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
4597 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
4598 (skel_lex_destroy, scan_skel): Move these decls to...
4599 * src/scan-skel.h: New file.
4600 * src/uniqstr.c (uniqstr_assert):
4601 Indent calls to "error" to pacify "make maintainer-distcheck".
4602
4603 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
4604 not @VAR@.
4605
4606 * tests/torture.at: Revamp to avoid misuse of atoi that
4607 "make maintainer-distcheck" complained about.
4608
4609 * examples/extexi (message): Don't print a message more than once,
4610 and omit line-number decoration that makes Emacs compile think
4611 that informative messages are worth worrying about.
4612
4613 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
4614
4615 * configure.ac: Update version number.
4616
4617 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
4618 accidentally.
4619 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
4620 autogenerated by the maintainer.
4621 * examples/calc++/.cvsignore: Add *.yy.
4622
4623 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
4624 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4625 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4626
4627 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
4628
4629 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
4630 from maintainer-distcheck about casting the argument of 'free'.
4631
4632 * NEWS: Mention recent yytname changes.
4633 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
4634
4635 * bootstrap: For translations that have not yet been upgraded to
4636 the new runtime-po domain, prime the pump by extracting the
4637 relevant strings from the obsolete translations. This code can be
4638 removed once the bison-runtime domain has been translated by each
4639 team.
4640
4641 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
4642 now that token names are already quoted.
4643
4644 Fix problem reported by Anthony Heading.
4645 * data/glr.c (YYTOKEN_TABLE): New macro.
4646 (yytname): Define if YYTOKEN_TABLE.
4647 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
4648 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
4649 (YYERROR_VERBOSE): Define the same way the other skeletons do.
4650 * src/output.c (prepare_symbols): Output token_table_flag.
4651
4652 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
4653
4654 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
4655 again if the first call fails.
4656
4657 * data/glr.c (yytnamerr): New function.
4658 (yyreportSyntaxError): Use it to dequote most string literals.
4659 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
4660 with other skeletons. All uses changed.
4661 (yytnameerr_): New function.
4662 (yyreport_syntax_error): Use it to dequote most string literals.
4663 * data/yacc.c (yytnamerr): New function.
4664 (yyerrlab): Use it to decode most string literals.
4665 * doc/bison.texinfo (Decl Summary, Calling Convention):
4666 Clarify quoting convention of yytname.
4667 * src/output.c (prepare_symbols): Quote all names. This undoes
4668 the 2005-04-17 change, which is now accomplished (mostly) via
4669 changes in the parsers as described above.
4670 * tests/regression.at (Token definitions, Web2c Actions):
4671 Undo most 2005-04-17 change here, too.
4672
4673 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
4674
4675 Fix more problems reported by twlevo@xs4all.nl.
4676 * tests/cxx-type.at: Don't pipe output of ./types through sed to
4677 remove trailing spaces. This loses the exit status of ./types,
4678 and isn't needed since ./types shouldn't be emitting trailing
4679 spaces.
4680 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
4681 as the stack isn't valid in that case.
4682
4683 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4684 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4685 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4686 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
4687 is used.
4688 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
4689 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4690 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4691 Likewise.
4692
4693 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
4694 overly-picky compilers that reject 'char *foo = "bar";'.
4695
4696 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
4697 to FILE * parameter, not to stderr. This fixes a typo introduced
4698 in the 2005-07-12 change.
4699
4700 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
4701 warnings from GCC 4.
4702
4703 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
4704 (yyglrShiftDefer, yysplitStack):
4705 Remove unused parameters b4_pure_formals. All uses changed.
4706 (yyglrShift): Remove unused parameters b4_user_formals.
4707 All uses changed.
4708 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
4709
4710 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
4711
4712 Destructor cleanups and regularization among the three skeletons.
4713 * NEWS: Document the behavior changes.
4714 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
4715 stack before failing, as the cleanup code will do it for us now.
4716 * data/lalr1.cc (yyerrlab): Likewise.
4717 * data/glr.c (yyparse): Pop everything off the stack before
4718 freeing it, so that destructors get called properly.
4719 * data/lalr1.cc (yyreturn): Likewise.
4720 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
4721 This is more consistent.
4722 * doc/bison.texinfo (Destructor Decl): Mention more reasons
4723 why destructors might be called. 1.875 -> 2.1.
4724 (Destructor Decl, Decl Summary, Table of Symbols):
4725 Some English-language cleanups for %destructor.
4726 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4727 Add output line for destructor of start symbol.
4728 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
4729 because of that same extra output line.
4730
4731 * NEWS: Document minor wording changes in diagnostics of
4732 Bison-generated parsers.
4733 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
4734 Remove unused formals. All uses changed.
4735 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
4736 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
4737 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
4738 Rename yyoverflowab to yyexhaustedlab.
4739 When memory exhaustion occurs during syntax-error reporting,
4740 report it separately rather than in a single diagnostic; this
4741 eases translation.
4742 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
4743 (Memory Exhausted): Renamed from Parser Stack Overflow.
4744 Revamp wording slightly to prefer "memory exhaustion".
4745 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
4746
4747 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
4748
4749 Add i18n support to the GLR skeleton. Partially fix the C++
4750 skeleton; a C++ expert needs to finish this. Remove debugging
4751 msgids; there's little point to having them translated, since they
4752 can be understood only by someone who can read the
4753 (English-language) source code.
4754
4755 Generate runtime-po/bison-runtime.pot automatically, so that we
4756 don't have to worry about garbage getting in that file. We'll
4757 make sure after the next official release that old msgids don't
4758 get lost. See
4759 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
4760
4761 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
4762 Now auto-generated.
4763 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
4764 Fix typos in explanations of the runtime file.
4765 * bootstrap: Change gettext keyword from YYI18N to YY_.
4766 Use standard Makefile.in.in in runtime-po, since we'll arrange
4767 for backward-compatible bison-runtime.po files in a different way.
4768 * data/glr.c (YY_): New macro, from yacc.c.
4769 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
4770 Translate messages intended for users.
4771 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
4772 the wording in the other skeletons. We don't know that the memory
4773 is virtual.
4774 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
4775 Use same method that yacc.c uses.
4776 Don't translate debugging messages.
4777 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
4778 it doesn't work (yet), and requires C++ expertise to fix.
4779 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
4780 Move defn to a more logical place, to be consistent with other
4781 skeletons.
4782 Don't translate debugging messages.
4783 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
4784 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
4785 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
4786 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
4787
4788 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
4789 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
4790 void, not int.
4791 * tests/glr-regression.at (Badly Collapsed GLR States):
4792 Likewise.
4793 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4794 yylex should return 0 at EOF rather than aborting.
4795
4796 Improve tests for stack overflow in GLR parser.
4797 Problem reported by twlevo@xs4all.nl.
4798 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
4799 All uses removed.
4800 (yyStackOverflow): Just longjmp, but with value 2 so that caller
4801 can handle the problem.
4802 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
4803 (yyparse): New local variable yyresult to record the result.
4804 Use result of setjmp to set it, rather than storing itinto
4805 struct.
4806 (yyDone): Remove label.
4807 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
4808 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
4809 if YYABORT is used).
4810 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
4811 yyparse status; put status > 1 into diagnostic.
4812 Check that status==2 works.
4813 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
4814 Use exit status 3 for failure to open (which shouldn't happen).
4815
4816 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
4817
4818 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
4819 1 on syntax error; just let yyparse do its thing.
4820 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
4821 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
4822 (Exploding the Stack Size with Alloca):
4823 (Exploding the Stack Size with Malloc):
4824 Expect exit status 2, not 1, since the parser is supposed to blow
4825 its stack. Problem reported by twlevo@xs4all.nl.
4826
4827 * data/glr.c (yyparse): Don't assume that the initial calls
4828 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
4829 Print a stack-overflow message and fail instead.
4830 Initialize the line-number information before creating the stack,
4831 so that the stack-overflow message can report line zero safely.
4832
4833 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
4834
4835 Fix problems reported by twlevo@xs4all.nl.
4836 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
4837 (yyuserMerge): Provide a default case if b4_mergers is empty.
4838 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
4839 * tests/glr-regression.at
4840 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4841 Add casts to pacify C++ compilers.
4842 * tests/glr-regression.at (Improper merging of GLR delayed action
4843 sets): Declare yylex before using it.
4844 * tests/Makefile.am (maintainer-check-g++): Fix a stray
4845 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
4846 test for valgrind; valgrind is independent of g++.
4847 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
4848 for compatibility with POSIX 1003.1-2001 (if running coreutils).
4849 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
4850 Use a destructor, so that we can expand the stack. Change
4851 YYSTYPE to char * so that we can free it. Cast result of malloc.
4852
4853 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4854
4855 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
4856 a valgrind failure. Problem reported by twlevo@xs4all.nl.
4857
4858 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
4859
4860 * PACKAGING: New file, suggested by Bruno Haible and taken from
4861 similar wording in gettext's PACKAGING file.
4862 * NEWS: Mention PACKAGING.
4863 * Makefile.am (EXTRA_DIST): Add PACKAGING.
4864
4865 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
4866
4867 * NEWS: Document recent i18n improvements.
4868 * bootstrap: Get runtime translations into runtime-po.
4869 Create runtime-po files automatically, if possible.
4870 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
4871 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
4872 does not infringe on the user's name space.
4873 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
4874 * doc/bison.texinfo (Internationalization): Revamp the English
4875 and Texinfo syntax a bit, to try to make it clearer.
4876 (Bison Options, Option Cross Key): Mention --print-localedir.
4877 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
4878 YYENABLE_NLS. Quote a bit more.
4879 * runtime-po/.cvsignore: New file.
4880 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
4881 * runtime-po/Rules-quot: Remove; now created by bootstrap.
4882 * runtime-po/quot.sed: Likewise.
4883 * runtime-po/boldquot.sed: Likewise.
4884 * runtime-po/en@quot.header: Likewise.
4885 * runtime-po/en@boldquot.header: Likewise.
4886 * runtime-po/insert-header.sin: Likewise.
4887 * runtime-po/remove-potcdate.sin: Likewise.
4888 * runtime-po/Makevars: Likewise.
4889 * runtime-po/LINGUAS: Likewise.
4890 * runtime-po/de.po: Likewise; we will rely on the translation project
4891 to maintain this, so "bootstrap" should get it.
4892 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
4893 its value.
4894 * src/main.c (main): Bind the bison-runtime domain, too.
4895
4896 2005-07-12 Bruno Haible <bruno@clisp.org>
4897
4898 * data/yacc.c: Include <libintl.h> when NLS is enabled.
4899 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
4900 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
4901 * runtime-po: New directory.
4902 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
4903 $(DOMAIN).pot-update rule, so that old messages are never dropped.
4904 * runtime-po/Rules-quot: New file, copied from po/.
4905 * runtime-po/quot.sed: Likewise.
4906 * runtime-po/boldquot.sed: Likewise.
4907 * runtime-po/en@quot.header: Likewise.
4908 * runtime-po/en@boldquot.header: Likewise.
4909 * runtime-po/insert-header.sin: Likewise.
4910 * runtime-po/remove-potcdate.sin: Likewise.
4911 * runtime-po/Makevars: New file.
4912 * runtime-po/POTFILES.in: New file.
4913 * runtime-po/LINGUAS: New file.
4914 * runtime-po/bison-runtime.pot: New file.
4915 * runtime-po/de.po: New file.
4916 * m4/bison.m4: New file.
4917 * Makefile.am (SUBDIRS): Add runtime-po.
4918 (aclocaldir, aclocal_DATA): New variables.
4919 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4920 Define aclocaldir.
4921 * src/getargs.c (usage): Document --print-localedir option.
4922 (PRINT_LOCALEDIR_OPTION): New enum item.
4923 (long_options): Add --print-localedir option.
4924 (getargs): Handle --print-localedir option.
4925 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4926 (Internationalization): New section.
4927
4928 2005-07-12 Akim Demaille <akim@epita.fr>
4929
4930 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4931 for consistency with the rest of the code.
4932 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4933 Add separators.
4934
4935 2005-07-12 Akim Demaille <akim@epita.fr>
4936
4937 * src/parse-gram.y: Use %printer instead of YYPRINT.
4938
4939 2005-07-12 Akim Demaille <akim@epita.fr>
4940
4941 * src/symtab.h, src/symtab.c (symbol_print): New.
4942 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4943 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4944
4945 2005-07-12 Akim Demaille <akim@epita.fr>
4946
4947 * data/glr.c (b4_syncline): Fix (swap) the definitions of
4948 b4_at_dollar and b4_dollar_dollar.
4949
4950 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4951
4952 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4953 and Pennello's paper.
4954
4955 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4956
4957 * data/yacc.c (yyparse): Undo previous patch. Instead,
4958 set yylsp[0] and yyvsp[0] only if the initial action
4959 sets yylloc and yylval, respectively.
4960
4961 * data/yacc.c (yyparse): In the initial action, set
4962 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4963 This avoids the use of undefined variables if the initial
4964 action does not set yylloc and/or yylval.
4965
4966 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4967
4968 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4969 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4970 Remove from CVS. These files are automatically generated.
4971 * examples/extexi: Clarify that this file is now part of Bison,
4972 not GNU M4, and that it works with any POSIX-compatible Awk.
4973 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4974 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4975 so that we also get calc++-parser.yy. Geneate it.
4976 Use $(AWK), not gawk, since any conforming Awk will do.
4977 Put comment before action, since older 'make' can't handle comment
4978 in action.
4979 $(BUILT_SOURCES): List all built sources, not just some of them.
4980 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4981 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4982 $($(calc_sources_generated)): Remove unnecessary test for existence
4983 of target. (This had a shell syntax error anyway; a stray "x".)
4984 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4985 calc++-parser.yy.
4986 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4987
4988 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4989 implied by the other modules.
4990
4991 2005-07-06 Akim Demaille <akim@epita.fr>
4992
4993 Bind examples/calc++ to the package.
4994 * examples/calc++/Makefile: Remove, replaced by...
4995 * examples/calc++/Makefile.am: ... this new file.
4996 * examples/calc++/test: Remove input.
4997 * examples/calc++/compile: Remove.
4998 * examples/Makefile.am: New.
4999 * configure.ac, Makefile.am: Adjust.
5000 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
5001
5002 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
5003
5004 * data/glr.c (yyFail): Drastically simplify; since the format argument
5005 never had any % directives, we can simply pass it to yyerror.
5006 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
5007 be modified later, as that is the usual style in glr.c.
5008 Problems reported by Paul Hilfinger.
5009
5010 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
5011 and size overflow errors.
5012 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
5013 in case the user prolog sets feature-test macros like _GNU_SOURCE.
5014 (YYSIZEMAX): New macro.
5015 (yystpcpy): New function, taken from yacc.c.
5016 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
5017 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
5018 so that we don't have to maintain their signatures.
5019 (yyFail): Check for buffer overflow, by using vsnprintf rather
5020 than vsprintf. Allocate a bigger buffer if possible.
5021 Report an error if buffer allocation fails.
5022 (yyStackOverflow): New function.
5023 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
5024 the initialization was successful. It might fail if storage was
5025 exhausted.
5026 (yyexpandGLRStack): Add more checks for storage allocation failure.
5027 Use yyStackOverflow to report failures.
5028 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
5029 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
5030 Don't assume stack number fits in int.
5031 (yysplitStack): Check for storage allocation failure.
5032 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
5033 can print diagnostics on storage allocation failure. All callers
5034 changed.
5035 (yyresolveValue): Use yybool for boolean.
5036 (yyreportSyntaxError): Check for size-calculation overflow.
5037 This code is taken from yacc.c.
5038 (yyparse): Check for storage allocation errors when allocating
5039 the initial stack.
5040
5041 2005-07-05 Akim Demaille <akim@epita.fr>
5042
5043 Extract calc++ from the documentation.
5044 * doc/bison.texinfo (Calc++): Add the extraction marks.
5045 * examples/extexi: New, from the aborted GNU Programming 2E.
5046 Separate the different paragraph of a file with empty lines.
5047 * examples/Makefile: Use it to extract the whole calc++ example.
5048
5049 2005-06-24 Akim Demaille <akim@epita.fr>
5050
5051 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
5052 class typedefs.
5053
5054 2005-06-22 Akim Demaille <akim@epita.fr>
5055
5056 * doc/bison.texinfo (C++ Language Interface): First stab.
5057 (C++ Parsers): Remove.
5058
5059 2005-06-22 Akim Demaille <akim@epita.fr>
5060
5061 * data/lalr1.cc (yylex_): Honor %lex-param.
5062
5063 2005-06-22 Akim Demaille <akim@epita.fr>
5064
5065 Start a set of simple examples.
5066 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
5067 * examples/calc++/calc++-driver.hh,
5068 * examples/calc++/calc++-parser.yy,
5069 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
5070 * examples/calc++/compile, examples/calc++/test: New.
5071
5072 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
5073
5074 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
5075 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
5076 which stems from the 2005-05-27 patch.
5077
5078 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5079
5080 * data/glr.c: Modify treatment of unused parameters to permit use
5081 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
5082
5083 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
5084
5085 Fix infringement on user name space reported by Janos Zoltan Szabo.
5086 * data/yacc.c (yyparse): strlen -> yystrlen.
5087
5088 2005-05-30 Akim Demaille <akim@epita.fr>
5089
5090 * data/lalr1.cc (_): New.
5091 Translate the various messages.
5092
5093 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
5094
5095 Fix infringement on user name space reported by Bruno Haible.
5096 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
5097 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
5098 the user's name space.
5099 (alloca): Include <stdlib.h> to get it, if it's not built in.
5100 (YYMALLOC, YYFREE): Define only if needed.
5101 (malloc, free): Declare, but only if needed, as this infringes on
5102 the user name space.
5103
5104 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
5105
5106 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
5107 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
5108 with %d format.
5109 * lib/ebitset.c (min, max): Undef before defining.
5110 * lib/vbitset.c (min, max): Likewise.
5111 * lib/subpipe.c (create_subpipe): Save local variables in case
5112 vfork clobbers them.
5113
5114 2005-05-24 Bruno Haible <bruno@clisp.org>
5115
5116 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
5117 error message syntax used by gcc-4.0.
5118
5119 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
5120
5121 * README: Mention m4 1.4.3. Remove obsolete advice about
5122 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
5123
5124 * bootstrap: Remove workaround for problem I encountered with
5125 gettext 0.14.1; it seems to be fixed now.
5126
5127 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
5128
5129 * NEWS: Version 2.0a.
5130
5131 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
5132 the previous change.
5133
5134 Various maintainer cleanups.
5135 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
5136 conftest*, for benefit of CVS commands run at the same time as
5137 "configure". Add build-aux, since "bootstrap" now creates it and
5138 its subfiles.
5139 * Makefile.cfg (move_if_change): Remove.
5140 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
5141 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
5142 (po_repo, do-po-update, po-update, wget_files, get-targets):
5143 (config.guess-url_prefix, config.sub-url_prefix):
5144 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
5145 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
5146 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
5147 Remove.
5148 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
5149 this is now the recommended name.
5150 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
5151 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
5152 ylwrap. These files now go into build-aux.
5153 * config/move-if-change: Remove.
5154 * config/prev-version.txt: Bump from 1.75 to 2.0.
5155
5156 * bootstrap: Add stdio-safer, unistd-safer modules.
5157 Remove m4/glibc2.m4 (introduced by latest gnulib, but
5158 we don't need it).
5159 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
5160 fopen-safer.c, stdio-safer.h, unistd-safer.h.
5161 * lib/subpipe.c: Include "unistd-safer.h".
5162 (create_subpipe): Make sure all the newly-created
5163 file descriptors are > 2, so that diagnostics don't
5164 get sent down them (which might cause Bison to hang, in theory).
5165 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
5166 * src/files.c (xfopen): Use fopen_safer, not fopen.
5167
5168 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
5169 yesterday's yacc.c fix.
5170
5171 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
5172
5173 * data/glr.c, data/lalr1.cc: Update copyright date.
5174
5175 Fix a destructor bug reported by Wolfgang Spraul in
5176 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
5177 * data/yacc.c (yyabortlab): Don't call destructor, and
5178 don't set yychar to EMPTY.
5179 (yyoverflowlab): Don't call destructor.
5180 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
5181 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
5182 since we no longer output the message "discarding lookahead token
5183 end of input ()".
5184
5185 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5186
5187 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
5188 fix a small glitch in debugging output.
5189 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
5190 after YY_SYMBOL_PRINT where needed.
5191
5192 (struct yyGLRState): Add some comments.
5193 (struct yySemanticOption): Add some comments.
5194 (union yyGLRStackItem): Add comment.
5195
5196 (yymergeOptionSets): Correct this to properly perform the union,
5197 avoiding infinite reported by Michael Rosien.
5198 Update comment.
5199
5200 * tests/glr-regression.at: Add test for GLR merging error reported
5201 by M. Rosien.
5202
5203 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
5204
5205 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
5206 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
5207 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
5208 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
5209 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
5210 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
5211 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
5212 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
5213 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
5214 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
5215 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
5216 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
5217 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
5218 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
5219 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
5220 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
5221 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
5222 src/derives.h, src/files.c, src/files.h, src/getargs.c,
5223 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
5224 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
5225 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
5226 src/output.h, src/parse-gram.c, src/parse-gram.h,
5227 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
5228 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
5229 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
5230 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
5231 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
5232 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
5233 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
5234 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
5235 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
5236 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
5237 tests/reduce.at, tests/regression.at, tests/sets.at,
5238 tests/synclines.at, tests/testsuite.at, tests/torture.at:
5239 Update FSF postal mail address.
5240
5241 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
5242
5243 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
5244 Problem reported by Ralf Menzel.
5245
5246 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
5247
5248 * tests/actions.at: Test that stack overflow invokes destructors.
5249 From Marcus Holland-Moritz.
5250 * data/yacc.c (yyerrlab): Move the code that destroys the stack
5251 from here....
5252 (yyreturn): to here. That way, destructors are called properly
5253 even if the stack overflows, or the user calls YYACCEPT or
5254 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
5255 (yyoverflowlab): Destroy the lookahead.
5256
5257 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
5258
5259 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
5260
5261 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
5262
5263 * NEWS: Bison-generated C parsers no longer quote literal strings
5264 associated with tokens.
5265 * src/output.c (prepare_symbols): Don't escape strings,
5266 since users don't want to see C escapes.
5267 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
5268 in diagnostics.
5269 * tests/input.at (Torturing the Scanner): Likewise.
5270 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
5271
5272 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
5273
5274 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
5275 the data size is known to be too small and we can't increase it.
5276 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
5277
5278 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
5279
5280 * src/parse-gram.y: Include quotearg.h.
5281 (string_as_id): Quote $1 before using it as a key, since the
5282 lexer no longer quotes it for us.
5283 (string_content): Don't strip quotes, since lexer no longer
5284 quotes it for us.
5285 * src/scan-gram.l: Include quotearg.h.
5286 ("\""): Omit quote.
5287 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
5288 a key, since the rest of the lexer doesn't quote it.
5289 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
5290 * tests/regression.at (Token definitions): Check for backslashes
5291 in token strings.
5292
5293 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
5294 (YYSIZE_T): Define to unsigned long int when using an older compiler.
5295 (yyparse): Revamp code to generate long syntax error message, to
5296 make it easier to translate, and to avoid problems with arithmetic
5297 overflow. Change "virtual memory" to "memory" in diagnostic, since
5298 we don't know whether the memory is virtual.
5299
5300 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
5301
5302 * NEWS: Bison-generated C parsers now use the _ macro to
5303 translate strings.
5304 * data/yacc.c (_) [!defined _]: New macro.
5305 All English strings wrapped inside this macro.
5306 * doc/bison.texinfo (Bison Parser): Document _.
5307 * po/POTFILES.in: Include src/parse-gram.c, since it now
5308 includes translateable strings that parse-gram.y doesn't.
5309
5310 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
5311
5312 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
5313 reverting the 2004-10-11 change to this function.
5314 (symbol_check_alias_consistency): Don't call symbol_type_set
5315 if the type name is already correct.
5316 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
5317
5318 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
5319
5320 * tests/regression.at (Token definitions): Don't use a token named
5321 c, as that generates a "#define c ..." that runs afoul of buggy
5322 stdlib.h that uses the identifier c as a member of struct
5323 drand48_data. Problem reported by Horst Wente.
5324
5325 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
5326
5327 * bootstrap: Change translation URL from
5328 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
5329 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
5330 redirection glitches. Problem reported by twlevo@xs4all.nl.
5331
5332 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
5333
5334 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
5335 after operands; POSIX says this isn't portable for the c99 command.
5336
5337 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
5338
5339 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
5340 immediately if a data overrun has occurred; this may help us track
5341 down what may be a spurious failure on MacOS.
5342
5343 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
5344
5345 Respond to problems reported by twlevo@xs4all.nl.
5346
5347 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
5348
5349 * src/vcg.h: Comment fix.
5350 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
5351 (G_CMAX): Change to -1 instead of INT_MAX.
5352
5353 * data/yacc.c (yyparse): Omit spaces before #line.
5354
5355 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
5356
5357 * src/tables.c (state_number_to_vector_number): Put it inside an
5358 "#if 0", since it's not currently used. Problem reported by
5359 Roland McGrath.
5360
5361 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
5362
5363 * src/output.c (escaped_output): Renamed from
5364 escaped_file_name_output, since we now use it for symbol tags as
5365 well. All uses changed.
5366 (symbol_destructors_output, symbol_printers_output):
5367 Escape symbol tags too.
5368 Problem reported by Matyas Forstner in
5369 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
5370
5371 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
5372 not needed.
5373 * src/output.c (user_actions_output, token_definitions_output,
5374 symbol_destructors_output, symbol_printers_output): Likewise.
5375 * src/reader.c (prologue_augment): Likewise.
5376 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
5377
5378 * src/vcg.c (output_edge): Don't quote linestyle arg.
5379 Problem reported by twlevo@xs4all.nl.
5380
5381 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
5382
5383 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
5384 example, reported by Derek M Jones. Also, make the example even
5385 more outrageous, to better illustrate how bad the problem is.
5386
5387 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
5388
5389 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
5390 putsym. Typo reported by Sebastian Piping.
5391
5392 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
5393
5394 * doc/bison.texinfo (Language and Grammar): some -> same
5395 (Epilogue): int he -> in the
5396 Typos reported by Sebastian Piping via Justin Pence.
5397
5398 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
5399
5400 * tests/glr-regression.at (Improper handling of embedded actions
5401 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
5402 embedded actions and $-N in GLR parsers", work around an Autoconf bug
5403 with dollar signs in test names.
5404 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
5405 for a similar reason.
5406
5407 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
5408
5409 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
5410 wants to redefine G_VIEW.
5411
5412 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
5413
5414 * src/vcg.c (get_view_str): Remove case for normal_view.
5415 Problem reported by twlevo@xs4all.nl.
5416
5417 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
5418
5419 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
5420 Problem reported by twlevo@xs4all.nl.
5421
5422 * doc/bison.texinfo: Change @dircategory from "GNU programming
5423 tools" to "Software development". Requested by Richard Stallman
5424 via Karl Berry.
5425
5426 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
5427
5428 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
5429 Problem reported by twlevo@xs4all.nl.
5430
5431 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
5432
5433 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
5434 keyword; it's not needed with modern compilers, and it doesn't
5435 affect correctness with older compilers. Suggested by
5436 twlevo@xs4all.nl.
5437
5438 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
5439
5440 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
5441 gcc -Wswitch-default.
5442 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5443 * data/yacc.c (yyparse): Likewise.
5444
5445 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
5446
5447 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
5448 already. Let config.h define any nonstandard values.
5449
5450 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
5451
5452 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
5453 for the benefit of slower hosts. Problem reported by
5454 Nelson H. F. Beebe.
5455
5456 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
5457
5458 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
5459 being defined and not used.
5460 * data/lalr1.cc (yyparse): Likewise.
5461 Use "if (false)" rather than "if (0)".
5462
5463 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
5464
5465 * TODO: Mention that we should allow NUL bytes in tokens.
5466
5467 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
5468
5469 * src/scan-skel.l (<<EOF>>): Don't close standard output.
5470 Problem reported by Hans Aberg.
5471
5472 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
5473
5474 * src/getargs.c (version): Happy new year; update overall
5475 program copyright date from 2004 to 2005.
5476
5477 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
5478 Problem reported by Hans Aberg.
5479 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
5480 (Output file names.): Add a test for the case when standard output
5481 is closed.
5482
5483 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
5484
5485 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
5486 to fix an oversight in the Bison 2.0 manual.
5487
5488 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
5489
5490 * NEWS: Version 2.0. Reformat the existing news items since
5491 1.875, so that related items are grouped together.
5492 * configure.ac (AC_INIT): Bump version to 2.0.
5493 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
5494
5495 * tests/torture.at (Exploding the Stack Size with Alloca): Set
5496 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
5497 otherwise, we're not testing alloca. Unfortunately there's no
5498 simple way to consult HAVE_ALLOCA here.
5499
5500 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
5501 for yymsg, too.
5502
5503 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
5504 hand. This avoids a warning about comparing int to size_t when
5505 GCC warnings are enabled.
5506
5507 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
5508
5509 * NEWS: Bison-generated parsers no longer default to using the
5510 alloca function (when available) to extend the parser stack, due
5511 to widespread problems in unchecked stack-overflow detection.
5512 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
5513 responsibility to set it to a positive value. This lets the user
5514 specify a value that is not a preprocessor constant.
5515 * data/yacc.c (YYMAXDEPTH): Likewise.
5516 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
5517 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
5518 to be a compile-time constant. However, explain the constraints on it.
5519 Also, explain the constraints on YYINITDEPTH.
5520 (Table of Symbols): Explain that alloca is no longer the default.
5521 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
5522 to 1.
5523
5524 * doc/bison.texinfo (Location Default Action): Mention that n must
5525 be zero when k is zero. Suggested by Frank Heckenbach.
5526
5527 2004-12-22 Akim Demaille <akim@epita.fr>
5528
5529 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
5530 (parser::state_type, parser::semantic_type, parser::location_type):
5531 Private, not public.
5532 (parser::parse): Return ints, not bool.
5533 Returning a bool introduces a problem: 0 corresponds to false, and
5534 it seems weird to return false on success. Returning true changes
5535 the conventions for yyparse.
5536 Alternatively we could return void and send an exception.
5537 There is no clear consensus (yet?).
5538 (state_stack, semantic_stack, location_stack): Rename as...
5539 (state_stack_type, semantic_stack_type, location_stack_type): these.
5540 Private, not public.
5541 * tests/c++.at: New.
5542 * tests/testsuite.at, tests/Makefile.am: Adjust.
5543
5544 2004-12-21 Akim Demaille <akim@epita.fr>
5545
5546 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
5547
5548 2004-12-21 Akim Demaille <akim@epita.fr>
5549
5550 Don't impose std::string for filenames.
5551
5552 * data/lalr1.cc (b4_filename_type): New.
5553 (position::filename): Use it.
5554 (parser.hh): Move the inclusion of stack.hh and location.hh below
5555 the user code, so that needed headers for the filename type can be
5556 included first.
5557 Forward declare them before the user code.
5558 * tests/Makefile.am (check-local, installcheck-local): Pass
5559 TESTSUITEFLAGS to the TESTSUITE.
5560
5561 2004-12-20 Akim Demaille <akim@epita.fr>
5562
5563 Use more STL like names: my_class instead of MyClass.
5564
5565 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
5566 (SemanticStack, SemanticType, StateStack, StateType)
5567 (TokenNumberType, Stack, Slice, Traits, Parser::location)
5568 (Parser::value): Rename as...
5569 (location_stack, location_type, rhs_number_type, semantic_stack)
5570 (semantic_type, state_stack, state_type, token_number_type, stack)
5571 (slice, traits, parser::yylloc, parser::yylval): these.
5572
5573 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
5574
5575 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
5576
5577 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
5578 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5579
5580 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
5581
5582 Remove uses of 'short int' and 'unsigned short int'. This raises
5583 some arbitrary limits. It uses more memory but nowadays that's
5584 not much of an issue.
5585
5586 This change does not affect the generated parsers; that's a different
5587 task, as some users will want to conserve memory there.
5588
5589 Ideally we should use size_t to represent all object counts, and
5590 something like ptrdiff_t to represent signed differences of object
5591 counts; but that will require more code-cleanup than I have the
5592 time to do right now.
5593
5594 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
5595 Use size_t, not int or short int, to count objects.
5596 * src/closure.c (nritemset, closure): Likewise.
5597 * src/closure.h (nritemset, closure): Likewise.
5598 * src/nullable.c (nullable_compute): Likewise.
5599 * src/print.c (print_core): Likewise.
5600 * src/print_graph.c (print_core): Likewise.
5601 * src/state.c (state_compare, state_hash): Likewise.
5602 * src/state.h (struct state): Likewise.
5603 * src/tables.c (default_goto, goto_actions): Likewise.
5604
5605 * src/gram.h (rule_number, rule): Use int, not short int.
5606 * src/output.c (prepare_rules): Likewise.
5607 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
5608 errs, reductions): Likewise.
5609 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
5610 Likewise.
5611 * src/tables.c (vector_number, tally, action_number,
5612 ACTION_NUMBER_MINIMUM): Likewise.
5613 * src/output.c (muscle_insert_short_int_table): Remove.
5614
5615 2004-12-17 Akim Demaille <akim@epita.fr>
5616
5617 * data/lalr1.cc: Extensive Doxygenation.
5618 (error_): Rename as...
5619 (error): this, since it is visible to the user.
5620 Adjust callers.
5621 (Parser::message): Now an automatic variable from...
5622 (Parser::yyreport_syntax_error_): here.
5623 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
5624 Parser::error.
5625 * tests/input.at: Escape $.
5626
5627 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
5628
5629 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
5630 Parenthesize rhs to avoid obscure problems with mistakes like
5631 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
5632 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
5633 b4_rhs_location): Likewise.
5634 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
5635 b4_rhs_location): Likewise.
5636
5637 2004-12-16 Akim Demaille <akim@epita.fr>
5638
5639 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
5640 yacc.c: be sure to stay within yycheck_.
5641 * tests/actions.at: Re-enable C++ tests.
5642
5643 2004-12-16 Akim Demaille <akim@epita.fr>
5644
5645 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
5646 real.
5647
5648 2004-12-16 Akim Demaille <akim@epita.fr>
5649
5650 Use #define to handle the %name-prefix.
5651
5652 * data/glr.c, data/yacc.c: Comment changes.
5653 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
5654 so that one can refer to yylex in the parser file, and have it
5655 renamed, as is the case with other skeletons.
5656
5657 2004-12-16 Akim Demaille <akim@epita.fr>
5658
5659 Move lalr1.cc internals into yy*.
5660
5661 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
5662 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
5663 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
5664 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
5665 (empty_, final_, terror_, errcode_, ntokens_)
5666 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
5667 (looka_, ilooka_, error_range_, nerrs_):
5668 Rename as...
5669 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
5670 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
5671 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
5672 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
5673 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
5674 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
5675 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
5676 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
5677 these.
5678
5679 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
5680
5681 Fix some problems reported by twlevo at xs4all.
5682 * src/symtab.c (symbol_new): Report an error if the input grammar
5683 contains too many symbols. This is better than calling abort() later.
5684 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
5685 (struct node, struct graph):
5686 Rename member expand to stretch. All uses changed.
5687 (struct graph): Remove member layoutalgorithm. All uses removed.
5688 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
5689 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
5690 All uses changed.
5691 (N_STRETCH): Rename from N_EXPAND. All uses changed.
5692
5693 2004-12-15 Akim Demaille <akim@epita.fr>
5694
5695 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
5696 Add more Doxygen comments.
5697 (symprint_, stack_print_, reduce_print_, destruct_, pop)
5698 (report_syntax_error_, translate_): Rename as...
5699 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
5700 (yypop_, yyreport_syntax_error_, yytranslate_): this.
5701
5702 2004-12-15 Akim Demaille <akim@epita.fr>
5703
5704 * data/lalr1.cc (lex_): Rename as...
5705 (yylex_): this.
5706 Move the trace here.
5707 Take the %name-prefix into account.
5708 Reported by Alexandre Duret-Lutz.
5709
5710 2004-12-15 Akim Demaille <akim@epita.fr>
5711
5712 Simplify the C++ parser constructor.
5713
5714 * data/lalr1.cc (debug_): Rename as...
5715 (yydebug_): so that the parser's internals are always in the yy*
5716 pseudo namespace.
5717 Adjust uses.
5718 (b4_parse_param_decl): Remove the leading comma as it is now only
5719 called as unique argument list.
5720 (Parser::Parser): Remove the constructor accepting a location and
5721 an initial debugging level.
5722 Remove from the other ctor the argument for the debugging level.
5723 (debug_level_type, debug_level, set_debug_level): New.
5724
5725 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
5726 constructor calls.
5727
5728 2004-12-15 Akim Demaille <akim@epita.fr>
5729
5730 Remove b4_root related material: failure experiment
5731 (which goal was to allow to derive from a class).
5732
5733 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
5734 definitions and uses.
5735
5736 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
5737
5738 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
5739 not 2, since it's not portable to subtract 1 from the start of an
5740 array. The new item 0 is never set or used. All uses changed.
5741
5742 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
5743 the default definition of YYLLOC_DEFAULT. Problem reported
5744 by Frank Heckenbach.
5745
5746 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
5747
5748 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
5749 the normal case and one for the error case. Just use the
5750 first one uniformly. Problem reported by Frank Heckenbach.
5751 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
5752 use exactly the same macro in both places.
5753 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
5754 so that the normal-case YYRHSLOC works for the error case too.
5755 All uses changed.
5756 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
5757 (YYLLOC_DEFAULT): Use the same macro as glr.c.
5758 * doc/bison.texinfo (Location Default Action): Don't claim that
5759 we have an array of locations. Use the same macro for both glr
5760 and lalr parsers. Mention YYRHSLOC. Mention what happens when
5761 the index is 0.
5762
5763 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5764
5765 * HACKING: Update email addresses to send announcements to.
5766
5767 * configure.ac (AC_INIT): Bump version to 1.875f.
5768
5769 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5770
5771 * NEWS: Version 1.875e.
5772 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
5773
5774 * src/scan-skel.l: Include "complain.h", for "fatal".
5775
5776 * src/relation.h (relation_print, relation_digraph):
5777 Relation sizes are of type relation_node, not size_t (this is
5778 merely a doc fix, since the two types are equivalent).
5779 (relation_transpose): Relation sizes are of type relation_node,
5780 not int.
5781 * src/relation.c: Likewise.
5782 (top, infinity): Now of type relation_node, not int.
5783 (traverse, relation_transpose): Use relation_node, not int.
5784
5785 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
5786 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
5787 (yyparse): Remove unused local introduced in 2004-10-25 patch.
5788
5789 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
5790 specifying whether the test should be skipped. Use it tp
5791 specify that the [%defines %skeleton "lalr1.cc"] tests currently
5792 fail on some hosts, and should be skipped.
5793
5794 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
5795
5796 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
5797 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
5798 unless otherwise specified below.
5799
5800 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
5801 to allocate kernel_base, kernel_items, kernel_size, since
5802 they needn't be initialized to 0.
5803 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
5804 * src/closure.c (new_closure): Likewise, for itemset.
5805 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
5806 * src/lalr.c (set_goto_map): Likewise, for temp_map.
5807 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
5808 (build_relations): Likewise for edge, states1, includes.
5809 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
5810 * src/reader.c (packgram): Likewise, for ritem, rules.
5811 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
5812 * src/relation.c (relation_digraph): Likewise for VERTICES.
5813 (relation_transpose): Likewise for new_R, end_R.
5814 * src/symtab.c (symbols_token_translations_init): Likewise for
5815 token_translations.
5816 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
5817 (token_actions): Likewise for yydefact, actrow, conflrow,
5818 conflict_list.
5819 (save_column): Likewise for froms[symno], tos[symno].
5820 (goto_actions): Likewise for state_count.
5821 (pack_table): Likewise for base, pos, check.
5822 (tables_generate): Likewise for width.
5823
5824 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
5825 for initial core. Just have a separate core, so we needn't worry
5826 about whether kernel_size and kernel_base are initialized.
5827
5828 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
5829 kernel_size, kernel_items): Remove unnecessary initialization.
5830 * src/conflicts.c (conflicts): Likewise.
5831 * src/derives.c (derives): Likewise.
5832 * src/muscle_tablc (muscle_insert): Likewise.
5833 * src/relation.c (relation_digraph): Likewise.
5834 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
5835 conflrow, conflict_table, conflict_list, table, check):
5836 Likewise.
5837
5838 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
5839 This is because all callers pass unsigned int.
5840 * src/closure.h (new_closure): Likewise.
5841
5842 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
5843 (build_relations): Initialize includes[i] in all cases.
5844 * src/reader.c (packgram): Always initialize rules[ruleno].prec
5845 and rules[ruleno].precsym. Initialize members in order.
5846 * src/relation.c (relation_transpose): Always initialize new_R[i]
5847 and end_R[i].
5848 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
5849
5850 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
5851 conflict_list[0] was always 0, but now it isn't initialized.
5852
5853 * src/table.c (table_grow): When conflict_table grew, the grown
5854 area wasn't cleared. Fix this.
5855
5856 * lib/.cvsignore: Add strdup.c, strdup.h.
5857 * m4/.cvsignore: Add strdup.m4.
5858
5859 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
5860
5861 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
5862 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
5863 GOTO_NUMBER_MAXIMUM, since we occasionally compute
5864 ngotos + 1 without checking for overflow.
5865 (build_relations): Use END_NODE, not -1, to denote end of edges.
5866 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
5867 build_relations): Use goto_number, not int, for goto numbers.
5868 * src/tables.c (save_column, default_goto): Likewise.
5869
5870 2004-11-23 Akim Demaille <akim@epita.fr>
5871
5872 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
5873 of #defining from yystype.
5874 Don't typedef yystype, C++ does not need it.
5875 This lets it possible to forward declare it as union.
5876
5877 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
5878
5879 * bootstrap (gnulib_modules): Add extensions.
5880 Problem reported by Jim Meyering.
5881
5882 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
5883
5884 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
5885 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
5886 src/system.h, src/tables.c: XFREE -> free, to accommodate
5887 recent change to gnulib xalloc.h.
5888 Problem reported by Jim Meyering.
5889
5890 2004-11-17 Akim Demaille <akim@epita.fr>
5891
5892 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
5893
5894 2004-11-17 Akim Demaille <akim@epita.fr>,
5895 Alexandre Duret-Lutz <adl@gnu.org>
5896
5897 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
5898 changes.
5899 (YYCDEBUG): Adjust.
5900 Use it instead of cdebug_.
5901 (Parser::debug_stream, Parser::set_debug_stream): New.
5902 (Parser::symprint_): Define cdebug_ for temporary backward
5903 compatibility.
5904 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
5905 debug_stream ().
5906
5907 2004-11-17 Akim Demaille <akim@epita.fr>
5908
5909 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
5910 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
5911 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
5912 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5913
5914 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
5915
5916 * data/glr.c (yyloc_default): Remove; not used.
5917 Problem reported by Frank Heckenbach.
5918
5919 2004-10-25 Akim Demaille <akim@epita.fr>
5920
5921 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5922 Introduce another definition to address simple location arrays.
5923 (yyGLRStack): New member: yyerror_range.
5924 (yyrecoverSyntaxError, yyparse): Update it.
5925 (yyrecoverSyntaxError): Use it when shifting the error token to
5926 have an accurate range, equivalent to the one computed by both
5927 yacc.c and lalr1.cc.
5928 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5929 that column numbers start at column 0, as per GNU Coding
5930 Standards, the others tests, and the doc.
5931 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5932 Adjust to the above change (first column is 0).
5933 And adjust the location of the "<error>", now covering the whole
5934 line.
5935
5936 2004-10-22 Akim Demaille <akim@epita.fr>
5937 and Paul Eggert <eggert@cs.ucla.edu>
5938
5939 Remove some arbitrary limits on goto numbers and relations.
5940 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5941 initial values, since they're never used.
5942 (set_goto_map): ngotos is now unsigned, so test for overflow
5943 by seeing whether it wraps around to zero.
5944 * src/lalr.h (goto_number): Now size_t, not short int.
5945 (GOTO_NUMBER_MAXIMUM): Remove.
5946 * src/relation.c (relation_print, traverse, relation_transpose):
5947 Check for END_NODE rather than looking at sign.
5948 * src/relation.h (END_NODE): New macro.
5949 (relation_node): Now size_t, not short int.
5950
5951 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5952
5953 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5954 keyword, not an identifier. Problem reported by Baron Schwartz in
5955 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5956
5957 2004-10-11 Akim Demaille <akim@epita.fr>
5958
5959 * src/symtab.c (symbol_check_alias_consistency): Also check
5960 type names, destructors, and printers.
5961 Reported by Alexandre Duret-Lutz.
5962 Recode the handling of associativity and precedence in terms
5963 of symbol_precedence_set.
5964 Accept no redeclaration at all, not even equal to the previous
5965 value.
5966 (redeclaration): New.
5967 Use it to factor redeclaration complaints.
5968 (symbol_make_alias): Don't set the type of the alias, let
5969 symbol_check_alias_consistency do it as for other features.
5970 * src/symtab.h (symbol): Add new member prec_location, and
5971 type_location.
5972 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5973 * tests/input.at (Incompatible Aliases): New.
5974
5975 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5976
5977 .cvsignore fixes to accommodate gnulib changes,
5978 and the practice of naming build directories "_build".
5979 * .cvsignore: Add "_*". Sort.
5980 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5981 * m4/.cvsignore: Add "*_gl.m4".
5982
5983 2004-10-06 Akim Demaille <akim@epita.fr>
5984
5985 * src/parse-gram.y (add_param): Fix the truncation of trailing
5986 spaces.
5987
5988 2004-10-05 Akim Demaille <akim@epita.fr>
5989
5990 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5991 whether the reducion was empty or not. This leaves room to
5992 improve the use of YYLLOC_DEFAULT in such a case.
5993 lalr1.cc is still experimental, so changing this is acceptable.
5994 And finally, there are probably not many users who changed the
5995 handling of locations in GLR, so changing is admissible too.
5996
5997 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5998 empty reduction, set @$ to an empty location ending the previously
5999 stacked symbol.
6000 Adjust uses to make sure the code is triggered on empty
6001 reductions.
6002 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
6003 expected output: empty reductions have empty locations.
6004
6005 2004-09-29 Akim Demaille <akim@epita.fr>
6006
6007 * data/lalr1.cc: Move towards a more standard C++ coding style
6008 for templates: Class < T > -> Class<T>.
6009
6010 2004-09-29 Akim Demaille <akim@epita.fr>
6011
6012 * data/lalr1.cc: Reinstall the former ctor, for sake of
6013 compatibility, but warn it will be removed.
6014 Move towards a more standard C++ coding style (i.e., type *var ->
6015 type* var).
6016
6017 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
6018
6019 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
6020 since it's less likely to work if NULs are involved in the future.
6021
6022 2004-09-27 Akim Demaille <akim@epita.fr>
6023
6024 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
6025
6026 2004-09-27 Akim Demaille <akim@epita.fr>
6027
6028 * data/lalr1.cc (b4_parse_param_decl_1): New.
6029 (b4_parse_param_decl): Use it to have different names between attribute
6030 and argument names.
6031 (b4_cc_constructor_call): Likewise.
6032
6033 2004-09-24 Akim Demaille <akim@epita.fr>
6034
6035 * src/parse-gram.y (add_param): Strip the leading and trailing
6036 blanks from a formal argument declaration.
6037 (YY_LOCATION_PRINT): New.
6038
6039 2004-09-24 Akim Demaille <akim@epita.fr>
6040
6041 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
6042 after the location.
6043
6044 2004-09-24 Akim Demaille <akim@epita.fr>
6045
6046 * doc/bison.texinfo (Table of Symbols): Sort.
6047
6048 2004-09-21 Akim Demaille <akim@epita.fr>
6049
6050 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
6051 the useless parentheses.
6052 Suggested by Paul Eggert.
6053
6054 2004-09-20 Akim Demaille <akim@epita.fr>
6055
6056 Let the initial-action act on the look-ahead, and use it for the
6057 "initial push" (corresponding to an hypothetical beginning-of-file).
6058 And let lalr1.cc honor %initial-action.
6059
6060 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
6061 example.
6062 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
6063 (Parser::Parser): Remove the ctor that used to initialize it.
6064 (Parser::parse): Like in the other skeletons, issue the "starting
6065 parse" message before any action.
6066 Honor %initial-action.
6067 Initialize the stacks with the lookahead.
6068 * data/yacc.c: Let $$ and @$ in %initial-action designate the
6069 look-ahead.
6070 Push them in the stacks.
6071 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
6072
6073 2004-09-20 Akim Demaille <akim@epita.fr>
6074
6075 * doc/bison.texinfo (Initial Action Decl): New.
6076
6077 2004-09-20 Akim Demaille <akim@epita.fr>
6078
6079 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
6080 clearer criterion to define it.
6081 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
6082 When reducing on an empty RHS, use the latest stacked location as
6083 location.
6084 yylloc is not always available.
6085 * data/glr.c: Likewise.
6086 Also, honor initial-actions.
6087
6088 2004-09-20 Akim Demaille <akim@epita.fr>
6089
6090 * data/yacc.c (YY_LOCATION_PRINT): New.
6091 Define when we know YYLTYPE's structure, i.e., when the default
6092 YYLLOC_DEFAULT is used.
6093 * data/c.m4 (b4_yysymprint_generate): Use it.
6094 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
6095 value of the result.
6096 (error_start_): Replace with...
6097 (error_range_): this location array.
6098 This allows to replace code relying on the implementation of
6099 locations by portable code.
6100 * data/yacc.c (yylerrsp): Replace with...
6101 (yyerror_range): this.
6102 Every time a token is popped, update yyerror_range[0], to have an
6103 accurate location for the error token.
6104 * data/glr.c (YY_LOCATION_PRINT): New.
6105 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
6106 deference a pointer.
6107 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
6108 report the location in %printers.
6109
6110 * src/scan-skel.l: Instead of abort, report error messages to ease
6111 understanding skeleton scanning failures.
6112
6113 2004-09-16 Akim Demaille <akim@epita.fr>
6114
6115 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
6116 (iterator, const_iterator): these, to be more in the C++ spirit.
6117 Also, return reverse iterators so that when displaying the stack
6118 we display its bottom first.
6119 (Parser::stack_print_, Parser::reduce_print_): Match the messages
6120 from yacc.c.
6121 We should probably use vector here though.
6122
6123 2004-09-16 Akim Demaille <akim@epita.fr>
6124
6125 Have more complete shift traces.
6126
6127 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
6128 to report Shifts instead of ad hoc YYDPRINTF invocations,
6129 including for the error token.
6130 * data/lalr1.cc (symprint_): Output the location.
6131 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
6132 output the location within the %printer.
6133 Activate GLR tests, at least to make sure they compile properly.
6134 They still don't pass though.
6135 * tests/calc.at: Adjust expect verbose output, since now "Entering
6136 state..." is on a different line than the "Shifting" message.
6137
6138 2004-09-08 Akim Demaille <akim@epita.fr>
6139
6140 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
6141 Bison directive from the Bison file to the invocation of this
6142 macro, so that these directives are passed to
6143 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
6144 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
6145 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
6146 the extra Bison directives instead of the whole series.
6147 Change the grammar so that there are recoverable errors, and
6148 unrecoverable errors. Now we can have the parser give up before
6149 consuming the whole input. As a result we now can observe that
6150 the lookahead is freed when needed.
6151 Change the parser source to parse argv[1] instead of a hard coded
6152 string.
6153 Simplify yylex, and give a value and location to EOF.
6154 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
6155 passed directives already coded in the file.
6156 Add some tests to check the location of "error".
6157 For some tests, the C++ parser is correct, and not yacc.c.
6158 For other tests, they provide different, but unsatisfying, values,
6159 so keep the C++ value so that at least one parser is "correct"
6160 according to the test suite.
6161 (Actions after errors): Remove, this is subsumed by the
6162 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
6163
6164 2004-09-06 Akim Demaille <akim@epita.fr>
6165
6166 * data/lalr1.cc: Adjust the indentation of the labels.
6167 (Parser::pop): New.
6168 Use it.
6169
6170 2004-09-06 Akim Demaille <akim@epita.fr>
6171
6172 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
6173 argument, an informative message.
6174 Call YY_SYMBOL_PRINT.
6175 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
6176 * data/lalr1.cc (destruct_): Likewise.
6177 In addition, no longer depend on b4_yysymprint_generate and
6178 b4_yydestruct_generate to generate these functions, do it "by
6179 hand".
6180
6181 2004-09-03 Akim Demaille <akim@epita.fr>
6182
6183 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
6184 invoked, yydestruct the lookahead.
6185 * tests/calc.at (Calculator $1): Update the expected lengths of
6186 traces: there is an added line for the discarded lookahead.
6187 * doc/bison.texinfo (Destructor Decl): Some rewording.
6188 Define "discarded" symbols.
6189
6190 2004-09-02 Akim Demaille <akim@epita.fr>
6191
6192 * data/lalr1.cc (translate_, destruct_): No reason to be static.
6193
6194 2004-09-02 Akim Demaille <akim@epita.fr>
6195
6196 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
6197 (YYDSYMPRINTF): Rename as...
6198 (YY_SYMBOL_PRINT): this.
6199 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
6200 two.
6201 Use it instead of direct symprint_ calls.
6202 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
6203 one.
6204
6205 2004-09-02 Akim Demaille <akim@epita.fr>
6206
6207 * data/lalr1.cc (b4_yysymprint_generate): New.
6208 (symprint_): New member function, defined when YYDEBUG.
6209 Use it consistently instead of token/nterm debugging output by
6210 hand.
6211 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
6212 %printer calls to use cdebug_ when using lalr1.cc.
6213
6214 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
6215
6216 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
6217 with #ifdef YYDEBUG.
6218
6219 2004-08-26 Akim Demaille <akim@epita.fr>
6220
6221 * doc/bison.texinfo (Implementing Loops): Rename as...
6222 (Implementing Gotos/Loops): this.
6223
6224 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
6225
6226 Adjust to latest gnulib.
6227 * bootstrap (gnulib_modules): Add xalloc-die.
6228 Set LC_ALL=C so that file names sort consistently.
6229 Prefer the gnulib copies of gettext.m4, glibc21.m4,
6230 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
6231 uintmax_t.m4, ulonglong.m4.
6232 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
6233 po.m4 since we are now using _gl.m4 instead.
6234
6235 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
6236
6237 * src/scan-action.l: Remove. Scanning of semantic actions is
6238 handled in scan-gram.l.
6239
6240 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
6241
6242 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
6243
6244 * src/location.h (struct): The file member is a uniqstr.
6245 (equal_boundaries): Use UNIQSTR_EQ for comparison.
6246
6247 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
6248
6249 Fix bug with non-%union parsers that have printers or destructors,
6250 which led to a Bison core dump. Reported by Peter Fales in
6251 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
6252
6253 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
6254 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
6255 not to our own type.
6256 * src/output.c (symbol_destructors_output, symbol_printers_output):
6257 Don't assume %union.
6258 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
6259 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
6260 UNION-FLAG. All callers changed.
6261 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
6262 Use type char, not unsigned int, when declaring an array of char;
6263 this lets us remove a cast.
6264 (Printers and Destructors): Add non-%union test cases.
6265
6266 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
6267
6268 * doc/bison.texinfo: Minor editorial changes, mostly to the new
6269 GLR writeups. E.g., avoid frenchspacing and the future tense,
6270 change "lookahead" to "look-ahead", and change "wrt" to "with
6271 respect to".
6272
6273 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6274
6275 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
6276 New sections, split off from the GLR Parsers section. Put the new
6277 Simple GLR Parser near the start of the GLR section, for clarity.
6278 Rewrite connective text.
6279
6280 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
6281
6282 * doc/bison.texinfo (Simple GLR Parsers): New section.
6283
6284 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
6285
6286 * NEWS, TODO, doc/bison.texinfo:
6287 Use "look-ahead" instead of "lookahead", to be consistent.
6288 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
6289 while we're fixing "look-ahead".
6290 * src/conflicts.c (shift_set): Renamed from shiftset.
6291 (look_ahead_set): Renamed from lookaheadset.
6292 * src/print.c: Likewise.
6293 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
6294 name for "lookahead".
6295 (report_types, usage): Likewise.
6296 * src/getargs.h (report_look_ahead_tokens): Renamed from
6297 report_lookaheads.
6298 * src/lalr.c (compute_look_ahead_tokens): Renamed from
6299 compute_lookaheads.
6300 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
6301 (look_ahead_tokens_print): Renamed from lookaheads_print.
6302 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
6303 state_rule_lookaheads_print.
6304 * src/state.h: Likewise.
6305 (reductions.look_ahead_tokens): Renamed from lookaheads.
6306 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
6307 AT_DATA_LOOKAHEADS_GRAMMAR.
6308
6309 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
6310
6311 * README: Update location of patched M4 distribution.
6312
6313 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
6314
6315 Don't assume the C++ compiler takes the same arguments as the C compiler
6316 (trivial change).
6317 * configure.ac (O0CXXFLAGS): New var.
6318 * tests/atlocal.in (CXXFLAGS): Use it.
6319
6320 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
6321
6322 Fix some "make check" problems with C++ reported by
6323 Albert Chin-A-Young for Tru64 C++ in this thread:
6324 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
6325
6326 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
6327 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6328 Output to a .cc file for C++, not to a .c file.
6329 * tests/calc.at (AT_CHECK_CALC): Likewise.
6330 * tests/regression.at (AT_CHECK_DANCER): Likewise.
6331 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
6332
6333 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
6334
6335 * tests/calc.at, tests/actions.at: Workaround for SGI
6336 C++ compiler. (trivial change)
6337
6338 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
6339
6340 Spent a few hours checking out which prerequisite versions the
6341 current sources actually require. I went all the way back to
6342 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
6343 a seemingly endless set of combinations of versions more recent
6344 than that. The bottom line is that the current sources require
6345 fairly recent versions of the build tools, and it'll be some work
6346 to change this.
6347 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
6348 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
6349 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
6350 Add comments explaining why those particular versions are
6351 currently needed.
6352
6353 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
6354 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
6355 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
6356
6357 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
6358 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
6359
6360 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
6361
6362 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
6363 0.11.5. Suggested by Bruno Haible.
6364 * bootstrap: Remove gettext version checking.
6365
6366 * doc/bison.texinfo (Decl Summary): Also mention that %union
6367 can depend on prerequisite types. Problem reported by Tim
6368 Van Holder.
6369
6370 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
6371
6372 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
6373 * README-alpha: Don't tell people not to package this.
6374
6375 * bootstrap: Don't assume $(...) works; use `...` instead.
6376 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
6377 gettext better.
6378
6379 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
6380 put into the -d output file, and mention what to do if YYSTYPE is
6381 defined as a macro.
6382
6383 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
6384
6385 Undo change made earlier today: it caused autopoint to not bring
6386 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
6387 autopoint's.
6388
6389 * bootstrap: Check that gettext version matches what's in
6390 configure.ac. Warn users to ignore robots.txt ERROR 404.
6391 * bootstrap: Undo today's earlier change (logged below).
6392 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
6393
6394 The gettext version checking is causing more trouble than it's
6395 curing; remove it. Problem reported by Paul Hilfinger.
6396
6397 * bootstrap: Issue a warning that one can expect a message
6398 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
6399 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
6400
6401 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
6402
6403 Ensure that the C++ compiler used for testing actually works on a
6404 simple test program; if not, skip the C++-related tests. Problem
6405 reported by Vin Shelton in:
6406 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
6407
6408 * m4/cxx.m4: New file.
6409 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
6410 * tests/atlocal.in (BISON_CXX_WORKS): Add.
6411 * tests/local.at (AT_COMPILE_CXX): Use it.
6412
6413 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
6414
6415 * data/glr.c (yylloc): Output this macro even if locations are not
6416 being generated, as the GLR parser needs it even in that case.
6417 Problem reported by Troy A. Johnson
6418 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
6419
6420 * configure.ac (AC_INIT): Update to 1.875e.
6421
6422 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
6423
6424 * NEWS: Version 1.875d.
6425 * configure.ac (AC_INIT): Likewise.
6426 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
6427
6428 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
6429 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
6430 lalr1.cc runs afoul of the first, and the last two are no longer
6431 supported by GCC 3.4.0.
6432 * README: Mention GNU m4 1.4 or later; mention m4 patches.
6433 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
6434
6435 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
6436
6437 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
6438 unsigned int, for compatibility with latest gnulib hash module.
6439 * src/state.c (state_hash, state_hasher): Likewise.
6440 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
6441 * src/uniqstr.c (hash_uniqstr): Likewise.
6442
6443 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
6444
6445 * NEWS: Unescaped newlines are no longer allowed in char & strings.
6446
6447 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
6448 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
6449 character and string literals.
6450 (unexpected_end): New function.
6451 (unexpected_eof): Use it.
6452 (unexpected_newline): New function.
6453 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
6454 actions.
6455
6456 * NEWS: Document %expect-rr.
6457
6458 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
6459 Fix typo by replacing $1 with $option.
6460 Remove more 'intl'-related files.
6461 Don't DEFUN AM_INTL_SUBDIR twice.
6462
6463 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
6464 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
6465 strtoul.c.
6466 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
6467 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
6468 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
6469 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
6470 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
6471 * src/.cvsignore: Add *.output.
6472
6473 * src/parse-gram.y: Put copyright notice inside %{ %} so it
6474 gets copied to the output file.
6475
6476 2004-04-28 Paul Eggert <eggert@twinsun.com>
6477
6478 Get files from the gnulib and po repositories, instead of relying
6479 on them being in our CVS. Upgrade to latest versions of gnulib
6480 and Automake.
6481
6482 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
6483 * bootstrap: Bootstrap from gnulib and po repositories.
6484 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
6485 * README-cvs: Document these changes. Remove version numbers from
6486 mentions of build tools, since they change so often. Mention Flex.
6487
6488 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
6489 (gl_USE_SYSTEM_EXTENSIONS): Add.
6490 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
6491 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
6492 does this for us.
6493 (AC_ISC_POSIX): Remove; we no longer support this
6494 ancient OS, as it gets in the way of latest Autoconf & gnulib.
6495 (AC_HEADER_STDC): Remove: we now assume C89 or better.
6496 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
6497 Do not check for C89 headers, except for locale.h which is used
6498 by the Yacc library and must port to K&R hosts.
6499 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
6500 Do not check for C89 functions, except for setlocale which is
6501 used by the Yacc library.
6502 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
6503 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
6504 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
6505 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
6506 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
6507 AM_GNU_GETTEXT): Remove; now done by:
6508 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
6509 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
6510 for us.
6511
6512 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
6513 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
6514 Define to empty, as gnulib.mk will do the rest for us.
6515 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
6516 for us.
6517 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
6518 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
6519
6520 * src/files.c: Include gnulib's xstrndup.h.
6521
6522 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
6523 (REALLOC): Use xnrealloc, for likewise.
6524 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
6525 (strnlen, memrchr): Remove decls; functions no longer used.
6526 Include <stpcpy.h>.
6527
6528 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
6529 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6530 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
6531 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
6532 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
6533 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
6534 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
6535 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
6536 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
6537 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
6538 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
6539 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6540 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
6541 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
6542 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
6543 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
6544 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
6545 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
6546 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
6547 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
6548 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
6549 Remove, as these files are now generated automatically
6550 by bootstrap or automake.
6551
6552 * po/ChangeLog: Remove: all but one entry was a duplicate
6553 of this file, and I moved that 2000-11-02 entry here.
6554
6555 * config/.cvsignore: Add Makefile, depcomp, install-sh.
6556 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
6557 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
6558 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
6559 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
6560 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
6561 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
6562 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
6563 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
6564 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
6565 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
6566 xstrndup.h.
6567 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
6568 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
6569 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
6570 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
6571 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
6572 * src/.cvsignore: Remove *_.c.
6573
6574
6575 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
6576 support it. (The latest stable gzip doesn't.)
6577
6578 2004-04-27 Paul Eggert <eggert@twinsun.com>
6579
6580 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
6581 case, as stos_ is now used by destructors due to the 2004-02-09
6582 change.
6583
6584 Remove more K&R C support.
6585 * lib/libiberty.y (PARAMS): Remove. All uses removed.
6586 * lib/subpipe.c (errno): Remove decl.
6587 Include <stdlib.h> unconditionally.
6588 (EXIT_FAILURE): Remove macro.
6589 * src/complain.c (vfprintf, strerror): Remove.
6590 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
6591 unconditionally.
6592 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
6593 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
6594 (strchr, strspn, memchr): Remove decls.
6595 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
6596 unconditionally. Do not declare perror.
6597 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
6598 unconditionally.
6599
6600 * src/complain.c (_): Remove useless defn, as system.h defines this.
6601
6602 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
6603 with latest obstack.h.
6604 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
6605 to procedure types, as obstack.h now does that for us.
6606 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
6607
6608 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
6609 so that this include file can stand alone.
6610 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
6611 does this now. Include subpipe.h first after config.h, to
6612 test whether it can stand alone.
6613
6614 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
6615 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
6616 unused declaration.
6617
6618 * tests/synclines.at (%union synch line): Put a dummy member in
6619 the union, because empty unions aren't allowed in C. Caught
6620 by GCC 3.4.0.
6621
6622 2004-04-13 Jim Meyering <jim@meyering.net>
6623
6624 * src/conflicts.c (conflicts_print): Correct format string typo:
6625 use `%%' to produce literal `%'. (trivial change)
6626
6627 2004-03-30 Paul Eggert <eggert@twinsun.com>
6628
6629 * src/getargs.c (version): Update copyright year to 2004.
6630
6631 * data/c.m4 (b4_int_type): Use 'short int' rather than
6632 'short', and similarly for 'long', 'unsigned', etc.
6633 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
6634 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
6635 yy_yypstack, yydumpstack): Likewise.
6636 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
6637 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
6638 Likewise.
6639 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
6640 yy_stack_print, yyparse): Likewise.
6641 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
6642 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
6643 * lib/bitset.c (bitset_print): Likewise.
6644 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
6645 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6646 * lib/bitsetv.c (bitsetv_dump): Likewise.
6647 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
6648 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
6649 Likewise.
6650 * src/LR0.c (allocate_itemsets): Likewise.
6651 * src/gram.h (rule_number, rule): Likewise.
6652 * src/lalr.h (goto_number): Likewise.
6653 * src/nullable.c (nullable_compute): Likewise.
6654 * src/output.c (prepare_rules): Likewise.
6655 * src/relation.c (relation_print, relation_digraph): Likewise.
6656 * src/relation.h (relation_node): Likewise.
6657 * src/state.h (state_number, transitions, errs, reductions,
6658 struct state): Likewise.
6659 * src/symtab.h (symbol_number, struct symbol): Likewise.
6660 * src/tables.c (vector_number, tally, action_number,
6661 default_goto, goto_actions): Likewise.
6662 * tests/existing.at (GNU Cim Grammar): Likewise.
6663 * tests/regression.at (Web2c Actions): Likewise.
6664
6665 * src/output.c (muscle_insert_short_int_table): Renamed from
6666 muscle_insert_short_table. All uses changed.
6667
6668 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6669
6670 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
6671 (declaration): Replace expected_conflicts with expected_sr_conflicts.
6672 Add %expect-rr rule.
6673
6674 * src/scan-gram.l: Recognize %expect-rr.
6675
6676 * src/conflicts.h (expected_sr_conflicts): Rename from
6677 expected_conflicts.
6678 (expected_rr_conflicts): Declare.
6679
6680 * src/conflicts.c (expected_sr_conflicts): Rename from
6681 expected_conflicts.
6682 (expected_rr_conflicts): Define.
6683 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
6684 for GLR parsers.
6685 Use expected_sr_conflicts in place of expected_conflicts.
6686 Warn if expected_rr_conflicts used in non-GLR parser.
6687
6688 * doc/bison.texinfo: Add documentation for %expect-rr.
6689
6690 2004-03-08 Paul Eggert <eggert@gnu.org>
6691
6692 Add support for hex token numbers. Suggested by Odd Arild Olsen in
6693 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
6694
6695 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
6696 in lalr1.cc.
6697 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
6698 * src/scan-gram.l (scan_integer): New function.
6699 ({int}): Use it.
6700 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
6701 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
6702 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
6703 Say "long int", not "long", for uniformity with GNU style.
6704
6705 2004-02-25 Paul Eggert <eggert@twinsun.com>
6706
6707 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
6708 compilers. This fixes a problem with Intel's C++ compiler being
6709 chatty, reported by Guido Trentalancia in
6710 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
6711
6712 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
6713
6714 Support %destructor and merge error locations in lalr1.cc.
6715
6716 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
6717 (Parser::stos_): Define unconditionally.
6718 (Parser::destruct_): New method. Generate its body with
6719 b4_yydestruct_generate.
6720 (Parser::error_start_): New attribute.
6721 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
6722 token which are discarded.
6723 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
6724 error_start_ when erroneous token are discarded.
6725 (Parser::parse) <yyerrlab1>: Compute the location of the error
6726 token so that it covers all the discarded tokens.
6727 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
6728 it can be called with `%skeleton "lalr1.cc"', and do that.
6729
6730 2004-02-02 Paul Eggert <eggert@twinsun.com>
6731
6732 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
6733 $(top_srcdir)/lib and ../lib. This fixes a bug reported
6734 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
6735 There's no need to mention top_builddir since Automake does that
6736 for us.
6737 (INCLUDES): Remove, as Automake says it's obsolescent.
6738 Contents migrated into AM_CPPFLAGS as described above.
6739 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
6740
6741 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6742
6743 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
6744 (yyreportSyntaxError): Handle case where lookahead token is
6745 YYEMPTY.
6746
6747 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6748
6749 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
6750 resulting parsers are compilable with C++.
6751
6752 2003-12-23 Paul Eggert <eggert@twinsun.com>
6753
6754 * config/depcomp, config/install-sh: Sync with Automake 1.8.
6755 * src/output.c (output_skeleton): Rename local var.
6756 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
6757 Bison tokens, as this runs afoul of the 2003-10-07 change that
6758 disallowed NUL bytes in character constants or string literals.
6759
6760 * tests/local.at: Require Autoconf 2.59's Autotest.
6761 * tests/testsuite.at: Don't include local.at, since we now assume
6762 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
6763 including it.
6764 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
6765 multiple inclusion warnings.
6766
6767 2003-12-02 Akim Demaille <akim@epita.fr>
6768
6769 * doc/bison.texinfo (How Can I Reset the Parser): More about start
6770 conditions.
6771 From Bruno Haible.
6772
6773 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
6774
6775 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
6776
6777 2003-10-07 Paul Eggert <eggert@twinsun.com>
6778
6779 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
6780 if testsuite doesn't exist.
6781
6782 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
6783 literals, unfortunately.
6784 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
6785 Complain about NUL bytes in character constants or string literals.
6786
6787 2003-10-05 Paul Eggert <eggert@twinsun.com>
6788
6789 * NEWS: Don't document %no-default-prec, as it's still
6790 too experimental.
6791 * doc/bison.texinfo: Document %no-default-prec only if
6792 the defaultprec flag is set. Normally it's not.
6793
6794 2003-10-04 Paul Eggert <eggert@twinsun.com>
6795
6796 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
6797 non-modifiable lvalue, instead of a modifiable one.
6798 * doc/bison.texinfo (Actions): Document that $$ can
6799 be assigned to. Do not claim that $$ and $N are
6800 array element references: user code should not rely on this.
6801
6802 2003-10-01 Paul Eggert <eggert@twinsun.com>
6803
6804 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
6805 (grammar_declaration): Use it.
6806 * src/scan-gram.l: New token %no-default-prec.
6807 * tests/conflicts.at: Revamp tests to use %no-default-prec.
6808 * NEWS, doc/bison.texinfo: Document the above.
6809
6810 2003-10-01 Akim Demaille <akim@epita.fr>
6811
6812 VCG no longer supports long_straight_phase.
6813
6814 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
6815 * src/print_graph.c (print_graph): Adjust.
6816
6817 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
6818 and Paul Eggert <eggert@twinsun.com>
6819
6820 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
6821 Table of Symbols): Document %default-prec.
6822 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
6823 (grammar_declaration): Set default_prec on %default-prec.
6824 * src/scan-gram.l (%default-prec): New token.
6825 * src/reader.h (default_prec): New flag.
6826 * src/reader.c: Likewise.
6827 (packgram): Handle it.
6828 * tests/conflicts.at (%default-prec without %prec,
6829 %default-prec with %prec, %default-prec 1): New tests.
6830
6831 2003-09-30 Paul Eggert <eggert@twinsun.com>
6832
6833 * tests/testsuite.at: Include local.at, not input.at, fixing
6834 a typo in the 2003-08-25 patch.
6835
6836 2003-08-27 Akim Demaille <akim@epita.fr>
6837
6838 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
6839 GCC warnings.
6840
6841 2003-08-26 Akim Demaille <akim@epita.fr>
6842
6843 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
6844 "<\#" to avoid magic from Gnus when posting parts of this script.
6845
6846 2003-08-26 Akim Demaille <akim@epita.fr>
6847
6848 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
6849 (Parser::parse): here.
6850 Adjust: nerrs and errstatus is now replaced by...
6851 (Parser::nerrs_, Parser::errstatus_): New.
6852
6853 2003-08-25 Akim Demaille <akim@epita.fr>
6854
6855 * config/announce-gen, Makefile.cfg: New.
6856 * Makefile.am: Adjust.
6857 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
6858 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
6859
6860 2003-08-25 Akim Demaille <akim@epita.fr>
6861
6862 When reducing initial empty rules, Bison parser read an initial
6863 location that is not defined. This results in garbage, and that
6864 affects Bison's own parser. Therefore we need (i) to extend Bison
6865 to support a means to initialize this location, and (ii) to use
6866 this CVS Bison to fix CVS Bison's parser.
6867
6868 * src/reader.h, reader.c (epilogue_augment): Remove, replace
6869 with...
6870 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
6871 * src/parse-gram.y: Adjust.
6872 (%initial-action): New.
6873 (%error-verbose): Since we require CVS Bison, there is no reason
6874 not to use it.
6875 * src/scan-gram.l: Adjust.
6876 * src/Makefile.am (YACC): New, to make sure we use our own parser.
6877 * data/yacc.c (yyparse): Use b4_initial_action.
6878
6879 2003-08-25 Akim Demaille <akim@epita.fr>
6880
6881 * doc/bison.texinfo: Don't promote stdout for error messages.
6882
6883 2003-08-25 Akim Demaille <akim@epita.fr>
6884
6885 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
6886 From Alexandre Duret-Lutz.
6887
6888 2003-08-25 Akim Demaille <akim@epita.fr>
6889
6890 Version 1.875c.
6891
6892 2003-08-25 Akim Demaille <akim@epita.fr>
6893
6894 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
6895 Use them.
6896
6897 2003-08-25 Akim Demaille <akim@epita.fr>
6898
6899 * data/lalr1.cc (Parser::reduce_print_): New.
6900 Use it.
6901
6902 2003-08-25 Akim Demaille <akim@epita.fr>
6903
6904 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
6905 error recovery loops. This patch is based on
6906 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
6907 Also, augment the similarity between lalr1.cc and yacc.c.
6908 Note: the locations of error recovery rules are not correct yet.
6909
6910 * data/lalr1.cc: Comment changes to augment the similarity between
6911 lalr1.cc and yacc.c.
6912 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
6913 (yyerrlab1): Remove, but where it used to be (now the bottom part of
6914 yyerrlab), when hitting EOF, pop the whole stack here instead of
6915 merely falling thru the default error handling mechanism.
6916 (yyerrorlab): New label, with the old contents of YYERROR,
6917 plus the following change: pop the stack of rhs corresponding
6918 to the production that invoked YYERROR. That is how Yacc
6919 behaves (required by POSIX).
6920 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6921 fail.
6922
6923 2003-08-25 Akim Demaille <akim@epita.fr>
6924
6925 Tune local.at so that people can "autom4te -l autotest calc.at -o
6926 calc" for instance, to extract a sub test suite.
6927
6928 * tests/testsuite.at: Move the initialization, Autotest version
6929 requirement, and AT_TESTED invocation into...
6930 * tests/local.at: here.
6931 * tests/testsuite.at: Include it for compatibility with Autoconf
6932 2.57.
6933 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6934 be ignore.
6935
6936 2003-08-04 Paul Eggert <eggert@twinsun.com>
6937
6938 Rework code slightly to avoid gcc -Wtraditional warnings.
6939 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6940 The returned value is now stored in *YY0. All callers changed.
6941 * src/output.c (merge_output): Adjust to the above change.
6942
6943 2003-07-26 Paul Eggert <eggert@twinsun.com>
6944
6945 * data/glr.c (YYASSERT): New macro.
6946 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6947 yyresolveStates, yyprocessOneStack):
6948 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6949 Derived from a suggestion by Frank Heckenbach.
6950
6951 2003-07-25 Paul Eggert <eggert@twinsun.com>
6952
6953 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6954 for portability to K&R C (after ansi2knr, presumably). See
6955 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
6956 by Frank Heckenbach, though I have omitted the structure-initialization
6957 part of his glr-knr.diff patch since I recall that the Portable
6958 C Compiler didn't require that change.
6959
6960 Let the user specify how to allocate and free memory.
6961 Derived from a suggestion by Frank Heckenbach in
6962 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
6963 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6964 All uses of free, malloc, realloc changed to use these macros,
6965 and unnecessary casts removed.
6966 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6967
6968 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6969
6970 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6971 use s.empty() rather than s == "" to test for empty string; see
6972 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
6973 (trivial change)
6974
6975 2003-06-25 Akim Demaille <akim@epita.fr>
6976
6977 * config/depcomp, config/install-sh: Update from masters.
6978
6979 2003-06-20 Paul Eggert <eggert@twinsun.com>
6980
6981 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6982 and return properly parenthesized result.
6983 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6984 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6985 Remove unnecessary parentheses from uses.
6986 * doc/bison.texinfo (Location Default Action): Describe the
6987 conventions for parentheses.
6988
6989 2003-06-19 Paul Eggert <eggert@twinsun.com>
6990
6991 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6992 yyreportTree): Do not assume that size_t is the same width as int,
6993 when printing sizes. Print sizes using an unsigned format.
6994 Problem reported by Frank Heckenbach in
6995 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
6996
6997 Port to Forte Developer 7 C compiler.
6998 * data/glr.c (struct YYLTYPE): If locations are not being used,
6999 declare a single dummy member, as empty structs do not conform
7000 to the C standard.
7001 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
7002 the Forte Developer 7 C compiler complains that end-of-loop
7003 code is not reached.
7004
7005 2003-06-17 Paul Eggert <eggert@twinsun.com>
7006
7007 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
7008 avoid warnings from picky compilers about redefinition of PARAMS.
7009
7010 2003-06-17 Paul Eggert <eggert@twinsun.com>
7011
7012 Version 1.875b.
7013
7014 * NEWS: Document 1.875b.
7015
7016 * lib/bbitset.h: Do not include config.h; that's the includer's job.
7017 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
7018 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
7019 Don't use 'index' in comments, as it's a builtin fn on some hosts.
7020 * lib/bitset_stats.c: Include gettext.h unconditionally, as
7021 per recent gettext manual's suggestion.
7022 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
7023 Use prototypes, not old-style definitions.
7024 * lib/lbitset.c (lbitset_unused_clear): Likewise.
7025 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
7026 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
7027 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
7028 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
7029 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
7030 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
7031 vbitset_or_and_cmp, vbitset_copy): Likewise.
7032
7033 * lib/libiberty.h: Do not include config.h; that's the includer's job.
7034 Do not include <stdlib.h>.
7035 (PARAMS): Define unconditionally for C89.
7036 (ATTRIBUTE_NORETURN): Remove.
7037 (ATTRIBUTE_UNUSED): Define unconditionally.
7038
7039 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
7040 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
7041 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
7042 * lib/vbitset.c, lib/vbitset.h: New files.
7043 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
7044 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
7045 from libbitset.
7046
7047 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
7048 `How Can I Reset @code{yyparse}', since texinfo does not allow
7049 arbitrary @ in node names.
7050
7051 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
7052 shouldn't be needed according to the gettext 0.12.1 documentation
7053 but which seem to be needed anyway: codeset.m4 glibc21.m4
7054 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
7055 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
7056 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
7057
7058 * lib/.cvsignore: Add stdbool.h.
7059 * m4/.cvsignore: Add nls.m4, po.m4.
7060
7061 Upgrade to CVS gnulib.
7062 * stdbool_.h: File renamed from stdbool.h.in.
7063 * configure.ac (AM_STDBOOL_H): Invoke this instead of
7064 AC_HEADER_STDBOOL.
7065 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
7066 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
7067 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
7068 (MOSTLYCLEANFILES): New var.
7069 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
7070 (stdbool.h): New rule.
7071 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
7072 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
7073 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
7074 m4/quote.m4: Upgrade to today's gnulib.
7075
7076 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
7077 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
7078 the tests right now.
7079 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
7080 yyerror are declared before use; C99 requires this.
7081
7082 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7083
7084 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
7085 first.
7086 (yyrecoverSyntaxError): Correct the logic for setting and testing
7087 yyerrState.
7088 Correct comment on handling EOF.
7089 Allow states with only a default reduction, rather than failing
7090 (I can't quite reconstruct why these were not allowed before).
7091
7092 Fixes to avoid problem that $-N rules in GLR parsers can cause
7093 buffer overruns, corrupting state.
7094
7095 * src/output.c (prepare_rules): Output max_left_semantic_context
7096 definition.
7097 * src/reader.h (max_left_semantic_context): New variable declaration.
7098 * src/scan-gram.l (max_left_semantic_context): Define.
7099 (handle_action_dollar): Update max_left_semantic_context.
7100 * data/glr.c (YYMAXLEFT): New definition.
7101 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
7102 (yyresolveAction): Ditto.
7103
7104 Fixes to problems with location handling in GLR parsers reported by
7105 Frank Heckenbach (2003/06/05).
7106
7107 * data/glr.c (YYLTYPE): Make trivial if locations not used.
7108 (YYRHSLOC): Add parentheses, and define only if locations used.
7109 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
7110 locations not used.
7111 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
7112 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
7113
7114 * tests/cxx-type.at: Exercise location information; update tests
7115 to differentiate output with and without locations.
7116 Remove forward declarations of yylex and yyerror---caused errors
7117 because default YYLTYPE not yet defined.
7118 Change semantic actions to compute strings, rather than printing
7119 them directly (to test proper passing of semantics values). Change
7120 output to prefix notation and update test data and expected results.
7121 (yylex): Track locations.
7122 (stmtMerge): Return value rather than printing, and include arguments
7123 in value.
7124
7125 2003-06-03 Paul Eggert <eggert@twinsun.com>
7126
7127 Avoid warnings generated by GCC 2.95.4 when Bison is
7128 configured with --enable-gcc-warnings.
7129 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
7130 yy::]b4_parser_class_name[::translate_,
7131 yy::Stack::operator[] (unsigned),
7132 yy::Stack::operator[] (unsigned) const,
7133 yy::Slice::operator[] (unsigned),
7134 yy::Slice::operator[] (unsigned) const):
7135 Rename local vars to avoid warnings.
7136 * tests/glr-regression.at (Improper handling of embedded actions
7137 and $-N in GLR parsers): Remove unused local variable from yylex.
7138 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
7139 (void) as arg when not pure, since we now assume C89 when building
7140 Bison. Pacify GCC by using parameter.
7141
7142 2003-06-02 Paul Eggert <eggert@twinsun.com>
7143
7144 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
7145 yy::Location::lines, yy::Location::columns): Rename arguments
7146 to avoid shadowing; this removes a warning generated by GCC 3.3.
7147
7148 2003-06-01 Paul Eggert <eggert@twinsun.com>
7149
7150 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
7151 to g++, as GCC 3.3 complains if you do it.
7152 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
7153 everything that WARNING_CFLAGS has, except omit warnings
7154 not suitable for C++.
7155 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
7156 * tests/atlocal.in (CXXFLAGS): New var.
7157 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
7158
7159 Fix a GLR parser bug I reported in February; see
7160 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
7161 The problem was that GLR parsers did not conform to the C standard,
7162 because actions like { $1 = $2 + $3; } expanded to expressions
7163 that invoked YYFILL in separate subexpressions, and YYFILL assigned
7164 to a local variable. The C standard says that expressions
7165 like (var = f ()) + (var = f ()) have undefined behavior.
7166 Another problem was that GCC sometimes issues warnings that
7167 yyfill and its parameters are unused.
7168
7169 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
7170 as possibly unused.
7171 (yyfill): New function.
7172 (YYFILL): Use it.
7173 (yyuserAction): Change type of yynormal to bool, so that it matches
7174 the new yyfill signature. Mark it as possibly unused.
7175
7176
7177 Follow up on a bug I reported in February, where a Bison-generated
7178 parser can loop. Provide a test case and a fix for yacc.c. I
7179 don't have a fix for lalr1.cc or for glr.c, unfortunately.
7180 The original bug report is in:
7181 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
7182
7183 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
7184 macro's size was becoming unwieldy.
7185 (yyerrlab): Do not discard an empty lookahead symbol, as this
7186 might destroy garbage.
7187 (yyerrorlab): New label, with the old contents of YYERROR,
7188 plus the following change: pop the stack of rhs corresponding
7189 to the production that invoked YYERROR. That is how Yacc
7190 behaves, and POSIX requires this behavior.
7191 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
7192 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
7193 Define 'alarm' to do nothing if unistd.h is not available.
7194 Add a new rule "exp: '-' error;" to test the above change to
7195 data/yacc.c. Use 'alarm' to abort any test taking longer than
7196 10 seconds, as it's probably looping.
7197 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
7198 Also, the new yacc.c generates two fewer diagnostics for an
7199 existing test.
7200
7201 2003-05-24 Paul Eggert <eggert@twinsun.com>
7202
7203 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
7204 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
7205 This fixes a problem reported by John Bowman when the Compaq/HP
7206 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
7207 -ansi -Wall -gall).
7208 * data/yacc.c (union yyalloc): Likewise.
7209 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
7210
7211 Switch from 'int' to 'bool' where that makes sense.
7212
7213 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
7214 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
7215 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
7216 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
7217 Return or accept bool, not int. All callers changed.
7218 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
7219 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
7220 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
7221 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
7222 bitset_or_and_cmp_): Likewise.
7223 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
7224 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
7225 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
7226 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
7227 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
7228 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
7229 bitset_stats_or_and_cmp): Likewise.
7230 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
7231 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
7232 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
7233 ebitset_xor_cmp): Likewise.
7234 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
7235 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
7236 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
7237 lbitset_xor_cmp): Likewise.
7238 * lib/bbitset.h: Include <stdbool.h>.
7239 (struct bitset_vtable): The following members now return bool, not
7240 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
7241 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
7242 or_and_cmp).
7243 * src/conflicts.c (count_rr_conflicts): Likewise.
7244 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
7245 All uses changed.
7246 * lib/ebitset.c (ebitset_obstack_init): Likewise.
7247 * lib/lbitset.c (lbitset_obstack_init): Likewise.
7248 * src/getargs.c (debug_flag, defines_flag, locations_flag,
7249 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
7250 graph_flag): Likewise.
7251 * src/getargs.h (debug_flag, defines_flag, locations_flag,
7252 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
7253 graph_flag): Likewise.
7254 * src/output.c (error_verbose): Likewise.
7255 * src/output.h (error_verbose): Likewise.
7256 * src/reader.c (start_flag, typed): Likewise.
7257 * src/reader.h (typed): Likewise.
7258 * src/getargs.c (LOCATIONS_OPTION): New constant.
7259 (long_options, getargs): Use it.
7260 * src/lalr.c (build_relations): Use bool, not int.
7261 * src/nullable.c (nullable_compute): Likewise.
7262 * src/print.c (print_reductions): Likewise.
7263 * src/tables.c (action_row, pack_vector): Likewise.
7264 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
7265 * src/output.c (prepare): Use it.
7266 * src/output.c (token_definitions_output,
7267 symbol_destructors_output, symbol_destructors_output): Use string,
7268 not boolean integer, to keep track of whether to output separator.
7269 * src/print_graph.c (print_core): Likewise.
7270 * src/state.c (state_rule_lookaheads_print): Likewise.
7271
7272 * config/install-sh: Sync from automake 1.7.5.
7273
7274 2003-05-14 Paul Eggert <eggert@twinsun.com>
7275
7276 * src/parse-gram.y (rules_or_grammar_declaration): Require a
7277 semicolon after a grammar declaration, in the interest of possible
7278 future changes to the Bison input language.
7279 Do not allow a stray semicolon at the start of the grammar.
7280 (rhses.1): Allow one or more semicolons after any rule, including
7281 just before "|" as required by POSIX.
7282 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
7283 grammar.
7284
7285 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
7286
7287 %parse-param support for lalr1.cc.
7288
7289 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
7290 b4_cc_constructor_calls, b4_cc_constructor_call,
7291 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
7292 definitions.
7293 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
7294 parse-param arguments.
7295 (yy::b4_parser_class_name): Declare instance variables to
7296 hold parse-param arguments.
7297 * tests/calc.at: s/value/semantic_value/ because value clashes
7298 with a member of yy::b4_parser_class_name. Adjust C++ code
7299 to handle %parse-param. Enable %parse-param test in C++.
7300
7301 2003-05-12 Paul Eggert <eggert@twinsun.com>
7302
7303 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
7304 English a bit. Fix fclose typo. Change "const char" to "char
7305 const", and use ANSI C rather than K&R for "main". Suggest
7306 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
7307 and suggest yy_switch_to_buffer.
7308
7309 2003-05-05 Paul Eggert <eggert@twinsun.com>
7310
7311 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
7312 C89. This avoids a diagnostic on compilers that define __STDC__
7313 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
7314 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
7315
7316 2003-05-03 Paul Eggert <eggert@twinsun.com>
7317
7318 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
7319 Do not overrun array bounds.
7320 This should fix a bug reported today by Olatunji Oluwabukunmi in
7321 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
7322
7323 2003-04-29 Akim Demaille <akim@epita.fr>
7324
7325 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
7326 * src/getargs.c, src/getargs.h: here, as bool, not int.
7327 (nondeterministic_parser): New.
7328 * src/parse-gram.y, src/scan-gram.l: Support
7329 %nondeterministic-parser.
7330 * src/output.c (prepare): Use nondeterministic_parser instead
7331 of glr_parser where appropriate.
7332 * src/tables.c (conflict_row, action_row, save_row)
7333 (token_actions, token_actions, pack_vector): Ditto.
7334
7335 2003-04-29 Akim Demaille <akim@epita.fr>
7336
7337 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
7338
7339 2003-04-29 Akim Demaille <akim@epita.fr>
7340
7341 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
7342 with %pure-parser and %locations to exercise the patch from Yakov
7343 Markovitch below.
7344
7345 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
7346
7347 * data/yacc.c: (b4_lex_param): Corrected for the case where
7348 %lex-param is provided and %pure-parser isn't.
7349
7350 2003-04-27 Paul Eggert <eggert@twinsun.com>
7351
7352 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
7353 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
7354 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
7355 if it is not defined.
7356 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
7357
7358 2003-04-26 Paul Eggert <eggert@twinsun.com>
7359
7360 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
7361 Declare to be of type suitable for the ninf value itself, not of
7362 type suitable for the corresponding table, since the latter might
7363 be unsigned but the ninf value might be negative. This fixes a
7364 bug reported by Alexandre Duret-Lutz in
7365 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
7366
7367 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
7368 invokes it. We shouldn't invoke it twice because it will attempt
7369 to put error.o in the archive twice. This fixes a glitch reported
7370 by Martin Mokrejs in
7371 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
7372
7373 2003-04-21 Paul Eggert <eggert@twinsun.com>
7374
7375 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
7376 to gnulib.
7377
7378 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
7379
7380 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
7381 Fix obvious typo that results in uncompilable GLR parsers
7382 when both %pure-parser and %locations are used. (trivial change)
7383
7384 2003-04-17 Paul Eggert <eggert@twinsun.com>
7385
7386 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
7387 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
7388 Do not insert the expected token via unput, as this runs afoul
7389 of a POSIX-compatibility bug in flex 2.5.31.
7390 All uses changed to BEGIN the parent state,
7391 since we no longer insert the expected token via unput.
7392 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
7393 that is no longer emitted after the above change.
7394
7395 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
7396 the first one. This change is from Paul Hilfinger, and it fixes
7397 regression reported by Werner Lemberg in
7398 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
7399
7400 (resolve_sr_conflict): Don't invoke state_errs_set
7401 unless one or more tokens have been explicitly made errors.
7402 Otherwise, the above change causes Bison to abort.
7403
7404 * tests/existing.at (GNU pic Grammar): New test case, taken from
7405 Lemberg's email.
7406
7407 2003-03-31 Akim Demaille <akim@epita.fr>
7408
7409 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
7410
7411 2003-03-31 Akim Demaille <akim@epita.fr>
7412
7413 * src/output.c (prepare_symbols): Avoid trailing spaces in the
7414 output.
7415
7416 2003-03-31 Akim Demaille <akim@epita.fr>
7417
7418 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
7419 From Paul Hilfinger.
7420
7421 2003-03-29 Akim Demaille <akim@epita.fr>
7422
7423 * m4/error.m4: Do not put under dynamic conditions some code which
7424 expansion is under static control.
7425
7426 2003-03-29 Akim Demaille <akim@epita.fr>
7427
7428 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
7429
7430 2003-03-29 Akim Demaille <akim@epita.fr>
7431
7432 * doc/bison.texinfo (Strings are Destroyed): New.
7433
7434 2003-03-13 Paul Eggert <eggert@twinsun.com>
7435
7436 * .cvsignore: Add configure.lineno.
7437 * src/.cvsignore: Add yacc.
7438 * tests/.cvsignore: Add testsuite.log.
7439 * doc/fdl.texi: Sync with latest FSF version.
7440
7441 2003-03-12 Paul Eggert <eggert@twinsun.com>
7442
7443 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
7444 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
7445 cursor, instead of leaving it undefined. This fixes a bug
7446 reported by Tim Van Holder in
7447 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
7448 * tests/input.at (Torturing the Scanner): Test the scanner on
7449 an empty input file, which was Tim Van Holder's test case.
7450
7451 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
7452 <sys/resource.h> can be included, include sys/time.h and
7453 sys/times.h first, if available. This works around the SunOS
7454 4.1.4 porting bug reported by Bruce Becker in
7455 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
7456
7457 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
7458 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
7459 AC_HEADER_SYS_WAIT.
7460
7461 Merge changes from gnulib. This was prompted because the CVS
7462 snapshot didn't build on Solaris 7 due to strnlen problems.
7463
7464 These changes need to be merged back into gnulib:
7465 * lib/hash.c: Include <stdbool.h> unconditionally.
7466 * m4/onceonly.m4 (m4_quote): New macro.
7467 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
7468 Quote AC_FOREACH variable-expansions properly.
7469 The 2003-01-03 obstack.h change also needs merging.
7470 {end of changes requiring merging}
7471
7472 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
7473 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
7474 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
7475 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
7476 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
7477 New files, imported from gnulib.
7478 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
7479 above.
7480
7481 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
7482 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
7483 gnulib sources.
7484
7485 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
7486 Add.
7487 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
7488 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
7489 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
7490 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
7491 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
7492 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
7493 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
7494 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
7495 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
7496 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
7497 (jm_PREREQ_ARGMATCH): Remove.
7498 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
7499 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
7500
7501 * src/system.h: Include <stdbool.h> unconditionally.
7502
7503 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
7504 assuming at least C89 in the bitset code for some time now.
7505
7506 2003-03-03 Akim Demaille <akim@epita.fr>
7507
7508 * ro.po: New.
7509
7510 2003-03-02 Akim Demaille <akim@epita.fr>
7511
7512 * doc/bison.texinfo (Table of Symbols): Reactivate the
7513 documentation for %lex-param, and %parse-param.
7514
7515 2003-03-02 Akim Demaille <akim@epita.fr>
7516
7517 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
7518 generate verbose error messages.
7519 Use the number of tokens as an upper bound in yytname, as it
7520 cannot be a non terminal.
7521
7522 2003-03-02 Akim Demaille <akim@epita.fr>
7523
7524 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
7525 message.
7526
7527 2003-03-02 Akim Demaille <akim@epita.fr>
7528
7529 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
7530 Use them to exercise yycheck overrun.
7531 Based on Andrew Suffield's grammar.
7532
7533 2003-03-02 Akim Demaille <akim@epita.fr>
7534
7535 Create tests/local.at for Bison generic testing macros.
7536
7537 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
7538 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
7539 This new file.
7540 * tests/calc.at (AT_CHECK_CALC): Adjust.
7541 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
7542 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
7543 * tests/local.at: here.
7544 (AT_COMPILE_CXX): Tags the tests using it as c++.
7545 Ignore the test if CXX is not functional.
7546
7547 2003-03-01 Paul Eggert <eggert@twinsun.com>
7548
7549 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
7550 not loc->end, since loc->end might contain garbage and this leads
7551 to undefined behavior on some platforms.
7552 (id_loc, token_start): Use (IF_LINTed) initial values that do not
7553 depend on *loc, so that the reader doesn't give the the false
7554 impression that *loc is initialized.
7555 (<INITIAL>"%%"): Do not bother setting code_start, since its value
7556 does not survive the return.
7557
7558 2003-03-01 Akim Demaille <akim@epita.fr>
7559
7560 * src/scan-gram.l (code_start): Always initialize it when entering
7561 into yylex, as SC_EPILOGUE is activated *before* the corresponding
7562 yylex invocation. An alternative would be making it static, but
7563 then it starts with the second %%'s beginning, instead of its end.
7564
7565 2003-02-28 Paul Eggert <eggert@twinsun.com>
7566
7567 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
7568 around a UnixWare 7.1.1 porting bug reported by John Hughes in
7569 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
7570
7571 2003-02-26 Paul Eggert <eggert@twinsun.com>
7572
7573 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
7574 Remove Sequent/Pyramid discussion (nobody uses them any more).
7575 Merge VMS and MS-DOS discussion; these ports may well be dead
7576 but let's keep mentioning them for now. Put <> around email
7577 addresses. Add copyright notice.
7578
7579 2003-02-24 Paul Eggert <eggert@twinsun.com>
7580
7581 * data/glr.c (yy_reduce_print): yylineno -> yylno,
7582 to avoid collision with flex use of yylineno.
7583 Problem reported by Bruce Lilly in
7584 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
7585 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7586 * data/yacc.c (yy_reduce_print): Likewise.
7587
7588 * config/depcomp: Sync with Automake 1.7.3.
7589
7590 2003-02-21 Akim Demaille <akim@epita.fr>
7591
7592 * data/lalr1.cc: Use temporary variables instead of casts to
7593 change integer types.
7594 Suggested by Paul Eggert.
7595
7596 2003-02-21 Akim Demaille <akim@epita.fr>
7597
7598 * doc/bison.texinfo: Use "location" consistently to refer to @n,
7599 to avoid confusions with lalr1.cc's notion of Position.
7600 Suggested by Paul Eggert.
7601
7602 2003-02-20 Akim Demaille <akim@epita.fr>
7603
7604 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
7605 before initial_columns.
7606 (location.hh): Use consistent variable names when defining the
7607 operator<<.
7608 Use "last" so that we subtract from Positions, not from unsigned.
7609
7610 2003-02-20 Akim Demaille <akim@epita.fr>
7611
7612 * data/lalr1.cc (position.hh): New subfile, including the extended
7613 and Doxygen'ed documentation of class Position.
7614 (location.hh): Use it.
7615 Document a` la Doxygen.
7616 With the help of Benoit Perrot.
7617
7618 2003-02-20 Akim Demaille <akim@epita.fr>
7619
7620 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
7621 AT_YACC_IF.
7622 Redefine AT_YYERROR_SEES_LOC_IF using it.
7623 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
7624 not defined.
7625 Don't use the location in yy::Parser::error_ and
7626 yy::Parser::print_ when not %locations.
7627 Activate more lalr1.cc tests.
7628
7629 2003-02-19 Akim Demaille <akim@epita.fr>
7630
7631 * data/lalr1.cc: When displaying a line number, be sure to make it
7632 an int.
7633
7634 2003-02-19 Akim Demaille <akim@epita.fr>
7635
7636 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
7637 Remove, useless.
7638 (YYABORT, YYACCEPT, YYERROR): New.
7639 * tests/calc.at: Renable the lalr1.cc test.
7640
7641 2003-02-19 Akim Demaille <akim@epita.fr>
7642
7643 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
7644 error recovery, mixing with/without pops and discarding of the
7645 lookahead.
7646 Exercise YYERROR.
7647 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
7648
7649 2003-02-17 Paul Eggert <eggert@twinsun.com>
7650
7651 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
7652 * tests/testsuite.at (AT_COMPILE): Use them.
7653 This fixes the testsuite problem reported by Robert Lentz in
7654 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
7655
7656 2003-02-12 Paul Eggert <eggert@twinsun.com>
7657
7658 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
7659 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
7660 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
7661 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
7662 Check for malloc failure, for consistency with yacc.c.
7663 (yytname_size): Remove, for consistency with yacc.c.
7664
7665 The bug still remains in data/lalr1.cc, as I didn't have time
7666 to fix it there.
7667
7668 2003-02-06 Akim Demaille <akim@epita.fr>
7669
7670 * configure.ac (GXX): Rename as...
7671 (CXX): this, to keep the original Autoconf semantics.
7672 Require 2.57.
7673 * data/lalr1.cc: Fix b4_copyright invocations.
7674 If YYDEBUG is not defined, don't depend upon name_ being defined.
7675 (location.hh): Include string and iostream.
7676 (Position::filename): New member.
7677 (Position::Position ()): New.
7678 (operator<< (Position)): New.
7679 (operator- (Position, int)): New.
7680 (Location::first, Location::last): Rename as...
7681 (Location::begin, Location::end): these, to mock the conventional
7682 iterator names.
7683 (operator<< (Location)): New.
7684 * tests/atlocal.in (CXX): New.
7685 * tests/testsuite.at (AT_COMPILE_CXX): New.
7686 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
7687 locations in a more synthetic way.
7688 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
7689 lalr1.cc is used.
7690 Adjust the C locations to match those from Emacs: first column is
7691 column 0.
7692 Change all the expected results.
7693 Conform to the GCS: simplify the locations when applicable.
7694 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
7695 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
7696 these CPP macros with the m4 macros new defined by...
7697 (AT_CHECK_PUSHDEFS): this, i.e.:
7698 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
7699 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7700 New macros.
7701 (AT_CHECK_POPDEFS): Undefine them.
7702 (AT_CHECK_CALC_LALR1_CC): New.
7703 Use it for the first lalr1.cc test.
7704
7705 2003-02-04 Akim Demaille <akim@epita.fr>
7706
7707 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
7708 Location as is defined.
7709
7710 2003-02-04 Akim Demaille <akim@epita.fr>
7711
7712 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
7713 name_ being defined.
7714
7715 2003-02-03 Paul Eggert <eggert@twinsun.com>
7716
7717 * src/gram.h (start_symbol): Remove unused decl.
7718
7719 Use more-consistent naming conventions for local vars.
7720
7721 * src/derives.c (derives_compute): Change type of local var from
7722 int to rule_number.
7723 * src/gram.c (grammar_rules_partial_print): Likewise.
7724 * src/print.c (print_core): Likewise.
7725 * src/reduce.c (reduce_grammar_tables): Likewise.
7726
7727 * src/gram.c (grammar_dump): Change name of item_number *
7728 local var from r to rp.
7729 * src/nullable.c (nullable_compute): Likewise.
7730
7731 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
7732
7733 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
7734 for symbol or symbol_number var.
7735 * src/reader.c (grammar_start_symbol_set): Likewise.
7736 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
7737 Likewise.
7738 * src/state.c (transitions_to): Likewise.
7739 * src/state.h: Likewise.
7740 * src/tables.c (symbol_number_to_vector_number): Likewise.
7741
7742 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
7743 char * var.
7744
7745 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
7746 var.
7747
7748 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
7749 var.
7750
7751 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
7752 Use str, not s, for char * var. Use ch, not c, for character var.
7753 Use size for size var.
7754
7755 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
7756 char * var.
7757 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
7758 uniqstr var.
7759 * src/uniqstr.h: Likewise.
7760
7761 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7762 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7763 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
7764 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
7765 param to have same name as that of enum, so that we don't use
7766 "s" to stand for a non-state.
7767
7768 2003-02-02 Akim Demaille <akim@epita.fr>
7769
7770 * src/scan-skel.l: Scan more than one inert character per yylex
7771 invocation.
7772
7773 2003-02-01 Paul Eggert <eggert@twinsun.com>
7774
7775 Version 1.875a.
7776
7777 * po/LINGUAS: Add ms.
7778
7779 2003-01-30 Akim Demaille <akim@epita.fr>
7780
7781 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
7782
7783 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7784
7785 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
7786 of $1.
7787
7788 Changes in response to error report by S. Eken: GLR mode does not
7789 handle negative $ indices or $ indices in embedded rules correctly.
7790 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
7791
7792 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
7793 (b4_rhs_location): Ditto.
7794 (yyfill): New function to copy from stack tree into array
7795 incrementally.
7796 (yyuserAction): Modify to allow incremental move of semantic values
7797 to rhs array when in GLR mode.
7798 Define YYFILL to use in user-defined actions to fill semantic array
7799 as needed.
7800 Remove dummy use of yystack, as there is now a guaranteed use.
7801 (yydoAction): Modify to allow incremental move of semantic values
7802 to rhs array when in GLR mode.
7803 (yyresolveAction): Ditto.
7804 (yyglrShiftDefer): Update comment.
7805 (yyresolveStates): Use X == NULL for pointers, not !X.
7806 (yyglrReduce): Ditto.
7807 (yydoAction): Ditto
7808
7809 * tests/glr-regr1.at: Rename to ...
7810 * tests/glr-regression.at: Add new regression test for the problems
7811 described above (adapted from S. Eken).
7812 Update copyright notice.
7813 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
7814 * tests/Makefile.am: Ditto.
7815
7816 2003-01-28 Paul Eggert <eggert@twinsun.com>
7817
7818 * data/lalr1.cc: Do not use @output_header_name@ unless
7819 b4_defines_flag is set. This fixes two bugs reported by
7820 Tim Van Holder in
7821 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
7822 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
7823
7824 2003-01-21 Paul Eggert <eggert@twinsun.com>
7825
7826 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
7827 we don't need to worry about yyerrlab1 being reported as an
7828 "unused label" by non-GCC C compilers. The downside is that if
7829 locations are used then a couple of statements are duplicated each
7830 time YYERROR is invoked, but the upside is that the warnings
7831 should vanish.
7832 (yyerrlab1): Move code to YERROR.
7833 (yyerrlab2): Remove. Change uses back to yyerrlab1.
7834 This reverts some of the 2002-12-27 change.
7835
7836 2003-01-17 Paul Eggert <eggert@twinsun.com>
7837
7838 * src/output.c (symbol_printers_output): Fix typo that led
7839 to core dump. Problem reported by Antonio Rus in
7840 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
7841
7842 2003-01-13 Akim Demaille <akim@epita.fr>,
7843 Quoc Peyrot <chojin@lrde.epita.fr>,
7844 Robert Anisko <anisko_r@lrde.epita.fr>
7845
7846 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
7847 when the stacks contain one element, as the loop would otherwise
7848 free the last state, and then use the top state (the one we just
7849 popped). This means that the initial elements will not be freed
7850 explicitly, as is the case in yacc.c; it is not a problem, as
7851 these elements have fake values.
7852
7853 2003-01-11 Paul Eggert <eggert@twinsun.com>
7854
7855 * NEWS: %expect-violations are now just warnings, reverting
7856 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
7857 bootstrapping problem reported by Matthias Klose; see
7858 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
7859 * src/conflicts.c (conflicts_print): Likewise.
7860 * tests/conflicts.at (%expect not enough, %expect too much,
7861 %expect with reduce conflicts): Likewise.
7862 * doc/bison.texinfo (Expect Decl): Document this. Also mention
7863 that the warning is enabled if the number of conflicts changes
7864 (not necessarily increases).
7865
7866 * src/getargs.c (version): Update copyright year.
7867
7868 2003-01-09 Akim Demaille <akim@epita.fr>
7869
7870 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
7871
7872 2003-01-08 Paul Eggert <eggert@twinsun.com>
7873
7874 * Makefile.maint (WGETFLAGS):
7875 New macro, containing "-C off" to disable proxy caches.
7876 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
7877 (rel-check): Use $(WGET) instead of wget.
7878
7879 2003-01-06 Paul Eggert <eggert@twinsun.com>
7880
7881 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
7882 the GLR paper of Scott, Johnstone and Hussain.
7883
7884 2003-01-04 Paul Eggert <eggert@twinsun.com>
7885
7886 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
7887 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
7888 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
7889 (EXTRA_LIBRARIES): New var, for liby.a.
7890 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
7891 (EXTRA_SCRIPTS): New var, for yacc.
7892
7893 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
7894 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
7895 Problem reported by Nelson H. F. Beebe.
7896
7897 2003-01-03 Paul Eggert <eggert@twinsun.com>
7898
7899 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
7900 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7901 when compiling Bison 1.875's `bitset bset = obstack_alloc
7902 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7903
7904 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
7905 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
7906 grow to a huge size with typical invocation.
7907
7908 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
7909 Use the pattern recommended by Autoconf 2.57, except also protect
7910 against double-definition.
7911 * src/system.h: Likewise.
7912 Portability issues reported by Nelson H. F. Beebe.
7913
7914 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
7915 All uses changed. Provide a definition in both C and C++.
7916 (yytrue, yyfalse): Define even if defined (__cplusplus).
7917
7918 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7919 Reported by Nelson H. F. Beebe.
7920
7921 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7922
7923 2003-01-02 Paul Eggert <eggert@twinsun.com>
7924
7925 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7926 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7927 Bug reported by Nelson H. F. Beebe.
7928
7929 2003-01-01 Paul Eggert <eggert@twinsun.com>
7930
7931 * Version 1.875.
7932
7933 2002-12-30 Paul Eggert <eggert@twinsun.com>
7934
7935 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7936 Moved here from...
7937 (<INITIAL>","): Here. This causes stray "," to be treated
7938 more uniformly.
7939
7940 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
7941 last brace in braced code when not in Yacc mode, for compatibility
7942 with Bison 1.35. This resurrects the 2001-12-15 patch to
7943 src/reader.c.
7944
7945 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7946 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7947
7948 2002-12-28 Paul Eggert <eggert@twinsun.com>
7949
7950 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7951 that of SYM's type. This fixes Debian bug 168069, reported by
7952 Thomas Olsson.
7953
7954 2002-12-28 Paul Eggert <eggert@twinsun.com>
7955
7956 Version 1.75f.
7957
7958 Switch back to the Yacc style of conflict reports, undoing some
7959 of the 2002-07-30 change.
7960 * doc/bison.texinfo (Understanding): Use Yacc style for
7961 conflict reports. Also, use new way of locating rules.
7962 * src/conflicts.c (conflict_report):
7963 Renamed from conflict_report_yacc, removing the old
7964 'conflict_report'. Translate the entire conflict report at once,
7965 so that we don't assume that "," has the same interpretation in
7966 all languages.
7967 (conflicts_output): Use Yacc-style conflict report for each state,
7968 instead of our more-complicated style.
7969 (conflicts_print): Use Yacc-style conflict report, except print
7970 the input file name when not emulating Yacc.
7971 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7972 Conflicted Reduction, %expect not enough, %expect too much,
7973 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7974 * tests/existing.at (GNU Cim Grammar): Likewise.
7975 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7976
7977 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7978 fatal): Don't invoke fflush; it's not needed and it might even be
7979 harmful for stdout, as stdout might not be open.
7980 * src/reduce.c (reduce_print): Likewise.
7981
7982 2002-12-27 Paul Eggert <eggert@twinsun.com>
7983
7984 Fix a bug where error locations were not being recorded correctly.
7985 This problem was originally reported by Paul Hilfinger in
7986 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
7987
7988 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7989 top of the location stack's error locations.
7990 (yyerrlab): Set it. When discarding a token, push its location
7991 onto yylerrsp so that we don't lose track of the error's end.
7992 (yyerrlab1): Now is only the target of YYERROR, so that we can
7993 properly record the location of the action that failed. For GCC
7994 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7995 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7996 (yyerrlab2): New label, which yyerrlab now falls through to.
7997 Compute the error's location by applying YYLLOC_DEFAULT to
7998 the locations of all the symbols that went into the error.
7999 * doc/bison.texinfo (Location Default Action): Mention that
8000 YYLLOC_DEFAULT is also invoked for syntax errors.
8001 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8002 Error locations include the locations of all the tokens that were
8003 discarded, not just the last token.
8004
8005 2002-12-26 Paul Eggert <eggert@twinsun.com>
8006
8007 * src/files.c: Include quote.h.
8008 (compute_output_file_names): Warn if we detect conflicting
8009 outputs to the same file. This should catch the misunderstanding
8010 exemplified by Debian Bug 165349, reported by Bruce Stephens..
8011
8012 * src/conflicts.c (conflicts_print): If the user specifies
8013 "%expect N", report an error if there are any reduce/reduce
8014 conflicts. This is what the manual says should happen.
8015 This fixes Debian bug 130890, reported by Anthony DeRobertis.
8016 * tests/conflicts.at (%expect with reduce conflicts): New test.
8017
8018 Don't use m4_include on relative file names, as it doesn't work as
8019 desired if there happens to be a file with that name under ".".
8020
8021 * m4sugar/version.m4: Remove; it was included but it wasn't used.
8022 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
8023 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
8024 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
8025 * src/output.c (output_skeleton): Use full path names when
8026 specifying a file to include; don't rely on include path, as
8027 it's unreliable when the working file contains a file with
8028 that name.
8029
8030 2002-12-25 Paul Eggert <eggert@twinsun.com>
8031
8032 Remove obsolete references to bison.simple and bison.hairy.
8033 Problem mentioned by Aubin Mahe in
8034 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
8035 * data/glr.c: Comment fix.
8036 * doc/bison.1: Remove references. Also, mention "yacc".
8037
8038 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
8039 with -g option.
8040
8041 * src/parse-gram.y (declaration): Use enum "report_states" rather
8042 than its numeric value 1.
8043
8044 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
8045 opening a new one. This fixes Debian bug 165349, reported by
8046 Bruce Stephens.
8047
8048 2002-12-24 Paul Eggert <eggert@twinsun.com>
8049
8050 Version 1.75e.
8051
8052 * Makefile.maint (cvs-update): Don't assume that the shell
8053 supports $(...), as Solaris sh doesn't.
8054
8055 * src/parse-gram.y (lloc_default): Remove test for empty
8056 nonterminals at the end, since it didn't change the result.
8057
8058 2002-12-24 Paul Eggert <eggert@twinsun.com>
8059
8060 If the user does not define YYSTYPE as a macro, Bison now declares it
8061 using typedef instead of defining it as a macro. POSIX requires this.
8062 For consistency, YYLTYPE is also declared instead of defined.
8063
8064 %union directives can now have a tag before the `{', e.g., the
8065 directive `%union foo {...}' now generates the C code
8066 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
8067 The default union tag is `YYSTYPE', for compatibility with Solaris 9
8068 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
8069 instead of `yyltype'.
8070
8071 `yystype' and `yyltype' are now obsolescent macros instead of being
8072 typedefs or tags; they are no longer documented and will be
8073 withdrawn in a future release.
8074
8075 * data/glr.c (b4_location_type): Remove.
8076 (YYSTYPE): Renamed from yystype.
8077 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
8078 (struct YYLTYPE): Renamed from struct yyltype.
8079 (YYLTYPE): Renamed from yyltype.
8080 (yyltype, yystype): New (and obsolescent) macros,
8081 for backward compatibility.
8082 * data/yacc.c: Likewise.
8083
8084 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
8085 does not specify a union tag. This is for compatibility with
8086 Solaris 9 yacc.
8087
8088 * src/parse-gram.y (add_param): 2nd arg is now char * not char
8089 const *, since it is now modified by stripping surrounding { }.
8090 (current_braced_code): Remove.
8091 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
8092 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
8093 trailing " {...}". Now of type <chars>.
8094 (grammar_declaration): Adjust to bundled tokens.
8095 (code_content): Remove; stripping is now done by add_param.
8096 (print_token_value): Print contents of bundled tokens.
8097 (token_name): New function.
8098
8099 * src/reader.h (braced_code, current_braced_code): Remove.
8100 (token_name): New decl.
8101
8102 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
8103 token_type, not braced_code code_kind. All uses changed.
8104 (SC_PRE_CODE): New state, for scanning after a keyword that
8105 has (or usually has) an immediately-following braced code.
8106 (token_type): New local var, to keep track of which token type
8107 to return when scanning braced code.
8108 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
8109 <INITIAL>"%parse-param", <INITIAL>"%printer",
8110 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
8111 instead of returning a token type immediately.
8112 (<INITIAL>"{"): Set token type.
8113 (<SC_BRACED_CODE>"}"): Use it.
8114 (handle_action_dollar, handle_action_at): Now returns bool
8115 indicating success. Fail if ! current_rule; this prevents a core dump.
8116 (handle_symbol_code_dollar, handle_symbol_code_at):
8117 Remove; merge body into caller.
8118 (handle_dollar, handle_at): Complain in invalid contexts.
8119
8120 * NEWS, doc/bison.texinfo: Document the above.
8121 * NEWS: Fix years and program names in copyright notice.
8122
8123 2002-12-17 Paul Eggert <eggert@twinsun.com>
8124
8125 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
8126 Reporting, Table of Symbols): Omit mentions of %lex-param and
8127 %parse-param from the documentation for now.
8128
8129 2002-12-15 Paul Eggert <eggert@twinsun.com>
8130
8131 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
8132 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
8133 lookahead symbol, and which sets yychar in parser actions) and it
8134 disagreed with the Bison documentation. Bug
8135 reported by Andrew Walrond.
8136
8137 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
8138 as the caller now does that.
8139 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
8140 (YYEMPTY): Parenthesize right hand side, since others use it.
8141 (yyparse): Don't assume that our generated code is the only code
8142 that sets yychar.
8143
8144 2002-12-13 Paul Eggert <eggert@twinsun.com>
8145
8146 Version 1.75d.
8147
8148 POSIX requires a "yacc" command.
8149 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
8150 (MOSTLYCLEANFILES): Add yacc.
8151 (yacc): New rule.
8152 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
8153 as an alias for bison y.
8154
8155 * po/LINGUAS: Add da.
8156
8157 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
8158 problem with latest <getopt.h>.
8159 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
8160
8161 * doc/fdl.texi: Upgrade to 1.2.
8162 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
8163 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
8164 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
8165 gnulib.
8166 * config/install-sh: Sync with autotools.
8167
8168 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
8169 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
8170 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
8171 locations are requested.
8172 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
8173 locations are requested.
8174
8175 2002-12-12 Paul Eggert <eggert@twinsun.com>
8176
8177 Remove unportable casts and storage allocation tricks.
8178 While we're at it, remove almost all casts, since they
8179 usually aren't needed and are a sign of trouble.
8180
8181 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
8182
8183 * src/derives.c (derives_compute): Do not subtract NTOKENS from
8184 the pointer DSET returned by malloc; this isn't portable.
8185 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
8186 Similarly for DERIVES.
8187 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
8188 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
8189 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
8190
8191 * src/derives.c (derives_compute): Do not bother invoking
8192 int_of_rule_number, since rule numbers are integers.
8193
8194 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
8195 rather than XMALLOC (char, N).
8196
8197 * src/files.c (filename_split): Rewrite to avoid cast.
8198
8199 * src/gram.h (symbol_number_as_item_number,
8200 item_number_as_symbol_number, rule_number_as_item_number,
8201 item_number_as_rule_number):
8202 Now inline functions rather than macros, to avoid casts.
8203 * src/state.h (state_number_as_int): Likewise.
8204 * src/tables.c (state_number_to_vector_number,
8205 symbol_number_to_vector_number): Likewise.
8206
8207 * src/gram.h (int_of_rule_number): Remove; no longer used.
8208
8209 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
8210 since the resulting storage is always stored into.
8211
8212 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
8213 where it's needed.
8214
8215 * src/muscle_tab.c (muscle_m4_output):
8216 Now inline. Return bool, not int.
8217 * src/state.c (state_compare): Likewise.
8218 * src/symtab.c (symbol_check_defined,
8219 symbol_check_alias_consistency, symbol_pack, symbol_translation,
8220 hash_compare_symbol, hash_symbol):
8221 Likewise.
8222 * src/uniqstr.c (uniqstr_print): Likewise.
8223 * src/muscle_tab.c (muscle_m4_output_processor):
8224 New function, to avoid casts.
8225 * src/state.c (state_comparator, stage_hasher): Likewise.
8226 * src/symtab.c (symbol_check_defined_processor,
8227 symbol_check_alias_consistency_processor, symbol_pack_processor,
8228 symbol_translation_processor, hash_symbol_comparator,
8229 hash_symbol_hasher): Likewise.
8230 * src/uniqstr.c (uniqstr_print_processor): Likewise.
8231 * src/muscle_tab.c (muscles_m4_output):
8232 Use new functions instead of casting old functions unportably.
8233 * src/state.c (state_hash_new): Likewise.
8234 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
8235 symbols_token_translations_init):
8236 Likewise.
8237 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
8238
8239 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
8240 var instead of casting to long, to avoid casts.
8241 (prepare_states): Use MALLOC rather than alloca, so that we don't
8242 have to worry about alloca.
8243 * src/state.c (state_hash_lookup): Likewise.
8244
8245 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
8246 local var instead of casting to unsigned char, to avoid casts.
8247
8248 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
8249 STATE_ALLOC): Remove.
8250 (transitions_new, errs_new, reductions_new, state_new): Use malloc
8251 rather than calloc, and use offsetof to avoid allocating slightly
8252 too much storage.
8253 (state_new): Initialize all members.
8254
8255 * src/state.c (state_hash): Use unsigned accumulator, not signed.
8256
8257 * src/symtab.c (symbol_free): Remove; unused.
8258 (symbol_get): Remove cast in lhs of assignment.
8259 (symbols_do): Now static. Accept generic arguments, not
8260 hashing-related ones.
8261
8262 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
8263 (symbol_processor): Remove.
8264 (symbols_do): Remove decl; now static.
8265
8266 * src/system.h (alloca): Remove; decl no longer needed.
8267 (<stddef.h>): Include, for offsetof.
8268 (<inttypes.>, <stdint.h>): Include if available.
8269 (uintptr_t): New type, if system lacks it.
8270 (CALLOC, MALLOC, REALLOC): New macros.
8271 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
8272 new macros.
8273
8274 * src/tables.c (table_size): Now int, to pacify GCC.
8275 (table_grow, table_ninf_remap): Use signed table size.
8276 (save_row): Don't bother initializing locals when not needed.
8277 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
8278 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
8279
8280 * src/vcg.h: Correct misspellings.
8281
8282 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
8283
8284
8285 * src/getargs.c (getargs): Don't assume EOF == -1.
8286
8287 2002-12-09 Paul Eggert <eggert@twinsun.com>
8288
8289 Change identifier spellings to avoid collisions with names
8290 that are reserved by POSIX.
8291
8292 Don't use names ending in _t, since POSIX reserves them.
8293 For consistency, remove _e and _s endings -- they're weren't
8294 needed to remove ambiguity. All uses changed.
8295 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
8296 turn was just renamed from struniq_t.
8297 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
8298 which in turn was just renamed from struniq_processor_t.
8299 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
8300 in turn was renamed from hash_compare_struniq_t.
8301 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
8302 (state_list): Renamed from state_list_t.
8303 * src/assoc.h (assoc): Renamed from assoc_t.
8304 * src/conflicts.c (enum conflict_resolution): Renamed from
8305 enum conflict_resolution_e.
8306 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
8307 (rule_list): Renamed from rule_list_t.
8308 * src/getargs.h (enum trace): Renamed from enum trace_e.
8309 (enum report): Renamed from enum report_e.
8310 * src/gram.h (item_number): Renamed from item_number_t.
8311 (rule_number): Renamed from rule_number_t.
8312 (struct rule_s): Remove the "rule_s" part; not used.
8313 (rule): Renamed from rule_t.
8314 (rule_filter): Renamed from rule_filter_t.
8315 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
8316 (goto_list): Renamed from goto_list_t.
8317 * src/lalr.h (goto_number): Renamed from goto_number_t.
8318 * src/location.h (location): Renamed from location_t.
8319 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
8320 and moved here from:
8321 * src/muscle_tab.h (muscle_entry_t): here.
8322 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
8323 (rule_list): Renamed from rule_list_t.
8324 * src/print_graph.c (static_graph): Renamed from graph.
8325 * src/reader.h (braced_code): Renamed from braced_code_t.
8326 Remove brace_code_e tag.
8327 * src/relation.h (relation_node): Renamed from relation_node_t.
8328 (relation_nodes): Renamed from relation_nodes_t.
8329 (relation): Renamed from relation_t.
8330 * src/state.h (state_number): Renamed from state_number_t.
8331 (struct state): Renamed from struct state_s.
8332 (state): Renamed from state_t.
8333 (transitions): Renamed from transitions_t. Unused (and
8334 misspelled) transtion_s tag removed.
8335 (errs): Renamed from errs_t. Unused errs_s tag removed.
8336 (reductions): Renamed from reductions_t. Unused tag
8337 reductions_s removed.
8338 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
8339 (struct symbol_list): Renamed from struct symbol_list_s.
8340 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
8341 (struct symbol): Renamed from struct symbol_s.
8342 (symbol): Renamed from symbol_t.
8343 * src/tables.c (vector_number): Renamed from vector_number_t.
8344 (action_number): Renamed from action_t.
8345 * src/tables.h (base_number): Renamed from base_t.
8346 * src/vcg.h (enum color): Renamed from enum color_e.
8347 (enum textmode): Renamed from enum textmode_e.
8348 (enum shape): Renamed from enum shape_e.
8349 (struct colorentry): Renamed from struct colorentry_s.
8350 (struct classname): Renamed from struct classname_s.
8351 (struct infoname): Renamed from struct infoname_s.
8352 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
8353 (enum decision): Renamed from enum decision_e.
8354 (enum orientation): Renamed from enum orientation_e.
8355 (enum alignment): Renamed from enum alignment_e.
8356 (enum arrow_mode): Renamed from enum arrow_mode_e.
8357 (enum crossing_type): Renamed from enum crossing_type_e.
8358 (enum view): Renamed from enum view_e.
8359 (struct node): Renamed from struct node_s.
8360 (node): Renamed from node_t.
8361 (enum linestyle): Renamed from enum linestyle_e.
8362 (enum arrowstyle): Renamed from enum arrowstyle_e.
8363 (struct edge): Renamed from struct edge.
8364 (edge): Renamed from edge_t.
8365 (struct graph): Renamed from struct graph_s.
8366 (graph): Renamed from graph_t.
8367 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
8368 Rename value_t -> value.
8369 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
8370 value_t_as_yystype -> value_as_yystype.
8371
8372 Don't include <errno.h> in the mainstream code, since it
8373 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
8374 * lib/get-errno.c, lib/get-errno.h: New files.
8375 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
8376 get-errno.c.
8377 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
8378 * src/output.c (output_skeleton): Likewise.
8379 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
8380 instead of errno.
8381 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
8382 Likewise.
8383 (handle_action_dollar, handle_action_at): Likewise.
8384 * src/system.h: Do not include <errno.h>.
8385 (TAB_EXT): Renamed from EXT_TAB.
8386 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
8387
8388 Avoid str[a-z]*, since <string.h> reserves that name space.
8389 Change all instances of "struniq" in names to "uniqstr", and
8390 likewise for "STRUNIQ" and "UNIQSTR".
8391 * src/uniqstr.c: Renamed from src/struniq.c.
8392 * src/uniqstr.h: Renamed from src/struniq.h.
8393 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
8394 * src/files.c (strsuffix): Remove; unused.
8395 (concat2): Renamed from stringappend. Now static.
8396 * src/files.h (strsuffix, stringappend): Remove; unused.
8397 * src/parse-gram.y (<chars>): Renamed from <string>.
8398 (<uniqstr>): Renamed from <struniq>.
8399 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
8400 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
8401 (struct graph_s.expand): Renamed from struct graph_s.stretch.
8402 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
8403 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
8404 (N_EXPAND): Renamed from N_STRETCH.
8405
8406 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
8407 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
8408 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
8409 Remove; unused.
8410 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
8411 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
8412 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
8413 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
8414 (BASE_MAXIMUM): Renamed from BASE_MAX.
8415 (BASE_MINIMUM): Renamed from BASE_MIN.
8416 (ACTION_MAX): Remove; unused.
8417 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
8418 Unnecessary casts removed from above defines.
8419
8420
8421 Fix misspelling in names.
8422 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
8423 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
8424 G_NODE_ALIGNEMENT.
8425
8426
8427 * lib/timevar.c (timevar_report): Renamed from time_report,
8428 for consistency with other names.
8429 * lib/timevar.h (timevar_report): New decl.
8430 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
8431
8432
8433 Sort include-file uses.
8434
8435 Reorder all include files under src to be in the order "system.h".
8436 then the ../lib include files in angle brackets (alphabetized),
8437 then the . include files in double-quotes (alphabetized). Fix
8438 dependency breakages encountered in this process, as follows:
8439 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
8440 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
8441 * src/state.h: Include "symtab.h".
8442
8443 2002-12-08 Paul Eggert <eggert@twinsun.com>
8444
8445 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
8446 since this causes problems when __file__ contains character
8447 sequences like "@" that are treated specially by src/scan-skel.l.
8448 Instead, just use the file's basename. This fixes the bug
8449 reported by Martin Mokrejs in
8450 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
8451
8452 2002-12-06 Paul Eggert <eggert@twinsun.com>
8453
8454 Add support for rules that do not have trailing semicolons, as
8455 POSIX requires. Improve the quality of locations in Bison
8456 diagnostics.
8457
8458 * src/location.c: Include <quotearg.h>.
8459 (empty_location): Now const.
8460 (location_print): New function. Follow the recommendation of the
8461 GNU Coding Standards for locations that span file boundaries.
8462 * src/location.h: Do not include <quotearg.h>; no longer needed.
8463 (boundary): New type.
8464 (location_t): Use it. This allows locations to span file boundaries.
8465 All member uses changed: file -> start.file or end.file (as needed),
8466 first_line -> start.line, first_column -> start.column,
8467 last_line -> end.line, last_column -> end.column.
8468 (equal_boundaries): New function.
8469 (LOCATION_RESET, LOCATION_STEP): Remove.
8470 (LOCATION_PRINT): Remove. All callers changed to use location_print.
8471 (empty_location): Now const.
8472 (location_print): New decl.
8473 * src/parse-gram.y (lloc_default): New function, which handles
8474 empty locations more accurately.
8475 (YYLLOC_DEFAULT): Use it.
8476 (%token COLON): Remove.
8477 (%token ID_COLON): New token.
8478 (rules): Use it.
8479 (declarations, rules): Remove trailing semicolon.
8480 (declaration, rules_or_grammar_declaration):
8481 Allow empty (";") declaration.
8482 (symbol_def): Remove empty actions; no longer needed.
8483 (rules_or_grammar_declaration): Remove trailing semicolon.
8484 (semi_colon.opt): Remove.
8485 * src/reader.h: Include location.h.
8486 (scanner_cursor): New decl.
8487 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
8488 rolling our own.
8489 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
8490 of *loc.
8491 (STEP): Remove. No longer needed, now that adjust_location does
8492 the work. All uses removed.
8493 (scanner_cursor): New var.
8494 (adjust_location): Renamed from extend_location. It now sets
8495 *loc and adjusts the scanner cursor. All uses changed.
8496 Don't bother testing for CR.
8497 (handle_syncline): Remove location arg; now updates scanner cursor.
8498 All callers changed.
8499 (unexpected_end_of_file): Now accepts start boundary of token or
8500 comment, not location. All callers changed. Update scanner cursor,
8501 not the location.
8502 (SC_AFTER_IDENTIFIER): New state.
8503 (context_state): Renamed from c_context. All uses changed.
8504 (id_loc, code_start, token_start): New local vars.
8505 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
8506 processing of Yacc white space and equivalents here.
8507 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
8508 instead of returning ID immediately, since we need to search for
8509 a subsequent colon.
8510 (<INITIAL>"'", "\""): Save token_start.
8511 (<INITIAL>"%{", "{", "%%"): Save code_start.
8512 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
8513 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
8514 BEGIN context_state at end, not INITIAL.
8515 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
8516 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
8517 Return correct token start.
8518 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
8519 the start of a character, string or multiline comment is found.
8520 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
8521 Reduction): Adjust reported locations to match the more-precise
8522 results now expected.
8523 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
8524 * tests/reduce.at (Useless Rules, Reduced Automaton,
8525 Underivable Rules): Likewise.
8526 * tests/regression.at (Invalid inputs): No longer `expecting ";"
8527 or "|"' now that so many other tokens are allowed by the new grammar.
8528
8529 * src/complain.h (current_file): Remove duplicate decl;
8530 current_file is now owned by files.h.
8531 * src/complain.c, src/scan-gram.l: Include files.h.
8532
8533 2002-12-06 Paul Eggert <eggert@twinsun.com>
8534
8535 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
8536 promotes to int; it might be unsigned int.
8537 * data/yacc.c (yy_reduce_print): Likewise.
8538
8539 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
8540 be #defined in the prologue, not in the Bison declarations.
8541 This fixes Debian Bug 102878, reported by Shaul Karl.
8542
8543 2002-12-02 Paul Eggert <eggert@twinsun.com>
8544
8545 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
8546 * lib/strtoul.c: New file, from gnulib.
8547 This fixes a porting bug reported by Peter Klein in
8548 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
8549
8550 2002-11-30 Paul Eggert <eggert@twinsun.com>
8551
8552 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
8553 and put only a forward declaration in the prologue. This is for
8554 consistency with the other scanner helper functions.
8555
8556 Type clashes now generate warnings, not errors, since it
8557 appears that POSIX may allow some grammars with type clashes.
8558 * src/reader.c (grammar_current_rule_check): Warn about
8559 type clashes instead of complaining.
8560 * tests/input.at (Type Clashes): Expect warnings, not complaints.
8561
8562 Add Yacc library, since POSIX requires it.
8563 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
8564 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
8565 * lib/main.c, lib/yyerror.c: New files.
8566
8567 gram_error can be static; it need not be extern.
8568 * src/reader.h (gram_error): Remove decl.
8569 * src/parse-gram.y (gram_error): Now static. Add static decl.
8570 (print_token_value): Omit parameter names from forward decl,
8571 for consistency.
8572
8573 2002-11-29 Paul Eggert <eggert@twinsun.com>
8574
8575 * doc/bison.texinfo: Emphasize that yylex and yyerror must
8576 be declared before being used. E.g., one should typically
8577 declare them in the prologue. Use GNU coding style in examples.
8578 Put "const" consistently after the type it modifies. Mention
8579 that C99 supports "inline". Mention that yyerror traditionally
8580 returns "int".
8581
8582 %parse-param and %lex-param now take just one argument, the
8583 declaration; the argument name is deduced from the declaration.
8584
8585 * doc/bison.texinfo (Parser Function, Pure Calling, Error
8586 Reporting, Table of Symbols): Document this.
8587 * src/parse-gram.y (add_param): New function.
8588 (COMMA): Remove.
8589 (declaration): Implement new rule for %parse-param and %lex-param.
8590 * src/scan-gram.l: "," now elicits a warning, rather than being
8591 a token; this is more compatible with byacc.
8592 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
8593
8594 2002-11-27 Paul Eggert <eggert@twinsun.com>
8595
8596 Rename identifiers to avoid real and potential collisions.
8597
8598 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
8599 to avoid collision with lex macro described by Bruce Lilly in
8600 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
8601 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8602 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
8603 * src/parse-gram.y (print_token_value): Renamed from yyprint.
8604 All uses changed.
8605 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
8606 The name "yycontrol" violates the name space rules, and this stuff
8607 wasn't being used anyway.
8608 (input): Remove action; this stuff wasn't being used.
8609 (gram_error): Rename local variable yylloc -> loc.
8610 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
8611 (YY_DECL): Don't use "yy" at start of local variables.
8612 All uses changed, e.g., yylloc -> loc.
8613 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
8614 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
8615 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
8616 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
8617
8618 * src/parse-gram.y (gram_error): loc is now const *.
8619 * src/reader.h (gram_error): Likewise.
8620
8621 2002-11-24 Paul Eggert <eggert@twinsun.com>
8622
8623 Version 1.75c.
8624
8625 * tests/actions.at (Actions after errors): Use an output format
8626 more similar to that of the Printers and Destructors test.
8627 Test the position of the ';' token too.
8628 (Printers and Destructors): Likewise.
8629 (Printers and Destructors: %glr-parser): Remove for now, to avoid
8630 unnecessarily alarming people when the test fails.
8631
8632 * data/yacc.c (yyerrlab1): Move this label down, so that the
8633 parser does not discard the lookahead token if the user code
8634 invokes YYERROR. This change is required for POSIX conformance.
8635
8636 * lib/error.c: Sync with gnulib.
8637
8638 2002-11-22 Paul Eggert <eggert@twinsun.com>
8639
8640 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
8641 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
8642 * lib/xmalloc.c: Likewise.
8643
8644 2002-11-20 Paul Eggert <eggert@twinsun.com>
8645
8646 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
8647
8648 2002-11-20 Paul Eggert <eggert@twinsun.com>
8649
8650 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
8651 should use `if (! x) abort ();' rather than `assert (x);', and
8652 anyway it's one less thing to worry about configuring.
8653
8654 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
8655 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
8656 and replace all instances of assert with abort.
8657 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8658 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
8659
8660 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
8661 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
8662 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
8663 hash_find_entry, hash_rehash, hash_insert): Likewise.
8664 * src/conflicts.c (resolve_sr_conflict): Likewise.
8665 * src/lalr.c (set_goto_map, map_goto): Likewise.
8666 * src/nullable.c (nullable_compute): Likewise.
8667 * src/output.c (prepare_rules, token_definitions_output): Likewise.
8668 * src/reader.c (packgram, reader): Likewise.
8669 * src/state.c (state_new, state_free, state_transitions_set,
8670 state_reduction_find): Likewise.
8671 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
8672 symbol_pack): Likewise.
8673 * src/tables.c (conflict_row, pack_vector): Likewise.
8674 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
8675 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
8676 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
8677 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
8678
8679 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
8680 (ARGMATCH_CONSTRAINT): New macro.
8681 (ARGMATCH_ASSERT): Use it.
8682
8683 * src/system.h (verify): New macro.
8684 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
8685 rather than assert.
8686 * src/tables.c (tables_generate): Likewise.
8687
8688 * src/struniq.c (struniq_assert): Now returns void, and aborts
8689 if the assertion is false.
8690 (struniq_assert_p): Remove.
8691 * src/struniq.h: Likewise.
8692
8693 2002-11-18 Paul Eggert <eggert@twinsun.com>
8694
8695 * data/glr.c (yygetLRActions): Replace `yyindex' with
8696 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
8697 This fixes the regression with Sun ONE Studio 7 cc that I reported in
8698 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
8699
8700 2002-11-18 Akim Demaille <akim@epita.fr>
8701
8702 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
8703 space.
8704 From Tim Van Holder.
8705
8706 2002-11-17 Paul Eggert <eggert@twinsun.com>
8707
8708 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
8709 to "SyntaxError" for consistency with my 2002-11-15 change.
8710
8711 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
8712 not define to {}, since this breaks the common use of `YYDPRINTF
8713 ((...));' if a single statement is desired (e.g. before `else').
8714 Work around GCC warnings by surrounding corresponding calls with
8715 {} if needed.
8716 (yyhasResolvedValue): Remove unused function.
8717 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
8718 loop body.
8719 (yyreportSyntaxError): Renamed from yyreportParseError.
8720 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
8721 All uses changed.
8722 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
8723 extern when possible. Remove unused initializations.
8724
8725 2002-11-16 Akim Demaille <akim@epita.fr>
8726
8727 Augment the similarity between GLR and LALR traces.
8728
8729 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
8730 (YY_REDUCE_PRINT): New.
8731 (yyparse): Use them.
8732 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
8733 YYDPRINT here.
8734 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
8735 state reached after the reduction/recovery, since...
8736 (yyparse, yyprocessOneStack): Report the state we are entering in.
8737
8738 2002-11-16 Akim Demaille <akim@epita.fr>
8739
8740 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
8741 Add support for --trace=skeleton.
8742 * src/scan-skel.l: %option debug.
8743 Scan strings of non-@ or \n instead of character by character.
8744 (scan_skel): Handle trace_skeleton.
8745 (QPUTS): New.
8746 (@output_parser_name@, @output_header_name@): ``Restore'' their
8747 support (used to be M4 macros).
8748 * data/yacc.c: Quote larger chunks, a la glr.c.
8749 * data/lalr1.cc: Likewise.
8750 The header guards are no longer available, so use some other
8751 string than `YYLSP_NEEDED'.
8752
8753 2002-11-16 Akim Demaille <akim@epita.fr>
8754
8755 Make the ``Printers and Destructors'' test more verbose, taking
8756 `yacc.c''s behavior as (possibly wrong) reference.
8757
8758 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
8759 instead of fprint on stdout.
8760 Set and report the last_line of the symbols.
8761 Consistently display values and locations.
8762
8763 2002-11-16 Paul Eggert <eggert@twinsun.com>
8764
8765 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
8766
8767 2002-11-15 Paul Eggert <eggert@twinsun.com>
8768
8769 * tests/actions.at (Actions after errors): New test case.
8770
8771 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
8772 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
8773 tests/action.at, tests/calc.at, tests/conflicts.at,
8774 tests/cxx-type.at, tests/regression.at:
8775 "parse error" -> "syntax error" for POSIX compatibility.
8776 "parsing stack overflow..." -> "parser stack overflow" so
8777 that code matches Bison documentation.
8778
8779 2002-11-15 Akim Demaille <akim@epita.fr>
8780
8781 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
8782 take two BRACED_CODE, not two string_content.
8783 Free the scanner's obstack when we are done.
8784 (code_content): New.
8785 * tests/calc.at: Adjust.
8786 * doc/bison.texinfo: Adjust.
8787 Also, make sure to include the `,' for these declarations.
8788
8789 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
8790
8791 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
8792 definition; avoids potential autoreconf problems.
8793
8794 2002-11-15 Akim Demaille <akim@epita.fr>
8795
8796 Always check the value returned by yyparse.
8797
8798 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
8799 returned by yyparse.
8800 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
8801 Adjust calls.
8802 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
8803 returned by yyparse.
8804
8805 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8806
8807 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
8808 on input.at test.
8809
8810 2002-11-14 Paul Eggert <eggert@twinsun.com>
8811
8812 * src/output.c (output_skeleton): Call xfopen instead of
8813 duplicating xfopen's body.
8814
8815 Fix bugs reported by Nelson H. F. Beebe in
8816 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
8817
8818 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
8819 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
8820 Group compiler. Instead, use "$CC -E bar.c". Include the .h
8821 file twice in the grammar, as an extra check.
8822
8823 * tests/input.at (Torturing the Scanner): Surround the
8824 backslash-newline tests with "#if 0", to make it less likely that
8825 we'll run into compiler bugs. Bring back solitary \ inside
8826 comment, but add a closing comment to work around HP C bug. Don't
8827 test backslash-newline in C character constant.
8828
8829 2002-11-14 Akim Demaille <akim@epita.fr>
8830
8831 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
8832 status of the compiler.
8833 Calling `exit 1' is no longer needed.
8834 Reported by Nelson H. F. Beebe.
8835
8836 2002-11-14 Akim Demaille <akim@epita.fr>
8837
8838 * tests/atlocal.in (CPPFLAGS): We have config.h.
8839 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
8840 New.
8841 * tests/actions.at, tests/calc.at, tests/conflicts.at,
8842 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
8843 * tests/regression.at, tests/torture.at: Use them for all the
8844 grammars that are to be compiled.
8845 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
8846 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
8847 * doc/bison.texinfo (GLR Parsers): Document `inline'.
8848
8849 2002-11-14 Akim Demaille <akim@epita.fr>
8850
8851 * doc/bison.texinfo: Various formatting changes (alignments in
8852 samples, additional @group/@end group, GCS in samples.
8853 Use @deffn instead of simple @table to define the directives,
8854 macros, variables etc.
8855
8856 2002-11-13 Paul Eggert <eggert@twinsun.com>
8857
8858 Fix some bugs reported by Albert Chin-A-Young in
8859 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
8860
8861 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8862 -o c"; the HP C compiler chatters during compilation.
8863 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
8864 * tests/headers.at (export YYLTYPE): Likewise.
8865
8866 * tests/input.at (Torturing the Scanner): Remove lines containing
8867 solitary backslashes, as they tickle a bug in the HP C compiler.
8868
8869 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
8870 comments, since they're not portable. Use GNU coding style.
8871
8872 2002-11-13 Akim Demaille <akim@epita.fr>
8873
8874 * data/yacc.c: Leave bigger chunks of quoted text.
8875 (YYDSYMPRINTF): New.
8876 Use it to report symbol activities.
8877 * data/glr.c (YYDSYMPRINTF): New.
8878 Use it.
8879
8880 2002-11-12 Paul Eggert <eggert@twinsun.com>
8881
8882 Version 1.75b.
8883
8884 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
8885 (yyglrReduce): Return yyok, not 0.
8886 This should avoid the enumerated-type warnings reported
8887 by Nelson H. F. Beebe in
8888 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
8889
8890 * lib/bbitset.h (BITSET_INLINE): Remove.
8891 * lib/bitset.h [! BITSET_INLINE]: Remove.
8892 (bitset_set, bitset_reset, bitset_test): Rename local vars
8893 to avoid shadowing warnings by GCC.
8894
8895 * data/glr.c (inline): Remove #define. It's the user's
8896 responsibility to #define it away, just like 'const'.
8897 This fixes one of the bugs reported by Nelson H. F. Beebe in
8898 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
8899
8900 * Makefile.maint (po-check): Scan .l and .y files instead of the
8901 .c and the .h files that they generate. This fixes the bug
8902 reported by Tim Van Holder in:
8903 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
8904 Look for N_ as well as for _. Try to avoid matching #define for
8905 N_ and _.
8906 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
8907 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
8908 * src/scan-gram.l: Revamp regular expressions so that " and '
8909 do not confuse xgettext.
8910
8911 * src/struniq.h (struniq_new): Do not declare the return type
8912 to be 'const'; this violates the C standard.
8913 * src/struniq.c (struniq_new): Likewise.
8914
8915 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
8916
8917 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
8918 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8919 linker.
8920
8921 2002-11-12 Akim Demaille <akim@epita.fr>
8922
8923 * Makefile.maint: Sync with Autoconf:
8924 (local_updates): New.
8925
8926 2002-11-12 Akim Demaille <akim@epita.fr>
8927
8928 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8929
8930 2002-11-12 Akim Demaille <akim@epita.fr>
8931
8932 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8933 locations.
8934
8935 2002-11-12 Akim Demaille <akim@epita.fr>
8936
8937 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8938 not yyvalue.
8939
8940 2002-11-12 Akim Demaille <akim@epita.fr>
8941
8942 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8943 Use it to test the GLR parser.
8944
8945 2002-11-12 Akim Demaille <akim@epita.fr>
8946
8947 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8948 defines it.
8949 * data/glr.c (yystos): New.
8950 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8951 (YYDSYMPRINT): New.
8952 (yyval): Don't define it, it is handled via M4.
8953 (yyrecoverParseError): Free verbosely the discarded symbols.
8954 * data/yacc.c (yysymprint): Remove, rather...
8955 (b4_yysymprint_generate): invoke.
8956 * data/c.m4 (b4_yysymprint_generate): New.
8957 Accept pointers as arguments, as opposed to the version from
8958 yacc.c.
8959 (b4_yydestruct_generate): Likewise.
8960 * tests/cations.at (Printers and Destructors): Use Bison directives
8961 instead of CPP macros.
8962 Don't rely on internal details.
8963
8964 2002-11-12 Akim Demaille <akim@epita.fr>
8965
8966 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8967 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8968 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8969 it against YYEMPTY and so forth), work on yytoken (i.e., set
8970 it to YYEMPTY etc.).
8971 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8972 (b4_symbol_actions): Remove.
8973 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8974 for 0, end-of-input.
8975
8976 2002-11-12 Akim Demaille <akim@epita.fr>
8977
8978 * doc/bison.texinfo (Destructor Decl): New.
8979
8980 2002-11-12 Akim Demaille <akim@epita.fr>
8981
8982 * src/tables.c (tables_generate): Use free for pointers that
8983 cannot be NULL, not XFREE.
8984 (pack_vector): Use assert, not fatal, for bound violations.
8985 * src/state.c (state_new): Likewise.
8986 * src/reader.c (reader): Likewise.
8987 * src/lalr.c (set_goto_map): Likewise.
8988 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
8989 the file name.
8990
8991 2002-11-12 Akim Demaille <akim@epita.fr>
8992
8993 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8994 Restore.
8995 * src/scan-gram.l (last_string): Is global to the file, not to
8996 yylex.
8997 * src/parse-gram.y (input): Don't append the epilogue here,
8998 (epilogue.opt): do it here, and free the scanner's obstack.
8999 * src/reader.c (epilogue_set): Rename as...
9000 (epilogue_augment): this.
9001 * data/c.m4 (b4_epilogue): Defaults to empty.
9002
9003 2002-11-12 Akim Demaille <akim@epita.fr>
9004
9005 * src/getargs.c (long_options): Remove duplicates.
9006 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
9007 Remove.
9008 * doc/bison.rnh: Remove.
9009 * doc/bison.texinfo (VMS Invocation): Remove.
9010
9011 2002-11-12 Akim Demaille <akim@epita.fr>
9012
9013 * src/struniq.h, src/struniq.c (struniq_t): Is const.
9014 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
9015
9016 Use struniq for symbols.
9017
9018 * src/symtab.h (symbol_t): The tag member is a struniq.
9019 (symbol_type_set): Adjust.
9020 * src/symtab.c (symbol_new): Takes a struniq.
9021 (symbol_free): Don't free the tag member.
9022 (hash_compare_symbol_t, hash_symbol_t): Rename as...
9023 (hash_compare_symbol, hash_symbol): these.
9024 Use the fact that tags as struniqs.
9025 (symbol_get): Use struniq_new.
9026 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
9027 Returns a strniq.
9028 * src/reader.h (merger_list, grammar_currentmerge_set): The name
9029 and type members are struniqs.
9030 * src/reader.c (get_merge_function)
9031 (grammar_current_rule_merge_set): Adjust.
9032 (TYPE, current_type): Are struniq.
9033
9034 Use struniq for file names.
9035
9036 * src/files.h, src/files.c (infile): Split into...
9037 (grammar_file, current_file): these.
9038 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
9039 * src/reduce.c (reduce_print): Likewise.
9040 * src/getargs.c (getargs): Likewise.
9041 * src/complain.h, src/complain.c: Likewise.
9042 * src/main.c (main): Call struniqs_new early enough to use it for
9043 file names.
9044 Don't free the input file name.
9045
9046 2002-11-12 Akim Demaille <akim@epita.fr>
9047
9048 * src/symtab.c (symbol_free): Remove dead deactivated code:
9049 type_name are properly removed.
9050 Don't use XFREE to free items that cannot be NULL.
9051 * src/struniq.h, src/struniq.c: New.
9052 * src/main.c (main): Initialize/free struniqs.
9053 * src/parse-gram.y (%union): Add astruniq member.
9054 (yyprint): Adjust.
9055 * src/scan-gram.l (<{tag}>): Return a struniq.
9056 Free the obstack bit that used to store it.
9057 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
9058
9059 2002-11-11 Paul Eggert <eggert@twinsun.com>
9060
9061 Revamp to fix many (but not all) of the C- and M4-related quoting
9062 problems. Among other things, this fixes the Bison bug reported
9063 by Jan Hubicka when processing the Bash grammar; see:
9064 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
9065
9066 Use new @ escapes consistently. Represent brackets with @{ and @}
9067 rather than @<:@ and @:>@, since this works a bit better with dumb
9068 editors like vi. Represent @ with @@, since @ is now consistently
9069 an escape. Use @oline@ and @ofile@ rather than __oline__ and
9070 __ofile__, to avoid unexpected expansions. Similarly, use @output
9071 rather than #output.
9072
9073 * data/c.m4 (b4_copyright): Omit file name from comment, since
9074 the file name could contain "*/".
9075 (b4_synclines_flag): Don't quote the 2nd argument; it should already
9076 be quoted. All uses changed.
9077
9078 * data/glr.c: Use new @ escapes consistently.
9079 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
9080 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
9081 Remove, since they couldn't handle arbitrary characters in file
9082 names.
9083 * data/lalr1.cc: Likewise.
9084 * data/yacc.c: Likewise.
9085
9086 * src/files.c (output_infix): Remove; all uses removed.
9087 * src/files.h: Likewise.
9088
9089 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
9090 mishandled funny characters in file names, and anyway it isn't
9091 needed any more.
9092 * data/yacc.c: Likewise.
9093 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
9094
9095 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
9096 * data/yacc.c: Likewise.
9097
9098 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
9099 strings now.
9100 (muscle_init): Quote filename as a C string.
9101 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
9102 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
9103 * src/output.c (escaped_file_name_output): New function.
9104 (prepare_symbols): Quote tokens for M4.
9105 (prepare): Don't insert output_infix, output_prefix,
9106 output_parser_name, output_header_name; this is now down by scan-skel.
9107 Insert skeleton as a C string.
9108
9109 * src/output.c (user_actions_output, symbol_destructors_output,
9110 symbol_printers_output): Quote filenames for C and M4.
9111 * src/reader.c (prologue_augment, epilogue_set): Likewise.
9112
9113 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
9114 escapes other than \\ and \'; this simplifies the code.
9115 (<SC_STRING>): Likewise, for \\ and \".
9116 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
9117 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
9118 Use new escapes @{ and @} for [ and ].
9119
9120 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
9121 them with auto vars.
9122 Switch to new escape scheme, where @ is the escape character uniformly.
9123 Abort if a stray escape character is found. Avoid unbounded input
9124 buffer when parsing non-escaped text.
9125
9126 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
9127 __oline__, #output, $@, and @{ do not have unintended meanings.
9128
9129 2002-11-09 Paul Eggert <eggert@twinsun.com>
9130
9131 Fix the test failure due to GCC warnings described in
9132 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
9133 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
9134 evaluate to 0 if it's impossible for NINF to be in the respective
9135 table.
9136 (yygetLRActions, yyrecoverParseError): Use them.
9137
9138 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
9139 counted in the token inserted at end of file. Now takes
9140 location_t *, not location_t, so that the location can be
9141 adjusted. All uses changed.
9142
9143 * tests/regression.at (Invalid inputs): Adjust wording in
9144 diagnostic to match the new behavior.
9145
9146 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
9147 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
9148 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
9149 abort ();'. This reduces the runtime of the "Many lookaheads"
9150 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
9151 GCC 3.2.
9152
9153 2002-11-07 Paul Eggert <eggert@twinsun.com>
9154
9155 * src/parse-gram.y (CHARACTER): Remove unused token.
9156 All uses removed.
9157
9158 * src/scan-gram.l: Remove stack option. We no longer use the
9159 stack, since the stack was never deeper than 1; instead, use the
9160 new auto var c_context to record the stacked value.
9161
9162 Remove nounput option. At an unexpected end of file, we now unput
9163 the minimal input necessary to end cleanly; this simplifies the
9164 code.
9165
9166 Avoid unbounded token sizes where this is easy.
9167
9168 (unexpected_end_of_file): New function.
9169 Use it to systematize the error message on unexpected EOF.
9170 (last-string): Now auto, not static.
9171 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
9172 (scanner_last_string_free): Remove; not used.
9173 (percent_percent_count): Move decl to just before use.
9174 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
9175 not the (never otherwised-used) CHARACTER.
9176
9177 2002-11-07 Akim Demaille <akim@epita.fr>
9178
9179 Let yyerror always receive the msg as last argument, so that
9180 yyerror can be variadic.
9181
9182 * data/yacc.c (b4_yyerror_args): New.
9183 Use it when calling yyerror.
9184 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
9185 Use it when calling yyerror.
9186 * doc/bison.texinfo (Error Reporting): Adjust.
9187 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
9188 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
9189
9190 2002-11-06 Akim Demaille <akim@epita.fr>
9191
9192 #line should have quoted strings.
9193 Ideally, this should be done by m4_quotearg.
9194
9195 * src/scan-skel.l: Include quotearg.h.
9196 Quote __ofile__.
9197 * src/output.c (symbol_printers_output)
9198 (symbol_destructors_output): Quote the file name.
9199
9200 2002-11-06 Akim Demaille <akim@epita.fr>
9201
9202 * tests/regression.at (Invalid inputs): Adjust to the recent
9203 messages.
9204
9205 2002-11-06 Akim Demaille <akim@epita.fr>
9206
9207 Restore --no-lines.
9208 Reported by Jim Kent.
9209
9210 * data/c.m4 (b4_syncline): New.
9211 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
9212 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
9213 * src/output.c (user_actions_output): Likewise.
9214 (prepare): Define 'b4_synclines_flag'.
9215 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
9216
9217 2002-11-06 Akim Demaille <akim@epita.fr>
9218
9219 * src/main.c (main): Free `infile'.
9220 * src/scan-gram.l (handle_syncline): New.
9221 Recognize `#line'.
9222 * src/output.c (user_actions_output, symbol_destructors_output)
9223 (symbol_printers_output): Use the location's file name, not
9224 infile.
9225 * src/reader.c (prologue_augment, epilogue_set): Likewise.
9226
9227 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9228
9229 * src/tables.c (matching_state): Don't allow states to match if
9230 either has GLR conflict entries.
9231
9232 2002-11-05 Paul Eggert <eggert@twinsun.com>
9233
9234 * src/scan-gram.l: Use more accurate diagnostics, e.g.
9235 "integer out of range" rather than "invalid value".
9236 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
9237 accordingly.
9238
9239 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
9240 Also, remove one static variable in the scanner.
9241
9242 * src/scan-gram.l (braces_level): Now auto, not static.
9243 Initialize to zero if the compiler is being picky.
9244 (INITIAL): Clear braces_level instead of incrementing it.
9245 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
9246 as POSIX 1003.1-2001 requires.
9247 * src/system.h (IF_LINT): New macro, taken from coreutils.
9248 * configure.ac: Define "lint" if --enable-gcc-warnings.
9249
9250 2002-11-05 Akim Demaille <akim@epita.fr>
9251
9252 * src/scan-gram.l: When it starts with `%', complain about the
9253 whole directive, not just that `invalid character: %'.
9254
9255 2002-11-04 Akim Demaille <akim@epita.fr>
9256
9257 * Makefile.maint: Update from Autoconf.
9258 (update, cvs-update, po-update, do-po-update): New.
9259
9260 2002-11-04 Akim Demaille <akim@epita.fr>
9261
9262 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
9263 and yyerror.
9264 Have yyerror `use' its arguments.
9265 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
9266 returns true when location & yacc & pure & parse-param.
9267 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
9268
9269 2002-11-04 Akim Demaille <akim@epita.fr>
9270
9271 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
9272 clashes.
9273 * src/scan-gram.l: Use [\'] instead of ['] to pacify
9274 font-lock-mode.
9275 Use complain_at.
9276 Use quote, not quote_n since LOCATION_PRINT no longer uses the
9277 slot 0.
9278
9279 2002-11-03 Paul Eggert <eggert@twinsun.com>
9280
9281 * src/reader.c (get_merge_function, grammar_current_rule_check):
9282 Use consistent diagnostics for reporting type name clashes.
9283 Quote the types with <>, for consistency with Yacc.
9284 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
9285
9286 2002-11-03 Akim Demaille <akim@epita.fr>
9287
9288 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
9289 New.
9290 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
9291 (b4_parse_param): Remove.
9292 Use b4_identification.
9293 Propagate b4_pure_args where needed to pass them to yyerror.
9294 * data/glr.m4 (b4_parse_param): Remove.
9295 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
9296 (b4_lpure_formals): New.
9297 Use b4_identification.
9298 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
9299 b4_user_formals and b4_user_args.
9300 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
9301 (yyreportAmbiguity): When using a pure parser, also need
9302 the location, and the parse-params.
9303 Adjust callers.
9304 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
9305 When using a pure parser, also need the parse-params.
9306 Adjust callers.
9307 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
9308 (%pure-parser + %parse-param) LALR and GLR parsers.
9309 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
9310 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
9311 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
9312 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
9313 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
9314 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
9315 * doc/bison.texinfo: Untabify the whole file.
9316 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
9317 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
9318 (Error Reporting): Adjust to these new directives.
9319 Document %error-verbose, deprecate YYERROR_VERBOSE.
9320
9321 2002-11-03 Akim Demaille <akim@epita.fr>
9322
9323 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
9324 AT_CHECK_CALC_GLR invocations to use % directives, instead of
9325 command line options.
9326 * tests/cxx-type.at: Formatting changes.
9327
9328 2002-11-03 Paul Eggert <eggert@twinsun.com>
9329
9330 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
9331 to count columns correctly, and to check for invalid inputs.
9332
9333 Use mbsnwidth to count columns correctly. Account for tabs, too.
9334 Include mbswidth.h.
9335 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
9336 (extend_location): New function.
9337 (YY_LINES): Remove.
9338
9339 Handle CRLF in C code rather than in Lex code.
9340 (YY_INPUT): New macro.
9341 (no_cr_read): New function.
9342
9343 Scan UCNs, even though we don't fully handle them yet.
9344 (convert_ucn_to_byte): New function.
9345
9346 Handle backslash-newline correctly in C code.
9347 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
9348 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
9349 all uses changed.
9350 (tag, splice): New EREs. Do not allow NUL or newline in tags.
9351 Use {splice} wherever C allows backslash-newline.
9352 YY_STEP after space, newline, vertical-tab.
9353 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9354
9355 (letter, id): Don't assume ASCII; e.g., spell out a-z.
9356
9357 ({int}, handle_action_dollar, handle_action_at): Check for integer
9358 overflow.
9359
9360 (YY_STEP): Omit trailing semicolon, so that it's more like C.
9361
9362 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
9363 as well as \000. Check for UCHAR_MAX, not 255.
9364 Allow \x with an arbitrary positive number of digits, as in C.
9365 Check for overflow here.
9366 Allow \? and UCNs, for compatibility with C.
9367
9368 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
9369 with quote slot used by complain_at.
9370
9371 * tests/input.at: Add tests for backslash-newline, m4 quotes
9372 in symbols, long literals, and funny escapes in strings.
9373
9374 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
9375 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
9376 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
9377 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
9378 * m4/mbswidth.m4: New file, from GNU coreutils.
9379
9380 * doc/bison.texinfo (Grammar Outline): Document // comments.
9381 (Symbols): Document that trigraphs have no special meaning in Bison,
9382 nor is backslash-newline allowed.
9383 (Actions): Document that trigraphs have no special meaning.
9384
9385 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
9386 no longer used.
9387
9388 2002-11-02 Paul Eggert <eggert@twinsun.com>
9389
9390 * src/reader.c: Don't include quote.h; not needed.
9391 (get_merge_function): Reword warning to be consistent with
9392 type clash diagnostic in grammar_current_rule_check.
9393
9394 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
9395 bug in trigraph handling.
9396
9397 * src/output.c (prepare_symbols): When printing token names,
9398 escape "[" as "@<:@" and likewise for "]".
9399
9400 * src/system.h (errno): Remove declaration, as we are now
9401 assuming C89 or better, and C89 guarantees errno.
9402
9403 2002-10-30 Paul Eggert <eggert@twinsun.com>
9404
9405 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
9406 Check for close failures.
9407 * src/files.h (xfclose): Return void, not int, since it always
9408 returned zero.
9409 * src/files.c (xfclose): Likewise. Report I/O error if ferror
9410 indicates one.
9411 * src/output.c (output_skeleton): Use xfclose rather than fclose
9412 and ferror. xfclose now checks ferror.
9413
9414 * data/glr.c (YYLEFTMOST_STATE): Remove.
9415 (yyreportTree): Use a stack-based leftmost state. This avoids
9416 our continuing battles with bogus warnings about initializers.
9417
9418 2002-10-30 Akim Demaille <akim@epita.fr>
9419
9420 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
9421 #if.
9422
9423 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9424
9425 * tests/glr-regr1.at: New test for reported regressions.
9426 * tests/testsuite.at: Add glr-regr1.at test.
9427 * tests/Makefile.am: Add glr-regr1.at test.
9428
9429 2002-10-24 Paul Eggert <eggert@twinsun.com>
9430
9431 Version 1.75a.
9432
9433 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
9434 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
9435 we use malloc. Don't assume 'A' through 'Z' are contiguous.
9436 Don't assume strdup exists; POSIX says its an XSI extension.
9437 Check for buffer overflow on input.
9438
9439 2002-10-24 Akim Demaille <akim@epita.fr>
9440
9441 * src/output.c (output_skeleton): Don't disable M4sugar comments
9442 too soon: it results in comments being expanded.
9443 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
9444 first output.
9445
9446 2002-10-24 Akim Demaille <akim@epita.fr>
9447
9448 * data/yacc.c (m4_int_type): New.
9449 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
9450 char' as only yacc.c wants K&R portability.
9451 * data/glr.c (yysigned_char): Remove.
9452 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
9453 Reported by Quoc Peyrot.
9454
9455 2002-10-23 Paul Eggert <eggert@twinsun.com>
9456
9457 * src/main.c (main): With --trace=time, report times even if a
9458 non-fatal error occurs. Formerly, the times were reported in some
9459 such cases but not in others.
9460 * src/reader.c (reader): Just return if a complaint has been issued,
9461 instead of exiting, so that 'main' can report times.
9462
9463 2002-10-22 Akim Demaille <akim@epita.fr>
9464
9465 * src/system.h: Include sys/types.
9466 Reported by Bert Deknuydt.
9467
9468 2002-10-23 Paul Eggert <eggert@twinsun.com>
9469
9470 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
9471 Suggested by Art Haas.
9472
9473 2002-10-22 Paul Eggert <eggert@twinsun.com>
9474
9475 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
9476 decl; not needed any more.
9477 * src/main.c (main): Use return to exit, undoing yesterday's change.
9478 The last OS that we could find where this wouldn't work is
9479 SunOS 3.5, and that's too old to worry about now.
9480
9481 * data/glr.c (struct yyltype): Define members even when not
9482 doing locations. This is more consistent with yacc.c, and it
9483 works around the following bug reports:
9484 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
9485 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
9486
9487 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
9488 @acronym consistently. Standardize on "Yacc" instead of "YACC",
9489 "Algol" instead of "ALGOL". Give a bit more history about BNF.
9490
9491 2002-10-22 Akim Demaille <akim@epita.fr>
9492
9493 * data/README: New.
9494
9495 2002-10-21 Paul Eggert <eggert@twinsun.com>
9496
9497 Be consistent about 'bool'; the old code used an enum in one
9498 module and an int in another, and this violates the C standard.
9499 * m4/stdbool.m4: New file, from coreutils 4.5.3.
9500 * configure.ac (AC_HEADER_STDBOOL): Add.
9501 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
9502 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
9503 * src/symtab.c (hash_compare_symbol_t): Likewise.
9504 * src/system.h (bool, false, true): Use a definition consistent
9505 with ../lib/hash.c. All uses changed.
9506
9507 * src/complain.c (warning_issued): Renamed from warn_message_count,
9508 so that we needn't worry about integer overflow (!).
9509 Now of type bool. All uses changed.
9510 (complaint_issued): Renamed from complain_message_count; likewise.
9511
9512 * src/main.c (main): Use exit to exit with failure.
9513
9514 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
9515 rather than 1 and 0.
9516 * src/main.c (main): Likewise.
9517 * src/getargs.c (getargs): Likewise.
9518 * src/reader.c (reader): Likewise.
9519
9520 * src/getarg.c (getargs): Remove duplicate code for
9521 "Try `bison --help'".
9522
9523 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
9524 What was that "2" for?
9525
9526 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
9527 * src/getargs.c (usage): Likewise.
9528
9529 * src/getargs.c (getargs): When there are too few operands, report
9530 the last one. When there are too many, report the first extra
9531 one. This is how diffutils does it.
9532
9533 2002-10-20 Paul Eggert <eggert@twinsun.com>
9534
9535 Remove K&R vestiges.
9536 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
9537 * src/complain.c (VA_START): Remove. Assume prototypes.
9538 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
9539 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
9540 fatal): Assume prototypes.
9541 * src/complain.h: Assume prototypes.
9542 * src/system.h (PARAMS): Remove.
9543 Include <limits.h> unconditionally, since it's guaranteeed even
9544 for a freestanding C89 compiler.
9545 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
9546 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
9547
9548 2002-10-20 Akim Demaille <akim@epita.fr>
9549
9550 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
9551 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
9552 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
9553 (yyresolveStates, yyresolveAction, yyresolveStack)
9554 (yyprocessOneStack): Use them.
9555 (yy_reduce_print): New.
9556 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
9557
9558 2002-10-20 Akim Demaille <akim@epita.fr>
9559
9560 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
9561 arguments and output `void'.
9562 (b4_c_function): Rename as...
9563 (b4_c_function_def): this.
9564 (b4_c_function_decl, b4_c_ansi_function_def)
9565 (b4_c_ansi_function_decl): New.
9566 Change the interpretation of the arguments: before `int, foo', now
9567 `int foo, foo'.
9568 * data/yacc.c (yyparse): Prototype and define thanks to these.
9569 Adjust b4_c_function_def uses.
9570 * data/glr.c (yyparse): Likewise, but ANSI only.
9571
9572 2002-10-20 Akim Demaille <akim@epita.fr>
9573
9574 * src/output.c (prepare): Move the definition of `tokens_number',
9575 `nterms_number', `undef_token_number', `user_token_number_max'
9576 to...
9577 (prepare_tokens): Here.
9578 (prepare_tokens): Rename as...
9579 (prepare_symbols): this.
9580 (prepare): Move the definition of `rules_number' to...
9581 (prepare_rules): here.
9582 (prepare): Move the definition of `last', `final_state_number',
9583 `states_number' to...
9584 (prepare_states): here.
9585 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
9586
9587 2002-10-20 Akim Demaille <akim@epita.fr>
9588
9589 * src/tables.h, src/tables.c, src/output.c: Comment changes.
9590
9591 2002-10-20 Akim Demaille <akim@epita.fr>
9592
9593 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
9594 * data/c.m4: here.
9595
9596 2002-10-20 Akim Demaille <akim@epita.fr>
9597
9598 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
9599 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
9600 `pair'.
9601 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
9602 `name' to...
9603 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
9604 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
9605 These.
9606
9607 2002-10-19 Paul Eggert <eggert@twinsun.com>
9608
9609 Do not create a temporary file, as that involves security and
9610 cleanup headaches. Instead, use a pair of pipes.
9611 Derived from a suggestion by Florian Krohm.
9612 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
9613 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
9614 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
9615 (BISON_PREREQ_SUBPIPE): Add.
9616 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
9617 Add subpipe.h, subpipe.c.
9618 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
9619 * po/POTFILES.in: Add lib/subpipe.c.
9620 * src/output.c: Include "subpipe.h".
9621 (m4_invoke): Remove decl.
9622 (scan_skel): New decl.
9623 (output_skeleton): Use pipe rather than temporary file for m4 input.
9624 Check that m4sugar.m4 is readable, to avoid deadlock.
9625 Check for pipe I/O error.
9626 * src/scan-skel.l (readpipe): Remove decl.
9627 (scan_skel): New function, to be used in place of m4_invoke.
9628 Read from stream rather than file.
9629
9630 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
9631 float, as this generates a warning on Solaris 8 + GCC 3.2 with
9632 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
9633 this generates a more-accurate value anyway.
9634
9635 * lib/timevar.c (timervar_accumulate): Rename locals to
9636 avoid confusion with similarly-named more-global.
9637 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
9638
9639 * src/output.c (prepare): Use xstrdup to convert char const *
9640 to char *, to avoid GCC warning.
9641
9642 2002-10-19 Akim Demaille <akim@epita.fr>
9643
9644 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
9645 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
9646 Use them to have `calc.y' ready for %pure-parser.
9647 * data/yacc.c (YYLEX): Pass a yylex return type to
9648 b4_c_function_call.
9649
9650 2002-10-19 Akim Demaille <akim@epita.fr>
9651
9652 Prototype support of %lex-param and %parse-param.
9653
9654 * src/parse-gram.y: Add the definition of the %lex-param and
9655 %parse-param tokens, plus their rules.
9656 Drop the `_' version of %glr-parser.
9657 Add the "," token.
9658 * src/scan-gram.l (INITIAL): Scan them.
9659 * src/muscle_tab.c: Comment changes.
9660 (muscle_insert, muscle_find): Rename `pair' as `probe'.
9661 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
9662 (muscle_entry_s): The `value' member is no longer const.
9663 Adjust all dependencies.
9664 * src/muscle_tab.c (muscle_init): Adjust: use
9665 MUSCLE_INSERT_STRING.
9666 Initialize the obstack earlier.
9667 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
9668 (muscle_pair_list_grow): New.
9669 * data/c.m4 (b4_c_function_call, b4_c_args): New.
9670 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
9671 * tests/calc.at: Use %locations, not --locations.
9672 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
9673
9674 2002-10-19 Akim Demaille <akim@epita.fr>
9675
9676 * src/getargs.c (usage): Take status as argument and exit
9677 accordingly.
9678 Report the traditional `Try ... --help' message when status != 0.
9679 (usage, version): Don't take a FILE * as arg, it is pointless.
9680 (getargs): When there is an incorrect number of arguments, make it
9681 an error, and report it GNUlically thanks to `usage ()'.
9682
9683 2002-10-18 Paul Eggert <eggert@twinsun.com>
9684
9685 * data/glr.c (yyreportParseError): Don't assume that sprintf
9686 yields the length of the printed string, as this is not true
9687 on SunOS 4.1.4. Reported by Peter Klein.
9688
9689 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
9690 * tests/conflicts.at (%nonassoc and eof): Likewise.
9691 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
9692
9693 2002-10-17 Akim Demaille <akim@epita.fr>
9694
9695 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
9696 * src/getargs.c (trace_types, trace_args): Adjust.
9697 * src/reader.c (grammar_current_rule_prec_set)
9698 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
9699 Standardize error messages.
9700 And s/@prec/%prec/!
9701 (reader): Use trace_flag to enable scanner/parser debugging,
9702 instead of an adhoc scheme.
9703 * src/scan-gram.l: Remove trailing debugging code.
9704
9705 2002-10-16 Paul Eggert <eggert@twinsun.com>
9706
9707 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
9708 MUSCLE_TAB_H.
9709
9710 * NEWS: Officially drop support for building Bison with K&R C,
9711 since it didn't work anyway and it's not worth worrying about.
9712 * Makefile.maint (wget_files): Remove ansi2knr.c.
9713 (ansi2knr.c-url_prefix): Remove.
9714 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
9715 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9716 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9717
9718 2002-10-15 Paul Eggert <eggert@twinsun.com>
9719
9720 Stop using the "enum_" trick for K&R-style function definitions;
9721 it confused me, and I was the author! Instead, assume that people
9722 who want to use K&R C compilers (when using these modules in GCC,
9723 perhaps?) will run ansi2knr.
9724
9725 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
9726 All uses of "enum_" changed to "enum ".
9727 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9728 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9729
9730 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
9731 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
9732 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
9733 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
9734 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
9735 abitset_not, abitset_ones, abitset_or, abitset_or_and,
9736 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
9737 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
9738 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
9739 Use function prototypes; this removes the need for declaring
9740 static functions simply to provide their prototypes.
9741 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
9742 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
9743 bitset_count_, bitset_create, bitset_dump, bitset_first,
9744 bitset_free, bitset_init, bitset_last, bitset_next,
9745 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
9746 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
9747 bitset_print, bitset_release_memory, bitset_toggle_,
9748 bitset_type_choose, bitset_type_get, bitset_type_name_get,
9749 debug_bitset): Likewise.
9750 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
9751 * lib/bitset_stats.c (bitset_log_histogram_print,
9752 bitset_percent_histogram_print, bitset_stats_and,
9753 bitset_stats_and_cmp, bitset_stats_and_or,
9754 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
9755 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
9756 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
9757 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
9758 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
9759 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
9760 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
9761 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
9762 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
9763 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
9764 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
9765 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
9766 bitset_stats_zero): Likewise.
9767 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9768 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9769 bitsetv_dump, debug_bitsetv): Likewise.
9770 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
9771 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
9772 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
9773 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
9774 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
9775 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
9776 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
9777 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
9778 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
9779 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
9780 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
9781 Likewise.
9782 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
9783 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
9784 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
9785 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
9786 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
9787 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
9788 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
9789 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
9790 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
9791 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
9792 lbitset_xor_cmp, lbitset_zero): Likewise.
9793
9794 2002-10-14 Akim Demaille <akim@epita.fr>
9795
9796 Version 1.75.
9797
9798 2002-10-14 Akim Demaille <akim@epita.fr>
9799
9800 * tests/Makefile.am (maintainer-check-posix): New.
9801
9802 2002-10-14 Akim Demaille <akim@epita.fr>
9803
9804 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
9805 member.
9806
9807 2002-10-14 Akim Demaille <akim@epita.fr>
9808
9809 * src/tables.c (table_ninf_remap): base -> tab.
9810 Reported by Matt Rosing.
9811
9812 2002-10-14 Paul Eggert <eggert@twinsun.com>
9813
9814 * tests/action.at, tests/calc.at, tests/conflicts.at,
9815 tests/cxx-type.at, tests/headers.at, tests/input.at,
9816 tests/regression.at, tests/synclines.at, tests/torture.at:
9817 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
9818 so that the tests still work even if POSIXLY_CORRECT is set.
9819 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
9820
9821 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
9822 for portability to K&R hosts. Fix typo: signed char is guaranteed
9823 only to 127, not to 128.
9824 * data/glr.c (yysigned_char): New type.
9825 * data/yacc.c (yysigned_char): Likewise.
9826 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
9827
9828 2002-10-13 Paul Eggert <eggert@twinsun.com>
9829
9830 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
9831 true due to limited range of data type" warning from GCC.
9832
9833 * data/c.m4 (b4_token_defines): Protect against double-inclusion
9834 by wrapping enum yytokentype's definition inside #ifndef
9835 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
9836
9837 2002-10-13 Akim Demaille <akim@epita.fr>
9838
9839 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
9840 Un yy- yyrhs to avoid the name clash with the global YYRHS.
9841
9842 2002-10-13 Akim Demaille <akim@epita.fr>
9843
9844 * Makefile.maint: Update from Autoconf 2.54.
9845 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
9846
9847 2002-10-13 Akim Demaille <akim@epita.fr>
9848
9849 * src/print.c (print_state): Separate the list of solved conflicts
9850 from the other items.
9851 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
9852
9853 2002-10-13 Akim Demaille <akim@epita.fr>
9854
9855 Let nondeterministic skeletons be usable with deterministic
9856 tables.
9857
9858 With the patch, GAWK compiled by GCC without -O2 passes its test
9859 suite using a GLR parser driven by LALR tables. It fails with -O2
9860 because `struct stat' gives two different answers on my machine:
9861 88 (definition of an auto var) and later 96 (memset on this var).
9862 Hence the stack is badly corrumpted. The headers inclusion is to
9863 blame: if I move the awk.h inclusion before GLR's system header
9864 inclusion, the two struct stat have the same size.
9865
9866 * src/tables.c (pack_table): Always create conflict_table.
9867 (token_actions): Always create conflict_list.
9868 * data/glr.c (YYFLAG): Remove, unused.
9869
9870 2002-10-13 Akim Demaille <akim@epita.fr>
9871
9872 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
9873 (O0FLAGS): New.
9874 (VALGRIND, GXX): New.
9875 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
9876 * tests/bison.in: Run $PREBISON a pre-command.
9877 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9878 (maintainer-check-g++): New.
9879 * Makefile.am (maintainer-check): New.
9880
9881 2002-10-13 Akim Demaille <akim@epita.fr>
9882
9883 * data/glr.c: Formatting changes.
9884 Tweak some trace messages to match yacc.c's.
9885
9886 2002-10-13 Akim Demaille <akim@epita.fr>
9887
9888 GLR parsers sometimes raise parse errors instead of performing the
9889 default reduction.
9890 Reported by Charles-Henry de Boysson.
9891
9892 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
9893 check the length of the traces when %glr.
9894 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
9895 GLR's traces.
9896 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
9897 Test GLR parsers.
9898 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
9899 (yyltype): Remove the yy prefix from the member names.
9900 (yytable): Complete its comment.
9901 (yygetLRActions): Map error action number from YYTABLE from
9902 YYTABLE_NINF to 0.
9903 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
9904 (which was a bug: it should have been YYTABEL_NINF, and yet it was
9905 not satisfying as we could compare an YYACTION computed from
9906 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
9907 only value for error actions.
9908 (yyreportParseError): In verbose parse error messages, don't issue
9909 `error' in the list of expected tokens.
9910 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
9911 next action to perform to match glr.c's decoding.
9912 (yytable): Complete its comment.
9913
9914 2002-10-13 Paul Eggert <eggert@twinsun.com>
9915
9916 Fix problem reported by Henrik Grubbstroem in
9917 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
9918 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9919 because the Bison parser reads the second action before reducing
9920 the first one.
9921 * src/scan-gram.l (rule_length): New static var.
9922 Use it to keep track of the rule length in the scanner, since
9923 we can't expect the parser to be in lock-step sync with the scanner.
9924 (handle_action_dollar, handle_action_at): Use this var.
9925 * tests/actions.at (Exotic Dollars): Test for the problem.
9926
9927 2002-10-12 Paul Eggert <eggert@twinsun.com>
9928
9929 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9930 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9931 Include <sys/time.h> when checking for clock_t and struct tms.
9932 Use same include order as source.
9933 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
9934 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
9935
9936 * lib/timevar.c: Update copyright date and clarify comments.
9937 (get_time) [IN_GCC]: Keep the GCC version for reference.
9938
9939 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9940 GCC version as of today, then merge Bison's changes.
9941 Change "GCC" to "Bison" in copyright notice. timevar.def's
9942 author is Akim, so change that too.
9943
9944 * src/reader.c (grammar_current_rule_check):
9945 Don't worry about the default action if $$ is untyped.
9946 Prevents bogus warnings reported by Jim Gifford in
9947 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
9948
9949 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9950 * data/glr.c, data/lalr1.cc, data/yacc.c:
9951 Output token definitions before the first part of user declarations.
9952 Fixes compatibility problem reported by Jim Gifford for kbd in
9953 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
9954
9955 2002-10-11 Paul Eggert <eggert@twinsun.com>
9956
9957 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9958 (yyparse): here. This undoes some of the 2002-07-25 change.
9959 Compatibility problem reported by Ralf S. Engelschall with
9960 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9961
9962 2002-10-11 Akim Demaille <akim@epita.fr>
9963
9964 * tests/regression.at Characters Escapes): New.
9965 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9966 characters.
9967 Reported by Jan Nieuwenhuizen.
9968
9969 2002-10-11 Akim Demaille <akim@epita.fr>
9970
9971 * po/id.po: New.
9972
9973 2002-10-10 Paul Eggert <eggert@twinsun.com>
9974
9975 Portability fixes for bitsets; this also avoids several GCC
9976 warnings.
9977
9978 * lib/abitset.c: Include <stddef.h>, for offsetof.
9979 * lib/lbitset.c: Likewise.
9980
9981 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9982 properly for vectors of objects. Do not assume that adding a
9983 header size to a multiple of a word size yields a value that is
9984 properly aligned for the whole union.
9985 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9986
9987 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9988 unique names for structures.
9989 * lib/ebitset.c (ebitset_bytes): Likewise.
9990 * lib/lbitset.c (lbitset_bytes): Likewise.
9991
9992 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9993 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9994 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9995 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9996 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9997 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9998 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9999 to improve the type-checking that GCC can do.
10000 * lib/bitset.c (bitset_op4_cmp): Likewise.
10001 * lib/bitset_stats.c (bitset_stats_count,
10002 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
10003 bitset_stats_copy, bitset_stats_disjoint_p,
10004 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
10005 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
10006 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
10007 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
10008 bitset_stats_and_or_cmp, bitset_stats_andn_or,
10009 bitset_stats_andn_or_cmp, bitset_stats_or_and,
10010 bitset_stats_or_and_cmp): Likewise.
10011 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
10012 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
10013 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
10014 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
10015
10016 * lib/abitset.h: Include bitset.h, not bbitset.h.
10017 * lib/ebitset.h: Likewise.
10018 * lib/lbitset.h: Likewise.
10019
10020 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
10021 All instances of parameters of type enum bitset_opts are now of
10022 type enum_bitset_opts, to conform to the C Standard, and similarly
10023 for enum_bitset_type.
10024 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
10025 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
10026
10027 Do not use "struct bitset_struct" to mean different things in
10028 different modules. Not only is this confusing, it violates
10029 the C Standard, which requires that structure types in different
10030 modules must be compatible if one is to be passed to the other.
10031 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
10032 All instances of "struct bitset_struct *" replaced with "bitset".
10033 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
10034 (union bitset_union, struct abitset_struct, struct ebitset_struct,
10035 struct lbitset_struct, struct bitset_stats_struct): New types.
10036 All uses of struct bitset_struct changed to union bitset_union,
10037 etc.
10038 * lib/abitset.c (struct abitset_struct, abitset,
10039 struct bitset_struct): Remove.
10040 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
10041 struct bitset_struct): Remove.
10042 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
10043 bitset_struct): Remove.
10044 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
10045 Likewise.
10046
10047 Do not call a function of type T using a call that assumes the
10048 function is of a different type U. Standard C requires that a
10049 function must be called with a type that is compatible with its
10050 definition.
10051 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
10052 New decls.
10053 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
10054 New functions.
10055 * lib/ebitset.c (PFV): Remove.
10056 * lib/lbitset.c (PFV): Likewise.
10057 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
10058 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
10059 decls.
10060 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
10061 (ebitset_vtable): Use them.
10062 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
10063 lbitset_xor): New functions.
10064 (lbitset_vtable): Use them.
10065
10066 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
10067 Declare.
10068
10069 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
10070 GCC warning.
10071 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
10072 Use offsetof, for simplicity.
10073
10074 2002-10-06 Paul Eggert <eggert@twinsun.com>
10075
10076 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
10077 the same width as int. This reapplies a hunk of the 2002-08-12 patch
10078 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
10079 which was inadvertently undone by the 2002-09-30 patch.
10080 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
10081 the same width as int.
10082
10083 2002-10-04 Paul Eggert <eggert@twinsun.com>
10084
10085 Version 1.50.
10086
10087 * configure.ac (AC_INIT), NEWS: Increment version number.
10088
10089 * doc/bison.texinfo: Minor spelling, grammar, and white space
10090 fixes.
10091 (Symbols): Mention that any negative value returned from yylex
10092 signifies end-of-input. Warn about negative chars. Mention
10093 the portable Standard C character set.
10094
10095 The GNU coding standard says CFLAGS and YFLAGS are reserved
10096 for the installer to set.
10097 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
10098 * src/Makefile.am (AM_CFLAGS): Likewise.
10099 (AM_YFLAGS): Renamed from YFLAGS.
10100
10101 Fix some MAX and MIN problems.
10102 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
10103 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
10104 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
10105 * src/reader.c (reader): Use it.
10106
10107 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
10108 POSIX 1003.1-2001 has removed fgrep.
10109
10110 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
10111
10112 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
10113 interpreted as signed.
10114 * lib/ebitset.c (ebitset_list): Fix bug.
10115
10116 2002-10-01 Paul Eggert <eggert@twinsun.com>
10117
10118 More fixes for 64-bit hosts and large bitsets.
10119
10120 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
10121 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
10122 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
10123 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
10124 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
10125 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
10126 bitset_count_): Likewise.
10127 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
10128 bitset_first, bitset_last): Likewise.
10129 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
10130 bitset_stats_list_reverse, bitset_stats_size,
10131 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
10132 Likewise.
10133 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10134 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
10135 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
10136 bitsetv_reflexive_transitive_closure): Likewise.
10137 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
10138 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
10139 Likewise.
10140 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
10141 Likewise.
10142
10143 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
10144 Use size_t, not unsigned int, to count bytes.
10145 * lib/abitset.h (abitset_bytes): Likewise.
10146 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
10147 Likewise.
10148 * lib/bitset.h (bitset_bytes): Likewise.
10149 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
10150 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
10151 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10152 * lib/ebitset.c (ebitset_bytes): Likewise.
10153 * lib/ebitset.h (ebitset_bytes): Likewise.
10154 * lib/lbitset.c (lbitset_bytes): Likewise.
10155 * lib/lbitset.h (lbitset_bytes): Likewise.
10156
10157 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
10158 abitset_subset_p, abitset_disjoint_p, abitset_and,
10159 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
10160 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
10161 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
10162 abitset_or_and, abitset_or_and_cmp):
10163 Use bitset_windex instead of unsigned int.
10164 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
10165 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
10166 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
10167 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
10168 Likewise.
10169 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
10170
10171 * lib/bitset.c (bitset_print):
10172 Use proper printf formats for widths of integer types.
10173 * lib/bitset_stats.c (bitset_percent_histogram_print,
10174 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
10175 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10176 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
10177 * lib/lbitset.c (lbitset_bytes): Likewise.
10178
10179 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
10180 BITSET_SIZE_MAX): New macros.
10181 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
10182 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
10183 to BITSET_WINDEX_MAX.
10184
10185 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
10186 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
10187 since we now return the bitset_bindex type (not int).
10188
10189 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
10190 when computing sizes.
10191 * lib/ebitset.c (ebitset_elts_grow): Likewise.
10192
10193 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
10194 and avoid cast to unsigned.
10195
10196 2002-09-30 Akim Demaille <akim@epita.fr>
10197
10198 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
10199 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
10200 Updates from Michael Hayes.
10201
10202 2002-09-30 Art Haas <ahaas@neosoft.com>
10203
10204 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
10205 invocations.
10206 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
10207 defined.
10208
10209 2002-09-27 Akim Demaille <akim@epita.fr>
10210
10211 Version 1.49c.
10212
10213 2002-09-27 Akim Demaille <akim@epita.fr>
10214
10215 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
10216 (Because of AC_LIBSOURCE).
10217
10218 2002-09-27 Akim Demaille <akim@epita.fr>
10219
10220 Playing with Autoscan.
10221
10222 * configure.ac: Remove the old LIBOBJ tweaks.
10223 (AC_REPLACE_FUNCS): Add strrchr and strtol.
10224 * lib/strrchr.c: New.
10225 * lib/strtol.c: New, from the Coreutils 4.5.1.
10226
10227 2002-09-27 Akim Demaille <akim@epita.fr>
10228
10229 Playing with Autoscan.
10230
10231 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
10232 * lib/Makefile.am (libbison_a_SOURCES): No longer include
10233 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
10234 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
10235 Coreutils 4.5.1.
10236
10237 2002-09-24 Akim Demaille <akim@epita.fr>
10238
10239 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
10240 (Frequently Asked Questions, Parser Stack Overflow): New.
10241
10242 2002-09-13 Akim Demaille <akim@epita.fr>
10243
10244 Playing with autoscan.
10245
10246 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
10247 * src/files.c (skeleton_find): Remove, unused.
10248 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
10249 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
10250
10251 2002-09-13 Akim Demaille <akim@epita.fr>
10252
10253 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
10254 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
10255
10256 2002-09-13 Akim Demaille <akim@epita.fr>
10257
10258 * configure.ac: Require 2.54.
10259 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
10260 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
10261 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
10262 Remove, provided by Autoconf macros.
10263
10264 2002-09-12 Akim Demaille <akim@epita.fr>
10265
10266 * m4/prereq.m4: Update, from Coreutils 4.5.1.
10267
10268 2002-09-12 Akim Demaille <akim@epita.fr>
10269
10270 * m4/prereq.m4: Update, from Fileutils 4.1.5.
10271 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
10272 Reported by Martin Mokrejs.
10273
10274 2002-09-10 Akim Demaille <akim@epita.fr>
10275
10276 * src/parse-gram.y: Associate a human readable string to each
10277 token type.
10278 * tests/regression.at (Invalid inputs): Adjust.
10279
10280 2002-09-10 Gary V. Vaughan <gary@gnu.org>
10281
10282 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
10283 with an Autoconf-2.5x style configure.ac.
10284
10285 2002-09-06 Paul Eggert <eggert@twinsun.com>
10286
10287 * doc/bison.texinfo (Conditions): Make explicit that the GPL
10288 exception applies only to yacc.c. This is a modification of a
10289 patch originally suggested by Akim Demaille.
10290
10291 2002-09-06 Akim Demaille <akim@epita.fr>
10292
10293 * data/c.m4 (b4_copyright): Move the GPL exception comment from
10294 here to...
10295 * data/yacc.c: here.
10296
10297 * data/lalr1.cc (struct yyltype): Don't define it, since we use
10298 LocationType.
10299 (b4_ltype): Default to yy::Location from location.hh.
10300
10301 2002-09-04 Jim Meyering <jim@meyering.net>
10302
10303 * data/yacc.c: Guard the declaration of yytoknum also with
10304 `#ifdef YYPRINT', so it is declared only when used.
10305
10306 2002-09-04 Akim Demaille <akim@epita.fr>
10307
10308 * configure.in: Rename as...
10309 * configure.ac: this.
10310 Bump to 1.49c.
10311
10312 2002-09-04 Akim Demaille <akim@epita.fr>
10313
10314 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
10315 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
10316 translate maintainer only messages.
10317
10318 2002-08-12 Paul Eggert <eggert@twinsun.com>
10319
10320 Version 1.49b.
10321
10322 * Makefile.am (SUBDIRS): Remove intl.
10323 (DISTCLEANFILES): Remove.
10324 * NEWS: Mention that GNU M4 is now required. Clarify what is
10325 meant by "larger grammars". Mention the pt_BR translation.
10326 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
10327 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
10328 Bump version from 0.11.2 to 0.11.5.
10329 (BISON_PREREQ_STAGE): Remove.
10330 (AM_GNU_GETTEXT): Use external gettext.
10331 (AC_OUTPUT): Remove intl/Makefile.
10332
10333 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
10334
10335 * data/glr.c: Include string.h, for strlen.
10336 (yyreportParseError): Use size_t for yysize.
10337 (yy_yypstack): No longer nested inside yypstates, as nested
10338 functions are not portable. Do not assume size_t is the
10339 same width as int.
10340 (yypstates): Do not assume that ptrdiff_t is the same width
10341 as int, and similarly for yyposn and YYINDEX.
10342
10343 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
10344
10345 * lib/Makefile.am (INCLUDES): Do not include from the intl
10346 directory, which has been removed.
10347 * src/Makefile.am (INCLUDES): Likewise.
10348
10349 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
10350 (bitsets_sources, additional_bitsets_sources, timevars_sources):
10351 New vars.
10352
10353 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
10354 * tests/Makefile.am (EXTRA_DIST): Likewise.
10355
10356 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
10357 Do not assume that bitset_windex is the same width as unsigned.
10358
10359 * lib/abitset.c (abitset_unused_clear): Do not assume that
10360 bitset_word is the same width as int.
10361 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
10362 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
10363 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
10364 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
10365 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
10366
10367 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
10368 portability to one's complement hosts!).
10369 * lib/ebitset.c (ebitset_op1): Likewise.
10370 * lib/lbitset.c (lbitset_op1): Likewise.
10371
10372 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
10373 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10374 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
10375 Sync with fileutils.
10376 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
10377 lib/gettext.h: Sync with diffutils.
10378
10379 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
10380 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
10381
10382 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
10383 PROTOTYPES to check for prototypes, and "defined __STDC__" to
10384 check for void *.
10385
10386 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
10387 size_t; the old version tried to do this but casted improperly.
10388 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
10389 (bitset_test): Now returns int, not unsigned long.
10390
10391 * lib/bitset_stats.c: Include "gettext.h".
10392 (_): New macro.
10393 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
10394 name locals "index", as it generates unnecessary warnings on some
10395 hosts that have an "index" function.
10396
10397 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
10398 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
10399 they need translation.
10400 * src/LR0.c (state_list_append, new_itemsets, get_state,
10401 append_states, generate_states): Likewise.
10402 * src/assoc.c (assoc_to_string): Likewise.
10403 * src/closure.c (print_closure, set_firsts, closure): Likewise.
10404 * src/gram.c (grammar_dump): Likewise.
10405 * src/injections.c (injections_compute): Likewise.
10406 * src/lalr.c (lookaheads_print): Likewise.
10407 * src/relation.c (relation_transpose): Likewise.
10408 * src/scan-gram.l: Likewise.
10409 * src/tables.c (table_grow, pack_vector): Likewise.
10410
10411 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
10412 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
10413 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
10414 * m4/mbstate_t.m4: Sync with fileutils.
10415 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
10416
10417 * po/LINGUAS: Add pt_BR.
10418 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
10419 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
10420 lib/timevar.c.
10421 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
10422 manual recommends.
10423 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
10424
10425 * src/complain.c (strerror_r): Remove decl; not needed.
10426 (strerror): Use same pattern as ../lib/error.c.
10427
10428 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
10429
10430 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
10431
10432 * src/main.c (main): Cast result of bindtextdomain and textdomain
10433 to void, to avoid a GCC warning when --disable-nls is in effect.
10434
10435 * src/scan-gram.l: Use strings rather than escapes when possible,
10436 to minimize the number of warnings from xgettext.
10437 (handle_action_dollar, handle_action_at): Don't use isdigit,
10438 as it mishandles negative chars and it may not work as expected
10439 outside the C locale.
10440
10441 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
10442 this is a GCC extension and is not portable to other compilers.
10443
10444 * src/system.h (alloca): Use same pattern as ../lib/error.c.
10445 Do not include <ctype.h>; no longer needed.
10446 Do not include <malloc.h>; no longer needed (and generates
10447 warnings on OpenBSD 3.0).
10448
10449 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
10450 it's not portable.
10451
10452 * tests/regression.at: Do not use 'cc -c input.c -o input';
10453 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
10454
10455 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
10456 exit status as failure, not just exit status 1. Sun C exits
10457 with status 2 sometimes.
10458
10459 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
10460 Use it for the two large tests.
10461
10462 2002-08-02 Akim Demaille <akim@epita.fr>
10463
10464 * src/conflicts.c (conflicts_output): Don't output rules never
10465 reduced here, since anyway that computation doesn't work.
10466 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
10467 (rule_useless_p, rule_never_reduced_p): New.
10468 (grammar_rules_partial_print): Use a filter instead of a range.
10469 Display the title only if needed.
10470 (grammar_rules_print): Adjust.
10471 (grammar_rules_never_reduced_report): New.
10472 * src/tables.c (action_row): Move the computation of rules never
10473 reduced to...
10474 (token_actions): here.
10475 * src/main.c (main): Make the parser before making the report, so
10476 that rules never reduced are computed.
10477 Call grammar_rules_never_reduced_report.
10478 * src/print.c (print_results): Report rules never reduced.
10479 * tests/conflicts.at, tests/reduce.at: Adjust.
10480
10481 2002-08-01 Akim Demaille <akim@epita.fr>
10482
10483 Instead of attaching lookaheads and duplicating the rules being
10484 reduced by a state, attach the lookaheads to the reductions.
10485
10486 * src/state.h (state_t): Remove the `lookaheads',
10487 `lookaheads_rule' member.
10488 (reductions_t): Add a `lookaheads' member.
10489 Use a regular array for the `rules'.
10490 * src/state.c (reductions_new): Initialize the lookaheads member
10491 to 0.
10492 (state_rule_lookaheads_print): Adjust.
10493 * src/state.h, src/state.c (state_reductions_find): New.
10494 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
10495 (count_rr_conflicts): Adjust.
10496 * src/lalr.c (LArule): Remove.
10497 (add_lookback_edge): Adjust.
10498 (state_lookaheads_count): New.
10499 (states_lookaheads_initialize): Merge into...
10500 (initialize_LA): this.
10501 (lalr_free): Adjust.
10502 * src/main.c (main): Don't free nullable and derives too early: it
10503 is used by --verbose.
10504 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
10505
10506 2002-08-01 Akim Demaille <akim@epita.fr>
10507
10508 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
10509 `rule_number_t**'.
10510 (set_derives, free_derives): Rename as...
10511 (derives_compute, derives_free): this.
10512 Adjust all dependencies.
10513 * src/nullable.c (set_nullable, free_nullable): Rename as...
10514 (nullable_compute, nullable_free): these.
10515 (rule_list_t): Store rule_t *, not rule_number_t.
10516 * src/state.c (state_rule_lookaheads_print): Directly compare rule
10517 pointers, instead of their numbers.
10518 * src/main.c (main): Call nullable_free, and derives_free earlier,
10519 as they were lo longer used.
10520
10521 2002-08-01 Akim Demaille <akim@epita.fr>
10522
10523 * lib/timevar.c (get_time): Include children time.
10524 * src/lalr.h (LA, LArule): Don't export them: used with the
10525 state_t.
10526 * src/lalr.c (LA, LArule): Static.
10527 * src/lalr.h, src/lalr.c (lalr_free): New.
10528 * src/main.c (main): Call it.
10529 * src/tables.c (pack_vector): Check whether loc is >= to the
10530 table_size, not >.
10531 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
10532 (tables_generate): do it, since that's also it which allocates
10533 them.
10534 Don't free LA and LArule, main does.
10535
10536 2002-07-31 Akim Demaille <akim@epita.fr>
10537
10538 Separate parser tables computation and output.
10539
10540 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
10541 (conflict_list, conflict_list_cnt, table, check, table_ninf)
10542 (yydefgoto, yydefact, high): Move to...
10543 * src/tables.h, src/tables.c: here.
10544 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10545 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10546 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
10547 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
10548 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
10549 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
10550 (action_row, save_row, token_actions, save_column, default_goto)
10551 (goto_actions, sort_actions, matching_state, pack_vector)
10552 (table_ninf_remap, pack_table, prepare_actions): Move to...
10553 * src/tables.c: here.
10554 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
10555 * src/output.c (token_actions, output_base, output_conflicts)
10556 (output_check): Merge into...
10557 (prepare_actions): this.
10558 (actions_output): Rename as...
10559 (user_actions_output): this.
10560 * src/main.c (main): Call tables_generate and tables_free.
10561
10562 2002-07-31 Akim Demaille <akim@epita.fr>
10563
10564 Steal GCC's --time-report support.
10565
10566 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
10567 stolen/adjusted from GCC.
10568 * m4/stage.m4: Remove time related checks.
10569 * m4/timevar.m4: New.
10570 * configure.in: Adjust.
10571 * src/system.h: Adjust to using timevar.h.
10572 * src/getargs.h, src/getargs.c: Support trace_time for
10573 --trace=time.
10574 * src/main.c (stage): Remove.
10575 (main): Replace `stage' invocations with timevar calls.
10576 * src/output.c: Insert pertinent timevar calls.
10577
10578 2002-07-31 Akim Demaille <akim@epita.fr>
10579
10580 Let --trace have arguments.
10581
10582 * src/getargs.h (enum trace_e): New.
10583 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
10584 (long_options, short_options): --trace/-T takes an optional
10585 argument.
10586 Change all the uses of trace_flag to reflect the new flags.
10587 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
10588
10589 Strengthen `stage' portability.
10590
10591 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
10592 * configure.in: Use it.
10593 Don't check for malloc.h and sys/times.h.
10594 * src/system.h: Include them when appropriate.
10595 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
10596 times and struct tms are available.
10597
10598 2002-07-30 Akim Demaille <akim@epita.fr>
10599
10600 In verbose parse error message, don't report `error' as an
10601 expected token.
10602 * tests/actions.at (Printers and Destructors): Adjust.
10603 * tests/calc.at (Calculator $1): Adjust.
10604 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
10605 error message, do not report the parser accepts the error token in
10606 that state.
10607
10608 2002-07-30 Akim Demaille <akim@epita.fr>
10609
10610 Normalize conflict related messages.
10611
10612 * src/complain.h, src/complain.c (warn, complain): New.
10613 * src/conflicts.c (conflicts_print): Use them.
10614 (conflict_report_yacc): New, extracted from...
10615 (conflicts_print): here.
10616 * tests/conflicts.at, tests/existing.at: Adjust.
10617
10618 2002-07-30 Akim Demaille <akim@epita.fr>
10619
10620 Report rules which are never reduced by the parser: those hidden
10621 by conflicts.
10622
10623 * src/LR0.c (save_reductions): Don't make the final state too
10624 different: save its reduction (accept) instead of having a state
10625 without any action (no shift or goto, no reduce).
10626 Note: the final state is now a ``regular'' state, i.e., the
10627 parsers now contain `reduce 0' as default reduction.
10628 Nevertheless, since they decide to `accept' when yystate =
10629 final_state, they still will not reduce rule 0.
10630 * src/print.c (print_actions, print_reduction): Adjust.
10631 * src/output.c (action_row): Track reduced rules.
10632 (token_actions): Report rules never reduced.
10633 * tests/conflicts.at, tests/regression.at: Adjust.
10634
10635 2002-07-30 Akim Demaille <akim@epita.fr>
10636
10637 `stage' was accidently included in a previous patch.
10638 Initiate its autoconfiscation.
10639
10640 * configure.in: Look for malloc.h and sys/times.h.
10641 * src/main.c (stage): Adjust.
10642 Report only when trace_flag.
10643
10644 2002-07-29 Akim Demaille <akim@epita.fr>
10645
10646 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
10647 state_number_t.
10648 (errs_t): symbol_t*, not symbol_number_t.
10649 (reductions_t): rule_t*, not rule_number_t.
10650 (FOR_EACH_SHIFT): New.
10651 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
10652 * src/print.c, src/print_graph.c: Adjust.
10653
10654 2002-07-29 Akim Demaille <akim@epita.fr>
10655
10656 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
10657
10658 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
10659 (endtoken, accept): these.
10660 * src/reader.c (reader): Set endtoken's default tag to "$end".
10661 Set undeftoken's tag to "$undefined" instead of "$undefined.".
10662 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
10663 Adjust.
10664
10665 2002-07-29 Akim Demaille <akim@epita.fr>
10666
10667 * src/reduce.c (reduce_grammar): When the language is empty,
10668 complain about the start symbol, not the axiom.
10669 Use its location.
10670 * tests/reduce.at (Empty Language): New.
10671
10672 2002-07-26 Akim Demaille <akim@epita.fr>
10673
10674 * src/reader.h, src/reader.c (gram_error): ... can't get
10675 yycontrol without making too strong assumptions on the parser
10676 itself.
10677 * src/output.c (prepare_tokens): Use the real 0th value of
10678 token_translations instead of `0'.
10679 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
10680 visible here.
10681 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
10682 for the time being: %locations ought to provide it to yyerror.
10683
10684 2002-07-25 Akim Demaille <akim@epita.fr>
10685
10686 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
10687 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
10688 * tests/regression.at (Web2c Actions): Adjust.
10689
10690 2002-07-25 Akim Demaille <akim@epita.fr>
10691
10692 Stop storing rules from 1 to nrules + 1.
10693
10694 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
10695 * src/nullable.c, src/output.c, src/print.c, src/reader.c
10696 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
10697 Iterate from 0 to nrules.
10698 Use rule_number_as_item_number and item_number_as_rule_number.
10699 Adjust to `derive' now containing possibly 0.
10700 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
10701 Handle the `- 1' part in rule numbers from/to item numbers.
10702 * src/conflicts.c (log_resolution): Fix the message which reversed
10703 shift and reduce.
10704 * src/output.c (action_row): Initialize default_rule to -1.
10705 (token_actions): Adjust.
10706 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
10707 expected output.
10708 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
10709
10710 2002-07-25 Akim Demaille <akim@epita.fr>
10711
10712 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
10713 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
10714 (b4_c_knr_arg_decl): New.
10715 * data/yacc.c: Use it to define yysymprint, yydestruct, and
10716 yyreport_parse_error.
10717
10718 2002-07-25 Akim Demaille <akim@epita.fr>
10719
10720 * data/yacc.c (yyreport_parse_error): New, extracted from...
10721 (yyparse): here.
10722 (yydestruct, yysymprint): Move above yyparse.
10723 Be K&R compliant.
10724
10725 2002-07-25 Akim Demaille <akim@epita.fr>
10726
10727 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
10728 replace...
10729 (b4_sint_type, b4_uint_type): these.
10730 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
10731 * tests/regression.at (Web2c Actions): Adjust.
10732
10733 2002-07-25 Akim Demaille <akim@epita.fr>
10734
10735 * src/gram.h (TIEM_NUMBER_MAX): New.
10736 (item_number_of_rule_number, rule_number_of_item_number): Rename
10737 as...
10738 (rule_number_as_item_number, item_number_as_rule_number): these.
10739 Adjust dependencies.
10740 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10741 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10742 (symbol_number_to_vector_number): New.
10743 (order): Of vector_number_t* type.
10744 (base_t, BASE_MAX, BASE_MIN): New.
10745 (froms, tos, width, pos, check): Of base_t type.
10746 (action_number_t, ACTION_MIN, ACTION_MAX): New.
10747 (actrow): Of action_number_t type.
10748 (conflrow): Of unsigned int type.
10749 (table_ninf, base_ninf): New.
10750 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
10751 (muscle_insert_int_table, muscle_insert_base_table)
10752 (muscle_insert_rule_number_table): New.
10753 (prepare_tokens): Output `toknum' as int_table.
10754 (action_row): Returns a rule_number_t.
10755 Use ACTION_MIN, not SHRT_MIN.
10756 (token_actions): yydefact is rule_number_t*.
10757 (table_ninf_remap): New.
10758 (pack_table): Use it for `base' and `table'.
10759 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
10760 replaced with...
10761 (YYPACT_NINF, YYTABLE_NINF): these.
10762 (yypact, yytable): Compute their types instead of hard-coded
10763 `short'.
10764 * tests/regression.at (Web2c Actions): Adjust.
10765
10766 2002-07-19 Akim Demaille <akim@epita.fr>
10767
10768 * src/scan-gram.l (id): Can start with an underscore.
10769
10770 2002-07-16 Akim Demaille <akim@epita.fr>
10771
10772 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
10773 Adjust all former `associativity' dependencies.
10774 * src/symtab.c (symbol_new): Default associativity is `undef', not
10775 `right'.
10776 (symbol_check_alias_consistence): Adjust.
10777
10778 2002-07-09 Akim Demaille <akim@epita.fr>
10779
10780 * doc/bison.texinfo: Properly set the ``header'' part.
10781 Use @dircategory ``GNU programming tools'' as per Texinfo's
10782 documentation.
10783 Use @copying.
10784
10785 2002-07-09 Akim Demaille <akim@epita.fr>
10786
10787 * lib/quotearg.h: Protect against multiple inclusions.
10788 * src/location.h (location_t): Add a `file' member.
10789 (LOCATION_RESET, LOCATION_PRINT): Adjust.
10790 * src/complain.c (warn_at, complain_at, fatal_at): Drop
10791 `error_one_per_line' support.
10792
10793 2002-07-09 Akim Demaille <akim@epita.fr>
10794
10795 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
10796 * src/reader.c (lineno): Remove.
10797 Adjust all dependencies.
10798 (get_merge_function): Take a location and use complain_at.
10799 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
10800 * tests/regression.at (Invalid inputs, Mixing %token styles):
10801 Adjust.
10802
10803 2002-07-09 Akim Demaille <akim@epita.fr>
10804
10805 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
10806 recovery rule, and forbid extensions when --yacc.
10807 (gram_error): Use complain_at.
10808 * src/reader.c (reader): Exit if there were parse errors.
10809
10810 2002-07-09 Akim Demaille <akim@epita.fr>
10811
10812 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
10813 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
10814 Reported by R Blake <blakers@mac.com>.
10815
10816 2002-07-09 Akim Demaille <akim@epita.fr>
10817
10818 * data/yacc.c: Output the copyright notive in the header.
10819
10820 2002-07-03 Akim Demaille <akim@epita.fr>
10821
10822 * src/output.c (froms, tos): Are state_number_t.
10823 (save_column): sp, sp1, and sp2 are state_number_t.
10824 (prepare): Rename `final' as `final_state_number', `nnts' as
10825 `nterms_number', `nrules' as `rules_number', `nstates' as
10826 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
10827 unused.
10828 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
10829 * data/lalr1.cc (nsym_): Remove, unused.
10830
10831 2002-07-03 Akim Demaille <akim@epita.fr>
10832
10833 * src/lalr.h, src/lalr.c (goto_number_t): New.
10834 * src/lalr.c (goto_list_t): New.
10835 Propagate them.
10836 * src/nullable.c (rule_list_t): New.
10837 Propagate.
10838 * src/types.h: Remove.
10839
10840 2002-07-03 Akim Demaille <akim@epita.fr>
10841
10842 * src/closure.c (print_fderives): Use rule_rhs_print.
10843 * src/derives.c (print_derives): Use rule_rhs_print.
10844 (rule_list_t): New, replaces `shorts'.
10845 (set_derives): Add comments.
10846 * tests/sets.at (Nullable, Firsts): Adjust.
10847
10848 2002-07-03 Akim Demaille <akim@epita.fr>
10849
10850 * src/output.c (prepare_actions): Free `tally' and `width'.
10851 (prepare_actions): Allocate and free `order'.
10852 * src/symtab.c (symbols_free): Free `symbols'.
10853 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
10854 * src/output.c (m4_invoke): Move to...
10855 * src/scan-skel.l: here.
10856 (<<EOF>>): Close yyout, and free its name.
10857
10858 2002-07-03 Akim Demaille <akim@epita.fr>
10859
10860 Fix some memory leaks, and fix a bug: state 0 was examined twice.
10861
10862 * src/LR0.c (new_state): Merge into...
10863 (state_list_append): this.
10864 (new_states): Merge into...
10865 (generate_states): here.
10866 (set_states): Don't ensure a proper `errs' state member here, do it...
10867 * src/conflicts.c (conflicts_solve): here.
10868 * src/state.h, src/state.c: Comment changes.
10869 (state_t): Rename member `shifts' as `transitions'.
10870 Adjust all dependencies.
10871 (errs_new): For consistency, also take the values as argument.
10872 (errs_dup): Remove.
10873 (state_errs_set): New.
10874 (state_reductions_set, state_transitions_set): Assert that no
10875 previous value was assigned.
10876 (state_free): New.
10877 (states_free): Use it.
10878 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
10879 temporary storage: use `errs' and `nerrs' as elsewhere.
10880 (set_conflicts): Allocate and free this `errs'.
10881
10882 2002-07-02 Akim Demaille <akim@epita.fr>
10883
10884 * lib/libiberty.h: New.
10885 * lib: Update the bitset implementation from upstream.
10886 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
10887 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
10888 * src/main.c: Adjust bitset stats calls.
10889
10890 2002-07-01 Paul Eggert <eggert@twinsun.com>
10891
10892 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
10893 char, so that negative chars don't collide with $.
10894
10895 2002-06-30 Akim Demaille <akim@epita.fr>
10896
10897 Have the GLR tests be `warning' checked, and fix the warnings.
10898
10899 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
10900 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
10901 (yyremoveDeletes): `yyi' and `yyj' are size_t.
10902 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
10903 (yyaddDeferredAction): static.
10904 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
10905 (yyreportParseError): yyprefix is const.
10906 yytokenp is used only when verbose.
10907 (yy__GNUC__): Replace with __GNUC__.
10908 (yypdumpstack): yyi is size_t.
10909 (yypreference): Un-yy local variables and arguments, to avoid
10910 clashes with `yyr1'. Anyway, we are not in the user name space.
10911 (yytname_size): be an int, as is compared with ints.
10912 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
10913 Use them.
10914 * tests/cxx-gram.at: Use quotation to protect $1.
10915 Use AT_COMPILE to enable warnings hunts.
10916 Prototype yylex and yyerror.
10917 `Use' argc.
10918 Include `string.h', not `strings.h'.
10919 Produce and prototype stmtMerge only when used.
10920 yylex takes a location.
10921
10922 2002-06-30 Akim Demaille <akim@epita.fr>
10923
10924 We spend a lot of time in quotearg, in particular when --verbose.
10925
10926 * src/symtab.c (symbol_get): Store a quoted version of the key.
10927 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10928 Adjust all callers.
10929
10930 2002-06-30 Akim Demaille <akim@epita.fr>
10931
10932 * src/state.h (reductions_t): Rename member `nreds' as num.
10933 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10934 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10935
10936 2002-06-30 Akim Demaille <akim@epita.fr>
10937
10938 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10939 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10940 (shifts_to): Rename as...
10941 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10942 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10943 (TRANSITION_IS_DISABLED, transitions_to): these.
10944
10945 2002-06-30 Akim Demaille <akim@epita.fr>
10946
10947 * src/print.c (print_shifts, print_gotos): Merge into...
10948 (print_transitions): this.
10949 (print_transitions, print_errs, print_reductions): Align the
10950 lookaheads columns.
10951 (print_core, print_transitions, print_errs, print_state,
10952 print_grammar): Output empty lines separator before, not after.
10953 (state_default_rule_compute): Rename as...
10954 (state_default_rule): this.
10955 * tests/conflicts.at (Defaulted Conflicted Reduction),
10956 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10957 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10958
10959 2002-06-30 Akim Demaille <akim@epita.fr>
10960
10961 Display items as we display rules.
10962
10963 * src/gram.h, src/gram.c (rule_lhs_print): New.
10964 * src/gram.c (grammar_rules_partial_print): Use it.
10965 * src/print.c (print_core): Likewise.
10966 * tests/conflicts.at (Defaulted Conflicted Reduction),
10967 (Unresolved SR Conflicts): Adjust.
10968 (Unresolved SR Conflicts): Adjust and rename as...
10969 (Resolved SR Conflicts): this, as was meant.
10970 * tests/regression.at (Web2c Report): Adjust.
10971
10972 2002-06-30 Akim Demaille <akim@epita.fr>
10973
10974 * src/print.c (state_default_rule_compute): New, extracted from...
10975 (print_reductions): here.
10976 Pessimize, but clarify the code.
10977 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10978
10979 2002-06-30 Akim Demaille <akim@epita.fr>
10980
10981 * src/output.c (action_row): Let default_rule be always a rule
10982 number.
10983
10984 2002-06-30 Akim Demaille <akim@epita.fr>
10985
10986 * src/closure.c (print_firsts, print_fderives, closure):
10987 Use BITSET_EXECUTE.
10988 * src/lalr.c (lookaheads_print): Likewise.
10989 * src/state.c (state_rule_lookaheads_print): Likewise.
10990 * src/print_graph.c (print_core): Likewise.
10991 * src/print.c (print_reductions): Likewise.
10992 * src/output.c (action_row): Likewise.
10993 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10994
10995 2002-06-30 Akim Demaille <akim@epita.fr>
10996
10997 * src/print_graph.c: Use report_flag.
10998
10999 2002-06-30 Akim Demaille <akim@epita.fr>
11000
11001 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
11002 to...
11003 * src/relation.h, src/relation.c (traverse, relation_digraph)
11004 (relation_print, relation_transpose): New.
11005
11006 2002-06-30 Akim Demaille <akim@epita.fr>
11007
11008 * src/state.h, src/state.c (shifts_to): New.
11009 * src/lalr.c (build_relations): Use it.
11010
11011 2002-06-30 Akim Demaille <akim@epita.fr>
11012
11013 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
11014 (item_number_of_rule_number, rule_number_of_item_number): New.
11015 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
11016 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11017 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
11018 Propagate their use.
11019 Much remains to be done, in particular wrt `shorts' from types.h.
11020
11021 2002-06-30 Akim Demaille <akim@epita.fr>
11022
11023 * src/symtab.c (symbol_new): Initialize the `printer' member.
11024
11025 2002-06-30 Akim Demaille <akim@epita.fr>
11026
11027 * src/LR0.c (save_reductions): Remove, replaced by...
11028 * src/state.h, src/state.c (state_reductions_set): New.
11029 (reductions, errs): Rename as...
11030 (reductions_t, errs_t): these.
11031 Adjust all dependencies.
11032
11033 2002-06-30 Akim Demaille <akim@epita.fr>
11034
11035 * src/LR0.c (state_list_t, state_list_append): New.
11036 (first_state, last_state): Now symbol_list_t.
11037 (this_state): Remove.
11038 (new_itemsets, append_states, save_reductions): Take a state_t as
11039 argument.
11040 (set_states, generate_states): Adjust.
11041 (save_shifts): Remove, replaced by...
11042 * src/state.h, src/state.c (state_shifts_set): New.
11043 (shifts): Rename as...
11044 (shifts_t): this.
11045 Adjust all dependencies.
11046 * src/state.h (state_t): Remove the `next' member.
11047
11048 2002-06-30 Akim Demaille <akim@epita.fr>
11049
11050 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
11051 escaped in slot 0.
11052
11053 2002-06-30 Akim Demaille <akim@epita.fr>
11054
11055 Use hash.h for the state hash table.
11056
11057 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
11058 (allocate_storage): Use state_hash_new.
11059 (free_storage): Use state_hash_free.
11060 (new_state, get_state): Adjust.
11061 * src/lalr.h, src/lalr.c (states): Move to...
11062 * src/states.h (state_t): Remove the `link' member, no longer
11063 used.
11064 * src/states.h, src/states.c: here.
11065 (state_hash_new, state_hash_free, state_hash_lookup)
11066 (state_hash_insert, states_free): New.
11067 * src/states.c (state_table, state_compare, state_hash): New.
11068 * src/output.c (output_actions): Do not free states now, since we
11069 still need to know the final_state number in `prepare', called
11070 afterwards. Do it...
11071 * src/main.c (main): here: call states_free after `output'.
11072
11073 2002-06-30 Akim Demaille <akim@epita.fr>
11074
11075 * src/state.h, src/state.c (state_new): New, extracted from...
11076 * src/LR0.c (new_state): here.
11077 * src/state.h (STATE_ALLOC): Move to...
11078 * src/state.c: here.
11079 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
11080 * src/state.h, src/state.c: here.
11081
11082 2002-06-30 Akim Demaille <akim@epita.fr>
11083
11084 * src/reader.c (gensym): Rename as...
11085 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
11086 (getsym): Rename as...
11087 (symbol_get): this.
11088
11089 2002-06-30 Akim Demaille <akim@epita.fr>
11090
11091 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
11092 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
11093 * src/output.c, src/print.c, src/print_graph.c: Propagate.
11094 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
11095
11096 2002-06-30 Akim Demaille <akim@epita.fr>
11097
11098 Make the test suite pass with warnings checked.
11099
11100 * tests/actions.at (Printers and Destructors): Improve.
11101 Avoid unsigned vs. signed issues.
11102 * tests/calc.at: Don't exercise the scanner here, do it...
11103 * tests/input.at (Torturing the Scanner): here.
11104
11105 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11106
11107 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
11108 reorganize first lines parallel to yacc.c.
11109
11110 2002-06-28 Akim Demaille <akim@epita.fr>
11111
11112 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
11113 (b4_token_enum, b4_token_defines): New, factored from...
11114 * data/lalr1.cc, data/yacc.c, glr.c: here.
11115
11116 2002-06-28 Akim Demaille <akim@epita.fr>
11117
11118 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
11119 unused variables.
11120 * src/output.c (merger_output): static.
11121
11122 2002-06-28 Akim Demaille <akim@epita.fr>
11123
11124 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
11125 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
11126 pacify GCC.
11127 * src/output.c (save_row): Initialize all the variables to pacify GCC.
11128
11129 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11130
11131 Accumulated changelog for new GLR parsing features.
11132
11133 * src/conflicts.c (count_total_conflicts): Change name to
11134 conflicts_total_count.
11135 * src/conflicts.h: Ditto.
11136 * src/output.c (token_actions): Use the new name.
11137 (output_conflicts): Change conflp => conflict_list_heads, and
11138 confl => conflict_list for better readability.
11139 * data/glr.c: Use the new names.
11140 * NEWS: Add self to GLR announcement.
11141
11142 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
11143
11144 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
11145 Akim Demaille.
11146
11147 * data/bison.glr: Change name to glr.c
11148 * data/glr.c: Renamed from bison.glr.
11149 * data/Makefile.am: Add glr.c
11150
11151 * src/getargs.c:
11152
11153 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
11154 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
11155
11156 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11157
11158 * data/bison.glr: Be sure to restore the
11159 current #line when returning to the skeleton contents after having
11160 exposed the input file's #line.
11161
11162 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11163
11164 * data/bison.glr: Bring up to date with changes to bison.simple.
11165
11166 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11167
11168 * data/bison.glr: Correct definitions that use b4_prefix.
11169 Various reformatting.
11170 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
11171 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
11172 yytokenp argument; now part of stack.
11173 (yychar): Define to behave as documented.
11174 (yyclearin): Ditto.
11175
11176 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11177
11178 * src/reader.h: Add declaration for free_merger_functions.
11179
11180 * src/reader.c (merge_functions): New variable.
11181 (get_merge_function): New function.
11182 (free_merger_functions): New function.
11183 (readgram): Check for %prec that is not followed by a symbol.
11184 Handle %dprec and %merge declarations.
11185 (packgram): Initialize dprec and merger fields in rules array.
11186
11187 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
11188 conflict_list_cnt, conflict_list_free): New variables.
11189 (table_grow): Also grow conflict_table.
11190 (prepare_rules): Output dprec and merger tables.
11191 (conflict_row): New function.
11192 (action_row): Output conflict lists for GLR parser. Don't use
11193 default reduction in conflicted states for GLR parser so that there
11194 are spaces for the conflict lists.
11195 (save_row): Also save conflict information.
11196 (token_actions): Allocate conflict list.
11197 (merger_output): New function.
11198 (pack_vector): Pack conflict table, too.
11199 (output_conflicts): New function to output yyconflp and yyconfl.
11200 (output_check): Allocate conflict_tos.
11201 (output_actions): Output conflict tables, also.
11202 (output_skeleton): Output b4_mergers definition.
11203 (prepare): Output b4_max_rhs_length definition.
11204 Use 'bison.glr' as default skeleton for GLR parsers.
11205
11206 * src/gram.c (glr_parser): New flag.
11207 (grammar_free): Call free_merger_functions.
11208
11209 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
11210 all pairs of conflicting reductions, rather than just all tokens
11211 causing conflicts. Needed to size conflict tables.
11212 (conflicts_output): Modify call to count_rr_conflicts for new
11213 interface.
11214 (conflicts_print): Ditto.
11215 (count_total_conflicts): New function.
11216
11217 * src/reader.h (merger_list): New type.
11218 (merge_functions): New variable.
11219
11220 * src/lex.h (tok_dprec, tok_merge): New token types.
11221
11222 * src/gram.h (rule_s): Add dprec and merger fields.
11223 (glr_parser): New flag.
11224
11225 * src/conflicts.h (count_total_conflicts): New function.
11226
11227 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
11228
11229 * doc/bison.texinfo (Generalized LR Parsing): New section.
11230 (GLR Parsers): New section.
11231 (Language and Grammar): Mention GLR parsing.
11232 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
11233 Correct typo ("tge" -> "the").
11234
11235 * data/bison.glr: New skeleton for GLR parsing.
11236
11237 * tests/cxx-gram.at: New tests for GLR parsing.
11238
11239 * tests/testsuite.at: Include cxx-gram.at.
11240
11241 * tests/Makefile.am: Add cxx-gram.at.
11242
11243 * src/parse-gram.y:
11244
11245 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
11246
11247 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
11248
11249 2002-06-27 Akim Demaille <akim@epita.fr>
11250
11251 * src/options.h, src/options.c: Remove.
11252 * src/getargs.c (short_options, long_options): New.
11253
11254 2002-06-27 Akim Demaille <akim@epita.fr>
11255
11256 * data/bison.simple, data/bison.c++: Rename as...
11257 * data/yacc.c, data/lalr1.cc: these.
11258 * doc/bison.texinfo (Environment Variables): Remove.
11259
11260 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
11261
11262 * src/getargs.c (report_argmatch): Initialize strtok().
11263
11264 2002-06-20 Akim Demaille <akim@epita.fr>
11265
11266 * data/bison.simple (b4_symbol_actions): New, replaces...
11267 (b4_symbol_destructor, b4_symbol_printer): these.
11268 (yysymprint): Be sure to call YYPRINT only for tokens, and using
11269 user token numbers.
11270
11271 2002-06-20 Akim Demaille <akim@epita.fr>
11272
11273 * data/bison.simple (yydestructor): Rename as...
11274 (yydestruct): this.
11275
11276 2002-06-20 Akim Demaille <akim@epita.fr>
11277
11278 * src/symtab.h, src/symtab.c (symbol_type_set)
11279 (symbol_destructor_set, symbol_precedence_set): The location is
11280 the last argument.
11281 Adjust all callers.
11282
11283 2002-06-20 Akim Demaille <akim@epita.fr>
11284
11285 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
11286 internals.
11287 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
11288 Takes a location.
11289 * src/symtab.h, src/symtab.c (symbol_class_set)
11290 (symbol_user_token_number_set): Likewise.
11291 Adjust all callers.
11292 Promote complain_at.
11293 * tests/input.at (Type Clashes): Adjust.
11294
11295 2002-06-20 Akim Demaille <akim@epita.fr>
11296
11297 * data/bison.simple (YYLEX): Fix the declaration when
11298 %pure-parser.
11299
11300 2002-06-20 Akim Demaille <akim@epita.fr>
11301
11302 * data/bison.simple (yysymprint): Don't print the token number,
11303 just its name.
11304 * tests/actions.at (Destructors): Rename as...
11305 (Printers and Destructors): this.
11306 Also exercise %printer.
11307
11308 2002-06-20 Akim Demaille <akim@epita.fr>
11309
11310 * data/bison.simple (YYDSYMPRINT): New.
11311 Use it to remove many of the #if YYDEBUG/if (yydebug).
11312
11313 2002-06-20 Akim Demaille <akim@epita.fr>
11314
11315 * src/symtab.h, src/symtab.c (symbol_t): printer and
11316 printer_location are new members.
11317 (symbol_printer_set): New.
11318 * src/parse-gram.y (PERCENT_PRINTER): New token.
11319 Handle its associated rule.
11320 * src/scan-gram.l: Adjust.
11321 (handle_destructor_at, handle_destructor_dollar): Rename as...
11322 (handle_symbol_code_at, handle_symbol_code_dollar): these.
11323 * src/output.c (symbol_printers_output): New.
11324 (output_skeleton): Call it.
11325 * data/bison.simple (yysymprint): New. Cannot be named yyprint
11326 since there are already many grammar files with a user `yyprint'.
11327 Replace the calls to YYPRINT to calls to yysymprint.
11328 * tests/calc.at: Adjust.
11329 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
11330 taking advantage of parser very internal details (stack size!).
11331
11332 2002-06-20 Akim Demaille <akim@epita.fr>
11333
11334 * src/scan-gram.l: Complete the scanner with the missing patterns
11335 to pacify Flex.
11336 Use `quote' and `symbol_tag_get' where appropriate.
11337
11338 2002-06-19 Akim Demaille <akim@epita.fr>
11339
11340 * tests/actions.at (Destructors): Augment to test locations.
11341 * data/bison.simple (yydestructor): Pass it the current location
11342 if locations are enabled.
11343 Prototype only when __STDC__ or C++.
11344 Change the argument names to move into the yy name space: there is
11345 user code here.
11346
11347 2002-06-19 Akim Demaille <akim@epita.fr>
11348
11349 * data/bison.simple (b4_pure_if): New.
11350 Use it instead of #ifdef YYPURE.
11351
11352 2002-06-19 Akim Demaille <akim@epita.fr>
11353
11354 * data/bison.simple (b4_location_if): New.
11355 Use it instead of #ifdef YYLSP_NEEDED.
11356
11357 2002-06-19 Akim Demaille <akim@epita.fr>
11358
11359 Prepare @$ in %destructor, but currently don't bind it in the
11360 skeleton, as %location use is not cleaned up yet.
11361
11362 * src/scan-gram.l (handle_dollar, handle_destructor_at)
11363 (handle_action_at): New.
11364 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
11365 a braced_code_t and a location as additional arguments.
11366 (handle_destructor_dollar): Instead of requiring `b4_eval', just
11367 unquote one when outputting `b4_dollar_dollar'.
11368 Adjust callers.
11369 * data/bison.simple (b4_eval): Remove.
11370 (b4_symbol_destructor): Adjust.
11371 * tests/input.at (Invalid @n): Adjust.
11372
11373 2002-06-19 Zack Weinberg <zack@codesourcery.com>
11374
11375 * doc/bison.texinfo: Document ability to have multiple
11376 prologue sections.
11377
11378 2002-06-18 Akim Demaille <akim@epita.fr>
11379
11380 * src/files.c (compute_base_names): When computing the output file
11381 names from the input file name, strip the directory part.
11382
11383 2002-06-18 Akim Demaille <akim@epita.fr>
11384
11385 * data/bison.simple.new: Comment changes.
11386 Reported by Andreas Schwab.
11387
11388 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
11389
11390 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
11391 there are no `label `yyoverflowlab' defined but not used' warnings
11392 when yyoverflow is defined.
11393
11394 2002-06-18 Akim Demaille <akim@epita.fr>
11395
11396 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
11397 new member.
11398 (symbol_destructor_set): Adjust.
11399 * src/output.c (symbol_destructors_output): Output the destructor
11400 locations.
11401 Output the symbol name.
11402 * data/bison.simple (b4_symbol_destructor): Adjust.
11403
11404 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
11405 and Akim Demaille <akim@epita.fr>
11406
11407 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
11408 what's left on the stack when the error recovery hits EOF.
11409 * tests/actions.at (Destructors): Complete to exercise this case.
11410
11411 2002-06-17 Akim Demaille <akim@epita.fr>
11412
11413 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
11414 arguments is really empty, not only equal to `[]'.
11415 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
11416 member.
11417 (symbol_destructor_set): New.
11418 * src/output.c (symbol_destructors_output): New.
11419 * src/reader.h (brace_code_t, current_braced_code): New.
11420 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
11421 (handle_dollar): Rename as...
11422 (handle_action_dollar): this.
11423 (handle_destructor_dollar): New.
11424 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
11425 (grammar_declaration): Use it.
11426 * data/bison.simple (yystos): Is always defined.
11427 (yydestructor): New.
11428 * tests/actions.at (Destructors): New.
11429 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
11430
11431 2002-06-17 Akim Demaille <akim@epita.fr>
11432
11433 * src/symlist.h, src/symlist.c (symbol_list_length): New.
11434 * src/scan-gram.l (handle_dollar, handle_at): Compute the
11435 rule_length only when needed.
11436 * src/output.c (actions_output, token_definitions_output): Output
11437 the full M4 block.
11438 * src/symtab.c: Don't access directly to the symbol tag, use
11439 symbol_tag_get.
11440 * src/parse-gram.y: Use symbol_list_free.
11441
11442 2002-06-17 Akim Demaille <akim@epita.fr>
11443
11444 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
11445 (symbol_list_prepend, get_type_name): Move to...
11446 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
11447 (symbol_list_prepend, symbol_list_n_type_name_get): here.
11448 Adjust all callers.
11449 (symbol_list_free): New.
11450 * src/scan-gram.l (handle_dollar): Takes a location.
11451 * tests/input.at (Invalid $n): Adjust.
11452
11453 2002-06-17 Akim Demaille <akim@epita.fr>
11454
11455 * src/reader.h, src/reader.c (symbol_list_new): Export it.
11456 (symbol_list_prepend): New.
11457 * src/parse-gram.y (%union): `list' is a new member.
11458 (symbols.1): New, replaces...
11459 (terms_to_prec.1, nterms_to_type.1): these.
11460 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
11461 Take a location as additional argument.
11462 Adjust all callers.
11463
11464 2002-06-15 Akim Demaille <akim@epita.fr>
11465
11466 * src/parse-gram.y: Move %token in the declaration section so that
11467 we don't depend upon CVS Bison.
11468
11469 2002-06-15 Akim Demaille <akim@epita.fr>
11470
11471 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
11472 * src/print.c (print_core): Use it.
11473
11474 2002-06-15 Akim Demaille <akim@epita.fr>
11475
11476 * src/conflicts.c (log_resolution): Accept the rule involved in
11477 the sr conflicts instead of the lookahead number that points to
11478 that rule.
11479 (flush_reduce): Accept the current lookahead vector as argument,
11480 instead of the index in LA.
11481 (resolve_sr_conflict): Accept the current number of lookahead
11482 bitset to consider for the STATE, instead of the index in LA.
11483 (set_conflicts): Adjust.
11484 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
11485
11486 2002-06-15 Akim Demaille <akim@epita.fr>
11487
11488 * src/state.h (state_t): Replace the `lookaheadsp' member, a
11489 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
11490 Adjust all dependencies.
11491 * src/lalr.c (initialize_lookaheads): Split into...
11492 (states_lookaheads_count, states_lookaheads_initialize): these.
11493 (lalr): Adjust.
11494
11495 2002-06-15 Akim Demaille <akim@epita.fr>
11496
11497 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
11498 out of...
11499 (grammar_rules_print): here.
11500 * src/reduce.c (reduce_output): Use it.
11501 * tests/reduce.at (Useless Rules, Reduced Automaton)
11502 (Underivable Rules): Adjust.
11503
11504 2002-06-15 Akim Demaille <akim@epita.fr>
11505
11506 Copy BYacc's nice way to report the grammar.
11507
11508 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
11509 New.
11510 Don't print the rules' location, it is confusing and useless.
11511 (rule_print): Use grammar_rhs_print.
11512 * src/print.c (print_grammar): Use grammar_rules_print.
11513
11514 2002-06-15 Akim Demaille <akim@epita.fr>
11515
11516 Complete and rationalize `useless thing' warnings.
11517
11518 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
11519 (symbol_tag_print): New.
11520 Use them everywhere in place of accessing directly the tag member.
11521 * src/gram.h, src/gram.c (rule_print): New.
11522 Use it where a rule used to be printed `by hand'.
11523 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
11524 (reduce_grammar_tables): Report the useless rules.
11525 (reduce_print): Useless things are a warning, not an error.
11526 Report it as such.
11527 * tests/reduce.at (Useless Nonterminals, Useless Rules):
11528 (Reduced Automaton, Underivable Rules): Adjust.
11529 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
11530 * tests/conflicts.at (Unresolved SR Conflicts)
11531 (Solved SR Conflicts): Adjust.
11532
11533 2002-06-15 Akim Demaille <akim@epita.fr>
11534
11535 Let symbols have a location.
11536
11537 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
11538 (getsym): Adjust.
11539 Adjust all callers.
11540 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
11541 Use location_t, not int.
11542 * src/symtab.c (symbol_check_defined): Take advantage of the
11543 location.
11544 * tests/regression.at (Invalid inputs): Adjust.
11545
11546 2002-06-15 Akim Demaille <akim@epita.fr>
11547
11548 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
11549 (input): Don't try to initialize yylloc here, do it in the
11550 scanner.
11551 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
11552 * src/gram.h (rule_t): Change line and action_line into location
11553 and action_location, of location_t type.
11554 Adjust all dependencies.
11555 * src/location.h, src/location.c (empty_location): New.
11556 * src/reader.h, src/reader.c (grammar_start_symbol_set)
11557 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
11558 (grammar_current_rule_symbol_append)
11559 (grammar_current_rule_action_append): Expect a location as argument.
11560 * src/reader.c (grammar_midrule_action): Adjust to attach an
11561 action's location as dummy symbol location.
11562 * src/symtab.h, src/symtab.c (startsymbol_location): New.
11563 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
11564 the line numbers.
11565
11566 2002-06-14 Akim Demaille <akim@epita.fr>
11567
11568 Grammar declarations may be found in the grammar section.
11569
11570 * src/parse-gram.y (rules_or_grammar_declaration): New.
11571 (declarations): Each declaration may end with a semicolon, not
11572 just...
11573 (grammar_declaration): `"%union"'.
11574 (grammar): Branch to rules_or_grammar_declaration.
11575
11576 2002-06-14 Akim Demaille <akim@epita.fr>
11577
11578 * src/main.c (main): Invoke scanner_free.
11579
11580 2002-06-14 Akim Demaille <akim@epita.fr>
11581
11582 * src/output.c (m4_invoke): Extracted from...
11583 (output_skeleton): here.
11584 Free tempfile.
11585
11586 2002-06-14 Akim Demaille <akim@epita.fr>
11587
11588 * src/parse-gram.y (directives, directive, gram)
11589 (grammar_directives, precedence_directives, precedence_directive):
11590 Rename as...
11591 (declarations, declaration, grammar, grammar_declaration)
11592 (precedence_declaration, precedence_declarator): these.
11593 (symbol_declaration): New.
11594
11595 2002-06-14 Akim Demaille <akim@epita.fr>
11596
11597 * src/files.c (action_obstack): Remove, unused.
11598 (output_obstack): Remove it, and all its dependencies, as it is no
11599 longer needed.
11600 * src/reader.c (epilogue_set): Build the epilogue in the
11601 muscle_obstack.
11602 * src/output.h, src/output.c (muscle_obstack): Move to...
11603 * src/muscle_tab.h, src/muscle_tab.h: here.
11604 (muscle_init): Initialize muscle_obstack.
11605 (muscle_free): New.
11606 * src/main.c (main): Call it.
11607
11608 2002-06-14 Akim Demaille <akim@epita.fr>
11609
11610 * src/location.h: New, extracted from...
11611 * src/reader.h: here.
11612 * src/Makefile.am (noinst_HEADERS): Merge into
11613 (bison_SOURCES): this.
11614 Add location.h.
11615 * src/parse-gram.y: Use location_t instead of Bison's.
11616 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
11617 Use location_t instead of ints.
11618
11619 2002-06-14 Akim Demaille <akim@epita.fr>
11620
11621 * data/bison.simple, data/bison.c++: Be sure to restore the
11622 current #line when returning to the skeleton contents after having
11623 exposed the input file's #line.
11624
11625 2002-06-12 Akim Demaille <akim@epita.fr>
11626
11627 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
11628 eager.
11629 * tests/actions.at (Exotic Dollars): New.
11630
11631 2002-06-12 Akim Demaille <akim@epita.fr>
11632
11633 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
11634 ['"/] too eagerly.
11635 * tests/input.at (Torturing the Scanner): New.
11636
11637 2002-06-11 Akim Demaille <akim@epita.fr>
11638
11639 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
11640 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
11641 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
11642 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
11643 * src/reader.c (reader): Use it.
11644
11645 2002-06-11 Akim Demaille <akim@epita.fr>
11646
11647 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
11648 Adjust all callers.
11649 (scanner_last_string_free): New.
11650
11651 2002-06-11 Akim Demaille <akim@epita.fr>
11652
11653 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
11654 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
11655 (last_string, YY_OBS_FREE): New.
11656 Use them when returning an ID.
11657
11658 2002-06-11 Akim Demaille <akim@epita.fr>
11659
11660 Have Bison grammars parsed by a Bison grammar.
11661
11662 * src/reader.c, src/reader.h (prologue_augment): New.
11663 * src/reader.c (copy_definition): Remove.
11664
11665 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
11666 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
11667 (grammar_current_rule_prec_set, grammar_current_rule_check)
11668 (grammar_current_rule_symbol_append)
11669 (grammar_current_rule_action_append): Export.
11670 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
11671 (symbol_list_action_append): Remove.
11672 Hook the routines from reader.
11673 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
11674 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
11675
11676 * src/reader.c (read_declarations): Remove, unused.
11677
11678 * src/parse-gram.y: Handle the epilogue.
11679 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
11680 (grammar_start_symbol_set): this.
11681 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
11682 * src/reader.c (readgram): Remove, unused.
11683 (reader): Adjust to insert eoftoken and axiom where appropriate.
11684
11685 * src/reader.c (copy_dollar): Replace with...
11686 * src/scan-gram.h (handle_dollar): this.
11687 * src/parse-gram.y: Remove `%thong'.
11688
11689 * src/reader.c (copy_at): Replace with...
11690 * src/scan-gram.h (handle_at): this.
11691
11692 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
11693 New.
11694
11695 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
11696 time being.
11697
11698 * src/reader.h, src/reader.c (grammar_rule_end): New.
11699
11700 * src/parse.y (current_type, current_class): New.
11701 Implement `%nterm', `%token' support.
11702 Merge `%term' into `%token'.
11703 (string_as_id): New.
11704 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
11705 type name.
11706
11707 * src/parse-gram.y: Be sure to handle properly the beginning of
11708 rules.
11709
11710 * src/parse-gram.y: Handle %type.
11711 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
11712
11713 * src/parse-gram.y: More directives support.
11714 * src/options.c: No longer handle source directives.
11715
11716 * src/parse-gram.y: Fix %output.
11717
11718 * src/parse-gram.y: Handle %union.
11719 Use the prologue locations.
11720 * src/reader.c (parse_union_decl): Remove.
11721
11722 * src/reader.h, src/reader.c (epilogue_set): New.
11723 * src/parse-gram.y: Use it.
11724
11725 * data/bison.simple, data/bison.c++: b4_stype is now either not
11726 defined, then default to int, or to the contents of %union,
11727 without `union' itself.
11728 Adjust.
11729 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
11730
11731 * src/output.c (actions_output): Don't output braces, as they are
11732 already handled by the scanner.
11733
11734 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
11735 characters to themselves.
11736
11737 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
11738 that the epilogue has a proper #line.
11739
11740 * src/parse-gram.y: Handle precedence/associativity.
11741
11742 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
11743 a terminal.
11744 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
11745 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
11746 at all to define terminals that cannot be emitted.
11747
11748 * src/scan-gram.l: Escape M4 characters.
11749
11750 * src/scan-gram.l: Working properly with escapes in user
11751 strings/characters.
11752
11753 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
11754 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
11755 grammar.
11756 Use more modest sizes, as for the time being the parser does not
11757 release memory, and therefore the process swallows a huge amount
11758 of memory.
11759
11760 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
11761 stricter %token grammar.
11762
11763 * src/symtab.h (associativity): Add `undef_assoc'.
11764 (symbol_precedence_set): Do nothing when passed an undef_assoc.
11765 * src/symtab.c (symbol_check_alias_consistence): Adjust.
11766
11767 * tests/regression.at (Invalid %directive): Remove, as it is now
11768 meaningless.
11769 (Invalid inputs): Adjust to the new error messages.
11770 (Token definitions): The new grammar doesn't allow too many
11771 eccentricities.
11772
11773 * src/lex.h, src/lex.c: Remove.
11774 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
11775 (copy_character, copy_string2, copy_string, copy_identifier)
11776 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
11777 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
11778 (parse_action): Remove.
11779 * po/POTFILES.in: Adjust.
11780
11781 2002-06-11 Akim Demaille <akim@epita.fr>
11782
11783 * src/reader.c (parse_action): Don't store directly into the
11784 rule's action member: return the action as a string.
11785 Don't require `rule_length' as an argument: compute it.
11786 (grammar_current_rule_symbol_append)
11787 (grammar_current_rule_action_append): New, eved out from
11788 (readgram): here.
11789 Remove `action_flag', `rulelength', unused now.
11790
11791 2002-06-11 Akim Demaille <akim@epita.fr>
11792
11793 * src/reader.c (grammar_current_rule_prec_set).
11794 (grammar_current_rule_check): New, eved out from...
11795 (readgram): here.
11796 Remove `xaction', `first_rhs': useless.
11797 * tests/input.at (Type clashes): New.
11798 * tests/existing.at (GNU Cim Grammar): Adjust.
11799
11800 2002-06-11 Akim Demaille <akim@epita.fr>
11801
11802 * src/reader.c (grammar_midrule_action): New, Eved out from
11803 (readgram): here.
11804
11805 2002-06-11 Akim Demaille <akim@epita.fr>
11806
11807 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
11808 New.
11809 (readgram): Use them as replacement of inlined code, crule and
11810 crule1.
11811
11812 2002-06-11 Akim Demaille <akim@epita.fr>
11813
11814 * src/reader.c (grammar_end, grammar_symbol_append): New.
11815 (readgram): Use them.
11816 Make the use of `p' as local as possible.
11817
11818 2002-06-10 Akim Demaille <akim@epita.fr>
11819
11820 GCJ's parser requires the tokens to be defined before the prologue.
11821
11822 * data/bison.simple: Output the token definition before the user's
11823 prologue.
11824 * tests/regression.at (Braces parsing, Duplicate string)
11825 (Mixing %token styles): Check the output from bison.
11826 (Early token definitions): New.
11827
11828 2002-06-10 Akim Demaille <akim@epita.fr>
11829
11830 * src/symtab.c (symbol_user_token_number_set): Don't complain when
11831 assigning twice the same user number to a token, so that we can
11832 use it in...
11833 * src/lex.c (lex): here.
11834 Also use `symbol_class_set' instead of hand written code.
11835 * src/reader.c (parse_assoc_decl): Likewise.
11836
11837 2002-06-10 Akim Demaille <akim@epita.fr>
11838
11839 * src/symtab.c, src/symtab.c (symbol_class_set)
11840 (symbol_user_token_number_set): New.
11841 * src/reader.c (parse_token_decl): Use them.
11842 Use a switch instead of ifs.
11843 Use a single argument.
11844
11845 2002-06-10 Akim Demaille <akim@epita.fr>
11846
11847 Remove `%thong' support as it is undocumented, unused, duplicates
11848 `%token's job, and creates useless e-mail traffic with people who
11849 want to know what it is, why it is undocumented, unused, and
11850 duplicates `%token's job.
11851
11852 * src/reader.c (parse_thong_decl): Remove.
11853 * src/options.c (option_table): Remove "thong".
11854 * src/lex.h (tok_thong): Remove.
11855
11856 2002-06-10 Akim Demaille <akim@epita.fr>
11857
11858 * src/symtab.c, src/symtab.c (symbol_type_set)
11859 (symbol_precedence_set): New.
11860 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
11861 (value_components_used): Remove, unused.
11862
11863 2002-06-09 Akim Demaille <akim@epita.fr>
11864
11865 Move symbols handling code out of the reader.
11866
11867 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
11868 (axiom): Move to...
11869 * src/symtab.h, src/symtab.c: here.
11870
11871 * src/gram.c (start_symbol): Remove: use startsymbol->number.
11872 * src/reader.c (startval): Rename as...
11873 * src/symtab.h, src/symtab.c (startsymbol): this.
11874 * src/reader.c: Adjust.
11875
11876 * src/reader.c (symbol_check_defined, symbol_make_alias)
11877 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11878 (token_translations_init)
11879 Move to...
11880 * src/symtab.c: here.
11881 * src/reader.c (packsymbols): Move to...
11882 * src/symtab.h, src/symtab.c (symbols_pack): here.
11883 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
11884 argument.
11885
11886 2002-06-03 Akim Demaille <akim@epita.fr>
11887
11888 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
11889 then statements.
11890
11891 2002-06-03 Akim Demaille <akim@epita.fr>
11892
11893 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
11894 structs with non literals.
11895 * src/scan-skel.l: never-interactive.
11896 * src/conflicts.c (enum conflict_resolution_e): No trailing
11897 comma.
11898 * src/getargs.c (usage): Split long literal strings.
11899 Reported by Hans Aberg.
11900
11901 2002-05-28 Akim Demaille <akim@epita.fr>
11902
11903 * data/bison.c++: Use C++ ostreams.
11904 (cdebug_): New member.
11905
11906 2002-05-28 Akim Demaille <akim@epita.fr>
11907
11908 * src/output.c (output_skeleton): Be sure to allocate enough room
11909 for `/' _and_ for `\0' in full_skeleton.
11910
11911 2002-05-28 Akim Demaille <akim@epita.fr>
11912
11913 * data/bison.c++: Catch up with bison.simple:
11914 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11915 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11916 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
11917 and popping traces.
11918
11919 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11920
11921 * src/output.c (output_skeleton): Put an explicit path in front of
11922 the skeleton file name, rather than relying on the -I directory,
11923 to partially alleviate effects of having a skeleton file lying around
11924 in the current directory.
11925
11926 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11927
11928 * src/conflicts.c (log_resolution): Correct typo:
11929 obstack_printf should be obstack_fgrow1.
11930
11931 2002-05-26 Akim Demaille <akim@epita.fr>
11932
11933 * src/state.h (state_t): `solved_conflicts' is a new member.
11934 * src/LR0.c (new_state): Set it to 0.
11935 * src/conflicts.h, src/conflicts.c (print_conflicts)
11936 (free_conflicts, solve_conflicts): Rename as...
11937 (conflicts_print, conflicts_free, conflicts_solve): these.
11938 Adjust callers.
11939 * src/conflicts.c (enum conflict_resolution_e)
11940 (solved_conflicts_obstack): New, used by...
11941 (log_resolution): this.
11942 Adjust to attach the conflict resolution to each state.
11943 Complete the description with the precedence/associativity
11944 information.
11945 (resolve_sr_conflict): Adjust.
11946 * src/print.c (print_state): Output its solved_conflicts.
11947 * tests/conflicts.at (Unresolved SR Conflicts)
11948 (Solved SR Conflicts): Exercise --report=all.
11949
11950 2002-05-26 Akim Demaille <akim@epita.fr>
11951
11952 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11953 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11954 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11955 (token_number_t, item_number_as_token_number)
11956 (token_number_as_item_number, muscle_insert_token_number_table):
11957 Rename as...
11958 (symbol_number_t, item_number_as_symbol_number)
11959 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11960 these, since it is more appropriate.
11961
11962 2002-05-26 Akim Demaille <akim@epita.fr>
11963
11964 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11965 `Error:' lines.
11966 * data/bison.simple (yystos) [YYDEBUG]: New.
11967 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11968 error recovery.
11969 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11970
11971 2002-05-25 Akim Demaille <akim@epita.fr>
11972
11973 * doc/bison.texinfo (Debugging): Split into...
11974 (Tracing): this new section, its former contents, and...
11975 (Understanding): this new section.
11976 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11977 by...
11978 (report_flag): this.
11979 Adjust all dependencies.
11980 (report_args, report_types, report_argmatch): New.
11981 (usage, getargs): Report/support -r, --report.
11982 * src/options.h
11983 (struct option_table_struct): Rename as..,
11984 (struct option_table_s): this.
11985 Rename the `set_flag' member to `flag' to match with getopt_long's
11986 struct.
11987 * src/options.c (option_table): Split verbose into an entry for
11988 %verbose, and another for --verbose.
11989 Support --report/-r, so remove -r from the obsolete --raw.
11990 * src/print.c: Attach full item sets and lookaheads reports to
11991 report_flag instead of trace_flag.
11992 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11993
11994 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11995 and Paul Eggert <eggert@twinsun.com>
11996
11997 * data/bison.simple (yyparse): Correct error handling to conform to
11998 POSIX and yacc. Specifically, after syntax error is discovered,
11999 do not reduce further before shifting the error token.
12000 Clean up the code a bit by removing the labels yyerrdefault,
12001 yyerrhandle, yyerrpop.
12002 * NEWS: Document the above.
12003
12004 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12005
12006 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
12007 type; it isn't always big enough, since it doesn't necessarily
12008 include non-terminals.
12009 (yytranslate): Expand definition of yy_token_number_type, so that
12010 the latter can be removed.
12011 (yy_token_number_type): Remove, only one use.
12012 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
12013 don't use TokenNumberType as element type.
12014
12015 * tests/regression.at: Modify expected output to agree with change
12016 to yyr1 and yytranslate.
12017
12018 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
12019
12020 * src/reader.c (parse_action): Use copy_character instead of
12021 obstack_1grow.
12022
12023 2002-05-13 Akim Demaille <akim@epita.fr>
12024
12025 * tests/regression.at (Token definitions): Prototype yylex and
12026 yyerror.
12027
12028 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12029
12030 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
12031 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
12032 32-bit arithmetic.
12033 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
12034
12035 2002-05-07 Akim Demaille <akim@epita.fr>
12036
12037 * tests/synclines.at: Be sure to prototype yylex and yyerror to
12038 avoid GCC warnings.
12039
12040 2002-05-07 Akim Demaille <akim@epita.fr>
12041
12042 Kill GCC warnings.
12043
12044 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
12045 over the RHS of each rule.
12046 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
12047 * src/state.h (state_t): Member `nitems' is unsigned short.
12048 * src/LR0.c (get_state): Adjust.
12049 * src/reader.c (packgram): Likewise.
12050 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
12051 `Type'.
12052 (muscle_insert_int_table): Remove, unused.
12053 (prepare_rules): Remove `max'.
12054
12055 2002-05-06 Akim Demaille <akim@epita.fr>
12056
12057 * src/closure.c (print_firsts): Display of the symbol tags.
12058 (bitmatrix_print): Move to...
12059 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
12060 here.
12061 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
12062
12063 2002-05-06 Akim Demaille <akim@epita.fr>
12064
12065 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
12066 hash_do_for_each.
12067
12068 2002-05-06 Akim Demaille <akim@epita.fr>
12069
12070 * src/LR0.c (new_state, get_state): Instead of using the global
12071 `kernel_size' and `kernel_base', have two new arguments:
12072 `core_size' and `core'.
12073 Adjust callers.
12074
12075 2002-05-06 Akim Demaille <akim@epita.fr>
12076
12077 * src/reader.c (packgram): No longer end `ritem' with a 0
12078 sentinel: it is not used.
12079
12080 2002-05-05 Akim Demaille <akim@epita.fr>
12081
12082 New experimental feature: display the lookaheads in the report and
12083 graph.
12084
12085 * src/print (print_core): When --trace-flag, display the rules
12086 lookaheads.
12087 * src/print_graph.c (print_core): Likewise.
12088 Swap the arguments.
12089 Adjust caller.
12090
12091 2002-05-05 Akim Demaille <akim@epita.fr>
12092
12093 * tests/torture.at (Many lookaheads): New test.
12094
12095 2002-05-05 Akim Demaille <akim@epita.fr>
12096
12097 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
12098 (GENERATE_MUSCLE_INSERT_TABLE): this.
12099 (output_int_table, output_unsigned_int_table, output_short_table)
12100 (output_token_number_table, output_item_number_table): Replace with...
12101 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
12102 (muscle_insert_short_table, muscle_insert_token_number_table)
12103 (muscle_insert_item_number_table): these.
12104 Adjust all callers.
12105 (prepare_tokens): Don't free `translations', since...
12106 * src/reader.h, src/reader.c (grammar_free): do it.
12107 Move to...
12108 * src/gram.h, src/gram.c (grammar_free): here.
12109 * data/bison.simple, data/bison.c++: b4_token_number_max is now
12110 b4_translate_max.
12111
12112 2002-05-05 Akim Demaille <akim@epita.fr>
12113
12114 * src/output.c (output_unsigned_int_table): New.
12115 (prepare_rules): `i' is unsigned.
12116 `prhs', `rline', `r2' are unsigned int.
12117 Rename muscle `rhs_number_max' as `rhs_max'.
12118 Output muscles `prhs_max', `rline_max', and `r2_max'.
12119 Free rline and r1.
12120 * data/bison.simple, data/bison.c++: Adjust to use these muscles
12121 to compute types instead of constant types.
12122 * tests/regression.at (Web2c Actions): Adjust.
12123
12124 2002-05-04 Akim Demaille <akim@epita.fr>
12125
12126 * src/symtab.h (SALIAS, SUNDEF): Rename as...
12127 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
12128 Adjust dependencies.
12129 * src/output.c (token_definitions_output): Be sure not to output a
12130 `#define 'a'' when fed with `%token 'a' "a"'.
12131 * tests/regression.at (Token definitions): New.
12132
12133 2002-05-03 Paul Eggert <eggert@twinsun.com>
12134
12135 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
12136 for K&R C.
12137
12138 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
12139
12140 * Makefile.am (SUBDIRS): Remove intl.
12141 (EXTRA_DIST): Add config/config.rpath.
12142
12143 2002-05-03 Akim Demaille <akim@epita.fr>
12144
12145 * data/bison.simple (m4_if): Don't output empty enums.
12146 And actually, output valid enum definitions :(.
12147
12148 2002-05-03 Akim Demaille <akim@epita.fr>
12149
12150 * configure.bat: Remove, completely obsolete.
12151 * Makefile.am (EXTRA_DIST): Adjust.
12152 Don't distribute config.rpath...
12153 * config/Makefile.am (EXTRA_DIST): Do it.
12154
12155 2002-05-03 Akim Demaille <akim@epita.fr>
12156
12157 * configure.in (GETTEXT_VERSION): New.
12158 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
12159
12160 2002-05-03 Akim Demaille <akim@epita.fr>
12161
12162 * data/bison.simple (b4_token_enum): New.
12163 (b4_token_defines): Use it to output tokens both as #define and
12164 enums.
12165 Suggested by Paul Eggert.
12166 * src/output.c (token_definitions_output): Don't output spurious
12167 white spaces.
12168
12169 2002-05-03 Akim Demaille <akim@epita.fr>
12170
12171 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12172
12173 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
12174
12175 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
12176 Update the stack class, give a try to deque as the default container.
12177
12178 2002-05-02 Akim Demaille <akim@epita.fr>
12179
12180 * data/bison.simple (yyparse): Do not implement @$ = @1.
12181 (YYLLOC_DEFAULT): Adjust to do it.
12182 * doc/bison.texinfo (Location Default Action): Fix.
12183
12184 2002-05-02 Akim Demaille <akim@epita.fr>
12185
12186 * src/reader.c (parse_braces): Merge into...
12187 (parse_action): this.
12188
12189 2002-05-02 Akim Demaille <akim@epita.fr>
12190
12191 * configure.in (ALL_LINGUAS): Remove.
12192 * po/LINGUAS, hr.po: New.
12193
12194 2002-05-02 Akim Demaille <akim@epita.fr>
12195
12196 Remove the so called hairy (semantic) parsers.
12197
12198 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
12199 * src/gram.h, src/gram.c (semantic_parser): Remove.
12200 (rule_t): Remove the guard and guard_line members.
12201 * src/lex.h (token_t): remove tok_guard.
12202 * src/options.c (option_table): Remove %guard and %semantic_parser
12203 support.
12204 * src/output.c, src/output.h (guards_output): Remove.
12205 (prepare): Adjust.
12206 (token_definitions_output): Don't output the `T'
12207 tokens (???).
12208 (output_skeleton): Don't output the guards.
12209 * src/files.c, src/files.c (attrsfile): Remove.
12210 * src/reader.c (symbol_list): Remove the guard and guard_line
12211 members.
12212 Adjust dependencies.
12213 (parse_guard): Remove.
12214 * data/bison.hairy: Remove.
12215 * doc/bison.texinfo (Environment Variables): Remove occurrences of
12216 BISON_HAIRY.
12217
12218 2002-05-02 Akim Demaille <akim@epita.fr>
12219
12220 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
12221 (parse_guard): Rename the formal argument `stack_offset' as
12222 `rule_length', which is more readable.
12223 Adjust callers.
12224 (copy_at, copy_dollar): Instead of outputting the hard coded
12225 values of $$, $n and so forth, output invocation to b4_lhs_value,
12226 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
12227 Note: this patch partially drops `semantic-parser' support: it
12228 always does `rule_length - n', where semantic parsers ought to
12229 always use `-n'.
12230 * data/bison.simple, data/bison.c++ (b4_lhs_value)
12231 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
12232
12233 2002-05-02 Akim Demaille <akim@epita.fr>
12234
12235 * configure.in (AC_INIT): Bump to 1.49b.
12236 (AM_INIT_AUTOMAKE): Short invocation.
12237
12238 2002-05-02 Akim Demaille <akim@epita.fr>
12239
12240 Version 1.49a.
12241
12242 2002-05-01 Akim Demaille <akim@epita.fr>
12243
12244 * src/skeleton.h: Remove.
12245
12246 2002-05-01 Akim Demaille <akim@epita.fr>
12247
12248 * src/skeleton.h: Fix the #endif.
12249 Reported by Magnus Fromreide.
12250
12251 2002-04-26 Paul Eggert <eggert@twinsun.com>
12252
12253 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
12254 Define if we define YYSTYPE and YYLTYPE, respectively.
12255 (YYCOPY): Fix [] quoting problem in the non-GCC case.
12256
12257 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
12258
12259 * src/scan-skel.l: Postprocess quadrigraphs.
12260
12261 * src/reader.c (copy_character): New function, used to output
12262 single characters while replacing `[' and `]' with quadrigraphs, to
12263 avoid troubles with M4 quotes.
12264 (copy_comment): Output characters with copy_character.
12265 (read_additionnal_code): Likewise.
12266 (copy_string2): Likewise.
12267 (copy_definition): Likewise.
12268
12269 * tests/calc.at: Exercise M4 quoting.
12270
12271 2002-04-25 Akim Demaille <akim@epita.fr>
12272
12273 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
12274 between `!' and the command.
12275 Reported by Paul Eggert.
12276
12277 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
12278
12279 * tests/calc.at: Exercise prologue splitting.
12280
12281 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
12282 `b4_post_prologue' instead of `b4_prologue'.
12283
12284 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
12285 muscles.
12286 (output): Free pre_prologue_obstack and post_prologue_obstack.
12287 * src/files.h, src/files.c (attrs_obstack): Remove.
12288 (pre_prologue_obstack, post_prologue_obstack): New.
12289 * src/reader.c (copy_definition): Add a parameter to specify the
12290 obstack to fill, instead of using attrs_obstack unconditionally.
12291 (read_declarations): Pass pre_prologue_obstack to copy_definition if
12292 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
12293
12294 2002-04-23 Paul Eggert <eggert@twinsun.com>
12295
12296 * data/bison.simple: Remove unnecessary commentary and white
12297 space differences from 1_29-branch.
12298 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
12299
12300 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
12301 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
12302 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
12303 constructors or destructors.
12304
12305 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
12306
12307 2002-04-23 Akim Demaille <akim@epita.fr>
12308
12309 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
12310 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
12311 location with columns.
12312 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
12313 All reported by Paul Eggert.
12314
12315 2002-04-22 Akim Demaille <akim@epita.fr>
12316
12317 * src/reduce.c (dump_grammar): Move to...
12318 * src/gram.h, src/gram.c (grammar_dump): here.
12319 Be sure to separate long item numbers.
12320 Don't read the members of a rule's prec if its nil.
12321
12322 2002-04-22 Akim Demaille <akim@epita.fr>
12323
12324 * src/output.c (table_size, table_grow): New.
12325 (MAXTABLE): Remove, replace uses with table_size.
12326 (pack_vector): Instead of dying when the table is too big, grow it.
12327
12328 2002-04-22 Akim Demaille <akim@epita.fr>
12329
12330 * data/bison.simple (yyr1): Its type is that of a token number.
12331 * data/bison.c++ (r1_): Likewise.
12332 * tests/regression.at (Web2c Actions): Adjust.
12333
12334 2002-04-22 Akim Demaille <akim@epita.fr>
12335
12336 * src/reader.c (token_translations_init): 256 is now the default
12337 value for the error token, i.e., it will be assigned another
12338 number if the user assigned 256 to one of her tokens.
12339 (reader): Don't force 256 to error.
12340 * doc/bison.texinfo (Symbols): Adjust.
12341 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
12342 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
12343 etc. instead of 10, 20, 30 (which was used to `jump' over error
12344 (256) and undefined (2)).
12345
12346 2002-04-22 Akim Demaille <akim@epita.fr>
12347
12348 Propagate more token_number_t.
12349
12350 * src/gram.h (token_number_as_item_number)
12351 (item_number_as_token_number): New.
12352 * src/output.c (GENERATE_OUTPUT_TABLE): New.
12353 Use it to create output_item_number_table and
12354 output_token_number_table.
12355 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
12356 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
12357 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
12358 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
12359
12360 2002-04-22 Akim Demaille <akim@epita.fr>
12361
12362 * src/output.h, src/output.c (get_lines_number): Remove.
12363
12364 2002-04-19 Akim Demaille <akim@epita.fr>
12365
12366 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
12367 as Lex/Flex'.
12368 (Debugging): More details about enabling the debugging features.
12369 (Table of Symbols): Describe $$, $n, @$, and @n.
12370 Suggested by Tim Josling.
12371
12372 2002-04-19 Akim Demaille <akim@epita.fr>
12373
12374 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
12375
12376 2002-04-10 Akim Demaille <akim@epita.fr>
12377
12378 * src/system.h: Rely on HAVE_LIMITS_H.
12379 Suggested by Paul Eggert.
12380
12381 2002-04-09 Akim Demaille <akim@epita.fr>
12382
12383 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
12384 full stderr, and strip it according to the bison options, instead
12385 of composing the error message from different bits.
12386 This makes it easier to check for several error messages.
12387 Adjust all the invocations.
12388 Add an invocation exercising the error token.
12389 Add an invocation demonstrating a stupid error message.
12390 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
12391 Adjust the tests.
12392 Error message are for stderr, not stdout.
12393
12394 2002-04-09 Akim Demaille <akim@epita.fr>
12395
12396 * src/gram.h, src/gram.c (error_token_number): Remove, use
12397 errtoken->number.
12398 * src/reader.c (reader): Don't specify the user token number (2)
12399 for $undefined, as it uselessly prevents using it.
12400 * src/gram.h (token_number_t): Move to...
12401 * src/symtab.h: here.
12402 (state_t.number): Is a token_number_t.
12403 * src/print.c, src/reader.c: Use undeftoken->number instead of
12404 hard coded 2.
12405 (Even though this 2 is not the same as above: the number of the
12406 undeftoken remains being 2, it is its user token number which
12407 might not be 2).
12408 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
12409 `user_token_number_max'.
12410 Output `undef_token_number'.
12411 * data/bison.simple, data/bison.c++: Use them.
12412 Be sure to map invalid yylex return values to
12413 `undef_token_number'. This saves us from gratuitous SEGV.
12414
12415 * tests/conflicts.at (Solved SR Conflicts)
12416 (Unresolved SR Conflicts): Adjust.
12417 * tests/regression.at (Web2c Actions): Adjust.
12418
12419 2002-04-08 Akim Demaille <akim@epita.fr>
12420
12421 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
12422 Adding #line.
12423 Remove the duplicate `typedefs'.
12424 (RhsNumberType): Fix the declaration and various other typos.
12425 Use __ofile__.
12426 * data/bison.simple: Use __ofile__.
12427 * src/scan-skel.l: Handle __ofile__.
12428
12429 2002-04-08 Akim Demaille <akim@epita.fr>
12430
12431 * src/gram.h (item_number_t): New, the type of item numbers in
12432 RITEM. Note that it must be able to code symbol numbers as
12433 positive number, and the negation of rule numbers as negative
12434 numbers.
12435 Adjust all dependencies (pretty many).
12436 * src/reduce.c (rule): Remove this `short *' pointer: use
12437 item_number_t.
12438 * src/system.h (MINSHORT, MAXSHORT): Remove.
12439 Include `limits.h'.
12440 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
12441 (shortcpy): Remove.
12442 (MAXTABLE): Move to...
12443 * src/output.c (MAXTABLE): here.
12444 (prepare_rules): Use output_int_table to output rhs.
12445 * data/bison.simple, data/bison.c++: Adjust.
12446 * tests/torture.at (Big triangle): Move the limit from 254 to
12447 500.
12448 * tests/regression.at (Web2c Actions): Ajust.
12449
12450 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
12451 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
12452 passes, but produces negative #line number, once fixed, GCC is
12453 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
12454 C), it passes.
12455 * src/state.h (state_h): Code input lines on ints, not shorts.
12456
12457 2002-04-08 Akim Demaille <akim@epita.fr>
12458
12459 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
12460 and then the grammar.
12461
12462 2002-04-08 Akim Demaille <akim@epita.fr>
12463
12464 * src/system.h: No longer using strndup.
12465
12466 2002-04-07 Akim Demaille <akim@epita.fr>
12467
12468 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
12469 * src/output.c (output_table_data): Return the longest number.
12470 (prepare_tokens): Output `token_number_max').
12471 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
12472 New.
12473 Use them to define yy_token_number_type/TokenNumberType.
12474 Use this type for yytranslate.
12475 * tests/torture.at (Big triangle): Push the limit from 124 to
12476 253.
12477 * tests/regression.at (Web2c Actions): Adjust.
12478
12479 2002-04-07 Akim Demaille <akim@epita.fr>
12480
12481 * tests/torture.at (Big triangle): New.
12482 (GNU AWK Grammar, GNU Cim Grammar): Move to...
12483 * tests/existing.at: here.
12484
12485 2002-04-07 Akim Demaille <akim@epita.fr>
12486
12487 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
12488 nritems.
12489 Adjust dependencies.
12490
12491 2002-04-07 Akim Demaille <akim@epita.fr>
12492
12493 * src/reader.c: Normalize increments to prefix form.
12494
12495 2002-04-07 Akim Demaille <akim@epita.fr>
12496
12497 * src/reader.c, symtab.c: Remove debugging code.
12498
12499 2002-04-07 Akim Demaille <akim@epita.fr>
12500
12501 Rename all the `bucket's as `symbol_t'.
12502
12503 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
12504 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
12505 * src/symtab.c, src/symtab.h (bucket): Rename as...
12506 (symbol_t): this.
12507 (symbol_list_new, bucket_check_defined, bucket_make_alias)
12508 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
12509 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
12510 (buckets_new, buckets_free, buckets_do): Rename as...
12511 (symbol_list_new, symbol_check_defined, symbol_make_alias)
12512 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
12513 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
12514 (symbols_new, symbols_free, symbols_do): these.
12515
12516 2002-04-07 Akim Demaille <akim@epita.fr>
12517
12518 Use lib/hash for the symbol table.
12519
12520 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
12521 EOF.
12522 * src/lex.c (lex): Set the `number' member of new terminals.
12523 * src/reader.c (bucket_check_defined, bucket_make_alias)
12524 (bucket_check_alias_consistence, bucket_translation): New.
12525 (reader, grammar_free, readgram, token_translations_init)
12526 (packsymbols): Adjust.
12527 (reader): Number the predefined tokens.
12528 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
12529 for predefined tokens.
12530 * src/symtab.h (bucket): Remove all the hash table related
12531 members.
12532 * src/symtab.c (symtab): Replace by...
12533 (bucket_table): this.
12534 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
12535 (buckets_new, buckets_do): New.
12536
12537 2002-04-07 Akim Demaille <akim@epita.fr>
12538
12539 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
12540 (start_symbol, max_user_token_number, semantic_parser)
12541 (error_token_number): Initialize.
12542 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
12543 Initialize.
12544 (reader): Don't.
12545 (errtoken, eoftoken, undeftoken, axiom): Extern.
12546
12547 2002-04-07 Akim Demaille <akim@epita.fr>
12548
12549 * src/gram.h (rule_s): prec and precsym are now pointers
12550 to the bucket giving the priority/associativity.
12551 Member `associativity' removed: useless.
12552 * src/reduce.c, src/conflicts.c: Adjust.
12553
12554 2002-04-07 Akim Demaille <akim@epita.fr>
12555
12556 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
12557 Properly escape the symbols' TAG when outputting them.
12558
12559 2002-04-07 Akim Demaille <akim@epita.fr>
12560
12561 * src/lalr.h (LA): Is a bitsetv, not bitset*.
12562
12563 2002-04-07 Akim Demaille <akim@epita.fr>
12564
12565 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
12566 (LArule): this, which is an array to rule_t*.
12567 * src/print.c, src/conflicts.c: Adjust.
12568
12569 2002-04-07 Akim Demaille <akim@epita.fr>
12570
12571 * src/gram.h (rule_t): Rename `number' as `user_number'.
12572 `number' is a new member.
12573 Adjust dependencies.
12574 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
12575
12576 2002-04-07 Akim Demaille <akim@epita.fr>
12577
12578 As a result of the previous patch, it is no longer needed
12579 to reorder ritem itself.
12580
12581 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
12582
12583 2002-04-07 Akim Demaille <akim@epita.fr>
12584
12585 Be sure never to walk through RITEMS, but use only data related to
12586 the rules themselves. RITEMS should be banished.
12587
12588 * src/output.c (output_token_translations): Rename as...
12589 (prepare_tokens): this.
12590 In addition to `translate', prepare the muscles `tname' and
12591 `toknum', which were handled by...
12592 (output_rule_data): this.
12593 Remove, and move the remainder of its outputs into...
12594 (prepare_rules): this new routines, which also merges content from
12595 (output_gram): this.
12596 (prepare_rules): Be sure never to walk through RITEMS.
12597 (output_stos): Rename as...
12598 (prepare_stos): this.
12599 (output): Always invoke prepare_states, after all, just don't use it
12600 in the output if you don't need it.
12601
12602 2002-04-07 Akim Demaille <akim@epita.fr>
12603
12604 * src/LR0.c (new_state): Display `nstates' as the name of the
12605 newly created state.
12606 Adjust to initialize first_state and last_state if needed.
12607 Be sure to distinguish the initial from the final state.
12608 (new_states): Create the itemset of the initial state, and use
12609 new_state.
12610 * src/closure.c (closure): Now that the initial state has its
12611 items properly set, there is no need for a special case when
12612 creating `ruleset'.
12613
12614 As a result, now the rule 0, reducing to $axiom, is visible in the
12615 outputs. Adjust the test suite.
12616
12617 * tests/conflicts.at (Solved SR Conflicts)
12618 (Unresolved SR Conflicts): Adjust.
12619 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
12620 * tests/conflicts.at (S/R in initial): New.
12621
12622 2002-04-07 Akim Demaille <akim@epita.fr>
12623
12624 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
12625 the RHS of the rules.
12626 * src/output.c (output_gram): Likewise.
12627
12628 2002-04-07 Akim Demaille <akim@epita.fr>
12629
12630 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
12631 bucket.
12632 Adjust all dependencies.
12633 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
12634 `number' of the buckets too.
12635 * src/gram.h: Include `symtab.h'.
12636 (associativity): Move to...
12637 * src/symtab.h: here.
12638 No longer include `gram.h'.
12639
12640 2002-04-07 Akim Demaille <akim@epita.fr>
12641
12642 * src/gram.h, src/gram.c (rules_rhs_length): New.
12643 (ritem_longest_rhs): Use it.
12644 * src/gram.h (rule_t): `number' is a new member.
12645 * src/reader.c (packgram): Set it.
12646 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
12647 the end of `rules', and count them out of `nrules'.
12648 (reduce_output, dump_grammar): Adjust.
12649 * src/print.c (print_grammar): It is no longer needed to check for
12650 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
12651 * tests/reduce.at (Reduced Automaton): New test.
12652
12653 2002-04-07 Akim Demaille <akim@epita.fr>
12654
12655 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
12656 lacking `+ 1' to nrules, Bison reported as useless a token if it
12657 was used solely to set the precedence of the last rule...
12658
12659 2002-04-07 Akim Demaille <akim@epita.fr>
12660
12661 * data/bison.c++, data/bison.simple: Don't output the current file
12662 name in #line, to avoid useless diffs between two identical
12663 outputs under different names.
12664
12665 2002-04-07 Akim Demaille <akim@epita.fr>
12666
12667 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
12668 Normalize loops to using `< nrules + 1', not `<= nrules'.
12669
12670 2002-04-07 Akim Demaille <akim@epita.fr>
12671
12672 * TODO: Update.
12673
12674 2002-04-07 Akim Demaille <akim@epita.fr>
12675
12676 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
12677 bucket.value as bucket.number.
12678
12679 2002-04-07 Akim Demaille <akim@epita.fr>
12680
12681 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
12682 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
12683 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
12684 RHS, instead of being an index in RITEMS.
12685
12686 2002-04-04 Paul Eggert <eggert@twinsun.com>
12687
12688 * doc/bison.texinfo: Update copyright date.
12689 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
12690 (Symbols): Warn about running Bison in one character set,
12691 but compiling and/or running in an incompatible one.
12692 Warn about character code 256, too.
12693
12694 2002-04-03 Paul Eggert <eggert@twinsun.com>
12695
12696 * src/bison.data (YYSTACK_ALLOC): Depend on whether
12697 YYERROR_VERBOSE is nonzero, not whether it is defined.
12698
12699 Merge changes from bison-1_29-branch.
12700
12701 2002-03-20 Paul Eggert <eggert@twinsun.com>
12702
12703 Merge fixes from Debian bison_1.34-1.diff.
12704
12705 * configure.in (AC_PREREQ): 2.53.
12706
12707 2002-03-20 Akim Demaille <akim@epita.fr>
12708
12709 * src/conflicts.c (log_resolution): Argument `resolution' is const.
12710
12711 2002-03-19 Paul Eggert <eggert@twinsun.com>
12712
12713 * src/bison.simple (YYCOPY): New macro.
12714 (YYSTACK_RELOCATE): Use it.
12715 Remove Type arg; no longer needed. All callers changed.
12716 (yymemcpy): Remove; no longer needed.
12717
12718 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
12719 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12720
12721 2002-03-19 Akim Demaille <akim@epita.fr>
12722
12723 Test and fix the #line outputs.
12724
12725 * tests/atlocal.at (GCC): New.
12726 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
12727 (Prologue synch line, %union synch line, Postprologue synch line)
12728 (Action synch line, Epilogue synch line): New tests.
12729 * src/reader.c (parse_union_decl): Define the muscle stype_line.
12730 * data/bison.simple, data/bison.c++: Use it.
12731
12732 2002-03-19 Akim Demaille <akim@epita.fr>
12733
12734 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
12735 (Solved SR Conflicts, %expect not enough, %expect right)
12736 (%expect too much): Move to...
12737 * tests/conflicts.at: this new file.
12738
12739 2002-03-19 Akim Demaille <akim@epita.fr>
12740
12741 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12742 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
12743 that we can move to enums for instance.
12744 * src/output.c (token_definitions_output): Output a list of
12745 `token-name, token-number' instead of the #define.
12746 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
12747
12748 2002-03-14 Akim Demaille <akim@epita.fr>
12749
12750 Use Gettext 0.11.1.
12751
12752 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
12753
12754 * data/bison.c++: Make the user able to add members to the generated
12755 parser by subclassing.
12756
12757 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
12758
12759 * src/reader.c (read_additionnal_code): `c' should be an integer, not
12760 a character.
12761 Reported by Nicolas Tisserand and Nicolas Burrus.
12762
12763 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
12764
12765 * src/reader.c: Warn about lacking semi-colons, do not complain.
12766
12767 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
12768
12769 * data/bison.c++: Remove a debug line.
12770
12771 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
12772
12773 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
12774 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
12775 provide a default implementation.
12776
12777 2002-03-04 Akim Demaille <akim@epita.fr>
12778
12779 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
12780 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
12781 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
12782 * tests/semantic.at (Parsing Guards): Similarly.
12783 * src/reader.at (readgram): Complain if the last rule is not ended
12784 with a semi-colon.
12785
12786 2002-03-04 Akim Demaille <akim@epita.fr>
12787
12788 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
12789 * src/closure.c: here.
12790 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
12791 RTC.
12792 * src/warshall.h, src/warshall.c: Remove.
12793 * tests/sets.at (Broken Closure): Adjust.
12794
12795 2002-03-04 Akim Demaille <akim@epita.fr>
12796
12797 * src/output.c (output_skeleton): tempdir is const.
12798 bytes_read is unused.
12799
12800 2002-03-04 Akim Demaille <akim@epita.fr>
12801
12802 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12803 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
12804 Update.
12805 From Michael Hayes.
12806
12807 2002-03-04 Akim Demaille <akim@epita.fr>
12808
12809 * src/closure.c (closure): `r' is unused.
12810
12811 2002-03-04 Akim Demaille <akim@epita.fr>
12812
12813 * tests/sets.at (Broken Closure): Add the ending `;'.
12814 * src/reader.at (readgram): Complain if a rule is not ended with a
12815 semi-colon.
12816
12817 2002-03-04 Akim Demaille <akim@epita.fr>
12818
12819 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
12820 (count_sr_conflicts): Use bitset_count.
12821 * src/reduce.c (inaccessable_symbols): Ditto.
12822 (bits_size): Remove.
12823 * src/warshall.h, src/warshall.c: Convert to bitsetv.
12824
12825 2002-03-04 Akim Demaille <akim@epita.fr>
12826
12827 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
12828 * src/reduce.c: Remove the `bitset_zero's following the
12829 `bitset_create's, as now it is performed by the latter.
12830
12831 2002-03-04 Akim Demaille <akim@epita.fr>
12832
12833 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
12834 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
12835 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
12836 latest sources from Michael.
12837
12838 2002-03-04 Akim Demaille <akim@epita.fr>
12839
12840 * src/output.c (output): Don't free the grammar.
12841 * src/reader.c (grammar_free): New.
12842 * src/main.c (main): Call it and don't free symtab here.
12843
12844 2002-03-04 Akim Demaille <akim@epita.fr>
12845
12846 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
12847 before returning.
12848 Reported by Benoit Perrot.
12849
12850 2002-03-04 Akim Demaille <akim@epita.fr>
12851
12852 Use bitset operations when possible, not loops over bits.
12853
12854 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
12855 bitset_or.
12856 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
12857 * src/reduce.c (useless_nonterminals): Formatting changes.
12858 * src/warshall.c (TC): Use bitset_or.
12859
12860 2002-03-04 Akim Demaille <akim@epita.fr>
12861
12862 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
12863 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
12864 Ditto.
12865
12866 2002-03-04 Akim Demaille <akim@epita.fr>
12867
12868 * src/lalr.c (F): Now a bitset*.
12869 Adjust all dependencies.
12870
12871 2002-03-04 Akim Demaille <akim@epita.fr>
12872
12873 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
12874 Adjust all dependencies.
12875
12876 2002-03-04 Akim Demaille <akim@epita.fr>
12877
12878 * src/L0.c, src/LR0.h (nstates): Be size_t.
12879 Adjust comparisons (signed vs unsigned).
12880 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
12881 bitset*.
12882 Adjust all dependencies.
12883
12884 2002-03-04 Akim Demaille <akim@epita.fr>
12885
12886 * src/closure.c (firsts): Now, also a bitset.
12887 Adjust all dependencies.
12888 (varsetsize): Remove, now unused.
12889 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
12890
12891 2002-03-04 Akim Demaille <akim@epita.fr>
12892
12893 * src/print.c: Convert to use bitset.h, not hand coded iterations
12894 over ints.
12895
12896 2002-03-04 Akim Demaille <akim@epita.fr>
12897
12898 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
12899
12900 2002-03-04 Akim Demaille <akim@epita.fr>
12901
12902 * src/closure.c (ruleset): Be a bitset.
12903 (rulesetsize): Remove.
12904
12905 2002-03-04 Akim Demaille <akim@epita.fr>
12906
12907 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12908 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
12909 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12910 * src/closure.c (fderives): Be an array of bitsets.
12911
12912 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
12913
12914 * data/bison.c++: Merge the two generated headers. Insert a copyright
12915 notice in each output file.
12916
12917 2002-02-28 Akim Demaille <akim@epita.fr>
12918
12919 * data/bison.c++: Copy the prologue of bison.simple to fetch
12920 useful M4 definitions, such as b4_header_guard.
12921
12922 2002-02-25 Akim Demaille <akim@epita.fr>
12923
12924 * src/getargs.c (version): Give the name of the authors, and use a
12925 translator friendly scheme for the bgr
12926 copyright notice.
12927
12928 2002-02-25 Akim Demaille <akim@epita.fr>
12929
12930 * src/output.c (header_output): Remove, now handled completely via
12931 M4.
12932
12933 2002-02-25 Akim Demaille <akim@epita.fr>
12934
12935 * m4/m4.m4: New, from CVS Autoconf.
12936 * configure.in: Invoke it.
12937 * src/output.c (output_skeleton): Use its result instead of the
12938 hard coded name.
12939
12940 2002-02-25 Akim Demaille <akim@epita.fr>
12941
12942 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12943 Fileutils 4.1.5.
12944 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12945 * src/output.c (output_skeleton): Use mkstemp to create a real
12946 temporary file.
12947 Move the filling of `skeleton' and its muscle to...
12948 (prepare): here.
12949 (output): Move the definition of the prologue muscle to...
12950 (prepare): here.
12951 * src/system.h (DEFAULT_TMPDIR): New.
12952
12953 2002-02-14 Paul Eggert <eggert@twinsun.com>
12954
12955 Remove the support for C++ namespace cleanliness; it was
12956 causing more problems than it was curing, since it didn't work
12957 properly on some nonstandard C++ compilers. This can wait
12958 for a proper C++ parser.
12959
12960 * NEWS: Document this.
12961 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12962 of C++, as it's treated like C now.
12963 * src/bison.simple (YYSTD): Remove.
12964 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12965 Treat C++ just like Standard C instead of trying to support
12966 namespace cleanliness.
12967
12968 2002-02-14 Akim Demaille <akim@epita.fr>
12969
12970 * tests/regression.at (else): Adjust to Andreas' change.
12971
12972 2002-02-14 Akim Demaille <akim@epita.fr>
12973
12974 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12975
12976 2002-02-13 Andreas Schwab <schwab@suse.de>
12977
12978 * src/output.c (output_rule_data): Don't output NULL, it might
12979 not be defined yet.
12980
12981 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
12982
12983 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12984 (Copyright notice): Update.
12985
12986 2002-02-11 Akim Demaille <akim@epita.fr>
12987
12988 * tests/regression.at (%nonassoc and eof): Don't include
12989 nonportable headers.
12990
12991 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
12992
12993 * data/bison.c++: Correct error recovery. Make the user able to
12994 initialize the starting location.
12995
12996 2002-02-07 Akim Demaille <akim@epita.fr>
12997
12998 * tests/input.at: New.
12999
13000 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13001
13002 * data/bison.c++: Replace some direct m4 expansions by constants. Be
13003 more consistent when naming methods and variables. Put preprocessor
13004 directives around tables only needed for debugging.
13005
13006 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13007
13008 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
13009 C++ parsers.
13010 (yy::b4_name::parse): Use print_.
13011
13012 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13013
13014 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
13015
13016 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13017
13018 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
13019 C++ parsers.
13020 (yy::b4_name::parse): Build verbose error messages, and use error_.
13021
13022 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
13023
13024 * data/bison.c++: Fix m4 quoting in comments.
13025
13026 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
13027
13028 * data/bison.c++: Adjust the parser code. Fix some muscles that were
13029 not expanded by m4.
13030
13031 2002-02-05 Akim Demaille <akim@epita.fr>
13032
13033 * data/bison.c++: Adjust to the M4 back end.
13034 More is certainly needed.
13035
13036 2002-02-05 Akim Demaille <akim@epita.fr>
13037
13038 Give a try to M4 as a back end.
13039
13040 * lib/readpipe.c: New, from wdiff.
13041 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
13042 BISON_HAIRY.
13043 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
13044 specific values. Now it is m4 that performs the lookup.
13045 * src/parse-skel.y: Remove.
13046 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
13047 * src/output.c (actions_output, guards_output)
13048 (token_definitions_output): No longer keeps track of the output
13049 line number, hence remove the second argument.
13050 (guards_output): Check against the guard member of a rule, not the
13051 action member.
13052 Adjust callers.
13053 (output_skeleton): Don't look for the skeleton location, let m4 do
13054 that.
13055 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
13056 file will be used.
13057 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
13058 (prepare): Given that for the time being changesyntax is not
13059 usable in M4, rename the muscles using `-' to `_'.
13060 Define `defines_flag', `output_parser_name' and `output_header_name'.
13061 * src/output.h (actions_output, guards_output)
13062 (token_definitions_output): Adjust prototypes.
13063 * src/scan-skel.l: Instead of scanning the skeletons, it now
13064 processes the output of m4: `__oline__' and `#output'.
13065 * data/bison.simple: Adjust to be used by M4(sugar).
13066 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
13067 to date.
13068 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
13069 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
13070 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
13071 shamelessly stolen from CVS Autoconf.
13072
13073 2002-02-05 Akim Demaille <akim@epita.fr>
13074
13075 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
13076 * configure.in: Check for the declarations of free and malloc.
13077 * src/muscle_tab.c: Adjust.
13078
13079 2002-02-05 Akim Demaille <akim@epita.fr>
13080
13081 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
13082 which have no values.
13083
13084 2002-02-05 Akim Demaille <akim@epita.fr>
13085
13086 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
13087 * data/: here.
13088
13089 2002-01-29 Paul Eggert <eggert@twinsun.com>
13090
13091 * src/bison.simple (YYSIZE_T): Do not define merely because
13092 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
13093 On some platforms, <alloca.h> does not declare YYSTD (size_t).
13094
13095 2002-01-27 Akim Demaille <akim@epita.fr>
13096
13097 Fix `%nonassoc and eof'.
13098
13099 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
13100 which were not properly copied! Replace
13101 memcpy (res->errs, src->errs, src->nerrs);
13102 with
13103 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
13104 !!!
13105 * tests/regression.at (%nonassoc and eof): Adjust to newest
13106 Autotest: `.' is not in the PATH.
13107
13108 2002-01-27 Akim Demaille <akim@epita.fr>
13109
13110 * tests/sets.at (AT_EXTRACT_SETS): New.
13111 (Nullable): Use it.
13112 (Firsts): New.
13113
13114 2002-01-26 Akim Demaille <akim@epita.fr>
13115
13116 * tests/actions.at, tests/calc.at, tests/headers.at,
13117 * tests/torture.at: Adjust to the newest Autotest which no longer
13118 forces `.' in the PATH.
13119
13120 2002-01-25 Akim Demaille <akim@epita.fr>
13121
13122 * tests/regression.at (%nonassoc and eof): New.
13123 Suggested by Robert Anisko.
13124
13125 2002-01-24 Akim Demaille <akim@epita.fr>
13126
13127 Bison dumps core when trying to complain about broken input files.
13128 Reported by Cris van Pelt.
13129
13130 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
13131 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
13132 into...
13133 (Invalid inputs): Strengthen: exercise parse_percent_token.
13134
13135 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
13136
13137 * src/Makefile.am: Add bison.c++.
13138 * src/bison.c++: New skeleton.
13139
13140 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
13141
13142 * po/it.po: New.
13143
13144 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
13145
13146 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
13147
13148 2002-01-20 Marc Autret <marc@gnu.org>
13149
13150 * src/files.c (compute_output_file_names): Fix
13151
13152 2002-01-20 Marc Autret <marc@gnu.org>
13153
13154 * tests/output.at: New test.
13155 * src/files.c (compute_base_names): Don't map extensions when
13156 the YACC flag is set, use defaults.
13157 Reported by Evgeny Stambulchik.
13158
13159 2002-01-20 Marc Autret <marc@gnu.org>
13160
13161 * src/system.h: Need to define __attribute__ away for non-GCC
13162 compilers as well (i.e., the vendor C compiler).
13163 Suggested by Albert Chin-A-Young.
13164
13165 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
13166
13167 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
13168 canonical definition.
13169 * src/system.h: Use the canonical definition for PARAMS (avoids
13170 a conflict with the macro from lib/hash.h).
13171
13172 2002-01-11 Akim Demaille <akim@epita.fr>
13173
13174 * configure.in: Use AC_FUNC_STRNLEN.
13175 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
13176
13177 2002-01-09 Akim Demaille <akim@epita.fr>
13178
13179 * src/files.c, src/files.h (output_infix): New.
13180 (tab_extension): Remove.
13181 (compute_base_names): Compute the former, drop the latter.
13182 * src/output.c (prepare): Insert the muscles `output-infix', and
13183 `output-suffix'.
13184 * src/parse-skel.y (string, string.1): New.
13185 (section.header): Use it.
13186 (section.yacc): Remove.
13187 (prefix): Remove too.
13188 * src/scan-skel.l: Adjust.
13189 * src/bison.simple, src/bison.hairy: Adjust.
13190
13191 2002-01-09 Akim Demaille <akim@epita.fr>
13192
13193 * configure.in (WERROR_CFLAGS): Compute it.
13194 * src/Makefile.am (CFLAGS): Pass it.
13195 * tests/atlocal.in (CFLAGS): Idem.
13196 * src/files.c: Fix a few warnings.
13197 (get_extension_index): Remove, unused.
13198
13199 2002-01-08 Akim Demaille <akim@epita.fr>
13200
13201 * src/getargs.c (AS_FILE_NAME): New.
13202 (getargs): Use it to convert DOSish file names.
13203 * src/files.c (base_name): Rename as full_base_name to avoid
13204 clashes with `base_name ()'.
13205 (filename_split): New.
13206 (compute_base_names): N-th rewrite, using filename_split.
13207
13208 2002-01-08 Akim Demaille <akim@epita.fr>
13209
13210 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
13211 New, stolen from the Fileutils 4.1.
13212 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13213 * configure.in: Check for the presence of memrchr, and of its
13214 prototype.
13215
13216 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
13217
13218 * lib/hash.h (__P): Added definition for this macro.
13219 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
13220 BUILT_SOURCES, to ensure they are generated first.
13221 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
13222 %error-verbose to allow bootstrapping with bison 1.30x.
13223
13224 2002-01-06 Akim Demaille <akim@epita.fr>
13225
13226 * src/reader.c (parse_braces): Don't fetch the next char, the
13227 convention is to fetch on entry.
13228 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
13229 'switch' without a following semicolon.
13230 * tests/regression.at (braces parsing): New.
13231
13232 2002-01-06 Akim Demaille <akim@epita.fr>
13233
13234 Bison is dead wrong in its RR conflict reports.
13235
13236 * tests/torture.at (GNU Cim Grammar): New.
13237 * src/conflicts.c (count_rr_conflicts): Fix.
13238
13239 2002-01-06 Akim Demaille <akim@epita.fr>
13240
13241 Creating package.m4 from configure.ac causes too many problems.
13242
13243 * tests/Makefile.am (package.m4): Create it by hand,
13244 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
13245
13246 2002-01-06 Akim Demaille <akim@epita.fr>
13247
13248 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
13249 skeleton.h.
13250
13251 2002-01-04 Paul Eggert <eggert@twinsun.com>
13252
13253 * doc/bison.texinfo (Debugging):
13254 Remove YYSTDERR; it's no longer defined or used.
13255 Also, s/cstdio.h/cstdio/.
13256
13257 2002-01-03 Akim Demaille <akim@epita.fr>
13258
13259 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
13260
13261 2002-01-03 Akim Demaille <akim@epita.fr>
13262
13263 * src/parse-skel.y (process_skeleton): Don't bind the parser's
13264 tracing code to --trace, wait for a better --trace option, with
13265 args.
13266
13267 2002-01-03 Akim Demaille <akim@epita.fr>
13268
13269 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
13270 The ISO C++ standard is extremely clear about it: stderr is
13271 considered a macro, not a regular symbol (see table 94 `Header
13272 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
13273 Therefore std:: does not apply to it. It still does with fprintf.
13274 Also, s/cstdio.h/cstdio/.
13275
13276 2002-01-03 Akim Demaille <akim@epita.fr>
13277
13278 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
13279 for non system headers.
13280
13281 2002-01-02 Akim Demaille <akim@epita.fr>
13282
13283 Equip the skeleton chain with location tracking, runtime trace,
13284 pure parser and scanner.
13285
13286 * src/parse-skel.y: Request a pure parser, locations, and prefix
13287 renaming.
13288 (%union): Having several members with the same type does not help
13289 type mismatches, simplify.
13290 (YYPRINT, yyprint): New.
13291 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
13292 (skel_error): this.
13293 Handle locations.
13294 * src/scan-skel.l: Adjust to these changes.
13295 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
13296 (LOCATION_PRINT, skel_control_t): New.
13297
13298 2001-12-30 Akim Demaille <akim@epita.fr>
13299
13300 * src/parse-skel.y: Get rid of the shift/reduce conflict:
13301 replace `gb' with BLANKS.
13302 * src/scan-skel.l: Adjust.
13303
13304 2001-12-30 Akim Demaille <akim@epita.fr>
13305
13306 * src/system.h: We don't need nor want bcopy.
13307 Throw away MS-DOS crap: we don't need getpid.
13308 * configure.in: We don't need strndup. It was even causing
13309 problems: because Flex includes the headers *before* us,
13310 _GNU_SOURCE is not defined by config.h, and therefore strndup was
13311 not visible.
13312 * lib/xstrndup.c: New.
13313 * src/scan-skel.l: Use it.
13314 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
13315 * src/parse-skel.y: Use %directives instead of #defines.
13316
13317 2001-12-30 Akim Demaille <akim@epita.fr>
13318
13319 * src/skeleton.h: New.
13320 * src/output.c (output_parser, output_master_parser): Remove, dead
13321 code.
13322 * src/output.h (get_lines_number, actions_output, guards_output)
13323 (token_definitions_output): Prototype them.
13324 * src/parse-skel.y: Add the license notice.
13325 Include output.h and skeleton.h.
13326 (process_skeleton): Returns void, and takes a single parameter.
13327 * src/scan-skel.l: Add the license notice.
13328 Include skeleton.h.
13329 Don't use %option yylineno: it seems that then Flex imagines
13330 REJECT has been used, and therefore it won't reallocate its
13331 buffers (which makes no other sense to me than a bug). It results
13332 in warnings for `unused: yy_flex_realloc'.
13333
13334 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
13335
13336 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13337 (MUSCLE_INSERT_PREFIX): ...to there.
13338 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13339 (MUSCLE_INSERT_PREFIX): Move from here...
13340
13341 * src/bison.hairy: Add a section directive. Put braces around muscle
13342 names. This parser skeleton is still broken, but Bison should not
13343 choke on a bad muscle 'syntax'.
13344 * src/bison.simple: Add a section directive. Put braces around muscle
13345 names.
13346
13347 * src/files.h (strsuffix, stringappend): Add declarations.
13348 (tab_extension): Add declaration.
13349 (short_base_name): Add declaration.
13350
13351 * src/files.c (strsuffix, stringappend): No longer static. These
13352 functions are used in the skeleton parser.
13353 (tab_extension): New.
13354 (compute_base_names): Use the computations done in this function
13355 to guess if the generated parsers should have '.tab' in their
13356 names.
13357 (short_base_name): No longer static.
13358
13359 * src/output.c (output_skeleton): New.
13360 (output): Disable call to output_master_parser, and give a try to
13361 a new skeleton handling system.
13362 (guards_output, actions_output): No longer static.
13363 (token_definitions_output, get_lines_number): No longer static.
13364
13365 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
13366
13367 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
13368 parse-skel.y.
13369
13370 * src/parse-skel.y: New file.
13371 * src/scan-skel.l: New file.
13372
13373 2001-12-29 Akim Demaille <akim@epita.fr>
13374
13375 %name-prefix is broken.
13376
13377 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
13378 Adjust all dependencies.
13379 * tests/headers.at (export YYLTYPE): Strengthen this test: use
13380 %name-prefix.
13381
13382 Renaming yylval but not yylloc is not consistent. Now we do.
13383
13384 * src/bison.simple: Prefix yylloc if used.
13385 * doc/bison.texinfo (Decl Summary): Document that.
13386
13387 2001-12-29 Akim Demaille <akim@epita.fr>
13388
13389 * doc/bison.texinfo: Promote `%long-directive' over
13390 `%long_directive'.
13391 Remove all references to fixed-output-files, yacc is enough.
13392
13393 2001-12-29 Akim Demaille <akim@epita.fr>
13394
13395 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
13396 user prologue. These are defaults.
13397 * tests/actions.at (Mid-rule actions): Make sure the user can
13398 define YYDEBUG and YYERROR_VERBOSE.
13399
13400 2001-12-29 Akim Demaille <akim@epita.fr>
13401
13402 * src/output.c (header_output): Don't forget to export YYLTYPE and
13403 yylloc.
13404 * tests/headers.at (export YYLTYPE): New, make sure it does.
13405 * tests/regression.at (%union and --defines, Invalid CPP headers):
13406 Move to...
13407 * tests/headers.at: here.
13408
13409 2001-12-29 Akim Demaille <akim@epita.fr>
13410
13411 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
13412
13413 2001-12-29 Akim Demaille <akim@epita.fr>
13414
13415 * tests/actions.at (Mid-rule actions): Output on a single line
13416 instead of several.
13417
13418 2001-12-29 Akim Demaille <akim@epita.fr>
13419
13420 * doc/bison.texinfo: Formatting changes.
13421
13422 2001-12-29 Akim Demaille <akim@epita.fr>
13423
13424 Don't store the token defs in a muscle, just be ready to output it
13425 on command. Now possible via `symbols'. Fixes a memory leak.
13426
13427 * src/output.c (token_definitions_output): New.
13428 (output_parser, header_output): Use it.
13429 * src/reader.c (symbols_save): Remove.
13430
13431 2001-12-29 Akim Demaille <akim@epita.fr>
13432
13433 * src/bison.simple: Do not provide a default for YYSTYPE and
13434 YYLTYPE before the user's prologue. Otherwise it's hardly... a
13435 default.
13436
13437 2001-12-29 Akim Demaille <akim@epita.fr>
13438
13439 Mid-rule actions are simply... ignored!
13440
13441 * src/reader.c (readgram): Be sure to attach mid-rule actions to
13442 the empty-rule associated to the dummy symbol, not to the host
13443 rule.
13444 * tests/actions.at (Mid-rule actions): New.
13445
13446 2001-12-29 Akim Demaille <akim@epita.fr>
13447
13448 Memory leak.
13449
13450 * src/reader.c (reader): Free grammar.
13451
13452 2001-12-29 Akim Demaille <akim@epita.fr>
13453
13454 Memory leak.
13455
13456 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
13457 since it allocates it for each state, although only one is needed.
13458 (allocate_storage): Do it here.
13459
13460 2001-12-29 Akim Demaille <akim@epita.fr>
13461
13462 * src/options.h, src/options.c (create_long_option_table): Rename
13463 as...
13464 (long_option_table_new): this, with a clearer prototype.
13465 (percent_table): Remove, unused,
13466 * src/getargs.c (getargs): Adjust.
13467
13468 2001-12-29 Akim Demaille <akim@epita.fr>
13469
13470 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
13471 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
13472 as states.
13473
13474 2001-12-29 Akim Demaille <akim@epita.fr>
13475
13476 * src/lalr.c (build_relations): Rename `states' as `states1'.
13477 Sorry, I don't understand exactly what it is, no better name...
13478
13479 2001-12-29 Akim Demaille <akim@epita.fr>
13480
13481 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
13482 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
13483 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
13484 as rules.
13485
13486 2001-12-29 Akim Demaille <akim@epita.fr>
13487
13488 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
13489 ago.
13490
13491 2001-12-29 Akim Demaille <akim@epita.fr>
13492
13493 * src/reader.c, src/reader.h (user_toknums): Remove.
13494 Adjust all users to use symbols[i]->user_token_number.
13495
13496 2001-12-29 Akim Demaille <akim@epita.fr>
13497
13498 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
13499 Adjust all users to use symbols[i]->prec or ->assoc.
13500
13501 2001-12-29 Akim Demaille <akim@epita.fr>
13502
13503 * src/reader.c, src/reader.h (tags): Remove.
13504 Adjust all users to use symbols[i]->tag.
13505
13506 2001-12-29 Akim Demaille <akim@epita.fr>
13507
13508 * src/gram.h, src/gram.c (symbols): New, similar to state_table
13509 and rule_table.
13510 * src/reader.c (packsymbols): Fill this table.
13511 Drop sprec.
13512 * src/conflicts.c (resolve_sr_conflict): Adjust.
13513 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
13514 single table.
13515 Use symbols[i]->tag instead of tags[i].
13516
13517 2001-12-29 Akim Demaille <akim@epita.fr>
13518
13519 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
13520 In addition, put a comment in there, to replace...
13521 * tests/regression.at (%union and C comments): Remove.
13522
13523 2001-12-29 Akim Demaille <akim@epita.fr>
13524
13525 * tests/regression.at (Web2c Actions): Blindly move the actual
13526 output as expected output. The contents *seem* right to me, but I
13527 can't pretend reading perfectly parser tables... Nonetheless, all
13528 the other tests pass correctly, the table look OK, even though the
13529 presence of `$axiom' is to be noted: AFAICS it is useless (but
13530 harmless).
13531
13532 2001-12-29 Akim Demaille <akim@epita.fr>
13533
13534 * src/reader.c (readgram): Don't add the rule 0 if there were no
13535 rules read. In other words, add it _after_ having performed
13536 grammar sanity checks.
13537 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
13538
13539 2001-12-29 Akim Demaille <akim@epita.fr>
13540
13541 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
13542 visible, and some states have now a different number.
13543
13544 2001-12-29 Akim Demaille <akim@epita.fr>
13545
13546 * src/reader.c (readgram): Bind the initial rule's lineno to that
13547 of the first rule.
13548 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
13549 (Solved SR Conflicts): Adjust rule 0's line number.
13550
13551 2001-12-29 Akim Demaille <akim@epita.fr>
13552
13553 Fix the `GAWK Grammar' failure.
13554
13555 * src/LR0.c (final_state): Initialize to -1 so that we do compute
13556 the reductions of the first state which was mistakenly confused
13557 with the final state because precisely final_state was initialized
13558 to 0.
13559 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
13560 now noticed by Bison.
13561 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
13562 have a reduction on $default.
13563
13564 2001-12-29 Akim Demaille <akim@epita.fr>
13565
13566 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
13567 rule line numbers.
13568 * src/closure.c (print_closure): Likewise.
13569 * src/derives.c (print_derives): Likewise.
13570 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
13571 now.
13572
13573 2001-12-29 Akim Demaille <akim@epita.fr>
13574
13575 * src/lalr.c (lookaheads_print): New.
13576 (lalr): Call it when --trace-flag.
13577 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
13578 are dumped.
13579
13580 2001-12-29 Akim Demaille <akim@epita.fr>
13581
13582 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
13583 when walking through ritem, even via rule->rhs.
13584 * src/reduce.c (dump_grammar, useful_production, reduce_output)
13585 (useful_production, useless_nonterminals): Likewise.
13586 (reduce_grammar_tables): Likewise, plus update nritems.
13587 * src/nullable.c (set_nullable): Likewise.
13588 * src/lalr.c (build_relations): Likewise.
13589 * tests/sets.at (Nullable): Adjust.
13590 Fortunately, now, the $axiom is no longer nullable.
13591
13592 2001-12-29 Akim Demaille <akim@epita.fr>
13593
13594 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
13595 the 0-sentinel.
13596 * src/gram.c (ritem_longest_rhs): Likewise.
13597 * src/reduce.c (nonterminals_reduce): Likewise.
13598 * src/print_graph.c (print_graph): Likewise.
13599 * src/output.c (output_rule_data): Likewise.
13600 * src/nullable.c (set_nullable): Likewise.
13601
13602 2001-12-29 Akim Demaille <akim@epita.fr>
13603
13604 * src/output.c: Comment changes.
13605
13606 2001-12-27 Paul Eggert <eggert@twinsun.com>
13607
13608 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
13609 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
13610 Sparc, as they were causing more porting problems than the
13611 (minor) performance improvement was worth.
13612
13613 Also, catch up with 1.31's YYSTD.
13614
13615 2001-12-27 Akim Demaille <akim@epita.fr>
13616
13617 * src/output.c (output_gram): Rely on nritems, not the
13618 0-sentinel. See below.
13619 Use -1 as separator, not 0.
13620 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
13621 Rely on -1 as separator in yyrhs, instead of 0.
13622 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
13623 twice `Now at end of input', therefore there are two lines less to
13624 expect.
13625
13626 2001-12-27 Akim Demaille <akim@epita.fr>
13627
13628 * tests/regression.at (Unresolved SR Conflicts):
13629 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
13630 below.
13631
13632 2001-12-27 Akim Demaille <akim@epita.fr>
13633
13634 * src/LR0.c (new_state): Recognize the final state by the fact it
13635 is reached by eoftoken.
13636 (insert_start_shifting_state, insert_eof_shifting_state)
13637 (insert_accepting_state, augment_automaton): Remove, since now
13638 these states are automatically computed from the initial state.
13639 (generate_states): Adjust.
13640 * src/print.c: When reporting a rule number to the user, substract
13641 1, so that the axiom rule is rule 0, and the first user rule is 1.
13642 * src/reduce.c: Likewise.
13643 * src/print_graph.c (print_core): For the time being, just as for
13644 the report, depend upon --trace-flags to dump the full set of
13645 items.
13646 * src/reader.c (readgram): Once the grammar read, insert the rule
13647 0: `$axiom: START-SYMBOL $'.
13648 * tests/set.at: Adjust: rule 0 is now displayed, and since the
13649 number of the states has changed (the final state is no longer
13650 necessarily the last), catch up.
13651
13652 2001-12-27 Akim Demaille <akim@epita.fr>
13653
13654 Try to make the use of the eoftoken valid. Given that its value
13655 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
13656 is used instead of > 0 where appropriate, (ii), depend upon nritems
13657 instead of the 0-sentinel.
13658
13659 * src/gram.h, src/gram.c (nritems): New.
13660 Expected to be duplication of nitems, but for the time being...
13661 * src/reader.c (packgram): Assert nritems and nitems are equal.
13662 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
13663 * src/closure.c (print_closure, print_fderives): Likewise.
13664 * src/gram.c (ritem_print): Likewise.
13665 * src/print.c (print_core, print_grammar): Likewise.
13666 * src/print_graph.c: Likewise.
13667
13668 2001-12-27 Akim Demaille <akim@epita.fr>
13669
13670 * src/main.c (main): If there are complains after grammar
13671 reductions, then output the report anyway if requested, then die.
13672 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
13673 * src/reader.c (eoftoken): New.
13674 (parse_token_decl): If the token being defined has value `0', it
13675 is the eoftoken.
13676 (packsymbols): No longer hack `tags' to insert `$' by hand.
13677 Be sure to preserve the value of the eoftoken.
13678 (reader): Make sure eoftoken is defined.
13679 Initialize nsyms to 0: now eoftoken is created just like the others.
13680 * src/print.c (print_grammar): Don't special case the eof token.
13681 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
13682 lie anyway, albeit pleasant.
13683 * tests/calc.at: Exercise error messages with eoftoken.
13684 Change the grammar so that empty input is invalid.
13685 Adjust expectations.
13686 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
13687
13688 2001-12-27 Akim Demaille <akim@epita.fr>
13689
13690 * configure.in: Check the protos of strchr ans strspn.
13691 Replace strchr if needed.
13692 * src/system.h: Provide the protos of strchr, strspn and memchr if
13693 missing.
13694 * lib/strchr.c: New.
13695 * src/reader.c (symbols_save): Use strchr.
13696
13697 2001-12-27 Akim Demaille <akim@epita.fr>
13698
13699 * src/print.c, src/print_graph.c (escape): New.
13700 Use it to quote the TAGS outputs.
13701 * src/print_graph.c (print_state): Now errors are in red, and
13702 reductions in green.
13703 Prefer high to wide: output the state number on a line of its own.
13704
13705 2001-12-27 Akim Demaille <akim@epita.fr>
13706
13707 * src/state.h, src/state.c (reductions_new): New.
13708 * src/LR0.c (set_state_table): Let all the states have a
13709 `reductions', even if reduced to 0.
13710 (save_reductions): Adjust.
13711 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
13712 * src/print.c (print_reductions, print_actions): Adjust.
13713 * src/output.c (action_row): Adjust.
13714
13715 2001-12-27 Akim Demaille <akim@epita.fr>
13716
13717 * src/state.h, src/state.c (errs_new, errs_dup): New.
13718 * src/LR0.c (set_state_table): Let all the states have an errs,
13719 even if reduced to 0.
13720 * src/print.c (print_errs, print_reductions): Adjust.
13721 * src/output.c (output_actions, action_row): Adjust.
13722 * src/conflicts.c (resolve_sr_conflict): Adjust.
13723
13724 2001-12-27 Akim Demaille <akim@epita.fr>
13725
13726 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
13727
13728 2001-12-27 Akim Demaille <akim@epita.fr>
13729
13730 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
13731 * src/print.c: here.
13732 (lookaheadset, shiftset): New, used as additional storage by
13733 print_reductions.
13734 (print_results): Adjust.
13735 (print_shifts, print_gotos, print_errs): New, extracted from...
13736 (print_actions): here.
13737 * src/print_graph.c (print_actions): Remove dead code.
13738
13739 2001-12-27 Akim Demaille <akim@epita.fr>
13740
13741 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
13742 `$n' and `@n'.
13743
13744 2001-12-27 Akim Demaille <akim@epita.fr>
13745
13746 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
13747 (build_relations): Adjust.
13748
13749 2001-12-27 Akim Demaille <akim@epita.fr>
13750
13751 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
13752 duplication.
13753
13754 2001-12-27 Akim Demaille <akim@epita.fr>
13755
13756 * src/reader.c (packgram): Catch nitems overflows.
13757
13758 2001-12-27 Akim Demaille <akim@epita.fr>
13759
13760 * src/files.c, src/files.h (guard_obstack): Remove.
13761 * src/output.c (output): Adjust.
13762 * src/reader.c (parse_braces): New, factoring...
13763 (copy_action, copy_guard): these two which are renamed as...
13764 (parse_action, parse_guard): these.
13765 As a voluntary consequence, using braces around guards is now
13766 mandatory.
13767
13768 2001-12-27 Akim Demaille <akim@epita.fr>
13769
13770 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
13771 * src/reader.c (symbol_list): `guard' and `guard_line' are new
13772 members.
13773 (symbol_list_new): Adjust.
13774 (copy_action): action_line is the first line, not the last.
13775 (copy_guard): Just as for actions, store the `action' only, not
13776 the switch/case/break flesh.
13777 Don't parse the user action that might follow the guard, let...
13778 (readgram): do it, i.e., now, there can be an action after a
13779 guard.
13780 In other words the guard is just explicitly optional.
13781 (packgram): Adjust.
13782 * src/output.c (guards_output): New.
13783 (output_parser): Call it when needed.
13784 (output): Also free the guard and attrs obstacks.
13785 * src/files.c, src/files.h (obstack_save): Remove.
13786 (output_files): Remove.
13787 As a result, if one needs the former `.act' file, using an
13788 appropriate skeleton which requires actions and guards is now
13789 required.
13790 * src/main.c (main): Adjust.
13791 * tests/semantic.at: New.
13792 * tests/regression.at: Use `input.y' as input file name.
13793 Avoid 8+3 problems by requiring input.c when the test needs the
13794 parser.
13795
13796 2001-12-27 Akim Demaille <akim@epita.fr>
13797
13798 * src/reader.c (symbol_list_new): Be sure to initialize all the
13799 fields.
13800
13801 2001-12-27 Akim Demaille <akim@epita.fr>
13802
13803 All the hacks using a final pseudo state are now useless.
13804
13805 * src/LR0.c (set_state_table): state_table holds exactly nstates.
13806 * src/lalr.c (nLA): New.
13807 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
13808 instead of lookaheadsp from the pseudo state (nstate + 1).
13809
13810 2001-12-27 Akim Demaille <akim@epita.fr>
13811
13812 * src/output.c (action_row, token_actions): Use a state_t instead
13813 of a integer, and nlookaheads instead of the following state's
13814 lookaheadsp.
13815
13816 2001-12-27 Akim Demaille <akim@epita.fr>
13817
13818 * src/conflicts.c (log_resolution, flush_shift)
13819 (resolve_sr_conflict, set_conflicts, solve_conflicts)
13820 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13821 (conflicts_print, print_reductions): Use a state_t instead of an
13822 integer when referring to a state.
13823 As much as possible, depend upon nlookaheads, instead of the
13824 `lookaheadsp' member of the following state (since lookaheads of
13825 successive states are successive, the difference between state n + 1
13826 and n served as the number of lookaheads for state n).
13827 * src/lalr.c (add_lookback_edge): Likewise.
13828 * src/print.c (print_core, print_actions, print_state)
13829 (print_results): Likewise.
13830 * src/print_graph.c (print_core, print_actions, print_state)
13831 (print_graph): Likewise.
13832 * src/conflicts.h: Adjust.
13833
13834 2001-12-27 Akim Demaille <akim@epita.fr>
13835
13836 * src/bison.hairy: Formatting/comment changes.
13837 ANSIfy.
13838 Remove `register' indications.
13839 Add plenty of `static'.
13840
13841 2001-12-27 Akim Demaille <akim@epita.fr>
13842
13843 * src/output.c (prepare): Drop the muscle `ntbase' which
13844 duplicates ntokens.
13845 * src/bison.simple: Formatting/comment changes.
13846 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
13847 is an undocumented synonym.
13848
13849 2001-12-22 Akim Demaille <akim@epita.fr>
13850
13851 * src/output.c (output_table_data): Change the prototype to use
13852 `int' for array ranges: some invocations do pass an int, not a
13853 short.
13854 Reported by Wayne Green.
13855
13856 2001-12-22 Akim Demaille <akim@epita.fr>
13857
13858 Some actions of web2c.y are improperly triggered.
13859 Reported by Mike Castle.
13860
13861 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
13862 * tests/regression.at (Web2c): Rename as...
13863 (Web2c Report): this.
13864 (Web2c Actions): New.
13865
13866 2001-12-22 Akim Demaille <akim@epita.fr>
13867
13868 Reductions in web2c.y are improperly reported.
13869 Reported by Mike Castle.
13870
13871 * src/conflicts.c (print_reductions): Fix.
13872 * tests/regression.at (Web2c): New.
13873
13874 2001-12-18 Akim Demaille <akim@epita.fr>
13875
13876 Some host fail on `assert (!"foo")', which expands to
13877 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
13878 Reported by Nelson Beebee.
13879
13880 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
13881 `#define it_succeeded 0' and `assert (it_succeeded)'.
13882
13883 2001-12-17 Marc Autret <autret_m@epita.fr>
13884
13885 * src/bison.simple: Don't hard code the skeleton line and filename.
13886 * src/output.c (output_parser): Rename 'line' as 'output_line'.
13887 New line counter 'skeleton_line' (skeleton-line muscle).
13888
13889 2001-12-17 Paul Eggert <eggert@twinsun.com>
13890
13891 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
13892 YYDEBUG must be defined to a nonzero value.
13893
13894 * src/bison.simple (yytname): Do not assume that the user defines
13895 YYDEBUG to a properly parenthesized expression.
13896
13897 2001-12-17 Akim Demaille <akim@epita.fr>
13898
13899 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
13900 nlookaheads is a new member.
13901 Adjust all users.
13902 * src/lalr.h (nlookaheads): Remove this orphan declaration.
13903 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
13904 state.
13905
13906 2001-12-17 Akim Demaille <akim@epita.fr>
13907
13908 * src/files.h, src/files.c (open_files, close_files): Remove.
13909 * src/main.c (main): Don't open/close files, nor invoke lex_free,
13910 let...
13911 * src/reader.c (reader): Do it.
13912
13913 2001-12-17 Akim Demaille <akim@epita.fr>
13914
13915 * src/conflicts.c (print_reductions): Formatting changes.
13916
13917 2001-12-17 Akim Demaille <akim@epita.fr>
13918
13919 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13920 (flush_reduce): New.
13921 (resolve_sr_conflict): Adjust.
13922
13923 2001-12-17 Akim Demaille <akim@epita.fr>
13924
13925 * src/output.c (output_obstack): Be static and rename as...
13926 (format_obstack): this, to avoid any confusion with files.c's
13927 output_obstack.
13928 * src/reader.h (muscle_obstack): Move to...
13929 * src/output.h: here, since it's defined in output.c.
13930
13931 2001-12-17 Akim Demaille <akim@epita.fr>
13932
13933 * src/output.c (action_row, save_column, default_goto)
13934 (sort_actions, matching_state, pack_vector): Better variable
13935 locality.
13936
13937 2001-12-17 Akim Demaille <akim@epita.fr>
13938
13939 * src/output.c: Various formatting changes.
13940
13941 2001-12-17 Akim Demaille <akim@epita.fr>
13942
13943 * src/files.c (output_files): Free the output_obstack.
13944 * src/main.c (main): Call print and print_graph conditionally.
13945 * src/print.c (print): Work unconditionally.
13946 * src/print_graph.c (print_graph): Work unconditionally.
13947 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13948
13949 2001-12-16 Marc Autret <autret_m@epita.fr>
13950
13951 * src/output.c (actions_output): Fix. When we use %no-lines,
13952 there is one less line per action.
13953
13954 2001-12-16 Marc Autret <autret_m@epita.fr>
13955
13956 * src/bison.simple: Remove a useless #line directive.
13957 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13958 * src/output.c (get_lines_number): New.
13959 (output_parser): Adjust, now takes care about the lines of a
13960 output muscles.
13961 Fix line numbering.
13962 (actions_output): Computes the number of lines taken by actions.
13963 (output_master_parser): Insert new skeleton which is the name of
13964 the output parser file name.
13965
13966 2001-12-15 Marc Autret <autret_m@epita.fr>
13967
13968 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13969
13970 2001-12-15 Marc Autret <autret_m@epita.fr>
13971
13972 * src/output.c (output_gram): Keep track of the hairy one.
13973
13974 2001-12-15 Akim Demaille <akim@epita.fr>
13975
13976 Make `make distcheck' work.
13977
13978 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13979 system.h which uses libgettext.h.
13980
13981 2001-12-15 Akim Demaille <akim@epita.fr>
13982
13983 * src/nullable.c (set_nullable): Useless rules must be skipped,
13984 otherwise, since we range over their symbols, we might look at a
13985 nonterminal which no longer ``exists'', i.e., it is not counted in
13986 `nvars', hence we overflow our arrays.
13987
13988 2001-12-15 Akim Demaille <akim@epita.fr>
13989
13990 The header can also be produced directly, without any obstack!
13991 Yahoo!
13992
13993 * src/files.c, src/files.h (defines_obstack): Remove.
13994 (compute_header_macro): Global.
13995 (defines_obstack_save): Remove.
13996 * src/reader.c (parse_union_decl): No longer output to
13997 defines_obstack: its content can be found in the `stype' muscle
13998 anyway.
13999 (output_token_translations): Merge into...
14000 (symbols_output): this.
14001 Rename as...
14002 (symbols_save): this.
14003 (reader): Adjust.
14004 * src/output.c (header_output): New.
14005 (output): Call it.
14006
14007 2001-12-15 Akim Demaille <akim@epita.fr>
14008
14009 * src/reader.c (parse_union_decl): Instead of handling two obstack
14010 simultaneously, use one to define the `stype' muscle, and use the
14011 value of the latter to fill defines_obstack.
14012 (copy_comment): Remove.
14013 (copy_comment2): Work for a single obstack.
14014 Rename as...
14015 (copy_comment): this.
14016
14017 2001-12-15 Akim Demaille <akim@epita.fr>
14018
14019 * src/lex.c, src/lex.h (xgetc): No longer static.
14020 * src/reader.c (parse_union_decl): Revamp.
14021
14022 2001-12-15 Akim Demaille <akim@epita.fr>
14023
14024 Still making progress in separating Bison into (i) input, (ii)
14025 process, (iii) output: now we can directly output the parser file
14026 without using table_obstack at all.
14027
14028 * src/files.c, src/files.h (table_obstack): Bye bye.
14029 (parser_file_name): New.
14030 * src/files.c (compute_output_file_names): Compute it.
14031 * src/output.c (actions_output, output_parser)
14032 (output_master_parser): To a file instead of an obstack.
14033
14034 2001-12-15 Akim Demaille <akim@epita.fr>
14035
14036 Attach actions to rules, instead of pre-outputting them to
14037 actions_obstack.
14038
14039 * src/gram.h (rule_t): action and action_line are new members.
14040 * src/reader.c (symbol_list): Likewise.
14041 (copy_action): Save the actions within the rule.
14042 (packgram): Save them in rule_table.
14043 * src/output.c (actions_output): New.
14044 (output_parser): Use it on `%%actions'.
14045 (output_rule_data): Don't free rule_table.
14046 (output): Do it.
14047 (prepare): Don't save the `action' muscle.
14048 * src/bison.simple: s/%%action/%%actions/.
14049
14050 2001-12-15 Akim Demaille <akim@epita.fr>
14051
14052 * src/reader.c (copy_action): When --yacc, don't append a `;'
14053 to the user action: let it fail if lacking.
14054 Suggested by Arnold Robbins and Tom Tromey.
14055
14056 2001-12-14 Akim Demaille <akim@epita.fr>
14057
14058 * src/lex.c (literalchar): Simply return the char you decoded, non
14059 longer mess around with obstacks and int pointers.
14060 Adjust all callers.
14061
14062 2001-12-14 Akim Demaille <akim@epita.fr>
14063
14064 * src/lex.c (literalchar): Don't escape the special characters,
14065 just decode them, and keep them as char (before, eol was output as
14066 the 2 char string `\n' etc.).
14067 * src/output.c (output_rule_data): Use quotearg to output the
14068 token strings.
14069
14070 2001-12-13 Paul Eggert <eggert@twinsun.com>
14071
14072 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
14073 Do not infringe on the global user namespace when using C++.
14074 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
14075 All uses of `fprintf' and `stderr' changed.
14076
14077 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
14078
14079 2001-12-13 Akim Demaille <akim@epita.fr>
14080
14081 The computation of nullable is broken: it doesn't handle empty
14082 RHS's properly.
14083
14084 * tests/torture.at (GNU AWK Grammar): New.
14085 * tests/sets.at (Nullable): New.
14086 * src/nullable.c (set_nullable): Instead of blindly looping over
14087 `ritems', loop over the rules, and then over their rhs's.
14088
14089 Work around Autotest bugs.
14090
14091 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
14092 frame, because Autotest understand lines starting with a `+' as
14093 traces from the shell. Then, they are not processed properly.
14094 Admittedly an Autotest bug, but we don't have time to wait for
14095 Autotest to catch up.
14096 * tests/regression.at (Broken Closure): Adjust to the new table
14097 frames.
14098 Move to...
14099 * tests/sets.at: here.
14100
14101 2001-12-13 Akim Demaille <akim@epita.fr>
14102
14103 * src/closure.c (closure): Use nrules instead of playing tricks
14104 with BITS_PER_WORD.
14105
14106 2001-12-13 Akim Demaille <akim@epita.fr>
14107
14108 * src/print.c (print_actions): Output the handling of `$' as the
14109 traces do: shifting the token EOF. Before EOF was treated as a
14110 nonterminal.
14111 * tests/regression.at: Adjust some tests.
14112 * src/print_graph.c (print_core): Complete the set of items via
14113 closure. The next-to-final and final states are still unsatisfying,
14114 but that's to be addressed elsewhere.
14115 No longer output the rule numbers, but do output the state number.
14116 A single loop for the shifts + gotos is enough, but picked a
14117 distinct color for each.
14118 (print_graph): Initialize and finalize closure.
14119
14120 2001-12-13 Akim Demaille <akim@epita.fr>
14121
14122 * src/reader.c (readgram): Remove dead code, an strip useless
14123 braces.
14124 (get_type): Remove, unused.
14125
14126 2001-12-12 Akim Demaille <akim@epita.fr>
14127
14128 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
14129 on that of lib/error.c.
14130
14131 2001-12-12 Akim Demaille <akim@epita.fr>
14132
14133 Some hosts don't like `/' in includes.
14134
14135 * src/system.h: Include libgettext.h without qualifying the path.
14136 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
14137 $(top_srcdir).
14138
14139 2001-12-11 Marc Autret <autret_m@epita.fr>
14140
14141 * src/output.c (output_parser): Remove useless muscle.
14142
14143 2001-12-11 Marc Autret <autret_m@epita.fr>
14144
14145 * src/bison.simple: Remove #line just before %%epilogue. It
14146 is now handled in ...
14147 * src/reader.c (read_additionnal_code): Add the output of a
14148 #line for the epilogue.
14149
14150 2001-12-10 Marc Autret <autret_m@epita.fr>
14151
14152 * src/reader.c (copy_definition): Re-use CPP-outed code which
14153 replace precedent remove.
14154 * src/bison.simple: Remove #line before %%prologue because
14155 %%input-line is wrong at this time.
14156
14157 2001-12-10 Marc Autret <autret_m@epita.fr>
14158
14159 * src/reader.c (symbols_output): Clean up.
14160 * src/output.c (output_gram, output): Clean up.
14161
14162 2001-12-10 Akim Demaille <akim@epita.fr>
14163
14164 * src/lalr.c (initialize_lookaheads): New. Extracted from...
14165 * src/LR0.c (set_state_table): here.
14166 * src/lalr.c (lalr): Call it.
14167
14168 2001-12-10 Akim Demaille <akim@epita.fr>
14169
14170 * src/state.h (shifts): Remove the `number' member: shifts are
14171 attached to state, hence no longer need to be labelled with a
14172 state number.
14173
14174 2001-12-10 Akim Demaille <akim@epita.fr>
14175
14176 Now that states have a complete set of members, the linked list of
14177 shifts is useless: just fill directly the state's shifts member.
14178
14179 * src/state.h (shifts): Remove the `next' member.
14180 * src/LR0.c (first_state, last_state): Remove.
14181 Adjust the callers.
14182 (augment_automaton): Don't look for the shifts that must be added
14183 a shift on EOF: it is those of the state we looked for! But now,
14184 since shifts are attached, it is no longer needed to looking
14185 merely by its id: its number.
14186
14187 2001-12-10 Akim Demaille <akim@epita.fr>
14188
14189 * src/LR0.c (augment_automaton): Better variable locality.
14190 Remove an impossible branch: if there is a state corresponding to
14191 the start symbol being shifted, then there is shift for the start
14192 symbol from the initial state.
14193
14194 2001-12-10 Akim Demaille <akim@epita.fr>
14195
14196 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
14197 only when appropriate: when insert_start_shifting_state' is not
14198 invoked.
14199 * tests/regression.at (Rule Line Numbers): Adjust.
14200
14201 2001-12-10 Akim Demaille <akim@epita.fr>
14202
14203 * src/LR0.c (augment_automaton): Now that all states have shifts,
14204 merge the two cases addition shifts to the initial state.
14205
14206 2001-12-10 Akim Demaille <akim@epita.fr>
14207
14208 * src/lalr.c (set_state_table): Move to...
14209 * src/LR0.c: here.
14210 * src/lalr.c (lalr): Don't call it...
14211 * src/LR0.c (generate_states): do it.
14212 * src/LR0.h (first_state): Remove, only the table is used.
14213
14214 2001-12-10 Akim Demaille <akim@epita.fr>
14215
14216 * src/LR0.h (first_shift, first_reduction): Remove.
14217 * src/lalr.c: Don't use first_shift: find shifts through the
14218 states.
14219
14220 2001-12-10 Akim Demaille <akim@epita.fr>
14221
14222 * src/LR0.c: Attach shifts to states as soon as they are
14223 computed.
14224 * src/lalr.c (set_state_table): Instead of assigning shifts to
14225 state, just assert that the mapping was properly done.
14226
14227 2001-12-10 Akim Demaille <akim@epita.fr>
14228
14229 * src/LR0.c (insert_start_shift): Rename as...
14230 (insert_start_shifting_state): this.
14231 (insert_eof_shifting_state, insert_accepting_state): New.
14232 (augment_automaton): Adjust.
14233 Better locality of the variables.
14234 When looking if the start_symbol is shifted from the initial
14235 state, using `while (... symbol != start_symbol ...)' sounds
14236 better than `while (... symbol < start_symbol ...)': If fail
14237 to see how the order between symbols could be relevant!
14238
14239 2001-12-10 Akim Demaille <akim@epita.fr>
14240
14241 * src/getargs.h: Don't declare `spec_name_prefix' and
14242 `spec_file_prefix', declared by src/files.h.
14243 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
14244 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
14245 * src/output.c (prepare): Adjust.
14246 * src/reader.c (symbols_output): Likewise.
14247 * src/vmsgetargs.c: Vaguely adjust, but who cares?
14248
14249 2001-12-10 Akim Demaille <akim@epita.fr>
14250
14251 * src/muscle_tab.c (muscle_init): NULL is a better default than
14252 `"0"'.
14253
14254 2001-12-10 Akim Demaille <akim@epita.fr>
14255
14256 * src/reader.c (reader): Calling symbols_output once is enough.
14257
14258 2001-12-10 Akim Demaille <akim@epita.fr>
14259
14260 Now that states have a complete set of members, the linked list of
14261 reductions is useless: just fill directly the state's reductions
14262 member.
14263
14264 * src/state.h (struct reductions): Remove member `number' and
14265 `next'.
14266 * src/LR0.c (first_reduction, last_reduction): Remove.
14267 (save_reductions): Don't link the new reductions, store them in
14268 this_state.
14269 * src/lalr.c (set_state_table): No need to attach reductions to
14270 states, it's already done.
14271 * src/output.c (output_actions): No longer free the shifts, then
14272 the reductions, then the states: free all the states and their
14273 members.
14274
14275 2001-12-10 Akim Demaille <akim@epita.fr>
14276
14277 * src/options.c (OPTN, DRTV, BOTH): New.
14278 (option_table): Use them.
14279
14280 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
14281 the job of system.h.
14282 * src/options.c: Don't include stdio.h and xalloc.h for the same
14283 reasons.
14284
14285 2001-12-10 Akim Demaille <akim@epita.fr>
14286
14287 * src/output.c (output, prepare): Make sure the values of the
14288 muscles `action' and `prologue' are 0-terminated.
14289
14290 2001-12-10 Akim Demaille <akim@epita.fr>
14291
14292 Clean up GCC warnings.
14293
14294 * src/reader.c (copy_action): `buf' is not used.
14295 (parse_skel_decl): Be static.
14296 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
14297 * src/options.h (create_long_option_table): Have a real prototype.
14298 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
14299 (hash_delete_at): Return const void *.
14300 Adjust casts to preserve the const.
14301
14302 2001-12-10 Akim Demaille <akim@epita.fr>
14303
14304 * configure.in: Require 2.52g.
14305 M4 is not needed, but AUTOM4TE is.
14306 * m4/m4.m4: Remove.
14307 * tests/Makefile.am: Adjust.
14308
14309 2001-12-10 Akim Demaille <akim@epita.fr>
14310
14311 One structure for states is enough, even though theoretically
14312 there are LR(0) states and LALR(1) states.
14313
14314 * src/lalr.h (state_t): Remove.
14315 (state_table): Be state_t **, not state_t *.
14316 * src/state.h (core, CORE_ALLOC): Rename as...
14317 (state_t, STATE_ALLOC): this.
14318 Add the LALR(1) members: shifts, reductions, errs.
14319 * src/LR0.c (state_table): Rename as...
14320 (state_hash): this, to avoid name clashes with the global
14321 `state_table'.
14322 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
14323 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
14324
14325 2001-12-10 Akim Demaille <akim@epita.fr>
14326
14327 Bison dumps core on bash.y.
14328 Reported by Pascal Bart.
14329
14330 * src/warshall.c (bitmatrix_print): New.
14331 (TC): Use it.
14332 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
14333 j must be the outer loop.
14334 * tests/regression.at (Broken Closure): New.
14335
14336 2001-12-05 Akim Demaille <akim@epita.fr>
14337
14338 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
14339 its argument.
14340 Reported by Peter Hamorsky.
14341
14342 2001-12-05 Akim Demaille <akim@epita.fr>
14343
14344 * src/conflicts.c (err_table): Remove.
14345 (resolve_sr_conflict): Adjust.
14346 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
14347 Rename as...
14348 (state_t.reductions, state_t.shifts): this.
14349
14350 2001-12-05 Akim Demaille <akim@epita.fr>
14351
14352 * src/reduce.c (reduce_grammar_tables): No longer disable the
14353 removal of useless rules via CPP but via `if (0)', so that the
14354 compiler still check the code is valid.
14355 For instance, it should have noticed `rline' no longer exists: use
14356 the `line' member of rule_t.
14357 * src/gram.c (dummy, rline): Remove, unused.
14358
14359 2001-12-05 Akim Demaille <akim@epita.fr>
14360
14361 * src/output.c (pack_vector): Use assert, not berror.
14362 * src/main.c (berror): Remove, unused.
14363
14364 2001-12-05 Akim Demaille <akim@epita.fr>
14365
14366 New experimental feature: if --verbose --trace output all the
14367 items of a state, not only its kernel.
14368
14369 * src/print.c (print_core): If `trace_flag', then invoke closure
14370 before outputting the items of the state (print_core is no longer
14371 a correct name them).
14372 (print_results): Invoke new_closure/free_closure if needed.
14373
14374 2001-12-05 Akim Demaille <akim@epita.fr>
14375
14376 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
14377 * src/closure.c, src/closure.h (itemsetsize): Rename as...
14378 (nitemset): for consistency with the rest of the project.
14379
14380 2001-12-05 Akim Demaille <akim@epita.fr>
14381
14382 * src/closure.c (print_closure): Improve.
14383 (closure): Use it for printing input and output.
14384
14385 2001-12-05 Akim Demaille <akim@epita.fr>
14386
14387 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
14388 indexed by nonterminals.
14389
14390 2001-12-05 Akim Demaille <akim@epita.fr>
14391
14392 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
14393 what it was!).
14394 * src/warshall.h: Remove accidental duplication of the content.
14395
14396 2001-12-05 Akim Demaille <akim@epita.fr>
14397
14398 * src/closure.c (set_fderives): De-obfuscate.
14399
14400 2001-12-05 Akim Demaille <akim@epita.fr>
14401
14402 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
14403
14404 2001-12-05 Akim Demaille <akim@epita.fr>
14405
14406 * src/closure.c (set_firsts): De-obfuscate.
14407
14408 2001-12-05 Akim Demaille <akim@epita.fr>
14409
14410 * src/output.c (action_row): De-obfuscate
14411 using the good o' techniques: arrays not pointers, variable
14412 locality, BITISSET, RESETBIT etc.
14413
14414 2001-12-05 Akim Demaille <akim@epita.fr>
14415
14416 Pessimize the code to simplify it: from now on, all the states
14417 have a valid SHIFTS, which NSHIFTS is possibly 0.
14418
14419 * src/LR0.c (shifts_new): Be global and move to..
14420 * src/state.c, src/state.h: here.
14421 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
14422 * src/print_graph: Adjust.
14423
14424 2001-12-05 Akim Demaille <akim@epita.fr>
14425
14426 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
14427 * src/conflicts.c: Use it.
14428 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
14429 incorrectly ``simplified''.
14430
14431 2001-12-05 Akim Demaille <akim@epita.fr>
14432
14433 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
14434 using the good o' techniques: arrays not pointers, variable
14435 locality, BITISSET, RESETBIT etc.
14436
14437 2001-12-05 Akim Demaille <akim@epita.fr>
14438
14439 * src/state.h (SHIFT_SYMBOL): New.
14440 * src/conflicts.c: Use it to deobfuscate.
14441
14442 2001-12-05 Akim Demaille <akim@epita.fr>
14443
14444 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
14445 (print_reductions): De-obfuscate using the good o' techniques:
14446 arrays not pointers, variable locality, BITISSET.
14447
14448 2001-12-05 Akim Demaille <akim@epita.fr>
14449
14450 * src/conflicts.c (print_reductions): Arrays, not pointers.
14451 Use BITISSET.
14452
14453 2001-12-05 Akim Demaille <akim@epita.fr>
14454
14455 * src/conflicts.c (print_reductions): Pessimize, but clarify.
14456
14457 2001-12-05 Akim Demaille <akim@epita.fr>
14458
14459 * src/conflicts.c (print_reductions): Improve variable locality.
14460
14461 2001-12-05 Akim Demaille <akim@epita.fr>
14462
14463 * src/conflicts.c (print_reductions): Pessimize, but clarify.
14464
14465 2001-12-05 Akim Demaille <akim@epita.fr>
14466
14467 * src/conflicts.c (print_reductions): Improve variable locality.
14468
14469 2001-12-05 Akim Demaille <akim@epita.fr>
14470
14471 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
14472 * src/lalr.c: Use them.
14473
14474 2001-12-05 Akim Demaille <akim@epita.fr>
14475
14476 * src/LR0.c (augment_automaton): Formatting changes.
14477 Better variable locality.
14478
14479 2001-12-05 Akim Demaille <akim@epita.fr>
14480
14481 * src/lalr.c (matrix_print): New.
14482 (transpose): Use it.
14483 Use arrays instead of pointers.
14484
14485 2001-12-05 Akim Demaille <akim@epita.fr>
14486
14487 * src/lalr.c (maxrhs): Move to...
14488 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
14489 * src/lalr.c (build_relations): Adjust.
14490
14491 2001-12-05 Akim Demaille <akim@epita.fr>
14492
14493 * src/lalr.c (transpose): Free the memory allocated to the
14494 argument, as it is replaced by the results by the unique caller.
14495 (build_relations): Merely invoke transpose: it handles the memory
14496 deallocation.
14497 Improve variable locality.
14498 Avoid variables used as mere abbreviations.
14499 (compute_lookaheads): Use arrays instead of pointers.
14500
14501 2001-12-05 Akim Demaille <akim@epita.fr>
14502
14503 * src/lalr.c (initialize_F): Improve variable locality.
14504 Avoid variables used as mere abbreviations.
14505
14506 2001-12-05 Akim Demaille <akim@epita.fr>
14507
14508 * src/derives.c (print_derives): Display the ruleno.
14509 * src/lalr.c (initialize_F, transpose): Better variable locality
14510 to improve readability.
14511 Avoid variables used as mere abbreviations.
14512
14513 2001-12-05 Akim Demaille <akim@epita.fr>
14514
14515 * src/lalr.c (traverse): Use arrays instead of pointers.
14516
14517 2001-12-05 Akim Demaille <akim@epita.fr>
14518
14519 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
14520 the handling of squeue.
14521 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
14522
14523 2001-12-05 Akim Demaille <akim@epita.fr>
14524
14525 Because useless nonterminals are now kept alive (instead of being
14526 `destroyed'), we now sometimes examine them, and store information
14527 related to them. Hence we need to know their number, and adjust
14528 memory allocations.
14529
14530 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
14531 static.
14532 * src/LR0.c (allocate_itemsets): The memory allocated to
14533 `symbol_count' was used for two different purpose: once to count
14534 the number of occurrences of each symbol, and later reassigned to
14535 `shift_symbol', containing the symbol that can be shifted from a
14536 given state.
14537 Deobfuscate, i.e., allocate, use and free `symbol_count' here
14538 only, and...
14539 (new_itemsets): Allocate `shift_symbol' here.
14540 (allocate_itemsets): symbol_count includes useless nonterminals.
14541 Make room for them.
14542 (free_storage): Use `free', not `XFREE', for pointers that cannot
14543 be null.
14544
14545 2001-12-05 Akim Demaille <akim@epita.fr>
14546
14547 * src/nullable.c (set_nullable): Deobfuscate the handling of
14548 ritem.
14549 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
14550
14551 2001-12-05 Akim Demaille <akim@epita.fr>
14552
14553 * src/gram.c, src/gram.h (ritem_print): New.
14554 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
14555 (This useless function was defined only to work around VMS linkers
14556 that can't handle compilation units with variables only).
14557 * src/reduce.c (dump_grammar): Use it to trace the construction of
14558 ritem.
14559
14560 2001-12-04 Paul Eggert <eggert@twinsun.com>
14561
14562 * src/bison.simple (union yyalloc): Change member names
14563 to be the same as the stack names.
14564 (yyparse): yyptr is now union yyalloc *, not char *.
14565 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
14566 and may generate better code on some machines.
14567 (yystpcpy): Use prototype if __STDC__ is defined, not just
14568 if __cplusplus is defined.
14569
14570 2001-11-30 Akim Demaille <akim@epita.fr>
14571
14572 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
14573 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
14574 Gettext doesn't compile cleanly, and dies with -Werror.
14575 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
14576 Include WARNING_CFLAGS here.
14577 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
14578 before being defined.
14579
14580 2001-11-27 Paul Eggert <eggert@twinsun.com>
14581
14582 * lib/quotearg.h (quotearg_n, quotearg_n_style):
14583 First arg is int, not unsigned.
14584 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
14585 (SIZE_MAX, UINT_MAX): New macros.
14586 (quotearg_n_options): Abort if N is negative.
14587 Avoid overflow check on hosts where size_t is 64 bits and int
14588 is 32 bits, as overflow is impossible there.
14589 Fix off-by-one typo that caused unnecessary reallocation.
14590
14591 2001-11-29 Paul Eggert <eggert@twinsun.com>
14592
14593 Name space cleanup in generated parser.
14594
14595 * doc/bison.texinfo (Bison Parser): Discuss system headers
14596 and their effect on the user name space.
14597
14598 * src/bison.simple:
14599 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
14600 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
14601 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
14602
14603 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
14604 on user names when possible.
14605
14606 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
14607 Simplify test for whather <alloca.h> exists.
14608
14609 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
14610
14611 (<stdio.h>): Include if YYDEBUG.
14612
14613 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
14614 ! defined (yyoverflow) && ! defined (yymemcpy).
14615
14616 (yymemcpy, yyparse): Rename local variables as needed so that
14617 they all begin with 'yy'.
14618
14619 (yystrlen, yystpcpy): New functions.
14620
14621 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
14622 All uses changed.
14623
14624 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
14625 instead of relying on string.h functions. Use YYSTACK_ALLOC
14626 and YYSTACK_FREE instead of malloc and free.
14627
14628 2001-11-30 Akim Demaille <akim@epita.fr>
14629
14630 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
14631 before their first uses.
14632 (YYBISON, YYPURE): Move to the top of the output.
14633
14634 2001-11-30 Akim Demaille <akim@epita.fr>
14635
14636 * tests/reduce.at (Useless Nonterminals): Fix.
14637
14638 2001-11-30 Akim Demaille <akim@epita.fr>
14639
14640 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
14641 if body instead of `;' to pacify GCC's warnings.
14642
14643 2001-11-30 Akim Demaille <akim@epita.fr>
14644
14645 Instead of mapping the LHS of unused rules to -1, keep the LHS
14646 valid, but flag the rules as invalid.
14647
14648 * src/gram.h (rule_t): `useful' is a new member.
14649 * src/print.c (print_grammar): Adjust.
14650 * src/derives.c (set_derives): Likewise.
14651 * src/reader.c (packgram, reduce_output): Likewise.
14652 * src/reduce.c (reduce_grammar_tables): Likewise.
14653 * tests/reduce.at (Underivable Rules, Useless Rules): New.
14654
14655 2001-11-30 Akim Demaille <akim@epita.fr>
14656
14657 * src/reduce.c (reduce_output): Formatting changes.
14658 * src/print.c (print_results, print_grammar): Likewise.
14659 * tests/regression.at (Rule Line Numbers)
14660 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
14661
14662 2001-11-30 Akim Demaille <akim@epita.fr>
14663
14664 * src/reduce.c (nonterminals_reduce): Instead of throwing away
14665 useless nonterminals, move them at the end of the symbol arrays.
14666 (reduce_output): Adjust.
14667 * tests/reduce.at (Useless Nonterminals): Adjust.
14668
14669 2001-11-30 Akim Demaille <akim@epita.fr>
14670
14671 * src/reduce.c: Various comment/formatting changes.
14672 (nonterminals_reduce): New, extracted from...
14673 (reduce_grammar_tables): here.
14674 (reduce_grammar): Call nonterminals_reduce.
14675
14676 2001-11-29 Paul Eggert <eggert@twinsun.com>
14677
14678 * src/bison.simple (YYSTACK_REALLOC): Remove.
14679 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
14680 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
14681 New macros.
14682 (union yyalloc): New type.
14683 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
14684 an arbitrary restriction on hosts where size_t is wider than int.
14685
14686 (yyparse): Don't dump core if alloca or malloc fails; instead, report
14687 a parser stack overflow. Allocate just one block of memory for all
14688 three stacks, instead of allocating three blocks; this typically is
14689 faster and reduces fragmentation.
14690
14691 Do not limit the number of items in the stack to a value that fits
14692 in 'int', as this is an arbitrary limit on hosts with 64-bit
14693 size_t and 32-bit int.
14694
14695 2001-11-29 Marc Autret <autret_m@epita.fr>
14696
14697 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
14698 of defining YYERROR_VERBOSE.
14699 [AT_DATA]: $4 is now out of C declarations in the prologue.
14700
14701 2001-11-28 Marc Autret <autret_m@epita.fr>
14702
14703 * src/reader.c (parse_dquoted_param): New.
14704 (parse_skel_decl): Use it.
14705 * src/lex.h: Add its prototype.
14706 * src/lex.c (literalchar): Become not static.
14707
14708 2001-11-28 Marc Autret <autret_m@epita.fr>
14709
14710 * src/output.h: And put its extern declaration here.
14711 * src/output.c (error_verbose): Define here.
14712 (prepare): Echo name modification.
14713 * src/getargs.h: Clean its extern declaration.
14714 * src/getargs.c (error_verbose_flag): Remove.
14715 (getargs): Remove case 'e'.
14716 * src/options.c (option_table): 'error-verbose' is now seen as simple
14717 percent option.
14718 Include output.h.
14719
14720 * src/reader.c (read_declarations): Remove case tok_include.
14721 (parse_include_decl): Remove.
14722 * src/lex.h (token_t): Remove tok_include.
14723 * src/options.c (option_table): 'include' is now a simple command line
14724 option.
14725
14726 2001-11-28 Marc Autret <autret_m@epita.fr>
14727
14728 * src/bison.simple: Adjust muscle names.
14729 * src/muscle_tab.c (muscle_init): Also rename the muscles.
14730 * src/output.c (prepare): s/_/-/ for the muscles names.
14731 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
14732
14733 2001-11-28 Marc Autret <autret_m@epita.fr>
14734
14735 * src/bison.simple: Fix debug.
14736 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
14737
14738 2001-11-28 Akim Demaille <akim@epita.fr>
14739
14740 * src/LR0.c (shifts_new): New.
14741 (save_shifts, insert_start_shift, augment_automaton): Use it.
14742
14743 2001-11-28 Akim Demaille <akim@epita.fr>
14744
14745 * src/closure.c (closure): `b' and `ruleno' denote the same value:
14746 keep ruleno only.
14747
14748 2001-11-28 Akim Demaille <akim@epita.fr>
14749
14750 * src/closure.c (closure): Instead of looping over word in array
14751 then bits in words, loop over bits in array.
14752
14753 2001-11-28 Akim Demaille <akim@epita.fr>
14754
14755 * src/closure.c (closure): No longer optimize the special case
14756 where all the bits of `ruleset[r]' are set to 0, to make the code
14757 clearer.
14758
14759 2001-11-28 Akim Demaille <akim@epita.fr>
14760
14761 * src/closure.c (closure): `r' and `c' are new variables, used to
14762 de-obfuscate accesses to RULESET and CORE.
14763
14764 2001-11-28 Akim Demaille <akim@epita.fr>
14765
14766 * src/reduce.c (reduce_print): Use ngettext.
14767 (dump_grammar): Improve the trace accuracy.
14768
14769 2001-11-28 Akim Demaille <akim@epita.fr>
14770
14771 * src/reduce.c (dump_grammar): Don't translate trace messages.
14772
14773 2001-11-28 Akim Demaille <akim@epita.fr>
14774
14775 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
14776 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
14777 as all tags are free'ed afterwards.
14778 From Enrico Scholz.
14779
14780 2001-11-27 Paul Eggert <eggert@twinsun.com>
14781
14782 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
14783 use alloca when we didn't want to, and vice versa.
14784
14785 2001-11-27 Marc Autret <autret_m@epita.fr>
14786
14787 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
14788 initialization.
14789 * src/output.c (prepare): Remove its update.
14790
14791 2001-11-27 Marc Autret <autret_m@epita.fr>
14792
14793 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
14794 Use %error-verbose.
14795
14796 2001-11-27 Marc Autret <autret_m@epita.fr>
14797
14798 * src/bison.simple: Remove YYERROR_VERBOSE using.
14799 Use %%error_verbose.
14800 (yyparse): Likewise.
14801 * src/output.c (prepare): Give its final value.
14802 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
14803 * src/getargs.h: Add its extern declaration.
14804 * src/getargs.c (error_verbose_flag): New int.
14805 (getargs): Update to catch new case.
14806 * src/options.c (option_table): 'error-verbose' is a new option.
14807 (shortopts): Update.
14808
14809 2001-11-27 Akim Demaille <akim@epita.fr>
14810
14811 * src/system.h: Use intl/libgettext.h.
14812 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
14813
14814 2001-11-27 Akim Demaille <akim@epita.fr>
14815
14816 * tests/torture.at (Exploding the Stack Size with Malloc):
14817 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
14818
14819 2001-11-27 Akim Demaille <akim@epita.fr>
14820
14821 * src/files.c: Include error.h.
14822 Reported by Hans Aberg.
14823
14824 2001-11-26 Marc Autret <autret_m@epita.fr>
14825
14826 * src/reader.c (parse_include_decl): New, not yet implemented.
14827 (read_declarations): Add case tok_include.
14828 * src/getargs.h (include): Add its extern definition.
14829 * src/getargs.c (include): New const char *.
14830 (getargs): Add case '-I'.
14831 * src/options.c (option_table): Add include as command line and
14832 percent option.
14833 * src/lex.h (token_t): Add tok_include.
14834
14835 2001-11-26 Akim Demaille <akim@epita.fr>
14836
14837 * src/reader.c (readgram): Make sure rules for mid-rule actions
14838 have a lineno equal to that of their host rule.
14839 Reported by Hans Aberg.
14840 * tests/regression.at (Rule Line Numbers): New.
14841
14842 2001-11-26 Akim Demaille <akim@epita.fr>
14843
14844 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
14845 size_ts.
14846
14847 2001-11-26 Akim Demaille <akim@epita.fr>
14848
14849 * src/complain.c, src/complain.h (error): Remove, provided by
14850 lib/error.[ch].
14851
14852 2001-11-26 Akim Demaille <akim@epita.fr>
14853
14854 * src/reader.c (read_declarations): Don't abort on tok_illegal,
14855 issue an error message.
14856 * tests/regression.at (Invalid %directive): New.
14857 Reported by Hans Aberg.
14858
14859 2001-11-26 Akim Demaille <akim@epita.fr>
14860
14861 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
14862 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14863
14864 2001-11-26 Akim Demaille <akim@epita.fr>
14865
14866 * src/conflicts.c (conflicts_print): Don't complain at all when
14867 there are no reduce/reduce conflicts, and as many shift/reduce
14868 conflicts as expected.
14869 * tests/regression.at (%expect right): Adjust.
14870
14871 2001-11-23 Akim Demaille <akim@epita.fr>
14872
14873 * lib/alloca.c: Update, from fileutils.
14874
14875 2001-11-23 Akim Demaille <akim@epita.fr>
14876
14877 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
14878
14879 2001-11-23 Akim Demaille <akim@epita.fr>
14880
14881 * src/system.h: Include alloca.h.
14882 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
14883
14884 2001-11-23 Akim Demaille <akim@epita.fr>
14885
14886 * src/print_graph.c (print_actions): Remove `rule', unused.
14887 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
14888 pacify GCC's signed < unsigned warnings.
14889 * src/closure.c (itemsetsize): Likewise.
14890 * src/reader.c (symbol_list_new): Static.
14891
14892 2001-11-23 Akim Demaille <akim@epita.fr>
14893
14894 Attaching lineno to buckets is stupid, since only one copy of each
14895 symbol is kept, only the line of the first occurrence is kept too.
14896
14897 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
14898 * src/reader.c (rline_allocated): Remove, unused.
14899 (symbol_list): Have a `line' member.
14900 (symbol_list_new): New.
14901 (readgram): Use it.
14902 * src/print.c (print_grammar): Output the rule line numbers.
14903 * tests/regression.at (Solved SR Conflicts)
14904 (Unresolved SR Conflicts): Adjust.
14905 Reported by Hans Aberg.
14906
14907 2001-11-22 Marc Autret <autret_m@epita.fr>
14908
14909 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
14910
14911 2001-11-22 Marc Autret <autret_m@epita.fr>
14912
14913 * src/muscle_tab.c (muscle_init): Remove initialization of
14914 skeleton muscle.
14915 * src/output.c (output_master_parser): Do it here.
14916
14917 2001-11-20 Akim Demaille <akim@epita.fr>
14918
14919 * po/sv.po: New.
14920 * configure.in (ALL_LINGUAS): Adjust.
14921 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14922 longer contains strings to translate.
14923
14924 2001-11-19 Akim Demaille <akim@epita.fr>
14925
14926 * src/conflicts.c (conflicts_print): Add a missing \n.
14927
14928 2001-11-19 Akim Demaille <akim@epita.fr>
14929
14930 * src/nullable.c (nullable_print): New.
14931 (set_nullable): Call it when tracing.
14932 Better locality of variables.
14933
14934 2001-11-19 Akim Demaille <akim@epita.fr>
14935
14936 * src/print.c (print_actions): Better locality of variables.
14937
14938 2001-11-19 Akim Demaille <akim@epita.fr>
14939
14940 * src/derives.c (print_derives): Fix and enrich.
14941 * src/closure.c (print_fderives): Likewise.
14942
14943 2001-11-19 Akim Demaille <akim@epita.fr>
14944
14945 * src/closure.c (itemsetend): Remove, replaced with...
14946 (itemsetsize): new.
14947
14948 2001-11-19 Akim Demaille <akim@epita.fr>
14949
14950 * src/LR0.c (kernel_end): Remove, replaced with...
14951 (kernel_size): new.
14952
14953 2001-11-19 Akim Demaille <akim@epita.fr>
14954
14955 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14956 to clarify.
14957
14958 2001-11-19 Akim Demaille <akim@epita.fr>
14959
14960 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14961
14962 2001-11-19 Akim Demaille <akim@epita.fr>
14963
14964 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14965 trace messages.
14966 * src/LR0.c: Likewise.
14967 (allocate_itemsets): Use arrays instead of pointers to clarify.
14968
14969 2001-11-19 Akim Demaille <akim@epita.fr>
14970
14971 * src/getargs.c (statistics_flag): Replace with...
14972 (trace_flag): New.
14973 (longopts): Accept --trace instead of --statistics.
14974 * src/getargs.h, src/options.c: Adjust.
14975 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14976 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14977
14978 2001-11-19 Akim Demaille <akim@epita.fr>
14979
14980 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
14981 pointers to clarify the code.
14982 (save_reductions, save_shifts): Factor common parts of alternatives.
14983
14984 2001-11-19 Akim Demaille <akim@epita.fr>
14985
14986 * src/LR0.c (new_state, get_state): Complete TRACE code.
14987 * src/closure.c: Include `reader.h' to get `tags', needed by the
14988 trace code.
14989 Rename the conditional DEBUG as TRACE.
14990 Output consistently TRACEs to stderr, not stdout.
14991 * src/derives.c: Likewise.
14992 * src/reduce.c: (inaccessable_symbols): Using if is better style
14993 than goto.
14994 Use `#if TRACE' instead of `#if 0' for tracing code.
14995
14996 2001-11-19 Akim Demaille <akim@epita.fr>
14997
14998 * src/system.h (LIST_FREE, shortcpy): New.
14999 * src/LR0.c: Use them.
15000 * src/output.c (free_itemsets, free_reductions, free_shifts):
15001 Remove, replaced by LIST_FREE.
15002
15003 2001-11-19 Akim Demaille <akim@epita.fr>
15004
15005 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
15006 (REDUCTIONS_ALLOC): New.
15007 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
15008 allocation.
15009
15010 2001-11-19 Akim Demaille <akim@epita.fr>
15011
15012 * src/LR0.c (new_state): Complete trace code.
15013 * src/nullable.c (set_nullable): Don't translate traces.
15014
15015 2001-11-19 Akim Demaille <akim@epita.fr>
15016
15017 * src/print_graph.c (print_core): Better locality of variables.
15018 * src/print.c (print_core): Likewise.
15019
15020 2001-11-19 Akim Demaille <akim@epita.fr>
15021
15022 * src/vcg.c: You do the output, so you are responsible of the
15023 handling of VCG syntax, in particular: use quotearg.
15024 * src/print_graph.c: Don't.
15025 (print_actions): Don't output the actions as part of the nodes,
15026 since that's the job of the edges.
15027 (print_state): Don't output by hand: fill the node description,
15028 and ask for its output.
15029
15030 2001-11-19 Akim Demaille <akim@epita.fr>
15031
15032 * src/bison.simple (yyparse): When verbosely reporting an error,
15033 no longer put additional quotes around token names.
15034 * tests/calc.at: Adjust.
15035
15036 2001-11-19 Akim Demaille <akim@epita.fr>
15037
15038 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
15039 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
15040 * src/output.c: Adjust.
15041
15042 2001-11-19 Akim Demaille <akim@epita.fr>
15043
15044 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
15045 (rule_t): this.
15046 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
15047
15048 2001-11-19 Akim Demaille <akim@epita.fr>
15049
15050 * src/gram.h (rule_t): New.
15051 (rule_table): New.
15052 (rrhs, rlhs): Remove, part of state_t.
15053 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
15054 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15055 * src/reader.c, src/reduce.c: Adjust.
15056
15057 2001-11-19 Akim Demaille <akim@epita.fr>
15058
15059 * src/reader.c (symbols_output): New, extracted from...
15060 (packsymbols): Here.
15061 (reader): Call it.
15062
15063 2001-11-19 Akim Demaille <akim@epita.fr>
15064
15065 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
15066 (maxrhs): this new function.
15067
15068 2001-11-19 Akim Demaille <akim@epita.fr>
15069
15070 * src/lalr.c (F): New macro to access the variable F.
15071 Adjust.
15072
15073 2001-11-19 Akim Demaille <akim@epita.fr>
15074
15075 * src/lalr.h (LA): New macro to access the variable LA.
15076 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15077 * src/lalr.c: Adjust.
15078
15079 2001-11-19 Akim Demaille <akim@epita.fr>
15080
15081 * src/lalr.c (initialize_LA): Only initialize LA. Let...
15082 (set_state_table): handle the `lookaheads' members.
15083
15084 2001-11-19 Akim Demaille <akim@epita.fr>
15085
15086 * src/lalr.h (lookaheads): Removed array, whose contents is now
15087 a member of...
15088 (state_t): this structure.
15089 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15090 Adjust.
15091
15092 2001-11-19 Akim Demaille <akim@epita.fr>
15093
15094 * src/lalr.h (consistent): Removed array, whose contents is now
15095 a member of...
15096 (state_t): this structure.
15097 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15098 Adjust.
15099
15100 2001-11-19 Akim Demaille <akim@epita.fr>
15101
15102 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
15103 contents are now members of...
15104 (state_t): this structure.
15105 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15106 Adjust.
15107
15108 2001-11-19 Akim Demaille <akim@epita.fr>
15109
15110 * src/lalr.h (state_t): New.
15111 (state_table): Be a state_t * instead of a core **.
15112 (accessing_symbol): Remove, part of state_t.
15113 * src/lalr.c: Adjust.
15114 (set_accessing_symbol): Merge into...
15115 (set_state_table): this.
15116 * src/print_graph.c, src/conflicts.c: Adjust.
15117
15118 2001-11-14 Akim Demaille <akim@epita.fr>
15119
15120 * tests/calc.at, tests/output.at, tests/regression.at,
15121 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
15122 now the tests are run in private dirs, therefore AC_CLEANUP and
15123 family can be simplified to 0-ary.
15124 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
15125 use abs. path to find config.h.
15126 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
15127 stderr, there can be way too much random noise.
15128 Instead pass -Werror to GCC and rely on the exit status.
15129 Reported by Wolfram Wagner.
15130
15131 2001-11-14 Akim Demaille <akim@epita.fr>
15132
15133 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
15134 defined only if yyoverflow is defined, to avoid `warning: unused
15135 variable `yyvs1''.
15136 Reported by The Test Suite.
15137
15138 2001-11-14 Akim Demaille <akim@epita.fr>
15139
15140 * src/print.c: Include reduce.h.
15141 Reported by Hans Aberg.
15142
15143 2001-11-14 Akim Demaille <akim@epita.fr>
15144
15145 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
15146 Revert a previous patch: these are really const.
15147 * src/conflicts.c (conflict_report): Additional useless pair of
15148 braces to pacify GCC's warnings for `if () if () {} else {}'.
15149 * src/lex.c (parse_percent_token): Replace equal_offset with
15150 arg_offset.
15151 arg is const.
15152 Be sure to strdup `arg' when used, since there is no reason for
15153 token_buffer not to change.
15154
15155 2001-11-14 Akim Demaille <akim@epita.fr>
15156
15157 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
15158 definition.
15159 * src/main.c (main): Use them.
15160 Suggested by Hans Aberg.
15161
15162 2001-11-12 Akim Demaille <akim@epita.fr>
15163
15164 * src/system.h (ngettext): Now that we use ngettext, be sure to
15165 provide a default definition when NLS are not used.
15166
15167 2001-11-12 Akim Demaille <akim@epita.fr>
15168
15169 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
15170 Use @kbd to denote user input.
15171 (Language and Grammar): ANSIfy the example.
15172 Adjust its layout for info/notinfo.
15173 (Location Tracking Calc): Output error messages to stderr.
15174 Output locations in a more GNUtically correct way.
15175 Fix a couple of Englishos.
15176 Adjust @group/@end group pairs.
15177
15178 2001-11-12 Akim Demaille <akim@epita.fr>
15179
15180 %expect was not functioning at all.
15181
15182 * src/conflicts.c (expected_conflicts): Set to -1.
15183 (conflict_report): Use ngettext.
15184 (conflicts_print): Check %expect and make its violation an error.
15185 * doc/bison.texinfo (Expect Decl): Adjust.
15186 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
15187 * tests/regression.at (%expect not enough, %expect right)
15188 (%expect too much): New.
15189
15190 2001-11-12 Akim Demaille <akim@epita.fr>
15191
15192 * tests/regression.at (Conflicts): Rename as...
15193 (Unresolved SR Conflicts): this.
15194 (Solved SR Conflicts): New.
15195
15196 2001-11-12 Akim Demaille <akim@epita.fr>
15197
15198 * src/reduce.c (print_results): Rename as...
15199 (reduce_output): This.
15200 Output to OUT, passed as argument, instead of output_obstack.
15201 (dump_grammar): Likewise.
15202 (reduce_free): New.
15203 Also free V1.
15204 (reduce_grammar): No longer call reduce_output, since...
15205 * src/print.c (print_results): do it.
15206 * src/main.c (main): Call reduce_free;
15207
15208 2001-11-12 Akim Demaille <akim@epita.fr>
15209
15210 * src/conflicts.c (print_reductions): Accept OUT as argument.
15211 Output to it, not to output_obstack.
15212 * src/print.c (print_actions): Adjust.
15213
15214 2001-11-12 Akim Demaille <akim@epita.fr>
15215
15216 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
15217 the result instead of using...
15218 (src_total, rrc_total, src_count, rrc_count): Remove.
15219 (any_conflicts): Remove.
15220 (print_conflicts): Split into...
15221 (conflicts_print, conflicts_output): New.
15222 * src/conflicts.h: Adjust.
15223 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
15224 * src/print.c (print_grammar): Issue `\n' between two rules.
15225 * tests/regression.at (Conflicts): New.
15226 Reported by Tom Lane.
15227
15228 2001-11-12 Akim Demaille <akim@epita.fr>
15229
15230 * tests/regression.at (Invalid input): Remove, duplicate with
15231 ``Invalid input: 1''.
15232
15233 2001-11-12 Akim Demaille <akim@epita.fr>
15234
15235 * tests/torture.at (AT_DATA_STACK_TORTURE)
15236 (Exploding the Stack Size with Alloca)
15237 (Exploding the Stack Size with Malloc): New.
15238
15239 2001-11-12 Akim Demaille <akim@epita.fr>
15240
15241 * src/bison.simple (YYSTACK_REALLOC): New.
15242 (yyparse) [!yyoverflow]: Use it and free the old stack.
15243 Reported by Per Allansson.
15244
15245 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
15246
15247 * src/bison.simple: Define type yystype instead of YYSTYPE, and
15248 define CPP macro, which substitute YYSTYPE by yystype.
15249 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
15250 with yyltype/YYLTYPE. This allows inclusion of the generated
15251 header within the parser if the compiler, such as GGC, accepts
15252 multiple equivalent #defines.
15253 From Akim.
15254
15255 2001-11-05 Akim Demaille <akim@epita.fr>
15256
15257 * src/reader.c (symbols_output): New, extracted from...
15258 (packsymbols): here.
15259 (reader): Adjust.
15260
15261 2001-11-05 Akim Demaille <akim@epita.fr>
15262
15263 * src/lex.c (parse_percent_token): s/quotearg/quote/.
15264
15265 2001-11-05 Akim Demaille <akim@epita.fr>
15266
15267 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
15268 pattern.
15269
15270 2001-11-05 Akim Demaille <akim@epita.fr>
15271
15272 * src/options.h (struct option_table_struct): set_flags is void*.
15273 * src/options.c (longopts): Support `--output' and `%output'.
15274 (usage): Adjust.
15275 * src/lex.h (tok_setopt): Remove, replaced with...
15276 (tok_intopt, tok_stropt): these new guys.
15277 * src/lex.c (getopt.h): Not needed.
15278 (token_buffer, unlexed_token_buffer): Not const.
15279 (percent_table): Promote `-' over `_' in directive names.
15280 Active `%name-prefix', `file-prefix', and `output'.
15281 (parse_percent_token): Accept possible arguments to directives.
15282 Promote `-' over `_' in directive names.
15283
15284 2001-11-04 Akim Demaille <akim@epita.fr>
15285
15286 * doc/bison.texinfo (Decl Summary): Split the list into
15287 `directives for grammars' and `directives for bison'.
15288 Sort'em.
15289 Add description of `%name-prefix', `file-prefix', and `output'.
15290 Promote `-' over `_' in directive names.
15291 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
15292 Simplify the description of `--name-prefix'.
15293 Promote `-' over `_' in directive names.
15294 Promote `--output' over `--output-file'.
15295 Fix the description of `--defines'.
15296 * tests/output.at: Exercise %file-prefix and %output.
15297
15298 2001-11-02 Akim Demaille <akim@epita.fr>
15299
15300 * doc/refcard.tex: Update.
15301
15302 2001-11-02 Akim Demaille <akim@epita.fr>
15303
15304 * src/symtab.h (SUNDEF): New.
15305 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
15306 stand for `uninitialized', instead of 0.
15307 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
15308 * src/lex.c (lex): Adjust.
15309
15310 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
15311 Number it 0.
15312 Let yylex return it instead of a plain 0.
15313 Reported by Dick Streefland.
15314
15315 2001-11-02 Akim Demaille <akim@epita.fr>
15316
15317 * tests/regression.at (Mixing %token styles): New test.
15318
15319 2001-11-02 Akim Demaille <akim@epita.fr>
15320
15321 * src/reader.c (parse_thong_decl): Formatting changes.
15322 (token_translations_init): New, extracted from...
15323 (packsymbols): Here.
15324 Adjust.
15325
15326 2001-11-01 Akim Demaille <akim@epita.fr>
15327
15328 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
15329 Check that `9foo.y' produces correct cpp guards.
15330 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
15331 guards.
15332 Reported by Wwp.
15333
15334 2001-11-01 Akim Demaille <akim@epita.fr>
15335
15336 * tests/regression.at (Invalid input: 2): New.
15337 * src/lex.c (unlexed_token_buffer): New.
15338 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
15339 too.
15340 Reported by Wwp.
15341
15342 2001-11-01 Akim Demaille <akim@epita.fr>
15343
15344 * tests/calc.at: Catch up with 1.30.
15345 * configure.in: Bump to 1.49a.
15346 Adjust to newer Autotest.
15347
15348 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
15349
15350 * src/conflicts.c: Move global variables rrc_total and src_total ...
15351 (print_conflicts): here.
15352 * src/output.c (output): Free global variable user_toknums.
15353 * src/lex.c (token_obstack): Become static.
15354
15355 2001-10-18 Akim Demaille <akim@epita.fr>
15356
15357 * tests/atlocal.in (GCC): Add.
15358 * tests/calc.at: s/m4_match/m4_bmatch/.
15359 s/m4_patsubst/m4_bpatsubst/.
15360 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
15361 * configure.in: AC_SUBST(GCC).
15362
15363 2001-10-14 Marc Autret <autret_m@epita.fr>
15364
15365 * src/options.c (create_long_option_table): Fix.
15366
15367 2001-10-10 Akim Demaille <akim@epita.fr>
15368
15369 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
15370
15371 2001-10-04 Akim Demaille <akim@epita.fr>
15372
15373 * src/reader.c (parse_union_decl): Push the caracters in
15374 union_obstack, not attrs_obstack.
15375
15376 2001-10-04 Akim Demaille <akim@epita.fr>
15377
15378 Merge in the branch 1.29.
15379
15380 * src/reader.c (packsymbols): Use a temporary obstack for
15381 `%%tokendef', since output_stack is already used elsewhere.
15382
15383 2001-10-02 Akim Demaille <akim@epita.fr>
15384
15385 Bump 1.29d.
15386
15387 2001-10-02 Akim Demaille <akim@epita.fr>
15388
15389 Version 1.29c.
15390
15391 2001-10-02 Akim Demaille <akim@epita.fr>
15392
15393 * tests/regression.at (Invalid CPP headers): New.
15394 From Alexander Belopolsky.
15395 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
15396
15397 2001-10-02 Akim Demaille <akim@epita.fr>
15398
15399 * tests/regression.at (Invalid input): New.
15400 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
15401 Reported by Shura.
15402
15403 2001-10-02 Akim Demaille <akim@epita.fr>
15404
15405 * tests/calc.at: Now that --debug works, the tests must be adjusted.
15406
15407 2001-10-02 Akim Demaille <akim@epita.fr>
15408
15409 * src/output.c (output_parser): Assert `skeleton'.
15410 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
15411 systems.
15412 From Shura.
15413
15414 2001-10-01 Marc Autret <autret_m@epita.fr>
15415
15416 * src/lex.h: Echo modifications.
15417 * src/lex.c (unlex): Parameter is now token_t.
15418 From Hans Aberg.
15419
15420 2001-10-01 Marc Autret <autret_m@epita.fr>
15421
15422 * src/main.c: Include lex.h.
15423 From Hans Aberg.
15424
15425 2001-09-29 Akim Demaille <akim@epita.fr>
15426
15427 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
15428
15429 2001-09-28 Akim Demaille <akim@epita.fr>
15430
15431 * tests/testsuite.at: Update to newer Autotest.
15432 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
15433
15434 2001-09-27 Akim Demaille <akim@epita.fr>
15435
15436 Position independent wrapper.
15437
15438 * tests/bison: Remove.
15439 * tests/bison.in: New.
15440 * configure.in: Adjust.
15441
15442 2001-09-27 Paul Eggert <eggert@twinsun.com>
15443
15444 Port quotearg fixes from tar 1.13.24.
15445
15446 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
15447 tm to be declared.
15448 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
15449 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
15450
15451 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
15452 * m4/mbrtowc.m4: New file.
15453 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
15454 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
15455
15456 2001-09-27 Akim Demaille <akim@epita.fr>
15457
15458 Bump to 1.29c.
15459
15460 2001-09-27 Akim Demaille <akim@epita.fr>
15461
15462 Version 1.29b.
15463
15464 2001-09-25 Akim Demaille <akim@epita.fr>
15465
15466 * src/system.h: Include `xalloc.h'.
15467 Remove it from the C files.
15468 * src/files.c (output_files): Free the obstacks.
15469 * src/lex.c (init_lex): Rename as...
15470 (lex_init): this.
15471 (lex_free): New.
15472 * src/main.c (main): Use it.
15473
15474 2001-09-24 Marc Autret <autret_m@epita.fr>
15475
15476 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
15477 to output informations in fout (FILE*).
15478 (open_graph, close_graph): Likewise.
15479 (output_graph, output_edge, output_node): Likewise.
15480 * src/vcg.h: Update function prototypes.
15481 * src/print_graph.c (print_graph): Open output graph file.
15482 (print_actions): Adjust.
15483 * src/files.h: Remove extern declaration.
15484 * src/files.c: Remove graph_obstack declaration.
15485 (open_files): Remove graph_obstack initialization.
15486 (output_files): Remove graph_obstack saving.
15487
15488 2001-09-24 Marc Autret <autret_m@epita.fr>
15489
15490 * src/files.c (compute_output_file_names): Fix.
15491
15492 2001-09-24 Marc Autret <autret_m@epita.fr>,
15493 Akim Demaille <akim@epita.fr>
15494
15495 * src/reader.c (reader): Remove call to free_symtab ().
15496 * src/main.c (main): Call it here.
15497 Include symtab.h.
15498 * src/conflicts.c (initialize_conflicts): Rename as...
15499 (solve_conflicts): this.
15500 * src/print.c (print_core, print_actions, print_state)
15501 (print_grammar): Dump to a file instead a `output_obstack'.
15502 (print_results): Dump `output_obstack', and then proceed with the
15503 FILE *.
15504 * src/files.c (compute_output_file_names, close_files): New.
15505 (output_files): Adjust.
15506 * src/main.c (main): Adjust.
15507
15508 2001-09-23 Marc Autret <autret_m@epita.fr>
15509
15510 * src/files.c (compute_header_macro): Computes header macro name
15511 from spec_defines_file when given.
15512
15513 2001-09-23 Marc Autret <autret_m@epita.fr>
15514
15515 * src/files.c (output_files): Add default extensions.
15516
15517 2001-09-22 Akim Demaille <akim@epita.fr>
15518
15519 * src/conflicts.c (finalize_conflicts): Rename as...
15520 (free_conflicts): this.
15521
15522 2001-09-22 Akim Demaille <akim@epita.fr>
15523
15524 * src/gram.c (gram_free): Rename back as...
15525 (dummy): this.
15526 (output_token_translations): Free `token_translations'.
15527 * src/symtab.c (free_symtab): Free the tag field.
15528
15529 2001-09-22 Akim Demaille <akim@epita.fr>
15530
15531 Remove `translations' as it is always set to true.
15532
15533 * src/gram.h: Adjust.
15534 * src/reader.c (packsymbols, parse_token_decl): Adjust
15535 * src/print.c (print_grammar): Adjust.
15536 * src/output.c (output_token_translations): Adjust.
15537 * src/lex.c (lex): Adjust.
15538 * src/gram.c: Be sure the set pointers to NULL.
15539 (dummy): Rename as...
15540 (gram_free): this.
15541
15542 2001-09-22 Akim Demaille <akim@epita.fr>
15543
15544 * configure.in: Invoke AM_LIB_DMALLOC.
15545 * src/system.h: Use dmalloc.
15546 * src/LR0.c: Be sure to have pointers initialized to NULL.
15547 (allocate_itemsets): Allocate kernel_items only if needed.
15548
15549 2001-09-22 Akim Demaille <akim@epita.fr>
15550
15551 * configure.in: Bump to 1.29b.
15552 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
15553 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
15554 need xmalloc.c in calc.y.
15555 From Pascal Bart.
15556
15557 2001-09-21 Akim Demaille <akim@epita.fr>
15558
15559 Version 1.29a.
15560 * Makefile.maint, config/config.guess, config/config.sub,
15561 * config/missing: Update from masters.
15562 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
15563 upon package.m4.
15564 * configure.in (ALL_LINGUAS): Add `tr'.
15565
15566 2001-09-21 Akim Demaille <akim@epita.fr>
15567
15568 * tests/Makefile.am (package.m4): Move to...
15569 ($(srcdir)/$(TESTSUITE)): here.
15570
15571 2001-09-20 Akim Demaille <akim@epita.fr>
15572
15573 * src/complain.c: No longer try to be standalone: use system.h.
15574 Don't assume __STDC__ is defined to 1. Just test if it is defined.
15575 * src/complain.h: Likewise.
15576 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
15577 Remove the unused variable `n'.
15578 From Albert Chin-A-Young.
15579
15580 2001-09-18 Marc Autret <autret_m@epita.fr>
15581
15582 * doc/bison.1: Update.
15583 * doc/bison.texinfo (Bison Options): Update --defines and --graph
15584 descriptions.
15585 (Option Cross Key): Update.
15586 Add --graph.
15587
15588 2001-09-18 Marc Autret <autret_m@epita.fr>
15589
15590 * tests/regression.at: New test (comment in %union).
15591
15592 2001-09-18 Marc Autret <autret_m@epita.fr>
15593
15594 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
15595 do that.
15596 Reported by Keith Browne.
15597
15598 2001-09-18 Marc Autret <autret_m@epita.fr>
15599
15600 * tests/output.at: Add tests for --defines and --graph.
15601
15602 2001-09-18 Marc Autret <autret_m@epita.fr>
15603
15604 * tests/output.at: Removes tests of %{header,src}_extension features.
15605
15606 2001-09-18 Akim Demaille <akim@epita.fr>
15607
15608 * tests/Makefile.am (package.m4): New.
15609 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
15610 (_AT_CHECK_CALC_ERROR): Likewise.
15611 Factor the `, ' part of verbose error messages.
15612
15613 2001-09-18 Marc Autret <autret_m@epita.fr>
15614
15615 * src/getargs.c (longopts): Declare --defines and --graph as options
15616 with optional arguments.
15617 * src/files.h: Add extern declarations.
15618 * src/files.c (spec_graph_file, spec_defines_file): New.
15619 (output_files): Update.
15620 Remove CPP-outed code.
15621
15622 2001-09-18 Marc Autret <autret_m@epita.fr>
15623
15624 Turn off %{source,header}_extension feature.
15625
15626 * src/files.c (compute_exts_from_gf): Update.
15627 (compute_exts_from_src): Update.
15628 (output_files): CPP-out useless code.
15629 * src/files.h: Remove {header,source}_extension extern declarations.
15630 * src/reader.c (parse_dquoted_param): CPP-out.
15631 (parse_header_extension_decl): Remove.
15632 (parse_source_extension_decl): Remove.
15633 (read_declarations): Remove cases tok_{hdrext,srcext}.
15634 * src/lex.c (percent_table): Remove {header,source}_extension entries.
15635 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
15636
15637 2001-09-10 Akim Demaille <akim@epita.fr>
15638
15639 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
15640 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
15641 (AT_CHECK_OUTPUT): this.
15642 Merely check ls' exit status, its output is useless.
15643
15644 2001-09-10 Akim Demaille <akim@epita.fr>
15645
15646 * tests/calc.at: Use m4_match.
15647 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
15648
15649 2001-09-10 Marc Autret <autret_m@epita.fr>,
15650 Akim Demaille <akim@epita.fr>
15651
15652 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
15653 enum color_e.
15654 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
15655 to `normal'.
15656 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
15657 * src/lex.h: Adjust prototype.
15658 (token_t): Add `tok_undef'.
15659 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
15660 (parse_percent_token): Now returns token_t.
15661 Add default statement in switch.
15662 (lex): Separate `c' as an input variable, from the token_t result
15663 part.
15664 (unlexed): Is a token_t.
15665
15666 2001-09-10 Akim Demaille <akim@epita.fr>
15667
15668 * configure.in: Bump to 1.29a.
15669
15670 2001-09-07 Akim Demaille <akim@epita.fr>
15671
15672 Version 1.29.
15673
15674 2001-08-30 Akim Demaille <akim@epita.fr>
15675
15676 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
15677 * m4/atconfig.m4: Remove.
15678 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
15679 * tests/bison: New.
15680 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
15681 m4_if, m4_patsubst, and m4_regexp.
15682 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
15683 `input' file instead of echo.
15684
15685 2001-08-29 Akim Demaille <akim@epita.fr>
15686
15687 Bump to 1.28e.
15688
15689 2001-08-29 Akim Demaille <akim@epita.fr>
15690
15691 Version 1.28d.
15692
15693 2001-08-29 Paul Eggert <eggert@twinsun.com>
15694
15695 * src/bison.simple (yyparse): Don't take the address of an
15696 item before the start of an array, as that doesn't conform to
15697 the C Standard.
15698
15699 2001-08-29 Robert Anisko <anisko_r@epita.fr>
15700
15701 * doc/bison.texinfo (Location Tracking Calc): New node.
15702
15703 2001-08-29 Paul Eggert <eggert@twinsun.com>
15704
15705 * src/output.c (output): Do not define const, as this now
15706 causes more problems than it cures.
15707
15708 2001-08-29 Akim Demaille <akim@epita.fr>
15709
15710 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
15711 the nodes.
15712 Be sure to tag the `detailmenu'.
15713
15714 2001-08-29 Akim Demaille <akim@epita.fr>
15715
15716 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
15717 download in a tmp dir.
15718
15719 2001-08-28 Marc Autret <autret_m@epita.fr>
15720
15721 * config/depcomp: New file.
15722
15723 2001-08-28 Marc Autret <autret_m@epita.fr>
15724
15725 * doc/bison.1 (mandoc): Adjust.
15726 From Juan Manuel Guerrero.
15727
15728 2001-08-28 Marc Autret <autret_m@epita.fr>
15729
15730 * src/print_graph.c (print_state): Fix.
15731
15732 2001-08-27 Marc Autret <autret_m@epita.fr>
15733
15734 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
15735 char * members.
15736 Echo modifications to the functions prototypes.
15737 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
15738
15739 2001-08-27 Marc Autret <autret_m@epita.fr>
15740
15741 * src/vcg.c: Include `xalloc.h'.
15742 (add_colorentry): New.
15743 (add_classname): New.
15744 (add_infoname): New.
15745 * src/vcg.h: Add new prototypes.
15746
15747 2001-08-27 Akim Demaille <akim@epita.fr>
15748
15749 * Makefile.maint: Sync. again with CVS Autoconf.
15750
15751 2001-08-27 Akim Demaille <akim@epita.fr>
15752
15753 * Makefile.maint: Formatting changes.
15754 (po-update, cvs-update, update): New targets.
15755 (AMTAR): Remove.
15756
15757 2001-08-27 Akim Demaille <akim@epita.fr>
15758
15759 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15760 * Makefile.maint: Sync. with CVS Autoconf.
15761
15762 2001-08-27 Marc Autret <autret_m@epita.fr>
15763
15764 * src/vcg.h (struct infoname_s): New.
15765 (struct colorentry_s): New.
15766 (graph_s): New fields {vertical,horizontal}_order in structure.
15767 Add `infoname' field.
15768 Add `colorentry' field;
15769 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
15770 (G_HORIZONTAL_ORDER): New.
15771 (G_INFONAME): New.
15772 (G_COLORENTRY): New.
15773 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
15774 Add output of `infoname'.
15775 Add output of `colorentry'.
15776
15777 2001-08-27 Marc Autret <autret_m@epita.fr>
15778
15779 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
15780 This one shadowed a global parameter.
15781
15782 2001-08-24 Marc Autret <autret_m@epita.fr>
15783
15784 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
15785 instead of `unsigned'.
15786 (print_state): Do not call obstack_object_size () in obstack_grow ()
15787 to avoid macro variables shadowing.
15788
15789 2001-08-23 Marc Autret <autret_m@epita.fr>
15790
15791 * src/lex.c (percent_table): Typo: s/naem/name/.
15792 Add graph option.
15793 Normalize new options declarations.
15794
15795 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
15796
15797 * tests/suite.at: Exercise %header_extension and %source_extension.
15798
15799 2001-08-16 Marc Autret <autret_m@epita.fr>
15800
15801 * src/reader.c (parse_dquoted_param): New.
15802 (parse_header_extension_decl): Use it.
15803 (parse_source_extension_decl): Likewise.
15804
15805 2001-08-16 Marc Autret <autret_m@epita.fr>
15806
15807 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
15808 (get_xxxx_str): Use assert () instead of complain ().
15809 Remove return invokations in default cases.
15810 (get_decision_str): Modify default behaviour. Remove second argument.
15811 Echo modifications on calls.
15812 (output_graph): Fix.
15813
15814 2001-08-16 Marc Autret <autret_m@epita.fr>
15815
15816 * src/getargs.c (usage): Update with ``-g, --graph''.
15817
15818 2001-08-16 Marc Autret <autret_m@epita.fr>
15819
15820 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
15821 (Option Cross Key): Likewise.
15822 * doc/bison.1: Update.
15823
15824 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
15825
15826 * src/output.c (output_master_parser): Don't finish action_obstack.
15827 (output_parser): Don't care about the muscle action, here.
15828 (prepare): Copy the action_obstack in the action muscle.
15829 (output): Free action_obstack.
15830
15831 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15832
15833 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
15834 will contain `%union' declaration.
15835 (parse_union_decl): Delete #line directive output.
15836 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
15837 informations about %union.
15838 (parse_union_decl): Copy the union_obstack in the muscle stype.
15839 * src/bison.simple: Add new #line directive.
15840 Add typdef %%stype YYSTYPE.
15841
15842 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15843
15844 * src/bison.simple: Add new `#line' directive.
15845
15846 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
15847
15848 * src/bison.simple: New `#line' directive.
15849 * src/output.c (output_parser): Support new dynamic muscle input_line.
15850
15851 2001-09-22 Marc Autret <autret_m@epita.fr>
15852
15853 * src/output.c (output_master_parser): New.
15854 (output_parser): Be more re-entrant.
15855
15856 2001-09-21 Marc Autret <autret_m@epita.fr>
15857
15858 * src/reader.c (copy_definition, parse_union_decl): Update and use
15859 `linef' muscle.
15860 (copy_action): Likewise.
15861 Use obstack_1grow ().
15862 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
15863
15864 2001-09-21 Marc Autret <autret_m@epita.fr>
15865
15866 * src/options.c (option_table): Adjust.
15867 * src/lex.c (parse_percent_token): Fix.
15868
15869 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15870
15871 * src/options.c (symtab.h): Include it, need by lex.h.
15872
15873 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15874
15875 * src/lex.c (parse_percent_token): Change type of variable `tx', which
15876 is now an option_table_struct*.
15877 (option_strcmp): New function option_strcmp.
15878 (parse_percent_token): Call option_strcmp.
15879 * src/getargs.c (xalloc.h, options.h): Include it.
15880 (getargs): Call create_long_option_table.
15881 (getargs): Free longopts at the end of the function.
15882 (shortopts): Move in options.c.
15883 * src/options.c (create_long_option_table): New function. Convert
15884 information from option_table to option structure.
15885 * src/reader.c (options.h): Include it.
15886
15887 * src/Makefile.am: Adjust.
15888 * src/options.c (option_table): Create from longopts and percent_table.
15889 * src/getargs.c (longopts): Delete.
15890 * src/lex.c (struct percent_table_struct): Delete.
15891 (percent_table): Delete.
15892 (options.h): Include it.
15893 * src/options.c: Create.
15894 * src/options.h: Create.
15895 Declare enum opt_access_e.
15896 Define struct option_table_struct.
15897
15898 2001-09-20 Marc Autret <autret_m@epita.fr>
15899
15900 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
15901 sections of Bison.
15902
15903 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
15904
15905 * src/bison.simple: s/%%filename/%%skeleton.
15906 * src/muscle_tab.c (getargs.h): Include it.
15907 (muscle_init): Insert new muscle skeleton.
15908
15909 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
15910
15911 * src/output.c (output_parser): Delete unused variable actions_dumped.
15912
15913 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
15914
15915 * src/output.c (output): Delete call to reader_output_yylsp.
15916 * src/reader.c (reader): Likewise.
15917 * src/reader.h: Delete declaration of reader_output_yylsp.
15918
15919 2001-09-02 Marc Autret <autret_m@epita.fr>
15920
15921 * src/reader.c: Include muscle_tab.h.
15922 (parse_union_decl): Update.
15923 (parse_macro_decl): Rename parse_muscle_decl.
15924 Update to use renamed functions and variable.
15925 (read_declarations, copy_action, read_additionnal_code, : Updated
15926 with correct variables and functions names.
15927 (packsymbols, reader): Likewise.
15928
15929 * src/reader.h (muscle_obstack): Extern declaration update.
15930
15931 * src/output.c: Include muscle_tab.h
15932 In all functions using macro_insert, change by using muscle_insert ().
15933 (macro_obstack): Rename muscle_obstack.
15934 Echo modifications in the whole file.
15935 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15936 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15937 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15938
15939 * src/muscle_tab.h: Update double inclusion macros.
15940 (macro_entry_s): Rename muscle_entry_s.
15941 Update prototypes.
15942
15943 * src/muscle_tab.c: Include muscle_tab.h.
15944 Rename macro_tabble to muscle_table.
15945 (mhash1, mhash2, mcmp): Use muscle_entry.
15946 (macro_init): Rename muscle_init. Update.
15947 (macro_insert): Rename muscle_insert. Update.
15948 (macro_find): Rename muscle_find. Update.
15949
15950 * src/main.c: Include muscle_tab.h.
15951 (main): Call muscle_init ().
15952 * src/Makefile.am (bison_SOURCES): Echo modifications.
15953
15954 2001-09-02 Marc Autret <autret_m@epita.fr>
15955
15956 Now the files macro_tab.[ch] are named muscle_tab.[ch].
15957
15958 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15959
15960 2001-09-02 Marc Autret <autret_m@epita.fr>
15961
15962 * src/macrotab.c, src/macrotab.h: Remove.
15963
15964 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
15965
15966 * src/reader.c (copy_guard): Use muscle to specify the `#line'
15967 filename.
15968
15969 2001-09-01 Marc Autret <autret_m@epita.fr>
15970
15971 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15972 to an explicit value to activate the feature. We do it here.
15973
15974 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15975
15976 * src/output.c (prepare): Delete the `filename' muscule insertion.
15977 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15978 (parse_union_decl): Likewise.
15979 * src/macrotab.c (macro_init): Initialize filename by infile.
15980
15981 2001-08-31 Marc Autret <autret_m@epita.fr>
15982
15983 * src/bison.simple (YYLSP_NEEDED): New definition.
15984 * src/output.c (prepare): Add macro insertion of `locations_flag'
15985
15986 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15987
15988 * src/output.c (prepare): Delete insertion of previous muscles,
15989 and insert the `prefix' muscles.
15990 * src/macrotab.c (macro_init): Likewise.
15991 (macro_init): Initialization prefix directive by `yy'.
15992 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
15993 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15994 yylval, yydebug, yyerror, yynerrs and yyparse.
15995 New directive `#define' to substitute yydebug, ... with option
15996 name_prefix.
15997
15998 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15999
16000 * src/main.c (main): Standardize.
16001 * src/output.c (output_table_data, output_parser): Likewise.
16002 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
16003
16004 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
16005
16006 * src/reader.c (read_additionnal_code): Rename %%user_code to
16007 %%epilogue.
16008 * src/output.c (output): Rename %%declarations to %%prologue.
16009 * src/bison.simple: Echo modifications.
16010
16011 2001-08-31 Marc Autret <autret_m@epita.fr>
16012
16013 * src/reader.c (readgram): CleanUp.
16014 (output_token_defines): Likewise.
16015 (packsymbols): Likewise.
16016 (reader): Likewise.
16017 * src/output.c (output): CPP-out useless code.
16018
16019 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
16020
16021 * src/reader.c (reader): Delete obsolete call to function
16022 output_trailers and output_headers.
16023 * src/output.h: Remove obsolete functions prototypes of output_headers
16024 and output_trailers.
16025
16026 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
16027
16028 * src/main.c: Include macrotab.h.
16029 * src/macrotab.h (macro_entry_s): Constify fields.
16030 Adjust functions prototypes.
16031 * src/macrotab.c (macro_insert): Constify key and value.
16032 (macro_find): Constify key.
16033 (macro_insert): Include 'xalloc.h'
16034 (macro_insert): Use XMALLOC.
16035 (macro_find): Constify return value.
16036 * src/output.c (output_table_data): Rename table to table_data.
16037 (output_parser): Constify macro_key, macro_value.
16038
16039 2001-08-30 Marc Autret <autret_m@epita.fr>
16040
16041 * src/reader.c (parse_skel_decl): New.
16042 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
16043 * src/lex.h (token_t): New token `tok_skel'.
16044 * src/lex.c (percent_table): Add skeleton option entry.
16045 Standardize.
16046
16047 2001-08-29 Marc Autret <autret_m@epita.fr>
16048
16049 * src/bison.simple: Add %%user_code directive at the end.
16050 * src/reader.c (read_additionnal_code): New.
16051 (reader): Use it.
16052 * src/output.c (output_program): Remove.
16053 (output): Update.
16054
16055 2001-08-28 Marc Autret <autret_m@epita.fr>
16056
16057 * src/output.c (output_actions): Clean up.
16058 (output_gram): CPP-out useless code.
16059 * src/reader.c (reader): Clean up, CPP-out useless code.
16060
16061 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
16062
16063 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
16064 directive.
16065 * src/bison.simple: Add `%%definitions'.
16066
16067 2001-08-28 Marc Autret <autret_m@epita.fr>
16068
16069 * config/depcomp: New file.
16070
16071 2001-08-27 Paul Eggert <eggert@twinsun.com>
16072
16073 * src/bison.simple (yyparse): Don't take the address of an
16074 item before the start of an array, as that doesn't conform to
16075 the C Standard.
16076
16077 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
16078
16079 * src/output.c (output): Remove the initialization of the macro
16080 obstack. It was done too late here.
16081
16082 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
16083 completely wrong.
16084 (reader): Initialize the macro obstack here, since we need it to grow
16085 '%define' directives.
16086
16087 * src/reader.h: Declare the macro obstack as extern.
16088
16089 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
16090
16091 * src/output.c (output_parser): Fix. Store single '%' characters in
16092 the output obstack instead of throwing them away.
16093
16094 2001-08-27 Akim Demaille <akim@epita.fr>
16095
16096 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
16097
16098 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16099
16100 * lib/Makefile.am: Adjust.
16101
16102 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16103
16104 * src/bison.simple: Update and add '%%' directives.
16105
16106 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16107
16108 * src/reader.c (reader): Remove calls to 'output_headers' and
16109 'output_trailers'. Remove some C output.
16110 (readgram): Disable a piece of code that was writing a default
16111 definition for 'YYSTYPE'.
16112 (reader_output_yylsp): Remove.
16113 (packsymbols): Output token defintions to a macro.
16114 (copy_definition): Disable C output.
16115
16116 * src/reader.c (parse_macro_decl): New function used to parse macro
16117 declarations.
16118 (copy_string2): Put the body of copy_string into this new function.
16119 Add a parameter to let the caller choose whether he wants to copy the
16120 string delimiters or not.
16121 (copy_string): Be a simple call to copy_string2 with the last argument
16122 bound to true.
16123 (read_declarations): Add case for macro definition.
16124 (copy_identifier): New.
16125 (parse_macro_decl): Read macro identifiers using copy_identifier
16126 rather than lex.
16127
16128 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16129
16130 * src/output.c (prepare): Add prefixed names.
16131 (output_parser): Output semantic actions.
16132 (output_parser): Fix bug on '%%line' directives.
16133
16134 * src/output.c (output_headers): Remove. The C code printed by this
16135 function should now be in the skeletons.
16136 (output_trailers): Remove.
16137 (output): Disable call to 'reader_output_yylsp'.
16138 (output_rule_data): Do not output tables to the table obstack.
16139
16140 * src/output.c: Remove some C dedicated output.
16141 Improve the use of macro and output obstacks.
16142 (output_defines): Remove.
16143
16144 * src/output.c (output_token_translations): Associate 'translate'
16145 table with a macro. No output to the table obstack.
16146 (output_gram): Same for 'rhs' and 'prhs'.
16147 (output_stos): Same for 'stos'.
16148 (output_rule_data): Same for 'r1' and 'r2'.
16149 (token_actions): Same for 'defact'.
16150 (goto_actions): Same for 'defgoto'.
16151 (output_base): Same for 'pact' and 'pgoto'.
16152 (output_table): Same for 'table'.
16153 (output_check): Same for 'check'.
16154
16155 * src/output.c (output_table_data): New function.
16156 (output_short_table): Remove.
16157 (output_short_or_char_table): Remove.
16158
16159 * src/output.c (output_parser): Replace most of the skeleton copy code
16160 with something new. Skeletons are now processed character by character
16161 rather than line by line, and Bison looks for '%%' macros. This is the
16162 first step in making Bison's output process (a lot) more flexible.
16163 (output_parser): Use the macro table.
16164
16165 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16166
16167 * src/main.c (main): Initialize the macro table.
16168
16169 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16170
16171 * src/lex.c (percent_table): Add tok_define.
16172 * src/lex.h: Add tok_define.
16173
16174 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16175
16176 * src/macrotab.c: New file.
16177 * src/macrotab.h: New file.
16178 * src/Makefile.am: Update.
16179
16180 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16181
16182 * lib/hash.c: New file.
16183 * lib/hash.h: New file.
16184 * lib/Makefile.am: Update.
16185
16186 2001-08-15 Akim Demaille <akim@epita.fr>
16187
16188 Version 1.28c.
16189
16190 2001-08-15 Marc Autret <autret_m@epita.fr>
16191
16192 * src/reader.c (readgram): Indent output macro YYSTYPE.
16193 (packsymbols): Likewise.
16194 (output_token_defines): Likewise.
16195 * src/files.c: Standardize.
16196 (compute_header_macro): New.
16197 (defines_obstack_save): New. Use compute_header_macro.
16198 (output_files): Update. Use defines_obstack_save.
16199
16200 2001-08-15 Akim Demaille <akim@epita.fr>
16201
16202 * doc/bison.texinfo (Table of Symbols): Document
16203 YYSTACK_USE_ALLOCA.
16204
16205 2001-08-15 Akim Demaille <akim@epita.fr>
16206
16207 * missing: Update from CVS Automake.
16208 * config/config.guess, config/config.sub, config/texinfo.tex:
16209 Update from gnu.org.
16210
16211 2001-08-15 Akim Demaille <akim@epita.fr>
16212
16213 * Makefile.maint: Sync with CVS Autoconf.
16214
16215 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
16216
16217 * doc/bison.texinfo: Include GNU Free Documentation License from
16218 `fdl.texi'.
16219 * doc/fdl.texi: Add to package.
16220
16221 2001-08-14 Marc Autret <autret_m@epita.fr>
16222
16223 Turn on %{source,header}_extension features.
16224
16225 * src/lex.c (percent_table): Un-CPP out header_extension and
16226 source_extension.
16227 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
16228 (compute_exts_from_src): Remove conditions. It restores priorities
16229 between options.
16230
16231 2001-08-14 Marc Autret <autret_m@epita.fr>
16232
16233 * src/files.c (compute_base_names): Add extensions computing when
16234 `--file-prefix' used.
16235 Standardize function calls.
16236
16237 2001-08-13 Marc Autret <autret_m@epita.fr>
16238
16239 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
16240 defining it (defined but null disables alloca).
16241
16242 2001-08-13 Marc Autret <autret_m@epita.fr>
16243
16244 * src/bison.simple (_yy_memcpy): CPP reformat.
16245
16246 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
16247
16248 * tests/atconfig.in (CPPFLAGS): Fix.
16249
16250 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
16251
16252 * doc/bison.texinfo: Include GNU General Public License from
16253 `gpl.texi'.
16254 * doc/gpl.texi: Add to package.
16255
16256 2001-08-10 Marc Autret <autret_m@epita.fr>
16257
16258 * src/print_graph.h: Fix.
16259 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
16260
16261 2001-08-10 Akim Demaille <akim@epita.fr>
16262
16263 * src/system.h: Provide default declarations for stpcpy, strndup,
16264 and strnlen.
16265
16266 2001-08-10 Robert Anisko <anisko_r@epita.fr>
16267
16268 * doc/bison.texinfo (Locations): Update @$ stuff.
16269
16270 2001-08-09 Robert Anisko <anisko_r@epita.fr>
16271
16272 * src/bison.simple (YYLLOC_DEFAULT): Update.
16273 (yyparse): Adjust.
16274
16275 2001-08-08 Marc Autret <autret_m@epita.fr>
16276
16277 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
16278 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
16279 Reported by Fabrice Bauzac.
16280
16281 2001-08-08 Marc Autret <autret_m@epita.fr>
16282
16283 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
16284 * src/vcg.c (output_node): Fix.
16285 * src/vcg.h: Cleanup.
16286 * src/print_graph.c: Add comments.
16287 (node_output_size): New global variable. Simplify the formatting of
16288 the VCG graph output.
16289 (print_actions): Unused code is now used. It notifies the final state
16290 and no action states in the VCG graph. It also give the reduce actions.
16291 The `shift and goto' edges are red and the `go to state' edges are
16292 blue.
16293 Get the current node name and node_obstack by argument.
16294 (node_obstack): New variable.
16295 (print_state): Manage node_obstack.
16296 (print_core): Use node_obstack given by argument.
16297 A node is not only computed here but in print_actions also.
16298 (print_graph): CPP out useless code instead of commenting it.
16299
16300 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
16301
16302 * tests/atconfig.in (CPPFLAGS): Fix.
16303
16304 2001-08-07 Akim Demaille <akim@epita.fr>
16305
16306 * src/print_graph.c (quote): New.
16307 (print_core): Use it.
16308
16309 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
16310
16311 * src/vcg.c (complain.h): Include it.
16312 Unepitaize `return' invocations.
16313 [NDEBUG] (main): Remove.
16314 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
16315 * src/files.c (open_files): Initialize graph_obstack.
16316 * src/print_graph.c (print_actions): CPP out useless code.
16317 (print_core): Don't output the last `\n' in labels.
16318 Use `quote'.
16319 * src/files.c (output_files): Output the VCG file.
16320 * src/main.c (main): Invoke print_graph ();
16321
16322 2001-08-06 Marc Autret <autret_m@epita.fr>
16323
16324 Automaton VCG graph output.
16325 Using option ``-g'' or long option ``--graph'', you can generate
16326 a gram_filename.vcg file containing a VCG description of the LALR (1)
16327 automaton of your grammar.
16328
16329 * src/main.c: Call to print_graph() function.
16330 * src/getargs.h: Update.
16331 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
16332 (graph_flag): New flag.
16333 (longopts): Update.
16334 (getargs): Add case `g'.
16335 * src/files.c (graph_obstack): New obstack struct.
16336 (open_files): Initialize new obstack.
16337 (output_files): Saves graph_obstack if required.
16338 * src/files.h (graph_obstack): New extern declaration.
16339 * src/Makefile.am: Add new source files.
16340
16341 2001-08-06 Marc Autret <autret_m@epita.fr>
16342
16343 * src/print_graph.c, src/print_graph.h (graph): New.
16344 * src/vcg.h: New file.
16345 * src/vcg.c: New file, VCG graph handling.
16346
16347 2001-08-06 Marc Autret <autret_m@epita.fr>
16348
16349 Add of %source_extension and %header_extension which specify
16350 the source or/and the header output file extension.
16351
16352 * src/files.c (compute_base_names): Remove initialisation of
16353 src_extension and header_extension.
16354 (compute_exts_from_gf): Update.
16355 (compute_exts_from_src): Update.
16356 (output_files): Update.
16357 * src/reader.c (parse_header_extension_decl): New.
16358 (parse_source_extension_decl): New.
16359 (read_declarations): New case statements for the new tokens.
16360 * src/lex.c (percent_table): Add entries for %source_extension
16361 and %header_extension.
16362 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
16363
16364 2001-08-06 Marc Autret <autret_m@epita.fr>
16365
16366 * configure.in: Bump to 1.28c.
16367 * doc/bison.texinfo: Texinfo thingies.
16368
16369 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
16370
16371 * tests/atconfig.in (CPPFLAGS): Add.
16372 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
16373
16374 2001-08-03 Akim Demaille <akim@epita.fr>
16375
16376 Version 1.28b.
16377
16378 2001-08-03 Akim Demaille <akim@epita.fr>
16379
16380 * tests/Makefile.am (check-local): Ship testsuite.
16381 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
16382 Include `string.h'.
16383
16384 2001-08-03 Akim Demaille <akim@epita.fr>
16385
16386 * configure.in: Try using -Wformat when compiling.
16387
16388 2001-08-03 Akim Demaille <akim@epita.fr>
16389
16390 * configure.in: Bump to 1.28b.
16391
16392 2001-08-03 Akim Demaille <akim@epita.fr>
16393
16394 * src/complain.c: Adjust strerror_r portability issues.
16395
16396 2001-08-03 Akim Demaille <akim@epita.fr>
16397
16398 Version 1.28a.
16399
16400 2001-08-03 Akim Demaille <akim@epita.fr>
16401
16402 * src/getargs.c, src/getarg.h (skeleton)): Constify.
16403 * src/lex.c (literalchar): Avoid name clashes on `buf'.
16404 * src/getargs.c: Include complain.h.
16405 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
16406 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
16407
16408 2001-08-03 Akim Demaille <akim@epita.fr>
16409
16410 * src/reader.c (readgram): Display hidden chars in error messages.
16411
16412 2001-08-03 Akim Demaille <akim@epita.fr>
16413
16414 Update to gettext 0.10.39.
16415
16416 2001-08-03 Akim Demaille <akim@epita.fr>
16417
16418 * lib/strspn.c: New.
16419
16420 2001-08-01 Marc Autret <autret_m@epita.fr>
16421
16422 * doc/bison.texinfo: Update.
16423 * doc/bison.1 (mandoc): Update.
16424 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
16425 * src/files.c: Support output files extensions computing.
16426 (src_extension): New static variable.
16427 (header_extension): New static variable.
16428 (tr): New function.
16429 (get_extension_index): New function, gets the index of an extension
16430 filename in a string.
16431 (compute_exts_from_gf): New function, computes extensions from the
16432 grammar file extension.
16433 (compute_exts_from_src): New functions, computes extensions from the
16434 C source file extension, file given by ``-o'' option.
16435 (compute_base_names): Update.
16436 (output_files): Update.
16437
16438 2001-08-01 Robert Anisko <anisko_r@epita.fr>
16439
16440 * doc/bison.texi: Document @$.
16441 (Locations): New section.
16442
16443 2001-07-18 Akim Demaille <akim@epita.fr>
16444
16445 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
16446 * config/prev-version.txt, config/move-if-change: New.
16447 * Makefile.am: Adjust.
16448
16449 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
16450
16451 * src/bison.simple (yyparse): Suppress warning `comparaison
16452 between signed and unsigned'.
16453
16454 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
16455
16456 * src/getargs.h (raw_flag): Remove.
16457 * src/getargs.c: Die on `-r'/`--raw'.
16458 * src/lex.c (parse_percent_token): Die on `%raw'.
16459 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
16460 * tests/calc.at: Suppress test with option `--raw'.
16461
16462 2001-07-14 Akim Demaille <akim@epita.fr>
16463
16464 * config/: New.
16465 * configure.in: Require Autoconf 2.50.
16466 Update to gettext 0.10.38.
16467
16468 2001-03-16 Akim Demaille <akim@epita.fr>
16469
16470 * doc/bison.texinfo: ANSIfy the examples.
16471
16472 2001-03-16 Akim Demaille <akim@epita.fr>
16473
16474 * getargs.c (skeleton): New variable.
16475 (longopts): --skeleton is a new option.
16476 (shortopts, getargs): -S is a new option.
16477 * getargs.h: Declare skeleton.
16478 * output.c (output_parser): Use it.
16479
16480 2001-03-16 Akim Demaille <akim@epita.fr>
16481
16482 * m4/strerror_r.m4: New.
16483 * m4/error.m4: Run AC_FUNC_STRERROR_R.
16484 * lib/error.h, lib/error.c: Update.
16485
16486 2001-03-16 Akim Demaille <akim@epita.fr>
16487
16488 * src/getargs.c (longopts): Clean up.
16489
16490 2001-02-21 Akim Demaille <akim@epita.fr>
16491
16492 * src/reader.c (gensym): `gensym_count' is your own.
16493 Use a static buf to create the symbol name, as token_buffer is no
16494 longer a buffer.
16495
16496 2001-02-08 Akim Demaille <akim@epita.fr>
16497
16498 * src/conflicts.c (conflict_report): Be sure not to append to res
16499 between two calls, which could happen if both first sprintf were
16500 skipped, but not the first cp += strlen.
16501
16502 2001-02-08 Akim Demaille <akim@epita.fr>
16503
16504 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
16505 New, from fileutils 4.0.37.
16506 * configure.in: Require Autoconf 2.49c. I took some time before
16507 making this decision. This is the only way out for portability
16508 issues in Bison, it would mean way too much duplicate effort to
16509 import in Bison features implemented in 2.49c since 2.13.
16510 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
16511
16512 2001-02-02 Akim Demaille <akim@epita.fr>
16513
16514 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
16515 * lib/xalloc.h, lib/xmalloc.c: Update.
16516
16517 2001-01-19 Akim Demaille <akim@epita.fr>
16518
16519 Get rid of the ad hoc handling of token_buffer in the scanner: use
16520 the obstacks.
16521
16522 * src/lex.c (token_obstack): New.
16523 (init_lex): Initialize it. No longer call...
16524 (grow_token_buffer): this. Remove it.
16525 Adjust all the places which used it to use the obstack.
16526
16527 2001-01-19 Akim Demaille <akim@epita.fr>
16528
16529 * src/lex.h: Rename all the tokens:
16530 s/\bENDFILE\b/tok_eof/g;
16531 s/\bIDENTIFIER\b/tok_identifier/g;
16532 etc.
16533 Let them be enums, not #define, to ease debugging.
16534 Adjust all the code.
16535
16536 2001-01-18 Akim Demaille <akim@epita.fr>
16537
16538 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
16539 * src/lex.c (maxtoken, grow_token_buffer): Static.
16540
16541 2001-01-18 Akim Demaille <akim@epita.fr>
16542
16543 Since we now use obstacks, more % directives can be enabled.
16544
16545 * src/lex.c (percent_table): Also accept `%yacc',
16546 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
16547 `%debug'.
16548 Handle the actions for `%semantic_parser' and `%pure_parser' here,
16549 instead of returning a token.
16550 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
16551 * src/reader.c (read_declarations): Adjust.
16552 * src/files.c (open_files): Don't call `compute_base_names', don't
16553 compute `attrsfile' since they depend upon data which might be
16554 *in* the input file now.
16555 (output_files): Do it here.
16556 * src/output.c (output_headers): Document the fact that this patch
16557 introduces a guaranteed SEGV for semantic parsers.
16558 * doc/bison.texinfo: Document them.
16559 * tests/suite.at: Exercise these %options.
16560
16561 2000-12-20 Akim Demaille <akim@epita.fr>
16562
16563 Also handle the output file (--verbose) with obstacks.
16564
16565 * files.c (foutput): Remove.
16566 (output_obstack): New.
16567 Adjust all dependencies.
16568 * src/conflicts.c: Return a string.
16569 * src/system.h (obstack_grow_string): Rename as...
16570 (obstack_sgrow): this. Be ready to work with non literals.
16571 (obstack_fgrow4): New.
16572
16573 2000-12-20 Akim Demaille <akim@epita.fr>
16574
16575 * src/files.c (open_files): Fix the computation of short_base_name
16576 in the case of `-o foo.tab.c'.
16577
16578 2000-12-20 Akim Demaille <akim@epita.fr>
16579
16580 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
16581 (copy_dollar): Now that everything uses obstacks, get rid of the
16582 FILE * parameters.
16583
16584 2000-12-20 Akim Demaille <akim@epita.fr>
16585
16586 * src/files.c (open_files): Actually the `.output' file is based
16587 on the short_base_name, not base_name.
16588 * tests/suite.at (Checking output file names): Adjust.
16589
16590 2000-12-20 Akim Demaille <akim@epita.fr>
16591
16592 * src/bison.s1: Remove, we now use directly...
16593 * src/bison.simple: this.
16594 * src/Makefile.am: Use pkgdata instead of data.
16595
16596 2000-12-20 Akim Demaille <akim@epita.fr>
16597
16598 * src/files.c (guard_obstack): New.
16599 (open_files): Initialize it.
16600 (output_files): Dump it...
16601 * src/files.h: Export it.
16602 * src/reader.c (copy_guard): Use it.
16603
16604 2000-12-19 Akim Demaille <akim@epita.fr>
16605
16606 * src/files.c (outfile, defsfile, actfile): Removed as global
16607 vars.
16608 (open_files): Don't compute them.
16609 (output_files): Adjust.
16610 (base_name, short_base_name): Be global.
16611 Adjust dependencies.
16612
16613 2000-12-19 Akim Demaille <akim@epita.fr>
16614
16615 * src/files.c (strsuffix): New.
16616 (stringappend): Be just like strcat but allocate.
16617 (base_names): Eve out from open_files.
16618 Try to simplify the rather hairy computation of base_name and
16619 short_base_name.
16620 (open_files): Use it.
16621 * tests/suite.at (Checking output file names): New test.
16622
16623 2000-12-19 Akim Demaille <akim@epita.fr>
16624
16625 * src/system.h (obstack_grow_literal_string): Rename as...
16626 (obstack_grow_string): this.
16627 * src/output.c (output_parser): Recognize `%% actions' instead of
16628 `$'.
16629 * src/bison.s1: s/$/%% actions/.
16630 * src/bison.hairy: Likewise.
16631
16632 2000-12-19 Akim Demaille <akim@epita.fr>
16633
16634 * src/output.c (output_parser): Compute the `#line' lines when
16635 there are.
16636 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
16637 Suggested by Hans Aberg.
16638
16639 2000-12-19 Akim Demaille <akim@epita.fr>
16640
16641 Let the handling of the skeleton files be local to the procedures
16642 that use it.
16643
16644 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
16645 longer static.
16646 (fparser, open_extra_files): Remove.
16647 (open_files, output_files): Don't take care of fparser.
16648 * src/files.h: Adjust.
16649 * src/output.c (output_parser): Open and close the file to the
16650 skeleton.
16651 * src/reader.c (read_declarations): When %semantic_parser, open
16652 fguard.
16653
16654 2000-12-19 Akim Demaille <akim@epita.fr>
16655
16656 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
16657 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
16658
16659 2000-12-19 Akim Demaille <akim@epita.fr>
16660
16661 * src/files.c (open_files): Yipee! We no longer need all the code
16662 looking for `/tmp' since we have no tmp file.
16663
16664 2000-12-19 Akim Demaille <akim@epita.fr>
16665
16666 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
16667 New macros.
16668 * src/files.c (open_files): Less dependency on MSDOS etc.
16669
16670 2000-12-14 Akim Demaille <akim@epita.fr>
16671
16672 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
16673 Provide a default definition.
16674 Use it when executing the default @ action.
16675 * src/reader.c (reader_output_yylsp): No longer include
16676 `timestamp' and `text' in the default YYLTYPE.
16677
16678 2000-12-12 Akim Demaille <akim@epita.fr>
16679
16680 * src/reader.c (copy_definition, parse_union_decl, copy_action)
16681 (copy_guard): Quote the file names.
16682 Reported by Laurent Mascherpa.
16683
16684 2000-12-12 Akim Demaille <akim@epita.fr>
16685
16686 * src/output.c (output_headers, output_program, output): Be sure
16687 to escape special characters when outputting filenames.
16688 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
16689 (output_headers): Don't depend on them, Use ACTSTR.
16690
16691 2000-11-17 Akim Demaille <akim@epita.fr>
16692
16693 * lib/obstack.h: Formatting changes.
16694 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
16695 prevents type checking.
16696 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
16697 cast the value to (void *): assigning a `foo *' to a `void *'
16698 variable is valid.
16699 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
16700 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
16701 append characters.
16702
16703 2000-11-17 Akim Demaille <akim@epita.fr>
16704
16705 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
16706 as...
16707 (suite.m4, regression.m4, calc.m4): these.
16708 * tests/atgeneral.m4: Update from CVS Autoconf.
16709
16710 2000-11-17 Akim Demaille <akim@epita.fr>
16711
16712 * tests/regression.m4 (%union and --defines): New test,
16713 demonstrating a current bug in the obstack implementation.
16714
16715 2000-11-17 Akim Demaille <akim@epita.fr>
16716
16717 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
16718 macros.
16719 Use them to declare the variables which are global or local to
16720 `yyparse'.
16721
16722 2000-11-17 Akim Demaille <akim@epita.fr>
16723
16724 * acconfig.h: Remove, no longer used.
16725
16726 2000-11-07 Akim Demaille <akim@epita.fr>
16727
16728 * src: s/Copyright (C)/Copyright/g.
16729
16730 2000-11-07 Akim Demaille <akim@epita.fr>
16731
16732 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
16733 defining.
16734 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
16735
16736 2000-11-07 Akim Demaille <akim@epita.fr>
16737
16738 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
16739 Merge in a single CPP if/else.
16740
16741 2000-11-07 Akim Demaille <akim@epita.fr>
16742
16743 * src/output.c (output): Remove useless variables.
16744 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
16745 argument `data' for consistency with the prototypes.
16746 Qualify it `const'.
16747 (obstack_copy, obstack_copy0): Rename the second argument as
16748 `address' for consistency. Qualify it `const'.
16749 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
16750 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
16751 `const' their input argument (`data' or `address').
16752 Adjust the corresponding macros to include `const' in casts.
16753
16754 2000-11-03 Akim Demaille <akim@epita.fr>
16755
16756 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
16757 s/PFILE1/BISON_HAIRY/.
16758 Adjust dependencies.
16759
16760 2000-11-03 Akim Demaille <akim@epita.fr>
16761
16762 For some reason, this was not applied.
16763
16764 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16765 `unlink': it's no longer used.
16766
16767 2000-11-03 Akim Demaille <akim@epita.fr>
16768
16769 * src/files.c (skeleton_find): New function, eved out of...
16770 (open_files, open_extra_files): here.
16771
16772 2000-11-03 Akim Demaille <akim@epita.fr>
16773
16774 Don't use `atexit'.
16775
16776 * src/files.c (obstack_save): New function.
16777 (done): Rename as...
16778 (output_files): this.
16779 Use `obstack_save'.
16780 * src/main.c (main): Don't use `atexit' to register `done', since
16781 it no longer has to remove tmp files, just call `output_files'
16782 when there are no errors.
16783
16784 2000-11-02 Akim Demaille <akim@epita.fr>
16785
16786 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16787 `unlink': it's no longer used.
16788 * src/files.h: Formatting changes.
16789
16790 2000-11-02 Akim Demaille <akim@epita.fr>
16791
16792 Remove the last uses of mktemp and unlink/delete.
16793
16794 * src/files.c (fdefines, ftable): Removed.
16795 (defines_ostack, table_obstack): New.
16796 Adjust dependencies of the former into uses of the latter.
16797 * src/output.c (output_short_or_char_table, output_short_table):
16798 Convert to using obstacks.
16799 * src/reader.c (copy_comment2): Accept one FILE * and two
16800 obstacks.
16801 (output_token_defines, reader_output_yylsp): Use obstacks.
16802 * src/system.h (obstack_fgrow3): New.
16803 * po/POTFILES.in: Adjust.
16804
16805 2000-11-01 Akim Demaille <akim@epita.fr>
16806
16807 Change each use of `fattrs' into a use of `attrs_obstack'.
16808
16809 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
16810 * src/files.c (fattrs): Remove.
16811 (attrs_obstack): New.
16812 Adjust all dependencies.
16813 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
16814
16815 2000-11-01 Akim Demaille <akim@epita.fr>
16816
16817 Introduce obstacks.
16818 Change each use of `faction' into a use of `action_obstack'.
16819
16820 * lib/obstack.h, lib/obstack.c: New files.
16821 * src/files.c (faction): Remove.
16822 (action_obstack): New.
16823 Adjust all dependencies.
16824
16825 2000-10-20 Akim Demaille <akim@epita.fr>
16826
16827 * lib/quote.h (PARAMS): New macro. Use it.
16828
16829 2000-10-16 Akim Demaille <akim@epita.fr>
16830
16831 * src/output.c (output_short_or_char_table): New function.
16832 (output_short_table, output_token_translations): Use it.
16833 (goto_actions): Use output_short_table.
16834
16835 2000-10-16 Akim Demaille <akim@epita.fr>
16836
16837 * src/symtab.c (bucket_new): New function.
16838 (getsym): Use it.
16839
16840 * src/output.c (output_short_table): New argument to display the
16841 comment associated with the table.
16842 Adjust dependencies.
16843 (output_gram): Use it.
16844 (output_rule_data): Nicer output layout for YYTNAME.
16845
16846 2000-10-16 Akim Demaille <akim@epita.fr>
16847
16848 * src/lex.c (read_typename): New function.
16849 (lex): Use it.
16850 * src/reader.c (copy_dollar): Likewise.
16851
16852 2000-10-16 Akim Demaille <akim@epita.fr>
16853
16854 * src/reader.c (copy_comment2): Expect the input stream to be on
16855 the `/' which is suspected to open a comment, instead of being
16856 called after `//' or `/*' was read.
16857 (copy_comment, copy_definition, parse_union_decl, copy_action)
16858 (copy_guard): Adjust.
16859
16860 2000-10-16 Akim Demaille <akim@epita.fr>
16861
16862 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
16863 `read_signed_integer'.
16864
16865 2000-10-16 Akim Demaille <akim@epita.fr>
16866
16867 * src/reader.c (copy_dollar): New function.
16868 (copy_guard, copy_action): Use it.
16869
16870 2000-10-16 Akim Demaille <akim@epita.fr>
16871
16872 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
16873 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
16874 New files, from Fileutils 4.0.27.
16875 * src/main.c (printable_version): Remove.
16876 * src/lex.c, src/reader.c: Use `quote'.
16877
16878 2000-10-04 Akim Demaille <akim@epita.fr>
16879
16880 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
16881
16882 2000-10-04 Akim Demaille <akim@epita.fr>
16883
16884 * doc/bison.texinfo: Various typos spotted by Neil Booth.
16885
16886 2000-10-04 Akim Demaille <akim@epita.fr>
16887
16888 When a literal string is used to define two different tokens,
16889 `bison -v' segfaults.
16890 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
16891
16892 * tests/regression.m4: New file.
16893 Include the core of the sample provided by Piotr Gackiewicz.
16894 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
16895 properly.
16896
16897 2000-10-04 Akim Demaille <akim@epita.fr>
16898
16899 * src/reader.c (parse_expect_decl): Keep `count' within the size
16900 of `buffer'.
16901 From Neil Booth.
16902
16903 2000-10-02 Paul Eggert <eggert@twinsun.com>
16904
16905 * bison.s1 (yyparse): Assign the default value
16906 unconditionally, to avoid a GCC warning and make the parser a
16907 tad smaller.
16908
16909 2000-10-02 Akim Demaille <akim@epita.fr>
16910
16911 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
16912 options.
16913
16914 2000-10-02 Akim Demaille <akim@epita.fr>
16915
16916 * src/derives.c, src/print.c, src/reduce.c: To ease the
16917 translation, move some `\n' out of the translated strings.
16918
16919 2000-10-02 Akim Demaille <akim@epita.fr>
16920
16921 The location tracking mechanism is precious for parse error
16922 messages. Nevertheless, it is enabled only when `@n' is used in
16923 the grammar, which is a different issue (you can use it in error
16924 message, but not in the grammar per se). Therefore, there should
16925 be another means to enable it.
16926
16927 * src/getargs.c (getargs): Support `--locations'.
16928 (usage): Report it.
16929 * src/getargs.h (locationsflag): Export it.
16930 * src/lex.c (percent_table): Support `%locations'.
16931 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16932 with `locationsflag'.
16933 * doc/bison.texinfo: Document `--locations' and `%locations'.
16934 Sort the options.
16935 * tests/calc.m4: Test it.
16936
16937 For regularity of the names, replace each
16938 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16939 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16940 In addition replace each `flag' with `_flag'.
16941
16942 2000-10-02 Akim Demaille <akim@epita.fr>
16943
16944 Also test parse error messages, including with YYERROR_VERBOSE.
16945
16946 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16947 associative).
16948 Use it to check the computations.
16949 Use it to check `nonassoc' is honored.
16950 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16951 `--yyerror-verbose'.
16952 (_AT_CHECK_CALC): Adjust to this option.
16953 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16954
16955 2000-10-02 Akim Demaille <akim@epita.fr>
16956
16957 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16958 the latter demonstrates a flaw in the handling of non debugging
16959 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16960 was used in order to simplify:
16961
16962 #if YYDEBUG
16963 if (yydebug)
16964 {
16965 ...
16966 }
16967 #endif
16968
16969 into
16970
16971 if (yydebug)
16972 {
16973 ...
16974 }
16975
16976 unfortunately this leads to a CPP conflict when
16977 `--name-prefix=foo' is used since it produces `#define yydebug
16978 foodebug'.
16979
16980 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16981 (YYDPRINTF): New macro.
16982 Spread its use.
16983 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16984 the bison options.
16985 Also test `--verbose', `--defines' and `--name-prefix'.
16986
16987 2000-10-02 Akim Demaille <akim@epita.fr>
16988
16989 Improve the readability of the produced parsers.
16990
16991 * src/bison.s1: Formatting changes.
16992 Improve the comment related to the `$' mark.
16993 (yydefault): Don't fall through to `yyresume': `goto' there.
16994 * src/output.c (output_parser): When the `$' is met, skip the end
16995 of its line.
16996 New variable, `number_of_dollar_signs', to check there's exactly
16997 one `$' in the parser skeleton.
16998
16999 2000-10-02 Akim Demaille <akim@epita.fr>
17000
17001 * lib/xstrdup.c: New file, from the fileutils.
17002 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
17003 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
17004 instead of strlen + xmalloc + strcpy.
17005 * src/symtab.c (copys): Remove, use xstrdup instead.
17006
17007 2000-10-02 Akim Demaille <akim@epita.fr>
17008
17009 * src/gram.h (associativity): New enum type which replaces the
17010 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
17011 `right_assoc', `left_assoc' and `non_assoc'.
17012 Adjust all dependencies.
17013 * src/reader.c: Formatting changes.
17014 (LTYPESTR): Don't define it, use it as a literal in
17015 `reader_output_yylsp'.
17016 * src/symtab.h (symbol_class): New enum type which replaces the
17017 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
17018 `sunknown', `stoken and `snterm'.
17019
17020 2000-10-02 Akim Demaille <akim@epita.fr>
17021
17022 * src/getargs.c (fixed_outfiles): Rename as...
17023 (yaccflag): for consistency and accuracy.
17024 Adjust dependencies.
17025
17026 2000-10-02 Akim Demaille <akim@epita.fr>
17027
17028 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
17029 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
17030 difficult and introduced a lot of core dump. It turns out that
17031 Bison used an implementation of `xmalloc' based on `calloc', and
17032 at various places it does depend upon the initialization to 0. I
17033 have not tried to isolate the pertinent places, and all the former
17034 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
17035 someone should address this issue.
17036
17037 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
17038 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
17039 files.
17040 Adjust dependencies.
17041 * src/warshall.h: New file.
17042 Propagate.
17043
17044 2000-10-02 Akim Demaille <akim@epita.fr>
17045
17046 Various anti-`extern in *.c' changes.
17047
17048 * src/system.h: Include `assert.h'.
17049
17050 2000-10-02 Akim Demaille <akim@epita.fr>
17051
17052 * src/state.h (nstates, final_state, first_state, first_shift)
17053 (first_reduction): Move their exportation from here...
17054 * src/LR0.h: to here.
17055 Adjust dependencies.
17056 * src/getargs.c (statisticsflag): New variable.
17057 Add support for `--statistics'.
17058 Adjust dependencies.
17059
17060 Remove a lot of now useless `extern' statements in most files.
17061
17062 2000-10-02 Akim Demaille <akim@epita.fr>
17063
17064 * src/LR0.h: New file.
17065 Propagate its use.
17066
17067 2000-10-02 Akim Demaille <akim@epita.fr>
17068
17069 * src/print.h: New file.
17070 Propagate its use.
17071 * src/print.c: Formatting and ordering changes.
17072 (verbose, terse): Replace with...
17073 (print_results): this new function.
17074 Adjust dependencies.
17075
17076 2000-10-02 Akim Demaille <akim@epita.fr>
17077
17078 * src/conflicts.c (conflict_report): New function.
17079 (conflict_log, verbose_conflict_log): Replace with...
17080 (print_conflicts): this function.
17081 Adjust dependencies.
17082 * src/conflicts.h: New file.
17083 Propagate its inclusion.
17084
17085 2000-10-02 Akim Demaille <akim@epita.fr>
17086
17087 * src/nullable.h: New file.
17088 Propagate its inclusion.
17089 * src/nullable.c: Formatting changes.
17090
17091 2000-10-02 Akim Demaille <akim@epita.fr>
17092
17093 * src/reduce.h: New file.
17094 Propagate its inclusion.
17095 * src/reduce.c: Topological sort and other formatting changes.
17096 (bool, TRUE, FALSE): Move their definition to...
17097 * src/system.h: here.
17098
17099 2000-10-02 Akim Demaille <akim@epita.fr>
17100
17101 * src/files.c: Formatting changes.
17102 (tryopen, tryclose, openfiles): Rename as...
17103 (xfopen, xfclose, open_files): this.
17104 (stringappend): static.
17105 * src/files.h: Complete the list of exported symbols.
17106 Propagate its use.
17107
17108 2000-10-02 Akim Demaille <akim@epita.fr>
17109
17110 * src/reader.h: New file.
17111 Propagate its use instead of tedious list of `extern' and
17112 prototypes.
17113 * src/reader.c: Formatting changes, topological sort,
17114 s/register//.
17115
17116 2000-10-02 Akim Demaille <akim@epita.fr>
17117
17118 * src/lex.h: Prototype `lex.c' exported functions.
17119 * src/reader.c: Adjust.
17120 * src/lex.c: Formatting changes.
17121 (safegetc): Rename as...
17122 (xgetc): this.
17123
17124 2000-10-02 Akim Demaille <akim@epita.fr>
17125
17126 * src/lalr.h: New file.
17127 Propagate its inclusion instead of prototypes and `extern'.
17128 * src/lalr.c: Formatting changes, topological sorting etc.
17129
17130 2000-10-02 Akim Demaille <akim@epita.fr>
17131
17132 * src/output.c (token_actions): Introduce a temporary array,
17133 YYDEFACT, that makes it possible for this function to use
17134 output_short_table.
17135
17136 2000-10-02 Akim Demaille <akim@epita.fr>
17137
17138 `user_toknums' is output as a `short[]' in `output.c', while it is
17139 defined as a `int[]' in `reader.c'. For consistency with the
17140 other output tables, `user_toknums' is now defined as a table of
17141 shorts.
17142
17143 * src/reader.c (user_toknums): Be a short table instead of an int
17144 table.
17145 Adjust dependencies.
17146
17147 Factor the short table outputs.
17148
17149 * src/output.c (output_short_table): New function.
17150 * src/output.c (output_gram, output_stos, output_rule_data)
17151 (output_base, output_table, output_check): Use it.
17152
17153 2000-10-02 Akim Demaille <akim@epita.fr>
17154
17155 * src/output.c (output): Topological sort of the functions, in
17156 order to get rid of the `static' prototypes.
17157 No longer use `register'.
17158 * src/output.h: New file.
17159 Propagate its inclusion in files explicitly prototyping functions
17160 from output.c.
17161
17162 2000-09-21 Akim Demaille <akim@epita.fr>
17163
17164 * src/atgeneral.m4: Update from Autoconf.
17165
17166 2000-09-21 Akim Demaille <akim@epita.fr>
17167
17168 * src/closure.h: New file.
17169 * src/closure.c: Formatting changes, topological sort over the
17170 functions, use of closure.h.
17171 (initialize_closure, finalize_closure): Rename as...
17172 (new_closure, free_closure): these. Adjust dependencies.
17173 * src/LR0.c: Formatting changes, topological sort, use of
17174 cloture.h.
17175 (initialize_states): Rename as...
17176 (new_states): this.
17177 * src/Makefile.am (noinst_HEADERS): Adjust.
17178
17179 2000-09-20 Akim Demaille <akim@epita.fr>
17180
17181 * src/acconfig.h: Don't protect config.h against multiple
17182 inclusion.
17183 Don't define PARAMS.
17184 * src/system.h: Define PARAMS.
17185 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
17186 purpose of config.h. system.h must not try to fix wrong
17187 definitions in config.h.
17188
17189 2000-09-20 Akim Demaille <akim@epita.fr>
17190
17191 * src/derives.h: New file.
17192 * src/main.c, src/derives.h: Use it.
17193 Formatting changes.
17194 * src/Makefile.am (noinst_HEADERS): Adjust.
17195
17196 2000-09-20 Akim Demaille <akim@epita.fr>
17197
17198 * tests/atgeneral.m4: Update from Autoconf.
17199 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
17200 (AT_CHECK_CALC): New macros.
17201 Use these macros to test bison with options `', `--raw',
17202 `--debug', `--yacc', `--yacc --debug'.
17203
17204 2000-09-19 Akim Demaille <akim@epita.fr>
17205
17206 * src/output.c: Formatting changes.
17207 * src/machine.h: Remove, leaving its contents in...
17208 * src/system.h: here.
17209 Include stdio.h.
17210 Adjust all dependencies on stdio.h and machine.h.
17211 * src/getargs.h: New file.
17212 Let all `extern' declarations about getargs.c be replaced with
17213 inclusion of `getargs.h'.
17214 * src/Makefile.am (noinst_HEADERS): Adjust.
17215
17216 * tests/calc.m4 (yyin): Be initialized in main, not on the global
17217 scope.
17218 (yyerror): Returns void, not int.
17219 * doc/bison.texinfo: Formatting changes.
17220
17221 2000-09-19 Akim Demaille <akim@epita.fr>
17222
17223 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
17224 portable.
17225
17226 2000-09-18 Akim Demaille <akim@epita.fr>
17227
17228 * configure.in: Append WARNING_CFLAGS to CFLAGS.
17229 * src/Makefile.am (INCLUDES): Don't.
17230 Be ready to fetch headers in lib/.
17231
17232 2000-09-18 Akim Demaille <akim@epita.fr>
17233
17234 * doc/bison.texinfo: Update the copyright.
17235 ANSIfy and GNUify the examples.
17236 Remove the old menu.
17237
17238 2000-09-18 Akim Demaille <akim@epita.fr>
17239
17240 First set of tests: use the `calc' example from the documentation.
17241
17242 * src/bison.s1 (yyparse): Condition the code using `yytname' which
17243 is defined only when YYDEBUG is.
17244 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
17245 * src/files.c (tryopen, tryclose): Formatting changes.
17246 Move to the top and be static.
17247 * src/reader.c (read_signed_integer): Likewise.
17248 * tests/calc.m4: New file.
17249 * Makefile.am, suite.m4: Adjust.
17250 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
17251
17252 2000-09-18 Akim Demaille <akim@epita.fr>
17253
17254 Add support for an Autotest test suite for Bison.
17255
17256 * m4/m4.m4, m4/atconfig.m4: New files.
17257 * m4/Makefile.am (EXTRA_DIST): Adjust.
17258 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
17259 files.
17260 * src/getargs.c: Display a more standard --version message.
17261 * src/reader.c (reader): Formatting changes.
17262 No longer depend upon VERSION_STRING.
17263 * configure.in: No longer use `dnl'.
17264 Set up the test suite and the new directory `tests/.
17265 (VERSION_STRING): Remove.
17266
17267 2000-04-14 Akim Demaille <akim@epita.fr>
17268
17269 * src/reader.c (copy_comment2): New function, same as former
17270 `copy_comment', but outputs into two FILE *.
17271 (copy_comment): Use it.
17272 (parse_union_decl): Use it.
17273 (get_type, parse_start_decl): Use the same `invalid' message.
17274 (parse_start_decl, parse_union_decl): Use the same `multiple'
17275 message.
17276 (parse_union_decl, copy_guard, copy_action): Use the same
17277 `unmatched' message.
17278 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
17279
17280 2000-03-31 Akim Demaille <akim@epita.fr>
17281
17282 * src/files.c (tryopen, tryclose): Move to the top.
17283 Be static.
17284
17285 2000-03-31 Akim Demaille <akim@epita.fr>
17286
17287 * src/main.c (main): Don't call `done', exit does it.
17288
17289 2000-03-31 Akim Demaille <akim@epita.fr>
17290
17291 * allocate.c: s/return (foo)/return foo/.
17292 * lalr.c: Likewise.
17293 * LR0.c: Likewise.
17294 * output.c: Likewise.
17295 * reader.c: Likewise.
17296 * symtab.c: Likewise.
17297 * vmsgetargs.c: Likewise.
17298
17299 2000-03-31 Akim Demaille <akim@epita.fr>
17300
17301 Clean up the error reporting functions.
17302
17303 * src/report.c: New file.
17304 * src/report.h: Likewise.
17305 * src/Makefile.am: Adjust.
17306 * m4/error.m4: New file.
17307 * m4/Makefile.am: Adjust.
17308 * configure.in (jm_PREREQ_ERROR): Call it.
17309 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
17310 Remove.
17311 (fatal, fatals): Remove. All callers use complain.c::fatal.
17312 (warn, warni, warns, warnss, warnss): Remove. All callers use
17313 complain.c::complain.
17314 (toomany): Remove, use fatal instead.
17315 * src/files.c (done): No argument, use complain_message_count.
17316 * src/main.c (main): Register `done' to `atexit'.
17317
17318 * src/getargs.c (usage): More `fputs', less `fprintf'.
17319
17320 2000-03-28 Akim Demaille <akim@epita.fr>
17321
17322 * lib/: New directory.
17323 * Makefile.am (SUBDIRS): Adjust.
17324 * configure.in: Adjust.
17325 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
17326 useless.
17327 * src/alloca.c: Moved to lib/.
17328 * src/getopt.c: Likewise.
17329 * src/getopt1.c: Likewise.
17330 * src/getopt.h: Likewise.
17331 * src/ansi2knr.c: Likewise.
17332 * src/ansi2knr.1: Likewise.
17333 * src/Makefile.am: Adjust.
17334 * lib/Makefile.am: New file.
17335
17336 2000-03-28 Akim Demaille <akim@epita.fr>
17337
17338 * src/getargs.c (usage): Refresh the help message.
17339
17340 2000-03-17 Akim Demaille <akim@epita.fr>
17341
17342 * src/getopt1.c: Updated from textutils 2.0e
17343 * src/getopt.c: Likewise.
17344 * src/getopt.h: Likewise.
17345
17346 2000-03-17 Akim Demaille <akim@epita.fr>
17347
17348 * src/Makefile.am (bison.simple): Fix the awk program: quote only
17349 the file name, not the whole `#line LINE FILE'.
17350
17351 2000-03-17 Akim Demaille <akim@epita.fr>
17352
17353 On syntax errors, report the token on which we choked.
17354
17355 * src/bison.s1 (yyparse): In the label yyerrlab, when
17356 YYERROR_VERBOSE, add yychar in msg.
17357
17358 2000-03-17 Akim Demaille <akim@epita.fr>
17359
17360 * src/reader.c (copy_at): New function.
17361 (copy_guard): Use it.
17362 (copy_action): Use it.
17363
17364 2000-03-17 Akim Demaille <akim@epita.fr>
17365
17366 Be kind to translators, save some useless translations.
17367
17368 * src/main.c (banner): New function.
17369 (fatal_banner): Use it.
17370 (warn_banner): Use it.
17371
17372 2000-03-17 Akim Demaille <akim@epita.fr>
17373
17374 * src/reader.c (copy_definition): Use copy_string and
17375 copy_comment. Removed now unused `match', `ended',
17376 `cplus_comment'.
17377 (copy_comment, copy_string): Moved, to be visible from
17378 copy_definition.
17379
17380 2000-03-17 Akim Demaille <akim@epita.fr>
17381
17382 * src/reader.c (copy_string): Declare `static inline'. No
17383 problems with inline, since it is checked by configure.
17384 (copy_comment): Likewise.
17385
17386 2000-03-17 Akim Demaille <akim@epita.fr>
17387
17388 * src/reader.c (packsymbols): Formatting changes.
17389
17390 2000-03-17 Akim Demaille <akim@epita.fr>
17391
17392 * src/reader.c (copy_comment): New function, factored out from:
17393 (copy_action): Use it. Removed now unused `match', `ended',
17394 `cplus_comment'.
17395 (copy_guard): Likewise.
17396
17397 2000-03-17 Akim Demaille <akim@epita.fr>
17398
17399 * src/reader.c (copy_string): New function, factored out from:
17400 (copy_action): Use it.
17401 (copy_guard): Likewise.
17402
17403 2000-03-17 Akim Demaille <akim@epita.fr>
17404
17405 Change the handling of @s so that they behave exactly like $s.
17406 There is now a pseudo variable @$ (readble and writable), location
17407 of the lhs of the rule (by default ranging from the location of
17408 the first symbol of the rhs, to the location of the last symbol,
17409 or, if the rhs is empty, YYLLOC).
17410
17411 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
17412 yyval.
17413 (yyparse): When providing a default semantic action, provide a
17414 default location action.
17415 (after the $): No longer change `*YYLSP', just stack YYLOC the
17416 same way you stack YYVAL.
17417 * src/reader.c (read_declarations): Use warns.
17418 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
17419 (copy_action, case '@'): Likewise.
17420 Use a standard error message, to save useless work from
17421 translators.
17422
17423 2000-03-17 Akim Demaille <akim@epita.fr>
17424
17425 * src/bison.s1: Formatting and cosmetics changes.
17426 * src/reader.c: Likewise.
17427 Update the Copyright notice.
17428
17429 2000-03-17 Akim Demaille <akim@epita.fr>
17430
17431 * src/bison.s1 (#line): All set to `#line' only, since the
17432 Makefile now handles them.
17433
17434 2000-03-16 Akim Demaille <akim@epita.fr>
17435
17436 * src/output.c (output_rule_data): Output the documentation of
17437 some of the tables.
17438 (Copyright notice): Update.
17439 Formatting changes.
17440
17441 2000-03-16 Akim Demaille <akim@epita.fr>
17442
17443 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
17444 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
17445 One `#if YYDEBUG' remains, since it uses variables which are
17446 defined only if `YYDEBUG != 0'.
17447
17448 2000-03-16 Akim Demaille <akim@epita.fr>
17449
17450 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
17451 and related variables so that the similarities are highlighted.
17452
17453 2000-03-16 Akim Demaille <akim@epita.fr>
17454
17455 * src/bison.s1: Properly indent CPP directives.
17456
17457 2000-03-16 Akim Demaille <akim@epita.fr>
17458
17459 * src/bison.s1: Properly indent the `alloca' CPP section.
17460
17461 2000-03-16 Akim Demaille <akim@epita.fr>
17462
17463 Do not hard code values of directories in `configure.in'.
17464 Update the `configure' tool chain.
17465
17466 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
17467 src/makefile.am.
17468 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
17469 (AC_OUTPUT): Add m4/Makefile.
17470 Bump to bison 1.28a, 1.29 has never been released.
17471 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
17472 handled via src/Makefile.am.
17473 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
17474 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
17475 autoheader.
17476 * Makefile.am (SUBDIRS): Add m4.
17477 (ACLOCAL_AM_FLAGS): New variable.
17478 (AUTOMAKE_OPTIONS): Add check-news.
17479 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
17480 the proper line number and file name.
17481 (DEFS): Propagate the location of bison library files and of the
17482 locale files.
17483 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
17484 builddir.
17485 * acinclude.m4: Remove, replaced by the directory m4.
17486 * m4/Makefile.am (EXTRA_DIST): New variable.
17487 * m4/gettext.m4: New file, from the fileutils.
17488 * m4/lcmessage.m4: Likewise
17489 * m4/progtest.m4: Likewise.
17490 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
17491
17492 2000-03-10 Akim Demaille <akim@epita.fr>
17493
17494 * src/closure.c:
17495 Formatting changes of various comments.
17496 Respect the GNU coding standards at various places.
17497 Don't use `_()' when no translation is needed.
17498
17499 1999-12-13 Jesse Thilo <jthilo@gnu.org>
17500
17501 * src/files.c:
17502 OS/2 honors TMPDIR environment variable.
17503
17504 1999-12-13 Jesse Thilo <jthilo@gnu.org>
17505
17506 * doc/bison.texinfo: Tweaked spelling and grammar.
17507 Updated ISBN.
17508 Removed reference to price of printed copy.
17509 Mention BISON_SIMPLE and BISON_HAIRY.
17510
17511 1999-12-13 Jesse Thilo <jthilo@gnu.org>
17512
17513 * configure.in, NEWS:
17514 Bison 1.29 released.
17515
17516 1999-10-27 Jesse Thilo <jthilo@gnu.org>
17517
17518 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
17519 Added reference card.
17520
17521 1999-07-26 Jesse Thilo <jthilo@gnu.org>
17522
17523 * po/ru.po: Added Russian translation.
17524
17525 1999-07-26 Jesse Thilo <jthilo@gnu.org>
17526
17527 * configure.in: Added Russian translation.
17528
17529 1999-07-06 Jesse Thilo <jthilo@gnu.org>
17530
17531 * configure.in, NEWS, README:
17532 Released version 1.28.
17533
17534 1999-06-14 Jesse Thilo <jthilo@gnu.org>
17535
17536 * src/system.h:
17537 Squashed redefinition warning on some systems.
17538
17539 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
17540 Have configure build version string instead of relying on ANSI string
17541 concatentation.
17542
17543 1999-06-14 Jesse Thilo <jthilo@gnu.org>
17544
17545 * po/POTFILES.in: Got rid of version.c.
17546
17547 1999-06-14 Jesse Thilo <jthilo@gnu.org>
17548
17549 * acconfig.h, configure.in:
17550 Have configure build version string instead of relying on ANSI string
17551 concatentation.
17552
17553 1999-06-08 Jesse Thilo <jthilo@gnu.org>
17554
17555 * doc/bison.1:
17556 Dropped mention of `+' for long-named options.
17557
17558 1999-05-30 Jesse Thilo <jthilo@gnu.org>
17559
17560 * src/files.c: Added <unistd.h> for unlink().
17561
17562 * src/Makefile.am, src/system.h:
17563 I18n fixes.
17564
17565 1999-05-30 Jesse Thilo <jthilo@gnu.org>
17566
17567 * README: Added a FAQ list.
17568
17569 * configure.in, acconfig.h:
17570 I18n fixes.
17571
17572 1999-05-30 Jesse Thilo <jthilo@gnu.org>
17573
17574 * doc/FAQ, doc/Makefile.am:
17575 Added a FAQ list.
17576
17577 1999-05-19 Jesse Thilo <jthilo@gnu.org>
17578
17579 * src/alloc.h, src/symtab.h, src/version.c:
17580 Protected inclusion of "config.h" with HAVE_CONFIG_H.
17581
17582 1999-04-18 Jesse Thilo <jthilo@gnu.org>
17583
17584 * src/.cvsignore, src/Makefile.am:
17585 Reorganized: sources in `src', documentation in `doc'.
17586
17587 * src/lex.c (literalchar):
17588 fixed the code for escaping double quotes (thanks
17589 Jonathan Czisny.)
17590
17591 1999-04-18 Jesse Thilo <jthilo@gnu.org>
17592
17593 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
17594 Adjusted paths to reflect directory reorganization.
17595
17596 1999-04-18 Jesse Thilo <jthilo@gnu.org>
17597
17598 * doc/.cvsignore, doc/Makefile.am:
17599 Reorganized: sources in `src', documentation in `doc'.
17600
17601 1999-04-18 Jesse Thilo <jthilo@gnu.org>
17602
17603 * configure.in:
17604 Updated AC_INIT file to reflect directory reorganization.
17605
17606 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
17607 Reorganized: sources in `src', documentation in `doc'.
17608
17609 1999-04-13 Jesse Thilo <jthilo@gnu.org>
17610
17611 * src/allocate.c:
17612 Don't declare calloc() and realloc() if not necessary.
17613
17614 1999-04-13 Jesse Thilo <jthilo@gnu.org>
17615
17616 * configure.in, acconfig.h, acinclude.m4:
17617 Don't declare calloc() and realloc() if not necessary.
17618
17619 1999-03-23 Jesse Thilo <jthilo@gnu.org>
17620
17621 * po/.cvsignore: Added i18n support.
17622
17623 1999-03-23 Jesse Thilo <jthilo@gnu.org>
17624
17625 * acconfig.h, configure.in, Makefile.am:
17626 Added i18n support.
17627
17628 1999-03-22 Jesse Thilo <jthilo@gnu.org>
17629
17630 * src/bison.s1: Fixed #line numbers.
17631
17632 1999-03-15 Jesse Thilo <jthilo@gnu.org>
17633
17634 * po/es.po, po/fr.po, po/nl.po, po/de.po:
17635 Added PO files from Translation Project.
17636
17637 1999-03-03 Jesse Thilo <jthilo@gnu.org>
17638
17639 * Makefile.am:
17640 Added support for non-ANSI compilers (ansi2knr).
17641
17642 1999-02-16 Jesse Thilo <jthilo@gnu.org>
17643
17644 * configure.in: Bumped version number to 1.27.
17645
17646 * Makefile.am:
17647 Added `bison.simple' to list of files removed by `make distclean'.
17648
17649 1999-02-12 Jesse Thilo <jthilo@gnu.org>
17650
17651 * src/files.c, src/files.h:
17652 Defined locations of parser files in config.h instead of Makefile.
17653
17654 1999-02-12 Jesse Thilo <jthilo@gnu.org>
17655
17656 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
17657 Defined locations of parser files in config.h instead of Makefile.
17658
17659 1999-02-09 Jesse Thilo <jthilo@gnu.org>
17660
17661 * Makefile.am:
17662 Removed inappropriate use of $< macro.
17663
17664 1999-02-05 Jesse Thilo <jthilo@gnu.org>
17665
17666 * po/Makefile.in.in, po/POTFILES.in:
17667 Add `po' directory skeleton.
17668
17669 1999-01-27 Jesse Thilo <jthilo@gnu.org>
17670
17671 * README: Document help-bison list.
17672
17673 * configure.in: Add check for mkstemp().
17674
17675 1999-01-20 Jesse Thilo <jthilo@gnu.org>
17676
17677 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
17678 Hush a few compiler warnings.
17679
17680 * src/files.c:
17681 Add tryclose(), which verifies that fclose was successful.
17682 Hush a couple of compiler warnings.
17683
17684 1999-01-20 Jesse Thilo <jthilo@gnu.org>
17685
17686 * Makefile.am, OChangeLog:
17687 ChangeLog is now automatically generated. Include the old version as
17688 OChangeLog.
17689
17690 1999-01-14 Jesse Thilo <jthilo@gnu.org>
17691
17692 * 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:
17693 Update FSF address.
17694
17695 1999-01-14 Jesse Thilo <jthilo@gnu.org>
17696
17697 * doc/bison.texinfo: Fix formatting glitch.
17698
17699 * doc/bison.texinfo: Update FSF address.
17700
17701 1999-01-14 Jesse Thilo <jthilo@gnu.org>
17702
17703 * acconfig.h: Update FSF address.
17704
17705 1999-01-08 Jesse Thilo <jthilo@gnu.org>
17706
17707 * src/system.h:
17708 Don't define PACKAGE here, since config.h defines it.
17709
17710 1998-12-30 Jesse Thilo <jthilo@gnu.org>
17711
17712 * src/reader.c: Update copyright date.
17713
17714 * src/main.c:
17715 Ditch sprintf to statically-sized buffers in fatal/warn functions in
17716 favor of output directly to stderr (avoids buffer overruns).
17717
17718 * src/reader.c: Some checks for premature EOF.
17719
17720 * 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:
17721 Use prototypes if the compiler understands them.
17722
17723 * src/files.c: Honor TMPDIR on Unix hosts.
17724 Use prototypes if the compiler understands them.
17725
17726 * src/reader.c:
17727 Fix a couple of buffer overrun bugs.
17728 Use prototypes if the compiler understands them.
17729
17730 * src/system.h: Include unistd.h and ctype.h.
17731 Use #ifdef instead of #if for NLS symbols.
17732
17733 1998-12-30 Jesse Thilo <jthilo@gnu.org>
17734
17735 * doc/bison.texinfo:
17736 Delete comment "consider using @set for edition number, etc..." since
17737 we now are doing so.
17738
17739 1998-12-30 Jesse Thilo <jthilo@gnu.org>
17740
17741 * configure.in:
17742 Use prototypes if the compiler understands them.
17743
17744 * NEWS: Document 1.26 highlights.
17745
17746 * Makefile.am: Require Automake 1.3 or later.
17747
17748 * acconfig.h:
17749 Use prototypes if the compiler understands them.
17750
17751 1998-12-29 Jesse Thilo <jthilo@gnu.org>
17752
17753 * src/version.c:
17754 Use VERSION symbol from automake for version number.
17755
17756 1998-12-29 Jesse Thilo <jthilo@gnu.org>
17757
17758 * acconfig.h, configure.in, version.cin:
17759 Use VERSION symbol from automake for version number.
17760
17761 1998-11-28 Jesse Thilo <jthilo@gnu.org>
17762
17763 * Makefile.am:
17764 Distribute original version of simple parser (bison.s1), not built
17765 version (bison.simple).
17766
17767 1998-11-28 Jesse Thilo <jthilo@gnu.org>
17768
17769 * doc/bison.texinfo: Add info dir entry.
17770
17771 * doc/bison.texinfo:
17772 Let automake put version number into documentation.
17773
17774 1998-11-26 Jesse Thilo <jthilo@gnu.org>
17775
17776 * src/bison.cld, src/build.com, src/vmshlp.mar:
17777 Add non-RCS files from /gd/gnu/bison.
17778
17779 1998-11-26 Jesse Thilo <jthilo@gnu.org>
17780
17781 * doc/bison.1:
17782 Document the BISON_HAIRY and BISON_SIMPLE variables.
17783
17784 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17785
17786 * src/version.c: Build version.c automatically.
17787
17788 * src/reader.c:
17789 Fix token numbering (used to start at 258, not 257).
17790
17791 * src/system.h: Include config.h.
17792
17793 * src/getargs.c: Update bug report address.
17794
17795 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
17796 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
17797
17798 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17799
17800 * Makefile.am:
17801 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17802
17803 * configure.in, version.cin:
17804 Build version.c automatically.
17805
17806 * AUTHORS: Add AUTHORS file.
17807
17808 * README: Update bug report address.
17809
17810 * bison.simple:
17811 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17812
17813 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
17814 Add automake stuff.
17815
17816 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17817
17818 * doc/bison.texinfo: Clean up some formatting.
17819
17820 1998-05-05 Richard Stallman <rms@gnu.org>
17821
17822 * doc/bison.texinfo:
17823 Explain better why to make a pure parser.
17824
17825 1998-01-05 Richard Stallman <rms@gnu.org>
17826
17827 * src/files.c (openfiles):
17828 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
17829 find a temporary directory, if possible. Do not unlink files while
17830 they are open.
17831
17832 1997-08-25 Richard Stallman <rms@gnu.org>
17833
17834 * src/reader.c (stack_offset;):
17835 Change some warni to warns.
17836
17837 * src/lex.c (literalchar): Use warns, not warni.
17838
17839 1997-06-28 Richard Stallman <rms@gnu.org>
17840
17841 * src/bison.s1: Add a Bison version comment.
17842
17843 * src/main.c (fatal, warn, berror):
17844 Use program_name.
17845
17846 1997-06-28 Richard Stallman <rms@gnu.org>
17847
17848 * Makefile.in (bison_version): New variable.
17849 (dist): Use that variable.
17850 (bison.s1): Substitute the Bison version into bison.simple.
17851
17852 * bison.simple: Add a Bison version comment.
17853
17854 1997-06-18 Richard Stallman <rms@gnu.org>
17855
17856 * src/main.c (fatal, warn, berror):
17857 Make error messages standard.
17858 (toomany): Improve error message text.
17859
17860 * 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:
17861 new.h renamed to alloc.h.
17862
17863 1997-06-18 Richard Stallman <rms@gnu.org>
17864
17865 * Makefile.in: new.h renamed to alloc.h.
17866
17867 1997-05-24 Richard Stallman <rms@gnu.org>
17868
17869 * src/lex.c (literalchar):
17870 Fix the code for escaping \, " and '.
17871
17872 (lex): Avoid trouble when there are many chars
17873 to discard in a char literal with just several chars in it.
17874
17875 1997-05-17 Richard Stallman <rms@gnu.org>
17876
17877 * src/bison.s1:
17878 Use malloc, if using alloca is troublesome.
17879 (YYSTACK_USE_ALLOCA): New flag macro.
17880 Define it for some systems and compilers.
17881 (YYSTACK_ALLOC): New macro.
17882 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17883 If it was malloc'd, free it.
17884
17885 1997-05-17 Richard Stallman <rms@gnu.org>
17886
17887 * bison.simple:
17888 Use malloc, if using alloca is troublesome.
17889 (YYSTACK_USE_ALLOCA): New flag macro.
17890 Define it for some systems and compilers.
17891 (YYSTACK_ALLOC): New macro.
17892 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17893 If it was malloc'd, free it.
17894
17895 1997-04-23 Richard Stallman <rms@gnu.org>
17896
17897 * src/bison.s1:
17898 (alloca) [__hpux]: Always define as __builtin_alloca.
17899
17900 1997-04-23 Richard Stallman <rms@gnu.org>
17901
17902 * bison.simple:
17903 (alloca) [__hpux]: Always define as __builtin_alloca.
17904
17905 1997-04-22 Richard Stallman <rms@gnu.org>
17906
17907 * src/bison.s1:
17908 [__hpux]: Include alloca.h (right for HPUX 10)
17909 instead of declaring alloca (right for HPUX 9).
17910
17911 * src/bison.s1 (__yy_memcpy):
17912 Declare arg `count' as unsigned int.
17913 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17914
17915 1997-04-22 Richard Stallman <rms@gnu.org>
17916
17917 * bison.simple:
17918 [__hpux]: Include alloca.h (right for HPUX 10)
17919 instead of declaring alloca (right for HPUX 9).
17920
17921 * bison.simple (__yy_memcpy):
17922 Declare arg `count' as unsigned int.
17923 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17924
17925 1997-01-03 Richard Stallman <rms@gnu.org>
17926
17927 * src/allocate.c: [__STDC__ or _MSC_VER]:
17928 Declare calloc and realloc to return void *.
17929
17930 1997-01-02 Richard Stallman <rms@gnu.org>
17931
17932 * src/system.h:
17933 [_MSC_VER]: Include stdlib.h and process.h.
17934 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17935
17936 * src/main.c (main): Return FAILURE as a value.
17937 (printable_version): Declare arg as int, not char.
17938
17939 1997-01-02 Richard Stallman <rms@gnu.org>
17940
17941 * Makefile.in (dist):
17942 Explicitly check for symlinks, and copy them.
17943
17944 1996-12-19 Richard Stallman <rms@gnu.org>
17945
17946 * src/files.c:
17947 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17948
17949 1996-12-18 Paul Eggert <eggert@gnu.org>
17950
17951 * src/bison.s1 (yyparse):
17952 If __GNUC__ and YYPARSE_PARAM are both defined,
17953 declare yyparse to have a void * argument.
17954
17955 1996-12-18 Paul Eggert <eggert@gnu.org>
17956
17957 * bison.simple (yyparse):
17958 If __GNUC__ and YYPARSE_PARAM are both defined,
17959 declare yyparse to have a void * argument.
17960
17961 1996-12-17 Richard Stallman <rms@gnu.org>
17962
17963 * src/reduce.c (nbits): Add some casts.
17964
17965 1996-08-12 Richard Stallman <rms@gnu.org>
17966
17967 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17968
17969 1996-08-12 Richard Stallman <rms@gnu.org>
17970
17971 * bison.simple: Test _MSDOS as well as _MSDOS_.
17972
17973 1996-07-31 Richard Stallman <rms@gnu.org>
17974
17975 * src/bison.s1:
17976 [__sun && __i386]: Include alloca.h.
17977
17978 1996-07-31 Richard Stallman <rms@gnu.org>
17979
17980 * bison.simple:
17981 [__sun && __i386]: Include alloca.h.
17982
17983 1996-07-30 Richard Stallman <rms@gnu.org>
17984
17985 * src/bison.s1: Comment change.
17986
17987 * src/bison.s1: Test _MSDOS_, not MSDOS.
17988
17989 1996-07-30 Richard Stallman <rms@gnu.org>
17990
17991 * bison.simple: Comment change.
17992
17993 * bison.simple: Test _MSDOS_, not MSDOS.
17994
17995 1996-06-01 Richard Stallman <rms@gnu.org>
17996
17997 * 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:
17998 Insert `_' macro around many string constants.
17999
18000 * src/main.c:
18001 Insert `_' macro around many string constants.
18002
18003 (main): Call setlocale, bindtextdomain and textdomain.
18004
18005 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
18006 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
18007 [ENABLE_NLS]: Include libintl.h.
18008 [ENABLE_NLS] (gettext): Define.
18009 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
18010 (N_, PACKAGE, LOCALEDIR): New macros.
18011
18012 1996-06-01 Richard Stallman <rms@gnu.org>
18013
18014 * POTFILES.in: New file.
18015
18016 * Makefile.in (allocate.o):
18017 Define target explicitly.
18018
18019 * Makefile.in (CFLAGS): Set to @CFLAGS@.
18020 (LDFLAGS): Set to @LDFLAGS@.
18021 (configure): Run autoconf only if preceding `cd' succeeds.
18022 (bison.s1): Redirect output to temporary file then move the
18023 temporary to the target, rather than redirecting directly to bison.s1.
18024 (clean): Remove config.status and config.log.
18025 (distclean): Don't remove config.status here.
18026
18027 1996-05-12 Richard Stallman <rms@gnu.org>
18028
18029 * src/bison.s1:
18030 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
18031
18032 1996-05-12 Richard Stallman <rms@gnu.org>
18033
18034 * bison.simple:
18035 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
18036
18037 1996-05-11 Richard Stallman <rms@gnu.org>
18038
18039 * src/bison.s1 (__yy_memcpy):
18040 Really reorder the args, as was supposedly done on Feb 14 1995.
18041 (yyparse): Calls changed accordingly.
18042
18043 1996-05-11 Richard Stallman <rms@gnu.org>
18044
18045 * Makefile.in (dist): Don't use $(srcdir).
18046
18047 * bison.simple (__yy_memcpy):
18048 Really reorder the args, as was supposedly done on Feb 14 1995.
18049 (yyparse): Calls changed accordingly.
18050
18051 1996-01-27 Richard Stallman <rms@gnu.org>
18052
18053 * src/output.c (output_rule_data):
18054 Test YYERROR_VERBOSE in the conditional
18055 around the definition of ttyname.
18056
18057 1995-12-29 Richard Stallman <rms@gnu.org>
18058
18059 * src/bison.s1:
18060 Fix line numbers in #line commands.
18061
18062 1995-12-29 Richard Stallman <rms@gnu.org>
18063
18064 * bison.simple:
18065 Fix line numbers in #line commands.
18066
18067 1995-12-27 Richard Stallman <rms@gnu.org>
18068
18069 * src/bison.s1 (YYPARSE_PARAM_DECL):
18070 In C++, make it always null.
18071 (YYPARSE_PARAM_ARG): New macro.
18072 (yyparse): Use YYPARSE_PARAM_ARG.
18073
18074 1995-12-27 Richard Stallman <rms@gnu.org>
18075
18076 * bison.simple (YYPARSE_PARAM_DECL):
18077 In C++, make it always null.
18078 (YYPARSE_PARAM_ARG): New macro.
18079 (yyparse): Use YYPARSE_PARAM_ARG.
18080
18081 1995-11-29 Richard Stallman <rms@gnu.org>
18082
18083 * doc/bison.texinfo:
18084 Describe literal string tokens, %raw, %no_lines, %token_table.
18085
18086 1995-11-29 Daniel Hagerty <hag@gnu.org>
18087
18088 * doc/bison.texinfo: Fixed update date
18089
18090 1995-10-16 Richard Stallman <rms@gnu.org>
18091
18092 * src/version.c: Version 1.25.
18093
18094 1995-10-16 Richard Stallman <rms@gnu.org>
18095
18096 * NEWS: *** empty log message ***
18097
18098 1995-10-16 Richard Stallman <rms@gnu.org>
18099
18100 * doc/bison.1, doc/bison.rnh:
18101 Add new options.
18102
18103 1995-10-15 Richard Stallman <rms@gnu.org>
18104
18105 * src/vmsgetargs.c, src/getargs.c:
18106 Added -n, -k, and -raw switches.
18107 (noparserflag, toknumflag, rawtoknumflag): New variables.
18108
18109 * src/symtab.h (SALIAS):
18110 New #define for adding aliases to %token.
18111 (struct bucket): Added `alias' field.
18112
18113 * src/reduce.c (reduce_grammar):
18114 Revise error message.
18115 (print_notices): Remove final `.' from error message.
18116
18117 * src/reader.c (reader_output_yylsp):
18118 New function.
18119 (readgram): Use `#if 0' around code that accepted %command
18120 inside grammar rules: The documentation doesn't allow it,
18121 and it will fail since the %command processors scan for the next %.
18122 (parse_token_decl): Extended the %token
18123 declaration to allow a multi-character symbol as an alias.
18124 (parse_thong_decl): New function.
18125 (read_declarations): Added %thong declarations.
18126 (read_declarations): Handle NOOP to deal with allowing
18127 % declarations as another means to specify the flags.
18128 (readgram): Allow %prec prior to semantics embedded in a rule.
18129 (skip_to_char, read_declarations, copy_definition)
18130 (parse_token_decl, parse_start_decl, parse_type_decl)
18131 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
18132 (get_type_name, copy_guard, copy_action, readgram)
18133 (get_type, packsymbols): Revised most error messages.
18134 Changed `fatal' to `warnxxx' to avoid aborting for error.
18135 Revised and use multiple warnxxx functions to avoid using VARARGS1.
18136 (read_declarations): Improve the error message for
18137 an invalid character. Do not abort.
18138 (read_declarations, copy_guard, copy_action): Use
18139 printable_version to avoid unprintable characters in printed output.
18140 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
18141 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
18142 Allow the type of a non-terminal can be given
18143 more than once, as long as all specifications give the same type.
18144
18145 * src/output.c:
18146 (output_headers, output_trailers, output, output_gram)
18147 (output_rule_data): Implement noparserflag variable.
18148 Implement toknumflag variable.
18149 (output): Call reader_output_yylsp to output LTYPESTR.
18150
18151 * src/main.c (main):
18152 If reader sees an error, don't process the grammar.
18153 (fatals): Updated to not use VARARGS1.
18154 (printable_version, int_to_string, warn, warni, warns, warnss)
18155 (warnsss): New error reporting functions. Avoid abort for error.
18156
18157 * src/lex.h:
18158 Added THONG and NOOP for alias processing.
18159 Added SETOPT for the new code that allows setting options with %flags.
18160
18161 * src/lex.c:
18162 Include getopt.h. Add some extern decls.
18163 (safegetc): New function to deal with EOF gracefully.
18164 (literalchar); new function to deal with reading \ escapes.
18165 (lex): Use literalchar.
18166 (lex): Implemented "..." tokens.
18167 (literalchar, lex, parse_percent_token): Made tokenbuffer
18168 always contain the token. This includes growing the token
18169 buffer while reading an integer.
18170 (parse_percent_token): Replaced if-else statement with percent_table.
18171 (parse_percent_token): Added % declarations as another
18172 way to specify the flags -n, -l, and -r. Also added hooks for
18173 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
18174 major changes to files.c.
18175 (lex) Retain in the incoming stream a character following
18176 an incorrect '/'.
18177 (skip_white_space, lex): Revised most error messages
18178 and changed fatal to warn to avoid aborting.
18179 (percent_table): Added %thong declarations.
18180
18181 * src/gram.h: Comment changes.
18182
18183 * src/files.c (openfiles, open_extra_files, done):
18184 Add faction flag
18185 and actfile file. Handle noparserflag. Both for -n switch.
18186
18187 * src/conflicts.c (resolve_sr_conflict):
18188 Remove use of alloca.
18189
18190 1995-06-01 Jim Meyering <meyering@gnu.org>
18191
18192 * doc/bison.texinfo: *** empty log message ***
18193
18194 1995-05-06 Richard Stallman <rms@gnu.org>
18195
18196 * src/bison.s1: Comment change.
18197
18198 1995-05-06 Richard Stallman <rms@gnu.org>
18199
18200 * bison.simple: Comment change.
18201
18202 1995-05-03 Richard Stallman <rms@gnu.org>
18203
18204 * src/version.c: Version now 1.24.
18205
18206 * src/bison.s1: Change distribution terms.
18207
18208 * src/version.c: Version now 1.23.
18209
18210 1995-05-03 Richard Stallman <rms@gnu.org>
18211
18212 * doc/bison.texinfo:
18213 Rewrite "Conditions for Using Bison".
18214 Update version to 1.24.
18215
18216 1995-05-03 Richard Stallman <rms@gnu.org>
18217
18218 * bison.simple: Change distribution terms.
18219
18220 1995-02-23 Richard Stallman <rms@gnu.org>
18221
18222 * src/files.c: Test __VMS_POSIX as well as VMS.
18223
18224 1995-02-14 Jim Meyering <meyering@gnu.org>
18225
18226 * src/bison.s1 (__yy_memcpy):
18227 Renamed from __yy_bcopy to avoid
18228 confusion. Reverse FROM and TO arguments to be consistent with
18229 those of memcpy.
18230
18231 1995-02-14 Jim Meyering <meyering@gnu.org>
18232
18233 * bison.simple (__yy_memcpy):
18234 Renamed from __yy_bcopy to avoid
18235 confusion. Reverse FROM and TO arguments to be consistent with
18236 those of memcpy.
18237
18238 1994-11-10 David J. MacKenzie <djm@gnu.org>
18239
18240 * NEWS: reformat
18241
18242 * NEWS: New file.
18243
18244 * Makefile.in (DISTFILES): Include NEWS.
18245
18246 * Makefile.in (DISTFILES):
18247 Include install-sh, not install.sh.
18248
18249 * configure.in: Update to Autoconf v2 macro names.
18250
18251 1994-10-05 David J. MacKenzie <djm@gnu.org>
18252
18253 * Makefile.in: fix typo
18254
18255 * Makefile.in (prefix, exec_prefix):
18256 Let configure set them.
18257
18258 1994-09-28 David J. MacKenzie <djm@gnu.org>
18259
18260 * Makefile.in: Set datadir to $(prefix)/share.
18261
18262 1994-09-15 Richard Stallman <rms@gnu.org>
18263
18264 * src/bison.s1:
18265 Update copyright notice and GPL version.
18266
18267 1994-09-15 Richard Stallman <rms@gnu.org>
18268
18269 * bison.simple:
18270 Update copyright notice and GPL version.
18271
18272 1994-07-12 Richard Stallman <rms@gnu.org>
18273
18274 * src/reduce.c, src/reader.c:
18275 entered into RCS
18276
18277 1994-05-05 David J. MacKenzie <djm@gnu.org>
18278
18279 * Makefile.in: entered into RCS
18280
18281 1994-03-26 Richard Stallman <rms@gnu.org>
18282
18283 * src/bison.s1: entered into RCS
18284
18285 1994-03-26 Richard Stallman <rms@gnu.org>
18286
18287 * bison.simple: entered into RCS
18288
18289 1994-03-25 Richard Stallman <rms@gnu.org>
18290
18291 * src/main.c: entered into RCS
18292
18293 1994-03-24 Richard Stallman <rms@gnu.org>
18294
18295 * src/conflicts.c: entered into RCS
18296
18297 1994-01-02 Richard Stallman <rms@gnu.org>
18298
18299 * Makefile.in: *** empty log message ***
18300
18301 1993-11-21 Richard Stallman <rms@gnu.org>
18302
18303 * src/bison.s1: *** empty log message ***
18304
18305 1993-11-21 Richard Stallman <rms@gnu.org>
18306
18307 * doc/bison.texinfo: entered into RCS
18308
18309 * doc/bison.texinfo: *** empty log message ***
18310
18311 1993-11-21 Richard Stallman <rms@gnu.org>
18312
18313 * bison.simple: *** empty log message ***
18314
18315 1993-10-25 David J. MacKenzie <djm@gnu.org>
18316
18317 * doc/bison.texinfo: *** empty log message ***
18318
18319 1993-10-19 Richard Stallman <rms@gnu.org>
18320
18321 * src/bison.s1: *** empty log message ***
18322
18323 1993-10-19 Richard Stallman <rms@gnu.org>
18324
18325 * bison.simple: *** empty log message ***
18326
18327 1993-10-14 Richard Stallman <rms@gnu.org>
18328
18329 * src/bison.s1: *** empty log message ***
18330
18331 1993-10-14 Richard Stallman <rms@gnu.org>
18332
18333 * bison.simple: *** empty log message ***
18334
18335 1993-09-14 David J. MacKenzie <djm@gnu.org>
18336
18337 * doc/bison.texinfo: *** empty log message ***
18338
18339 1993-09-13 Noah Friedman <friedman@gnu.org>
18340
18341 * Makefile.in: *** empty log message ***
18342
18343 1993-09-10 Richard Stallman <rms@gnu.org>
18344
18345 * src/conflicts.c: *** empty log message ***
18346
18347 * src/system.h: entered into RCS
18348
18349 1993-09-10 Richard Stallman <rms@gnu.org>
18350
18351 * doc/bison.1: entered into RCS
18352
18353 1993-09-06 Noah Friedman <friedman@gnu.org>
18354
18355 * src/version.c: entered into RCS
18356
18357 1993-09-06 Noah Friedman <friedman@gnu.org>
18358
18359 * Makefile.in: *** empty log message ***
18360
18361 1993-07-30 David J. MacKenzie <djm@gnu.org>
18362
18363 * Makefile.in: *** empty log message ***
18364
18365 1993-07-24 Richard Stallman <rms@gnu.org>
18366
18367 * src/bison.s1: *** empty log message ***
18368
18369 1993-07-24 Richard Stallman <rms@gnu.org>
18370
18371 * bison.simple: *** empty log message ***
18372
18373 1993-07-08 David J. MacKenzie <djm@gnu.org>
18374
18375 * Makefile.in: *** empty log message ***
18376
18377 1993-07-04 Richard Stallman <rms@gnu.org>
18378
18379 * src/bison.s1: *** empty log message ***
18380
18381 1993-07-04 Richard Stallman <rms@gnu.org>
18382
18383 * bison.simple: *** empty log message ***
18384
18385 1993-06-26 David J. MacKenzie <djm@gnu.org>
18386
18387 * src/getargs.c: entered into RCS
18388
18389 1993-06-26 David J. MacKenzie <djm@gnu.org>
18390
18391 * doc/bison.texinfo: *** empty log message ***
18392
18393 * doc/bison.1: New file.
18394
18395 1993-06-25 Richard Stallman <rms@gnu.org>
18396
18397 * src/getargs.c: New file.
18398
18399 1993-06-16 Richard Stallman <rms@gnu.org>
18400
18401 * src/bison.s1: *** empty log message ***
18402
18403 1993-06-16 Richard Stallman <rms@gnu.org>
18404
18405 * bison.simple: *** empty log message ***
18406
18407 1993-06-03 Richard Stallman <rms@gnu.org>
18408
18409 * src/bison.s1: New file.
18410
18411 1993-06-03 Richard Stallman <rms@gnu.org>
18412
18413 * doc/bison.texinfo: *** empty log message ***
18414
18415 1993-06-03 Richard Stallman <rms@gnu.org>
18416
18417 * bison.simple: New file.
18418
18419 1993-05-19 Richard Stallman <rms@gnu.org>
18420
18421 * doc/bison.texinfo: New file.
18422
18423 1993-05-07 Noah Friedman <friedman@gnu.org>
18424
18425 * Makefile.in: *** empty log message ***
18426
18427 1993-04-28 Noah Friedman <friedman@gnu.org>
18428
18429 * src/reader.c: *** empty log message ***
18430
18431 1993-04-23 Noah Friedman <friedman@gnu.org>
18432
18433 * src/alloc.h: entered into RCS
18434
18435 1993-04-20 David J. MacKenzie <djm@gnu.org>
18436
18437 * src/version.c: *** empty log message ***
18438
18439 * src/files.c, src/allocate.c:
18440 entered into RCS
18441
18442 * src/reader.c: *** empty log message ***
18443
18444 * src/lex.c: entered into RCS
18445
18446 * src/conflicts.c: New file.
18447
18448 * src/symtab.c: entered into RCS
18449
18450 * src/alloc.h: New file.
18451
18452 * src/LR0.c: entered into RCS
18453
18454 1993-04-18 Noah Friedman <friedman@gnu.org>
18455
18456 * src/reader.c: New file.
18457
18458 * src/version.c: *** empty log message ***
18459
18460 1993-04-18 Noah Friedman <friedman@gnu.org>
18461
18462 * Makefile.in: *** empty log message ***
18463
18464 1993-04-17 Noah Friedman <friedman@gnu.org>
18465
18466 * Makefile.in: *** empty log message ***
18467
18468 1993-04-15 Richard Stallman <rms@gnu.org>
18469
18470 * src/main.c, src/files.c:
18471 New file.
18472
18473 1993-04-15 Noah Friedman <friedman@gnu.org>
18474
18475 * configure.in: entered into RCS
18476
18477 * configure.in: *** empty log message ***
18478
18479 * configure.in: New file.
18480
18481 1993-04-14 Richard Stallman <rms@gnu.org>
18482
18483 * Makefile.in: New file.
18484
18485 1993-04-13 Richard Stallman <rms@gnu.org>
18486
18487 * src/version.c: New file.
18488
18489 1993-03-25 Richard Stallman <rms@gnu.org>
18490
18491 * src/output.c: entered into RCS
18492
18493 1992-09-25 Richard Stallman <rms@gnu.org>
18494
18495 * configure.bat: entered into RCS
18496
18497 1992-06-22 Richard Stallman <rms@gnu.org>
18498
18499 * src/vmsgetargs.c: entered into RCS
18500
18501 1992-06-22 Richard Stallman <rms@gnu.org>
18502
18503 * doc/bison.rnh: entered into RCS
18504
18505 1992-04-20 David J. MacKenzie <djm@gnu.org>
18506
18507 * README: entered into RCS
18508
18509 1992-01-22 Richard Stallman <rms@gnu.org>
18510
18511 * src/machine.h: entered into RCS
18512
18513 1991-12-21 Richard Stallman <rms@gnu.org>
18514
18515 * src/lalr.c, src/closure.c:
18516 entered into RCS
18517
18518 1991-12-20 Richard Stallman <rms@gnu.org>
18519
18520 * src/state.h: entered into RCS
18521
18522 1991-12-18 Richard Stallman <rms@gnu.org>
18523
18524 * src/print.c, src/nullable.c, src/derives.c:
18525 entered into RCS
18526
18527 1991-11-03 David J. MacKenzie <djm@gnu.org>
18528
18529 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
18530 entered into RCS
18531
18532 1988-09-09 Richard Stallman <rms@gnu.org>
18533
18534 * src/bison.hairy: entered into RCS
18535
18536 1987-12-16 Richard Stallman <rms@gnu.org>
18537
18538 * REFERENCES: entered into RCS
18539
18540
18541 -----
18542
18543 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
18544 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
18545 Free Software Foundation, Inc.
18546
18547 Copying and distribution of this file, with or without
18548 modification, are permitted provided the copyright notice and this
18549 notice are preserved.
18550
18551 $Id$