]> git.saurik.com Git - bison.git/blob - ChangeLog
Change %merge result type clash warnings to errors. Discussed at
[bison.git] / ChangeLog
1 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Change %merge result type clash warnings to errors. Discussed at
4 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
5 * src/reader.c (record_merge_function_type): Use complain_at.
6 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7 declared later): Update test case results.
8
9 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
10
11 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
12 to be in alphabetical order.
13 (trace_args): Spelling fixes.
14
15 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
16
17 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
18 so they don't collide with user-defined macros.
19 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
20 this was never guaranteed, and now that we're using gnulib stdint,
21 which defines int_fast16_t to long int, the problem is exposed.
22
23 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
24
25 * data/c.m4 (b4_basename): Simplify a bit, since we don't
26 need the full POSIX semantics (and weren't implementing them
27 anyway).
28
29 Adjust to Autoconf 2.60 and today's gnulib.
30 * bootstrap (gnulib_modules): Add stdint.
31 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
32 no longer copies it.
33 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
34 since stdint needs the former and wcwidth (which is now required
35 by mbswidth) needs the latter.
36 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
37 work around a compatibility glitch between gettext 0.14.6 and
38 Autoconf 2.60.
39 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
40 Do not check for uintptr_t, since new stdint module does the right
41 thing.
42 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
43 Add stdint.h, stdint_.h, wcwidth.h.
44 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
45 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
46 stdint.m4, wchar_t.m4, wcwidth.m4.
47 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
48 usual order for ../lib/*.h files.
49 (file_name_split): Use last_component, not base_name, to adjust
50 to gnulib changes.
51 * src/parse-gram.h: Include <strverscmp.h> in the usual order
52 for ../lib/*.h files.
53 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
54 Define unconditionally, since we now assume the stdint module.
55 * src/scan-skel.l: Include <dirname.h>.
56 (BASE_QPUTS): Use last_component, not base_name.
57 * src/system.h: Include <unlocked-io.h> in the usual order
58 for ../lib/*.h files. Include <stdint.h> unconditionally,
59 since we now use the stdint module.
60 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
61 HAVE_UINTPTR_T, since we now use the stdint module.
62 (base_name): Remove decl, since files now include <dirname.h>
63 to get the decl.
64
65 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
66
67 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
68 New, default to 1.
69 * data/yacc.c, data/glr.c, data/location.cc: Use them.
70 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
71 default.
72 * tests/calc.at: Adjust.
73
74 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
75
76 * data/c.m4 (b4_basename): New.
77 (b4_syncline): Also output the location of its invocation (from
78 the skeleton).
79 (b4_user_action, b4_define_user_action, b4_user_actions)
80 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
81 (b4_user_stype): New.
82 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
83
84 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
85
86 In the grammar file, the first column is 1 not 0 on the first line as
87 on every other line.
88 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
89 * tests/input.at (Torturing the Scanner): Update output.
90
91 * src/scan-gram.l (scanner_cursor): Declare it static.
92
93 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
94
95 In warnings, say "previous declaration" rather than "first
96 declaration".
97 * src/symtab.c (redeclaration): Do that here.
98 * src/reader.c (record_merge_function_type): In the case of a result
99 type clash, report the previous declaration rather than the very first
100 one in the grammar file.
101 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
102 declared later): Add a third declaration to check this behavior.
103 * tests/input.at (Incompatible Aliases): Update output.
104
105 2006-06-27 Akim Demaille <akim@epita.fr>
106
107 * doc/Doxyfile.in: New.
108 * doc/Makefile.am: Use it.
109 * src/lalr.h, src/symtab.h: Initial doxygenation.
110
111 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
112
113 Don't miss %merge result type warnings just because the LHS types are
114 declared after the %merge. This continues the effort of the previous
115 patch.
116 * src/reader.c (get_merge_function): Don't set the merger type yet.
117 (record_merge_function_type): New function for setting the merger type
118 and checking for clashes.
119 (grammar_current_rule_merge_set): Set the location of the %merge for
120 the current rule.
121 (packgram): Invoke record_merge_function_type for each rule now that
122 all symbol type declarations have been parsed.
123 * src/reader.h (merger_list.type_declaration_location): New member
124 storing the location of the first %merge from which the type for this
125 merging function was derived.
126 * src/symlist.h (symbol_list.merger_declaration_location): New member
127 storing the location of a rule's %merge, if any.
128 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
129 declared later): New test to catch the error fixed by the above patch.
130
131 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
132
133 Get action warnings (grammar_rule_check) right even when symbol
134 declarations appear after the rules. Discussed at
135 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
136 and
137 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
138 Don't mistake the type of $$ in a midrule to be that of its parent
139 rule's $$.
140 * src/reader.c (grammar_current_rule_end): Don't invoke
141 grammar_rule_check yet since not all symbol declarations may have been
142 parsed yet.
143 (grammar_midrule_action): Likewise.
144 Don't record whether the midrule's $$ has been used yet since actions
145 haven't been translated yet.
146 Record the midrule's parent rule and its RHS index within the parent
147 rule.
148 (grammar_current_rule_action_append): Don't translate the action yet
149 since not all symbol declarations may have been parsed yet and, thus,
150 warnings about types for $$, $n, @$, and @n can't be reported yet.
151 (packgram): Translate the action and invoke grammar_rule_check now that
152 all symbol declarations have been parsed.
153 * src/scan-code.l (handle_action_dollar): Now that this is invoked
154 after parsing the entire grammar file, the symbol list here in the case
155 of a midrule is actually the midrule's empty RHS, so reference its
156 parent rule's RHS where necessary.
157 On the other hand, now that you can already know it's a midrule, you
158 aren't forced to think $$ has the same type as its parent rule's $$.
159 (handle_action_at): In the case of a midrule, reference the parent rule
160 where necessary.
161 * src/symlist.c (symbol_list_new): Initialize new midrule-related
162 members.
163 (symbol_list_length): Now that this is invoked after all rules have
164 been parsed, a NULL symbol (rather than a NULL symbol list node)
165 terminates a rule. symbol_list_print already does this correctly.
166 * src/symlist.h (symbol_list.midrule_parent_rule,
167 symbol_list.midrule_parent_rhs_index): New members so that midrules can
168 remember their relationships with their parents.
169 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
170 fixed by the above patch.
171 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
172 implementing...
173 (Unused values): ... this old test case and...
174 (Unused values before symbol declarations): ... this new test case.
175 This one is the same as `Unused values' except that all symbol
176 declarations appear after the rules in order to catch the rest of the
177 errors fixed by the above patch.
178
179 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
180
181 More cleanup.
182 * src/reader.c (current_rule): Declare it static since it's no longer
183 used outside this file.
184 (grammar_current_rule_action_append): Remove redundant arguments from
185 translate_rule_action invocation.
186 * src/reader.h (current_rule): Remove this unused extern.
187 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
188 * src/scan-code.l (translate_rule_action): Likewise.
189
190 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
191
192 Clean up yesterday's patch.
193 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
194 to...
195 * src/reader.c (grammar_current_rule_action_append): ... here for
196 consistency with grammar_current_rule_symbol_append.
197 * tests/regression.at (Braced code in declaration in rules section):
198 Make yyerror and yylex static as usual.
199
200 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
201
202 Fix bug that mistakes braced code in a declaration in the rules section
203 to be a rule action. Mentioned at
204 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
205 * src/scan-gram.l: Move midrule action detection from the start of the
206 scanning of any braced code to...
207 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
208 action. For readability, use $2 and @2 rather than the equivalent
209 global variables.
210 * tests/regression.at (Braced code in declaration in rules section):
211 New test to catch the error fixed by the above patch.
212
213 Work on code readability some.
214 * src/scan-code.l (current_rule): Get rid of this misleading and
215 redundant declaration: it's actually extern'ed in reader.h.
216 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
217 translate_action): Add a rule argument and use it instead of the global
218 current_rule.
219 (translate_rule_action): This already receives current_rule through an
220 argument, so pass it on to translate_action instead of assigning
221 current_rule to current_rule.
222 (translate_symbol_action, translate_code): Pass rule = NULL to
223 translate_action.
224
225 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
226
227 Rename %before-definitions to %start-header and %after-definitions to
228 %end-header. Don't use these declarations to separate pre-prologue
229 blocks from post-prologue blocks. Add new order-independent
230 declarations %before-header and %after-header as alternatives to the
231 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
232 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
233 * NEWS (2.3+): Update for these changes.
234 * data/glr.c (b4_before_definitions): Update to...
235 (b4_start_header): ... this.
236 (b4_after_definitions): Update to...
237 (b4_end_header): ... this.
238 * data/glr.cc: Likewise.
239 * data/lalr1.cc: Likewise.
240 * data/yacc.c: Likewise.
241 * doc/bison.texinfo (The prologue): Update names, and replace remaining
242 prologue blocks with %*-header declarations.
243 (Calc++ Parser): Likewise.
244 (Bison Declaration Summary): Update names.
245 (Bison Symbols): Update description.
246 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
247 (PERCENT_END_HEADER): ... this.
248 (PERCENT_BEFORE_DEFINITIONS): Update to...
249 (PERCENT_START_HEADER): ... this.
250 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
251 (declaration): Update token names and m4 macro names.
252 When parsing %end-header and %start-header, invoke translate_code
253 before muscle_code_grow, and no longer set global booleans to remember
254 whether these declarations have been seen.
255 Parse new %after-header and %before-header.
256 * src/reader.c (before_definitions, after_definitions): Remove.
257 (prologue_augment): Accept a new bool argument to specify whether to
258 augment the pre-prologue or post-prologue.
259 * src/reader.h (before_definitions, after_definitions): Remove these
260 extern's.
261 (prologue_augment): Add new bool argument.
262 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
263 (PERCENT_END_HEADER): ... this.
264 (PERCENT_BEFORE_DEFINITIONS): Update to...
265 (PERCENT_START_HEADER): ... this.
266 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
267 * tests/actions.at (Printers and Destructors): Update names.
268
269 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
270
271 Add comparison operators for C++ location classes. Discussed at
272 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
273 * data/c++.m4 (b4_define_location_comparison): New boolean %define
274 declaration indicating whether filename_type has an operator==. If
275 filename_type is `std::string', it defaults to `1', `0' otherwise.
276 * data/location.cc: Iff b4_define_location_comparison is `1', add
277 operator== and operator!= for class position and for class location.
278
279 Some minor fixes.
280 * src/scan-action.l: Remove unused file.
281 * src/symtab.c (symbol_printer_set): Use printer_location not
282 destructor_location.
283 * src/symtab.h (struct symbol): Replace incorrect source comment for
284 printer members.
285 * tests/input.at (Incompatible Aliases): Update output with correct
286 printer location.
287
288 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
289
290 Don't put the pre-prologue in the header file. For the yacc.c code
291 file and the glr.c header and code files, move the pre-prologue before
292 the token definitions. Add new %before-definitions and
293 %after-definitions to declare code that will go in both the header file
294 and code file. Discussed at
295 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
296 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
297 and
298 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
299 * NEWS (2.3+): Describe these changes.
300 * data/glr.c (b4_pre_prologue): Move from within to before...
301 (b4_shared_declarations): ... this.
302 Add new b4_before_definitions before b4_token_enums.
303 Add new b4_after_definitions at the end.
304 * data/glr.cc (b4_pre_prologue): Replace with...
305 (b4_before_definitions): ... this in the header file.
306 (b4_after_definitions): New near the end of the header file.
307 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
308 code file right before including the header file.
309 (b4_before_definitions): New in the previous position of
310 b4_pre_prologue in the header file.
311 (b4_after_definitions): New near the end of the header file.
312 * data/yacc.c: Clean up some m4 quoting especially in the header file.
313 (b4_token_enums_defines): In the code file, move to right before
314 YYSTYPE for consistency with the header file.
315 (b4_before_definitions): New right before b4_token_enums_defines in
316 both the header and code file.
317 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
318 header and code file.
319 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
320 of prologues for %union dependencies.
321 (Bison Declaration Summary): In %defines description, mention the
322 effect of %before-definitions and %after-definitions on the header
323 file.
324 (Calc++ Parser): Forward declare driver in a %before-definitions rather
325 than in the pre-prologue so that make check succeeds.
326 (Bison Symbols): Add entries for %before-definitions and
327 %after-definitions.
328 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
329 %before-definitions.
330 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
331 (declaration): Parse those declarations and append to
332 b4_before_definitions and b4_after_definitions, respectively.
333 * src/reader.c (before_definitions, after_definitions): New bools to
334 track whether those declarations have been seen.
335 (prologue_augment): Add to the post-prologue if %union,
336 %before-definitions, or %after-definitions has been seen.
337 * src/reader.h (before_definitions, after_definitions): New extern's.
338 * src/scan-gram.l: Scan the new declarations.
339 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
340 prologue block in a %before-definitions or a %after-definitions based
341 on whether the %union is declared.
342 * tests/regression.at (Early token definitions with --yacc, Early token
343 definitions without --yacc): Move tests for token definitions into the
344 post-prologue since token names are no longer defined in the
345 pre-prologue.
346
347 2006-06-20 Akim Demaille <akim@epita.fr>
348
349 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
350 (symbol_get): Use it.
351 * src/parse-gram.y: Use it.
352
353 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
354
355 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
356 build succeeds when configured with --enable-gcc-warnings.
357
358 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
359
360 * src/parse-gram.y (char_name): New function.
361 (CHAR, STRING, string_content): For %printer, properly escape.
362 (ID): Prefer fputs to fprintf.
363 (id): Reindent to be consistent with other rules.
364 Properly quote char.
365
366 The Translation Project changed its way of publishing translations
367 to maintainers. I haven't received any responses to my request
368 for supporting the old way, or for documenting the new way. I
369 have modified 'bootstrap' to use screen scraping
370 (in this case, HTML scraping). This is unreliable and inelegant,
371 but I don't see any better way. Yuck.
372 * bootstrap (TP_URL, WGET_COMMAND): New vars.
373 (get_translations): New function, which uses HTML scraping to
374 deduce locations of latest translations.
375 Use this function to grab both bison and bison-runtime .po files.
376 Don't bother priming the pump for the runtime-po domain any more,
377 as it's now translated better than bison is.
378
379 2006-06-19 Akim Demaille <akim@epita.fr>
380
381 * src/scan-gram.l: No longer "parse" things after `%union' until
382 `{'. Rather, return a single "%union" token.
383 No longer make symbols: return strings, and leave the conversion
384 to symbols to the parser.
385 (SC_PRE_CODE, token_type): Remove.
386 * src/parse-gram.y (%union): New field `character'.
387 Sort tokens.
388 (CHAR): New token.
389 (ID, ID_COLON): Now that the scanner no longer makes them
390 identifiers, adjust all uses to invoke symbol_get.
391 (id_colon): New, wraps the conversion from string to symbol.
392 (%union): Accept a possible union_name.
393 (symbol): Now can be a char.
394 * data/c.m4 (b4_union_name): Leave a default value.
395 * data/glr.c, data/yacc.c: Use it.
396
397 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
398
399 For associating token numbers with token names for "yacc.c", don't use
400 #define statements unless `--yacc' is specified; always use enum
401 yytokentype. Most important discussions start at:
402 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
403 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
404 and
405 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
406 * NEWS (2.3+): Mention.
407 * data/c.m4 (b4_yacc_if): New.
408 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
409 token #define's.
410 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
411 on token name definitions.
412 * src/getargs.c (usage): Capitalize `Yacc' in English.
413 * src/output.c (prepare): Define b4_yacc_flag.
414 * tests/regression.at (Early token definitions): Test that tokens names
415 are defined before the pre-prologue not just before the post-prologue.
416 Remove this test case and copy to...
417 (Early token definitions with --yacc): ... this to test #define's.
418 (Early token definitions without --yacc): ... and this to test enums.
419
420 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
421
422 * NEWS: Reword the post-2.3 change to not be so optimistic about
423 removing the old "look-ahead" spelling.
424 Update previous look-ahead/lookahead change reports.
425 * REFERENCES: look-ahead -> lookahead (since that's
426 what he actually wrote).
427 * doc/refcard.tex: look ahead -> lookahead,
428 look-ahead -> lookahead
429
430 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
431
432 For consistency, use `lookahead' instead of `look-ahead' or
433 `look_ahead'. Discussed starting at
434 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
435 and then at
436 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
437 * NEWS: For the next release, note the change to `--report'.
438 * TODO, doc/bison.1: Update English.
439 * doc/bison.texinfo: Update English.
440 (Understanding Your Parser, Bison Options): Document as
441 `--report=lookahead' rather than `--report=look-ahead'.
442 * src/conflicts.c: Update English in comments.
443 (lookahead_set): Rename from look_ahead_set.
444 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
445 (resolve_sr_conflict): Rename local look_ahead_tokens to
446 lookahead_tokens, and update other uses.
447 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
448 count_rr_conflicts, conflicts_free): Update uses.
449 * src/getargs.c (report_args): Move "lookahead" before alternate
450 spellings.
451 (report_types): Update uses.
452 (usage): For `--report' usage description, state `lookahead' spelling
453 rather than `look-ahead'.
454 * src/getargs.h (report.report_lookahead_tokens): Rename from
455 report_look_ahead_tokens.
456 * src/lalr.c: Update English in comments.
457 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
458 (state_lookahead_tokens_count): Rename from
459 state_look_ahead_tokens_count.
460 Rename local n_look_ahead_tokens to n_lookahead_tokens.
461 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
462 Rename local n_look_ahead_tokens to n_lookahead_tokens.
463 Update other uses.
464 Update English in output.
465 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
466 * src/print.c: Update English in comments.
467 (lookahead_set): Rename from look_ahead_set.
468 (print_reduction): Rename argument lookahead_token from
469 look_ahead_token.
470 (print_core, state_default_rule, print_reductions, print_results):
471 Update uses.
472 * src/print_graph.c: Update English in comments.
473 (print_core): Update uses.
474 * src/state.c: Update English in comments.
475 (reductions_new): Update uses.
476 (state_rule_lookahead_tokens_print): Rename from
477 state_rule_look_ahead_tokens_print, and update other uses.
478 * src/state.h: Update English in comments.
479 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
480 (state_rule_lookahead_tokens_print): Rename from
481 state_rule_look_ahead_tokens_print.
482 * src/tables.c: Update English in comments.
483 (conflict_row, action_row): Update uses.
484 * tests/glr-regression.at
485 (Incorrect lookahead during deterministic GLR,
486 Incorrect lookahead during nondeterministic GLR): Rename
487 print_look_ahead to print_lookahead.
488 * tests/torture.at: Update English in comments.
489 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
490 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
491 (Many lookahead tokens): Update uses.
492 * data/glr.c: Update English in comments.
493 * lalr1.cc: Likewise.
494 * yacc.c: Likewise.
495 * src/conflicts.h: Likewise.
496 * src/lalr.h: Likewise.
497 * src/main.c: Likewise.
498 * src/output.c: Likewise.
499 * src/parse-gram.c: Likewise.
500 * src/tables.h: Likewise.
501 * tests/calc.at: Likewise.
502
503 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
504
505 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
506
507 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
508
509 * TODO: Add request from Nelson H. F. Beebe to be able to install
510 Bison without installing the yacc script.
511
512 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
513
514 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
515 and yytext if they're already #define'd.
516 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
517 * src/scan-code-c.c: ... here.
518 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
519 <config.h>.
520
521 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
522
523 Get Bison to build again when configured with --enable-gcc-warnings.
524 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
525 missing #include's.
526 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
527 loc argument as it shadows a global.
528 * src/scan-gram.l: Remove stray comma that prevents boundary_set
529 invocation.
530
531 * src/.cvsignore: Add scan-code.c.
532
533 2006-06-07 Akim Demaille <akim@epita.fr>
534
535 * src/scan-gram.l: Move the "add a trailing ; to actions" code
536 to...
537 * src/scan-code.l: here.
538 * tests/input.at (Torturing the Scanner): Fix another location
539 error.
540
541 2006-06-07 Akim Demaille <akim@epita.fr>
542
543 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
544
545 2006-06-06 Akim Demaille <akim@epita.fr>
546
547 Extract the parsing of user actions from the grammar scanner.
548 As a consequence, the relation between the grammar scanner and
549 parser is much simpler. We can also split "composite tokens" back
550 into simple tokens.
551 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
552 * src/scan-gram.l (add_column_width, adjust_location): Move to and
553 rename as...
554 * src/location.h, src/location.c (add_column_width)
555 (location_compute): these.
556 Fix the column count: the initial column is 0.
557 (location_print): Be robust to ending column being 0.
558 * src/location.h (boundary_set): New.
559 * src/main.c: Adjust to scanner_free being renamed as
560 gram_scanner_free.
561 * src/output.c: Include scan-code.h.
562 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
563 Use boundary_set.
564 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
565 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
566 which is now, again, a separate token.
567 Adjust all dependencies.
568 Whereever actions with $ and @ are used, use translate_code.
569 (action): Remove this nonterminal which is now useless.
570 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
571 (grammar_current_rule_action_append): Use translate_code.
572 (packgram): Bound check ruleno, itemno, and rule_length.
573 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
574 (last_string, last_braced_code_loc, max_left_semantic_context)
575 (scanner_initialize, scanner_free, scanner_last_string_free)
576 (gram_out, gram_lineno, YY_DECL_): Move to...
577 * src/scan-gram.h: this new file.
578 (YY_DECL): Rename as...
579 (GRAM_DECL): this.
580 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
581 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
582 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
583 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
584 Move these declarations, and...
585 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
586 these to...
587 * src/flex-scanner.h: this new file.
588 * src/scan-gram.l (rule_length, rule_length_overflow)
589 (increment_rule_length): Remove.
590 (last_braced_code_loc): Rename as...
591 (gram_last_braced_code_loc): this.
592 Adjust to the changes of the parser.
593 Move all the handling of $ and @ into...
594 * src/scan-code.l: here.
595 * src/scan-gram.l (handle_dollar, handle_at): Remove.
596 (handle_action_dollar, handle_action_at): Move to...
597 * src/scan-code.l: here.
598 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
599 scan-code.h, scan-code-c.c, scan-gram.h.
600 (EXTRA_bison_SOURCES): Add scan-code.l.
601 (BUILT_SOURCES): Add scan-code.c.
602 (yacc): Be robust to white spaces.
603
604 * tests/conflicts.at, tests/input.at, tests/reduce.at,
605 * tests/regression.at: Adjust the column numbers.
606 * tests/regression.at: Adjust the error message.
607
608 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
609
610 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
611 Use Akim's wording from
612 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
613
614 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
615
616 Between Bison releases, manually append `+' to the previous Bison
617 release number, and use that as a signal to automatically print the
618 ChangeLog's CVS Id keyword from --version. Discussed starting at
619 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
620 * ChangeLog: Add Id header.
621 * configure.ac (AC_INIT): Append `+' to `2.3'.
622 * src/.cvsignore: Add revision.c.
623 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
624 (BUILT_SOURCES): Add revision.c.
625 (revision.c): New target rule. This file defines a new global variable
626 named revision. It initializes it with either the Id from ChangeLog
627 or, if VERSION doesn't contain `+', with the empty string.
628 * src/getargs.c (version): Print the value of revision.
629 * src/revision.h: Extern revision.
630
631 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
632
633 * NEWS: Version 2.3.
634 * configure.ac (AC_INIT): Likewise.
635
636 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
637
638 * data/glr.c (YYRECOVERING): Define to be a function-like macro
639 with no arguments, not as an object-like macro. This is for
640 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
641 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
642 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
643 Document this.
644
645 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
646
647 * src/getargs.c (usage): Back out yesterday's modification of the
648 --help output so that we don't have to wait for translation before
649 releasing 2.3.
650
651 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
652
653 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
654 Problem reported by Akim Demaille.
655
656 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
657
658 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
659
660 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
661
662 * data/yacc.c (yy_reduce_print): Omit trailing white space in
663 generated source code. Problem reported by Frans Englich in
664 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
665
666 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
667
668 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
669 shell, not within 'make', so that 'make' by an ordinary builder
670 (using GNU make) does not worry about configuring gzip. This also
671 works around a bug reported independently by Keith Thompson and by
672 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
673 stderr rather than stdout, messing up the build logs.
674
675 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
676
677 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
678 to make sure that YYID will never be unused. This fixes a 'make
679 maintainer-check' failure caused by the recent changes to the 'Trivial
680 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
681 not used.
682 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
683
684 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
685
686 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
687 state before an empty RHS is always resolved here. Only the location
688 of that state is guaranteed to be resolved, and that's enough. This
689 fixes the remaining bug reported by Derek M. Jones in
690 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
691 * tests/glr-regression.at (Uninitialized location when reporting
692 ambiguity): Test the above case.
693 Also, the embedded comments in this test case claim it checks the case
694 of an empty RHS that has inherited the initial location. However, the
695 corresponding LHS was already resolved, so yyresolveLocations didn't
696 actually have reason to modify it. Fix this by forcing
697 nondeterministic operation at the beginning of the parse.
698
699 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
700
701 * data/c.m4 (b4_yy_symbol_print_generate):
702 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
703 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
704 of the bugs reported today by Derek M Jones in
705 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
706 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
707 defined to be a type name without parens or brackets.
708 (Location Type): Similarly for YYLTYPE.
709 * tests/regression.at (Trivial grammars): Put in a test for this
710 bug that will be caught by 'make maintainer-check' (though not,
711 alas, by 'make check' unless your compiler is picky).
712
713 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
714
715 * NEWS: Version 2.2.
716 * configure.ac (AC_INIT): Likewise.
717
718 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
719
720 * data/glr.c (yyreportTree): Make room in yystates for the state
721 preceding the RHS. This fixes the segmentation fault reported by Derek
722 M. Jones in
723 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
724 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
725 to the user. Reported for yyreportTree by Derek M. Jones later in the
726 same thread.
727 * THANKS: Add Derek M. Jones.
728 Update my email address.
729 Fix typo in Steve Murphy's name.
730
731 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
732
733 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
734 checking against YYLAST that caused the parser to miss a potential
735 alternative in its diagnostic.
736 Problem reported by Maria Jose Moron Fernandez in
737 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
738 * data/lalr1.cc (yysyntax_error_): Likewise.
739 * data/yacc.c (yysyntax_error): Likewise.
740 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
741 tokens, in case we run into an older C compiler.
742 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
743 Use them to check for the off-by-one error fixed above.
744
745 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
746 YYSIZE_T, not size_t.
747 * tests/regression.at (Trivial grammars): New test, to catch
748 the error fixed by the above patch.
749
750 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
751
752 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
753 scheme.
754 Reported by Steve Murphy.
755
756 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
757
758 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
759 * data/glr.cc: b4_location_flag is now b4_locations_flag.
760
761 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
762
763 Implement --trace=m4.
764 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
765 * src/output.c (output_skeleton): When set, pass -dV to m4.
766
767 Factor the handling of flags in m4.
768 * src/output.c (prepare): Rename the muscle names debug, defines,
769 error_verbose to debug_flag, defines_flag, error_verbose_flag.
770 * data/c.m4: Adjust.
771 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
772 Use b4_define_flag_if to define other b4_FLAG_if macros.
773 (b4_location_if): As a consequence, rename as...
774 (b4_locations_if): this, for consistency.
775 Adjust all the skeletons.
776
777 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
778
779 * etc/bench.pm: Shorten bench names.
780
781 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
782
783 * src/output.h, src/output.c (error_verbose): Move to...
784 * src/getargs.h, src/getargs.c: here.
785 Sort the flags.
786 Adjust dependencies.
787
788 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
789
790 * data/c.m4 (b4_copyright): Put the special exception for Bison
791 skeletons here, so we don't have to put it in each skeleton. All
792 uses changed. Suggested by Akim Demaille. Also, wrap the
793 copyright notice, in case it is longer than 80 columns. Replace
794 comma by newline after title.
795
796 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
797
798 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
799 incompatibility, not a bug. Mention that it wasn't fixed as of
800 flex 2.5.33.
801
802 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
803
804 * examples/extexi: Enforce the precedence of concatenation over
805 >>.
806 Reported by Tommy Nordgren.
807
808 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
809
810 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
811 with the member "token".
812 Reported by Martin Nylin.
813
814 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
815
816 * data/glr.c: Switch to Bison 2.2 special-exception language in
817 the copyright notice. Use more-regular format for titles and
818 copyright notices.
819 * data/glr.cc: Likewise.
820 * data/location.cc: Likewise.
821 * data/yacc.cc: Likewise.
822 * doc/bison.texinfo (Conditions): Document this.
823 * NEWS: likewise. Upgrade version to 2.2.
824
825 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
826
827 * data/glr.cc: Remove dead code.
828
829 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
830
831 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
832 that variable and the line breaks the bootstrap. Problem reported
833 by Juan M. Guerrero.
834
835 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
836
837 * doc/bison.texinfo (Multiple start-symbols): New.
838
839 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
840
841 * etc/README, etc/bench.pl: New.
842
843 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
844
845 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
846 rule.
847 Reported by Mickael Labau.
848 * tests/input.at (Torturing the Scanner): Test it.
849
850 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
851
852 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
853 Problem reported by Bob Rossi.
854
855 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
856
857 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
858 and didn't really work.
859 For the index, use @ifnotinfo, not @iftex.
860 Minor cleanups of spacing and terminology.
861
862 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
863
864 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
865 of AT_NAME_PREFIX when %name-prefix is not used.
866
867 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
868
869 Apply --prefix to C++ skeletons too: they change the namespace.
870 The test suite already exercize these cases.
871 * data/c++.m4 (b4_namespace): New.
872 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
873 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
874 * data/yacc.c, data/glr.c: Remove a useless `[]'.
875 * doc/bison.texinfo: Document it.
876 (Option Cross Key): Use @multitable in all formats. It looks
877 nicer, even in TeX outputs.
878 (Rules): Use the same code whatever the output type is.
879 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
880 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
881 * tests/calc.at: Use it, instead of hard coding `yy'.
882
883 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
884
885 * TODO: Remove dead items.
886
887 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
888
889 * doc/FAQ: Remove, merged into...
890 * doc/bison.texinfo (FAQ): this.
891 * doc/Makefile.am (EXTRA_DIST): Adjust.
892
893 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
894
895 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
896 even if empty.
897 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
898 * doc/bison.texinfo (Calc++ Scanner): Use it.
899
900 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
901
902 Fix two nits reported by twlevo, plus one more that I discovered.
903
904 * src/assoc.h (assoc_to_string): Give a name to the arg, as
905 this is the usual Bison style.
906 * src/location.h (location_print): Likewise.
907
908 * src/reader.h (token_name): Likewise.
909
910 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
911
912 Fix some nits reported by twlevo.
913 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
914 and "POSIX". Use more-modern syntax for URLs. Mention C++
915 and ask for Java. Don't hardwire OS version numbers. Add
916 copyright notice.
917 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
918 * src/conflicts.c (solved_conflicts_obstack): Now static.
919
920 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
921
922 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
923 page. Say "you can use it" not "you may use it" as on the web page;
924 we're describing capabilities not granting permission.
925
926 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
927
928 * data/glr.c (yyresolveLocations): Rename local variables to avoid
929 shadowing warnings. Use usual patter for iterating through RHS.
930 * tests/glr-regression.at
931 (Uninitialized location when reporting ambiguity):
932 Modify yylex so that it uses its argument, rather than trying
933 to rely on ARGSUSED (which doesn't work for gcc with warnings).
934 const char -> char const.
935
936 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
937 Don't use tabs inside commands; it messes up 'ps'.
938 Problem reported by twlevo.
939
940 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
941
942 * tests/glr-regression.at (Uninitialized location when reporting
943 ambiguity): New test case.
944 * data/glr.c (yyresolveLocations): New function, which uses
945 YYLLOC_DEFAULT.
946 (yyresolveValue): Invoke yyresolveLocations before reporting an
947 ambiguity.
948 * doc/bison.texinfo (Default Action for Locations): Note
949 YYLLOC_DEFAULT's usage for ambiguity locations.
950 (GLR Semantic Actions): Cross-reference those notes.
951
952 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
953
954 * tests/glr-regression.at (Leaked semantic values when reporting
955 ambiguity): Remove unnecessary union and type declarations.
956 (Leaked lookahead after nondeterministic parse syntax error): New test
957 case.
958 * data/glr.c (yyparse): Check for zero stacks remaining before
959 attempting to shift the lookahead so that you don't lose it.
960
961 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
962
963 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
964 * tests/glr-regression.at (Leaked semantic values when reporting
965 ambiguity): New test case.
966 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
967 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
968 now unnecessary yystackp parameter.
969 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
970 destructors can be called.
971
972 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
973 in existing testcases.
974
975 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
976
977 Don't leak semantic values for parent RHS when a user action cuts the
978 parser, and clean up related code a bit.
979 * tests/glr-regression.at (Leaked merged semantic value if user action
980 cuts parse): Rename to...
981 (Leaked semantic values if user action cuts parse): ... this. Add check
982 for leaked parent RHS values.
983 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
984 between an unresolved state (non-empty chain of semantic options) and
985 an incomplete one (signaled by an empty chain).
986 (yyresolveStates): Document the interface. Move all manipulation of a
987 successfully or unsuccessfully resolved yyGLRState to...
988 (yyresolveValue): ... here so that yyresolveValue always leaves a
989 yyGLRState with consistent data and thus is easier to understand.
990 Remove the yyvalp and yylocp parameters since they are always just
991 taken from the yys parameter. When reporting a discarded merged value
992 in debugging output, note that it is incompletely merged. Document the
993 interface.
994 (yyresolveAction): If resolving any of the RHS states fails, destroy
995 them all rather than leaking them. Thus, as long as user actions are
996 written to clean up the RHS correctly, yyresolveAction always cleans up
997 the RHS of a semantic option. Document the interface.
998
999 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1000
1001 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1002 led to a segmentation fault in GNU Pascal. Problem reported
1003 by Waldek Hebisch.
1004
1005 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1006
1007 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1008 mid-rule action inside a nonterminal symbol in order to declare a
1009 destructor for its semantic value.
1010
1011 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1012
1013 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1014 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1015 __cplusplus && ! defined _STDLIB_H && !
1016 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1017 defined free))]: Include <stdlib.h> rather than rolling our own
1018 declarations of malloc and free, to avoid problems with
1019 incompatible declarations (using 'throw') C++'s stdlib.h. This
1020 should fix Debian bug 340012
1021 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1022 reported by Guillaume Melquiond.
1023
1024 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1025
1026 * NEWS: Clarify symbols versus types in unused-value warnings.
1027
1028 * configure.ac (AC_INIT): Bump version number.
1029
1030 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1031
1032 * NEWS: Version 2.1a.
1033 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
1034 since C99 requires this.
1035
1036 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
1037
1038 * m4/c-working.m4: New file.
1039 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
1040
1041 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
1042
1043 * Makefile.maint: Merge from coreutils.
1044
1045 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
1046
1047 More portability fixes for problems summarized by Nelson H. F. Beebe.
1048
1049 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
1050 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
1051 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
1052 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
1053 messes up because C++ code is compiled in 32-bit mode but linked
1054 in 64-bit mode.
1055
1056 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
1057
1058 More portability fixes for problems summarized by Nelson H. F. Beebe.
1059
1060 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
1061 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
1062
1063 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
1064 nodist_PROGRAMS, since we don't need to actually compile the
1065 example if we're just doing a plain 'make'. This avoids bothering
1066 the installer unnecessarily about problems due to weird C++
1067 compilers.
1068
1069 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
1070
1071 More portability fixes for problems summarized by Nelson H. F. Beebe.
1072
1073 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
1074 than #include "...", and compile with -I'.'. The old method was
1075 not portable, according to Posix and the C standard, and it does
1076 not work with Sun C 5.7, where previous #line directives affect
1077 the working directory used in later #include "..." directives.
1078
1079 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1080
1081 Various DJGGP specific issues in /djgpp
1082
1083 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
1084
1085 More portability fixes for problems summarized by Nelson H. F. Beebe.
1086
1087 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
1088 '#include <map>' works and that you can apply ++ to iterators.
1089
1090 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
1091
1092 Work around portability problems summarized by Nelson H. F. Beebe in
1093 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
1094
1095 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1096 that '#include <string>' works.
1097
1098 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
1099 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
1100 "warning: sorry: semantics of inline function static data `const
1101 unsigned char translate_table[262]' are wrong (you'll wind up with
1102 multiple copies)".
1103
1104 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
1105 or, xor to not_, and_, or_, and xor_, respectively. This works
1106 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
1107 random system header somewhere that includes the equivalent of
1108 <iso646.h>.
1109
1110 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
1111 -E" works; it apparently doesn't work with PathScale EKO Compiler
1112 Suite Version 2.0.
1113
1114 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
1115
1116 During deterministic GLR operation, user actions should be able to
1117 influence the parse by changing yychar. To make this easier to fix and
1118 to make glr.c easier to evolve in general, don't maintain yytoken in
1119 parallel with yychar; just compute yytoken when needed.
1120 * tests/glr-regression.at (Incorrect lookahead during deterministic
1121 GLR): Check that setting yychar in a user action has the intended
1122 effect.
1123 * data/glr.c (yyGLRStack): Remove yytokenp member.
1124 (yyclearin): Don't set *yytokenp.
1125 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
1126 yychar rather than *yytokenp to determine the current lookahead.
1127 Compute yytoken locally when needed.
1128 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
1129 point to.
1130
1131 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
1132 after `--report' documentation.
1133
1134 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
1135
1136 * src/parse-gram.y (grammar_declaration): Location of printer
1137 symbol is @1, not list->location. Bug reported by twlevo.
1138 * tests/input.at (Incompatible Aliases): Adjust to above change.
1139
1140 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
1141
1142 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
1143 all the test at once. This makes the output easier to read in the
1144 normal case.
1145
1146 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
1147 got from <http://bro-ids.org/download.html>. The bug is that
1148 when two actions appeared in succession, the second one was
1149 scanned before the first one was added to the grammar rule
1150 as a midrule action. Bison then output the incorrect warning
1151 "parse.y:905.17-906.36: warning: unused value: $3".
1152 * src/parse-gram.y (BRACED_CODE, action): These are no longer
1153 associated with a value.
1154 (rhs): Don't invoke grammar_current_rule_action_append.
1155 (action): Invoke it here instead.
1156 * src/reader.c (grammar_midrule_action): Now extern.
1157 (grammar_current_rule_action_append): Don't invoke
1158 grammar_midrule_action; that is now the scanner's job.
1159 * src/reader.h (last_string, last_braced_code_loc):
1160 (grammar_midrule_action): New decls.
1161 * src/scan-gram.l (last_string): Now extern, sigh.
1162 (last_braced_code_loc): New extern variable.
1163 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
1164 rule already has an action.
1165 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
1166 * tests/input.at (AT_CHECK_UNUSED_VALUES):
1167 Add some tests to check that the above changes fixed the bug.
1168
1169 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1170
1171 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
1172 All used changed. Check whether the symbol has a destructor,
1173 not whether it is typed.
1174 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
1175 that the values are still reported as unused. All line numbers
1176 adjusted.
1177
1178 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1179
1180 Work around a bug in bro 0.8, which underparenthesizes its
1181 definition of YYLLOC_DEFAULT.
1182 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
1183 their arguments.
1184 * data/lalr1.cc: Likewise.
1185 * data/yacc.cc: Likewise.
1186
1187 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1188
1189 Work around a bug in Pike 7.0, and give the Pike folks a
1190 better way to override the usual int widths.
1191 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
1192 user can override the types.
1193 (short): #undef, to work around a bug in Pike 7.0.
1194 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
1195 (union yyalloc.yyss): Use yytype_int16 rather than short.
1196 All uses changed.
1197 (yysigned_char): Remove.
1198 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
1199 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
1200 * tests/regression.at (Web2c Actions): Adjust to above changes.
1201
1202 * src/reader.c (check_and_convert_grammar): New function.
1203 (reader): Close the input file even if something went wrong during
1204 parsing. Minor file descriptor leak reported by twlevo.
1205
1206 * src/assoc.c (assoc_to_string): Use a default: abort (); case
1207 to pacify gcc -Wswitch-default.
1208 * src/scan-gram.l (adjust_location): Use a default: break; case
1209 to pacify gcc -Wswitch-default.
1210 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
1211 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1212 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1213 Move these decls to scan-skel.l, since they don't need to be
1214 visible elsewhere.
1215 * src/scan-skel.l: Accept the above decls.
1216 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
1217 is used.
1218
1219 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
1220
1221 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1222 since we don't want to insist on a version number at the start
1223 of the changelog every time.
1224 * Makefile.maint: Sync from coreutils a bit better.
1225 (sc_trailing_blank): Renamed from sc_trailing_space.
1226 All uses changed.
1227 (sc_no_if_have_config_h, sc_require_config_h):
1228 (sc_prohibit_assert_without_use): New rules.
1229 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
1230 (sc_dd_max_sym_length): Fix leading spaces in rule.
1231 (sc_system_h_headers): Prefix with @.
1232 (sc_useless_cpp_parens, m4-check): Output line numbers.
1233 (changelog-check): Allow version only in head.
1234 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
1235 satisfy new Makefile.maint rule.
1236 * data/glr.c: Likewise.
1237 * data/glr.cc: Likewise.
1238 * data/lalr1.cc: Likewise.
1239 * data/yacc.c: Likewise.
1240 * lib/ebitsetv.c: Likewise.
1241 * lib/lbitset.c: Likewise.
1242 * lib/subpipe.c: Likewise.
1243 * lib/timevar.c: Likewise.
1244 * src/system.h: Likewise.
1245 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
1246 * djgpp/Makefile.maint: Add copyright notice.
1247 * djgpp/README.in: Likewise.
1248 * djgpp/config.bat: Likewise.
1249 * djgpp/config.site: Likewise.
1250 * djgpp/config_h.sed: Likewise.
1251 * djgpp/djunpack.bat: Likewise.
1252 * djgpp/config.sed: Fix copyright notice to match standard format.
1253 * djgpp/subpipe.h: Likewise.
1254 * lib/bitsetv-print.c: Likewise.
1255 * lib/bitsetv.c: Likewise.
1256 * lib/subpipe.h: Likewise.
1257 * lib/timevar.c: Likewise.
1258 * lib/timevar.h: Likewise.
1259 * djgpp/subpipe.c: Use standard recipe for config.h.
1260 * lib/abitset.c: Likewise.
1261 * lib/bitset.c: Likewise.
1262 * lib/bitset_stats.c: Likewise.
1263 * lib/bitsetv-print.c: Likewise.
1264 * lib/bitsetv.c: Likewise.
1265 * lib/ebitsetv.c: Likewise.
1266 * lib/get-errno.c: Likewise.
1267 * lib/lbitset.c: Likewise.
1268 * lib/subpipe.c: Likewise.
1269 * lib/timevar.c: Likewise.
1270 * lib/vbitset.c: Likewise.
1271 * tests/local.at: Likewise.
1272 * src/scan-gram.l: Don't include verify.h, since system.h does
1273 that for us.
1274 * .x-sc_require_config_h: New file.
1275 * .x-sc_unmarked_diagnostics: New file.
1276
1277 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
1278
1279 Be a bit more systematic about using 'abort'.
1280 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
1281 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
1282 Put 'default: abort ();' before some other case, to satisfy older
1283 pedantic compilers.
1284 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1285 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
1286 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
1287 * src/conflicts.c (resolve_sr_conflict): Likewise.
1288 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
1289 (get_decision_str, get_orientation_str, get_node_alignment_str):
1290 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
1291 (get_linestyle_str, get_arrowstyle_str): Likewise.
1292 * src/conflicts.c (resolve_sr_conflict):
1293 Use a default case rather than one for the one remaining enum
1294 value, to catch invalid enum values as well.
1295 * src/lalr.c (set_goto_map, map_goto):
1296 Prefer "assert (FOO);" to "if (!FOO) abort ();".
1297 * src/nullable.c (nullable_compute, token_definitions_output):
1298 Likewise.
1299 * src/reader.c (packgram, reader): Likewise.
1300 * src/state.c (transitions_to, state_new, state_reduction_find):
1301 Likewise.
1302 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
1303 (symbol_pack): Likewise.
1304 * src/tables.c (conflict_row, pack_vector): Likewise.
1305 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
1306 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
1307 * src/system.h: Don't include <assert.h>.
1308 (assert): New macro.
1309
1310 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
1311 (Destructor Decl, Parser Function, Pure Calling):
1312 Describe rules for braces inside C code more carefully.
1313
1314 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
1315
1316 Fix some porting glitches found by Nelson H. F. Beebe.
1317 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
1318 compilers that don't understand that abort () does not return.
1319 * src/state.c (transitions_to): Likewise.
1320 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1321 that '#include <cstdlib>' works.
1322 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
1323 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
1324 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
1325 for the benefit of some pre-C99 compilers.
1326
1327 * bootstrap: Undo changes to gnulib files that autoreconf made.
1328
1329 Minor fixups to get 'make maintainer-check' to work.
1330 * configure.ac: Don't use -Wnested-externs, as it's incompatible
1331 with the new verify.h implementation.
1332 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
1333 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
1334 * data/yacc.c (YYUSE): Likewise.
1335 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
1336 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
1337 * src/parse-gram.y (declaration): Don't pass a string constant
1338 to a function that expects char *, since GCC might complain
1339 about the constant value.
1340 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
1341 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
1342 before #defining them.
1343 * tests/glr-regression.at
1344 (Incorrectly initialized location for empty right-hand side in GLR):
1345 In yyerror, use the msg arg.
1346 (Corrupted semantic options if user action cuts parse):
1347 (Incorrect lookahead during deterministic GLR):
1348 (Incorrect lookahead during nondeterministic GLR):
1349 Don't name a local var 'index'; it shadows string.h's 'index'.
1350
1351 2006-01-19 Akim Demaille <akim@epita.fr>
1352
1353 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
1354 location, not just parts of it.
1355
1356 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
1357
1358 * NEWS: Document the fact that multiple %unions are now allowed.
1359 * doc/bison.texinfo (Union Decl): Likewise.
1360 * TODO: This feature is now implemented, so remove it from
1361 the wishlist.
1362
1363 * Makefile.maint: Merge with coreutils Makefile.maint.
1364 (CVS_LIST): Use build-aux version if available.
1365 (VERSION_REGEXP): New macro.
1366 (syntax-check-rules): Add sc_no_if_have_config_h,
1367 sc_prohibit_assert_without_use, sc_require_config_h,
1368 sc_useless_cpp_parens.
1369 (sc_obsolete_symbols): Check for O_NDELAY.
1370 (sc_dd_max_sym_length): Track coreutils.
1371 (sc_unmarked_diagnostics): Look in all files, not just *.c.
1372 (sc_useless_cpp_parens): New rule.
1373 (news-date-check): Look for version or today's date.
1374 (changelog-check): Don't require version number near head.
1375 (copyright-check): Use current year instead of hardwiring 2005.
1376 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
1377 (announcement): Add --gpg-key-ID.
1378
1379 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
1380 with "file system".
1381
1382 Avoid undefined behavior that addressed just before the start of an
1383 array. Problem reported by twlevo.
1384 * src/reader.c (packgram): Prepend a new sentinel before ritem.
1385 * src/lalr.c (build_relations): Rely on new sentinel.
1386 * src/gram.c (gram_free): Adjust to new sentinel.
1387
1388 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
1389
1390 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
1391 yylookaheadNeeds. All uses updated.
1392 (yysplitStack): Rename local yynewLookaheadStatuses to
1393 yynewLookaheadNeeds.
1394 * data/glr-regression.at (Incorrect lookahead during nondeterministic
1395 GLR): In comments, change `lookahead status' to `lookahead need'.
1396
1397 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1398
1399 * data/glr.c (yysplitStack): A little stylistic rewrite.
1400
1401 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1402
1403 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
1404
1405 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
1406
1407 * doc/bison.texinfo: Fix some typos.
1408 (GLR Semantic Actions): New subsection discussing special
1409 considerations because GLR semantic actions might be deferred.
1410 (Actions): Mention look-ahead usage of yylval.
1411 (Actions and Locations): Mention look-ahead usage of yylloc.
1412 (Special Features for Use in Actions): Add YYEOF entry and mention it
1413 in the yychar entry.
1414 In the yychar entry, remove mention of the local yychar case (pure
1415 parser) since this is irrelevant information when writing semantic
1416 actions and since it's already discussed in `Bison Symbols' where
1417 yychar is otherwise described as an external variable.
1418 In the yychar entry, don't call it the `current' look-ahead since it
1419 isn't when semantic actions are deferred.
1420 In the yychar and yyclearin entries, add note about deferred semantic
1421 actions.
1422 Add yylloc and yylval entries discussing look-ahead usage.
1423 (Look-Ahead Tokens): When discussing yychar, don't call it the
1424 `current' look-ahead, and do mention yylval and yylloc.
1425 (Error Recovery): Cross-reference `Action Features' when mentioning
1426 yyclearin.
1427 (Bison Symbols): In the yychar entry, don't call it the `current'
1428 look-ahead.
1429 In the yylloc and yylval entries, mention look-ahead usage.
1430
1431 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1432
1433 * tests/glr-regression.at: Update copyright year to 2006.
1434
1435 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1436
1437 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1438 use during nondeterministic operation to track which stacks have
1439 actually needed the current lookahead.
1440 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1441 Allocate, deallocate, resize, and otherwise shuffle space for
1442 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1443 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1444 appropriately during nondeterministic operation.
1445 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1446 members to store the current lookahead to be used by the deferred
1447 user action.
1448 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1449 from which the RHS is taken. Set the lookahead members of the new
1450 yySemanticOption according to the lookahead status for stack yyk.
1451 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1452 yyaddDeferredAction.
1453 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1454 members of yySemanticOption before invoking yyuserAction, and then set
1455 them back to their current values afterward.
1456 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1457 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1458 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1459 titles for consistency.
1460 (Leaked merged semantic value if user action cuts parse): In order to
1461 suppress lint warnings, use arguments in merge function, and assign
1462 char value < 128 in main.
1463 (Incorrect lookahead during deterministic GLR): New test case.
1464 (Incorrect lookahead during nondeterministic GLR): New test case.
1465
1466 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1467
1468 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
1469 !yyvaluep as signal that no semantic value is available to print.
1470 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1471 to print a semantic value.
1472
1473 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1474
1475 * tests/glr-regression.at: For consistency with my newer test cases,
1476 don't thank myself.
1477
1478 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1479
1480 * data/glr.c (yyresolveValue): When merging semantic options, if at
1481 least one user action succeeds but a later one cuts the parse, then
1482 destroy the semantic value before returning rather than leaking it.
1483 (yyresolveStates): If a user action cuts the parse and thus
1484 yyresolveValue fails, ignore the (unset) semantic value rather than
1485 corrupting the yyGLRState, and empty the semantic options list since
1486 the user actions should have called all necessary destructors.
1487 Simplify code with YYCHK.
1488 * tests/glr-regression.at (Corrupted semantic options if user action
1489 cuts parse): New test case.
1490 (Undesirable destructors if user action cuts parse): New test case.
1491 Before applying any of this patch, this test case never actually failed
1492 for me... but only because the corrupted semantic options usually
1493 masked this bug.
1494 (Leaked merged semantic value if user action cuts parse): New test
1495 case.
1496
1497 2006-01-05 Akim Demaille <akim@epita.fr>
1498
1499 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
1500
1501 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
1502
1503 * data/c.m4 (b4_c_modern): New macro, with a new provision for
1504 _MSC_VER. Problem reported by Cenzato Marco.
1505 (b4_c_function_def): Use it.
1506 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
1507 b4_c_modern.
1508 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
1509 than rolling our own.
1510
1511 2006-01-04 Akim Demaille <akim@epita.fr>
1512
1513 Also warn about non-used mid-rule values.
1514 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
1515 member.
1516 (symbol_list_new): Adjust.
1517 * src/reader.c (symbol_typed_p): New.
1518 (grammar_rule_check): Use it.
1519 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
1520 Check its rule.
1521 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
1522 Use it.
1523 * tests/actions.at (Exotic Dollars): Adjust.
1524
1525 2006-01-04 Akim Demaille <akim@epita.fr>
1526
1527 * src/reader.c (grammar_midrule_action): If $$ is set in a
1528 mid-rule, move the `used' bit to its lhs.
1529 * tests/input.at (Unused values): New.
1530 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
1531
1532 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
1533
1534 * doc/bison.texinfo (Bison Options): Say more accurately what
1535 --yacc does.
1536 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
1537 about declarations in the grammar when in Yacc mode, as POSIX does
1538 not require a diagnostic when the grammar uses extensions.
1539
1540 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
1541
1542 Warn about dubious constructions like "%token T T".
1543 Reported by twlevo.
1544 * src/symtab.h (struct symbol.declared): New member.
1545 * src/symtab.c (symbol_new): Initialize it to false.
1546 (symbol_class_set): New arg DECLARING, specifying whether
1547 this is a declaration that we want to warn about, if there
1548 is more than one of them. All uses changed.
1549
1550 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
1551 Allow multiple %union directives, whose contents concatenate.
1552 * src/parse-gram.y (grammar_declaration): Likewise.
1553 Use muscle_code_grow, so that we don't need stype_line any more.
1554 All uses changed.
1555
1556 * src/muscle_tab.c (muscle_grow): Fix comment.
1557
1558 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
1559 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
1560 Update copyright year to 2006.
1561
1562 2006-01-03 Akim Demaille <akim@epita.fr>
1563
1564 Have glr.cc pass (some of) the calc.at tests.
1565 * data/glr.cc (b4_parse_param_orig): New.
1566 (b4_parse_param): Improve its definition, and bound it more
1567 clearly in the skeleton.
1568 (b4_epilogue): Append, instead of prepending, in order to keep
1569 #line consistency.
1570 Simplify the generation of auxiliary functions: locations and
1571 purity are mandated.
1572 (b4_global_tokens_and_yystype): Honor it.
1573 * data/location.cc (c++.m4): Don't include it.
1574 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
1575 and AT_SKEL_CC_IF.
1576 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
1577 AT_LALR1_CC_IF.
1578 Be sure to initialize the first position's filename.
1579 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
1580 mandated anyway.
1581 (AT_CHECK_CALC_GLR_CC): New.
1582 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
1583
1584 2006-01-02 Akim Demaille <akim@epita.fr>
1585
1586 * src/output.c (output_skeleton): Don't hard wire the inclusion of
1587 c.m4.
1588 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
1589 * data/glr.cc: Do not include stack.hh.
1590
1591 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1592
1593 * data/glr.c: Reformat whitespace with tabs.
1594 (b4_lpure_formals): Remove this unused m4 macro.
1595 * tests/cxx-type.at: Reformat whitespace with tabs.
1596 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
1597 since it's a member. Rename type to isNterm for clarity.
1598
1599 2005-12-29 Akim <akim@sulaco.local>
1600
1601 Let glr.cc catch up with symbol_value_print.
1602 * data/glr.cc (b4_yysymprint_generate): Replace by...
1603 (b4_yy_symbol_print_generate): this.
1604 (yy_symbol_print, yy_symbol_value_print): Declare them.
1605
1606 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
1607
1608 * src/location.h (boundary): Note that a line or column equal
1609 to INT_MAX indicates an overflow.
1610 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
1611 (rule_length_overflow, increment_rule_length, add_column_width):
1612 New functions.
1613 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
1614 (<SC_BRACED_CODE>"}"):
1615 Use increment_rule_length rather than incrementing it by hand.
1616 (adjust_location, handle_syncline): Diagnose overflow.
1617 (handle_action_dollar, handle_action_at):
1618 Fix bug with monstrosities like $-2147483648.
1619 Remove now-unnecessary checks.
1620 (scan_integer): Verify assumptions and remove now-unnecessary checks.
1621 (convert_ucn_to_byte): Verify assumptions.
1622 (handle_syncline): New arg LOC. All callers changed.
1623 Don't store through a value derived from char const * pointer.
1624
1625 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
1626 GCC warnings.
1627
1628 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
1629
1630 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
1631 Remove unnecessary forward static decls.
1632
1633 2005-12-27 Akim Demaille <akim@epita.fr>
1634
1635 * src/reader.c (grammar_current_rule_check): Also check that $$
1636 is used.
1637 Take the rule to check as argument, hence rename as...
1638 (grammar_rule_check): this.
1639 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
1640 Rename as...
1641 (grammar_rule_begin, grammar_rule_end): these, for consistency.
1642 (grammar_midrule_action, grammar_symbol_append): Now static.
1643 * tests/torture.at (input): Don't rely on the default action
1644 being always performed.
1645 * tests/calc.at: "Set" $$ even when the action is "cut" with
1646 YYERROR or other.
1647 * tests/actions.at (Exotic Dollars): Instead of using unused
1648 values, check that the warning is issued.
1649
1650 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
1651
1652 * NEWS: Improve wording for unused-value warnings.
1653
1654 2005-12-22 Akim Demaille <akim@epita.fr>
1655
1656 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
1657 (b4_yysymprint_generate): Rename as...
1658 (b4_yy_symbol_print_generate): this.
1659 Generate yy_symbol_print instead of yysymprint.
1660 Generate also yy_symbol_value_print, and use it.
1661
1662 2005-12-22 Akim Demaille <akim@epita.fr>
1663
1664 * NEWS: Warn about unused values.
1665 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1666 a `used' member.
1667 (symbol_list_n_get, symbol_list_n_used_set): New.
1668 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1669 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1670 * src/reader.c (grammar_current_rule_check): Check that values are
1671 used.
1672 * src/symtab.c (symbol_print): Accept 0.
1673 * tests/existing.at: Remove the type information.
1674 Empty the actions.
1675 Remove useless actions (beware of mid-rule actions: perl -000
1676 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1677 * tests/actions.at (Exotic Dollars): Use unused values.
1678 * tests/calc.at: Likewise.
1679 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1680 Likewise.
1681
1682 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1683 rule_useful_p.
1684
1685 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1686
1687 Undo 2005-12-01 tentative license wording change. The wording is
1688 still being reviewed by the lawyers, and we don't want to wait for
1689 them before publishing a test release. For now, revert to the
1690 previous wording.
1691 * NEWS: Undo 2005-12-01 change.
1692 * data/glr.c: Revert to previous license wording.
1693 * data/glr.cc: Likewise.
1694 * data/lalr1.cc: Likewise.
1695 * data/location.cc: Likewise.
1696 * data/yacc.c: Likewise.
1697
1698 * NEWS: Reword %destructor vs YYABORT etc.
1699 * data/glr.c: Use American spacing, for consistency.
1700 * data/glr.cc: Likewise.
1701 * data/lalr1.cc: Likewise.
1702 * data/yacc.c: Likewise.
1703 * data/yacc.c: Reformat comments slightly.
1704 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1705 for consistency. Fix some spelling errors and reword recently-included
1706 text slightly.
1707 * tests/cxx-type.at: Cast results of malloc, for C++.
1708
1709 2005-12-21 Joel E. Denny <address@hidden>
1710
1711 * tests/cxx-type.at: Construct a tree, count the parents of shared
1712 nodes, and free each node once and only once. Previously, the memory
1713 for semantic values was leaked instead.
1714
1715 2005-12-21 Joel E. Denny <address@hidden>
1716
1717 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
1718 (yylval, yylloc): If pure, #define to yystackp->yyval and
1719 yystackp->yyloc similar to yychar and yynerrs.
1720 (yyparse): If pure, remove local yylval and yylloc. Add local
1721 yystackp to accommodate pure definitions of yylval and yylloc.
1722 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
1723 yylvalp and yyllocp to &yylval and &yylloc.
1724 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
1725 namespace. Previously, nerrs and char were missing, but lval and lloc
1726 weren't necessary.
1727 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
1728 yylvalp and yyllocp parameters since, if pure, these are now always
1729 accessible through yystackp. If not pure, they are still accessible
1730 globally.
1731 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
1732 `if (YYID (N))' to pacify lint.
1733
1734 2005-12-21 Akim Demaille <akim@epita.fr>
1735
1736 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
1737 destroy the RHS symbols of a rule.
1738 * data/yacc.c (yylen): Initialize to 0.
1739 Keep its value to the number of items to possibly shift.
1740 In particular, a regular successful parse that ends on YYFINAL by
1741 a (internal) YYACCEPT must not have yylen != 0.
1742 (yyerrorlab, yyreturn): Pop the RHS.
1743 Reorder a bit to emphasize the `shifting' bits of code.
1744 (YYPOPSTACK): Now accept a number of items to pop.
1745 * data/lalr1.cc: Likewise.
1746 * data/glr.c: Formatting changes.
1747 Use goto instead of fall through.
1748 * doc/bison.texinfo (Destructor Decl): Complete.
1749
1750 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1751
1752 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1753 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
1754 * djgpp/config.bat: Replace every occurence of the file name
1755 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1756 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1757 * djgpp/config.sed: Replace every occurence of the file name
1758 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1759 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1760 * djgpp/djunpack.bat: DJGPP specific file.
1761 * djgpp/fnchange.lst: DJGPP specific file.
1762 * djgpp/README.in: Add new information about how to unpack the bison
1763 source on MSDOS and other systems which have 8.3 file name restrictions
1764 using djunpack.bat and fnchange.lst.
1765
1766 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
1767
1768 * bootstrap (build_cvs_prefix): Remove; unused.
1769 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
1770 when getting gnulib.
1771
1772 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
1773
1774 * data/glr.c: Reorder typedef declarations for structs to match order
1775 of struct declarations.
1776 Rename yystack everywhere to yystackp except in yyparse where it's not
1777 a pointer.
1778 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
1779 consistency.
1780 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
1781 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
1782 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
1783 lint.
1784
1785 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
1786
1787 * tests/sets.at (Accept): Fix typos in regular expression used to
1788 sed out the final state number.
1789
1790 Work around portability problem on Solaris 10: flex-generated
1791 files include <stdio.h> before <config.h>, which messes up
1792 because the latter defines __EXTENSIONS__. Address the problem
1793 by creating two new little files that include <config.h> first,
1794 then include the flex-generated files. Rewrite everyone else
1795 to include <config.h> first, as well.
1796 * lib/timevar.c: Always include "config.h".
1797 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
1798 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
1799 (EXTRA_bison_SOURCES): New macro.
1800 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
1801 * src/system.h: Don't include config.h.
1802 * src/LR0.c: Include <config.h> first.
1803 * src/assoc.c: Likewise.
1804 * src/closure.c: Likewise.
1805 * src/complain.c: Likewise.
1806 * src/conflicts.c: Likewise.
1807 * src/derives.c: Likewise.
1808 * src/files.c: Likewise.
1809 * src/getargs.c: Likewise.
1810 * src/gram.c: Likewise.
1811 * src/lalr.c: Likewise.
1812 * src/location.c: Likewise.
1813 * src/main.c: Likewise.
1814 * src/muscle_tab.c: Likewise.
1815 * src/nullable.c: Likewise.
1816 * src/output.c: Likewise.
1817 * src/parse-gram.y: Likewise.
1818 * src/print.c: Likewise.
1819 * src/print_graph.c: Likewise.
1820 * src/reader.c: Likewise.
1821 * src/reduce.c: Likewise.
1822 * src/relation.c: Likewise.
1823 * src/state.c: Likewise.
1824 * src/symlist.c: Likewise.
1825 * src/symtab.c: Likewise.
1826 * src/tables.c: Likewise.
1827 * src/uniqstr.c: Likewise.
1828 * src/vcg.c: Likewise.
1829
1830 * src/parse-gram.y: Fix minor problems uncovered by lint.
1831 (current_lhs, current_lhs_location): Now static.
1832 (current_assoc): Remove unused variable.
1833
1834 Cleanups so that Bison-generated parsers have less lint.
1835 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
1836 Prepend /*ARGSUSED*/, for lint's sake.
1837 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
1838 definition if 'lint' is defined.
1839 (YYID): New macro (or function, if lint).
1840 All uses of /*CONSTCOND*/0 replaced by YYID(0).
1841 * data/yacc.c: Likewise.
1842 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
1843 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
1844 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
1845 is C++ only.
1846 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
1847 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
1848 Use YYID(0) rather than 0, for lint.
1849 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
1850 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
1851
1852 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
1853
1854 * tests/glr-regression.at
1855 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1856 Close memory leak reported by twlevo.
1857
1858 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
1859
1860 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
1861 all stacks.
1862 (yyparse): Iterate another stack in order to call user destructors.
1863 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1864 New test case.
1865 (Duplicated user destructor for lookahead): This test now is expected
1866 to succeed.
1867
1868 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
1869
1870 * NEWS: Document the following change.
1871 * data/yacc.c: Say "parser skeleton" rather than "file", since
1872 it's no longer just a file.
1873 * data/glr.c: Grant a special exception for C GLR parsers, that
1874 reads like the already-existing exception for C LALR(1) parsers.
1875 * data/glr.cc: Likewise.
1876 * data/lalr1.cc: Likewise.
1877 * data/location.cc: Likewise.
1878 * data/yacc.c: Reword the "written by" statement to clarify that
1879 it was the parser skeleton, not the entire output file.
1880 * data/glr.c: Written by Paul Hilfinger.
1881 * data/glr.cc: Written by Akim Demaille.
1882 * data/lalr1.cc: Likewise.
1883
1884 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
1885
1886 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
1887 Fix typos in previous change that broke 'make check'.
1888 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
1889 supported in C.
1890 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
1891 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
1892 We can revert this once things settle down.
1893
1894 * src/conflicts.c (conflicts_print): Don't print file name twice
1895 when %expect fails because there were no conflicts.
1896 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
1897 change.
1898 * tests/conflicts.at (%expect not enough, %expect too much):
1899 (%expect with reduce conflicts): Adjust to new behavior.
1900
1901 2005-11-18 Akim Demaille <akim@epita.fr>
1902
1903 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
1904 errors.
1905 * NEWS: Document this.
1906 * doc/bison.texinfo (Expect Decl): Likewise.
1907
1908 2005-11-16 Akim Demaille <akim@epita.fr>
1909
1910 Generalize the display of semantic values and locations in traces.
1911 * data/glr.c (yy_reduce_print): Fix indices (again).
1912 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
1913 literal integers.
1914 * data/lalr1.cc (yyreduce_print): Rename as...
1915 (yy_reduce_print): this.
1916 Display values and locations.
1917 * data/yacc.c (yy_reduce_print): Likewise.
1918 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
1919 (yysymprint): Move higher to be visible from yy_reduce_print).
1920 (yyparse): Adjust.
1921 * tests/calc.at: Adjust the expected length of the traces.
1922
1923 2005-11-14 Akim Demaille <akim@epita.fr>
1924
1925 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
1926 from 1 to N, while values and location start at 0.
1927 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
1928
1929 2005-11-14 Akim Demaille <akim@epita.fr>
1930
1931 * data/glr.c (yy_reduce_print): Fix the $ number.
1932
1933 2005-11-14 Akim Demaille <akim@epita.fr>
1934
1935 "Use" parse parameters.
1936 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
1937 * data/glr.c, data/glr.cc: Use them.
1938 * data/glr.c (YYUSE): Have a C++ definition that supports
1939 non-pointer types.
1940
1941 2005-11-14 Akim Demaille <akim@epita.fr>
1942
1943 * data/glr.c (yyexpandGLRStack): Declare only if defined.
1944
1945 2005-11-14 Akim Demaille <akim@epita.fr>
1946
1947 * data/glr.cc: New.
1948 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
1949
1950 2005-11-12 Akim Demaille <akim@epita.fr>
1951
1952 Let position and location be PODs.
1953 * data/location.cc (position::initialize, location::initialize): New.
1954 (position::position, location::location): Define only if
1955 b4_location_constructors is defined.
1956 * data/lalr1.cc (b4_location_constructors): Define it for backward
1957 compatibility.
1958 * doc/bison.texinfo (Initial Action Decl): Use initialize.
1959
1960 2005-11-12 Akim Demaille <akim@epita.fr>
1961
1962 * data/lalr1.cc: Move the body of the ctor and dtor into the
1963 parser file (instead of the header).
1964 Wrap the implementations in a "namespace yy".
1965
1966 2005-11-12 Akim Demaille <akim@epita.fr>
1967
1968 Have glr.c include its header file when created.
1969 * data/glr.c (b4_shared_declarations): New.
1970 Output them verbatim in the parser if !%defines, otherwise
1971 output then in the header file, and include it instead.
1972
1973 2005-11-11 Akim Demaille <akim@epita.fr>
1974
1975 * data/glr.c: Comment changes.
1976
1977 2005-11-11 Akim Demaille <akim@epita.fr>
1978
1979 When yydebug, report semantic and location values for reductions.
1980 * data/glr.c (yy_reduce_print): Report the semantic values and the
1981 locations.
1982 (YY_REDUCE_PRINT): Adjust.
1983 (yyglrReduce): Use them.
1984 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
1985 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
1986 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
1987 traces.
1988
1989 2005-11-10 Akim Demaille <akim@epita.fr>
1990
1991 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
1992 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
1993 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
1994
1995 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
1996
1997 * m4/cxx.m4, examples/Makefile.am: Don't build
1998 examples/calc++ if no C++ compiler is available. (trivial change)
1999
2000 2005-11-09 Akim Demaille <akim@epita.fr>
2001
2002 * src/scan-skel.l: Use a couple of asserts.
2003
2004 2005-11-03 Akim Demaille <akim@epita.fr>
2005
2006 In some (weird) cases, the final state number is incorrect.
2007 Reported by Alexandre Duret-Lutz.
2008 * src/LR0.c (state_list_append): Remove the computation of
2009 final_state.
2010 (save_reductions): Do it here.
2011 (get_state): Alpha conversion.
2012 (generate_states): Use a for loop.
2013 * src/gram.h (item_number_is_rule_number)
2014 (item_number_is_symbol_number): New.
2015 * src/state.c: Use assert.
2016 * src/system.h: Include assert.h.
2017 * tests/sets.at (Accept): New.
2018
2019 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2020
2021 * data/glr.c (yyfill): Adjust comment.
2022 (yyresolveAction): Initialize default location properly
2023 for empty right-hand sides.
2024 (yydoAction): Ditto.
2025 Add comment explaining apparently dead code.
2026 * tests/glr-regression.at
2027 (Incorrectly initialized location for empty right-hand side in GLR):
2028 New test.
2029
2030 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2031
2032 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2033 gnulib when interrupted. This fixes some race conditions and
2034 works around some portability problems (one noted by Paul
2035 Hilfinger).
2036
2037 2005-10-22 Akim <akim@epita.fr>
2038
2039 * Makefile.cfg: Adjust to config -> build-aux.
2040 Reported by twledo.
2041
2042 2005-10-21 Akim Demaille <akim@epita.fr>
2043
2044 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
2045 the %parse-params.
2046 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
2047 * data/yacc.c (b4_Pure_if): Rename as...
2048 (b4_yacc_pure_if): this.
2049 (YY_SYMBOL_PRINT, yyparse): Adjust.
2050 * doc/bison.texinfo: Formatting changes.
2051
2052 2005-10-21 Akim Demaille <akim@epita.fr>
2053
2054 Finish the transition config -> build-aux.
2055 * configure.ac, Makefile.am: Use build-aux.
2056 * config/prev-version, config/announce-gen, config/Makefile.am:
2057 Move to...
2058 * build-aux/prev-version, build-aux/announce-gen,
2059 * build-aux/Makefile.am: here.
2060
2061 2005-10-14 Akim Demaille <akim@epita.fr>
2062
2063 * examples/calc++/test: Use set -x only when VERBOSE.
2064
2065 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
2066
2067 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
2068 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
2069
2070 2005-10-13 Akim Demaille <akim@epita.fr>
2071
2072 * src/scan-skel.l: Output the base name parts of the parser and
2073 header file names.
2074 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
2075 additional checks.
2076 Use this to exercise C++ outputs in subdirs.
2077 Reported by Oleg Smolsky.
2078
2079 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
2080
2081 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
2082 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
2083 Problem reported by John P. Hartmann.
2084 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
2085 already defined it.
2086
2087 2005-10-12 Akim Demaille <akim@epita.fr>
2088
2089 * src/parse-gram.y (version_check): Exit 63 to please missing
2090 (stands for "version mismatch).
2091 * tests/input.at, doc/bison.texinfo: Adjust.
2092
2093 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
2094
2095 Work around portability problems with Visual Age C compiler
2096 (xlc and xlC_r) reported by John P. Hartmann.
2097 * data/location.cc (initial_column, initial_line): Remove.
2098 All uses replaced by 0 and 1.
2099 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
2100 that xlc complains about.
2101 * src/scan-skel.l (skel_wrap): Likewise.
2102 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
2103 as __STDC__.
2104 * data/yacc.c (YYMODERN_C): New macro, which also looks at
2105 __STDC_VERSION__. Use it everywhere instead of looking at
2106 __STDC__ and __cplusplus.
2107
2108 2005-10-10 Akim Demaille <akim@epita.fr>
2109
2110 * examples/calc++/test: Be quiet unless VERBOSE.
2111
2112 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
2113
2114 * data/c.m4 (yydestruct, yysymprint):
2115 Use YYUSE instead of casting to void.
2116 * data/glr.c (YYUSE): New macro.
2117 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2118 Use it instead of rolling our own.
2119 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2120 (YYCHK1):
2121 Use /*CONSTCOND*/ to suppress lint warnings.
2122 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2123 (YY_STACK_PRINT): Use 'false' not '0'.
2124 (YYUSE): New macro.
2125 (yysymprint_, yydestruct_): Use it instead of rolling our own.
2126 * data/yacc.c (YYUSE): New macro.
2127 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
2128 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
2129 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
2130
2131
2132 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
2133 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
2134
2135 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
2136
2137 Undo the parts of the unlocked-I/O change that substituted
2138 putc or puts for printf. This might hurt performance a bit,
2139 but some people prefer the printf style.
2140 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
2141 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
2142 All uses replaced by YYFPRINTF and YYDPRINTF.
2143 * data/yacc.c: Likewise.
2144 * lib/bitset.c (bitset_print): Likewise.
2145 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
2146 putc and puts.
2147 * lib/lbitset.c (debug_lbitset): Likewise.
2148 * src/closure.c (print_firsts, print_fderives): Likewise.
2149 * src/gram.c (grammar_dump): Likewise.
2150 * src/lalr.c (look_ahead_tokens_print): Likewise.
2151 * src/output.c (escaped_output): Likewise.
2152 (user_actions_output): Break apart two printfs.
2153 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
2154 * src/reduce.c (reduce_print): Likewise.
2155 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2156 * src/system.h: Include unlocked-io.h rathe than stdio.h.
2157
2158 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2159 Use assignments rather than casts-to-void to suppress
2160 unused-variable warnings. This pacifies 'lint'.
2161 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
2162 unused-variable warnings.
2163
2164 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2165
2166 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2167
2168 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2169
2170 Use unlocked I/O for a minor performance improvement on hosts like
2171 GNU/Linux and Solaris that support unlocked I/O. The basic idea
2172 is to use the gnlib unlocked-io module, and to prefer putc and
2173 puts to printf when either will work (since the latter doesn't
2174 come in an unlocked flavor).
2175 * bootstrap (gnulib_modules): Add unlocked-io.
2176 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
2177 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
2178 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
2179 and similarly for puts and putc and printf.
2180 * data/yacc.c: Likewise.
2181 * lib/bitset.c (bitset_print): Likewise.
2182 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
2183 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
2184 to printf.
2185 * lib/lbitset.c (debug_lbitset): Likewise.
2186 * src/closure.c (print_firsts, print_fderives): Likewise.
2187 * src/gram.c (grammar_dump): Likewise.
2188 * src/lalr.c (look_ahead_tokens_print): Likewise.
2189 * src/output.c (escaped_output): Likewise.
2190 (user_actions_output): Coalesce two printfs.
2191 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
2192 * src/reduce.c (reduce_print): Likewise.
2193 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2194 * src/system.h: Include unlocked-io.h rather than stdio.h.
2195
2196 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
2197 this confuses xgettext.
2198
2199 2005-10-02 Akim Demaille <akim@epita.fr>
2200
2201 * bootstrap (gnulib_modules): Add strverscmp.
2202 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
2203 * m4/.cvsignore: Add strverscmp.m4.
2204 * src/parse-gram.y (%require): New token, new rule.
2205 (version_check): New.
2206 * src/scan-gram.l (%require): Adjust.
2207 * tests/input.at (AT_REQUIRE): New.
2208 Use it.
2209 * doc/bison.texinfo (Require Decl): New.
2210 (Calc++ Parser): Use %require.
2211
2212 2005-10-02 Akim Demaille <akim@epita.fr>
2213
2214 * data/location.cc: New.
2215
2216 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
2217 Akim Demaille <akim@epita.fr>
2218
2219 Make sure -odir/foo.cc creates dir/location.hh etc.
2220 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
2221 (spec_file_prefix, spec_verbose_file, spec_graph_file)
2222 (spec_defines_file): Now const.
2223 (dir_prefix): New.
2224 (short_base_name): Remove.
2225 * src/files.c: Adjust.
2226 (dirname.h): Include.
2227 (base_name): Don't prototype it.
2228 (finput): Remove, duplicates gram_in.
2229 (full_base_name, short_base_name): Replace by...
2230 (all_but_ext, all_but_tab_ext): these.
2231 (compute_base_names): Rename as...
2232 (compute_file_name_parts): this.
2233 Update to compute the new variables, including dir_prefix.
2234 Adjust dependencies.
2235 * src/output.c (prepare): Output them.
2236 * src/reader.c: Adjust to use gram_in, not finput.
2237 * src/scan-skel.l (@dir_prefix@): New.
2238
2239 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2240
2241 * lib/subpipe.c: New function end_of_output_subpipe() added
2242 to allow support for non-posix systems. This is a no-op function
2243 for posix systems.
2244
2245 * lib/subpipe.h: New function end_of_output_subpipe() added
2246 to allow support for non-posix systems. This is a no-op function
2247 for posix systems.
2248
2249 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
2250 handle the lack of pipe/fork functionality on non-posix systems.
2251
2252 * djgpp/Makefile.maint: DJGPP specific file.
2253
2254 * djgpp/README.in: DJGPP specific file.
2255
2256 * djgpp/config.bat: DJGPP specific configuration file.
2257
2258 * djgpp/config.sed: DJGPP specific configuration file.
2259
2260 * djgpp/config.site: DJGPP specific configuration file.
2261
2262 * djgpp/config_h.sed: DJGPP specific configuration file.
2263
2264 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
2265
2266 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
2267
2268 2005-10-02 Akim Demaille <akim@epita.fr>
2269
2270 * data/location.cc: New, extract from...
2271 * data/lalr1.cc: here.
2272 (location.hh): Include it after the user prologue, in case the
2273 filename type is defined by the user.
2274 Forward declation location and position before the pre-prologue.
2275 (yyresult_): Rename as...
2276 (yyresult): this, it's a local variable, not an attribute.
2277 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
2278
2279 2005-10-01 Akim Demaille <akim@epita.fr>
2280
2281 * examples/extexi: Restore the #line generation.
2282
2283 2005-09-30 Akim Demaille <akim@epita.fr>,
2284 Alexandre Duret-Lutz <adl@gnu.org>
2285
2286 Move the token type and YYSTYPE in the parser class.
2287 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
2288 (parser::token): New, from the moved free definition of tokens.
2289 (parser::semantic_value): Now a full definition instead of an
2290 indirection to YYSTYPE.
2291 (b4_post_prologue): No longer included in the header file, but
2292 in the implementation file.
2293 * doc/bison.texi (C+ Language Interface): Update.
2294 * src/parse-gram.y: Support unary %define.
2295 * tests/actions.at: Define global_tokens_and_yystype for backward
2296 compatibility until we update the tests.
2297 * tests/calc.at: Idem.
2298 (first_line, first_column, last_line, last_column): Define for lalr1.cc
2299 to simplify the code.
2300
2301 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2302
2303 Port to SunOS 4.1.4, which lacks strtoul and strerror.
2304 Ah, the good old days! Problem reported by Peter Klein.
2305 * bootstrap (gnulib_modules): Add strerror, strtoul.
2306 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
2307 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
2308
2309 2005-09-29 Akim Demaille <akim@epita.fr>
2310
2311 * data/c.m4 (b4_error_verbose_if): New.
2312 * data/lalr1.cc: Use it.
2313 (YYERROR_VERBOSE_IF): Remove.
2314 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
2315 parser members, replaced by...
2316 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
2317 local variables.
2318 (yysyntax_error_): Takes the state number as argument.
2319 (yyreduce_print_): Use the argument yyrule, not the former
2320 attribute yyn_.
2321
2322 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2323
2324 * bootstrap (gnulib_modules): Add verify.
2325 * lib/.cvsignore: Add verify.h.
2326 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
2327 * src/system.h (verify): Remove.
2328 Include verify.h instead.
2329 * src/tables.c (tables_generate): Use new API for 'verify'.
2330
2331 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
2332
2333 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
2334 local variables whose names begin with 'yy'.
2335 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2336 Trivial changes from Joel E. Denny.
2337
2338 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
2339 it itself.
2340 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
2341 don't use alloca any more.
2342
2343 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
2344 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
2345 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
2346 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
2347 to match yacc.c, to test more hosts.
2348
2349 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
2350
2351 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
2352 doesn't affect behavior.
2353 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
2354 Solaris, AIX, MSC.
2355 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
2356 This works a bit better with glibc, if user code has already included
2357 stdlib.h.
2358 * doc/bison.texinfo (Bison Parser): Document that users can't
2359 arbitrarily use malloc and free for other purposes. Document
2360 that <alloca.h> and <malloc.h> might be included.
2361 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
2362 user must declare alloca.
2363
2364 * HACKING (release): Forwarn the Translation Project about
2365 stable releses.
2366
2367 2005-09-20 Akim Demaille <akim@epita.fr>
2368
2369 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
2370
2371 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
2372
2373 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
2374 (YYSTACK_ALLOC_MAXIMUM): Use it.
2375 (yysyntax_error): New function.
2376 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
2377 multiple syntax errors are reported, and alloca is being used.
2378 Instead, reallocate buffers twice as big each time, so that
2379 we waste at most half the allocated memory. Start with a small
2380 (128-byte) buffer that will suffice in most cases anyway.
2381 Use yysyntax_error to do most of the work.
2382
2383 * doc/bison.texinfo (Error Reporting, Table of Symbols):
2384 yynerrs is the number of errors reported, not the number of
2385 errors encountered.
2386
2387 * tests/glr-regression.at (Duplicated user destructor for lookahead):
2388 Mark it as expected to fail.
2389 Cast result of malloc; problem reported by twlevo@xs4all.nl.
2390 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
2391 Don't start user-code symbols with "yy", to avoid name space problems.
2392
2393 2005-09-19 Akim Demaille <akim@epita.fr>
2394
2395 Remove the traits, failed experiment.
2396 It never proved useful, and anyway because of the current
2397 definition, it was not possible to have several specialization of
2398 this traits, making it useless.
2399 * data/lalr1.cc (yy:traits): Remove.
2400 Inline its definitions in the parser class.
2401
2402 2005-09-19 Akim Demaille <akim@epita.fr>
2403
2404 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
2405 least Mac OSX with a /usr/local install of gettext.
2406
2407 2005-09-19 Akim Demaille <akim@epita.fr>
2408
2409 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
2410 and yytoken for similarity with the other skeletons.
2411
2412 2005-09-19 Akim Demaille <akim@epita.fr>
2413
2414 * NEWS, configure.ac: update version number to 2.1a.
2415
2416 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2417
2418 * NEWS: Version 2.1.
2419
2420 * NEWS: Remove notice of yytname change, since it was never in an
2421 official release.
2422 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
2423 diagnostic.
2424 * src/output.c (prepare): Likewise.
2425 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
2426 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
2427 is not defined. This is an awful hack, but it's enough for now.
2428 All callers changed.
2429 * tests/glr-regression-at (make_value): Args are const pointers now,
2430 to avoid GCC warning.
2431 (Duplicated user destructor for lookahead): New test. Currently
2432 skipped. It fails on my host but I'm not sure it'll always fail.
2433
2434 2005-09-16 Akim Demaille <akim@epita.fr>
2435
2436 * src/symtab.h (struct symbol): Declare the printer and destructor
2437 as const, to avoid accidental calls to free.
2438 (symbol_destructor_set, symbol_printer_set): Adjust.
2439 * src/symtab.c: Adjust.
2440
2441 2005-09-16 Akim Demaille <akim@epita.fr>
2442
2443 * data/c.m4 (b4_token_enums): New.
2444 (b4_token_defines): Rename as...
2445 (b4_token_enums_defines): this.
2446 (b4_token_defines): New, output only the #defines.
2447 * data/yacc.c, data/glr.c: Adjust.
2448 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2449 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2450 as default values.
2451
2452 2005-09-16 Akim Demaille <akim@epita.fr>
2453
2454 * data/lalr1.cc (yylex_): Remove, inline its code.
2455 (yyreport_syntax_error_): Remove, replaced by...
2456 (yysyntax_error_): this which returns a string and leaves to the
2457 caller the call to the users' error function.
2458 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2459 Move from members of the parser object...
2460 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2461 to local variables of the parse function.
2462
2463 2005-09-16 Akim Demaille <akim@epita.fr>
2464
2465 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2466 since it's in Bison's name space.
2467
2468 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2469
2470 * data/glr.c (yyresolveValue): Add default case to pacify
2471 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2472
2473 * NEWS: Document when yyparse started to return 2.
2474 * doc/bison.texinfo (Parser Function): Document when yyparse
2475 returns 2.
2476
2477 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2478 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2479 changed.
2480 (class position): file_name -> filename (reverting). All uses changed.
2481
2482 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2483
2484 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2485 do anything if $@ exists. This reverts part of the 2005-07-07
2486 patch.
2487
2488 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2489
2490 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2491 contains obsolete information and isn't worth distributing as a
2492 separate file anyway.
2493 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2494 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2495 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2496 (yyparse): Abort if user code uses longjmp to throw an unexpected
2497 value.
2498
2499 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2500
2501 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
2502 Suggested by twlevo@xs4all.nl.
2503
2504 * data/glr.c (YYCHK1): Do not assume YYE is in range.
2505 This avoids a diagnostic from gcc -Wswitch-enum.
2506 Problem reported by twlevo@xs4all.nl.
2507
2508 * doc/bison.texinfo: Don't use "filename", as per GNU coding
2509 standards. Use "file name" or "file" or "name", depending on
2510 the context.
2511 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
2512 not to hack/foo.tab.c.
2513 (Calc++ Top Level): 2nd arg of main is not const.
2514 * data/glr.c: b4_filename -> b4_file_name.
2515 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
2516 All uses changed.
2517 (class position): filename -> file_name. All uses changed.
2518 * data/yacc.c: b4_filename -> b4_file_name.
2519 * lib/bitset.h: filename -> file_name in local vars.
2520 * lib/bitset_stats.c: Likewise.
2521 * src/files.c: Likewise.
2522 * src/scan-skel.l ("@output ".*\n): Likewise.
2523 * src/files.c (file_name_split): Renamed from filename_split.
2524 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
2525
2526 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
2527
2528 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
2529 to accommodate latest gnulib.
2530
2531 * tests/glr-regression.at (Duplicate representation of merged trees):
2532 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
2533
2534 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
2535 needed.
2536
2537 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
2538
2539 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
2540 All uses changed. Invoke user destructor after an error during a
2541 split parse (trivial change from Joel E. Denny).
2542
2543 * tests/glr-regression.at
2544 (User destructor after an error during a split parse): New test case.
2545 Problem reported by Joel E. Denny in:
2546 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
2547
2548 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2549
2550 * README-cvs: Give URLs for recommended tools.
2551 Mention Gzip version problem, and bootstrapping issues.
2552 Remove troubleshooting section, as it's somewhat obsolete.
2553
2554 * bootstrap (no_cache): New var, to accommodate different wget
2555 variants. Use it instead of '-C off'. Problem reported by
2556 twlevo@xs4all.nl.
2557
2558 * data/glr.c (yydestroyStackItem): New function.
2559 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
2560 debugging information. Problem reported by Joel E. Denny.
2561
2562 2005-08-25 Akim Demaille <akim@epita.fr>
2563
2564 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
2565
2566 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
2567
2568 * data/glr.c (yyrecoverSyntaxError, yyreturn):
2569 Don't invoke destructor on unresolved entries.
2570 * tests/glr-regression.at
2571 (User destructor for unresolved GLR semantic value): New test case.
2572 Problem reported by Joel E. Denny in:
2573 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
2574
2575 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
2576
2577 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
2578 Add strnlen.c.
2579 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
2580 lib-prefix.m4, po.m4.
2581
2582 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
2583 in yydestruct diagnostic, since it might not be an error.
2584 Problem reported by Joel Denny near end of
2585 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2586 * data/lalr1.cc (yyerturn): Likewise.
2587 * data/yacc.c (yyreturn): Likewise.
2588 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
2589
2590 * src/files.c: Remove obsolete FIXME comment.
2591
2592 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
2593 with the other templates, and to fix bogus run-on messages such
2594 as the one reported at the end of
2595 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2596 All callers changed to avoid the newline.
2597 (yyprocessOneStack): Output two lines rather than one, to accommodate
2598 the above change. This changes the debug output format slightly.
2599
2600 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
2601 reported by Joel E. Denny in
2602 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
2603 (trivial change).
2604 * tests/glr-regression.at (Duplicate representation of merged trees):
2605 New test, from Joel E. Denny in:
2606 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
2607 * THANKS: Add Joel E. Denny.
2608
2609 * configure.ac (AC_INIT): Bump to 2.0c.
2610
2611 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
2612
2613 * NEWS: Version 2.0b.
2614
2615 * Makefile.am (SUBDIRS): Put examples before tests, so that
2616 "make check" doesn't finish with "All 1 tests passed".
2617
2618 * tests/regression.at (Token definitions): Don't rely on
2619 AT_PARSER_CHECK for data that contains backslashes. It currently
2620 uses 'echo', and 'echo' isn't portable if its argument contains
2621 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
2622 that the byte '\0xff' is not printable in the C locale; it is,
2623 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
2624 not printable, so use '\0x81' to test.
2625
2626 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
2627 version of GCC, since the macro is used with non-GCC compilers.
2628
2629 Fix core dump reported by Pablo De Napoli in
2630 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
2631 * tests/regression.at (Invalid inputs with {}): New test.
2632 * src/parse-gram.y (token_name): Translate type before using
2633 it as an index.
2634
2635 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
2636 the user's name space. All uses changed to __attribute__
2637 ((__unused__)).
2638 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
2639 Add __attribute__ ((__noreturn__)).
2640
2641 * etc/clcommit: Remove. We weren't using it, and it failed
2642 "make maintainer-distcheck".
2643 * Makefile.maint: Merge from coreutils.
2644 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
2645 (syntax-check-rules): Change list of rules as described below.
2646 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
2647 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
2648 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
2649 (sc_trailing_space): New rules.
2650 (sc_xalloc_h_in_src): Remove.
2651 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2652 (sc_space_tab, sc_error_exit_success, sc_changelog):
2653 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
2654 (makefile-check, po-check, author_mark_check):
2655 (makefile_path_separator_check, copyright-check):
2656 Use grep -n, to make it easier to find violations.
2657 Use CVS_LIST and CVS_LIST_EXCEPT.
2658 (header_regexp, h_re): Remove.
2659 (dd_c): New macro.
2660 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
2661 (my-distcheck): Use more-modern GCC flags.
2662 (signatures, %.asc): Remove.
2663 (rel-files, announcement): Remove signatures.
2664 Restore old updating code, even though we don't use it, so
2665 that we're the same as coreutils.
2666 (alpha, beta, major): Depend on news-date-check.
2667 Make the upload commands.
2668
2669 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2670 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2671 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2672 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2673 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2674 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2675 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2676 * tests/sets.at: Likewise.
2677
2678 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2679 we comment out the Autoconf version number.
2680 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2681 it's error-prone and "make maintainer-distcheck" rejects it.
2682
2683 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2684 Indent calls to "error" to pacify "make maintainer-distcheck",
2685 when the calls are not intended to be translated.
2686 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2687
2688 * src/Makefile.am (DEFS): Use +=, to pacify
2689 "make maintainer-distcheck".
2690 (bison_SOURCES): Add scan-skel.h.
2691 (sc_tight_scope): New rule, from coreutils.
2692
2693 * src/files.c (src_extension, header_extension):
2694 Now static, not extern.
2695 * src/getargs.c (short_options): Likewise.
2696 * src/muscle_tab.c (muscle_table): Likewise.
2697 * src/parse-gram.y (current_class, current_type, current_prec):
2698 Likewise.
2699 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2700 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2701 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2702 void, to avoid warning when NLS is disabled.
2703 * src/output.c: Include scan-skel.h.
2704 (scan_skel): Remove decl, since scan-skel.h does this.
2705 (output_skeleton):
2706 Indent calls to "error" to pacify "make maintainer-distcheck".
2707 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2708 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2709 "make maintainer-distcheck".
2710 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
2711 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
2712 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
2713 (skel_lex_destroy, scan_skel): Move these decls to...
2714 * src/scan-skel.h: New file.
2715 * src/uniqstr.c (uniqstr_assert):
2716 Indent calls to "error" to pacify "make maintainer-distcheck".
2717
2718 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
2719 not @VAR@.
2720
2721 * tests/torture.at: Revamp to avoid misuse of atoi that
2722 "make maintainer-distcheck" complained about.
2723
2724 * examples/extexi (message): Don't print a message more than once,
2725 and omit line-number decoration that makes Emacs compile think
2726 that informative messages are worth worrying about.
2727
2728 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
2729
2730 * configure.ac: Update version number.
2731
2732 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
2733 accidentally.
2734 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
2735 autogenerated by the maintainer.
2736 * examples/calc++/.cvsignore: Add *.yy.
2737
2738 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
2739 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2740 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2741
2742 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
2743
2744 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
2745 from maintainer-distcheck about casting the argument of 'free'.
2746
2747 * NEWS: Mention recent yytname changes.
2748 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
2749
2750 * bootstrap: For translations that have not yet been upgraded to
2751 the new runtime-po domain, prime the pump by extracting the
2752 relevant strings from the obsolete translations. This code can be
2753 removed once the bison-runtime domain has been translated by each
2754 team.
2755
2756 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
2757 now that token names are already quoted.
2758
2759 Fix problem reported by Anthony Heading.
2760 * data/glr.c (YYTOKEN_TABLE): New macro.
2761 (yytname): Define if YYTOKEN_TABLE.
2762 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
2763 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
2764 (YYERROR_VERBOSE): Define the same way the other skeletons do.
2765 * src/output.c (prepare_symbols): Output token_table_flag.
2766
2767 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
2768
2769 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
2770 again if the first call fails.
2771
2772 * data/glr.c (yytnamerr): New function.
2773 (yyreportSyntaxError): Use it to dequote most string literals.
2774 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
2775 with other skeletons. All uses changed.
2776 (yytnameerr_): New function.
2777 (yyreport_syntax_error): Use it to dequote most string literals.
2778 * data/yacc.c (yytnamerr): New function.
2779 (yyerrlab): Use it to decode most string literals.
2780 * doc/bison.texinfo (Decl Summary, Calling Convention):
2781 Clarify quoting convention of yytname.
2782 * src/output.c (prepare_symbols): Quote all names. This undoes
2783 the 2005-04-17 change, which is now accomplished (mostly) via
2784 changes in the parsers as described above.
2785 * tests/regression.at (Token definitions, Web2c Actions):
2786 Undo most 2005-04-17 change here, too.
2787
2788 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
2789
2790 Fix more problems reported by twlevo@xs4all.nl.
2791 * tests/cxx-type.at: Don't pipe output of ./types through sed to
2792 remove trailing spaces. This loses the exit status of ./types,
2793 and isn't needed since ./types shouldn't be emitting trailing
2794 spaces.
2795 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
2796 as the stack isn't valid in that case.
2797
2798 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2799 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2800 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2801 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
2802 is used.
2803 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
2804 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2805 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2806 Likewise.
2807
2808 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
2809 overly-picky compilers that reject 'char *foo = "bar";'.
2810
2811 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
2812 to FILE * parameter, not to stderr. This fixes a typo introduced
2813 in the 2005-07-12 change.
2814
2815 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
2816 warnings from GCC 4.
2817
2818 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
2819 (yyglrShiftDefer, yysplitStack):
2820 Remove unused parameters b4_pure_formals. All uses changed.
2821 (yyglrShift): Remove unused parameters b4_user_formals.
2822 All uses changed.
2823 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
2824
2825 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
2826
2827 Destructor cleanups and regularization among the three skeletons.
2828 * NEWS: Document the behavior changes.
2829 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
2830 stack before failing, as the cleanup code will do it for us now.
2831 * data/lalr1.cc (yyerrlab): Likewise.
2832 * data/glr.c (yyparse): Pop everything off the stack before
2833 freeing it, so that destructors get called properly.
2834 * data/lalr1.cc (yyreturn): Likewise.
2835 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
2836 This is more consistent.
2837 * doc/bison.texinfo (Destructor Decl): Mention more reasons
2838 why destructors might be called. 1.875 -> 2.1.
2839 (Destructor Decl, Decl Summary, Table of Symbols):
2840 Some English-language cleanups for %destructor.
2841 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2842 Add output line for destructor of start symbol.
2843 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
2844 because of that same extra output line.
2845
2846 * NEWS: Document minor wording changes in diagnostics of
2847 Bison-generated parsers.
2848 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
2849 Remove unused formals. All uses changed.
2850 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
2851 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
2852 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
2853 Rename yyoverflowab to yyexhaustedlab.
2854 When memory exhaustion occurs during syntax-error reporting,
2855 report it separately rather than in a single diagnostic; this
2856 eases translation.
2857 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
2858 (Memory Exhausted): Renamed from Parser Stack Overflow.
2859 Revamp wording slightly to prefer "memory exhaustion".
2860 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
2861
2862 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
2863
2864 Add i18n support to the GLR skeleton. Partially fix the C++
2865 skeleton; a C++ expert needs to finish this. Remove debugging
2866 msgids; there's little point to having them translated, since they
2867 can be understood only by someone who can read the
2868 (English-language) source code.
2869
2870 Generate runtime-po/bison-runtime.pot automatically, so that we
2871 don't have to worry about garbage getting in that file. We'll
2872 make sure after the next official release that old msgids don't
2873 get lost. See
2874 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
2875
2876 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
2877 Now auto-generated.
2878 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
2879 Fix typos in explanations of the runtime file.
2880 * bootstrap: Change gettext keyword from YYI18N to YY_.
2881 Use standard Makefile.in.in in runtime-po, since we'll arrange
2882 for backward-compatible bison-runtime.po files in a different way.
2883 * data/glr.c (YY_): New macro, from yacc.c.
2884 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
2885 Translate messages intended for users.
2886 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
2887 the wording in the other skeletons. We don't know that the memory
2888 is virtual.
2889 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
2890 Use same method that yacc.c uses.
2891 Don't translate debugging messages.
2892 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
2893 it doesn't work (yet), and requires C++ expertise to fix.
2894 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
2895 Move defn to a more logical place, to be consistent with other
2896 skeletons.
2897 Don't translate debugging messages.
2898 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
2899 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
2900 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
2901 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
2902
2903 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
2904 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
2905 void, not int.
2906 * tests/glr-regression.at (Badly Collapsed GLR States):
2907 Likewise.
2908 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2909 yylex should return 0 at EOF rather than aborting.
2910
2911 Improve tests for stack overflow in GLR parser.
2912 Problem reported by twlevo@xs4all.nl.
2913 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
2914 All uses removed.
2915 (yyStackOverflow): Just longjmp, but with value 2 so that caller
2916 can handle the problem.
2917 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
2918 (yyparse): New local variable yyresult to record the result.
2919 Use result of setjmp to set it, rather than storing itinto
2920 struct.
2921 (yyDone): Remove label.
2922 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
2923 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
2924 if YYABORT is used).
2925 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
2926 yyparse status; put status > 1 into diagnostic.
2927 Check that status==2 works.
2928 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
2929 Use exit status 3 for failure to open (which shouldn't happen).
2930
2931 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
2932
2933 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
2934 1 on syntax error; just let yyparse do its thing.
2935 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
2936 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
2937 (Exploding the Stack Size with Alloca):
2938 (Exploding the Stack Size with Malloc):
2939 Expect exit status 2, not 1, since the parser is supposed to blow
2940 its stack. Problem reported by twlevo@xs4all.nl.
2941
2942 * data/glr.c (yyparse): Don't assume that the initial calls
2943 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
2944 Print a stack-overflow message and fail instead.
2945 Initialize the line-number information before creating the stack,
2946 so that the stack-overflow message can report line zero safely.
2947
2948 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
2949
2950 Fix problems reported by twlevo@xs4all.nl.
2951 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
2952 (yyuserMerge): Provide a default case if b4_mergers is empty.
2953 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
2954 * tests/glr-regression.at
2955 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2956 Add casts to pacify C++ compilers.
2957 * tests/glr-regression.at (Improper merging of GLR delayed action
2958 sets): Declare yylex before using it.
2959 * tests/Makefile.am (maintainer-check-g++): Fix a stray
2960 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
2961 test for valgrind; valgrind is independent of g++.
2962 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
2963 for compatibility with POSIX 1003.1-2001 (if running coreutils).
2964 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
2965 Use a destructor, so that we can expand the stack. Change
2966 YYSTYPE to char * so that we can free it. Cast result of malloc.
2967
2968 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2969
2970 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
2971 a valgrind failure. Problem reported by twlevo@xs4all.nl.
2972
2973 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
2974
2975 * PACKAGING: New file, suggested by Bruno Haible and taken from
2976 similar wording in gettext's PACKAGING file.
2977 * NEWS: Mention PACKAGING.
2978 * Makefile.am (EXTRA_DIST): Add PACKAGING.
2979
2980 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
2981
2982 * NEWS: Document recent i18n improvements.
2983 * bootstrap: Get runtime translations into runtime-po.
2984 Create runtime-po files automatically, if possible.
2985 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
2986 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
2987 does not infringe on the user's name space.
2988 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
2989 * doc/bison.texinfo (Internationalization): Revamp the English
2990 and Texinfo syntax a bit, to try to make it clearer.
2991 (Bison Options, Option Cross Key): Mention --print-localedir.
2992 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
2993 YYENABLE_NLS. Quote a bit more.
2994 * runtime-po/.cvsignore: New file.
2995 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
2996 * runtime-po/Rules-quot: Remove; now created by bootstrap.
2997 * runtime-po/quot.sed: Likewise.
2998 * runtime-po/boldquot.sed: Likewise.
2999 * runtime-po/en@quot.header: Likewise.
3000 * runtime-po/en@boldquot.header: Likewise.
3001 * runtime-po/insert-header.sin: Likewise.
3002 * runtime-po/remove-potcdate.sin: Likewise.
3003 * runtime-po/Makevars: Likewise.
3004 * runtime-po/LINGUAS: Likewise.
3005 * runtime-po/de.po: Likewise; we will rely on the translation project
3006 to maintain this, so "bootstrap" should get it.
3007 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
3008 its value.
3009 * src/main.c (main): Bind the bison-runtime domain, too.
3010
3011 2005-07-12 Bruno Haible <bruno@clisp.org>
3012
3013 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3014 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3015 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3016 * runtime-po: New directory.
3017 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3018 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3019 * runtime-po/Rules-quot: New file, copied from po/.
3020 * runtime-po/quot.sed: Likewise.
3021 * runtime-po/boldquot.sed: Likewise.
3022 * runtime-po/en@quot.header: Likewise.
3023 * runtime-po/en@boldquot.header: Likewise.
3024 * runtime-po/insert-header.sin: Likewise.
3025 * runtime-po/remove-potcdate.sin: Likewise.
3026 * runtime-po/Makevars: New file.
3027 * runtime-po/POTFILES.in: New file.
3028 * runtime-po/LINGUAS: New file.
3029 * runtime-po/bison-runtime.pot: New file.
3030 * runtime-po/de.po: New file.
3031 * m4/bison.m4: New file.
3032 * Makefile.am (SUBDIRS): Add runtime-po.
3033 (aclocaldir, aclocal_DATA): New variables.
3034 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
3035 Define aclocaldir.
3036 * src/getargs.c (usage): Document --print-localedir option.
3037 (PRINT_LOCALEDIR_OPTION): New enum item.
3038 (long_options): Add --print-localedir option.
3039 (getargs): Handle --print-localedir option.
3040 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
3041 (Internationalization): New section.
3042
3043 2005-07-12 Akim Demaille <akim@epita.fr>
3044
3045 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
3046 for consistency with the rest of the code.
3047 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
3048 Add separators.
3049
3050 2005-07-12 Akim Demaille <akim@epita.fr>
3051
3052 * src/parse-gram.y: Use %printer instead of YYPRINT.
3053
3054 2005-07-12 Akim Demaille <akim@epita.fr>
3055
3056 * src/symtab.h, src/symtab.c (symbol_print): New.
3057 * src/symlist.h, src/symlist.c (symbol_list_print): New.
3058 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
3059
3060 2005-07-12 Akim Demaille <akim@epita.fr>
3061
3062 * data/glr.c (b4_syncline): Fix (swap) the definitions of
3063 b4_at_dollar and b4_dollar_dollar.
3064
3065 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
3066
3067 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
3068 and Pennello's paper.
3069
3070 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
3071
3072 * data/yacc.c (yyparse): Undo previous patch. Instead,
3073 set yylsp[0] and yyvsp[0] only if the initial action
3074 sets yylloc and yylval, respectively.
3075
3076 * data/yacc.c (yyparse): In the initial action, set
3077 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
3078 This avoids the use of undefined variables if the initial
3079 action does not set yylloc and/or yylval.
3080
3081 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
3082
3083 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
3084 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
3085 Remove from CVS. These files are automatically generated.
3086 * examples/extexi: Clarify that this file is now part of Bison,
3087 not GNU M4, and that it works with any POSIX-compatible Awk.
3088 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
3089 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
3090 so that we also get calc++-parser.yy. Geneate it.
3091 Use $(AWK), not gawk, since any conforming Awk will do.
3092 Put comment before action, since older 'make' can't handle comment
3093 in action.
3094 $(BUILT_SOURCES): List all built sources, not just some of them.
3095 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
3096 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
3097 $($(calc_sources_generated)): Remove unnecessary test for existence
3098 of target. (This had a shell syntax error anyway; a stray "x".)
3099 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
3100 calc++-parser.yy.
3101 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
3102
3103 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
3104 implied by the other modules.
3105
3106 2005-07-06 Akim Demaille <akim@epita.fr>
3107
3108 Bind examples/calc++ to the package.
3109 * examples/calc++/Makefile: Remove, replaced by...
3110 * examples/calc++/Makefile.am: ... this new file.
3111 * examples/calc++/test: Remove input.
3112 * examples/calc++/compile: Remove.
3113 * examples/Makefile.am: New.
3114 * configure.ac, Makefile.am: Adjust.
3115 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
3116
3117 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
3118
3119 * data/glr.c (yyFail): Drastically simplify; since the format argument
3120 never had any % directives, we can simply pass it to yyerror.
3121 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
3122 be modified later, as that is the usual style in glr.c.
3123 Problems reported by Paul Hilfinger.
3124
3125 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
3126 and size overflow errors.
3127 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
3128 in case the user prolog sets feature-test macros like _GNU_SOURCE.
3129 (YYSIZEMAX): New macro.
3130 (yystpcpy): New function, taken from yacc.c.
3131 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
3132 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
3133 so that we don't have to maintain their signatures.
3134 (yyFail): Check for buffer overflow, by using vsnprintf rather
3135 than vsprintf. Allocate a bigger buffer if possible.
3136 Report an error if buffer allocation fails.
3137 (yyStackOverflow): New function.
3138 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
3139 the initialization was successful. It might fail if storage was
3140 exhausted.
3141 (yyexpandGLRStack): Add more checks for storage allocation failure.
3142 Use yyStackOverflow to report failures.
3143 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
3144 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
3145 Don't assume stack number fits in int.
3146 (yysplitStack): Check for storage allocation failure.
3147 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
3148 can print diagnostics on storage allocation failure. All callers
3149 changed.
3150 (yyresolveValue): Use yybool for boolean.
3151 (yyreportSyntaxError): Check for size-calculation overflow.
3152 This code is taken from yacc.c.
3153 (yyparse): Check for storage allocation errors when allocating
3154 the initial stack.
3155
3156 2005-07-05 Akim Demaille <akim@epita.fr>
3157
3158 Extract calc++ from the documentation.
3159 * doc/bison.texinfo (Calc++): Add the extraction marks.
3160 * examples/extexi: New, from the aborted GNU Programming 2E.
3161 Separate the different paragraph of a file with empty lines.
3162 * examples/Makefile: Use it to extract the whole calc++ example.
3163
3164 2005-06-24 Akim Demaille <akim@epita.fr>
3165
3166 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
3167 class typedefs.
3168
3169 2005-06-22 Akim Demaille <akim@epita.fr>
3170
3171 * doc/bison.texinfo (C++ Language Interface): First stab.
3172 (C++ Parsers): Remove.
3173
3174 2005-06-22 Akim Demaille <akim@epita.fr>
3175
3176 * data/lalr1.cc (yylex_): Honor %lex-param.
3177
3178 2005-06-22 Akim Demaille <akim@epita.fr>
3179
3180 Start a set of simple examples.
3181 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
3182 * examples/calc++/calc++-driver.hh,
3183 * examples/calc++/calc++-parser.yy,
3184 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
3185 * examples/calc++/compile, examples/calc++/test: New.
3186
3187 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
3188
3189 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
3190 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
3191 which stems from the 2005-05-27 patch.
3192
3193 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3194
3195 * data/glr.c: Modify treatment of unused parameters to permit use
3196 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
3197
3198 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
3199
3200 Fix infringement on user name space reported by Janos Zoltan Szabo.
3201 * data/yacc.c (yyparse): strlen -> yystrlen.
3202
3203 2005-05-30 Akim Demaille <akim@epita.fr>
3204
3205 * data/lalr1.cc (_): New.
3206 Translate the various messages.
3207
3208 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3209
3210 Fix infringement on user name space reported by Bruno Haible.
3211 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
3212 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
3213 the user's name space.
3214 (alloca): Include <stdlib.h> to get it, if it's not built in.
3215 (YYMALLOC, YYFREE): Define only if needed.
3216 (malloc, free): Declare, but only if needed, as this infringes on
3217 the user name space.
3218
3219 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
3220
3221 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
3222 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
3223 with %d format.
3224 * lib/ebitset.c (min, max): Undef before defining.
3225 * lib/vbitset.c (min, max): Likewise.
3226 * lib/subpipe.c (create_subpipe): Save local variables in case
3227 vfork clobbers them.
3228
3229 2005-05-24 Bruno Haible <bruno@clisp.org>
3230
3231 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
3232 error message syntax used by gcc-4.0.
3233
3234 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
3235
3236 * README: Mention m4 1.4.3. Remove obsolete advice about
3237 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
3238
3239 * bootstrap: Remove workaround for problem I encountered with
3240 gettext 0.14.1; it seems to be fixed now.
3241
3242 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3243
3244 * NEWS: Version 2.0a.
3245
3246 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
3247 the previous change.
3248
3249 Various maintainer cleanups.
3250 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
3251 conftest*, for benefit of CVS commands run at the same time as
3252 "configure". Add build-aux, since "bootstrap" now creates it and
3253 its subfiles.
3254 * Makefile.cfg (move_if_change): Remove.
3255 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
3256 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
3257 (po_repo, do-po-update, po-update, wget_files, get-targets):
3258 (config.guess-url_prefix, config.sub-url_prefix):
3259 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
3260 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
3261 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
3262 Remove.
3263 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
3264 this is now the recommended name.
3265 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
3266 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
3267 ylwrap. These files now go into build-aux.
3268 * config/move-if-change: Remove.
3269 * config/prev-version.txt: Bump from 1.75 to 2.0.
3270
3271 * bootstrap: Add stdio-safer, unistd-safer modules.
3272 Remove m4/glibc2.m4 (introduced by latest gnulib, but
3273 we don't need it).
3274 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
3275 fopen-safer.c, stdio-safer.h, unistd-safer.h.
3276 * lib/subpipe.c: Include "unistd-safer.h".
3277 (create_subpipe): Make sure all the newly-created
3278 file descriptors are > 2, so that diagnostics don't
3279 get sent down them (which might cause Bison to hang, in theory).
3280 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
3281 * src/files.c (xfopen): Use fopen_safer, not fopen.
3282
3283 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
3284 yesterday's yacc.c fix.
3285
3286 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
3287
3288 * data/glr.c, data/lalr1.cc: Update copyright date.
3289
3290 Fix a destructor bug reported by Wolfgang Spraul in
3291 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
3292 * data/yacc.c (yyabortlab): Don't call destructor, and
3293 don't set yychar to EMPTY.
3294 (yyoverflowlab): Don't call destructor.
3295 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
3296 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
3297 since we no longer output the message "discarding lookahead token
3298 end of input ()".
3299
3300 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3301
3302 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
3303 fix a small glitch in debugging output.
3304 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
3305 after YY_SYMBOL_PRINT where needed.
3306
3307 (struct yyGLRState): Add some comments.
3308 (struct yySemanticOption): Add some comments.
3309 (union yyGLRStackItem): Add comment.
3310
3311 (yymergeOptionSets): Correct this to properly perform the union,
3312 avoiding infinite reported by Michael Rosien.
3313 Update comment.
3314
3315 * tests/glr-regression.at: Add test for GLR merging error reported
3316 by M. Rosien.
3317
3318 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3319
3320 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
3321 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
3322 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
3323 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
3324 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
3325 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
3326 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
3327 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
3328 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
3329 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
3330 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
3331 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
3332 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
3333 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
3334 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
3335 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
3336 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
3337 src/derives.h, src/files.c, src/files.h, src/getargs.c,
3338 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
3339 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
3340 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
3341 src/output.h, src/parse-gram.c, src/parse-gram.h,
3342 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
3343 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
3344 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
3345 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
3346 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
3347 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
3348 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
3349 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
3350 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
3351 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
3352 tests/reduce.at, tests/regression.at, tests/sets.at,
3353 tests/synclines.at, tests/testsuite.at, tests/torture.at:
3354 Update FSF postal mail address.
3355
3356 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
3357
3358 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
3359 Problem reported by Ralf Menzel.
3360
3361 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3362
3363 * tests/actions.at: Test that stack overflow invokes destructors.
3364 From Marcus Holland-Moritz.
3365 * data/yacc.c (yyerrlab): Move the code that destroys the stack
3366 from here....
3367 (yyreturn): to here. That way, destructors are called properly
3368 even if the stack overflows, or the user calls YYACCEPT or
3369 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
3370 (yyoverflowlab): Destroy the lookahead.
3371
3372 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
3373
3374 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
3375
3376 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
3377
3378 * NEWS: Bison-generated C parsers no longer quote literal strings
3379 associated with tokens.
3380 * src/output.c (prepare_symbols): Don't escape strings,
3381 since users don't want to see C escapes.
3382 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
3383 in diagnostics.
3384 * tests/input.at (Torturing the Scanner): Likewise.
3385 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
3386
3387 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
3388
3389 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
3390 the data size is known to be too small and we can't increase it.
3391 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
3392
3393 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
3394
3395 * src/parse-gram.y: Include quotearg.h.
3396 (string_as_id): Quote $1 before using it as a key, since the
3397 lexer no longer quotes it for us.
3398 (string_content): Don't strip quotes, since lexer no longer
3399 quotes it for us.
3400 * src/scan-gram.l: Include quotearg.h.
3401 ("\""): Omit quote.
3402 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
3403 a key, since the rest of the lexer doesn't quote it.
3404 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
3405 * tests/regression.at (Token definitions): Check for backslashes
3406 in token strings.
3407
3408 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
3409 (YYSIZE_T): Define to unsigned long int when using an older compiler.
3410 (yyparse): Revamp code to generate long syntax error message, to
3411 make it easier to translate, and to avoid problems with arithmetic
3412 overflow. Change "virtual memory" to "memory" in diagnostic, since
3413 we don't know whether the memory is virtual.
3414
3415 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3416
3417 * NEWS: Bison-generated C parsers now use the _ macro to
3418 translate strings.
3419 * data/yacc.c (_) [!defined _]: New macro.
3420 All English strings wrapped inside this macro.
3421 * doc/bison.texinfo (Bison Parser): Document _.
3422 * po/POTFILES.in: Include src/parse-gram.c, since it now
3423 includes translateable strings that parse-gram.y doesn't.
3424
3425 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3426
3427 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
3428 reverting the 2004-10-11 change to this function.
3429 (symbol_check_alias_consistency): Don't call symbol_type_set
3430 if the type name is already correct.
3431 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3432
3433 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3434
3435 * tests/regression.at (Token definitions): Don't use a token named
3436 c, as that generates a "#define c ..." that runs afoul of buggy
3437 stdlib.h that uses the identifier c as a member of struct
3438 drand48_data. Problem reported by Horst Wente.
3439
3440 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3441
3442 * bootstrap: Change translation URL from
3443 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3444 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3445 redirection glitches. Problem reported by twlevo@xs4all.nl.
3446
3447 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3448
3449 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3450 after operands; POSIX says this isn't portable for the c99 command.
3451
3452 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3453
3454 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3455 immediately if a data overrun has occurred; this may help us track
3456 down what may be a spurious failure on MacOS.
3457
3458 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3459
3460 Respond to problems reported by twlevo@xs4all.nl.
3461
3462 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3463
3464 * src/vcg.h: Comment fix.
3465 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3466 (G_CMAX): Change to -1 instead of INT_MAX.
3467
3468 * data/yacc.c (yyparse): Omit spaces before #line.
3469
3470 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3471
3472 * src/tables.c (state_number_to_vector_number): Put it inside an
3473 "#if 0", since it's not currently used. Problem reported by
3474 Roland McGrath.
3475
3476 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3477
3478 * src/output.c (escaped_output): Renamed from
3479 escaped_file_name_output, since we now use it for symbol tags as
3480 well. All uses changed.
3481 (symbol_destructors_output, symbol_printers_output):
3482 Escape symbol tags too.
3483 Problem reported by Matyas Forstner in
3484 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3485
3486 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3487 not needed.
3488 * src/output.c (user_actions_output, token_definitions_output,
3489 symbol_destructors_output, symbol_printers_output): Likewise.
3490 * src/reader.c (prologue_augment): Likewise.
3491 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3492
3493 * src/vcg.c (output_edge): Don't quote linestyle arg.
3494 Problem reported by twlevo@xs4all.nl.
3495
3496 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
3497
3498 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
3499 example, reported by Derek M Jones. Also, make the example even
3500 more outrageous, to better illustrate how bad the problem is.
3501
3502 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
3503
3504 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
3505 putsym. Typo reported by Sebastian Piping.
3506
3507 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
3508
3509 * doc/bison.texinfo (Language and Grammar): some -> same
3510 (Epilogue): int he -> in the
3511 Typos reported by Sebastian Piping via Justin Pence.
3512
3513 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
3514
3515 * tests/glr-regression.at (Improper handling of embedded actions
3516 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
3517 embedded actions and $-N in GLR parsers", work around an Autoconf bug
3518 with dollar signs in test names.
3519 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
3520 for a similar reason.
3521
3522 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
3523
3524 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
3525 wants to redefine G_VIEW.
3526
3527 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
3528
3529 * src/vcg.c (get_view_str): Remove case for normal_view.
3530 Problem reported by twlevo@xs4all.nl.
3531
3532 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
3533
3534 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
3535 Problem reported by twlevo@xs4all.nl.
3536
3537 * doc/bison.texinfo: Change @dircategory from "GNU programming
3538 tools" to "Software development". Requested by Richard Stallman
3539 via Karl Berry.
3540
3541 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
3542
3543 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
3544 Problem reported by twlevo@xs4all.nl.
3545
3546 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
3547
3548 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
3549 keyword; it's not needed with modern compilers, and it doesn't
3550 affect correctness with older compilers. Suggested by
3551 twlevo@xs4all.nl.
3552
3553 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
3554
3555 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
3556 gcc -Wswitch-default.
3557 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3558 * data/yacc.c (yyparse): Likewise.
3559
3560 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
3561
3562 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
3563 already. Let config.h define any nonstandard values.
3564
3565 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
3566
3567 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
3568 for the benefit of slower hosts. Problem reported by
3569 Nelson H. F. Beebe.
3570
3571 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
3572
3573 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
3574 being defined and not used.
3575 * data/lalr1.cc (yyparse): Likewise.
3576 Use "if (false)" rather than "if (0)".
3577
3578 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
3579
3580 * TODO: Mention that we should allow NUL bytes in tokens.
3581
3582 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
3583
3584 * src/scan-skel.l (<<EOF>>): Don't close standard output.
3585 Problem reported by Hans Aberg.
3586
3587 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
3588
3589 * src/getargs.c (version): Happy new year; update overall
3590 program copyright date from 2004 to 2005.
3591
3592 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
3593 Problem reported by Hans Aberg.
3594 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
3595 (Output file names.): Add a test for the case when standard output
3596 is closed.
3597
3598 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
3599
3600 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
3601 to fix an oversight in the Bison 2.0 manual.
3602
3603 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
3604
3605 * NEWS: Version 2.0. Reformat the existing news items since
3606 1.875, so that related items are grouped together.
3607 * configure.ac (AC_INIT): Bump version to 2.0.
3608 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
3609
3610 * tests/torture.at (Exploding the Stack Size with Alloca): Set
3611 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
3612 otherwise, we're not testing alloca. Unfortunately there's no
3613 simple way to consult HAVE_ALLOCA here.
3614
3615 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
3616 for yymsg, too.
3617
3618 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
3619 hand. This avoids a warning about comparing int to size_t when
3620 GCC warnings are enabled.
3621
3622 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
3623
3624 * NEWS: Bison-generated parsers no longer default to using the
3625 alloca function (when available) to extend the parser stack, due
3626 to widespread problems in unchecked stack-overflow detection.
3627 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
3628 responsibility to set it to a positive value. This lets the user
3629 specify a value that is not a preprocessor constant.
3630 * data/yacc.c (YYMAXDEPTH): Likewise.
3631 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
3632 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
3633 to be a compile-time constant. However, explain the constraints on it.
3634 Also, explain the constraints on YYINITDEPTH.
3635 (Table of Symbols): Explain that alloca is no longer the default.
3636 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
3637 to 1.
3638
3639 * doc/bison.texinfo (Location Default Action): Mention that n must
3640 be zero when k is zero. Suggested by Frank Heckenbach.
3641
3642 2004-12-22 Akim Demaille <akim@epita.fr>
3643
3644 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
3645 (parser::state_type, parser::semantic_type, parser::location_type):
3646 Private, not public.
3647 (parser::parse): Return ints, not bool.
3648 Returning a bool introduces a problem: 0 corresponds to false, and
3649 it seems weird to return false on success. Returning true changes
3650 the conventions for yyparse.
3651 Alternatively we could return void and send an exception.
3652 There is no clear consensus (yet?).
3653 (state_stack, semantic_stack, location_stack): Rename as...
3654 (state_stack_type, semantic_stack_type, location_stack_type): these.
3655 Private, not public.
3656 * tests/c++.at: New.
3657 * tests/testsuite.at, tests/Makefile.am: Adjust.
3658
3659 2004-12-21 Akim Demaille <akim@epita.fr>
3660
3661 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
3662
3663 2004-12-21 Akim Demaille <akim@epita.fr>
3664
3665 Don't impose std::string for filenames.
3666
3667 * data/lalr1.cc (b4_filename_type): New.
3668 (position::filename): Use it.
3669 (parser.hh): Move the inclusion of stack.hh and location.hh below
3670 the user code, so that needed headers for the filename type can be
3671 included first.
3672 Forward declare them before the user code.
3673 * tests/Makefile.am (check-local, installcheck-local): Pass
3674 TESTSUITEFLAGS to the TESTSUITE.
3675
3676 2004-12-20 Akim Demaille <akim@epita.fr>
3677
3678 Use more STL like names: my_class instead of MyClass.
3679
3680 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3681 (SemanticStack, SemanticType, StateStack, StateType)
3682 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3683 (Parser::value): Rename as...
3684 (location_stack, location_type, rhs_number_type, semantic_stack)
3685 (semantic_type, state_stack, state_type, token_number_type, stack)
3686 (slice, traits, parser::yylloc, parser::yylval): these.
3687
3688 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3689
3690 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3691
3692 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3693 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3694
3695 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3696
3697 Remove uses of 'short int' and 'unsigned short int'. This raises
3698 some arbitrary limits. It uses more memory but nowadays that's
3699 not much of an issue.
3700
3701 This change does not affect the generated parsers; that's a different
3702 task, as some users will want to conserve memory there.
3703
3704 Ideally we should use size_t to represent all object counts, and
3705 something like ptrdiff_t to represent signed differences of object
3706 counts; but that will require more code-cleanup than I have the
3707 time to do right now.
3708
3709 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
3710 Use size_t, not int or short int, to count objects.
3711 * src/closure.c (nritemset, closure): Likewise.
3712 * src/closure.h (nritemset, closure): Likewise.
3713 * src/nullable.c (nullable_compute): Likewise.
3714 * src/print.c (print_core): Likewise.
3715 * src/print_graph.c (print_core): Likewise.
3716 * src/state.c (state_compare, state_hash): Likewise.
3717 * src/state.h (struct state): Likewise.
3718 * src/tables.c (default_goto, goto_actions): Likewise.
3719
3720 * src/gram.h (rule_number, rule): Use int, not short int.
3721 * src/output.c (prepare_rules): Likewise.
3722 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
3723 errs, reductions): Likewise.
3724 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
3725 Likewise.
3726 * src/tables.c (vector_number, tally, action_number,
3727 ACTION_NUMBER_MINIMUM): Likewise.
3728 * src/output.c (muscle_insert_short_int_table): Remove.
3729
3730 2004-12-17 Akim Demaille <akim@epita.fr>
3731
3732 * data/lalr1.cc: Extensive Doxygenation.
3733 (error_): Rename as...
3734 (error): this, since it is visible to the user.
3735 Adjust callers.
3736 (Parser::message): Now an automatic variable from...
3737 (Parser::yyreport_syntax_error_): here.
3738 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
3739 Parser::error.
3740 * tests/input.at: Escape $.
3741
3742 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
3743
3744 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
3745 Parenthesize rhs to avoid obscure problems with mistakes like
3746 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
3747 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3748 b4_rhs_location): Likewise.
3749 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3750 b4_rhs_location): Likewise.
3751
3752 2004-12-16 Akim Demaille <akim@epita.fr>
3753
3754 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
3755 yacc.c: be sure to stay within yycheck_.
3756 * tests/actions.at: Re-enable C++ tests.
3757
3758 2004-12-16 Akim Demaille <akim@epita.fr>
3759
3760 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
3761 real.
3762
3763 2004-12-16 Akim Demaille <akim@epita.fr>
3764
3765 Use #define to handle the %name-prefix.
3766
3767 * data/glr.c, data/yacc.c: Comment changes.
3768 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
3769 so that one can refer to yylex in the parser file, and have it
3770 renamed, as is the case with other skeletons.
3771
3772 2004-12-16 Akim Demaille <akim@epita.fr>
3773
3774 Move lalr1.cc internals into yy*.
3775
3776 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
3777 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
3778 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
3779 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
3780 (empty_, final_, terror_, errcode_, ntokens_)
3781 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
3782 (looka_, ilooka_, error_range_, nerrs_):
3783 Rename as...
3784 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
3785 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
3786 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
3787 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
3788 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
3789 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
3790 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
3791 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
3792 these.
3793
3794 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
3795
3796 Fix some problems reported by twlevo at xs4all.
3797 * src/symtab.c (symbol_new): Report an error if the input grammar
3798 contains too many symbols. This is better than calling abort() later.
3799 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
3800 (struct node, struct graph):
3801 Rename member expand to stretch. All uses changed.
3802 (struct graph): Remove member layoutalgorithm. All uses removed.
3803 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
3804 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
3805 All uses changed.
3806 (N_STRETCH): Rename from N_EXPAND. All uses changed.
3807
3808 2004-12-15 Akim Demaille <akim@epita.fr>
3809
3810 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
3811 Add more Doxygen comments.
3812 (symprint_, stack_print_, reduce_print_, destruct_, pop)
3813 (report_syntax_error_, translate_): Rename as...
3814 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
3815 (yypop_, yyreport_syntax_error_, yytranslate_): this.
3816
3817 2004-12-15 Akim Demaille <akim@epita.fr>
3818
3819 * data/lalr1.cc (lex_): Rename as...
3820 (yylex_): this.
3821 Move the trace here.
3822 Take the %name-prefix into account.
3823 Reported by Alexandre Duret-Lutz.
3824
3825 2004-12-15 Akim Demaille <akim@epita.fr>
3826
3827 Simplify the C++ parser constructor.
3828
3829 * data/lalr1.cc (debug_): Rename as...
3830 (yydebug_): so that the parser's internals are always in the yy*
3831 pseudo namespace.
3832 Adjust uses.
3833 (b4_parse_param_decl): Remove the leading comma as it is now only
3834 called as unique argument list.
3835 (Parser::Parser): Remove the constructor accepting a location and
3836 an initial debugging level.
3837 Remove from the other ctor the argument for the debugging level.
3838 (debug_level_type, debug_level, set_debug_level): New.
3839
3840 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
3841 constructor calls.
3842
3843 2004-12-15 Akim Demaille <akim@epita.fr>
3844
3845 Remove b4_root related material: failure experiment
3846 (which goal was to allow to derive from a class).
3847
3848 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
3849 definitions and uses.
3850
3851 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
3852
3853 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
3854 not 2, since it's not portable to subtract 1 from the start of an
3855 array. The new item 0 is never set or used. All uses changed.
3856
3857 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
3858 the default definition of YYLLOC_DEFAULT. Problem reported
3859 by Frank Heckenbach.
3860
3861 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
3862
3863 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
3864 the normal case and one for the error case. Just use the
3865 first one uniformly. Problem reported by Frank Heckenbach.
3866 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
3867 use exactly the same macro in both places.
3868 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
3869 so that the normal-case YYRHSLOC works for the error case too.
3870 All uses changed.
3871 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
3872 (YYLLOC_DEFAULT): Use the same macro as glr.c.
3873 * doc/bison.texinfo (Location Default Action): Don't claim that
3874 we have an array of locations. Use the same macro for both glr
3875 and lalr parsers. Mention YYRHSLOC. Mention what happens when
3876 the index is 0.
3877
3878 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3879
3880 * HACKING: Update email addresses to send announcements to.
3881
3882 * configure.ac (AC_INIT): Bump version to 1.875f.
3883
3884 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3885
3886 * NEWS: Version 1.875e.
3887 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
3888
3889 * src/scan-skel.l: Include "complain.h", for "fatal".
3890
3891 * src/relation.h (relation_print, relation_digraph):
3892 Relation sizes are of type relation_node, not size_t (this is
3893 merely a doc fix, since the two types are equivalent).
3894 (relation_transpose): Relation sizes are of type relation_node,
3895 not int.
3896 * src/relation.c: Likewise.
3897 (top, infinity): Now of type relation_node, not int.
3898 (traverse, relation_transpose): Use relation_node, not int.
3899
3900 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
3901 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
3902 (yyparse): Remove unused local introduced in 2004-10-25 patch.
3903
3904 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
3905 specifying whether the test should be skipped. Use it tp
3906 specify that the [%defines %skeleton "lalr1.cc"] tests currently
3907 fail on some hosts, and should be skipped.
3908
3909 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
3910
3911 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
3912 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
3913 unless otherwise specified below.
3914
3915 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
3916 to allocate kernel_base, kernel_items, kernel_size, since
3917 they needn't be initialized to 0.
3918 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
3919 * src/closure.c (new_closure): Likewise, for itemset.
3920 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
3921 * src/lalr.c (set_goto_map): Likewise, for temp_map.
3922 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
3923 (build_relations): Likewise for edge, states1, includes.
3924 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
3925 * src/reader.c (packgram): Likewise, for ritem, rules.
3926 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
3927 * src/relation.c (relation_digraph): Likewise for VERTICES.
3928 (relation_transpose): Likewise for new_R, end_R.
3929 * src/symtab.c (symbols_token_translations_init): Likewise for
3930 token_translations.
3931 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
3932 (token_actions): Likewise for yydefact, actrow, conflrow,
3933 conflict_list.
3934 (save_column): Likewise for froms[symno], tos[symno].
3935 (goto_actions): Likewise for state_count.
3936 (pack_table): Likewise for base, pos, check.
3937 (tables_generate): Likewise for width.
3938
3939 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
3940 for initial core. Just have a separate core, so we needn't worry
3941 about whether kernel_size and kernel_base are initialized.
3942
3943 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
3944 kernel_size, kernel_items): Remove unnecessary initialization.
3945 * src/conflicts.c (conflicts): Likewise.
3946 * src/derives.c (derives): Likewise.
3947 * src/muscle_tablc (muscle_insert): Likewise.
3948 * src/relation.c (relation_digraph): Likewise.
3949 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
3950 conflrow, conflict_table, conflict_list, table, check):
3951 Likewise.
3952
3953 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
3954 This is because all callers pass unsigned int.
3955 * src/closure.h (new_closure): Likewise.
3956
3957 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
3958 (build_relations): Initialize includes[i] in all cases.
3959 * src/reader.c (packgram): Always initialize rules[ruleno].prec
3960 and rules[ruleno].precsym. Initialize members in order.
3961 * src/relation.c (relation_transpose): Always initialize new_R[i]
3962 and end_R[i].
3963 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
3964
3965 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
3966 conflict_list[0] was always 0, but now it isn't initialized.
3967
3968 * src/table.c (table_grow): When conflict_table grew, the grown
3969 area wasn't cleared. Fix this.
3970
3971 * lib/.cvsignore: Add strdup.c, strdup.h.
3972 * m4/.cvsignore: Add strdup.m4.
3973
3974 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
3975
3976 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
3977 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
3978 GOTO_NUMBER_MAXIMUM, since we occasionally compute
3979 ngotos + 1 without checking for overflow.
3980 (build_relations): Use END_NODE, not -1, to denote end of edges.
3981 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
3982 build_relations): Use goto_number, not int, for goto numbers.
3983 * src/tables.c (save_column, default_goto): Likewise.
3984
3985 2004-11-23 Akim Demaille <akim@epita.fr>
3986
3987 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
3988 of #defining from yystype.
3989 Don't typedef yystype, C++ does not need it.
3990 This lets it possible to forward declare it as union.
3991
3992 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
3993
3994 * bootstrap (gnulib_modules): Add extensions.
3995 Problem reported by Jim Meyering.
3996
3997 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
3998
3999 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4000 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4001 src/system.h, src/tables.c: XFREE -> free, to accommodate
4002 recent change to gnulib xalloc.h.
4003 Problem reported by Jim Meyering.
4004
4005 2004-11-17 Akim Demaille <akim@epita.fr>
4006
4007 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4008
4009 2004-10-28 Akim Demaille <akim@epita.fr>,
4010 Alexandre Duret-Lutz <adl@gnu.org>
4011
4012 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4013 changes.
4014 (YYCDEBUG): Adjust.
4015 Use it instead of cdebug_.
4016 (Parser::debug_stream, Parser::set_debug_stream): New.
4017 (Parser::symprint_): Define cdebug_ for temporary backward
4018 compatibility.
4019 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4020 debug_stream ().
4021
4022 2004-11-17 Akim Demaille <akim@epita.fr>
4023
4024 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4025 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4026 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4027 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4028
4029 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4030
4031 * data/glr.c (yyloc_default): Remove; not used.
4032 Problem reported by Frank Heckenbach.
4033
4034 2004-10-25 Akim Demaille <akim@epita.fr>
4035
4036 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
4037 Introduce another definition to address simple location arrays.
4038 (yyGLRStack): New member: yyerror_range.
4039 (yyrecoverSyntaxError, yyparse): Update it.
4040 (yyrecoverSyntaxError): Use it when shifting the error token to
4041 have an accurate range, equivalent to the one computed by both
4042 yacc.c and lalr1.cc.
4043 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
4044 that column numbers start at column 0, as per GNU Coding
4045 Standards, the others tests, and the doc.
4046 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
4047 Adjust to the above change (first column is 0).
4048 And adjust the location of the "<error>", now covering the whole
4049 line.
4050
4051 2004-10-22 Akim Demaille <akim@epita.fr>
4052 and Paul Eggert <eggert@cs.ucla.edu>
4053
4054 Remove some arbitrary limits on goto numbers and relations.
4055 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
4056 initial values, since they're never used.
4057 (set_goto_map): ngotos is now unsigned, so test for overflow
4058 by seeing whether it wraps around to zero.
4059 * src/lalr.h (goto_number): Now size_t, not short int.
4060 (GOTO_NUMBER_MAXIMUM): Remove.
4061 * src/relation.c (relation_print, traverse, relation_transpose):
4062 Check for END_NODE rather than looking at sign.
4063 * src/relation.h (END_NODE): New macro.
4064 (relation_node): Now size_t, not short int.
4065
4066 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
4067
4068 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
4069 keyword, not an identifier. Problem reported by Baron Schwartz in
4070 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
4071
4072 2004-10-11 Akim Demaille <akim@epita.fr>
4073
4074 * src/symtab.c (symbol_check_alias_consistency): Also check
4075 type names, destructors, and printers.
4076 Reported by Alexandre Duret-Lutz.
4077 Recode the handling of associativity and precedence in terms
4078 of symbol_precedence_set.
4079 Accept no redeclaration at all, not even equal to the previous
4080 value.
4081 (redeclaration): New.
4082 Use it to factor redeclaration complaints.
4083 (symbol_make_alias): Don't set the type of the alias, let
4084 symbol_check_alias_consistency do it as for other features.
4085 * src/symtab.h (symbol): Add new member prec_location, and
4086 type_location.
4087 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
4088 * tests/input.at (Incompatible Aliases): New.
4089
4090 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
4091
4092 .cvsignore fixes to accommodate gnulib changes,
4093 and the practice of naming build directories "_build".
4094 * .cvsignore: Add "_*". Sort.
4095 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
4096 * m4/.cvsignore: Add "*_gl.m4".
4097
4098 2004-10-06 Akim Demaille <akim@epita.fr>
4099
4100 * src/parse-gram.y (add_param): Fix the truncation of trailing
4101 spaces.
4102
4103 2004-10-05 Akim Demaille <akim@epita.fr>
4104
4105 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
4106 whether the reducion was empty or not. This leaves room to
4107 improve the use of YYLLOC_DEFAULT in such a case.
4108 lalr1.cc is still experimental, so changing this is acceptable.
4109 And finally, there are probably not many users who changed the
4110 handling of locations in GLR, so changing is admissible too.
4111
4112 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
4113 empty reduction, set @$ to an empty location ending the previously
4114 stacked symbol.
4115 Adjust uses to make sure the code is triggered on empty
4116 reductions.
4117 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
4118 expected output: empty reductions have empty locations.
4119
4120 2004-09-29 Akim Demaille <akim@epita.fr>
4121
4122 * data/lalr1.cc: Move towards a more standard C++ coding style
4123 for templates: Class < T > -> Class<T>.
4124
4125 2004-09-29 Akim Demaille <akim@epita.fr>
4126
4127 * data/lalr1.cc: Reinstall the former ctor, for sake of
4128 compatibility, but warn it will be removed.
4129 Move towards a more standard C++ coding style (i.e., type *var ->
4130 type* var).
4131
4132 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
4133
4134 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
4135 since it's less likely to work if NULs are involved in the future.
4136
4137 2004-09-27 Akim Demaille <akim@epita.fr>
4138
4139 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
4140
4141 2004-09-27 Akim Demaille <akim@epita.fr>
4142
4143 * data/lalr1.cc (b4_parse_param_decl_1): New.
4144 (b4_parse_param_decl): Use it to have different names between attribute
4145 and argument names.
4146 (b4_cc_constructor_call): Likewise.
4147
4148 2004-09-24 Akim Demaille <akim@epita.fr>
4149
4150 * src/parse-gram.y (add_param): Strip the leading and trailing
4151 blanks from a formal argument declaration.
4152 (YY_LOCATION_PRINT): New.
4153
4154 2004-09-24 Akim Demaille <akim@epita.fr>
4155
4156 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
4157 after the location.
4158
4159 2004-09-24 Akim Demaille <akim@epita.fr>
4160
4161 * doc/bison.texinfo (Table of Symbols): Sort.
4162
4163 2004-09-21 Akim Demaille <akim@epita.fr>
4164
4165 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
4166 the useless parentheses.
4167 Suggested by Paul Eggert.
4168
4169 2004-09-20 Akim Demaille <akim@epita.fr>
4170
4171 Let the initial-action act on the look-ahead, and use it for the
4172 "initial push" (corresponding to an hypothetical beginning-of-file).
4173 And let lalr1.cc honor %initial-action.
4174
4175 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
4176 example.
4177 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
4178 (Parser::Parser): Remove the ctor that used to initialize it.
4179 (Parser::parse): Like in the other skeletons, issue the "starting
4180 parse" message before any action.
4181 Honor %initial-action.
4182 Initialize the stacks with the lookahead.
4183 * data/yacc.c: Let $$ and @$ in %initial-action designate the
4184 look-ahead.
4185 Push them in the stacks.
4186 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
4187
4188 2004-09-20 Akim Demaille <akim@epita.fr>
4189
4190 * doc/bison.texinfo (Initial Action Decl): New.
4191
4192 2004-09-20 Akim Demaille <akim@epita.fr>
4193
4194 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
4195 clearer criterion to define it.
4196 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
4197 When reducing on an empty RHS, use the latest stacked location as
4198 location.
4199 yylloc is not always available.
4200 * data/glr.c: Likewise.
4201 Also, honor initial-actions.
4202
4203 2004-09-20 Akim Demaille <akim@epita.fr>
4204
4205 * data/yacc.c (YY_LOCATION_PRINT): New.
4206 Define when we know YYLTYPE's structure, i.e., when the default
4207 YYLLOC_DEFAULT is used.
4208 * data/c.m4 (b4_yysymprint_generate): Use it.
4209 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
4210 value of the result.
4211 (error_start_): Replace with...
4212 (error_range_): this location array.
4213 This allows to replace code relying on the implementation of
4214 locations by portable code.
4215 * data/yacc.c (yylerrsp): Replace with...
4216 (yyerror_range): this.
4217 Every time a token is popped, update yyerror_range[0], to have an
4218 accurate location for the error token.
4219 * data/glr.c (YY_LOCATION_PRINT): New.
4220 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
4221 deference a pointer.
4222 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
4223 report the location in %printers.
4224
4225 * src/scan-skel.l: Instead of abort, report error messages to ease
4226 understanding skeleton scanning failures.
4227
4228 2004-09-16 Akim Demaille <akim@epita.fr>
4229
4230 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
4231 (iterator, const_iterator): these, to be more in the C++ spirit.
4232 Also, return reverse iterators so that when displaying the stack
4233 we display its bottom first.
4234 (Parser::stack_print_, Parser::reduce_print_): Match the messages
4235 from yacc.c.
4236 We should probably use vector here though.
4237
4238 2004-09-16 Akim Demaille <akim@epita.fr>
4239
4240 Have more complete shift traces.
4241
4242 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
4243 to report Shifts instead of ad hoc YYDPRINTF invocations,
4244 including for the error token.
4245 * data/lalr1.cc (symprint_): Output the location.
4246 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
4247 output the location within the %printer.
4248 Activate GLR tests, at least to make sure they compile properly.
4249 They still don't pass though.
4250 * tests/calc.at: Adjust expect verbose output, since now "Entering
4251 state..." is on a different line than the "Shifting" message.
4252
4253 2004-09-08 Akim Demaille <akim@epita.fr>
4254
4255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
4256 Bison directive from the Bison file to the invocation of this
4257 macro, so that these directives are passed to
4258 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
4259 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
4260 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
4261 the extra Bison directives instead of the whole series.
4262 Change the grammar so that there are recoverable errors, and
4263 unrecoverable errors. Now we can have the parser give up before
4264 consuming the whole input. As a result we now can observe that
4265 the lookahead is freed when needed.
4266 Change the parser source to parse argv[1] instead of a hard coded
4267 string.
4268 Simplify yylex, and give a value and location to EOF.
4269 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
4270 passed directives already coded in the file.
4271 Add some tests to check the location of "error".
4272 For some tests, the C++ parser is correct, and not yacc.c.
4273 For other tests, they provide different, but unsatisfying, values,
4274 so keep the C++ value so that at least one parser is "correct"
4275 according to the test suite.
4276 (Actions after errors): Remove, this is subsumed by the
4277 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
4278
4279 2004-09-06 Akim Demaille <akim@epita.fr>
4280
4281 * data/lalr1.cc: Adjust the indentation of the labels.
4282 (Parser::pop): New.
4283 Use it.
4284
4285 2004-09-06 Akim Demaille <akim@epita.fr>
4286
4287 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
4288 argument, an informative message.
4289 Call YY_SYMBOL_PRINT.
4290 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
4291 * data/lalr1.cc (destruct_): Likewise.
4292 In addition, no longer depend on b4_yysymprint_generate and
4293 b4_yydestruct_generate to generate these functions, do it "by
4294 hand".
4295
4296 2004-09-03 Akim Demaille <akim@epita.fr>
4297
4298 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
4299 invoked, yydestruct the lookahead.
4300 * tests/calc.at (Calculator $1): Update the expected lengths of
4301 traces: there is an added line for the discarded lookahead.
4302 * doc/bison.texinfo (Destructor Decl): Some rewording.
4303 Define "discarded" symbols.
4304
4305 2004-09-02 Akim Demaille <akim@epita.fr>
4306
4307 * data/lalr1.cc (translate_, destruct_): No reason to be static.
4308
4309 2004-09-02 Akim Demaille <akim@epita.fr>
4310
4311 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
4312 (YYDSYMPRINTF): Rename as...
4313 (YY_SYMBOL_PRINT): this.
4314 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
4315 two.
4316 Use it instead of direct symprint_ calls.
4317 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
4318 one.
4319
4320 2004-09-02 Akim Demaille <akim@epita.fr>
4321
4322 * data/lalr1.cc (b4_yysymprint_generate): New.
4323 (symprint_): New member function, defined when YYDEBUG.
4324 Use it consistently instead of token/nterm debugging output by
4325 hand.
4326 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4327 %printer calls to use cdebug_ when using lalr1.cc.
4328
4329 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
4330
4331 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
4332 with #ifdef YYDEBUG.
4333
4334 2004-08-26 Akim Demaille <akim@epita.fr>
4335
4336 * doc/bison.texinfo (Implementing Loops): Rename as...
4337 (Implementing Gotos/Loops): this.
4338
4339 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
4340
4341 Adjust to latest gnulib.
4342 * bootstrap (gnulib_modules): Add xalloc-die.
4343 Set LC_ALL=C so that file names sort consistently.
4344 Prefer the gnulib copies of gettext.m4, glibc21.m4,
4345 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
4346 uintmax_t.m4, ulonglong.m4.
4347 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
4348 po.m4 since we are now using _gl.m4 instead.
4349
4350 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
4351
4352 * src/scan-action.l: Remove. Scanning of semantic actions is
4353 handled in scan-gram.l.
4354
4355 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
4356
4357 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
4358
4359 * src/location.h (struct): The file member is a uniqstr.
4360 (equal_boundaries): Use UNIQSTR_EQ for comparison.
4361
4362 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
4363
4364 Fix bug with non-%union parsers that have printers or destructors,
4365 which led to a Bison core dump. Reported by Peter Fales in
4366 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
4367
4368 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
4369 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
4370 not to our own type.
4371 * src/output.c (symbol_destructors_output, symbol_printers_output):
4372 Don't assume %union.
4373 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
4374 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
4375 UNION-FLAG. All callers changed.
4376 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
4377 Use type char, not unsigned int, when declaring an array of char;
4378 this lets us remove a cast.
4379 (Printers and Destructors): Add non-%union test cases.
4380
4381 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4382
4383 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4384 GLR writeups. E.g., avoid frenchspacing and the future tense,
4385 change "lookahead" to "look-ahead", and change "wrt" to "with
4386 respect to".
4387
4388 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4389
4390 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
4391 New sections, split off from the GLR Parsers section. Put the new
4392 Simple GLR Parser near the start of the GLR section, for clarity.
4393 Rewrite connective text.
4394
4395 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
4396
4397 * doc/bison.texinfo (Simple GLR Parsers): New section.
4398
4399 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4400
4401 * NEWS, TODO, doc/bison.texinfo:
4402 Use "look-ahead" instead of "lookahead", to be consistent.
4403 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
4404 while we're fixing "look-ahead".
4405 * src/conflicts.c (shift_set): Renamed from shiftset.
4406 (look_ahead_set): Renamed from lookaheadset.
4407 * src/print.c: Likewise.
4408 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
4409 name for "lookahead".
4410 (report_types, usage): Likewise.
4411 * src/getargs.h (report_look_ahead_tokens): Renamed from
4412 report_lookaheads.
4413 * src/lalr.c (compute_look_ahead_tokens): Renamed from
4414 compute_lookaheads.
4415 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
4416 (look_ahead_tokens_print): Renamed from lookaheads_print.
4417 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
4418 state_rule_lookaheads_print.
4419 * src/state.h: Likewise.
4420 (reductions.look_ahead_tokens): Renamed from lookaheads.
4421 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
4422 AT_DATA_LOOKAHEADS_GRAMMAR.
4423
4424 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4425
4426 * README: Update location of patched M4 distribution.
4427
4428 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4429
4430 Don't assume the C++ compiler takes the same arguments as the C compiler
4431 (trivial change).
4432 * configure.ac (O0CXXFLAGS): New var.
4433 * tests/atlocal.in (CXXFLAGS): Use it.
4434
4435 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4436
4437 Fix some "make check" problems with C++ reported by
4438 Albert Chin-A-Young for Tru64 C++ in this thread:
4439 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4440
4441 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4442 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4443 Output to a .cc file for C++, not to a .c file.
4444 * tests/calc.at (AT_CHECK_CALC): Likewise.
4445 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4446 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4447
4448 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4449
4450 * tests/calc.at, tests/actions.at: Workaround for SGI
4451 C++ compiler. (trivial change)
4452
4453 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4454
4455 Spent a few hours checking out which prerequisite versions the
4456 current sources actually require. I went all the way back to
4457 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4458 a seemingly endless set of combinations of versions more recent
4459 than that. The bottom line is that the current sources require
4460 fairly recent versions of the build tools, and it'll be some work
4461 to change this.
4462 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4463 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4464 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4465 Add comments explaining why those particular versions are
4466 currently needed.
4467
4468 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4469 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
4470 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
4471
4472 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4473 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4474
4475 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4476
4477 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4478 0.11.5. Suggested by Bruno Haible.
4479 * bootstrap: Remove gettext version checking.
4480
4481 * doc/bison.texinfo (Decl Summary): Also mention that %union
4482 can depend on prerequisite types. Problem reported by Tim
4483 Van Holder.
4484
4485 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4486
4487 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4488 * README-alpha: Don't tell people not to package this.
4489
4490 * bootstrap: Don't assume $(...) works; use `...` instead.
4491 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4492 gettext better.
4493
4494 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4495 put into the -d output file, and mention what to do if YYSTYPE is
4496 defined as a macro.
4497
4498 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
4499
4500 Undo change made earlier today: it caused autopoint to not bring
4501 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
4502 autopoint's.
4503
4504 * bootstrap: Check that gettext version matches what's in
4505 configure.ac. Warn users to ignore robots.txt ERROR 404.
4506 * bootstrap: Undo today's earlier change (logged below).
4507 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
4508
4509 The gettext version checking is causing more trouble than it's
4510 curing; remove it. Problem reported by Paul Hilfinger.
4511
4512 * bootstrap: Issue a warning that one can expect a message
4513 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
4514 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
4515
4516 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
4517
4518 Ensure that the C++ compiler used for testing actually works on a
4519 simple test program; if not, skip the C++-related tests. Problem
4520 reported by Vin Shelton in:
4521 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
4522
4523 * m4/cxx.m4: New file.
4524 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
4525 * tests/atlocal.in (BISON_CXX_WORKS): Add.
4526 * tests/local.at (AT_COMPILE_CXX): Use it.
4527
4528 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4529
4530 * data/glr.c (yylloc): Output this macro even if locations are not
4531 being generated, as the GLR parser needs it even in that case.
4532 Problem reported by Troy A. Johnson
4533 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
4534
4535 * configure.ac (AC_INIT): Update to 1.875e.
4536
4537 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4538
4539 * NEWS: Version 1.875d.
4540 * configure.ac (AC_INIT): Likewise.
4541 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
4542
4543 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
4544 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
4545 lalr1.cc runs afoul of the first, and the last two are no longer
4546 supported by GCC 3.4.0.
4547 * README: Mention GNU m4 1.4 or later; mention m4 patches.
4548 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
4549
4550 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
4551
4552 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
4553 unsigned int, for compatibility with latest gnulib hash module.
4554 * src/state.c (state_hash, state_hasher): Likewise.
4555 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
4556 * src/uniqstr.c (hash_uniqstr): Likewise.
4557
4558 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
4559
4560 * NEWS: Unescaped newlines are no longer allowed in char & strings.
4561
4562 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
4563 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
4564 character and string literals.
4565 (unexpected_end): New function.
4566 (unexpected_eof): Use it.
4567 (unexpected_newline): New function.
4568 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
4569 actions.
4570
4571 * NEWS: Document %expect-rr.
4572
4573 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
4574 Fix typo by replacing $1 with $option.
4575 Remove more 'intl'-related files.
4576 Don't DEFUN AM_INTL_SUBDIR twice.
4577
4578 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
4579 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
4580 strtoul.c.
4581 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
4582 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
4583 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
4584 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
4585 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
4586 * src/.cvsignore: Add *.output.
4587
4588 * src/parse-gram.y: Put copyright notice inside %{ %} so it
4589 gets copied to the output file.
4590
4591 2004-04-28 Paul Eggert <eggert@twinsun.com>
4592
4593 Get files from the gnulib and po repositories, instead of relying
4594 on them being in our CVS. Upgrade to latest versions of gnulib
4595 and Automake.
4596
4597 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
4598 * bootstrap: Bootstrap from gnulib and po repositories.
4599 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
4600 * README-cvs: Document these changes. Remove version numbers from
4601 mentions of build tools, since they change so often. Mention Flex.
4602
4603 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
4604 (gl_USE_SYSTEM_EXTENSIONS): Add.
4605 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
4606 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
4607 does this for us.
4608 (AC_ISC_POSIX): Remove; we no longer support this
4609 ancient OS, as it gets in the way of latest Autoconf & gnulib.
4610 (AC_HEADER_STDC): Remove: we now assume C89 or better.
4611 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
4612 Do not check for C89 headers, except for locale.h which is used
4613 by the Yacc library and must port to K&R hosts.
4614 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
4615 Do not check for C89 functions, except for setlocale which is
4616 used by the Yacc library.
4617 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
4618 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
4619 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
4620 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
4621 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
4622 AM_GNU_GETTEXT): Remove; now done by:
4623 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
4624 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
4625 for us.
4626
4627 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
4628 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
4629 Define to empty, as gnulib.mk will do the rest for us.
4630 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
4631 for us.
4632 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
4633 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
4634
4635 * src/files.c: Include gnulib's xstrndup.h.
4636
4637 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
4638 (REALLOC): Use xnrealloc, for likewise.
4639 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
4640 (strnlen, memrchr): Remove decls; functions no longer used.
4641 Include <stpcpy.h>.
4642
4643 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
4644 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4645 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
4646 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
4647 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
4648 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
4649 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
4650 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
4651 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
4652 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
4653 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
4654 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4655 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
4656 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
4657 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
4658 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
4659 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
4660 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
4661 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4662 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
4663 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
4664 Remove, as these files are now generated automatically
4665 by bootstrap or automake.
4666
4667 * po/ChangeLog: Remove: all but one entry was a duplicate
4668 of this file, and I moved that 2000-11-02 entry here.
4669
4670 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4671 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4672 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4673 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4674 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4675 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4676 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4677 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4678 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4679 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4680 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4681 xstrndup.h.
4682 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4683 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4684 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4685 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4686 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4687 * src/.cvsignore: Remove *_.c.
4688
4689
4690 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4691 support it. (The latest stable gzip doesn't.)
4692
4693 2004-04-27 Paul Eggert <eggert@twinsun.com>
4694
4695 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4696 case, as stos_ is now used by destructors due to the 2004-02-09
4697 change.
4698
4699 Remove more K&R C support.
4700 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4701 * lib/subpipe.c (errno): Remove decl.
4702 Include <stdlib.h> unconditionally.
4703 (EXIT_FAILURE): Remove macro.
4704 * src/complain.c (vfprintf, strerror): Remove.
4705 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4706 unconditionally.
4707 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4708 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4709 (strchr, strspn, memchr): Remove decls.
4710 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
4711 unconditionally. Do not declare perror.
4712 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
4713 unconditionally.
4714
4715 * src/complain.c (_): Remove useless defn, as system.h defines this.
4716
4717 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
4718 with latest obstack.h.
4719 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
4720 to procedure types, as obstack.h now does that for us.
4721 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
4722
4723 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
4724 so that this include file can stand alone.
4725 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
4726 does this now. Include subpipe.h first after config.h, to
4727 test whether it can stand alone.
4728
4729 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
4730 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
4731 unused declaration.
4732
4733 * tests/synclines.at (%union synch line): Put a dummy member in
4734 the union, because empty unions aren't allowed in C. Caught
4735 by GCC 3.4.0.
4736
4737 2004-04-13 Jim Meyering <jim@meyering.net>
4738
4739 * src/conflicts.c (conflicts_print): Correct format string typo:
4740 use `%%' to produce literal `%'. (trivial change)
4741
4742 2004-03-30 Paul Eggert <eggert@twinsun.com>
4743
4744 * src/getargs.c (version): Update copyright year to 2004.
4745
4746 * data/c.m4 (b4_int_type): Use 'short int' rather than
4747 'short', and similarly for 'long', 'unsigned', etc.
4748 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
4749 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
4750 yy_yypstack, yydumpstack): Likewise.
4751 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
4752 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
4753 Likewise.
4754 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
4755 yy_stack_print, yyparse): Likewise.
4756 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
4757 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
4758 * lib/bitset.c (bitset_print): Likewise.
4759 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
4760 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4761 * lib/bitsetv.c (bitsetv_dump): Likewise.
4762 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
4763 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
4764 Likewise.
4765 * src/LR0.c (allocate_itemsets): Likewise.
4766 * src/gram.h (rule_number, rule): Likewise.
4767 * src/lalr.h (goto_number): Likewise.
4768 * src/nullable.c (nullable_compute): Likewise.
4769 * src/output.c (prepare_rules): Likewise.
4770 * src/relation.c (relation_print, relation_digraph): Likewise.
4771 * src/relation.h (relation_node): Likewise.
4772 * src/state.h (state_number, transitions, errs, reductions,
4773 struct state): Likewise.
4774 * src/symtab.h (symbol_number, struct symbol): Likewise.
4775 * src/tables.c (vector_number, tally, action_number,
4776 default_goto, goto_actions): Likewise.
4777 * tests/existing.at (GNU Cim Grammar): Likewise.
4778 * tests/regression.at (Web2c Actions): Likewise.
4779
4780 * src/output.c (muscle_insert_short_int_table): Renamed from
4781 muscle_insert_short_table. All uses changed.
4782
4783 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4784
4785 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
4786 (declaration): Replace expected_conflicts with expected_sr_conflicts.
4787 Add %expect-rr rule.
4788
4789 * src/scan-gram.l: Recognize %expect-rr.
4790
4791 * src/conflicts.h (expected_sr_conflicts): Rename from
4792 expected_conflicts.
4793 (expected_rr_conflicts): Declare.
4794
4795 * src/conflicts.c (expected_sr_conflicts): Rename from
4796 expected_conflicts.
4797 (expected_rr_conflicts): Define.
4798 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
4799 for GLR parsers.
4800 Use expected_sr_conflicts in place of expected_conflicts.
4801 Warn if expected_rr_conflicts used in non-GLR parser.
4802
4803 * doc/bison.texinfo: Add documentation for %expect-rr.
4804
4805 2004-03-08 Paul Eggert <eggert@gnu.org>
4806
4807 Add support for hex token numbers. Suggested by Odd Arild Olsen in
4808 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
4809
4810 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
4811 in lalr1.cc.
4812 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
4813 * src/scan-gram.l (scan_integer): New function.
4814 ({int}): Use it.
4815 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
4816 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
4817 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
4818 Say "long int", not "long", for uniformity with GNU style.
4819
4820 2004-02-25 Paul Eggert <eggert@twinsun.com>
4821
4822 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
4823 compilers. This fixes a problem with Intel's C++ compiler being
4824 chatty, reported by Guido Trentalancia in
4825 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
4826
4827 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
4828
4829 Support %destructor and merge error locations in lalr1.cc.
4830
4831 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
4832 (Parser::stos_): Define unconditionally.
4833 (Parser::destruct_): New method. Generate its body with
4834 b4_yydestruct_generate.
4835 (Parser::error_start_): New attribute.
4836 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
4837 token which are discarded.
4838 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
4839 error_start_ when erroneous token are discarded.
4840 (Parser::parse) <yyerrlab1>: Compute the location of the error
4841 token so that it covers all the discarded tokens.
4842 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
4843 it can be called with `%skeleton "lalr1.cc"', and do that.
4844
4845 2004-02-02 Paul Eggert <eggert@twinsun.com>
4846
4847 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
4848 $(top_srcdir)/lib and ../lib. This fixes a bug reported
4849 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
4850 There's no need to mention top_builddir since Automake does that
4851 for us.
4852 (INCLUDES): Remove, as Automake says it's obsolescent.
4853 Contents migrated into AM_CPPFLAGS as described above.
4854 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
4855
4856 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4857
4858 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
4859 (yyreportSyntaxError): Handle case where lookahead token is
4860 YYEMPTY.
4861
4862 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4863
4864 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
4865 resulting parsers are compilable with C++.
4866
4867 2003-12-23 Paul Eggert <eggert@twinsun.com>
4868
4869 * config/depcomp, config/install-sh: Sync with Automake 1.8.
4870 * src/output.c (output_skeleton): Rename local var.
4871 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
4872 Bison tokens, as this runs afoul of the 2003-10-07 change that
4873 disallowed NUL bytes in character constants or string literals.
4874
4875 * tests/local.at: Require Autoconf 2.59's Autotest.
4876 * tests/testsuite.at: Don't include local.at, since we now assume
4877 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
4878 including it.
4879 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
4880 multiple inclusion warnings.
4881
4882 2003-12-02 Akim Demaille <akim@epita.fr>
4883
4884 * doc/bison.texinfo (How Can I Reset the Parser): More about start
4885 conditions.
4886 From Bruno Haible.
4887
4888 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
4889
4890 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
4891
4892 2003-10-07 Paul Eggert <eggert@twinsun.com>
4893
4894 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
4895 if testsuite doesn't exist.
4896
4897 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
4898 literals, unfortunately.
4899 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
4900 Complain about NUL bytes in character constants or string literals.
4901
4902 2003-10-05 Paul Eggert <eggert@twinsun.com>
4903
4904 * NEWS: Don't document %no-default-prec, as it's still
4905 too experimental.
4906 * doc/bison.texinfo: Document %no-default-prec only if
4907 the defaultprec flag is set. Normally it's not.
4908
4909 2003-10-04 Paul Eggert <eggert@twinsun.com>
4910
4911 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
4912 non-modifiable lvalue, instead of a modifiable one.
4913 * doc/bison.texinfo (Actions): Document that $$ can
4914 be assigned to. Do not claim that $$ and $N are
4915 array element references: user code should not rely on this.
4916
4917 2003-10-01 Paul Eggert <eggert@twinsun.com>
4918
4919 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
4920 (grammar_declaration): Use it.
4921 * src/scan-gram.l: New token %no-default-prec.
4922 * tests/conflicts.at: Revamp tests to use %no-default-prec.
4923 * NEWS, doc/bison.texinfo: Document the above.
4924
4925 2003-10-01 Akim Demaille <akim@epita.fr>
4926
4927 VCG no longer supports long_straight_phase.
4928
4929 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
4930 * src/print_graph.c (print_graph): Adjust.
4931
4932 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
4933 and Paul Eggert <eggert@twinsun.com>
4934
4935 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
4936 Table of Symbols): Document %default-prec.
4937 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
4938 (grammar_declaration): Set default_prec on %default-prec.
4939 * src/scan-gram.l (%default-prec): New token.
4940 * src/reader.h (default_prec): New flag.
4941 * src/reader.c: Likewise.
4942 (packgram): Handle it.
4943 * tests/conflicts.at (%default-prec without %prec,
4944 %default-prec with %prec, %default-prec 1): New tests.
4945
4946 2003-09-30 Paul Eggert <eggert@twinsun.com>
4947
4948 * tests/testsuite.at: Include local.at, not input.at, fixing
4949 a typo in the 2003-08-25 patch.
4950
4951 2003-08-27 Akim Demaille <akim@epita.fr>
4952
4953 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
4954 GCC warnings.
4955
4956 2003-08-26 Akim Demaille <akim@epita.fr>
4957
4958 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
4959 "<\#" to avoid magic from Gnus when posting parts of this script.
4960
4961 2003-08-26 Akim Demaille <akim@epita.fr>
4962
4963 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
4964 (Parser::parse): here.
4965 Adjust: nerrs and errstatus is now replaced by...
4966 (Parser::nerrs_, Parser::errstatus_): New.
4967
4968 2003-08-25 Akim Demaille <akim@epita.fr>
4969
4970 * config/announce-gen, Makefile.cfg: New.
4971 * Makefile.am: Adjust.
4972 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
4973 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
4974
4975 2003-08-25 Akim Demaille <akim@epita.fr>
4976
4977 When reducing initial empty rules, Bison parser read an initial
4978 location that is not defined. This results in garbage, and that
4979 affects Bison's own parser. Therefore we need (i) to extend Bison
4980 to support a means to initialize this location, and (ii) to use
4981 this CVS Bison to fix CVS Bison's parser.
4982
4983 * src/reader.h, reader.c (epilogue_augment): Remove, replace
4984 with...
4985 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
4986 * src/parse-gram.y: Adjust.
4987 (%initial-action): New.
4988 (%error-verbose): Since we require CVS Bison, there is no reason
4989 not to use it.
4990 * src/scan-gram.l: Adjust.
4991 * src/Makefile.am (YACC): New, to make sure we use our own parser.
4992 * data/yacc.c (yyparse): Use b4_initial_action.
4993
4994 2003-08-25 Akim Demaille <akim@epita.fr>
4995
4996 * doc/bison.texinfo: Don't promote stdout for error messages.
4997
4998 2003-08-25 Akim Demaille <akim@epita.fr>
4999
5000 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5001 From Alexandre Duret-Lutz.
5002
5003 2003-08-25 Akim Demaille <akim@epita.fr>
5004
5005 Version 1.875c.
5006
5007 2003-08-25 Akim Demaille <akim@epita.fr>
5008
5009 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5010 Use them.
5011
5012 2003-08-25 Akim Demaille <akim@epita.fr>
5013
5014 * data/lalr1.cc (Parser::reduce_print_): New.
5015 Use it.
5016
5017 2003-08-25 Akim Demaille <akim@epita.fr>
5018
5019 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5020 error recovery loops. This patch is based on
5021 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
5022 Also, augment the similarity between lalr1.cc and yacc.c.
5023 Note: the locations of error recovery rules are not correct yet.
5024
5025 * data/lalr1.cc: Comment changes to augment the similarity between
5026 lalr1.cc and yacc.c.
5027 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5028 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5029 yyerrlab), when hitting EOF, pop the whole stack here instead of
5030 merely falling thru the default error handling mechanism.
5031 (yyerrorlab): New label, with the old contents of YYERROR,
5032 plus the following change: pop the stack of rhs corresponding
5033 to the production that invoked YYERROR. That is how Yacc
5034 behaves (required by POSIX).
5035 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
5036 fail.
5037
5038 2003-08-25 Akim Demaille <akim@epita.fr>
5039
5040 Tune local.at so that people can "autom4te -l autotest calc.at -o
5041 calc" for instance, to extract a sub test suite.
5042
5043 * tests/testsuite.at: Move the initialization, Autotest version
5044 requirement, and AT_TESTED invocation into...
5045 * tests/local.at: here.
5046 * tests/testsuite.at: Include it for compatibility with Autoconf
5047 2.57.
5048 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
5049 be ignore.
5050
5051 2003-08-04 Paul Eggert <eggert@twinsun.com>
5052
5053 Rework code slightly to avoid gcc -Wtraditional warnings.
5054 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
5055 The returned value is now stored in *YY0. All callers changed.
5056 * src/output.c (merge_output): Adjust to the above change.
5057
5058 2003-07-26 Paul Eggert <eggert@twinsun.com>
5059
5060 * data/glr.c (YYASSERT): New macro.
5061 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
5062 yyresolveStates, yyprocessOneStack):
5063 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
5064 Derived from a suggestion by Frank Heckenbach.
5065
5066 2003-07-25 Paul Eggert <eggert@twinsun.com>
5067
5068 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
5069 for portability to K&R C (after ansi2knr, presumably). See
5070 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5071 by Frank Heckenbach, though I have omitted the structure-initialization
5072 part of his glr-knr.diff patch since I recall that the Portable
5073 C Compiler didn't require that change.
5074
5075 Let the user specify how to allocate and free memory.
5076 Derived from a suggestion by Frank Heckenbach in
5077 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
5078 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
5079 All uses of free, malloc, realloc changed to use these macros,
5080 and unnecessary casts removed.
5081 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
5082
5083 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
5084
5085 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
5086 use s.empty() rather than s == "" to test for empty string; see
5087 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
5088 (trivial change)
5089
5090 2003-06-25 Akim Demaille <akim@epita.fr>
5091
5092 * config/depcomp, config/install-sh: Update from masters.
5093
5094 2003-06-20 Paul Eggert <eggert@twinsun.com>
5095
5096 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
5097 and return properly parenthesized result.
5098 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
5099 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5100 Remove unnecessary parentheses from uses.
5101 * doc/bison.texinfo (Location Default Action): Describe the
5102 conventions for parentheses.
5103
5104 2003-06-19 Paul Eggert <eggert@twinsun.com>
5105
5106 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
5107 yyreportTree): Do not assume that size_t is the same width as int,
5108 when printing sizes. Print sizes using an unsigned format.
5109 Problem reported by Frank Heckenbach in
5110 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
5111
5112 Port to Forte Developer 7 C compiler.
5113 * data/glr.c (struct YYLTYPE): If locations are not being used,
5114 declare a single dummy member, as empty structs do not conform
5115 to the C standard.
5116 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
5117 the Forte Developer 7 C compiler complains that end-of-loop
5118 code is not reached.
5119
5120 2003-06-17 Paul Eggert <eggert@twinsun.com>
5121
5122 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
5123 avoid warnings from picky compilers about redefinition of PARAMS.
5124
5125 2003-06-17 Paul Eggert <eggert@twinsun.com>
5126
5127 Version 1.875b.
5128
5129 * NEWS: Document 1.875b.
5130
5131 * lib/bbitset.h: Do not include config.h; that's the includer's job.
5132 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
5133 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
5134 Don't use 'index' in comments, as it's a builtin fn on some hosts.
5135 * lib/bitset_stats.c: Include gettext.h unconditionally, as
5136 per recent gettext manual's suggestion.
5137 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
5138 Use prototypes, not old-style definitions.
5139 * lib/lbitset.c (lbitset_unused_clear): Likewise.
5140 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
5141 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
5142 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
5143 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
5144 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
5145 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
5146 vbitset_or_and_cmp, vbitset_copy): Likewise.
5147
5148 * lib/libiberty.h: Do not include config.h; that's the includer's job.
5149 Do not include <stdlib.h>.
5150 (PARAMS): Define unconditionally for C89.
5151 (ATTRIBUTE_NORETURN): Remove.
5152 (ATTRIBUTE_UNUSED): Define unconditionally.
5153
5154 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
5155 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
5156 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
5157 * lib/vbitset.c, lib/vbitset.h: New files.
5158 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5159 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
5160 from libbitset.
5161
5162 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
5163 `How Can I Reset @code{yyparse}', since texinfo does not allow
5164 arbitrary @ in node names.
5165
5166 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
5167 shouldn't be needed according to the gettext 0.12.1 documentation
5168 but which seem to be needed anyway: codeset.m4 glibc21.m4
5169 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
5170 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
5171 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
5172
5173 * lib/.cvsignore: Add stdbool.h.
5174 * m4/.cvsignore: Add nls.m4, po.m4.
5175
5176 Upgrade to CVS gnulib.
5177 * stdbool_.h: File renamed from stdbool.h.in.
5178 * configure.ac (AM_STDBOOL_H): Invoke this instead of
5179 AC_HEADER_STDBOOL.
5180 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
5181 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
5182 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
5183 (MOSTLYCLEANFILES): New var.
5184 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
5185 (stdbool.h): New rule.
5186 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
5187 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
5188 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
5189 m4/quote.m4: Upgrade to today's gnulib.
5190
5191 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
5192 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
5193 the tests right now.
5194 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
5195 yyerror are declared before use; C99 requires this.
5196
5197 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5198
5199 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
5200 first.
5201 (yyrecoverSyntaxError): Correct the logic for setting and testing
5202 yyerrState.
5203 Correct comment on handling EOF.
5204 Allow states with only a default reduction, rather than failing
5205 (I can't quite reconstruct why these were not allowed before).
5206
5207 Fixes to avoid problem that $-N rules in GLR parsers can cause
5208 buffer overruns, corrupting state.
5209
5210 * src/output.c (prepare_rules): Output max_left_semantic_context
5211 definition.
5212 * src/reader.h (max_left_semantic_context): New variable declaration.
5213 * src/scan-gram.l (max_left_semantic_context): Define.
5214 (handle_action_dollar): Update max_left_semantic_context.
5215 * data/glr.c (YYMAXLEFT): New definition.
5216 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
5217 (yyresolveAction): Ditto.
5218
5219 Fixes to problems with location handling in GLR parsers reported by
5220 Frank Heckenbach (2003/06/05).
5221
5222 * data/glr.c (YYLTYPE): Make trivial if locations not used.
5223 (YYRHSLOC): Add parentheses, and define only if locations used.
5224 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
5225 locations not used.
5226 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
5227 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
5228
5229 * tests/cxx-type.at: Exercise location information; update tests
5230 to differentiate output with and without locations.
5231 Remove forward declarations of yylex and yyerror---caused errors
5232 because default YYLTYPE not yet defined.
5233 Change semantic actions to compute strings, rather than printing
5234 them directly (to test proper passing of semantics values). Change
5235 output to prefix notation and update test data and expected results.
5236 (yylex): Track locations.
5237 (stmtMerge): Return value rather than printing, and include arguments
5238 in value.
5239
5240 2003-06-03 Paul Eggert <eggert@twinsun.com>
5241
5242 Avoid warnings generated by GCC 2.95.4 when Bison is
5243 configured with --enable-gcc-warnings.
5244 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
5245 yy::]b4_parser_class_name[::translate_,
5246 yy::Stack::operator[] (unsigned),
5247 yy::Stack::operator[] (unsigned) const,
5248 yy::Slice::operator[] (unsigned),
5249 yy::Slice::operator[] (unsigned) const):
5250 Rename local vars to avoid warnings.
5251 * tests/glr-regression.at (Improper handling of embedded actions
5252 and $-N in GLR parsers): Remove unused local variable from yylex.
5253 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
5254 (void) as arg when not pure, since we now assume C89 when building
5255 Bison. Pacify GCC by using parameter.
5256
5257 2003-06-02 Paul Eggert <eggert@twinsun.com>
5258
5259 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
5260 yy::Location::lines, yy::Location::columns): Rename arguments
5261 to avoid shadowing; this removes a warning generated by GCC 3.3.
5262
5263 2003-06-01 Paul Eggert <eggert@twinsun.com>
5264
5265 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
5266 to g++, as GCC 3.3 complains if you do it.
5267 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
5268 everything that WARNING_CFLAGS has, except omit warnings
5269 not suitable for C++.
5270 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
5271 * tests/atlocal.in (CXXFLAGS): New var.
5272 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
5273
5274 Fix a GLR parser bug I reported in February; see
5275 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
5276 The problem was that GLR parsers did not conform to the C standard,
5277 because actions like { $1 = $2 + $3; } expanded to expressions
5278 that invoked YYFILL in separate subexpressions, and YYFILL assigned
5279 to a local variable. The C standard says that expressions
5280 like (var = f ()) + (var = f ()) have undefined behavior.
5281 Another problem was that GCC sometimes issues warnings that
5282 yyfill and its parameters are unused.
5283
5284 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
5285 as possibly unused.
5286 (yyfill): New function.
5287 (YYFILL): Use it.
5288 (yyuserAction): Change type of yynormal to bool, so that it matches
5289 the new yyfill signature. Mark it as possibly unused.
5290
5291
5292 Follow up on a bug I reported in February, where a Bison-generated
5293 parser can loop. Provide a test case and a fix for yacc.c. I
5294 don't have a fix for lalr1.cc or for glr.c, unfortunately.
5295 The original bug report is in:
5296 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
5297
5298 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
5299 macro's size was becoming unwieldy.
5300 (yyerrlab): Do not discard an empty lookahead symbol, as this
5301 might destroy garbage.
5302 (yyerrorlab): New label, with the old contents of YYERROR,
5303 plus the following change: pop the stack of rhs corresponding
5304 to the production that invoked YYERROR. That is how Yacc
5305 behaves, and POSIX requires this behavior.
5306 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
5307 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
5308 Define 'alarm' to do nothing if unistd.h is not available.
5309 Add a new rule "exp: '-' error;" to test the above change to
5310 data/yacc.c. Use 'alarm' to abort any test taking longer than
5311 10 seconds, as it's probably looping.
5312 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
5313 Also, the new yacc.c generates two fewer diagnostics for an
5314 existing test.
5315
5316 2003-05-24 Paul Eggert <eggert@twinsun.com>
5317
5318 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
5319 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
5320 This fixes a problem reported by John Bowman when the Compaq/HP
5321 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
5322 -ansi -Wall -gall).
5323 * data/yacc.c (union yyalloc): Likewise.
5324 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
5325
5326 Switch from 'int' to 'bool' where that makes sense.
5327
5328 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
5329 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
5330 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
5331 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
5332 Return or accept bool, not int. All callers changed.
5333 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
5334 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
5335 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
5336 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
5337 bitset_or_and_cmp_): Likewise.
5338 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
5339 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
5340 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
5341 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
5342 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
5343 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
5344 bitset_stats_or_and_cmp): Likewise.
5345 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
5346 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
5347 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
5348 ebitset_xor_cmp): Likewise.
5349 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
5350 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
5351 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
5352 lbitset_xor_cmp): Likewise.
5353 * lib/bbitset.h: Include <stdbool.h>.
5354 (struct bitset_vtable): The following members now return bool, not
5355 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
5356 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
5357 or_and_cmp).
5358 * src/conflicts.c (count_rr_conflicts): Likewise.
5359 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
5360 All uses changed.
5361 * lib/ebitset.c (ebitset_obstack_init): Likewise.
5362 * lib/lbitset.c (lbitset_obstack_init): Likewise.
5363 * src/getargs.c (debug_flag, defines_flag, locations_flag,
5364 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5365 graph_flag): Likewise.
5366 * src/getargs.h (debug_flag, defines_flag, locations_flag,
5367 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5368 graph_flag): Likewise.
5369 * src/output.c (error_verbose): Likewise.
5370 * src/output.h (error_verbose): Likewise.
5371 * src/reader.c (start_flag, typed): Likewise.
5372 * src/reader.h (typed): Likewise.
5373 * src/getargs.c (LOCATIONS_OPTION): New constant.
5374 (long_options, getargs): Use it.
5375 * src/lalr.c (build_relations): Use bool, not int.
5376 * src/nullable.c (nullable_compute): Likewise.
5377 * src/print.c (print_reductions): Likewise.
5378 * src/tables.c (action_row, pack_vector): Likewise.
5379 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
5380 * src/output.c (prepare): Use it.
5381 * src/output.c (token_definitions_output,
5382 symbol_destructors_output, symbol_destructors_output): Use string,
5383 not boolean integer, to keep track of whether to output separator.
5384 * src/print_graph.c (print_core): Likewise.
5385 * src/state.c (state_rule_lookaheads_print): Likewise.
5386
5387 * config/install-sh: Sync from automake 1.7.5.
5388
5389 2003-05-14 Paul Eggert <eggert@twinsun.com>
5390
5391 * src/parse-gram.y (rules_or_grammar_declaration): Require a
5392 semicolon after a grammar declaration, in the interest of possible
5393 future changes to the Bison input language.
5394 Do not allow a stray semicolon at the start of the grammar.
5395 (rhses.1): Allow one or more semicolons after any rule, including
5396 just before "|" as required by POSIX.
5397 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
5398 grammar.
5399
5400 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
5401
5402 %parse-param support for lalr1.cc.
5403
5404 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
5405 b4_cc_constructor_calls, b4_cc_constructor_call,
5406 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
5407 definitions.
5408 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
5409 parse-param arguments.
5410 (yy::b4_parser_class_name): Declare instance variables to
5411 hold parse-param arguments.
5412 * tests/calc.at: s/value/semantic_value/ because value clashes
5413 with a member of yy::b4_parser_class_name. Adjust C++ code
5414 to handle %parse-param. Enable %parse-param test in C++.
5415
5416 2003-05-12 Paul Eggert <eggert@twinsun.com>
5417
5418 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
5419 English a bit. Fix fclose typo. Change "const char" to "char
5420 const", and use ANSI C rather than K&R for "main". Suggest
5421 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
5422 and suggest yy_switch_to_buffer.
5423
5424 2003-05-05 Paul Eggert <eggert@twinsun.com>
5425
5426 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
5427 C89. This avoids a diagnostic on compilers that define __STDC__
5428 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
5429 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5430
5431 2003-05-03 Paul Eggert <eggert@twinsun.com>
5432
5433 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5434 Do not overrun array bounds.
5435 This should fix a bug reported today by Olatunji Oluwabukunmi in
5436 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
5437
5438 2003-04-29 Akim Demaille <akim@epita.fr>
5439
5440 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5441 * src/getargs.c, src/getargs.h: here, as bool, not int.
5442 (nondeterministic_parser): New.
5443 * src/parse-gram.y, src/scan-gram.l: Support
5444 %nondeterministic-parser.
5445 * src/output.c (prepare): Use nondeterministic_parser instead
5446 of glr_parser where appropriate.
5447 * src/tables.c (conflict_row, action_row, save_row)
5448 (token_actions, token_actions, pack_vector): Ditto.
5449
5450 2003-04-29 Akim Demaille <akim@epita.fr>
5451
5452 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5453
5454 2003-04-29 Akim Demaille <akim@epita.fr>
5455
5456 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5457 with %pure-parser and %locations to exercise the patch from Yakov
5458 Markovitch below.
5459
5460 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5461
5462 * data/yacc.c: (b4_lex_param): Corrected for the case where
5463 %lex-param is provided and %pure-parser isn't.
5464
5465 2003-04-27 Paul Eggert <eggert@twinsun.com>
5466
5467 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
5468 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
5469 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5470 if it is not defined.
5471 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5472
5473 2003-04-26 Paul Eggert <eggert@twinsun.com>
5474
5475 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5476 Declare to be of type suitable for the ninf value itself, not of
5477 type suitable for the corresponding table, since the latter might
5478 be unsigned but the ninf value might be negative. This fixes a
5479 bug reported by Alexandre Duret-Lutz in
5480 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
5481
5482 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5483 invokes it. We shouldn't invoke it twice because it will attempt
5484 to put error.o in the archive twice. This fixes a glitch reported
5485 by Martin Mokrejs in
5486 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
5487
5488 2003-04-21 Paul Eggert <eggert@twinsun.com>
5489
5490 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5491 to gnulib.
5492
5493 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5494
5495 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5496 Fix obvious typo that results in uncompilable GLR parsers
5497 when both %pure-parser and %locations are used. (trivial change)
5498
5499 2003-04-17 Paul Eggert <eggert@twinsun.com>
5500
5501 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
5502 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
5503 Do not insert the expected token via unput, as this runs afoul
5504 of a POSIX-compatibility bug in flex 2.5.31.
5505 All uses changed to BEGIN the parent state,
5506 since we no longer insert the expected token via unput.
5507 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
5508 that is no longer emitted after the above change.
5509
5510 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
5511 the first one. This change is from Paul Hilfinger, and it fixes
5512 regression reported by Werner Lemberg in
5513 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5514
5515 (resolve_sr_conflict): Don't invoke state_errs_set
5516 unless one or more tokens have been explicitly made errors.
5517 Otherwise, the above change causes Bison to abort.
5518
5519 * tests/existing.at (GNU pic Grammar): New test case, taken from
5520 Lemberg's email.
5521
5522 2003-03-31 Akim Demaille <akim@epita.fr>
5523
5524 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
5525
5526 2003-03-31 Akim Demaille <akim@epita.fr>
5527
5528 * src/output.c (prepare_symbols): Avoid trailing spaces in the
5529 output.
5530
5531 2003-03-31 Akim Demaille <akim@epita.fr>
5532
5533 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
5534 From Paul Hilfinger.
5535
5536 2003-03-29 Akim Demaille <akim@epita.fr>
5537
5538 * m4/error.m4: Do not put under dynamic conditions some code which
5539 expansion is under static control.
5540
5541 2003-03-29 Akim Demaille <akim@epita.fr>
5542
5543 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
5544
5545 2003-03-29 Akim Demaille <akim@epita.fr>
5546
5547 * doc/bison.texinfo (Strings are Destroyed): New.
5548
5549 2003-03-13 Paul Eggert <eggert@twinsun.com>
5550
5551 * .cvsignore: Add configure.lineno.
5552 * src/.cvsignore: Add yacc.
5553 * tests/.cvsignore: Add testsuite.log.
5554 * doc/fdl.texi: Sync with latest FSF version.
5555
5556 2003-03-12 Paul Eggert <eggert@twinsun.com>
5557
5558 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
5559 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
5560 cursor, instead of leaving it undefined. This fixes a bug
5561 reported by Tim Van Holder in
5562 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
5563 * tests/input.at (Torturing the Scanner): Test the scanner on
5564 an empty input file, which was Tim Van Holder's test case.
5565
5566 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
5567 <sys/resource.h> can be included, include sys/time.h and
5568 sys/times.h first, if available. This works around the SunOS
5569 4.1.4 porting bug reported by Bruce Becker in
5570 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
5571
5572 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
5573 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
5574 AC_HEADER_SYS_WAIT.
5575
5576 Merge changes from gnulib. This was prompted because the CVS
5577 snapshot didn't build on Solaris 7 due to strnlen problems.
5578
5579 These changes need to be merged back into gnulib:
5580 * lib/hash.c: Include <stdbool.h> unconditionally.
5581 * m4/onceonly.m4 (m4_quote): New macro.
5582 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
5583 Quote AC_FOREACH variable-expansions properly.
5584 The 2003-01-03 obstack.h change also needs merging.
5585 {end of changes requiring merging}
5586
5587 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5588 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
5589 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
5590 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
5591 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
5592 New files, imported from gnulib.
5593 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
5594 above.
5595
5596 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
5597 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
5598 gnulib sources.
5599
5600 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
5601 Add.
5602 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
5603 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
5604 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
5605 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
5606 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
5607 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
5608 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
5609 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
5610 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
5611 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
5612 (jm_PREREQ_ARGMATCH): Remove.
5613 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
5614 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
5615
5616 * src/system.h: Include <stdbool.h> unconditionally.
5617
5618 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
5619 assuming at least C89 in the bitset code for some time now.
5620
5621 2003-03-03 Akim Demaille <akim@epita.fr>
5622
5623 * ro.po: New.
5624
5625 2003-03-02 Akim Demaille <akim@epita.fr>
5626
5627 * doc/bison.texinfo (Table of Symbols): Reactivate the
5628 documentation for %lex-param, and %parse-param.
5629
5630 2003-03-02 Akim Demaille <akim@epita.fr>
5631
5632 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
5633 generate verbose error messages.
5634 Use the number of tokens as an upper bound in yytname, as it
5635 cannot be a non terminal.
5636
5637 2003-03-02 Akim Demaille <akim@epita.fr>
5638
5639 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
5640 message.
5641
5642 2003-03-02 Akim Demaille <akim@epita.fr>
5643
5644 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
5645 Use them to exercise yycheck overrun.
5646 Based on Andrew Suffield's grammar.
5647
5648 2003-03-02 Akim Demaille <akim@epita.fr>
5649
5650 Create tests/local.at for Bison generic testing macros.
5651
5652 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
5653 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5654 This new file.
5655 * tests/calc.at (AT_CHECK_CALC): Adjust.
5656 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
5657 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
5658 * tests/local.at: here.
5659 (AT_COMPILE_CXX): Tags the tests using it as c++.
5660 Ignore the test if CXX is not functional.
5661
5662 2003-03-01 Paul Eggert <eggert@twinsun.com>
5663
5664 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5665 not loc->end, since loc->end might contain garbage and this leads
5666 to undefined behavior on some platforms.
5667 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5668 depend on *loc, so that the reader doesn't give the the false
5669 impression that *loc is initialized.
5670 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5671 does not survive the return.
5672
5673 2003-03-01 Akim Demaille <akim@epita.fr>
5674
5675 * src/scan-gram.l (code_start): Always initialize it when entering
5676 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5677 yylex invocation. An alternative would be making it static, but
5678 then it starts with the second %%'s beginning, instead of its end.
5679
5680 2003-02-28 Paul Eggert <eggert@twinsun.com>
5681
5682 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5683 around a UnixWare 7.1.1 porting bug reported by John Hughes in
5684 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
5685
5686 2003-02-26 Paul Eggert <eggert@twinsun.com>
5687
5688 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5689 Remove Sequent/Pyramid discussion (nobody uses them any more).
5690 Merge VMS and MS-DOS discussion; these ports may well be dead
5691 but let's keep mentioning them for now. Put <> around email
5692 addresses. Add copyright notice.
5693
5694 2003-02-24 Paul Eggert <eggert@twinsun.com>
5695
5696 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5697 to avoid collision with flex use of yylineno.
5698 Problem reported by Bruce Lilly in
5699 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
5700 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5701 * data/yacc.c (yy_reduce_print): Likewise.
5702
5703 * config/depcomp: Sync with Automake 1.7.3.
5704
5705 2003-02-21 Akim Demaille <akim@epita.fr>
5706
5707 * data/lalr1.cc: Use temporary variables instead of casts to
5708 change integer types.
5709 Suggested by Paul Eggert.
5710
5711 2003-02-21 Akim Demaille <akim@epita.fr>
5712
5713 * doc/bison.texinfo: Use "location" consistently to refer to @n,
5714 to avoid confusions with lalr1.cc's notion of Position.
5715 Suggested by Paul Eggert.
5716
5717 2003-02-20 Akim Demaille <akim@epita.fr>
5718
5719 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
5720 before initial_columns.
5721 (location.hh): Use consistent variable names when defining the
5722 operator<<.
5723 Use "last" so that we subtract from Positions, not from unsigned.
5724
5725 2003-02-20 Akim Demaille <akim@epita.fr>
5726
5727 * data/lalr1.cc (position.hh): New subfile, including the extended
5728 and Doxygen'ed documentation of class Position.
5729 (location.hh): Use it.
5730 Document a` la Doxygen.
5731 With the help of Benoit Perrot.
5732
5733 2003-02-20 Akim Demaille <akim@epita.fr>
5734
5735 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
5736 AT_YACC_IF.
5737 Redefine AT_YYERROR_SEES_LOC_IF using it.
5738 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
5739 not defined.
5740 Don't use the location in yy::Parser::error_ and
5741 yy::Parser::print_ when not %locations.
5742 Activate more lalr1.cc tests.
5743
5744 2003-02-19 Akim Demaille <akim@epita.fr>
5745
5746 * data/lalr1.cc: When displaying a line number, be sure to make it
5747 an int.
5748
5749 2003-02-19 Akim Demaille <akim@epita.fr>
5750
5751 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
5752 Remove, useless.
5753 (YYABORT, YYACCEPT, YYERROR): New.
5754 * tests/calc.at: Renable the lalr1.cc test.
5755
5756 2003-02-19 Akim Demaille <akim@epita.fr>
5757
5758 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
5759 error recovery, mixing with/without pops and discarding of the
5760 lookahead.
5761 Exercise YYERROR.
5762 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
5763
5764 2003-02-17 Paul Eggert <eggert@twinsun.com>
5765
5766 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
5767 * tests/testsuite.at (AT_COMPILE): Use them.
5768 This fixes the testsuite problem reported by Robert Lentz in
5769 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
5770
5771 2003-02-12 Paul Eggert <eggert@twinsun.com>
5772
5773 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
5774 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
5775 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
5776 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
5777 Check for malloc failure, for consistency with yacc.c.
5778 (yytname_size): Remove, for consistency with yacc.c.
5779
5780 The bug still remains in data/lalr1.cc, as I didn't have time
5781 to fix it there.
5782
5783 2003-02-06 Akim Demaille <akim@epita.fr>
5784
5785 * configure.ac (GXX): Rename as...
5786 (CXX): this, to keep the original Autoconf semantics.
5787 Require 2.57.
5788 * data/lalr1.cc: Fix b4_copyright invocations.
5789 If YYDEBUG is not defined, don't depend upon name_ being defined.
5790 (location.hh): Include string and iostream.
5791 (Position::filename): New member.
5792 (Position::Position ()): New.
5793 (operator<< (Position)): New.
5794 (operator- (Position, int)): New.
5795 (Location::first, Location::last): Rename as...
5796 (Location::begin, Location::end): these, to mock the conventional
5797 iterator names.
5798 (operator<< (Location)): New.
5799 * tests/atlocal.in (CXX): New.
5800 * tests/testsuite.at (AT_COMPILE_CXX): New.
5801 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
5802 locations in a more synthetic way.
5803 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
5804 lalr1.cc is used.
5805 Adjust the C locations to match those from Emacs: first column is
5806 column 0.
5807 Change all the expected results.
5808 Conform to the GCS: simplify the locations when applicable.
5809 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
5810 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
5811 these CPP macros with the m4 macros new defined by...
5812 (AT_CHECK_PUSHDEFS): this, i.e.:
5813 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
5814 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
5815 New macros.
5816 (AT_CHECK_POPDEFS): Undefine them.
5817 (AT_CHECK_CALC_LALR1_CC): New.
5818 Use it for the first lalr1.cc test.
5819
5820 2003-02-04 Akim Demaille <akim@epita.fr>
5821
5822 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
5823 Location as is defined.
5824
5825 2003-02-04 Akim Demaille <akim@epita.fr>
5826
5827 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
5828 name_ being defined.
5829
5830 2003-02-03 Paul Eggert <eggert@twinsun.com>
5831
5832 * src/gram.h (start_symbol): Remove unused decl.
5833
5834 Use more-consistent naming conventions for local vars.
5835
5836 * src/derives.c (derives_compute): Change type of local var from
5837 int to rule_number.
5838 * src/gram.c (grammar_rules_partial_print): Likewise.
5839 * src/print.c (print_core): Likewise.
5840 * src/reduce.c (reduce_grammar_tables): Likewise.
5841
5842 * src/gram.c (grammar_dump): Change name of item_number *
5843 local var from r to rp.
5844 * src/nullable.c (nullable_compute): Likewise.
5845
5846 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
5847
5848 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
5849 for symbol or symbol_number var.
5850 * src/reader.c (grammar_start_symbol_set): Likewise.
5851 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
5852 Likewise.
5853 * src/state.c (transitions_to): Likewise.
5854 * src/state.h: Likewise.
5855 * src/tables.c (symbol_number_to_vector_number): Likewise.
5856
5857 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
5858 char * var.
5859
5860 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
5861 var.
5862
5863 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
5864 var.
5865
5866 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
5867 Use str, not s, for char * var. Use ch, not c, for character var.
5868 Use size for size var.
5869
5870 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
5871 char * var.
5872 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
5873 uniqstr var.
5874 * src/uniqstr.h: Likewise.
5875
5876 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
5877 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
5878 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
5879 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
5880 param to have same name as that of enum, so that we don't use
5881 "s" to stand for a non-state.
5882
5883 2003-02-02 Akim Demaille <akim@epita.fr>
5884
5885 * src/scan-skel.l: Scan more than one inert character per yylex
5886 invocation.
5887
5888 2003-02-01 Paul Eggert <eggert@twinsun.com>
5889
5890 Version 1.875a.
5891
5892 * po/LINGUAS: Add ms.
5893
5894 2003-01-30 Akim Demaille <akim@epita.fr>
5895
5896 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
5897
5898 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5899
5900 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
5901 of $1.
5902
5903 Changes in response to error report by S. Eken: GLR mode does not
5904 handle negative $ indices or $ indices in embedded rules correctly.
5905 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
5906
5907 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
5908 (b4_rhs_location): Ditto.
5909 (yyfill): New function to copy from stack tree into array
5910 incrementally.
5911 (yyuserAction): Modify to allow incremental move of semantic values
5912 to rhs array when in GLR mode.
5913 Define YYFILL to use in user-defined actions to fill semantic array
5914 as needed.
5915 Remove dummy use of yystack, as there is now a guaranteed use.
5916 (yydoAction): Modify to allow incremental move of semantic values
5917 to rhs array when in GLR mode.
5918 (yyresolveAction): Ditto.
5919 (yyglrShiftDefer): Update comment.
5920 (yyresolveStates): Use X == NULL for pointers, not !X.
5921 (yyglrReduce): Ditto.
5922 (yydoAction): Ditto
5923
5924 * tests/glr-regr1.at: Rename to ...
5925 * tests/glr-regression.at: Add new regression test for the problems
5926 described above (adapted from S. Eken).
5927 Update copyright notice.
5928 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
5929 * tests/Makefile.am: Ditto.
5930
5931 2003-01-28 Paul Eggert <eggert@twinsun.com>
5932
5933 * data/lalr1.cc: Do not use @output_header_name@ unless
5934 b4_defines_flag is set. This fixes two bugs reported by
5935 Tim Van Holder in
5936 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
5937 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
5938
5939 2003-01-21 Paul Eggert <eggert@twinsun.com>
5940
5941 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
5942 we don't need to worry about yyerrlab1 being reported as an
5943 "unused label" by non-GCC C compilers. The downside is that if
5944 locations are used then a couple of statements are duplicated each
5945 time YYERROR is invoked, but the upside is that the warnings
5946 should vanish.
5947 (yyerrlab1): Move code to YERROR.
5948 (yyerrlab2): Remove. Change uses back to yyerrlab1.
5949 This reverts some of the 2002-12-27 change.
5950
5951 2003-01-17 Paul Eggert <eggert@twinsun.com>
5952
5953 * src/output.c (symbol_printers_output): Fix typo that led
5954 to core dump. Problem reported by Antonio Rus in
5955 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
5956
5957 2003-01-13 Akim Demaille <akim@epita.fr>,
5958 Quoc Peyrot <chojin@lrde.epita.fr>,
5959 Robert Anisko <anisko_r@lrde.epita.fr>
5960
5961 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
5962 when the stacks contain one element, as the loop would otherwise
5963 free the last state, and then use the top state (the one we just
5964 popped). This means that the initial elements will not be freed
5965 explicitly, as is the case in yacc.c; it is not a problem, as
5966 these elements have fake values.
5967
5968 2003-01-11 Paul Eggert <eggert@twinsun.com>
5969
5970 * NEWS: %expect-violations are now just warnings, reverting
5971 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
5972 bootstrapping problem reported by Matthias Klose; see
5973 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
5974 * src/conflicts.c (conflicts_print): Likewise.
5975 * tests/conflicts.at (%expect not enough, %expect too much,
5976 %expect with reduce conflicts): Likewise.
5977 * doc/bison.texinfo (Expect Decl): Document this. Also mention
5978 that the warning is enabled if the number of conflicts changes
5979 (not necessarily increases).
5980
5981 * src/getargs.c (version): Update copyright year.
5982
5983 2003-01-09 Akim Demaille <akim@epita.fr>
5984
5985 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
5986
5987 2003-01-08 Paul Eggert <eggert@twinsun.com>
5988
5989 * Makefile.maint (WGETFLAGS):
5990 New macro, containing "-C off" to disable proxy caches.
5991 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
5992 (rel-check): Use $(WGET) instead of wget.
5993
5994 2003-01-06 Paul Eggert <eggert@twinsun.com>
5995
5996 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
5997 the GLR paper of Scott, Johnstone and Hussain.
5998
5999 2003-01-04 Paul Eggert <eggert@twinsun.com>
6000
6001 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6002 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6003 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6004 (EXTRA_LIBRARIES): New var, for liby.a.
6005 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6006 (EXTRA_SCRIPTS): New var, for yacc.
6007
6008 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6009 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6010 Problem reported by Nelson H. F. Beebe.
6011
6012 2003-01-03 Paul Eggert <eggert@twinsun.com>
6013
6014 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6015 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6016 when compiling Bison 1.875's `bitset bset = obstack_alloc
6017 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6018
6019 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6020 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6021 grow to a huge size with typical invocation.
6022
6023 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6024 Use the pattern recommended by Autoconf 2.57, except also protect
6025 against double-definition.
6026 * src/system.h: Likewise.
6027 Portability issues reported by Nelson H. F. Beebe.
6028
6029 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6030 All uses changed. Provide a definition in both C and C++.
6031 (yytrue, yyfalse): Define even if defined (__cplusplus).
6032
6033 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
6034 Reported by Nelson H. F. Beebe.
6035
6036 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
6037
6038 2003-01-02 Paul Eggert <eggert@twinsun.com>
6039
6040 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
6041 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
6042 Bug reported by Nelson H. F. Beebe.
6043
6044 2003-01-01 Paul Eggert <eggert@twinsun.com>
6045
6046 * Version 1.875.
6047
6048 2002-12-30 Paul Eggert <eggert@twinsun.com>
6049
6050 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
6051 Moved here from...
6052 (<INITIAL>","): Here. This causes stray "," to be treated
6053 more uniformly.
6054
6055 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
6056 last brace in braced code when not in Yacc mode, for compatibility
6057 with Bison 1.35. This resurrects the 2001-12-15 patch to
6058 src/reader.c.
6059
6060 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
6061 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
6062
6063 2002-12-28 Paul Eggert <eggert@twinsun.com>
6064
6065 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
6066 that of SYM's type. This fixes Debian bug 168069, reported by
6067 Thomas Olsson.
6068
6069 2002-12-28 Paul Eggert <eggert@twinsun.com>
6070
6071 Version 1.75f.
6072
6073 Switch back to the Yacc style of conflict reports, undoing some
6074 of the 2002-07-30 change.
6075 * doc/bison.texinfo (Understanding): Use Yacc style for
6076 conflict reports. Also, use new way of locating rules.
6077 * src/conflicts.c (conflict_report):
6078 Renamed from conflict_report_yacc, removing the old
6079 'conflict_report'. Translate the entire conflict report at once,
6080 so that we don't assume that "," has the same interpretation in
6081 all languages.
6082 (conflicts_output): Use Yacc-style conflict report for each state,
6083 instead of our more-complicated style.
6084 (conflicts_print): Use Yacc-style conflict report, except print
6085 the input file name when not emulating Yacc.
6086 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
6087 Conflicted Reduction, %expect not enough, %expect too much,
6088 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
6089 * tests/existing.at (GNU Cim Grammar): Likewise.
6090 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
6091
6092 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
6093 fatal): Don't invoke fflush; it's not needed and it might even be
6094 harmful for stdout, as stdout might not be open.
6095 * src/reduce.c (reduce_print): Likewise.
6096
6097 2002-12-27 Paul Eggert <eggert@twinsun.com>
6098
6099 Fix a bug where error locations were not being recorded correctly.
6100 This problem was originally reported by Paul Hilfinger in
6101 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
6102
6103 * data/yacc.c (yyparse): New local var yylerrsp, to record the
6104 top of the location stack's error locations.
6105 (yyerrlab): Set it. When discarding a token, push its location
6106 onto yylerrsp so that we don't lose track of the error's end.
6107 (yyerrlab1): Now is only the target of YYERROR, so that we can
6108 properly record the location of the action that failed. For GCC
6109 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
6110 GCC warning about yyerrlab1 being unused if YYERROR is unused.
6111 (yyerrlab2): New label, which yyerrlab now falls through to.
6112 Compute the error's location by applying YYLLOC_DEFAULT to
6113 the locations of all the symbols that went into the error.
6114 * doc/bison.texinfo (Location Default Action): Mention that
6115 YYLLOC_DEFAULT is also invoked for syntax errors.
6116 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6117 Error locations include the locations of all the tokens that were
6118 discarded, not just the last token.
6119
6120 2002-12-26 Paul Eggert <eggert@twinsun.com>
6121
6122 * src/files.c: Include quote.h.
6123 (compute_output_file_names): Warn if we detect conflicting
6124 outputs to the same file. This should catch the misunderstanding
6125 exemplified by Debian Bug 165349, reported by Bruce Stephens..
6126
6127 * src/conflicts.c (conflicts_print): If the user specifies
6128 "%expect N", report an error if there are any reduce/reduce
6129 conflicts. This is what the manual says should happen.
6130 This fixes Debian bug 130890, reported by Anthony DeRobertis.
6131 * tests/conflicts.at (%expect with reduce conflicts): New test.
6132
6133 Don't use m4_include on relative file names, as it doesn't work as
6134 desired if there happens to be a file with that name under ".".
6135
6136 * m4sugar/version.m4: Remove; it was included but it wasn't used.
6137 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
6138 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
6139 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
6140 * src/output.c (output_skeleton): Use full path names when
6141 specifying a file to include; don't rely on include path, as
6142 it's unreliable when the working file contains a file with
6143 that name.
6144
6145 2002-12-25 Paul Eggert <eggert@twinsun.com>
6146
6147 Remove obsolete references to bison.simple and bison.hairy.
6148 Problem mentioned by Aubin Mahe in
6149 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
6150 * data/glr.c: Comment fix.
6151 * doc/bison.1: Remove references. Also, mention "yacc".
6152
6153 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
6154 with -g option.
6155
6156 * src/parse-gram.y (declaration): Use enum "report_states" rather
6157 than its numeric value 1.
6158
6159 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
6160 opening a new one. This fixes Debian bug 165349, reported by
6161 Bruce Stephens.
6162
6163 2002-12-24 Paul Eggert <eggert@twinsun.com>
6164
6165 Version 1.75e.
6166
6167 * Makefile.maint (cvs-update): Don't assume that the shell
6168 supports $(...), as Solaris sh doesn't.
6169
6170 * src/parse-gram.y (lloc_default): Remove test for empty
6171 nonterminals at the end, since it didn't change the result.
6172
6173 2002-12-24 Paul Eggert <eggert@twinsun.com>
6174
6175 If the user does not define YYSTYPE as a macro, Bison now declares it
6176 using typedef instead of defining it as a macro. POSIX requires this.
6177 For consistency, YYLTYPE is also declared instead of defined.
6178
6179 %union directives can now have a tag before the `{', e.g., the
6180 directive `%union foo {...}' now generates the C code
6181 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
6182 The default union tag is `YYSTYPE', for compatibility with Solaris 9
6183 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
6184 instead of `yyltype'.
6185
6186 `yystype' and `yyltype' are now obsolescent macros instead of being
6187 typedefs or tags; they are no longer documented and will be
6188 withdrawn in a future release.
6189
6190 * data/glr.c (b4_location_type): Remove.
6191 (YYSTYPE): Renamed from yystype.
6192 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
6193 (struct YYLTYPE): Renamed from struct yyltype.
6194 (YYLTYPE): Renamed from yyltype.
6195 (yyltype, yystype): New (and obsolescent) macros,
6196 for backward compatibility.
6197 * data/yacc.c: Likewise.
6198
6199 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
6200 does not specify a union tag. This is for compatibility with
6201 Solaris 9 yacc.
6202
6203 * src/parse-gram.y (add_param): 2nd arg is now char * not char
6204 const *, since it is now modified by stripping surrounding { }.
6205 (current_braced_code): Remove.
6206 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
6207 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
6208 trailing " {...}". Now of type <chars>.
6209 (grammar_declaration): Adjust to bundled tokens.
6210 (code_content): Remove; stripping is now done by add_param.
6211 (print_token_value): Print contents of bundled tokens.
6212 (token_name): New function.
6213
6214 * src/reader.h (braced_code, current_braced_code): Remove.
6215 (token_name): New decl.
6216
6217 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
6218 token_type, not braced_code code_kind. All uses changed.
6219 (SC_PRE_CODE): New state, for scanning after a keyword that
6220 has (or usually has) an immediately-following braced code.
6221 (token_type): New local var, to keep track of which token type
6222 to return when scanning braced code.
6223 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
6224 <INITIAL>"%parse-param", <INITIAL>"%printer",
6225 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
6226 instead of returning a token type immediately.
6227 (<INITIAL>"{"): Set token type.
6228 (<SC_BRACED_CODE>"}"): Use it.
6229 (handle_action_dollar, handle_action_at): Now returns bool
6230 indicating success. Fail if ! current_rule; this prevents a core dump.
6231 (handle_symbol_code_dollar, handle_symbol_code_at):
6232 Remove; merge body into caller.
6233 (handle_dollar, handle_at): Complain in invalid contexts.
6234
6235 * NEWS, doc/bison.texinfo: Document the above.
6236 * NEWS: Fix years and program names in copyright notice.
6237
6238 2002-12-17 Paul Eggert <eggert@twinsun.com>
6239
6240 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
6241 Reporting, Table of Symbols): Omit mentions of %lex-param and
6242 %parse-param from the documentation for now.
6243
6244 2002-12-15 Paul Eggert <eggert@twinsun.com>
6245
6246 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
6247 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
6248 lookahead symbol, and which sets yychar in parser actions) and it
6249 disagreed with the Bison documentation. Bug
6250 reported by Andrew Walrond.
6251
6252 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
6253 as the caller now does that.
6254 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
6255 (YYEMPTY): Parenthesize right hand side, since others use it.
6256 (yyparse): Don't assume that our generated code is the only code
6257 that sets yychar.
6258
6259 2002-12-13 Paul Eggert <eggert@twinsun.com>
6260
6261 Version 1.75d.
6262
6263 POSIX requires a "yacc" command.
6264 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
6265 (MOSTLYCLEANFILES): Add yacc.
6266 (yacc): New rule.
6267 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
6268 as an alias for bison y.
6269
6270 * po/LINGUAS: Add da.
6271
6272 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
6273 problem with latest <getopt.h>.
6274 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
6275
6276 * doc/fdl.texi: Upgrade to 1.2.
6277 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
6278 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
6279 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
6280 gnulib.
6281 * config/install-sh: Sync with autotools.
6282
6283 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
6284 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
6285 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
6286 locations are requested.
6287 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
6288 locations are requested.
6289
6290 2002-12-12 Paul Eggert <eggert@twinsun.com>
6291
6292 Remove unportable casts and storage allocation tricks.
6293 While we're at it, remove almost all casts, since they
6294 usually aren't needed and are a sign of trouble.
6295
6296 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
6297
6298 * src/derives.c (derives_compute): Do not subtract NTOKENS from
6299 the pointer DSET returned by malloc; this isn't portable.
6300 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
6301 Similarly for DERIVES.
6302 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
6303 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
6304 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
6305
6306 * src/derives.c (derives_compute): Do not bother invoking
6307 int_of_rule_number, since rule numbers are integers.
6308
6309 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
6310 rather than XMALLOC (char, N).
6311
6312 * src/files.c (filename_split): Rewrite to avoid cast.
6313
6314 * src/gram.h (symbol_number_as_item_number,
6315 item_number_as_symbol_number, rule_number_as_item_number,
6316 item_number_as_rule_number):
6317 Now inline functions rather than macros, to avoid casts.
6318 * src/state.h (state_number_as_int): Likewise.
6319 * src/tables.c (state_number_to_vector_number,
6320 symbol_number_to_vector_number): Likewise.
6321
6322 * src/gram.h (int_of_rule_number): Remove; no longer used.
6323
6324 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
6325 since the resulting storage is always stored into.
6326
6327 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
6328 where it's needed.
6329
6330 * src/muscle_tab.c (muscle_m4_output):
6331 Now inline. Return bool, not int.
6332 * src/state.c (state_compare): Likewise.
6333 * src/symtab.c (symbol_check_defined,
6334 symbol_check_alias_consistency, symbol_pack, symbol_translation,
6335 hash_compare_symbol, hash_symbol):
6336 Likewise.
6337 * src/uniqstr.c (uniqstr_print): Likewise.
6338 * src/muscle_tab.c (muscle_m4_output_processor):
6339 New function, to avoid casts.
6340 * src/state.c (state_comparator, stage_hasher): Likewise.
6341 * src/symtab.c (symbol_check_defined_processor,
6342 symbol_check_alias_consistency_processor, symbol_pack_processor,
6343 symbol_translation_processor, hash_symbol_comparator,
6344 hash_symbol_hasher): Likewise.
6345 * src/uniqstr.c (uniqstr_print_processor): Likewise.
6346 * src/muscle_tab.c (muscles_m4_output):
6347 Use new functions instead of casting old functions unportably.
6348 * src/state.c (state_hash_new): Likewise.
6349 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
6350 symbols_token_translations_init):
6351 Likewise.
6352 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
6353
6354 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
6355 var instead of casting to long, to avoid casts.
6356 (prepare_states): Use MALLOC rather than alloca, so that we don't
6357 have to worry about alloca.
6358 * src/state.c (state_hash_lookup): Likewise.
6359
6360 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
6361 local var instead of casting to unsigned char, to avoid casts.
6362
6363 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
6364 STATE_ALLOC): Remove.
6365 (transitions_new, errs_new, reductions_new, state_new): Use malloc
6366 rather than calloc, and use offsetof to avoid allocating slightly
6367 too much storage.
6368 (state_new): Initialize all members.
6369
6370 * src/state.c (state_hash): Use unsigned accumulator, not signed.
6371
6372 * src/symtab.c (symbol_free): Remove; unused.
6373 (symbol_get): Remove cast in lhs of assignment.
6374 (symbols_do): Now static. Accept generic arguments, not
6375 hashing-related ones.
6376
6377 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
6378 (symbol_processor): Remove.
6379 (symbols_do): Remove decl; now static.
6380
6381 * src/system.h (alloca): Remove; decl no longer needed.
6382 (<stddef.h>): Include, for offsetof.
6383 (<inttypes.>, <stdint.h>): Include if available.
6384 (uintptr_t): New type, if system lacks it.
6385 (CALLOC, MALLOC, REALLOC): New macros.
6386 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
6387 new macros.
6388
6389 * src/tables.c (table_size): Now int, to pacify GCC.
6390 (table_grow, table_ninf_remap): Use signed table size.
6391 (save_row): Don't bother initializing locals when not needed.
6392 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
6393 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
6394
6395 * src/vcg.h: Correct misspellings.
6396
6397 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
6398
6399
6400 * src/getargs.c (getargs): Don't assume EOF == -1.
6401
6402 2002-12-09 Paul Eggert <eggert@twinsun.com>
6403
6404 Change identifier spellings to avoid collisions with names
6405 that are reserved by POSIX.
6406
6407 Don't use names ending in _t, since POSIX reserves them.
6408 For consistency, remove _e and _s endings -- they're weren't
6409 needed to remove ambiguity. All uses changed.
6410 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
6411 turn was just renamed from struniq_t.
6412 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
6413 which in turn was just renamed from struniq_processor_t.
6414 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
6415 in turn was renamed from hash_compare_struniq_t.
6416 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
6417 (state_list): Renamed from state_list_t.
6418 * src/assoc.h (assoc): Renamed from assoc_t.
6419 * src/conflicts.c (enum conflict_resolution): Renamed from
6420 enum conflict_resolution_e.
6421 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
6422 (rule_list): Renamed from rule_list_t.
6423 * src/getargs.h (enum trace): Renamed from enum trace_e.
6424 (enum report): Renamed from enum report_e.
6425 * src/gram.h (item_number): Renamed from item_number_t.
6426 (rule_number): Renamed from rule_number_t.
6427 (struct rule_s): Remove the "rule_s" part; not used.
6428 (rule): Renamed from rule_t.
6429 (rule_filter): Renamed from rule_filter_t.
6430 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6431 (goto_list): Renamed from goto_list_t.
6432 * src/lalr.h (goto_number): Renamed from goto_number_t.
6433 * src/location.h (location): Renamed from location_t.
6434 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6435 and moved here from:
6436 * src/muscle_tab.h (muscle_entry_t): here.
6437 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6438 (rule_list): Renamed from rule_list_t.
6439 * src/print_graph.c (static_graph): Renamed from graph.
6440 * src/reader.h (braced_code): Renamed from braced_code_t.
6441 Remove brace_code_e tag.
6442 * src/relation.h (relation_node): Renamed from relation_node_t.
6443 (relation_nodes): Renamed from relation_nodes_t.
6444 (relation): Renamed from relation_t.
6445 * src/state.h (state_number): Renamed from state_number_t.
6446 (struct state): Renamed from struct state_s.
6447 (state): Renamed from state_t.
6448 (transitions): Renamed from transitions_t. Unused (and
6449 misspelled) transtion_s tag removed.
6450 (errs): Renamed from errs_t. Unused errs_s tag removed.
6451 (reductions): Renamed from reductions_t. Unused tag
6452 reductions_s removed.
6453 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6454 (struct symbol_list): Renamed from struct symbol_list_s.
6455 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6456 (struct symbol): Renamed from struct symbol_s.
6457 (symbol): Renamed from symbol_t.
6458 * src/tables.c (vector_number): Renamed from vector_number_t.
6459 (action_number): Renamed from action_t.
6460 * src/tables.h (base_number): Renamed from base_t.
6461 * src/vcg.h (enum color): Renamed from enum color_e.
6462 (enum textmode): Renamed from enum textmode_e.
6463 (enum shape): Renamed from enum shape_e.
6464 (struct colorentry): Renamed from struct colorentry_s.
6465 (struct classname): Renamed from struct classname_s.
6466 (struct infoname): Renamed from struct infoname_s.
6467 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6468 (enum decision): Renamed from enum decision_e.
6469 (enum orientation): Renamed from enum orientation_e.
6470 (enum alignment): Renamed from enum alignment_e.
6471 (enum arrow_mode): Renamed from enum arrow_mode_e.
6472 (enum crossing_type): Renamed from enum crossing_type_e.
6473 (enum view): Renamed from enum view_e.
6474 (struct node): Renamed from struct node_s.
6475 (node): Renamed from node_t.
6476 (enum linestyle): Renamed from enum linestyle_e.
6477 (enum arrowstyle): Renamed from enum arrowstyle_e.
6478 (struct edge): Renamed from struct edge.
6479 (edge): Renamed from edge_t.
6480 (struct graph): Renamed from struct graph_s.
6481 (graph): Renamed from graph_t.
6482 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6483 Rename value_t -> value.
6484 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6485 value_t_as_yystype -> value_as_yystype.
6486
6487 Don't include <errno.h> in the mainstream code, since it
6488 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6489 * lib/get-errno.c, lib/get-errno.h: New files.
6490 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6491 get-errno.c.
6492 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6493 * src/output.c (output_skeleton): Likewise.
6494 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6495 instead of errno.
6496 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
6497 Likewise.
6498 (handle_action_dollar, handle_action_at): Likewise.
6499 * src/system.h: Do not include <errno.h>.
6500 (TAB_EXT): Renamed from EXT_TAB.
6501 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
6502
6503 Avoid str[a-z]*, since <string.h> reserves that name space.
6504 Change all instances of "struniq" in names to "uniqstr", and
6505 likewise for "STRUNIQ" and "UNIQSTR".
6506 * src/uniqstr.c: Renamed from src/struniq.c.
6507 * src/uniqstr.h: Renamed from src/struniq.h.
6508 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
6509 * src/files.c (strsuffix): Remove; unused.
6510 (concat2): Renamed from stringappend. Now static.
6511 * src/files.h (strsuffix, stringappend): Remove; unused.
6512 * src/parse-gram.y (<chars>): Renamed from <string>.
6513 (<uniqstr>): Renamed from <struniq>.
6514 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
6515 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
6516 (struct graph_s.expand): Renamed from struct graph_s.stretch.
6517 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
6518 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
6519 (N_EXPAND): Renamed from N_STRETCH.
6520
6521 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
6522 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
6523 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
6524 Remove; unused.
6525 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
6526 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
6527 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
6528 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
6529 (BASE_MAXIMUM): Renamed from BASE_MAX.
6530 (BASE_MINIMUM): Renamed from BASE_MIN.
6531 (ACTION_MAX): Remove; unused.
6532 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
6533 Unnecessary casts removed from above defines.
6534
6535
6536 Fix misspelling in names.
6537 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
6538 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
6539 G_NODE_ALIGNEMENT.
6540
6541
6542 * lib/timevar.c (timevar_report): Renamed from time_report,
6543 for consistency with other names.
6544 * lib/timevar.h (timevar_report): New decl.
6545 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
6546
6547
6548 Sort include-file uses.
6549
6550 Reorder all include files under src to be in the order "system.h".
6551 then the ../lib include files in angle brackets (alphabetized),
6552 then the . include files in double-quotes (alphabetized). Fix
6553 dependency breakages encountered in this process, as follows:
6554 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
6555 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
6556 * src/state.h: Include "symtab.h".
6557
6558 2002-12-08 Paul Eggert <eggert@twinsun.com>
6559
6560 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
6561 since this causes problems when __file__ contains character
6562 sequences like "@" that are treated specially by src/scan-skel.l.
6563 Instead, just use the file's basename. This fixes the bug
6564 reported by Martin Mokrejs in
6565 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
6566
6567 2002-12-06 Paul Eggert <eggert@twinsun.com>
6568
6569 Add support for rules that do not have trailing semicolons, as
6570 POSIX requires. Improve the quality of locations in Bison
6571 diagnostics.
6572
6573 * src/location.c: Include <quotearg.h>.
6574 (empty_location): Now const.
6575 (location_print): New function. Follow the recommendation of the
6576 GNU Coding Standards for locations that span file boundaries.
6577 * src/location.h: Do not include <quotearg.h>; no longer needed.
6578 (boundary): New type.
6579 (location_t): Use it. This allows locations to span file boundaries.
6580 All member uses changed: file -> start.file or end.file (as needed),
6581 first_line -> start.line, first_column -> start.column,
6582 last_line -> end.line, last_column -> end.column.
6583 (equal_boundaries): New function.
6584 (LOCATION_RESET, LOCATION_STEP): Remove.
6585 (LOCATION_PRINT): Remove. All callers changed to use location_print.
6586 (empty_location): Now const.
6587 (location_print): New decl.
6588 * src/parse-gram.y (lloc_default): New function, which handles
6589 empty locations more accurately.
6590 (YYLLOC_DEFAULT): Use it.
6591 (%token COLON): Remove.
6592 (%token ID_COLON): New token.
6593 (rules): Use it.
6594 (declarations, rules): Remove trailing semicolon.
6595 (declaration, rules_or_grammar_declaration):
6596 Allow empty (";") declaration.
6597 (symbol_def): Remove empty actions; no longer needed.
6598 (rules_or_grammar_declaration): Remove trailing semicolon.
6599 (semi_colon.opt): Remove.
6600 * src/reader.h: Include location.h.
6601 (scanner_cursor): New decl.
6602 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
6603 rolling our own.
6604 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
6605 of *loc.
6606 (STEP): Remove. No longer needed, now that adjust_location does
6607 the work. All uses removed.
6608 (scanner_cursor): New var.
6609 (adjust_location): Renamed from extend_location. It now sets
6610 *loc and adjusts the scanner cursor. All uses changed.
6611 Don't bother testing for CR.
6612 (handle_syncline): Remove location arg; now updates scanner cursor.
6613 All callers changed.
6614 (unexpected_end_of_file): Now accepts start boundary of token or
6615 comment, not location. All callers changed. Update scanner cursor,
6616 not the location.
6617 (SC_AFTER_IDENTIFIER): New state.
6618 (context_state): Renamed from c_context. All uses changed.
6619 (id_loc, code_start, token_start): New local vars.
6620 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
6621 processing of Yacc white space and equivalents here.
6622 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
6623 instead of returning ID immediately, since we need to search for
6624 a subsequent colon.
6625 (<INITIAL>"'", "\""): Save token_start.
6626 (<INITIAL>"%{", "{", "%%"): Save code_start.
6627 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
6628 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
6629 BEGIN context_state at end, not INITIAL.
6630 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
6631 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
6632 Return correct token start.
6633 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
6634 the start of a character, string or multiline comment is found.
6635 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
6636 Reduction): Adjust reported locations to match the more-precise
6637 results now expected.
6638 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
6639 * tests/reduce.at (Useless Rules, Reduced Automaton,
6640 Underivable Rules): Likewise.
6641 * tests/regression.at (Invalid inputs): No longer `expecting ";"
6642 or "|"' now that so many other tokens are allowed by the new grammar.
6643
6644 * src/complain.h (current_file): Remove duplicate decl;
6645 current_file is now owned by files.h.
6646 * src/complain.c, src/scan-gram.l: Include files.h.
6647
6648 2002-12-06 Paul Eggert <eggert@twinsun.com>
6649
6650 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
6651 promotes to int; it might be unsigned int.
6652 * data/yacc.c (yy_reduce_print): Likewise.
6653
6654 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
6655 be #defined in the prologue, not in the Bison declarations.
6656 This fixes Debian Bug 102878, reported by Shaul Karl.
6657
6658 2002-12-02 Paul Eggert <eggert@twinsun.com>
6659
6660 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
6661 * lib/strtoul.c: New file, from gnulib.
6662 This fixes a porting bug reported by Peter Klein in
6663 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
6664
6665 2002-11-30 Paul Eggert <eggert@twinsun.com>
6666
6667 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6668 and put only a forward declaration in the prologue. This is for
6669 consistency with the other scanner helper functions.
6670
6671 Type clashes now generate warnings, not errors, since it
6672 appears that POSIX may allow some grammars with type clashes.
6673 * src/reader.c (grammar_current_rule_check): Warn about
6674 type clashes instead of complaining.
6675 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6676
6677 Add Yacc library, since POSIX requires it.
6678 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6679 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6680 * lib/main.c, lib/yyerror.c: New files.
6681
6682 gram_error can be static; it need not be extern.
6683 * src/reader.h (gram_error): Remove decl.
6684 * src/parse-gram.y (gram_error): Now static. Add static decl.
6685 (print_token_value): Omit parameter names from forward decl,
6686 for consistency.
6687
6688 2002-11-29 Paul Eggert <eggert@twinsun.com>
6689
6690 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6691 be declared before being used. E.g., one should typically
6692 declare them in the prologue. Use GNU coding style in examples.
6693 Put "const" consistently after the type it modifies. Mention
6694 that C99 supports "inline". Mention that yyerror traditionally
6695 returns "int".
6696
6697 %parse-param and %lex-param now take just one argument, the
6698 declaration; the argument name is deduced from the declaration.
6699
6700 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6701 Reporting, Table of Symbols): Document this.
6702 * src/parse-gram.y (add_param): New function.
6703 (COMMA): Remove.
6704 (declaration): Implement new rule for %parse-param and %lex-param.
6705 * src/scan-gram.l: "," now elicits a warning, rather than being
6706 a token; this is more compatible with byacc.
6707 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6708
6709 2002-11-27 Paul Eggert <eggert@twinsun.com>
6710
6711 Rename identifiers to avoid real and potential collisions.
6712
6713 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6714 to avoid collision with lex macro described by Bruce Lilly in
6715 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
6716 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6717 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
6718 * src/parse-gram.y (print_token_value): Renamed from yyprint.
6719 All uses changed.
6720 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
6721 The name "yycontrol" violates the name space rules, and this stuff
6722 wasn't being used anyway.
6723 (input): Remove action; this stuff wasn't being used.
6724 (gram_error): Rename local variable yylloc -> loc.
6725 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
6726 (YY_DECL): Don't use "yy" at start of local variables.
6727 All uses changed, e.g., yylloc -> loc.
6728 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
6729 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
6730 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
6731 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
6732
6733 * src/parse-gram.y (gram_error): loc is now const *.
6734 * src/reader.h (gram_error): Likewise.
6735
6736 2002-11-24 Paul Eggert <eggert@twinsun.com>
6737
6738 Version 1.75c.
6739
6740 * tests/actions.at (Actions after errors): Use an output format
6741 more similar to that of the Printers and Destructors test.
6742 Test the position of the ';' token too.
6743 (Printers and Destructors): Likewise.
6744 (Printers and Destructors: %glr-parser): Remove for now, to avoid
6745 unnecessarily alarming people when the test fails.
6746
6747 * data/yacc.c (yyerrlab1): Move this label down, so that the
6748 parser does not discard the lookahead token if the user code
6749 invokes YYERROR. This change is required for POSIX conformance.
6750
6751 * lib/error.c: Sync with gnulib.
6752
6753 2002-11-22 Paul Eggert <eggert@twinsun.com>
6754
6755 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
6756 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
6757 * lib/xmalloc.c: Likewise.
6758
6759 2002-11-20 Paul Eggert <eggert@twinsun.com>
6760
6761 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
6762
6763 2002-11-20 Paul Eggert <eggert@twinsun.com>
6764
6765 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
6766 should use `if (! x) abort ();' rather than `assert (x);', and
6767 anyway it's one less thing to worry about configuring.
6768
6769 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
6770 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
6771 and replace all instances of assert with abort.
6772 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6773 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
6774
6775 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
6776 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
6777 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
6778 hash_find_entry, hash_rehash, hash_insert): Likewise.
6779 * src/conflicts.c (resolve_sr_conflict): Likewise.
6780 * src/lalr.c (set_goto_map, map_goto): Likewise.
6781 * src/nullable.c (nullable_compute): Likewise.
6782 * src/output.c (prepare_rules, token_definitions_output): Likewise.
6783 * src/reader.c (packgram, reader): Likewise.
6784 * src/state.c (state_new, state_free, state_transitions_set,
6785 state_reduction_find): Likewise.
6786 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
6787 symbol_pack): Likewise.
6788 * src/tables.c (conflict_row, pack_vector): Likewise.
6789 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6790 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6791 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
6792 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
6793
6794 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
6795 (ARGMATCH_CONSTRAINT): New macro.
6796 (ARGMATCH_ASSERT): Use it.
6797
6798 * src/system.h (verify): New macro.
6799 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
6800 rather than assert.
6801 * src/tables.c (tables_generate): Likewise.
6802
6803 * src/struniq.c (struniq_assert): Now returns void, and aborts
6804 if the assertion is false.
6805 (struniq_assert_p): Remove.
6806 * src/struniq.h: Likewise.
6807
6808 2002-11-18 Paul Eggert <eggert@twinsun.com>
6809
6810 * data/glr.c (yygetLRActions): Replace `yyindex' with
6811 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
6812 This fixes the regression with Sun ONE Studio 7 cc that I reported in
6813 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
6814
6815 2002-11-18 Akim Demaille <akim@epita.fr>
6816
6817 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
6818 space.
6819 From Tim Van Holder.
6820
6821 2002-11-17 Paul Eggert <eggert@twinsun.com>
6822
6823 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
6824 to "SyntaxError" for consistency with my 2002-11-15 change.
6825
6826 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
6827 not define to {}, since this breaks the common use of `YYDPRINTF
6828 ((...));' if a single statement is desired (e.g. before `else').
6829 Work around GCC warnings by surrounding corresponding calls with
6830 {} if needed.
6831 (yyhasResolvedValue): Remove unused function.
6832 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
6833 loop body.
6834 (yyreportSyntaxError): Renamed from yyreportParseError.
6835 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
6836 All uses changed.
6837 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
6838 extern when possible. Remove unused initializations.
6839
6840 2002-11-16 Akim Demaille <akim@epita.fr>
6841
6842 Augment the similarity between GLR and LALR traces.
6843
6844 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
6845 (YY_REDUCE_PRINT): New.
6846 (yyparse): Use them.
6847 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
6848 YYDPRINT here.
6849 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
6850 state reached after the reduction/recovery, since...
6851 (yyparse, yyprocessOneStack): Report the state we are entering in.
6852
6853 2002-11-16 Akim Demaille <akim@epita.fr>
6854
6855 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
6856 Add support for --trace=skeleton.
6857 * src/scan-skel.l: %option debug.
6858 Scan strings of non-@ or \n instead of character by character.
6859 (scan_skel): Handle trace_skeleton.
6860 (QPUTS): New.
6861 (@output_parser_name@, @output_header_name@): ``Restore'' their
6862 support (used to be M4 macros).
6863 * data/yacc.c: Quote larger chunks, a la glr.c.
6864 * data/lalr1.cc: Likewise.
6865 The header guards are no longer available, so use some other
6866 string than `YYLSP_NEEDED'.
6867
6868 2002-11-16 Akim Demaille <akim@epita.fr>
6869
6870 Make the ``Printers and Destructors'' test more verbose, taking
6871 `yacc.c''s behavior as (possibly wrong) reference.
6872
6873 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
6874 instead of fprint on stdout.
6875 Set and report the last_line of the symbols.
6876 Consistently display values and locations.
6877
6878 2002-11-16 Paul Eggert <eggert@twinsun.com>
6879
6880 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
6881
6882 2002-11-15 Paul Eggert <eggert@twinsun.com>
6883
6884 * tests/actions.at (Actions after errors): New test case.
6885
6886 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
6887 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
6888 tests/action.at, tests/calc.at, tests/conflicts.at,
6889 tests/cxx-type.at, tests/regression.at:
6890 "parse error" -> "syntax error" for POSIX compatibility.
6891 "parsing stack overflow..." -> "parser stack overflow" so
6892 that code matches Bison documentation.
6893
6894 2002-11-15 Akim Demaille <akim@epita.fr>
6895
6896 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
6897 take two BRACED_CODE, not two string_content.
6898 Free the scanner's obstack when we are done.
6899 (code_content): New.
6900 * tests/calc.at: Adjust.
6901 * doc/bison.texinfo: Adjust.
6902 Also, make sure to include the `,' for these declarations.
6903
6904 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
6905
6906 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
6907 definition; avoids potential autoreconf problems.
6908
6909 2002-11-15 Akim Demaille <akim@epita.fr>
6910
6911 Always check the value returned by yyparse.
6912
6913 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
6914 returned by yyparse.
6915 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
6916 Adjust calls.
6917 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
6918 returned by yyparse.
6919
6920 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6921
6922 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
6923 on input.at test.
6924
6925 2002-11-14 Paul Eggert <eggert@twinsun.com>
6926
6927 * src/output.c (output_skeleton): Call xfopen instead of
6928 duplicating xfopen's body.
6929
6930 Fix bugs reported by Nelson H. F. Beebe in
6931 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
6932
6933 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
6934 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
6935 Group compiler. Instead, use "$CC -E bar.c". Include the .h
6936 file twice in the grammar, as an extra check.
6937
6938 * tests/input.at (Torturing the Scanner): Surround the
6939 backslash-newline tests with "#if 0", to make it less likely that
6940 we'll run into compiler bugs. Bring back solitary \ inside
6941 comment, but add a closing comment to work around HP C bug. Don't
6942 test backslash-newline in C character constant.
6943
6944 2002-11-14 Akim Demaille <akim@epita.fr>
6945
6946 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
6947 status of the compiler.
6948 Calling `exit 1' is no longer needed.
6949 Reported by Nelson H. F. Beebe.
6950
6951 2002-11-14 Akim Demaille <akim@epita.fr>
6952
6953 * tests/atlocal.in (CPPFLAGS): We have config.h.
6954 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
6955 New.
6956 * tests/actions.at, tests/calc.at, tests/conflicts.at,
6957 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
6958 * tests/regression.at, tests/torture.at: Use them for all the
6959 grammars that are to be compiled.
6960 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
6961 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
6962 * doc/bison.texinfo (GLR Parsers): Document `inline'.
6963
6964 2002-11-14 Akim Demaille <akim@epita.fr>
6965
6966 * doc/bison.texinfo: Various formatting changes (alignments in
6967 samples, additional @group/@end group, GCS in samples.
6968 Use @deffn instead of simple @table to define the directives,
6969 macros, variables etc.
6970
6971 2002-11-13 Paul Eggert <eggert@twinsun.com>
6972
6973 Fix some bugs reported by Albert Chin-A-Young in
6974 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
6975
6976 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
6977 -o c"; the HP C compiler chatters during compilation.
6978 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
6979 * tests/headers.at (export YYLTYPE): Likewise.
6980
6981 * tests/input.at (Torturing the Scanner): Remove lines containing
6982 solitary backslashes, as they tickle a bug in the HP C compiler.
6983
6984 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
6985 comments, since they're not portable. Use GNU coding style.
6986
6987 2002-11-13 Akim Demaille <akim@epita.fr>
6988
6989 * data/yacc.c: Leave bigger chunks of quoted text.
6990 (YYDSYMPRINTF): New.
6991 Use it to report symbol activities.
6992 * data/glr.c (YYDSYMPRINTF): New.
6993 Use it.
6994
6995 2002-11-12 Paul Eggert <eggert@twinsun.com>
6996
6997 Version 1.75b.
6998
6999 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7000 (yyglrReduce): Return yyok, not 0.
7001 This should avoid the enumerated-type warnings reported
7002 by Nelson H. F. Beebe in
7003 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
7004
7005 * lib/bbitset.h (BITSET_INLINE): Remove.
7006 * lib/bitset.h [! BITSET_INLINE]: Remove.
7007 (bitset_set, bitset_reset, bitset_test): Rename local vars
7008 to avoid shadowing warnings by GCC.
7009
7010 * data/glr.c (inline): Remove #define. It's the user's
7011 responsibility to #define it away, just like 'const'.
7012 This fixes one of the bugs reported by Nelson H. F. Beebe in
7013 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
7014
7015 * Makefile.maint (po-check): Scan .l and .y files instead of the
7016 .c and the .h files that they generate. This fixes the bug
7017 reported by Tim Van Holder in:
7018 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
7019 Look for N_ as well as for _. Try to avoid matching #define for
7020 N_ and _.
7021 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7022 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7023 * src/scan-gram.l: Revamp regular expressions so that " and '
7024 do not confuse xgettext.
7025
7026 * src/struniq.h (struniq_new): Do not declare the return type
7027 to be 'const'; this violates the C standard.
7028 * src/struniq.c (struniq_new): Likewise.
7029
7030 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7031
7032 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7033 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
7034 linker.
7035
7036 2002-11-12 Akim Demaille <akim@epita.fr>
7037
7038 * Makefile.maint: Sync with Autoconf:
7039 (local_updates): New.
7040
7041 2002-11-12 Akim Demaille <akim@epita.fr>
7042
7043 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
7044
7045 2002-11-12 Akim Demaille <akim@epita.fr>
7046
7047 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
7048 locations.
7049
7050 2002-11-12 Akim Demaille <akim@epita.fr>
7051
7052 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
7053 not yyvalue.
7054
7055 2002-11-12 Akim Demaille <akim@epita.fr>
7056
7057 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
7058 Use it to test the GLR parser.
7059
7060 2002-11-12 Akim Demaille <akim@epita.fr>
7061
7062 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
7063 defines it.
7064 * data/glr.c (yystos): New.
7065 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
7066 (YYDSYMPRINT): New.
7067 (yyval): Don't define it, it is handled via M4.
7068 (yyrecoverParseError): Free verbosely the discarded symbols.
7069 * data/yacc.c (yysymprint): Remove, rather...
7070 (b4_yysymprint_generate): invoke.
7071 * data/c.m4 (b4_yysymprint_generate): New.
7072 Accept pointers as arguments, as opposed to the version from
7073 yacc.c.
7074 (b4_yydestruct_generate): Likewise.
7075 * tests/cations.at (Printers and Destructors): Use Bison directives
7076 instead of CPP macros.
7077 Don't rely on internal details.
7078
7079 2002-11-12 Akim Demaille <akim@epita.fr>
7080
7081 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
7082 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
7083 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
7084 it against YYEMPTY and so forth), work on yytoken (i.e., set
7085 it to YYEMPTY etc.).
7086 (yydestruct): Replace with a b4_yydestruct_generate invocation.
7087 (b4_symbol_actions): Remove.
7088 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
7089 for 0, end-of-input.
7090
7091 2002-11-12 Akim Demaille <akim@epita.fr>
7092
7093 * doc/bison.texinfo (Destructor Decl): New.
7094
7095 2002-11-12 Akim Demaille <akim@epita.fr>
7096
7097 * src/tables.c (tables_generate): Use free for pointers that
7098 cannot be NULL, not XFREE.
7099 (pack_vector): Use assert, not fatal, for bound violations.
7100 * src/state.c (state_new): Likewise.
7101 * src/reader.c (reader): Likewise.
7102 * src/lalr.c (set_goto_map): Likewise.
7103 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
7104 the file name.
7105
7106 2002-11-12 Akim Demaille <akim@epita.fr>
7107
7108 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
7109 Restore.
7110 * src/scan-gram.l (last_string): Is global to the file, not to
7111 yylex.
7112 * src/parse-gram.y (input): Don't append the epilogue here,
7113 (epilogue.opt): do it here, and free the scanner's obstack.
7114 * src/reader.c (epilogue_set): Rename as...
7115 (epilogue_augment): this.
7116 * data/c.m4 (b4_epilogue): Defaults to empty.
7117
7118 2002-11-12 Akim Demaille <akim@epita.fr>
7119
7120 * src/getargs.c (long_options): Remove duplicates.
7121 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
7122 Remove.
7123 * doc/bison.rnh: Remove.
7124 * doc/bison.texinfo (VMS Invocation): Remove.
7125
7126 2002-11-12 Akim Demaille <akim@epita.fr>
7127
7128 * src/struniq.h, src/struniq.c (struniq_t): Is const.
7129 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
7130
7131 Use struniq for symbols.
7132
7133 * src/symtab.h (symbol_t): The tag member is a struniq.
7134 (symbol_type_set): Adjust.
7135 * src/symtab.c (symbol_new): Takes a struniq.
7136 (symbol_free): Don't free the tag member.
7137 (hash_compare_symbol_t, hash_symbol_t): Rename as...
7138 (hash_compare_symbol, hash_symbol): these.
7139 Use the fact that tags as struniqs.
7140 (symbol_get): Use struniq_new.
7141 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
7142 Returns a strniq.
7143 * src/reader.h (merger_list, grammar_currentmerge_set): The name
7144 and type members are struniqs.
7145 * src/reader.c (get_merge_function)
7146 (grammar_current_rule_merge_set): Adjust.
7147 (TYPE, current_type): Are struniq.
7148
7149 Use struniq for file names.
7150
7151 * src/files.h, src/files.c (infile): Split into...
7152 (grammar_file, current_file): these.
7153 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
7154 * src/reduce.c (reduce_print): Likewise.
7155 * src/getargs.c (getargs): Likewise.
7156 * src/complain.h, src/complain.c: Likewise.
7157 * src/main.c (main): Call struniqs_new early enough to use it for
7158 file names.
7159 Don't free the input file name.
7160
7161 2002-11-12 Akim Demaille <akim@epita.fr>
7162
7163 * src/symtab.c (symbol_free): Remove dead deactivated code:
7164 type_name are properly removed.
7165 Don't use XFREE to free items that cannot be NULL.
7166 * src/struniq.h, src/struniq.c: New.
7167 * src/main.c (main): Initialize/free struniqs.
7168 * src/parse-gram.y (%union): Add astruniq member.
7169 (yyprint): Adjust.
7170 * src/scan-gram.l (<{tag}>): Return a struniq.
7171 Free the obstack bit that used to store it.
7172 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
7173
7174 2002-11-11 Paul Eggert <eggert@twinsun.com>
7175
7176 Revamp to fix many (but not all) of the C- and M4-related quoting
7177 problems. Among other things, this fixes the Bison bug reported
7178 by Jan Hubicka when processing the Bash grammar; see:
7179 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7180
7181 Use new @ escapes consistently. Represent brackets with @{ and @}
7182 rather than @<:@ and @:>@, since this works a bit better with dumb
7183 editors like vi. Represent @ with @@, since @ is now consistently
7184 an escape. Use @oline@ and @ofile@ rather than __oline__ and
7185 __ofile__, to avoid unexpected expansions. Similarly, use @output
7186 rather than #output.
7187
7188 * data/c.m4 (b4_copyright): Omit file name from comment, since
7189 the file name could contain "*/".
7190 (b4_synclines_flag): Don't quote the 2nd argument; it should already
7191 be quoted. All uses changed.
7192
7193 * data/glr.c: Use new @ escapes consistently.
7194 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
7195 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
7196 Remove, since they couldn't handle arbitrary characters in file
7197 names.
7198 * data/lalr1.cc: Likewise.
7199 * data/yacc.c: Likewise.
7200
7201 * src/files.c (output_infix): Remove; all uses removed.
7202 * src/files.h: Likewise.
7203
7204 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
7205 mishandled funny characters in file names, and anyway it isn't
7206 needed any more.
7207 * data/yacc.c: Likewise.
7208 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
7209
7210 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
7211 * data/yacc.c: Likewise.
7212
7213 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
7214 strings now.
7215 (muscle_init): Quote filename as a C string.
7216 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
7217 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
7218 * src/output.c (escaped_file_name_output): New function.
7219 (prepare_symbols): Quote tokens for M4.
7220 (prepare): Don't insert output_infix, output_prefix,
7221 output_parser_name, output_header_name; this is now down by scan-skel.
7222 Insert skeleton as a C string.
7223
7224 * src/output.c (user_actions_output, symbol_destructors_output,
7225 symbol_printers_output): Quote filenames for C and M4.
7226 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7227
7228 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
7229 escapes other than \\ and \'; this simplifies the code.
7230 (<SC_STRING>): Likewise, for \\ and \".
7231 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
7232 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
7233 Use new escapes @{ and @} for [ and ].
7234
7235 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
7236 them with auto vars.
7237 Switch to new escape scheme, where @ is the escape character uniformly.
7238 Abort if a stray escape character is found. Avoid unbounded input
7239 buffer when parsing non-escaped text.
7240
7241 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
7242 __oline__, #output, $@, and @{ do not have unintended meanings.
7243
7244 2002-11-09 Paul Eggert <eggert@twinsun.com>
7245
7246 Fix the test failure due to GCC warnings described in
7247 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
7248 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
7249 evaluate to 0 if it's impossible for NINF to be in the respective
7250 table.
7251 (yygetLRActions, yyrecoverParseError): Use them.
7252
7253 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
7254 counted in the token inserted at end of file. Now takes
7255 location_t *, not location_t, so that the location can be
7256 adjusted. All uses changed.
7257
7258 * tests/regression.at (Invalid inputs): Adjust wording in
7259 diagnostic to match the new behavior.
7260
7261 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
7262 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
7263 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
7264 abort ();'. This reduces the runtime of the "Many lookaheads"
7265 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
7266 GCC 3.2.
7267
7268 2002-11-07 Paul Eggert <eggert@twinsun.com>
7269
7270 * src/parse-gram.y (CHARACTER): Remove unused token.
7271 All uses removed.
7272
7273 * src/scan-gram.l: Remove stack option. We no longer use the
7274 stack, since the stack was never deeper than 1; instead, use the
7275 new auto var c_context to record the stacked value.
7276
7277 Remove nounput option. At an unexpected end of file, we now unput
7278 the minimal input necessary to end cleanly; this simplifies the
7279 code.
7280
7281 Avoid unbounded token sizes where this is easy.
7282
7283 (unexpected_end_of_file): New function.
7284 Use it to systematize the error message on unexpected EOF.
7285 (last-string): Now auto, not static.
7286 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
7287 (scanner_last_string_free): Remove; not used.
7288 (percent_percent_count): Move decl to just before use.
7289 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
7290 not the (never otherwised-used) CHARACTER.
7291
7292 2002-11-07 Akim Demaille <akim@epita.fr>
7293
7294 Let yyerror always receive the msg as last argument, so that
7295 yyerror can be variadic.
7296
7297 * data/yacc.c (b4_yyerror_args): New.
7298 Use it when calling yyerror.
7299 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
7300 Use it when calling yyerror.
7301 * doc/bison.texinfo (Error Reporting): Adjust.
7302 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
7303 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
7304
7305 2002-11-06 Akim Demaille <akim@epita.fr>
7306
7307 #line should have quoted strings.
7308 Ideally, this should be done by m4_quotearg.
7309
7310 * src/scan-skel.l: Include quotearg.h.
7311 Quote __ofile__.
7312 * src/output.c (symbol_printers_output)
7313 (symbol_destructors_output): Quote the file name.
7314
7315 2002-11-06 Akim Demaille <akim@epita.fr>
7316
7317 * tests/regression.at (Invalid inputs): Adjust to the recent
7318 messages.
7319
7320 2002-11-06 Akim Demaille <akim@epita.fr>
7321
7322 Restore --no-lines.
7323 Reported by Jim Kent.
7324
7325 * data/c.m4 (b4_syncline): New.
7326 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
7327 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
7328 * src/output.c (user_actions_output): Likewise.
7329 (prepare): Define 'b4_synclines_flag'.
7330 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
7331
7332 2002-11-06 Akim Demaille <akim@epita.fr>
7333
7334 * src/main.c (main): Free `infile'.
7335 * src/scan-gram.l (handle_syncline): New.
7336 Recognize `#line'.
7337 * src/output.c (user_actions_output, symbol_destructors_output)
7338 (symbol_printers_output): Use the location's file name, not
7339 infile.
7340 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7341
7342 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7343
7344 * src/tables.c (matching_state): Don't allow states to match if
7345 either has GLR conflict entries.
7346
7347 2002-11-05 Paul Eggert <eggert@twinsun.com>
7348
7349 * src/scan-gram.l: Use more accurate diagnostics, e.g.
7350 "integer out of range" rather than "invalid value".
7351 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
7352 accordingly.
7353
7354 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
7355 Also, remove one static variable in the scanner.
7356
7357 * src/scan-gram.l (braces_level): Now auto, not static.
7358 Initialize to zero if the compiler is being picky.
7359 (INITIAL): Clear braces_level instead of incrementing it.
7360 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
7361 as POSIX 1003.1-2001 requires.
7362 * src/system.h (IF_LINT): New macro, taken from coreutils.
7363 * configure.ac: Define "lint" if --enable-gcc-warnings.
7364
7365 2002-11-05 Akim Demaille <akim@epita.fr>
7366
7367 * src/scan-gram.l: When it starts with `%', complain about the
7368 whole directive, not just that `invalid character: %'.
7369
7370 2002-11-04 Akim Demaille <akim@epita.fr>
7371
7372 * Makefile.maint: Update from Autoconf.
7373 (update, cvs-update, po-update, do-po-update): New.
7374
7375 2002-11-04 Akim Demaille <akim@epita.fr>
7376
7377 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
7378 and yyerror.
7379 Have yyerror `use' its arguments.
7380 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
7381 returns true when location & yacc & pure & parse-param.
7382 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
7383
7384 2002-11-04 Akim Demaille <akim@epita.fr>
7385
7386 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
7387 clashes.
7388 * src/scan-gram.l: Use [\'] instead of ['] to pacify
7389 font-lock-mode.
7390 Use complain_at.
7391 Use quote, not quote_n since LOCATION_PRINT no longer uses the
7392 slot 0.
7393
7394 2002-11-03 Paul Eggert <eggert@twinsun.com>
7395
7396 * src/reader.c (get_merge_function, grammar_current_rule_check):
7397 Use consistent diagnostics for reporting type name clashes.
7398 Quote the types with <>, for consistency with Yacc.
7399 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
7400
7401 2002-11-03 Akim Demaille <akim@epita.fr>
7402
7403 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
7404 New.
7405 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
7406 (b4_parse_param): Remove.
7407 Use b4_identification.
7408 Propagate b4_pure_args where needed to pass them to yyerror.
7409 * data/glr.m4 (b4_parse_param): Remove.
7410 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
7411 (b4_lpure_formals): New.
7412 Use b4_identification.
7413 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
7414 b4_user_formals and b4_user_args.
7415 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
7416 (yyreportAmbiguity): When using a pure parser, also need
7417 the location, and the parse-params.
7418 Adjust callers.
7419 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
7420 When using a pure parser, also need the parse-params.
7421 Adjust callers.
7422 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
7423 (%pure-parser + %parse-param) LALR and GLR parsers.
7424 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
7425 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
7426 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
7427 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
7428 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7429 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7430 * doc/bison.texinfo: Untabify the whole file.
7431 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7432 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7433 (Error Reporting): Adjust to these new directives.
7434 Document %error-verbose, deprecate YYERROR_VERBOSE.
7435
7436 2002-11-03 Akim Demaille <akim@epita.fr>
7437
7438 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7439 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7440 command line options.
7441 * tests/cxx-type.at: Formatting changes.
7442
7443 2002-11-03 Paul Eggert <eggert@twinsun.com>
7444
7445 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7446 to count columns correctly, and to check for invalid inputs.
7447
7448 Use mbsnwidth to count columns correctly. Account for tabs, too.
7449 Include mbswidth.h.
7450 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7451 (extend_location): New function.
7452 (YY_LINES): Remove.
7453
7454 Handle CRLF in C code rather than in Lex code.
7455 (YY_INPUT): New macro.
7456 (no_cr_read): New function.
7457
7458 Scan UCNs, even though we don't fully handle them yet.
7459 (convert_ucn_to_byte): New function.
7460
7461 Handle backslash-newline correctly in C code.
7462 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7463 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7464 all uses changed.
7465 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7466 Use {splice} wherever C allows backslash-newline.
7467 YY_STEP after space, newline, vertical-tab.
7468 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
7469
7470 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7471
7472 ({int}, handle_action_dollar, handle_action_at): Check for integer
7473 overflow.
7474
7475 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7476
7477 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7478 as well as \000. Check for UCHAR_MAX, not 255.
7479 Allow \x with an arbitrary positive number of digits, as in C.
7480 Check for overflow here.
7481 Allow \? and UCNs, for compatibility with C.
7482
7483 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7484 with quote slot used by complain_at.
7485
7486 * tests/input.at: Add tests for backslash-newline, m4 quotes
7487 in symbols, long literals, and funny escapes in strings.
7488
7489 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7490 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7491 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7492 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7493 * m4/mbswidth.m4: New file, from GNU coreutils.
7494
7495 * doc/bison.texinfo (Grammar Outline): Document // comments.
7496 (Symbols): Document that trigraphs have no special meaning in Bison,
7497 nor is backslash-newline allowed.
7498 (Actions): Document that trigraphs have no special meaning.
7499
7500 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
7501 no longer used.
7502
7503 2002-11-02 Paul Eggert <eggert@twinsun.com>
7504
7505 * src/reader.c: Don't include quote.h; not needed.
7506 (get_merge_function): Reword warning to be consistent with
7507 type clash diagnostic in grammar_current_rule_check.
7508
7509 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
7510 bug in trigraph handling.
7511
7512 * src/output.c (prepare_symbols): When printing token names,
7513 escape "[" as "@<:@" and likewise for "]".
7514
7515 * src/system.h (errno): Remove declaration, as we are now
7516 assuming C89 or better, and C89 guarantees errno.
7517
7518 2002-10-30 Paul Eggert <eggert@twinsun.com>
7519
7520 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
7521 Check for close failures.
7522 * src/files.h (xfclose): Return void, not int, since it always
7523 returned zero.
7524 * src/files.c (xfclose): Likewise. Report I/O error if ferror
7525 indicates one.
7526 * src/output.c (output_skeleton): Use xfclose rather than fclose
7527 and ferror. xfclose now checks ferror.
7528
7529 * data/glr.c (YYLEFTMOST_STATE): Remove.
7530 (yyreportTree): Use a stack-based leftmost state. This avoids
7531 our continuing battles with bogus warnings about initializers.
7532
7533 2002-10-30 Akim Demaille <akim@epita.fr>
7534
7535 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
7536 #if.
7537
7538 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7539
7540 * tests/glr-regr1.at: New test for reported regressions.
7541 * tests/testsuite.at: Add glr-regr1.at test.
7542 * tests/Makefile.am: Add glr-regr1.at test.
7543
7544 2002-10-24 Paul Eggert <eggert@twinsun.com>
7545
7546 Version 1.75a.
7547
7548 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
7549 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
7550 we use malloc. Don't assume 'A' through 'Z' are contiguous.
7551 Don't assume strdup exists; POSIX says its an XSI extension.
7552 Check for buffer overflow on input.
7553
7554 2002-10-24 Akim Demaille <akim@epita.fr>
7555
7556 * src/output.c (output_skeleton): Don't disable M4sugar comments
7557 too soon: it results in comments being expanded.
7558 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
7559 first output.
7560
7561 2002-10-24 Akim Demaille <akim@epita.fr>
7562
7563 * data/yacc.c (m4_int_type): New.
7564 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
7565 char' as only yacc.c wants K&R portability.
7566 * data/glr.c (yysigned_char): Remove.
7567 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
7568 Reported by Quoc Peyrot.
7569
7570 2002-10-23 Paul Eggert <eggert@twinsun.com>
7571
7572 * src/main.c (main): With --trace=time, report times even if a
7573 non-fatal error occurs. Formerly, the times were reported in some
7574 such cases but not in others.
7575 * src/reader.c (reader): Just return if a complaint has been issued,
7576 instead of exiting, so that 'main' can report times.
7577
7578 2002-10-22 Akim Demaille <akim@epita.fr>
7579
7580 * src/system.h: Include sys/types.
7581 Reported by Bert Deknuydt.
7582
7583 2002-10-23 Paul Eggert <eggert@twinsun.com>
7584
7585 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
7586 Suggested by Art Haas.
7587
7588 2002-10-22 Paul Eggert <eggert@twinsun.com>
7589
7590 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
7591 decl; not needed any more.
7592 * src/main.c (main): Use return to exit, undoing yesterday's change.
7593 The last OS that we could find where this wouldn't work is
7594 SunOS 3.5, and that's too old to worry about now.
7595
7596 * data/glr.c (struct yyltype): Define members even when not
7597 doing locations. This is more consistent with yacc.c, and it
7598 works around the following bug reports:
7599 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
7600 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
7601
7602 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
7603 @acronym consistently. Standardize on "Yacc" instead of "YACC",
7604 "Algol" instead of "ALGOL". Give a bit more history about BNF.
7605
7606 2002-10-22 Akim Demaille <akim@epita.fr>
7607
7608 * data/README: New.
7609
7610 2002-10-21 Paul Eggert <eggert@twinsun.com>
7611
7612 Be consistent about 'bool'; the old code used an enum in one
7613 module and an int in another, and this violates the C standard.
7614 * m4/stdbool.m4: New file, from coreutils 4.5.3.
7615 * configure.ac (AC_HEADER_STDBOOL): Add.
7616 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
7617 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
7618 * src/symtab.c (hash_compare_symbol_t): Likewise.
7619 * src/system.h (bool, false, true): Use a definition consistent
7620 with ../lib/hash.c. All uses changed.
7621
7622 * src/complain.c (warning_issued): Renamed from warn_message_count,
7623 so that we needn't worry about integer overflow (!).
7624 Now of type bool. All uses changed.
7625 (complaint_issued): Renamed from complain_message_count; likewise.
7626
7627 * src/main.c (main): Use exit to exit with failure.
7628
7629 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
7630 rather than 1 and 0.
7631 * src/main.c (main): Likewise.
7632 * src/getargs.c (getargs): Likewise.
7633 * src/reader.c (reader): Likewise.
7634
7635 * src/getarg.c (getargs): Remove duplicate code for
7636 "Try `bison --help'".
7637
7638 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
7639 What was that "2" for?
7640
7641 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
7642 * src/getargs.c (usage): Likewise.
7643
7644 * src/getargs.c (getargs): When there are too few operands, report
7645 the last one. When there are too many, report the first extra
7646 one. This is how diffutils does it.
7647
7648 2002-10-20 Paul Eggert <eggert@twinsun.com>
7649
7650 Remove K&R vestiges.
7651 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
7652 * src/complain.c (VA_START): Remove. Assume prototypes.
7653 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
7654 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
7655 fatal): Assume prototypes.
7656 * src/complain.h: Assume prototypes.
7657 * src/system.h (PARAMS): Remove.
7658 Include <limits.h> unconditionally, since it's guaranteeed even
7659 for a freestanding C89 compiler.
7660 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
7661 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
7662
7663 2002-10-20 Akim Demaille <akim@epita.fr>
7664
7665 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7666 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7667 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7668 (yyresolveStates, yyresolveAction, yyresolveStack)
7669 (yyprocessOneStack): Use them.
7670 (yy_reduce_print): New.
7671 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7672
7673 2002-10-20 Akim Demaille <akim@epita.fr>
7674
7675 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7676 arguments and output `void'.
7677 (b4_c_function): Rename as...
7678 (b4_c_function_def): this.
7679 (b4_c_function_decl, b4_c_ansi_function_def)
7680 (b4_c_ansi_function_decl): New.
7681 Change the interpretation of the arguments: before `int, foo', now
7682 `int foo, foo'.
7683 * data/yacc.c (yyparse): Prototype and define thanks to these.
7684 Adjust b4_c_function_def uses.
7685 * data/glr.c (yyparse): Likewise, but ANSI only.
7686
7687 2002-10-20 Akim Demaille <akim@epita.fr>
7688
7689 * src/output.c (prepare): Move the definition of `tokens_number',
7690 `nterms_number', `undef_token_number', `user_token_number_max'
7691 to...
7692 (prepare_tokens): Here.
7693 (prepare_tokens): Rename as...
7694 (prepare_symbols): this.
7695 (prepare): Move the definition of `rules_number' to...
7696 (prepare_rules): here.
7697 (prepare): Move the definition of `last', `final_state_number',
7698 `states_number' to...
7699 (prepare_states): here.
7700 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7701
7702 2002-10-20 Akim Demaille <akim@epita.fr>
7703
7704 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7705
7706 2002-10-20 Akim Demaille <akim@epita.fr>
7707
7708 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7709 * data/c.m4: here.
7710
7711 2002-10-20 Akim Demaille <akim@epita.fr>
7712
7713 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
7714 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
7715 `pair'.
7716 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
7717 `name' to...
7718 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
7719 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
7720 These.
7721
7722 2002-10-19 Paul Eggert <eggert@twinsun.com>
7723
7724 Do not create a temporary file, as that involves security and
7725 cleanup headaches. Instead, use a pair of pipes.
7726 Derived from a suggestion by Florian Krohm.
7727 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
7728 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
7729 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
7730 (BISON_PREREQ_SUBPIPE): Add.
7731 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
7732 Add subpipe.h, subpipe.c.
7733 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
7734 * po/POTFILES.in: Add lib/subpipe.c.
7735 * src/output.c: Include "subpipe.h".
7736 (m4_invoke): Remove decl.
7737 (scan_skel): New decl.
7738 (output_skeleton): Use pipe rather than temporary file for m4 input.
7739 Check that m4sugar.m4 is readable, to avoid deadlock.
7740 Check for pipe I/O error.
7741 * src/scan-skel.l (readpipe): Remove decl.
7742 (scan_skel): New function, to be used in place of m4_invoke.
7743 Read from stream rather than file.
7744
7745 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
7746 float, as this generates a warning on Solaris 8 + GCC 3.2 with
7747 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
7748 this generates a more-accurate value anyway.
7749
7750 * lib/timevar.c (timervar_accumulate): Rename locals to
7751 avoid confusion with similarly-named more-global.
7752 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
7753
7754 * src/output.c (prepare): Use xstrdup to convert char const *
7755 to char *, to avoid GCC warning.
7756
7757 2002-10-19 Akim Demaille <akim@epita.fr>
7758
7759 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
7760 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
7761 Use them to have `calc.y' ready for %pure-parser.
7762 * data/yacc.c (YYLEX): Pass a yylex return type to
7763 b4_c_function_call.
7764
7765 2002-10-19 Akim Demaille <akim@epita.fr>
7766
7767 Prototype support of %lex-param and %parse-param.
7768
7769 * src/parse-gram.y: Add the definition of the %lex-param and
7770 %parse-param tokens, plus their rules.
7771 Drop the `_' version of %glr-parser.
7772 Add the "," token.
7773 * src/scan-gram.l (INITIAL): Scan them.
7774 * src/muscle_tab.c: Comment changes.
7775 (muscle_insert, muscle_find): Rename `pair' as `probe'.
7776 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
7777 (muscle_entry_s): The `value' member is no longer const.
7778 Adjust all dependencies.
7779 * src/muscle_tab.c (muscle_init): Adjust: use
7780 MUSCLE_INSERT_STRING.
7781 Initialize the obstack earlier.
7782 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
7783 (muscle_pair_list_grow): New.
7784 * data/c.m4 (b4_c_function_call, b4_c_args): New.
7785 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
7786 * tests/calc.at: Use %locations, not --locations.
7787 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
7788
7789 2002-10-19 Akim Demaille <akim@epita.fr>
7790
7791 * src/getargs.c (usage): Take status as argument and exit
7792 accordingly.
7793 Report the traditional `Try ... --help' message when status != 0.
7794 (usage, version): Don't take a FILE * as arg, it is pointless.
7795 (getargs): When there is an incorrect number of arguments, make it
7796 an error, and report it GNUlically thanks to `usage ()'.
7797
7798 2002-10-18 Paul Eggert <eggert@twinsun.com>
7799
7800 * data/glr.c (yyreportParseError): Don't assume that sprintf
7801 yields the length of the printed string, as this is not true
7802 on SunOS 4.1.4. Reported by Peter Klein.
7803
7804 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
7805 * tests/conflicts.at (%nonassoc and eof): Likewise.
7806 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
7807
7808 2002-10-17 Akim Demaille <akim@epita.fr>
7809
7810 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
7811 * src/getargs.c (trace_types, trace_args): Adjust.
7812 * src/reader.c (grammar_current_rule_prec_set)
7813 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
7814 Standardize error messages.
7815 And s/@prec/%prec/!
7816 (reader): Use trace_flag to enable scanner/parser debugging,
7817 instead of an adhoc scheme.
7818 * src/scan-gram.l: Remove trailing debugging code.
7819
7820 2002-10-16 Paul Eggert <eggert@twinsun.com>
7821
7822 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
7823 MUSCLE_TAB_H.
7824
7825 * NEWS: Officially drop support for building Bison with K&R C,
7826 since it didn't work anyway and it's not worth worrying about.
7827 * Makefile.maint (wget_files): Remove ansi2knr.c.
7828 (ansi2knr.c-url_prefix): Remove.
7829 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
7830 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7831 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7832
7833 2002-10-15 Paul Eggert <eggert@twinsun.com>
7834
7835 Stop using the "enum_" trick for K&R-style function definitions;
7836 it confused me, and I was the author! Instead, assume that people
7837 who want to use K&R C compilers (when using these modules in GCC,
7838 perhaps?) will run ansi2knr.
7839
7840 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
7841 All uses of "enum_" changed to "enum ".
7842 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7843 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
7844
7845 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
7846 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
7847 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
7848 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
7849 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
7850 abitset_not, abitset_ones, abitset_or, abitset_or_and,
7851 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
7852 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
7853 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
7854 Use function prototypes; this removes the need for declaring
7855 static functions simply to provide their prototypes.
7856 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
7857 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
7858 bitset_count_, bitset_create, bitset_dump, bitset_first,
7859 bitset_free, bitset_init, bitset_last, bitset_next,
7860 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
7861 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
7862 bitset_print, bitset_release_memory, bitset_toggle_,
7863 bitset_type_choose, bitset_type_get, bitset_type_name_get,
7864 debug_bitset): Likewise.
7865 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
7866 * lib/bitset_stats.c (bitset_log_histogram_print,
7867 bitset_percent_histogram_print, bitset_stats_and,
7868 bitset_stats_and_cmp, bitset_stats_and_or,
7869 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
7870 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
7871 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
7872 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
7873 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
7874 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
7875 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
7876 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
7877 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
7878 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
7879 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
7880 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
7881 bitset_stats_zero): Likewise.
7882 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7883 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7884 bitsetv_dump, debug_bitsetv): Likewise.
7885 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
7886 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
7887 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
7888 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
7889 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
7890 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
7891 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
7892 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
7893 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
7894 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
7895 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
7896 Likewise.
7897 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
7898 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
7899 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
7900 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
7901 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
7902 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
7903 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
7904 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
7905 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
7906 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
7907 lbitset_xor_cmp, lbitset_zero): Likewise.
7908
7909 2002-10-14 Akim Demaille <akim@epita.fr>
7910
7911 Version 1.75.
7912
7913 2002-10-14 Akim Demaille <akim@epita.fr>
7914
7915 * tests/Makefile.am (maintainer-check-posix): New.
7916
7917 2002-10-14 Akim Demaille <akim@epita.fr>
7918
7919 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
7920 member.
7921
7922 2002-10-14 Akim Demaille <akim@epita.fr>
7923
7924 * src/tables.c (table_ninf_remap): base -> tab.
7925 Reported by Matt Rosing.
7926
7927 2002-10-14 Paul Eggert <eggert@twinsun.com>
7928
7929 * tests/action.at, tests/calc.at, tests/conflicts.at,
7930 tests/cxx-type.at, tests/headers.at, tests/input.at,
7931 tests/regression.at, tests/synclines.at, tests/torture.at:
7932 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
7933 so that the tests still work even if POSIXLY_CORRECT is set.
7934 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
7935
7936 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
7937 for portability to K&R hosts. Fix typo: signed char is guaranteed
7938 only to 127, not to 128.
7939 * data/glr.c (yysigned_char): New type.
7940 * data/yacc.c (yysigned_char): Likewise.
7941 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
7942
7943 2002-10-13 Paul Eggert <eggert@twinsun.com>
7944
7945 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
7946 true due to limited range of data type" warning from GCC.
7947
7948 * data/c.m4 (b4_token_defines): Protect against double-inclusion
7949 by wrapping enum yytokentype's definition inside #ifndef
7950 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
7951
7952 2002-10-13 Akim Demaille <akim@epita.fr>
7953
7954 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
7955 Un yy- yyrhs to avoid the name clash with the global YYRHS.
7956
7957 2002-10-13 Akim Demaille <akim@epita.fr>
7958
7959 * Makefile.maint: Update from Autoconf 2.54.
7960 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
7961
7962 2002-10-13 Akim Demaille <akim@epita.fr>
7963
7964 * src/print.c (print_state): Separate the list of solved conflicts
7965 from the other items.
7966 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
7967
7968 2002-10-13 Akim Demaille <akim@epita.fr>
7969
7970 Let nondeterministic skeletons be usable with deterministic
7971 tables.
7972
7973 With the patch, GAWK compiled by GCC without -O2 passes its test
7974 suite using a GLR parser driven by LALR tables. It fails with -O2
7975 because `struct stat' gives two different answers on my machine:
7976 88 (definition of an auto var) and later 96 (memset on this var).
7977 Hence the stack is badly corrumpted. The headers inclusion is to
7978 blame: if I move the awk.h inclusion before GLR's system header
7979 inclusion, the two struct stat have the same size.
7980
7981 * src/tables.c (pack_table): Always create conflict_table.
7982 (token_actions): Always create conflict_list.
7983 * data/glr.c (YYFLAG): Remove, unused.
7984
7985 2002-10-13 Akim Demaille <akim@epita.fr>
7986
7987 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
7988 (O0FLAGS): New.
7989 (VALGRIND, GXX): New.
7990 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
7991 * tests/bison.in: Run $PREBISON a pre-command.
7992 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
7993 (maintainer-check-g++): New.
7994 * Makefile.am (maintainer-check): New.
7995
7996 2002-10-13 Akim Demaille <akim@epita.fr>
7997
7998 * data/glr.c: Formatting changes.
7999 Tweak some trace messages to match yacc.c's.
8000
8001 2002-10-13 Akim Demaille <akim@epita.fr>
8002
8003 GLR parsers sometimes raise parse errors instead of performing the
8004 default reduction.
8005 Reported by Charles-Henry de Boysson.
8006
8007 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
8008 check the length of the traces when %glr.
8009 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8010 GLR's traces.
8011 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8012 Test GLR parsers.
8013 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8014 (yyltype): Remove the yy prefix from the member names.
8015 (yytable): Complete its comment.
8016 (yygetLRActions): Map error action number from YYTABLE from
8017 YYTABLE_NINF to 0.
8018 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8019 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8020 not satisfying as we could compare an YYACTION computed from
8021 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8022 only value for error actions.
8023 (yyreportParseError): In verbose parse error messages, don't issue
8024 `error' in the list of expected tokens.
8025 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8026 next action to perform to match glr.c's decoding.
8027 (yytable): Complete its comment.
8028
8029 2002-10-13 Paul Eggert <eggert@twinsun.com>
8030
8031 Fix problem reported by Henrik Grubbstroem in
8032 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
8033 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
8034 because the Bison parser reads the second action before reducing
8035 the first one.
8036 * src/scan-gram.l (rule_length): New static var.
8037 Use it to keep track of the rule length in the scanner, since
8038 we can't expect the parser to be in lock-step sync with the scanner.
8039 (handle_action_dollar, handle_action_at): Use this var.
8040 * tests/actions.at (Exotic Dollars): Test for the problem.
8041
8042 2002-10-12 Paul Eggert <eggert@twinsun.com>
8043
8044 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
8045 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
8046 Include <sys/time.h> when checking for clock_t and struct tms.
8047 Use same include order as source.
8048 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
8049 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
8050
8051 * lib/timevar.c: Update copyright date and clarify comments.
8052 (get_time) [IN_GCC]: Keep the GCC version for reference.
8053
8054 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
8055 GCC version as of today, then merge Bison's changes.
8056 Change "GCC" to "Bison" in copyright notice. timevar.def's
8057 author is Akim, so change that too.
8058
8059 * src/reader.c (grammar_current_rule_check):
8060 Don't worry about the default action if $$ is untyped.
8061 Prevents bogus warnings reported by Jim Gifford in
8062 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
8063
8064 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
8065 * data/glr.c, data/lalr1.cc, data/yacc.c:
8066 Output token definitions before the first part of user declarations.
8067 Fixes compatibility problem reported by Jim Gifford for kbd in
8068 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
8069
8070 2002-10-11 Paul Eggert <eggert@twinsun.com>
8071
8072 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
8073 (yyparse): here. This undoes some of the 2002-07-25 change.
8074 Compatibility problem reported by Ralf S. Engelschall with
8075 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
8076
8077 2002-10-11 Akim Demaille <akim@epita.fr>
8078
8079 * tests/regression.at Characters Escapes): New.
8080 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
8081 characters.
8082 Reported by Jan Nieuwenhuizen.
8083
8084 2002-10-11 Akim Demaille <akim@epita.fr>
8085
8086 * po/id.po: New.
8087
8088 2002-10-10 Paul Eggert <eggert@twinsun.com>
8089
8090 Portability fixes for bitsets; this also avoids several GCC
8091 warnings.
8092
8093 * lib/abitset.c: Include <stddef.h>, for offsetof.
8094 * lib/lbitset.c: Likewise.
8095
8096 * lib/abitset.c (abitset_bytes): Return a size that is aligned
8097 properly for vectors of objects. Do not assume that adding a
8098 header size to a multiple of a word size yields a value that is
8099 properly aligned for the whole union.
8100 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8101
8102 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
8103 unique names for structures.
8104 * lib/ebitset.c (ebitset_bytes): Likewise.
8105 * lib/lbitset.c (lbitset_bytes): Likewise.
8106
8107 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
8108 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
8109 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
8110 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
8111 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
8112 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
8113 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
8114 to improve the type-checking that GCC can do.
8115 * lib/bitset.c (bitset_op4_cmp): Likewise.
8116 * lib/bitset_stats.c (bitset_stats_count,
8117 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
8118 bitset_stats_copy, bitset_stats_disjoint_p,
8119 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
8120 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
8121 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
8122 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
8123 bitset_stats_and_or_cmp, bitset_stats_andn_or,
8124 bitset_stats_andn_or_cmp, bitset_stats_or_and,
8125 bitset_stats_or_and_cmp): Likewise.
8126 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
8127 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
8128 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
8129 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
8130
8131 * lib/abitset.h: Include bitset.h, not bbitset.h.
8132 * lib/ebitset.h: Likewise.
8133 * lib/lbitset.h: Likewise.
8134
8135 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
8136 All instances of parameters of type enum bitset_opts are now of
8137 type enum_bitset_opts, to conform to the C Standard, and similarly
8138 for enum_bitset_type.
8139 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8140 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8141
8142 Do not use "struct bitset_struct" to mean different things in
8143 different modules. Not only is this confusing, it violates
8144 the C Standard, which requires that structure types in different
8145 modules must be compatible if one is to be passed to the other.
8146 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
8147 All instances of "struct bitset_struct *" replaced with "bitset".
8148 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
8149 (union bitset_union, struct abitset_struct, struct ebitset_struct,
8150 struct lbitset_struct, struct bitset_stats_struct): New types.
8151 All uses of struct bitset_struct changed to union bitset_union,
8152 etc.
8153 * lib/abitset.c (struct abitset_struct, abitset,
8154 struct bitset_struct): Remove.
8155 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
8156 struct bitset_struct): Remove.
8157 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
8158 bitset_struct): Remove.
8159 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
8160 Likewise.
8161
8162 Do not call a function of type T using a call that assumes the
8163 function is of a different type U. Standard C requires that a
8164 function must be called with a type that is compatible with its
8165 definition.
8166 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8167 New decls.
8168 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8169 New functions.
8170 * lib/ebitset.c (PFV): Remove.
8171 * lib/lbitset.c (PFV): Likewise.
8172 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
8173 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
8174 decls.
8175 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
8176 (ebitset_vtable): Use them.
8177 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
8178 lbitset_xor): New functions.
8179 (lbitset_vtable): Use them.
8180
8181 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
8182 Declare.
8183
8184 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
8185 GCC warning.
8186 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
8187 Use offsetof, for simplicity.
8188
8189 2002-10-06 Paul Eggert <eggert@twinsun.com>
8190
8191 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
8192 the same width as int. This reapplies a hunk of the 2002-08-12 patch
8193 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
8194 which was inadvertently undone by the 2002-09-30 patch.
8195 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
8196 the same width as int.
8197
8198 2002-10-04 Paul Eggert <eggert@twinsun.com>
8199
8200 Version 1.50.
8201
8202 * configure.ac (AC_INIT), NEWS: Increment version number.
8203
8204 * doc/bison.texinfo: Minor spelling, grammar, and white space
8205 fixes.
8206 (Symbols): Mention that any negative value returned from yylex
8207 signifies end-of-input. Warn about negative chars. Mention
8208 the portable Standard C character set.
8209
8210 The GNU coding standard says CFLAGS and YFLAGS are reserved
8211 for the installer to set.
8212 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
8213 * src/Makefile.am (AM_CFLAGS): Likewise.
8214 (AM_YFLAGS): Renamed from YFLAGS.
8215
8216 Fix some MAX and MIN problems.
8217 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
8218 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
8219 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
8220 * src/reader.c (reader): Use it.
8221
8222 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
8223 POSIX 1003.1-2001 has removed fgrep.
8224
8225 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
8226
8227 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
8228 interpreted as signed.
8229 * lib/ebitset.c (ebitset_list): Fix bug.
8230
8231 2002-10-01 Paul Eggert <eggert@twinsun.com>
8232
8233 More fixes for 64-bit hosts and large bitsets.
8234
8235 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
8236 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
8237 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8238 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
8239 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
8240 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
8241 bitset_count_): Likewise.
8242 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
8243 bitset_first, bitset_last): Likewise.
8244 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
8245 bitset_stats_list_reverse, bitset_stats_size,
8246 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
8247 Likewise.
8248 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8249 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8250 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8251 bitsetv_reflexive_transitive_closure): Likewise.
8252 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
8253 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
8254 Likewise.
8255 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
8256 Likewise.
8257
8258 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
8259 Use size_t, not unsigned int, to count bytes.
8260 * lib/abitset.h (abitset_bytes): Likewise.
8261 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
8262 Likewise.
8263 * lib/bitset.h (bitset_bytes): Likewise.
8264 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
8265 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
8266 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8267 * lib/ebitset.c (ebitset_bytes): Likewise.
8268 * lib/ebitset.h (ebitset_bytes): Likewise.
8269 * lib/lbitset.c (lbitset_bytes): Likewise.
8270 * lib/lbitset.h (lbitset_bytes): Likewise.
8271
8272 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
8273 abitset_subset_p, abitset_disjoint_p, abitset_and,
8274 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
8275 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
8276 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
8277 abitset_or_and, abitset_or_and_cmp):
8278 Use bitset_windex instead of unsigned int.
8279 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8280 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
8281 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
8282 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
8283 Likewise.
8284 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
8285
8286 * lib/bitset.c (bitset_print):
8287 Use proper printf formats for widths of integer types.
8288 * lib/bitset_stats.c (bitset_percent_histogram_print,
8289 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
8290 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8291 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8292 * lib/lbitset.c (lbitset_bytes): Likewise.
8293
8294 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
8295 BITSET_SIZE_MAX): New macros.
8296 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
8297 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
8298 to BITSET_WINDEX_MAX.
8299
8300 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
8301 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
8302 since we now return the bitset_bindex type (not int).
8303
8304 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
8305 when computing sizes.
8306 * lib/ebitset.c (ebitset_elts_grow): Likewise.
8307
8308 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
8309 and avoid cast to unsigned.
8310
8311 2002-09-30 Akim Demaille <akim@epita.fr>
8312
8313 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8314 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
8315 Updates from Michael Hayes.
8316
8317 2002-09-30 Art Haas <ahaas@neosoft.com>
8318
8319 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
8320 invocations.
8321 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
8322 defined.
8323
8324 2002-09-27 Akim Demaille <akim@epita.fr>
8325
8326 Version 1.49c.
8327
8328 2002-09-27 Akim Demaille <akim@epita.fr>
8329
8330 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
8331 (Because of AC_LIBSOURCE).
8332
8333 2002-09-27 Akim Demaille <akim@epita.fr>
8334
8335 Playing with Autoscan.
8336
8337 * configure.ac: Remove the old LIBOBJ tweaks.
8338 (AC_REPLACE_FUNCS): Add strrchr and strtol.
8339 * lib/strrchr.c: New.
8340 * lib/strtol.c: New, from the Coreutils 4.5.1.
8341
8342 2002-09-27 Akim Demaille <akim@epita.fr>
8343
8344 Playing with Autoscan.
8345
8346 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
8347 * lib/Makefile.am (libbison_a_SOURCES): No longer include
8348 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
8349 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
8350 Coreutils 4.5.1.
8351
8352 2002-09-24 Akim Demaille <akim@epita.fr>
8353
8354 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
8355 (Frequently Asked Questions, Parser Stack Overflow): New.
8356
8357 2002-09-13 Akim Demaille <akim@epita.fr>
8358
8359 Playing with autoscan.
8360
8361 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
8362 * src/files.c (skeleton_find): Remove, unused.
8363 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
8364 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
8365
8366 2002-09-13 Akim Demaille <akim@epita.fr>
8367
8368 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
8369 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
8370
8371 2002-09-13 Akim Demaille <akim@epita.fr>
8372
8373 * configure.ac: Require 2.54.
8374 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
8375 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
8376 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
8377 Remove, provided by Autoconf macros.
8378
8379 2002-09-12 Akim Demaille <akim@epita.fr>
8380
8381 * m4/prereq.m4: Update, from Coreutils 4.5.1.
8382
8383 2002-09-12 Akim Demaille <akim@epita.fr>
8384
8385 * m4/prereq.m4: Update, from Fileutils 4.1.5.
8386 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
8387 Reported by Martin Mokrejs.
8388
8389 2002-09-10 Akim Demaille <akim@epita.fr>
8390
8391 * src/parse-gram.y: Associate a human readable string to each
8392 token type.
8393 * tests/regression.at (Invalid inputs): Adjust.
8394
8395 2002-09-10 Gary V. Vaughan <gary@gnu.org>
8396
8397 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
8398 with an Autoconf-2.5x style configure.ac.
8399
8400 2002-09-06 Paul Eggert <eggert@twinsun.com>
8401
8402 * doc/bison.texinfo (Conditions): Make explicit that the GPL
8403 exception applies only to yacc.c. This is a modification of a
8404 patch originally suggested by Akim Demaille.
8405
8406 2002-09-06 Akim Demaille <akim@epita.fr>
8407
8408 * data/c.m4 (b4_copyright): Move the GPL exception comment from
8409 here to...
8410 * data/yacc.c: here.
8411
8412 * data/lalr1.cc (struct yyltype): Don't define it, since we use
8413 LocationType.
8414 (b4_ltype): Default to yy::Location from location.hh.
8415
8416 2002-09-04 Jim Meyering <jim@meyering.net>
8417
8418 * data/yacc.c: Guard the declaration of yytoknum also with
8419 `#ifdef YYPRINT', so it is declared only when used.
8420
8421 2002-09-04 Akim Demaille <akim@epita.fr>
8422
8423 * configure.in: Rename as...
8424 * configure.ac: this.
8425 Bump to 1.49c.
8426
8427 2002-09-04 Akim Demaille <akim@epita.fr>
8428
8429 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8430 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8431 translate maintainer only messages.
8432
8433 2002-08-12 Paul Eggert <eggert@twinsun.com>
8434
8435 Version 1.49b.
8436
8437 * Makefile.am (SUBDIRS): Remove intl.
8438 (DISTCLEANFILES): Remove.
8439 * NEWS: Mention that GNU M4 is now required. Clarify what is
8440 meant by "larger grammars". Mention the pt_BR translation.
8441 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8442 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8443 Bump version from 0.11.2 to 0.11.5.
8444 (BISON_PREREQ_STAGE): Remove.
8445 (AM_GNU_GETTEXT): Use external gettext.
8446 (AC_OUTPUT): Remove intl/Makefile.
8447
8448 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8449
8450 * data/glr.c: Include string.h, for strlen.
8451 (yyreportParseError): Use size_t for yysize.
8452 (yy_yypstack): No longer nested inside yypstates, as nested
8453 functions are not portable. Do not assume size_t is the
8454 same width as int.
8455 (yypstates): Do not assume that ptrdiff_t is the same width
8456 as int, and similarly for yyposn and YYINDEX.
8457
8458 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8459
8460 * lib/Makefile.am (INCLUDES): Do not include from the intl
8461 directory, which has been removed.
8462 * src/Makefile.am (INCLUDES): Likewise.
8463
8464 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8465 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8466 New vars.
8467
8468 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8469 * tests/Makefile.am (EXTRA_DIST): Likewise.
8470
8471 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8472 Do not assume that bitset_windex is the same width as unsigned.
8473
8474 * lib/abitset.c (abitset_unused_clear): Do not assume that
8475 bitset_word is the same width as int.
8476 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8477 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8478 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8479 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8480 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8481
8482 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8483 portability to one's complement hosts!).
8484 * lib/ebitset.c (ebitset_op1): Likewise.
8485 * lib/lbitset.c (lbitset_op1): Likewise.
8486
8487 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8488 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8489 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8490 Sync with fileutils.
8491 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8492 lib/gettext.h: Sync with diffutils.
8493
8494 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8495 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8496
8497 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
8498 PROTOTYPES to check for prototypes, and "defined __STDC__" to
8499 check for void *.
8500
8501 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
8502 size_t; the old version tried to do this but casted improperly.
8503 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
8504 (bitset_test): Now returns int, not unsigned long.
8505
8506 * lib/bitset_stats.c: Include "gettext.h".
8507 (_): New macro.
8508 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
8509 name locals "index", as it generates unnecessary warnings on some
8510 hosts that have an "index" function.
8511
8512 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
8513 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
8514 they need translation.
8515 * src/LR0.c (state_list_append, new_itemsets, get_state,
8516 append_states, generate_states): Likewise.
8517 * src/assoc.c (assoc_to_string): Likewise.
8518 * src/closure.c (print_closure, set_firsts, closure): Likewise.
8519 * src/gram.c (grammar_dump): Likewise.
8520 * src/injections.c (injections_compute): Likewise.
8521 * src/lalr.c (lookaheads_print): Likewise.
8522 * src/relation.c (relation_transpose): Likewise.
8523 * src/scan-gram.l: Likewise.
8524 * src/tables.c (table_grow, pack_vector): Likewise.
8525
8526 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
8527 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
8528 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
8529 * m4/mbstate_t.m4: Sync with fileutils.
8530 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
8531
8532 * po/LINGUAS: Add pt_BR.
8533 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
8534 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
8535 lib/timevar.c.
8536 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
8537 manual recommends.
8538 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
8539
8540 * src/complain.c (strerror_r): Remove decl; not needed.
8541 (strerror): Use same pattern as ../lib/error.c.
8542
8543 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
8544
8545 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
8546
8547 * src/main.c (main): Cast result of bindtextdomain and textdomain
8548 to void, to avoid a GCC warning when --disable-nls is in effect.
8549
8550 * src/scan-gram.l: Use strings rather than escapes when possible,
8551 to minimize the number of warnings from xgettext.
8552 (handle_action_dollar, handle_action_at): Don't use isdigit,
8553 as it mishandles negative chars and it may not work as expected
8554 outside the C locale.
8555
8556 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
8557 this is a GCC extension and is not portable to other compilers.
8558
8559 * src/system.h (alloca): Use same pattern as ../lib/error.c.
8560 Do not include <ctype.h>; no longer needed.
8561 Do not include <malloc.h>; no longer needed (and generates
8562 warnings on OpenBSD 3.0).
8563
8564 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
8565 it's not portable.
8566
8567 * tests/regression.at: Do not use 'cc -c input.c -o input';
8568 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
8569
8570 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
8571 exit status as failure, not just exit status 1. Sun C exits
8572 with status 2 sometimes.
8573
8574 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
8575 Use it for the two large tests.
8576
8577 2002-08-02 Akim Demaille <akim@epita.fr>
8578
8579 * src/conflicts.c (conflicts_output): Don't output rules never
8580 reduced here, since anyway that computation doesn't work.
8581 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
8582 (rule_useless_p, rule_never_reduced_p): New.
8583 (grammar_rules_partial_print): Use a filter instead of a range.
8584 Display the title only if needed.
8585 (grammar_rules_print): Adjust.
8586 (grammar_rules_never_reduced_report): New.
8587 * src/tables.c (action_row): Move the computation of rules never
8588 reduced to...
8589 (token_actions): here.
8590 * src/main.c (main): Make the parser before making the report, so
8591 that rules never reduced are computed.
8592 Call grammar_rules_never_reduced_report.
8593 * src/print.c (print_results): Report rules never reduced.
8594 * tests/conflicts.at, tests/reduce.at: Adjust.
8595
8596 2002-08-01 Akim Demaille <akim@epita.fr>
8597
8598 Instead of attaching lookaheads and duplicating the rules being
8599 reduced by a state, attach the lookaheads to the reductions.
8600
8601 * src/state.h (state_t): Remove the `lookaheads',
8602 `lookaheads_rule' member.
8603 (reductions_t): Add a `lookaheads' member.
8604 Use a regular array for the `rules'.
8605 * src/state.c (reductions_new): Initialize the lookaheads member
8606 to 0.
8607 (state_rule_lookaheads_print): Adjust.
8608 * src/state.h, src/state.c (state_reductions_find): New.
8609 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
8610 (count_rr_conflicts): Adjust.
8611 * src/lalr.c (LArule): Remove.
8612 (add_lookback_edge): Adjust.
8613 (state_lookaheads_count): New.
8614 (states_lookaheads_initialize): Merge into...
8615 (initialize_LA): this.
8616 (lalr_free): Adjust.
8617 * src/main.c (main): Don't free nullable and derives too early: it
8618 is used by --verbose.
8619 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
8620
8621 2002-08-01 Akim Demaille <akim@epita.fr>
8622
8623 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
8624 `rule_number_t**'.
8625 (set_derives, free_derives): Rename as...
8626 (derives_compute, derives_free): this.
8627 Adjust all dependencies.
8628 * src/nullable.c (set_nullable, free_nullable): Rename as...
8629 (nullable_compute, nullable_free): these.
8630 (rule_list_t): Store rule_t *, not rule_number_t.
8631 * src/state.c (state_rule_lookaheads_print): Directly compare rule
8632 pointers, instead of their numbers.
8633 * src/main.c (main): Call nullable_free, and derives_free earlier,
8634 as they were lo longer used.
8635
8636 2002-08-01 Akim Demaille <akim@epita.fr>
8637
8638 * lib/timevar.c (get_time): Include children time.
8639 * src/lalr.h (LA, LArule): Don't export them: used with the
8640 state_t.
8641 * src/lalr.c (LA, LArule): Static.
8642 * src/lalr.h, src/lalr.c (lalr_free): New.
8643 * src/main.c (main): Call it.
8644 * src/tables.c (pack_vector): Check whether loc is >= to the
8645 table_size, not >.
8646 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
8647 (tables_generate): do it, since that's also it which allocates
8648 them.
8649 Don't free LA and LArule, main does.
8650
8651 2002-07-31 Akim Demaille <akim@epita.fr>
8652
8653 Separate parser tables computation and output.
8654
8655 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
8656 (conflict_list, conflict_list_cnt, table, check, table_ninf)
8657 (yydefgoto, yydefact, high): Move to...
8658 * src/tables.h, src/tables.c: here.
8659 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8660 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8661 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
8662 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
8663 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
8664 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8665 (action_row, save_row, token_actions, save_column, default_goto)
8666 (goto_actions, sort_actions, matching_state, pack_vector)
8667 (table_ninf_remap, pack_table, prepare_actions): Move to...
8668 * src/tables.c: here.
8669 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8670 * src/output.c (token_actions, output_base, output_conflicts)
8671 (output_check): Merge into...
8672 (prepare_actions): this.
8673 (actions_output): Rename as...
8674 (user_actions_output): this.
8675 * src/main.c (main): Call tables_generate and tables_free.
8676
8677 2002-07-31 Akim Demaille <akim@epita.fr>
8678
8679 Steal GCC's --time-report support.
8680
8681 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8682 stolen/adjusted from GCC.
8683 * m4/stage.m4: Remove time related checks.
8684 * m4/timevar.m4: New.
8685 * configure.in: Adjust.
8686 * src/system.h: Adjust to using timevar.h.
8687 * src/getargs.h, src/getargs.c: Support trace_time for
8688 --trace=time.
8689 * src/main.c (stage): Remove.
8690 (main): Replace `stage' invocations with timevar calls.
8691 * src/output.c: Insert pertinent timevar calls.
8692
8693 2002-07-31 Akim Demaille <akim@epita.fr>
8694
8695 Let --trace have arguments.
8696
8697 * src/getargs.h (enum trace_e): New.
8698 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8699 (long_options, short_options): --trace/-T takes an optional
8700 argument.
8701 Change all the uses of trace_flag to reflect the new flags.
8702 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8703
8704 Strengthen `stage' portability.
8705
8706 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8707 * configure.in: Use it.
8708 Don't check for malloc.h and sys/times.h.
8709 * src/system.h: Include them when appropriate.
8710 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
8711 times and struct tms are available.
8712
8713 2002-07-30 Akim Demaille <akim@epita.fr>
8714
8715 In verbose parse error message, don't report `error' as an
8716 expected token.
8717 * tests/actions.at (Printers and Destructors): Adjust.
8718 * tests/calc.at (Calculator $1): Adjust.
8719 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
8720 error message, do not report the parser accepts the error token in
8721 that state.
8722
8723 2002-07-30 Akim Demaille <akim@epita.fr>
8724
8725 Normalize conflict related messages.
8726
8727 * src/complain.h, src/complain.c (warn, complain): New.
8728 * src/conflicts.c (conflicts_print): Use them.
8729 (conflict_report_yacc): New, extracted from...
8730 (conflicts_print): here.
8731 * tests/conflicts.at, tests/existing.at: Adjust.
8732
8733 2002-07-30 Akim Demaille <akim@epita.fr>
8734
8735 Report rules which are never reduced by the parser: those hidden
8736 by conflicts.
8737
8738 * src/LR0.c (save_reductions): Don't make the final state too
8739 different: save its reduction (accept) instead of having a state
8740 without any action (no shift or goto, no reduce).
8741 Note: the final state is now a ``regular'' state, i.e., the
8742 parsers now contain `reduce 0' as default reduction.
8743 Nevertheless, since they decide to `accept' when yystate =
8744 final_state, they still will not reduce rule 0.
8745 * src/print.c (print_actions, print_reduction): Adjust.
8746 * src/output.c (action_row): Track reduced rules.
8747 (token_actions): Report rules never reduced.
8748 * tests/conflicts.at, tests/regression.at: Adjust.
8749
8750 2002-07-30 Akim Demaille <akim@epita.fr>
8751
8752 `stage' was accidently included in a previous patch.
8753 Initiate its autoconfiscation.
8754
8755 * configure.in: Look for malloc.h and sys/times.h.
8756 * src/main.c (stage): Adjust.
8757 Report only when trace_flag.
8758
8759 2002-07-29 Akim Demaille <akim@epita.fr>
8760
8761 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
8762 state_number_t.
8763 (errs_t): symbol_t*, not symbol_number_t.
8764 (reductions_t): rule_t*, not rule_number_t.
8765 (FOR_EACH_SHIFT): New.
8766 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
8767 * src/print.c, src/print_graph.c: Adjust.
8768
8769 2002-07-29 Akim Demaille <akim@epita.fr>
8770
8771 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
8772
8773 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
8774 (endtoken, accept): these.
8775 * src/reader.c (reader): Set endtoken's default tag to "$end".
8776 Set undeftoken's tag to "$undefined" instead of "$undefined.".
8777 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
8778 Adjust.
8779
8780 2002-07-29 Akim Demaille <akim@epita.fr>
8781
8782 * src/reduce.c (reduce_grammar): When the language is empty,
8783 complain about the start symbol, not the axiom.
8784 Use its location.
8785 * tests/reduce.at (Empty Language): New.
8786
8787 2002-07-26 Akim Demaille <akim@epita.fr>
8788
8789 * src/reader.h, src/reader.c (gram_error): ... can't get
8790 yycontrol without making too strong assumptions on the parser
8791 itself.
8792 * src/output.c (prepare_tokens): Use the real 0th value of
8793 token_translations instead of `0'.
8794 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
8795 visible here.
8796 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
8797 for the time being: %locations ought to provide it to yyerror.
8798
8799 2002-07-25 Akim Demaille <akim@epita.fr>
8800
8801 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
8802 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
8803 * tests/regression.at (Web2c Actions): Adjust.
8804
8805 2002-07-25 Akim Demaille <akim@epita.fr>
8806
8807 Stop storing rules from 1 to nrules + 1.
8808
8809 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
8810 * src/nullable.c, src/output.c, src/print.c, src/reader.c
8811 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
8812 Iterate from 0 to nrules.
8813 Use rule_number_as_item_number and item_number_as_rule_number.
8814 Adjust to `derive' now containing possibly 0.
8815 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
8816 Handle the `- 1' part in rule numbers from/to item numbers.
8817 * src/conflicts.c (log_resolution): Fix the message which reversed
8818 shift and reduce.
8819 * src/output.c (action_row): Initialize default_rule to -1.
8820 (token_actions): Adjust.
8821 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
8822 expected output.
8823 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
8824
8825 2002-07-25 Akim Demaille <akim@epita.fr>
8826
8827 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
8828 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
8829 (b4_c_knr_arg_decl): New.
8830 * data/yacc.c: Use it to define yysymprint, yydestruct, and
8831 yyreport_parse_error.
8832
8833 2002-07-25 Akim Demaille <akim@epita.fr>
8834
8835 * data/yacc.c (yyreport_parse_error): New, extracted from...
8836 (yyparse): here.
8837 (yydestruct, yysymprint): Move above yyparse.
8838 Be K&R compliant.
8839
8840 2002-07-25 Akim Demaille <akim@epita.fr>
8841
8842 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
8843 replace...
8844 (b4_sint_type, b4_uint_type): these.
8845 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
8846 * tests/regression.at (Web2c Actions): Adjust.
8847
8848 2002-07-25 Akim Demaille <akim@epita.fr>
8849
8850 * src/gram.h (TIEM_NUMBER_MAX): New.
8851 (item_number_of_rule_number, rule_number_of_item_number): Rename
8852 as...
8853 (rule_number_as_item_number, item_number_as_rule_number): these.
8854 Adjust dependencies.
8855 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8856 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8857 (symbol_number_to_vector_number): New.
8858 (order): Of vector_number_t* type.
8859 (base_t, BASE_MAX, BASE_MIN): New.
8860 (froms, tos, width, pos, check): Of base_t type.
8861 (action_number_t, ACTION_MIN, ACTION_MAX): New.
8862 (actrow): Of action_number_t type.
8863 (conflrow): Of unsigned int type.
8864 (table_ninf, base_ninf): New.
8865 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
8866 (muscle_insert_int_table, muscle_insert_base_table)
8867 (muscle_insert_rule_number_table): New.
8868 (prepare_tokens): Output `toknum' as int_table.
8869 (action_row): Returns a rule_number_t.
8870 Use ACTION_MIN, not SHRT_MIN.
8871 (token_actions): yydefact is rule_number_t*.
8872 (table_ninf_remap): New.
8873 (pack_table): Use it for `base' and `table'.
8874 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
8875 replaced with...
8876 (YYPACT_NINF, YYTABLE_NINF): these.
8877 (yypact, yytable): Compute their types instead of hard-coded
8878 `short'.
8879 * tests/regression.at (Web2c Actions): Adjust.
8880
8881 2002-07-19 Akim Demaille <akim@epita.fr>
8882
8883 * src/scan-gram.l (id): Can start with an underscore.
8884
8885 2002-07-16 Akim Demaille <akim@epita.fr>
8886
8887 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
8888 Adjust all former `associativity' dependencies.
8889 * src/symtab.c (symbol_new): Default associativity is `undef', not
8890 `right'.
8891 (symbol_check_alias_consistence): Adjust.
8892
8893 2002-07-09 Akim Demaille <akim@epita.fr>
8894
8895 * doc/bison.texinfo: Properly set the ``header'' part.
8896 Use @dircategory ``GNU programming tools'' as per Texinfo's
8897 documentation.
8898 Use @copying.
8899
8900 2002-07-09 Akim Demaille <akim@epita.fr>
8901
8902 * lib/quotearg.h: Protect against multiple inclusions.
8903 * src/location.h (location_t): Add a `file' member.
8904 (LOCATION_RESET, LOCATION_PRINT): Adjust.
8905 * src/complain.c (warn_at, complain_at, fatal_at): Drop
8906 `error_one_per_line' support.
8907
8908 2002-07-09 Akim Demaille <akim@epita.fr>
8909
8910 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
8911 * src/reader.c (lineno): Remove.
8912 Adjust all dependencies.
8913 (get_merge_function): Take a location and use complain_at.
8914 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
8915 * tests/regression.at (Invalid inputs, Mixing %token styles):
8916 Adjust.
8917
8918 2002-07-09 Akim Demaille <akim@epita.fr>
8919
8920 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
8921 recovery rule, and forbid extensions when --yacc.
8922 (gram_error): Use complain_at.
8923 * src/reader.c (reader): Exit if there were parse errors.
8924
8925 2002-07-09 Akim Demaille <akim@epita.fr>
8926
8927 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
8928 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
8929 Reported by R Blake <blakers@mac.com>.
8930
8931 2002-07-09 Akim Demaille <akim@epita.fr>
8932
8933 * data/yacc.c: Output the copyright notive in the header.
8934
8935 2002-07-03 Akim Demaille <akim@epita.fr>
8936
8937 * src/output.c (froms, tos): Are state_number_t.
8938 (save_column): sp, sp1, and sp2 are state_number_t.
8939 (prepare): Rename `final' as `final_state_number', `nnts' as
8940 `nterms_number', `nrules' as `rules_number', `nstates' as
8941 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
8942 unused.
8943 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
8944 * data/lalr1.cc (nsym_): Remove, unused.
8945
8946 2002-07-03 Akim Demaille <akim@epita.fr>
8947
8948 * src/lalr.h, src/lalr.c (goto_number_t): New.
8949 * src/lalr.c (goto_list_t): New.
8950 Propagate them.
8951 * src/nullable.c (rule_list_t): New.
8952 Propagate.
8953 * src/types.h: Remove.
8954
8955 2002-07-03 Akim Demaille <akim@epita.fr>
8956
8957 * src/closure.c (print_fderives): Use rule_rhs_print.
8958 * src/derives.c (print_derives): Use rule_rhs_print.
8959 (rule_list_t): New, replaces `shorts'.
8960 (set_derives): Add comments.
8961 * tests/sets.at (Nullable, Firsts): Adjust.
8962
8963 2002-07-03 Akim Demaille <akim@epita.fr>
8964
8965 * src/output.c (prepare_actions): Free `tally' and `width'.
8966 (prepare_actions): Allocate and free `order'.
8967 * src/symtab.c (symbols_free): Free `symbols'.
8968 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
8969 * src/output.c (m4_invoke): Move to...
8970 * src/scan-skel.l: here.
8971 (<<EOF>>): Close yyout, and free its name.
8972
8973 2002-07-03 Akim Demaille <akim@epita.fr>
8974
8975 Fix some memory leaks, and fix a bug: state 0 was examined twice.
8976
8977 * src/LR0.c (new_state): Merge into...
8978 (state_list_append): this.
8979 (new_states): Merge into...
8980 (generate_states): here.
8981 (set_states): Don't ensure a proper `errs' state member here, do it...
8982 * src/conflicts.c (conflicts_solve): here.
8983 * src/state.h, src/state.c: Comment changes.
8984 (state_t): Rename member `shifts' as `transitions'.
8985 Adjust all dependencies.
8986 (errs_new): For consistency, also take the values as argument.
8987 (errs_dup): Remove.
8988 (state_errs_set): New.
8989 (state_reductions_set, state_transitions_set): Assert that no
8990 previous value was assigned.
8991 (state_free): New.
8992 (states_free): Use it.
8993 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
8994 temporary storage: use `errs' and `nerrs' as elsewhere.
8995 (set_conflicts): Allocate and free this `errs'.
8996
8997 2002-07-02 Akim Demaille <akim@epita.fr>
8998
8999 * lib/libiberty.h: New.
9000 * lib: Update the bitset implementation from upstream.
9001 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9002 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9003 * src/main.c: Adjust bitset stats calls.
9004
9005 2002-07-01 Paul Eggert <eggert@twinsun.com>
9006
9007 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9008 char, so that negative chars don't collide with $.
9009
9010 2002-06-30 Akim Demaille <akim@epita.fr>
9011
9012 Have the GLR tests be `warning' checked, and fix the warnings.
9013
9014 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9015 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9016 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9017 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9018 (yyaddDeferredAction): static.
9019 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9020 (yyreportParseError): yyprefix is const.
9021 yytokenp is used only when verbose.
9022 (yy__GNUC__): Replace with __GNUC__.
9023 (yypdumpstack): yyi is size_t.
9024 (yypreference): Un-yy local variables and arguments, to avoid
9025 clashes with `yyr1'. Anyway, we are not in the user name space.
9026 (yytname_size): be an int, as is compared with ints.
9027 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9028 Use them.
9029 * tests/cxx-gram.at: Use quotation to protect $1.
9030 Use AT_COMPILE to enable warnings hunts.
9031 Prototype yylex and yyerror.
9032 `Use' argc.
9033 Include `string.h', not `strings.h'.
9034 Produce and prototype stmtMerge only when used.
9035 yylex takes a location.
9036
9037 2002-06-30 Akim Demaille <akim@epita.fr>
9038
9039 We spend a lot of time in quotearg, in particular when --verbose.
9040
9041 * src/symtab.c (symbol_get): Store a quoted version of the key.
9042 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
9043 Adjust all callers.
9044
9045 2002-06-30 Akim Demaille <akim@epita.fr>
9046
9047 * src/state.h (reductions_t): Rename member `nreds' as num.
9048 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
9049 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
9050
9051 2002-06-30 Akim Demaille <akim@epita.fr>
9052
9053 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
9054 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
9055 (shifts_to): Rename as...
9056 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
9057 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
9058 (TRANSITION_IS_DISABLED, transitions_to): these.
9059
9060 2002-06-30 Akim Demaille <akim@epita.fr>
9061
9062 * src/print.c (print_shifts, print_gotos): Merge into...
9063 (print_transitions): this.
9064 (print_transitions, print_errs, print_reductions): Align the
9065 lookaheads columns.
9066 (print_core, print_transitions, print_errs, print_state,
9067 print_grammar): Output empty lines separator before, not after.
9068 (state_default_rule_compute): Rename as...
9069 (state_default_rule): this.
9070 * tests/conflicts.at (Defaulted Conflicted Reduction),
9071 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
9072 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
9073
9074 2002-06-30 Akim Demaille <akim@epita.fr>
9075
9076 Display items as we display rules.
9077
9078 * src/gram.h, src/gram.c (rule_lhs_print): New.
9079 * src/gram.c (grammar_rules_partial_print): Use it.
9080 * src/print.c (print_core): Likewise.
9081 * tests/conflicts.at (Defaulted Conflicted Reduction),
9082 (Unresolved SR Conflicts): Adjust.
9083 (Unresolved SR Conflicts): Adjust and rename as...
9084 (Resolved SR Conflicts): this, as was meant.
9085 * tests/regression.at (Web2c Report): Adjust.
9086
9087 2002-06-30 Akim Demaille <akim@epita.fr>
9088
9089 * src/print.c (state_default_rule_compute): New, extracted from...
9090 (print_reductions): here.
9091 Pessimize, but clarify the code.
9092 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
9093
9094 2002-06-30 Akim Demaille <akim@epita.fr>
9095
9096 * src/output.c (action_row): Let default_rule be always a rule
9097 number.
9098
9099 2002-06-30 Akim Demaille <akim@epita.fr>
9100
9101 * src/closure.c (print_firsts, print_fderives, closure):
9102 Use BITSET_EXECUTE.
9103 * src/lalr.c (lookaheads_print): Likewise.
9104 * src/state.c (state_rule_lookaheads_print): Likewise.
9105 * src/print_graph.c (print_core): Likewise.
9106 * src/print.c (print_reductions): Likewise.
9107 * src/output.c (action_row): Likewise.
9108 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
9109
9110 2002-06-30 Akim Demaille <akim@epita.fr>
9111
9112 * src/print_graph.c: Use report_flag.
9113
9114 2002-06-30 Akim Demaille <akim@epita.fr>
9115
9116 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
9117 to...
9118 * src/relation.h, src/relation.c (traverse, relation_digraph)
9119 (relation_print, relation_transpose): New.
9120
9121 2002-06-30 Akim Demaille <akim@epita.fr>
9122
9123 * src/state.h, src/state.c (shifts_to): New.
9124 * src/lalr.c (build_relations): Use it.
9125
9126 2002-06-30 Akim Demaille <akim@epita.fr>
9127
9128 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
9129 (item_number_of_rule_number, rule_number_of_item_number): New.
9130 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
9131 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9132 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
9133 Propagate their use.
9134 Much remains to be done, in particular wrt `shorts' from types.h.
9135
9136 2002-06-30 Akim Demaille <akim@epita.fr>
9137
9138 * src/symtab.c (symbol_new): Initialize the `printer' member.
9139
9140 2002-06-30 Akim Demaille <akim@epita.fr>
9141
9142 * src/LR0.c (save_reductions): Remove, replaced by...
9143 * src/state.h, src/state.c (state_reductions_set): New.
9144 (reductions, errs): Rename as...
9145 (reductions_t, errs_t): these.
9146 Adjust all dependencies.
9147
9148 2002-06-30 Akim Demaille <akim@epita.fr>
9149
9150 * src/LR0.c (state_list_t, state_list_append): New.
9151 (first_state, last_state): Now symbol_list_t.
9152 (this_state): Remove.
9153 (new_itemsets, append_states, save_reductions): Take a state_t as
9154 argument.
9155 (set_states, generate_states): Adjust.
9156 (save_shifts): Remove, replaced by...
9157 * src/state.h, src/state.c (state_shifts_set): New.
9158 (shifts): Rename as...
9159 (shifts_t): this.
9160 Adjust all dependencies.
9161 * src/state.h (state_t): Remove the `next' member.
9162
9163 2002-06-30 Akim Demaille <akim@epita.fr>
9164
9165 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
9166 escaped in slot 0.
9167
9168 2002-06-30 Akim Demaille <akim@epita.fr>
9169
9170 Use hash.h for the state hash table.
9171
9172 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
9173 (allocate_storage): Use state_hash_new.
9174 (free_storage): Use state_hash_free.
9175 (new_state, get_state): Adjust.
9176 * src/lalr.h, src/lalr.c (states): Move to...
9177 * src/states.h (state_t): Remove the `link' member, no longer
9178 used.
9179 * src/states.h, src/states.c: here.
9180 (state_hash_new, state_hash_free, state_hash_lookup)
9181 (state_hash_insert, states_free): New.
9182 * src/states.c (state_table, state_compare, state_hash): New.
9183 * src/output.c (output_actions): Do not free states now, since we
9184 still need to know the final_state number in `prepare', called
9185 afterwards. Do it...
9186 * src/main.c (main): here: call states_free after `output'.
9187
9188 2002-06-30 Akim Demaille <akim@epita.fr>
9189
9190 * src/state.h, src/state.c (state_new): New, extracted from...
9191 * src/LR0.c (new_state): here.
9192 * src/state.h (STATE_ALLOC): Move to...
9193 * src/state.c: here.
9194 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
9195 * src/state.h, src/state.c: here.
9196
9197 2002-06-30 Akim Demaille <akim@epita.fr>
9198
9199 * src/reader.c (gensym): Rename as...
9200 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
9201 (getsym): Rename as...
9202 (symbol_get): this.
9203
9204 2002-06-30 Akim Demaille <akim@epita.fr>
9205
9206 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
9207 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
9208 * src/output.c, src/print.c, src/print_graph.c: Propagate.
9209 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
9210
9211 2002-06-30 Akim Demaille <akim@epita.fr>
9212
9213 Make the test suite pass with warnings checked.
9214
9215 * tests/actions.at (Printers and Destructors): Improve.
9216 Avoid unsigned vs. signed issues.
9217 * tests/calc.at: Don't exercise the scanner here, do it...
9218 * tests/input.at (Torturing the Scanner): here.
9219
9220 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9221
9222 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
9223 reorganize first lines parallel to yacc.c.
9224
9225 2002-06-28 Akim Demaille <akim@epita.fr>
9226
9227 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
9228 (b4_token_enum, b4_token_defines): New, factored from...
9229 * data/lalr1.cc, data/yacc.c, glr.c: here.
9230
9231 2002-06-28 Akim Demaille <akim@epita.fr>
9232
9233 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
9234 unused variables.
9235 * src/output.c (merger_output): static.
9236
9237 2002-06-28 Akim Demaille <akim@epita.fr>
9238
9239 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
9240 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
9241 pacify GCC.
9242 * src/output.c (save_row): Initialize all the variables to pacify GCC.
9243
9244 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9245
9246 Accumulated changelog for new GLR parsing features.
9247
9248 * src/conflicts.c (count_total_conflicts): Change name to
9249 conflicts_total_count.
9250 * src/conflicts.h: Ditto.
9251 * src/output.c (token_actions): Use the new name.
9252 (output_conflicts): Change conflp => conflict_list_heads, and
9253 confl => conflict_list for better readability.
9254 * data/glr.c: Use the new names.
9255 * NEWS: Add self to GLR announcement.
9256
9257 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
9258
9259 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
9260 Akim Demaille.
9261
9262 * data/bison.glr: Change name to glr.c
9263 * data/glr.c: Renamed from bison.glr.
9264 * data/Makefile.am: Add glr.c
9265
9266 * src/getargs.c:
9267
9268 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
9269 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
9270
9271 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9272
9273 * data/bison.glr: Be sure to restore the
9274 current #line when returning to the skeleton contents after having
9275 exposed the input file's #line.
9276
9277 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9278
9279 * data/bison.glr: Bring up to date with changes to bison.simple.
9280
9281 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9282
9283 * data/bison.glr: Correct definitions that use b4_prefix.
9284 Various reformatting.
9285 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
9286 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
9287 yytokenp argument; now part of stack.
9288 (yychar): Define to behave as documented.
9289 (yyclearin): Ditto.
9290
9291 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9292
9293 * src/reader.h: Add declaration for free_merger_functions.
9294
9295 * src/reader.c (merge_functions): New variable.
9296 (get_merge_function): New function.
9297 (free_merger_functions): New function.
9298 (readgram): Check for %prec that is not followed by a symbol.
9299 Handle %dprec and %merge declarations.
9300 (packgram): Initialize dprec and merger fields in rules array.
9301
9302 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
9303 conflict_list_cnt, conflict_list_free): New variables.
9304 (table_grow): Also grow conflict_table.
9305 (prepare_rules): Output dprec and merger tables.
9306 (conflict_row): New function.
9307 (action_row): Output conflict lists for GLR parser. Don't use
9308 default reduction in conflicted states for GLR parser so that there
9309 are spaces for the conflict lists.
9310 (save_row): Also save conflict information.
9311 (token_actions): Allocate conflict list.
9312 (merger_output): New function.
9313 (pack_vector): Pack conflict table, too.
9314 (output_conflicts): New function to output yyconflp and yyconfl.
9315 (output_check): Allocate conflict_tos.
9316 (output_actions): Output conflict tables, also.
9317 (output_skeleton): Output b4_mergers definition.
9318 (prepare): Output b4_max_rhs_length definition.
9319 Use 'bison.glr' as default skeleton for GLR parsers.
9320
9321 * src/gram.c (glr_parser): New flag.
9322 (grammar_free): Call free_merger_functions.
9323
9324 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
9325 all pairs of conflicting reductions, rather than just all tokens
9326 causing conflicts. Needed to size conflict tables.
9327 (conflicts_output): Modify call to count_rr_conflicts for new
9328 interface.
9329 (conflicts_print): Ditto.
9330 (count_total_conflicts): New function.
9331
9332 * src/reader.h (merger_list): New type.
9333 (merge_functions): New variable.
9334
9335 * src/lex.h (tok_dprec, tok_merge): New token types.
9336
9337 * src/gram.h (rule_s): Add dprec and merger fields.
9338 (glr_parser): New flag.
9339
9340 * src/conflicts.h (count_total_conflicts): New function.
9341
9342 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
9343
9344 * doc/bison.texinfo (Generalized LR Parsing): New section.
9345 (GLR Parsers): New section.
9346 (Language and Grammar): Mention GLR parsing.
9347 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
9348 Correct typo ("tge" -> "the").
9349
9350 * data/bison.glr: New skeleton for GLR parsing.
9351
9352 * tests/cxx-gram.at: New tests for GLR parsing.
9353
9354 * tests/testsuite.at: Include cxx-gram.at.
9355
9356 * tests/Makefile.am: Add cxx-gram.at.
9357
9358 * src/parse-gram.y:
9359
9360 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
9361
9362 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
9363
9364 2002-06-27 Akim Demaille <akim@epita.fr>
9365
9366 * src/options.h, src/options.c: Remove.
9367 * src/getargs.c (short_options, long_options): New.
9368
9369 2002-06-27 Akim Demaille <akim@epita.fr>
9370
9371 * data/bison.simple, data/bison.c++: Rename as...
9372 * data/yacc.c, data/lalr1.cc: these.
9373 * doc/bison.texinfo (Environment Variables): Remove.
9374
9375 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
9376
9377 * src/getargs.c (report_argmatch): Initialize strtok().
9378
9379 2002-06-20 Akim Demaille <akim@epita.fr>
9380
9381 * data/bison.simple (b4_symbol_actions): New, replaces...
9382 (b4_symbol_destructor, b4_symbol_printer): these.
9383 (yysymprint): Be sure to call YYPRINT only for tokens, and using
9384 user token numbers.
9385
9386 2002-06-20 Akim Demaille <akim@epita.fr>
9387
9388 * data/bison.simple (yydestructor): Rename as...
9389 (yydestruct): this.
9390
9391 2002-06-20 Akim Demaille <akim@epita.fr>
9392
9393 * src/symtab.h, src/symtab.c (symbol_type_set)
9394 (symbol_destructor_set, symbol_precedence_set): The location is
9395 the last argument.
9396 Adjust all callers.
9397
9398 2002-06-20 Akim Demaille <akim@epita.fr>
9399
9400 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
9401 internals.
9402 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
9403 Takes a location.
9404 * src/symtab.h, src/symtab.c (symbol_class_set)
9405 (symbol_user_token_number_set): Likewise.
9406 Adjust all callers.
9407 Promote complain_at.
9408 * tests/input.at (Type Clashes): Adjust.
9409
9410 2002-06-20 Akim Demaille <akim@epita.fr>
9411
9412 * data/bison.simple (YYLEX): Fix the declaration when
9413 %pure-parser.
9414
9415 2002-06-20 Akim Demaille <akim@epita.fr>
9416
9417 * data/bison.simple (yysymprint): Don't print the token number,
9418 just its name.
9419 * tests/actions.at (Destructors): Rename as...
9420 (Printers and Destructors): this.
9421 Also exercise %printer.
9422
9423 2002-06-20 Akim Demaille <akim@epita.fr>
9424
9425 * data/bison.simple (YYDSYMPRINT): New.
9426 Use it to remove many of the #if YYDEBUG/if (yydebug).
9427
9428 2002-06-20 Akim Demaille <akim@epita.fr>
9429
9430 * src/symtab.h, src/symtab.c (symbol_t): printer and
9431 printer_location are new members.
9432 (symbol_printer_set): New.
9433 * src/parse-gram.y (PERCENT_PRINTER): New token.
9434 Handle its associated rule.
9435 * src/scan-gram.l: Adjust.
9436 (handle_destructor_at, handle_destructor_dollar): Rename as...
9437 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9438 * src/output.c (symbol_printers_output): New.
9439 (output_skeleton): Call it.
9440 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9441 since there are already many grammar files with a user `yyprint'.
9442 Replace the calls to YYPRINT to calls to yysymprint.
9443 * tests/calc.at: Adjust.
9444 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9445 taking advantage of parser very internal details (stack size!).
9446
9447 2002-06-20 Akim Demaille <akim@epita.fr>
9448
9449 * src/scan-gram.l: Complete the scanner with the missing patterns
9450 to pacify Flex.
9451 Use `quote' and `symbol_tag_get' where appropriate.
9452
9453 2002-06-19 Akim Demaille <akim@epita.fr>
9454
9455 * tests/actions.at (Destructors): Augment to test locations.
9456 * data/bison.simple (yydestructor): Pass it the current location
9457 if locations are enabled.
9458 Prototype only when __STDC__ or C++.
9459 Change the argument names to move into the yy name space: there is
9460 user code here.
9461
9462 2002-06-19 Akim Demaille <akim@epita.fr>
9463
9464 * data/bison.simple (b4_pure_if): New.
9465 Use it instead of #ifdef YYPURE.
9466
9467 2002-06-19 Akim Demaille <akim@epita.fr>
9468
9469 * data/bison.simple (b4_location_if): New.
9470 Use it instead of #ifdef YYLSP_NEEDED.
9471
9472 2002-06-19 Akim Demaille <akim@epita.fr>
9473
9474 Prepare @$ in %destructor, but currently don't bind it in the
9475 skeleton, as %location use is not cleaned up yet.
9476
9477 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9478 (handle_action_at): New.
9479 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9480 a braced_code_t and a location as additional arguments.
9481 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9482 unquote one when outputting `b4_dollar_dollar'.
9483 Adjust callers.
9484 * data/bison.simple (b4_eval): Remove.
9485 (b4_symbol_destructor): Adjust.
9486 * tests/input.at (Invalid @n): Adjust.
9487
9488 2002-06-19 Zack Weinberg <zack@codesourcery.com>
9489
9490 * doc/bison.texinfo: Document ability to have multiple
9491 prologue sections.
9492
9493 2002-06-18 Akim Demaille <akim@epita.fr>
9494
9495 * src/files.c (compute_base_names): When computing the output file
9496 names from the input file name, strip the directory part.
9497
9498 2002-06-18 Akim Demaille <akim@epita.fr>
9499
9500 * data/bison.simple.new: Comment changes.
9501 Reported by Andreas Schwab.
9502
9503 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
9504
9505 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
9506 there are no `label `yyoverflowlab' defined but not used' warnings
9507 when yyoverflow is defined.
9508
9509 2002-06-18 Akim Demaille <akim@epita.fr>
9510
9511 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
9512 new member.
9513 (symbol_destructor_set): Adjust.
9514 * src/output.c (symbol_destructors_output): Output the destructor
9515 locations.
9516 Output the symbol name.
9517 * data/bison.simple (b4_symbol_destructor): Adjust.
9518
9519 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
9520 and Akim Demaille <akim@epita.fr>
9521
9522 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
9523 what's left on the stack when the error recovery hits EOF.
9524 * tests/actions.at (Destructors): Complete to exercise this case.
9525
9526 2002-06-17 Akim Demaille <akim@epita.fr>
9527
9528 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
9529 arguments is really empty, not only equal to `[]'.
9530 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
9531 member.
9532 (symbol_destructor_set): New.
9533 * src/output.c (symbol_destructors_output): New.
9534 * src/reader.h (brace_code_t, current_braced_code): New.
9535 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
9536 (handle_dollar): Rename as...
9537 (handle_action_dollar): this.
9538 (handle_destructor_dollar): New.
9539 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
9540 (grammar_declaration): Use it.
9541 * data/bison.simple (yystos): Is always defined.
9542 (yydestructor): New.
9543 * tests/actions.at (Destructors): New.
9544 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
9545
9546 2002-06-17 Akim Demaille <akim@epita.fr>
9547
9548 * src/symlist.h, src/symlist.c (symbol_list_length): New.
9549 * src/scan-gram.l (handle_dollar, handle_at): Compute the
9550 rule_length only when needed.
9551 * src/output.c (actions_output, token_definitions_output): Output
9552 the full M4 block.
9553 * src/symtab.c: Don't access directly to the symbol tag, use
9554 symbol_tag_get.
9555 * src/parse-gram.y: Use symbol_list_free.
9556
9557 2002-06-17 Akim Demaille <akim@epita.fr>
9558
9559 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
9560 (symbol_list_prepend, get_type_name): Move to...
9561 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
9562 (symbol_list_prepend, symbol_list_n_type_name_get): here.
9563 Adjust all callers.
9564 (symbol_list_free): New.
9565 * src/scan-gram.l (handle_dollar): Takes a location.
9566 * tests/input.at (Invalid $n): Adjust.
9567
9568 2002-06-17 Akim Demaille <akim@epita.fr>
9569
9570 * src/reader.h, src/reader.c (symbol_list_new): Export it.
9571 (symbol_list_prepend): New.
9572 * src/parse-gram.y (%union): `list' is a new member.
9573 (symbols.1): New, replaces...
9574 (terms_to_prec.1, nterms_to_type.1): these.
9575 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
9576 Take a location as additional argument.
9577 Adjust all callers.
9578
9579 2002-06-15 Akim Demaille <akim@epita.fr>
9580
9581 * src/parse-gram.y: Move %token in the declaration section so that
9582 we don't depend upon CVS Bison.
9583
9584 2002-06-15 Akim Demaille <akim@epita.fr>
9585
9586 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
9587 * src/print.c (print_core): Use it.
9588
9589 2002-06-15 Akim Demaille <akim@epita.fr>
9590
9591 * src/conflicts.c (log_resolution): Accept the rule involved in
9592 the sr conflicts instead of the lookahead number that points to
9593 that rule.
9594 (flush_reduce): Accept the current lookahead vector as argument,
9595 instead of the index in LA.
9596 (resolve_sr_conflict): Accept the current number of lookahead
9597 bitset to consider for the STATE, instead of the index in LA.
9598 (set_conflicts): Adjust.
9599 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
9600
9601 2002-06-15 Akim Demaille <akim@epita.fr>
9602
9603 * src/state.h (state_t): Replace the `lookaheadsp' member, a
9604 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
9605 Adjust all dependencies.
9606 * src/lalr.c (initialize_lookaheads): Split into...
9607 (states_lookaheads_count, states_lookaheads_initialize): these.
9608 (lalr): Adjust.
9609
9610 2002-06-15 Akim Demaille <akim@epita.fr>
9611
9612 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
9613 out of...
9614 (grammar_rules_print): here.
9615 * src/reduce.c (reduce_output): Use it.
9616 * tests/reduce.at (Useless Rules, Reduced Automaton)
9617 (Underivable Rules): Adjust.
9618
9619 2002-06-15 Akim Demaille <akim@epita.fr>
9620
9621 Copy BYacc's nice way to report the grammar.
9622
9623 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
9624 New.
9625 Don't print the rules' location, it is confusing and useless.
9626 (rule_print): Use grammar_rhs_print.
9627 * src/print.c (print_grammar): Use grammar_rules_print.
9628
9629 2002-06-15 Akim Demaille <akim@epita.fr>
9630
9631 Complete and rationalize `useless thing' warnings.
9632
9633 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
9634 (symbol_tag_print): New.
9635 Use them everywhere in place of accessing directly the tag member.
9636 * src/gram.h, src/gram.c (rule_print): New.
9637 Use it where a rule used to be printed `by hand'.
9638 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
9639 (reduce_grammar_tables): Report the useless rules.
9640 (reduce_print): Useless things are a warning, not an error.
9641 Report it as such.
9642 * tests/reduce.at (Useless Nonterminals, Useless Rules):
9643 (Reduced Automaton, Underivable Rules): Adjust.
9644 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
9645 * tests/conflicts.at (Unresolved SR Conflicts)
9646 (Solved SR Conflicts): Adjust.
9647
9648 2002-06-15 Akim Demaille <akim@epita.fr>
9649
9650 Let symbols have a location.
9651
9652 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
9653 (getsym): Adjust.
9654 Adjust all callers.
9655 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
9656 Use location_t, not int.
9657 * src/symtab.c (symbol_check_defined): Take advantage of the
9658 location.
9659 * tests/regression.at (Invalid inputs): Adjust.
9660
9661 2002-06-15 Akim Demaille <akim@epita.fr>
9662
9663 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
9664 (input): Don't try to initialize yylloc here, do it in the
9665 scanner.
9666 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9667 * src/gram.h (rule_t): Change line and action_line into location
9668 and action_location, of location_t type.
9669 Adjust all dependencies.
9670 * src/location.h, src/location.c (empty_location): New.
9671 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9672 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9673 (grammar_current_rule_symbol_append)
9674 (grammar_current_rule_action_append): Expect a location as argument.
9675 * src/reader.c (grammar_midrule_action): Adjust to attach an
9676 action's location as dummy symbol location.
9677 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9678 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9679 the line numbers.
9680
9681 2002-06-14 Akim Demaille <akim@epita.fr>
9682
9683 Grammar declarations may be found in the grammar section.
9684
9685 * src/parse-gram.y (rules_or_grammar_declaration): New.
9686 (declarations): Each declaration may end with a semicolon, not
9687 just...
9688 (grammar_declaration): `"%union"'.
9689 (grammar): Branch to rules_or_grammar_declaration.
9690
9691 2002-06-14 Akim Demaille <akim@epita.fr>
9692
9693 * src/main.c (main): Invoke scanner_free.
9694
9695 2002-06-14 Akim Demaille <akim@epita.fr>
9696
9697 * src/output.c (m4_invoke): Extracted from...
9698 (output_skeleton): here.
9699 Free tempfile.
9700
9701 2002-06-14 Akim Demaille <akim@epita.fr>
9702
9703 * src/parse-gram.y (directives, directive, gram)
9704 (grammar_directives, precedence_directives, precedence_directive):
9705 Rename as...
9706 (declarations, declaration, grammar, grammar_declaration)
9707 (precedence_declaration, precedence_declarator): these.
9708 (symbol_declaration): New.
9709
9710 2002-06-14 Akim Demaille <akim@epita.fr>
9711
9712 * src/files.c (action_obstack): Remove, unused.
9713 (output_obstack): Remove it, and all its dependencies, as it is no
9714 longer needed.
9715 * src/reader.c (epilogue_set): Build the epilogue in the
9716 muscle_obstack.
9717 * src/output.h, src/output.c (muscle_obstack): Move to...
9718 * src/muscle_tab.h, src/muscle_tab.h: here.
9719 (muscle_init): Initialize muscle_obstack.
9720 (muscle_free): New.
9721 * src/main.c (main): Call it.
9722
9723 2002-06-14 Akim Demaille <akim@epita.fr>
9724
9725 * src/location.h: New, extracted from...
9726 * src/reader.h: here.
9727 * src/Makefile.am (noinst_HEADERS): Merge into
9728 (bison_SOURCES): this.
9729 Add location.h.
9730 * src/parse-gram.y: Use location_t instead of Bison's.
9731 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
9732 Use location_t instead of ints.
9733
9734 2002-06-14 Akim Demaille <akim@epita.fr>
9735
9736 * data/bison.simple, data/bison.c++: Be sure to restore the
9737 current #line when returning to the skeleton contents after having
9738 exposed the input file's #line.
9739
9740 2002-06-12 Akim Demaille <akim@epita.fr>
9741
9742 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
9743 eager.
9744 * tests/actions.at (Exotic Dollars): New.
9745
9746 2002-06-12 Akim Demaille <akim@epita.fr>
9747
9748 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
9749 ['"/] too eagerly.
9750 * tests/input.at (Torturing the Scanner): New.
9751
9752 2002-06-11 Akim Demaille <akim@epita.fr>
9753
9754 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
9755 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
9756 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
9757 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
9758 * src/reader.c (reader): Use it.
9759
9760 2002-06-11 Akim Demaille <akim@epita.fr>
9761
9762 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
9763 Adjust all callers.
9764 (scanner_last_string_free): New.
9765
9766 2002-06-11 Akim Demaille <akim@epita.fr>
9767
9768 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
9769 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
9770 (last_string, YY_OBS_FREE): New.
9771 Use them when returning an ID.
9772
9773 2002-06-11 Akim Demaille <akim@epita.fr>
9774
9775 Have Bison grammars parsed by a Bison grammar.
9776
9777 * src/reader.c, src/reader.h (prologue_augment): New.
9778 * src/reader.c (copy_definition): Remove.
9779
9780 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
9781 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
9782 (grammar_current_rule_prec_set, grammar_current_rule_check)
9783 (grammar_current_rule_symbol_append)
9784 (grammar_current_rule_action_append): Export.
9785 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
9786 (symbol_list_action_append): Remove.
9787 Hook the routines from reader.
9788 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
9789 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
9790
9791 * src/reader.c (read_declarations): Remove, unused.
9792
9793 * src/parse-gram.y: Handle the epilogue.
9794 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
9795 (grammar_start_symbol_set): this.
9796 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
9797 * src/reader.c (readgram): Remove, unused.
9798 (reader): Adjust to insert eoftoken and axiom where appropriate.
9799
9800 * src/reader.c (copy_dollar): Replace with...
9801 * src/scan-gram.h (handle_dollar): this.
9802 * src/parse-gram.y: Remove `%thong'.
9803
9804 * src/reader.c (copy_at): Replace with...
9805 * src/scan-gram.h (handle_at): this.
9806
9807 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
9808 New.
9809
9810 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
9811 time being.
9812
9813 * src/reader.h, src/reader.c (grammar_rule_end): New.
9814
9815 * src/parse.y (current_type, current_class): New.
9816 Implement `%nterm', `%token' support.
9817 Merge `%term' into `%token'.
9818 (string_as_id): New.
9819 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
9820 type name.
9821
9822 * src/parse-gram.y: Be sure to handle properly the beginning of
9823 rules.
9824
9825 * src/parse-gram.y: Handle %type.
9826 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
9827
9828 * src/parse-gram.y: More directives support.
9829 * src/options.c: No longer handle source directives.
9830
9831 * src/parse-gram.y: Fix %output.
9832
9833 * src/parse-gram.y: Handle %union.
9834 Use the prologue locations.
9835 * src/reader.c (parse_union_decl): Remove.
9836
9837 * src/reader.h, src/reader.c (epilogue_set): New.
9838 * src/parse-gram.y: Use it.
9839
9840 * data/bison.simple, data/bison.c++: b4_stype is now either not
9841 defined, then default to int, or to the contents of %union,
9842 without `union' itself.
9843 Adjust.
9844 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
9845
9846 * src/output.c (actions_output): Don't output braces, as they are
9847 already handled by the scanner.
9848
9849 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
9850 characters to themselves.
9851
9852 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
9853 that the epilogue has a proper #line.
9854
9855 * src/parse-gram.y: Handle precedence/associativity.
9856
9857 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
9858 a terminal.
9859 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
9860 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
9861 at all to define terminals that cannot be emitted.
9862
9863 * src/scan-gram.l: Escape M4 characters.
9864
9865 * src/scan-gram.l: Working properly with escapes in user
9866 strings/characters.
9867
9868 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
9869 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
9870 grammar.
9871 Use more modest sizes, as for the time being the parser does not
9872 release memory, and therefore the process swallows a huge amount
9873 of memory.
9874
9875 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
9876 stricter %token grammar.
9877
9878 * src/symtab.h (associativity): Add `undef_assoc'.
9879 (symbol_precedence_set): Do nothing when passed an undef_assoc.
9880 * src/symtab.c (symbol_check_alias_consistence): Adjust.
9881
9882 * tests/regression.at (Invalid %directive): Remove, as it is now
9883 meaningless.
9884 (Invalid inputs): Adjust to the new error messages.
9885 (Token definitions): The new grammar doesn't allow too many
9886 eccentricities.
9887
9888 * src/lex.h, src/lex.c: Remove.
9889 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
9890 (copy_character, copy_string2, copy_string, copy_identifier)
9891 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
9892 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
9893 (parse_action): Remove.
9894 * po/POTFILES.in: Adjust.
9895
9896 2002-06-11 Akim Demaille <akim@epita.fr>
9897
9898 * src/reader.c (parse_action): Don't store directly into the
9899 rule's action member: return the action as a string.
9900 Don't require `rule_length' as an argument: compute it.
9901 (grammar_current_rule_symbol_append)
9902 (grammar_current_rule_action_append): New, eved out from
9903 (readgram): here.
9904 Remove `action_flag', `rulelength', unused now.
9905
9906 2002-06-11 Akim Demaille <akim@epita.fr>
9907
9908 * src/reader.c (grammar_current_rule_prec_set).
9909 (grammar_current_rule_check): New, eved out from...
9910 (readgram): here.
9911 Remove `xaction', `first_rhs': useless.
9912 * tests/input.at (Type clashes): New.
9913 * tests/existing.at (GNU Cim Grammar): Adjust.
9914
9915 2002-06-11 Akim Demaille <akim@epita.fr>
9916
9917 * src/reader.c (grammar_midrule_action): New, Eved out from
9918 (readgram): here.
9919
9920 2002-06-11 Akim Demaille <akim@epita.fr>
9921
9922 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
9923 New.
9924 (readgram): Use them as replacement of inlined code, crule and
9925 crule1.
9926
9927 2002-06-11 Akim Demaille <akim@epita.fr>
9928
9929 * src/reader.c (grammar_end, grammar_symbol_append): New.
9930 (readgram): Use them.
9931 Make the use of `p' as local as possible.
9932
9933 2002-06-10 Akim Demaille <akim@epita.fr>
9934
9935 GCJ's parser requires the tokens to be defined before the prologue.
9936
9937 * data/bison.simple: Output the token definition before the user's
9938 prologue.
9939 * tests/regression.at (Braces parsing, Duplicate string)
9940 (Mixing %token styles): Check the output from bison.
9941 (Early token definitions): New.
9942
9943 2002-06-10 Akim Demaille <akim@epita.fr>
9944
9945 * src/symtab.c (symbol_user_token_number_set): Don't complain when
9946 assigning twice the same user number to a token, so that we can
9947 use it in...
9948 * src/lex.c (lex): here.
9949 Also use `symbol_class_set' instead of hand written code.
9950 * src/reader.c (parse_assoc_decl): Likewise.
9951
9952 2002-06-10 Akim Demaille <akim@epita.fr>
9953
9954 * src/symtab.c, src/symtab.c (symbol_class_set)
9955 (symbol_user_token_number_set): New.
9956 * src/reader.c (parse_token_decl): Use them.
9957 Use a switch instead of ifs.
9958 Use a single argument.
9959
9960 2002-06-10 Akim Demaille <akim@epita.fr>
9961
9962 Remove `%thong' support as it is undocumented, unused, duplicates
9963 `%token's job, and creates useless e-mail traffic with people who
9964 want to know what it is, why it is undocumented, unused, and
9965 duplicates `%token's job.
9966
9967 * src/reader.c (parse_thong_decl): Remove.
9968 * src/options.c (option_table): Remove "thong".
9969 * src/lex.h (tok_thong): Remove.
9970
9971 2002-06-10 Akim Demaille <akim@epita.fr>
9972
9973 * src/symtab.c, src/symtab.c (symbol_type_set)
9974 (symbol_precedence_set): New.
9975 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
9976 (value_components_used): Remove, unused.
9977
9978 2002-06-09 Akim Demaille <akim@epita.fr>
9979
9980 Move symbols handling code out of the reader.
9981
9982 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
9983 (axiom): Move to...
9984 * src/symtab.h, src/symtab.c: here.
9985
9986 * src/gram.c (start_symbol): Remove: use startsymbol->number.
9987 * src/reader.c (startval): Rename as...
9988 * src/symtab.h, src/symtab.c (startsymbol): this.
9989 * src/reader.c: Adjust.
9990
9991 * src/reader.c (symbol_check_defined, symbol_make_alias)
9992 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9993 (token_translations_init)
9994 Move to...
9995 * src/symtab.c: here.
9996 * src/reader.c (packsymbols): Move to...
9997 * src/symtab.h, src/symtab.c (symbols_pack): here.
9998 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
9999 argument.
10000
10001 2002-06-03 Akim Demaille <akim@epita.fr>
10002
10003 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10004 then statements.
10005
10006 2002-06-03 Akim Demaille <akim@epita.fr>
10007
10008 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10009 structs with non literals.
10010 * src/scan-skel.l: never-interactive.
10011 * src/conflicts.c (enum conflict_resolution_e): No trailing
10012 comma.
10013 * src/getargs.c (usage): Split long literal strings.
10014 Reported by Hans Aberg.
10015
10016 2002-05-28 Akim Demaille <akim@epita.fr>
10017
10018 * data/bison.c++: Use C++ ostreams.
10019 (cdebug_): New member.
10020
10021 2002-05-28 Akim Demaille <akim@epita.fr>
10022
10023 * src/output.c (output_skeleton): Be sure to allocate enough room
10024 for `/' _and_ for `\0' in full_skeleton.
10025
10026 2002-05-28 Akim Demaille <akim@epita.fr>
10027
10028 * data/bison.c++: Catch up with bison.simple:
10029 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10030 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10031 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10032 and popping traces.
10033
10034 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10035
10036 * src/output.c (output_skeleton): Put an explicit path in front of
10037 the skeleton file name, rather than relying on the -I directory,
10038 to partially alleviate effects of having a skeleton file lying around
10039 in the current directory.
10040
10041 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10042
10043 * src/conflicts.c (log_resolution): Correct typo:
10044 obstack_printf should be obstack_fgrow1.
10045
10046 2002-05-26 Akim Demaille <akim@epita.fr>
10047
10048 * src/state.h (state_t): `solved_conflicts' is a new member.
10049 * src/LR0.c (new_state): Set it to 0.
10050 * src/conflicts.h, src/conflicts.c (print_conflicts)
10051 (free_conflicts, solve_conflicts): Rename as...
10052 (conflicts_print, conflicts_free, conflicts_solve): these.
10053 Adjust callers.
10054 * src/conflicts.c (enum conflict_resolution_e)
10055 (solved_conflicts_obstack): New, used by...
10056 (log_resolution): this.
10057 Adjust to attach the conflict resolution to each state.
10058 Complete the description with the precedence/associativity
10059 information.
10060 (resolve_sr_conflict): Adjust.
10061 * src/print.c (print_state): Output its solved_conflicts.
10062 * tests/conflicts.at (Unresolved SR Conflicts)
10063 (Solved SR Conflicts): Exercise --report=all.
10064
10065 2002-05-26 Akim Demaille <akim@epita.fr>
10066
10067 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10068 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10069 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
10070 (token_number_t, item_number_as_token_number)
10071 (token_number_as_item_number, muscle_insert_token_number_table):
10072 Rename as...
10073 (symbol_number_t, item_number_as_symbol_number)
10074 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
10075 these, since it is more appropriate.
10076
10077 2002-05-26 Akim Demaille <akim@epita.fr>
10078
10079 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
10080 `Error:' lines.
10081 * data/bison.simple (yystos) [YYDEBUG]: New.
10082 (yyparse) [YYDEBUG]: Display the symbols which are popped during
10083 error recovery.
10084 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
10085
10086 2002-05-25 Akim Demaille <akim@epita.fr>
10087
10088 * doc/bison.texinfo (Debugging): Split into...
10089 (Tracing): this new section, its former contents, and...
10090 (Understanding): this new section.
10091 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
10092 by...
10093 (report_flag): this.
10094 Adjust all dependencies.
10095 (report_args, report_types, report_argmatch): New.
10096 (usage, getargs): Report/support -r, --report.
10097 * src/options.h
10098 (struct option_table_struct): Rename as..,
10099 (struct option_table_s): this.
10100 Rename the `set_flag' member to `flag' to match with getopt_long's
10101 struct.
10102 * src/options.c (option_table): Split verbose into an entry for
10103 %verbose, and another for --verbose.
10104 Support --report/-r, so remove -r from the obsolete --raw.
10105 * src/print.c: Attach full item sets and lookaheads reports to
10106 report_flag instead of trace_flag.
10107 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
10108
10109 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10110 and Paul Eggert <eggert@twinsun.com>
10111
10112 * data/bison.simple (yyparse): Correct error handling to conform to
10113 POSIX and yacc. Specifically, after syntax error is discovered,
10114 do not reduce further before shifting the error token.
10115 Clean up the code a bit by removing the labels yyerrdefault,
10116 yyerrhandle, yyerrpop.
10117 * NEWS: Document the above.
10118
10119 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10120
10121 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
10122 type; it isn't always big enough, since it doesn't necessarily
10123 include non-terminals.
10124 (yytranslate): Expand definition of yy_token_number_type, so that
10125 the latter can be removed.
10126 (yy_token_number_type): Remove, only one use.
10127 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
10128 don't use TokenNumberType as element type.
10129
10130 * tests/regression.at: Modify expected output to agree with change
10131 to yyr1 and yytranslate.
10132
10133 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
10134
10135 * src/reader.c (parse_action): Use copy_character instead of
10136 obstack_1grow.
10137
10138 2002-05-13 Akim Demaille <akim@epita.fr>
10139
10140 * tests/regression.at (Token definitions): Prototype yylex and
10141 yyerror.
10142
10143 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10144
10145 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
10146 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10147 32-bit arithmetic.
10148 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
10149
10150 2002-05-07 Akim Demaille <akim@epita.fr>
10151
10152 * tests/synclines.at: Be sure to prototype yylex and yyerror to
10153 avoid GCC warnings.
10154
10155 2002-05-07 Akim Demaille <akim@epita.fr>
10156
10157 Kill GCC warnings.
10158
10159 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
10160 over the RHS of each rule.
10161 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
10162 * src/state.h (state_t): Member `nitems' is unsigned short.
10163 * src/LR0.c (get_state): Adjust.
10164 * src/reader.c (packgram): Likewise.
10165 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
10166 `Type'.
10167 (muscle_insert_int_table): Remove, unused.
10168 (prepare_rules): Remove `max'.
10169
10170 2002-05-06 Akim Demaille <akim@epita.fr>
10171
10172 * src/closure.c (print_firsts): Display of the symbol tags.
10173 (bitmatrix_print): Move to...
10174 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
10175 here.
10176 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
10177
10178 2002-05-06 Akim Demaille <akim@epita.fr>
10179
10180 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
10181 hash_do_for_each.
10182
10183 2002-05-06 Akim Demaille <akim@epita.fr>
10184
10185 * src/LR0.c (new_state, get_state): Instead of using the global
10186 `kernel_size' and `kernel_base', have two new arguments:
10187 `core_size' and `core'.
10188 Adjust callers.
10189
10190 2002-05-06 Akim Demaille <akim@epita.fr>
10191
10192 * src/reader.c (packgram): No longer end `ritem' with a 0
10193 sentinel: it is not used.
10194
10195 2002-05-05 Akim Demaille <akim@epita.fr>
10196
10197 New experimental feature: display the lookaheads in the report and
10198 graph.
10199
10200 * src/print (print_core): When --trace-flag, display the rules
10201 lookaheads.
10202 * src/print_graph.c (print_core): Likewise.
10203 Swap the arguments.
10204 Adjust caller.
10205
10206 2002-05-05 Akim Demaille <akim@epita.fr>
10207
10208 * tests/torture.at (Many lookaheads): New test.
10209
10210 2002-05-05 Akim Demaille <akim@epita.fr>
10211
10212 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
10213 (GENERATE_MUSCLE_INSERT_TABLE): this.
10214 (output_int_table, output_unsigned_int_table, output_short_table)
10215 (output_token_number_table, output_item_number_table): Replace with...
10216 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
10217 (muscle_insert_short_table, muscle_insert_token_number_table)
10218 (muscle_insert_item_number_table): these.
10219 Adjust all callers.
10220 (prepare_tokens): Don't free `translations', since...
10221 * src/reader.h, src/reader.c (grammar_free): do it.
10222 Move to...
10223 * src/gram.h, src/gram.c (grammar_free): here.
10224 * data/bison.simple, data/bison.c++: b4_token_number_max is now
10225 b4_translate_max.
10226
10227 2002-05-05 Akim Demaille <akim@epita.fr>
10228
10229 * src/output.c (output_unsigned_int_table): New.
10230 (prepare_rules): `i' is unsigned.
10231 `prhs', `rline', `r2' are unsigned int.
10232 Rename muscle `rhs_number_max' as `rhs_max'.
10233 Output muscles `prhs_max', `rline_max', and `r2_max'.
10234 Free rline and r1.
10235 * data/bison.simple, data/bison.c++: Adjust to use these muscles
10236 to compute types instead of constant types.
10237 * tests/regression.at (Web2c Actions): Adjust.
10238
10239 2002-05-04 Akim Demaille <akim@epita.fr>
10240
10241 * src/symtab.h (SALIAS, SUNDEF): Rename as...
10242 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
10243 Adjust dependencies.
10244 * src/output.c (token_definitions_output): Be sure not to output a
10245 `#define 'a'' when fed with `%token 'a' "a"'.
10246 * tests/regression.at (Token definitions): New.
10247
10248 2002-05-03 Paul Eggert <eggert@twinsun.com>
10249
10250 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
10251 for K&R C.
10252
10253 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
10254
10255 * Makefile.am (SUBDIRS): Remove intl.
10256 (EXTRA_DIST): Add config/config.rpath.
10257
10258 2002-05-03 Akim Demaille <akim@epita.fr>
10259
10260 * data/bison.simple (m4_if): Don't output empty enums.
10261 And actually, output valid enum definitions :(.
10262
10263 2002-05-03 Akim Demaille <akim@epita.fr>
10264
10265 * configure.bat: Remove, completely obsolete.
10266 * Makefile.am (EXTRA_DIST): Adjust.
10267 Don't distribute config.rpath...
10268 * config/Makefile.am (EXTRA_DIST): Do it.
10269
10270 2002-05-03 Akim Demaille <akim@epita.fr>
10271
10272 * configure.in (GETTEXT_VERSION): New.
10273 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
10274
10275 2002-05-03 Akim Demaille <akim@epita.fr>
10276
10277 * data/bison.simple (b4_token_enum): New.
10278 (b4_token_defines): Use it to output tokens both as #define and
10279 enums.
10280 Suggested by Paul Eggert.
10281 * src/output.c (token_definitions_output): Don't output spurious
10282 white spaces.
10283
10284 2002-05-03 Akim Demaille <akim@epita.fr>
10285
10286 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10287
10288 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
10289
10290 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
10291 Update the stack class, give a try to deque as the default container.
10292
10293 2002-05-02 Akim Demaille <akim@epita.fr>
10294
10295 * data/bison.simple (yyparse): Do not implement @$ = @1.
10296 (YYLLOC_DEFAULT): Adjust to do it.
10297 * doc/bison.texinfo (Location Default Action): Fix.
10298
10299 2002-05-02 Akim Demaille <akim@epita.fr>
10300
10301 * src/reader.c (parse_braces): Merge into...
10302 (parse_action): this.
10303
10304 2002-05-02 Akim Demaille <akim@epita.fr>
10305
10306 * configure.in (ALL_LINGUAS): Remove.
10307 * po/LINGUAS, hr.po: New.
10308
10309 2002-05-02 Akim Demaille <akim@epita.fr>
10310
10311 Remove the so called hairy (semantic) parsers.
10312
10313 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
10314 * src/gram.h, src/gram.c (semantic_parser): Remove.
10315 (rule_t): Remove the guard and guard_line members.
10316 * src/lex.h (token_t): remove tok_guard.
10317 * src/options.c (option_table): Remove %guard and %semantic_parser
10318 support.
10319 * src/output.c, src/output.h (guards_output): Remove.
10320 (prepare): Adjust.
10321 (token_definitions_output): Don't output the `T'
10322 tokens (???).
10323 (output_skeleton): Don't output the guards.
10324 * src/files.c, src/files.c (attrsfile): Remove.
10325 * src/reader.c (symbol_list): Remove the guard and guard_line
10326 members.
10327 Adjust dependencies.
10328 (parse_guard): Remove.
10329 * data/bison.hairy: Remove.
10330 * doc/bison.texinfo (Environment Variables): Remove occurrences of
10331 BISON_HAIRY.
10332
10333 2002-05-02 Akim Demaille <akim@epita.fr>
10334
10335 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
10336 (parse_guard): Rename the formal argument `stack_offset' as
10337 `rule_length', which is more readable.
10338 Adjust callers.
10339 (copy_at, copy_dollar): Instead of outputting the hard coded
10340 values of $$, $n and so forth, output invocation to b4_lhs_value,
10341 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
10342 Note: this patch partially drops `semantic-parser' support: it
10343 always does `rule_length - n', where semantic parsers ought to
10344 always use `-n'.
10345 * data/bison.simple, data/bison.c++ (b4_lhs_value)
10346 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
10347
10348 2002-05-02 Akim Demaille <akim@epita.fr>
10349
10350 * configure.in (AC_INIT): Bump to 1.49b.
10351 (AM_INIT_AUTOMAKE): Short invocation.
10352
10353 2002-05-02 Akim Demaille <akim@epita.fr>
10354
10355 Version 1.49a.
10356
10357 2002-05-01 Akim Demaille <akim@epita.fr>
10358
10359 * src/skeleton.h: Remove.
10360
10361 2002-05-01 Akim Demaille <akim@epita.fr>
10362
10363 * src/skeleton.h: Fix the #endif.
10364 Reported by Magnus Fromreide.
10365
10366 2002-04-26 Paul Eggert <eggert@twinsun.com>
10367
10368 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
10369 Define if we define YYSTYPE and YYLTYPE, respectively.
10370 (YYCOPY): Fix [] quoting problem in the non-GCC case.
10371
10372 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
10373
10374 * src/scan-skel.l: Postprocess quadrigraphs.
10375
10376 * src/reader.c (copy_character): New function, used to output
10377 single characters while replacing `[' and `]' with quadrigraphs, to
10378 avoid troubles with M4 quotes.
10379 (copy_comment): Output characters with copy_character.
10380 (read_additionnal_code): Likewise.
10381 (copy_string2): Likewise.
10382 (copy_definition): Likewise.
10383
10384 * tests/calc.at: Exercise M4 quoting.
10385
10386 2002-04-25 Akim Demaille <akim@epita.fr>
10387
10388 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
10389 between `!' and the command.
10390 Reported by Paul Eggert.
10391
10392 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
10393
10394 * tests/calc.at: Exercise prologue splitting.
10395
10396 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
10397 `b4_post_prologue' instead of `b4_prologue'.
10398
10399 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
10400 muscles.
10401 (output): Free pre_prologue_obstack and post_prologue_obstack.
10402 * src/files.h, src/files.c (attrs_obstack): Remove.
10403 (pre_prologue_obstack, post_prologue_obstack): New.
10404 * src/reader.c (copy_definition): Add a parameter to specify the
10405 obstack to fill, instead of using attrs_obstack unconditionally.
10406 (read_declarations): Pass pre_prologue_obstack to copy_definition if
10407 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
10408
10409 2002-04-23 Paul Eggert <eggert@twinsun.com>
10410
10411 * data/bison.simple: Remove unnecessary commentary and white
10412 space differences from 1_29-branch.
10413 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
10414
10415 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
10416 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
10417 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10418 constructors or destructors.
10419
10420 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
10421
10422 2002-04-23 Akim Demaille <akim@epita.fr>
10423
10424 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
10425 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
10426 location with columns.
10427 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
10428 All reported by Paul Eggert.
10429
10430 2002-04-22 Akim Demaille <akim@epita.fr>
10431
10432 * src/reduce.c (dump_grammar): Move to...
10433 * src/gram.h, src/gram.c (grammar_dump): here.
10434 Be sure to separate long item numbers.
10435 Don't read the members of a rule's prec if its nil.
10436
10437 2002-04-22 Akim Demaille <akim@epita.fr>
10438
10439 * src/output.c (table_size, table_grow): New.
10440 (MAXTABLE): Remove, replace uses with table_size.
10441 (pack_vector): Instead of dying when the table is too big, grow it.
10442
10443 2002-04-22 Akim Demaille <akim@epita.fr>
10444
10445 * data/bison.simple (yyr1): Its type is that of a token number.
10446 * data/bison.c++ (r1_): Likewise.
10447 * tests/regression.at (Web2c Actions): Adjust.
10448
10449 2002-04-22 Akim Demaille <akim@epita.fr>
10450
10451 * src/reader.c (token_translations_init): 256 is now the default
10452 value for the error token, i.e., it will be assigned another
10453 number if the user assigned 256 to one of her tokens.
10454 (reader): Don't force 256 to error.
10455 * doc/bison.texinfo (Symbols): Adjust.
10456 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10457 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10458 etc. instead of 10, 20, 30 (which was used to `jump' over error
10459 (256) and undefined (2)).
10460
10461 2002-04-22 Akim Demaille <akim@epita.fr>
10462
10463 Propagate more token_number_t.
10464
10465 * src/gram.h (token_number_as_item_number)
10466 (item_number_as_token_number): New.
10467 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10468 Use it to create output_item_number_table and
10469 output_token_number_table.
10470 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10471 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10472 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10473 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10474
10475 2002-04-22 Akim Demaille <akim@epita.fr>
10476
10477 * src/output.h, src/output.c (get_lines_number): Remove.
10478
10479 2002-04-19 Akim Demaille <akim@epita.fr>
10480
10481 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10482 as Lex/Flex'.
10483 (Debugging): More details about enabling the debugging features.
10484 (Table of Symbols): Describe $$, $n, @$, and @n.
10485 Suggested by Tim Josling.
10486
10487 2002-04-19 Akim Demaille <akim@epita.fr>
10488
10489 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10490
10491 2002-04-10 Akim Demaille <akim@epita.fr>
10492
10493 * src/system.h: Rely on HAVE_LIMITS_H.
10494 Suggested by Paul Eggert.
10495
10496 2002-04-09 Akim Demaille <akim@epita.fr>
10497
10498 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
10499 full stderr, and strip it according to the bison options, instead
10500 of composing the error message from different bits.
10501 This makes it easier to check for several error messages.
10502 Adjust all the invocations.
10503 Add an invocation exercising the error token.
10504 Add an invocation demonstrating a stupid error message.
10505 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
10506 Adjust the tests.
10507 Error message are for stderr, not stdout.
10508
10509 2002-04-09 Akim Demaille <akim@epita.fr>
10510
10511 * src/gram.h, src/gram.c (error_token_number): Remove, use
10512 errtoken->number.
10513 * src/reader.c (reader): Don't specify the user token number (2)
10514 for $undefined, as it uselessly prevents using it.
10515 * src/gram.h (token_number_t): Move to...
10516 * src/symtab.h: here.
10517 (state_t.number): Is a token_number_t.
10518 * src/print.c, src/reader.c: Use undeftoken->number instead of
10519 hard coded 2.
10520 (Even though this 2 is not the same as above: the number of the
10521 undeftoken remains being 2, it is its user token number which
10522 might not be 2).
10523 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
10524 `user_token_number_max'.
10525 Output `undef_token_number'.
10526 * data/bison.simple, data/bison.c++: Use them.
10527 Be sure to map invalid yylex return values to
10528 `undef_token_number'. This saves us from gratuitous SEGV.
10529
10530 * tests/conflicts.at (Solved SR Conflicts)
10531 (Unresolved SR Conflicts): Adjust.
10532 * tests/regression.at (Web2c Actions): Adjust.
10533
10534 2002-04-08 Akim Demaille <akim@epita.fr>
10535
10536 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
10537 Adding #line.
10538 Remove the duplicate `typedefs'.
10539 (RhsNumberType): Fix the declaration and various other typos.
10540 Use __ofile__.
10541 * data/bison.simple: Use __ofile__.
10542 * src/scan-skel.l: Handle __ofile__.
10543
10544 2002-04-08 Akim Demaille <akim@epita.fr>
10545
10546 * src/gram.h (item_number_t): New, the type of item numbers in
10547 RITEM. Note that it must be able to code symbol numbers as
10548 positive number, and the negation of rule numbers as negative
10549 numbers.
10550 Adjust all dependencies (pretty many).
10551 * src/reduce.c (rule): Remove this `short *' pointer: use
10552 item_number_t.
10553 * src/system.h (MINSHORT, MAXSHORT): Remove.
10554 Include `limits.h'.
10555 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
10556 (shortcpy): Remove.
10557 (MAXTABLE): Move to...
10558 * src/output.c (MAXTABLE): here.
10559 (prepare_rules): Use output_int_table to output rhs.
10560 * data/bison.simple, data/bison.c++: Adjust.
10561 * tests/torture.at (Big triangle): Move the limit from 254 to
10562 500.
10563 * tests/regression.at (Web2c Actions): Ajust.
10564
10565 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
10566 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
10567 passes, but produces negative #line number, once fixed, GCC is
10568 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
10569 C), it passes.
10570 * src/state.h (state_h): Code input lines on ints, not shorts.
10571
10572 2002-04-08 Akim Demaille <akim@epita.fr>
10573
10574 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
10575 and then the grammar.
10576
10577 2002-04-08 Akim Demaille <akim@epita.fr>
10578
10579 * src/system.h: No longer using strndup.
10580
10581 2002-04-07 Akim Demaille <akim@epita.fr>
10582
10583 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
10584 * src/output.c (output_table_data): Return the longest number.
10585 (prepare_tokens): Output `token_number_max').
10586 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
10587 New.
10588 Use them to define yy_token_number_type/TokenNumberType.
10589 Use this type for yytranslate.
10590 * tests/torture.at (Big triangle): Push the limit from 124 to
10591 253.
10592 * tests/regression.at (Web2c Actions): Adjust.
10593
10594 2002-04-07 Akim Demaille <akim@epita.fr>
10595
10596 * tests/torture.at (Big triangle): New.
10597 (GNU AWK Grammar, GNU Cim Grammar): Move to...
10598 * tests/existing.at: here.
10599
10600 2002-04-07 Akim Demaille <akim@epita.fr>
10601
10602 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
10603 nritems.
10604 Adjust dependencies.
10605
10606 2002-04-07 Akim Demaille <akim@epita.fr>
10607
10608 * src/reader.c: Normalize increments to prefix form.
10609
10610 2002-04-07 Akim Demaille <akim@epita.fr>
10611
10612 * src/reader.c, symtab.c: Remove debugging code.
10613
10614 2002-04-07 Akim Demaille <akim@epita.fr>
10615
10616 Rename all the `bucket's as `symbol_t'.
10617
10618 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
10619 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
10620 * src/symtab.c, src/symtab.h (bucket): Rename as...
10621 (symbol_t): this.
10622 (symbol_list_new, bucket_check_defined, bucket_make_alias)
10623 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
10624 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10625 (buckets_new, buckets_free, buckets_do): Rename as...
10626 (symbol_list_new, symbol_check_defined, symbol_make_alias)
10627 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10628 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
10629 (symbols_new, symbols_free, symbols_do): these.
10630
10631 2002-04-07 Akim Demaille <akim@epita.fr>
10632
10633 Use lib/hash for the symbol table.
10634
10635 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
10636 EOF.
10637 * src/lex.c (lex): Set the `number' member of new terminals.
10638 * src/reader.c (bucket_check_defined, bucket_make_alias)
10639 (bucket_check_alias_consistence, bucket_translation): New.
10640 (reader, grammar_free, readgram, token_translations_init)
10641 (packsymbols): Adjust.
10642 (reader): Number the predefined tokens.
10643 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
10644 for predefined tokens.
10645 * src/symtab.h (bucket): Remove all the hash table related
10646 members.
10647 * src/symtab.c (symtab): Replace by...
10648 (bucket_table): this.
10649 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10650 (buckets_new, buckets_do): New.
10651
10652 2002-04-07 Akim Demaille <akim@epita.fr>
10653
10654 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
10655 (start_symbol, max_user_token_number, semantic_parser)
10656 (error_token_number): Initialize.
10657 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
10658 Initialize.
10659 (reader): Don't.
10660 (errtoken, eoftoken, undeftoken, axiom): Extern.
10661
10662 2002-04-07 Akim Demaille <akim@epita.fr>
10663
10664 * src/gram.h (rule_s): prec and precsym are now pointers
10665 to the bucket giving the priority/associativity.
10666 Member `associativity' removed: useless.
10667 * src/reduce.c, src/conflicts.c: Adjust.
10668
10669 2002-04-07 Akim Demaille <akim@epita.fr>
10670
10671 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10672 Properly escape the symbols' TAG when outputting them.
10673
10674 2002-04-07 Akim Demaille <akim@epita.fr>
10675
10676 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10677
10678 2002-04-07 Akim Demaille <akim@epita.fr>
10679
10680 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10681 (LArule): this, which is an array to rule_t*.
10682 * src/print.c, src/conflicts.c: Adjust.
10683
10684 2002-04-07 Akim Demaille <akim@epita.fr>
10685
10686 * src/gram.h (rule_t): Rename `number' as `user_number'.
10687 `number' is a new member.
10688 Adjust dependencies.
10689 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10690
10691 2002-04-07 Akim Demaille <akim@epita.fr>
10692
10693 As a result of the previous patch, it is no longer needed
10694 to reorder ritem itself.
10695
10696 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10697
10698 2002-04-07 Akim Demaille <akim@epita.fr>
10699
10700 Be sure never to walk through RITEMS, but use only data related to
10701 the rules themselves. RITEMS should be banished.
10702
10703 * src/output.c (output_token_translations): Rename as...
10704 (prepare_tokens): this.
10705 In addition to `translate', prepare the muscles `tname' and
10706 `toknum', which were handled by...
10707 (output_rule_data): this.
10708 Remove, and move the remainder of its outputs into...
10709 (prepare_rules): this new routines, which also merges content from
10710 (output_gram): this.
10711 (prepare_rules): Be sure never to walk through RITEMS.
10712 (output_stos): Rename as...
10713 (prepare_stos): this.
10714 (output): Always invoke prepare_states, after all, just don't use it
10715 in the output if you don't need it.
10716
10717 2002-04-07 Akim Demaille <akim@epita.fr>
10718
10719 * src/LR0.c (new_state): Display `nstates' as the name of the
10720 newly created state.
10721 Adjust to initialize first_state and last_state if needed.
10722 Be sure to distinguish the initial from the final state.
10723 (new_states): Create the itemset of the initial state, and use
10724 new_state.
10725 * src/closure.c (closure): Now that the initial state has its
10726 items properly set, there is no need for a special case when
10727 creating `ruleset'.
10728
10729 As a result, now the rule 0, reducing to $axiom, is visible in the
10730 outputs. Adjust the test suite.
10731
10732 * tests/conflicts.at (Solved SR Conflicts)
10733 (Unresolved SR Conflicts): Adjust.
10734 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
10735 * tests/conflicts.at (S/R in initial): New.
10736
10737 2002-04-07 Akim Demaille <akim@epita.fr>
10738
10739 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
10740 the RHS of the rules.
10741 * src/output.c (output_gram): Likewise.
10742
10743 2002-04-07 Akim Demaille <akim@epita.fr>
10744
10745 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
10746 bucket.
10747 Adjust all dependencies.
10748 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
10749 `number' of the buckets too.
10750 * src/gram.h: Include `symtab.h'.
10751 (associativity): Move to...
10752 * src/symtab.h: here.
10753 No longer include `gram.h'.
10754
10755 2002-04-07 Akim Demaille <akim@epita.fr>
10756
10757 * src/gram.h, src/gram.c (rules_rhs_length): New.
10758 (ritem_longest_rhs): Use it.
10759 * src/gram.h (rule_t): `number' is a new member.
10760 * src/reader.c (packgram): Set it.
10761 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
10762 the end of `rules', and count them out of `nrules'.
10763 (reduce_output, dump_grammar): Adjust.
10764 * src/print.c (print_grammar): It is no longer needed to check for
10765 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
10766 * tests/reduce.at (Reduced Automaton): New test.
10767
10768 2002-04-07 Akim Demaille <akim@epita.fr>
10769
10770 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
10771 lacking `+ 1' to nrules, Bison reported as useless a token if it
10772 was used solely to set the precedence of the last rule...
10773
10774 2002-04-07 Akim Demaille <akim@epita.fr>
10775
10776 * data/bison.c++, data/bison.simple: Don't output the current file
10777 name in #line, to avoid useless diffs between two identical
10778 outputs under different names.
10779
10780 2002-04-07 Akim Demaille <akim@epita.fr>
10781
10782 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
10783 Normalize loops to using `< nrules + 1', not `<= nrules'.
10784
10785 2002-04-07 Akim Demaille <akim@epita.fr>
10786
10787 * TODO: Update.
10788
10789 2002-04-07 Akim Demaille <akim@epita.fr>
10790
10791 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
10792 bucket.value as bucket.number.
10793
10794 2002-04-07 Akim Demaille <akim@epita.fr>
10795
10796 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
10797 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10798 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
10799 RHS, instead of being an index in RITEMS.
10800
10801 2002-04-04 Paul Eggert <eggert@twinsun.com>
10802
10803 * doc/bison.texinfo: Update copyright date.
10804 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
10805 (Symbols): Warn about running Bison in one character set,
10806 but compiling and/or running in an incompatible one.
10807 Warn about character code 256, too.
10808
10809 2002-04-03 Paul Eggert <eggert@twinsun.com>
10810
10811 * src/bison.data (YYSTACK_ALLOC): Depend on whether
10812 YYERROR_VERBOSE is nonzero, not whether it is defined.
10813
10814 Merge changes from bison-1_29-branch.
10815
10816 2002-03-20 Paul Eggert <eggert@twinsun.com>
10817
10818 Merge fixes from Debian bison_1.34-1.diff.
10819
10820 * configure.in (AC_PREREQ): 2.53.
10821
10822 2002-03-20 Akim Demaille <akim@epita.fr>
10823
10824 * src/conflicts.c (log_resolution): Argument `resolution' is const.
10825
10826 2002-03-19 Paul Eggert <eggert@twinsun.com>
10827
10828 * src/bison.simple (YYCOPY): New macro.
10829 (YYSTACK_RELOCATE): Use it.
10830 Remove Type arg; no longer needed. All callers changed.
10831 (yymemcpy): Remove; no longer needed.
10832
10833 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
10834 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10835
10836 2002-03-19 Akim Demaille <akim@epita.fr>
10837
10838 Test and fix the #line outputs.
10839
10840 * tests/atlocal.at (GCC): New.
10841 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
10842 (Prologue synch line, %union synch line, Postprologue synch line)
10843 (Action synch line, Epilogue synch line): New tests.
10844 * src/reader.c (parse_union_decl): Define the muscle stype_line.
10845 * data/bison.simple, data/bison.c++: Use it.
10846
10847 2002-03-19 Akim Demaille <akim@epita.fr>
10848
10849 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
10850 (Solved SR Conflicts, %expect not enough, %expect right)
10851 (%expect too much): Move to...
10852 * tests/conflicts.at: this new file.
10853
10854 2002-03-19 Akim Demaille <akim@epita.fr>
10855
10856 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10857 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
10858 that we can move to enums for instance.
10859 * src/output.c (token_definitions_output): Output a list of
10860 `token-name, token-number' instead of the #define.
10861 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
10862
10863 2002-03-14 Akim Demaille <akim@epita.fr>
10864
10865 Use Gettext 0.11.1.
10866
10867 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
10868
10869 * data/bison.c++: Make the user able to add members to the generated
10870 parser by subclassing.
10871
10872 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
10873
10874 * src/reader.c (read_additionnal_code): `c' should be an integer, not
10875 a character.
10876 Reported by Nicolas Tisserand and Nicolas Burrus.
10877
10878 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10879
10880 * src/reader.c: Warn about lacking semi-colons, do not complain.
10881
10882 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10883
10884 * data/bison.c++: Remove a debug line.
10885
10886 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10887
10888 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
10889 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
10890 provide a default implementation.
10891
10892 2002-03-04 Akim Demaille <akim@epita.fr>
10893
10894 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
10895 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
10896 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
10897 * tests/semantic.at (Parsing Guards): Similarly.
10898 * src/reader.at (readgram): Complain if the last rule is not ended
10899 with a semi-colon.
10900
10901 2002-03-04 Akim Demaille <akim@epita.fr>
10902
10903 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
10904 * src/closure.c: here.
10905 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
10906 RTC.
10907 * src/warshall.h, src/warshall.c: Remove.
10908 * tests/sets.at (Broken Closure): Adjust.
10909
10910 2002-03-04 Akim Demaille <akim@epita.fr>
10911
10912 * src/output.c (output_skeleton): tempdir is const.
10913 bytes_read is unused.
10914
10915 2002-03-04 Akim Demaille <akim@epita.fr>
10916
10917 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10918 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
10919 Update.
10920 From Michael Hayes.
10921
10922 2002-03-04 Akim Demaille <akim@epita.fr>
10923
10924 * src/closure.c (closure): `r' is unused.
10925
10926 2002-03-04 Akim Demaille <akim@epita.fr>
10927
10928 * tests/sets.at (Broken Closure): Add the ending `;'.
10929 * src/reader.at (readgram): Complain if a rule is not ended with a
10930 semi-colon.
10931
10932 2002-03-04 Akim Demaille <akim@epita.fr>
10933
10934 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
10935 (count_sr_conflicts): Use bitset_count.
10936 * src/reduce.c (inaccessable_symbols): Ditto.
10937 (bits_size): Remove.
10938 * src/warshall.h, src/warshall.c: Convert to bitsetv.
10939
10940 2002-03-04 Akim Demaille <akim@epita.fr>
10941
10942 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
10943 * src/reduce.c: Remove the `bitset_zero's following the
10944 `bitset_create's, as now it is performed by the latter.
10945
10946 2002-03-04 Akim Demaille <akim@epita.fr>
10947
10948 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
10949 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
10950 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
10951 latest sources from Michael.
10952
10953 2002-03-04 Akim Demaille <akim@epita.fr>
10954
10955 * src/output.c (output): Don't free the grammar.
10956 * src/reader.c (grammar_free): New.
10957 * src/main.c (main): Call it and don't free symtab here.
10958
10959 2002-03-04 Akim Demaille <akim@epita.fr>
10960
10961 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
10962 before returning.
10963 Reported by Benoit Perrot.
10964
10965 2002-03-04 Akim Demaille <akim@epita.fr>
10966
10967 Use bitset operations when possible, not loops over bits.
10968
10969 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
10970 bitset_or.
10971 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
10972 * src/reduce.c (useless_nonterminals): Formatting changes.
10973 * src/warshall.c (TC): Use bitset_or.
10974
10975 2002-03-04 Akim Demaille <akim@epita.fr>
10976
10977 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
10978 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
10979 Ditto.
10980
10981 2002-03-04 Akim Demaille <akim@epita.fr>
10982
10983 * src/lalr.c (F): Now a bitset*.
10984 Adjust all dependencies.
10985
10986 2002-03-04 Akim Demaille <akim@epita.fr>
10987
10988 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
10989 Adjust all dependencies.
10990
10991 2002-03-04 Akim Demaille <akim@epita.fr>
10992
10993 * src/L0.c, src/LR0.h (nstates): Be size_t.
10994 Adjust comparisons (signed vs unsigned).
10995 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
10996 bitset*.
10997 Adjust all dependencies.
10998
10999 2002-03-04 Akim Demaille <akim@epita.fr>
11000
11001 * src/closure.c (firsts): Now, also a bitset.
11002 Adjust all dependencies.
11003 (varsetsize): Remove, now unused.
11004 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11005
11006 2002-03-04 Akim Demaille <akim@epita.fr>
11007
11008 * src/print.c: Convert to use bitset.h, not hand coded iterations
11009 over ints.
11010
11011 2002-03-04 Akim Demaille <akim@epita.fr>
11012
11013 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11014
11015 2002-03-04 Akim Demaille <akim@epita.fr>
11016
11017 * src/closure.c (ruleset): Be a bitset.
11018 (rulesetsize): Remove.
11019
11020 2002-03-04 Akim Demaille <akim@epita.fr>
11021
11022 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11023 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11024 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11025 * src/closure.c (fderives): Be an array of bitsets.
11026
11027 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
11028
11029 * data/bison.c++: Merge the two generated headers. Insert a copyright
11030 notice in each output file.
11031
11032 2002-02-28 Akim Demaille <akim@epita.fr>
11033
11034 * data/bison.c++: Copy the prologue of bison.simple to fetch
11035 useful M4 definitions, such as b4_header_guard.
11036
11037 2002-02-25 Akim Demaille <akim@epita.fr>
11038
11039 * src/getargs.c (version): Give the name of the authors, and use a
11040 translator friendly scheme for the bgr
11041 copyright notice.
11042
11043 2002-02-25 Akim Demaille <akim@epita.fr>
11044
11045 * src/output.c (header_output): Remove, now handled completely via
11046 M4.
11047
11048 2002-02-25 Akim Demaille <akim@epita.fr>
11049
11050 * m4/m4.m4: New, from CVS Autoconf.
11051 * configure.in: Invoke it.
11052 * src/output.c (output_skeleton): Use its result instead of the
11053 hard coded name.
11054
11055 2002-02-25 Akim Demaille <akim@epita.fr>
11056
11057 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
11058 Fileutils 4.1.5.
11059 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
11060 * src/output.c (output_skeleton): Use mkstemp to create a real
11061 temporary file.
11062 Move the filling of `skeleton' and its muscle to...
11063 (prepare): here.
11064 (output): Move the definition of the prologue muscle to...
11065 (prepare): here.
11066 * src/system.h (DEFAULT_TMPDIR): New.
11067
11068 2002-02-14 Paul Eggert <eggert@twinsun.com>
11069
11070 Remove the support for C++ namespace cleanliness; it was
11071 causing more problems than it was curing, since it didn't work
11072 properly on some nonstandard C++ compilers. This can wait
11073 for a proper C++ parser.
11074
11075 * NEWS: Document this.
11076 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
11077 of C++, as it's treated like C now.
11078 * src/bison.simple (YYSTD): Remove.
11079 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
11080 Treat C++ just like Standard C instead of trying to support
11081 namespace cleanliness.
11082
11083 2002-02-14 Akim Demaille <akim@epita.fr>
11084
11085 * tests/regression.at (else): Adjust to Andreas' change.
11086
11087 2002-02-14 Akim Demaille <akim@epita.fr>
11088
11089 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
11090
11091 2002-02-13 Andreas Schwab <schwab@suse.de>
11092
11093 * src/output.c (output_rule_data): Don't output NULL, it might
11094 not be defined yet.
11095
11096 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
11097
11098 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
11099 (Copyright notice): Update.
11100
11101 2002-02-11 Akim Demaille <akim@epita.fr>
11102
11103 * tests/regression.at (%nonassoc and eof): Don't include
11104 nonportable headers.
11105
11106 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
11107
11108 * data/bison.c++: Correct error recovery. Make the user able to
11109 initialize the starting location.
11110
11111 2002-02-07 Akim Demaille <akim@epita.fr>
11112
11113 * tests/input.at: New.
11114
11115 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11116
11117 * data/bison.c++: Replace some direct m4 expansions by constants. Be
11118 more consistent when naming methods and variables. Put preprocessor
11119 directives around tables only needed for debugging.
11120
11121 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11122
11123 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
11124 C++ parsers.
11125 (yy::b4_name::parse): Use print_.
11126
11127 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11128
11129 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
11130
11131 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
11132
11133 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
11134 C++ parsers.
11135 (yy::b4_name::parse): Build verbose error messages, and use error_.
11136
11137 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
11138
11139 * data/bison.c++: Fix m4 quoting in comments.
11140
11141 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
11142
11143 * data/bison.c++: Adjust the parser code. Fix some muscles that were
11144 not expanded by m4.
11145
11146 2002-02-05 Akim Demaille <akim@epita.fr>
11147
11148 * data/bison.c++: Adjust to the M4 back end.
11149 More is certainly needed.
11150
11151 2002-02-05 Akim Demaille <akim@epita.fr>
11152
11153 Give a try to M4 as a back end.
11154
11155 * lib/readpipe.c: New, from wdiff.
11156 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
11157 BISON_HAIRY.
11158 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
11159 specific values. Now it is m4 that performs the lookup.
11160 * src/parse-skel.y: Remove.
11161 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
11162 * src/output.c (actions_output, guards_output)
11163 (token_definitions_output): No longer keeps track of the output
11164 line number, hence remove the second argument.
11165 (guards_output): Check against the guard member of a rule, not the
11166 action member.
11167 Adjust callers.
11168 (output_skeleton): Don't look for the skeleton location, let m4 do
11169 that.
11170 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
11171 file will be used.
11172 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
11173 (prepare): Given that for the time being changesyntax is not
11174 usable in M4, rename the muscles using `-' to `_'.
11175 Define `defines_flag', `output_parser_name' and `output_header_name'.
11176 * src/output.h (actions_output, guards_output)
11177 (token_definitions_output): Adjust prototypes.
11178 * src/scan-skel.l: Instead of scanning the skeletons, it now
11179 processes the output of m4: `__oline__' and `#output'.
11180 * data/bison.simple: Adjust to be used by M4(sugar).
11181 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
11182 to date.
11183 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
11184 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
11185 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
11186 shamelessly stolen from CVS Autoconf.
11187
11188 2002-02-05 Akim Demaille <akim@epita.fr>
11189
11190 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
11191 * configure.in: Check for the declarations of free and malloc.
11192 * src/muscle_tab.c: Adjust.
11193
11194 2002-02-05 Akim Demaille <akim@epita.fr>
11195
11196 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
11197 which have no values.
11198
11199 2002-02-05 Akim Demaille <akim@epita.fr>
11200
11201 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
11202 * data/: here.
11203
11204 2002-01-29 Paul Eggert <eggert@twinsun.com>
11205
11206 * src/bison.simple (YYSIZE_T): Do not define merely because
11207 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
11208 On some platforms, <alloca.h> does not declare YYSTD (size_t).
11209
11210 2002-01-27 Akim Demaille <akim@epita.fr>
11211
11212 Fix `%nonassoc and eof'.
11213
11214 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
11215 which were not properly copied! Replace
11216 memcpy (res->errs, src->errs, src->nerrs);
11217 with
11218 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
11219 !!!
11220 * tests/regression.at (%nonassoc and eof): Adjust to newest
11221 Autotest: `.' is not in the PATH.
11222
11223 2002-01-27 Akim Demaille <akim@epita.fr>
11224
11225 * tests/sets.at (AT_EXTRACT_SETS): New.
11226 (Nullable): Use it.
11227 (Firsts): New.
11228
11229 2002-01-26 Akim Demaille <akim@epita.fr>
11230
11231 * tests/actions.at, tests/calc.at, tests/headers.at,
11232 * tests/torture.at: Adjust to the newest Autotest which no longer
11233 forces `.' in the PATH.
11234
11235 2002-01-25 Akim Demaille <akim@epita.fr>
11236
11237 * tests/regression.at (%nonassoc and eof): New.
11238 Suggested by Robert Anisko.
11239
11240 2002-01-24 Akim Demaille <akim@epita.fr>
11241
11242 Bison dumps core when trying to complain about broken input files.
11243 Reported by Cris van Pelt.
11244
11245 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
11246 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
11247 into...
11248 (Invalid inputs): Strengthen: exercise parse_percent_token.
11249
11250 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
11251
11252 * src/Makefile.am: Add bison.c++.
11253 * src/bison.c++: New skeleton.
11254
11255 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
11256
11257 * po/it.po: New.
11258
11259 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
11260
11261 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
11262
11263 2002-01-20 Marc Autret <marc@gnu.org>
11264
11265 * src/files.c (compute_output_file_names): Fix
11266
11267 2002-01-20 Marc Autret <marc@gnu.org>
11268
11269 * tests/output.at: New test.
11270 * src/files.c (compute_base_names): Don't map extensions when
11271 the YACC flag is set, use defaults.
11272 Reported by Evgeny Stambulchik.
11273
11274 2002-01-20 Marc Autret <marc@gnu.org>
11275
11276 * src/system.h: Need to define __attribute__ away for non-GCC
11277 compilers as well (i.e., the vendor C compiler).
11278 Suggested by Albert Chin-A-Young.
11279
11280 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
11281
11282 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
11283 canonical definition.
11284 * src/system.h: Use the canonical definition for PARAMS (avoids
11285 a conflict with the macro from lib/hash.h).
11286
11287 2002-01-11 Akim Demaille <akim@epita.fr>
11288
11289 * configure.in: Use AC_FUNC_STRNLEN.
11290 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
11291
11292 2002-01-09 Akim Demaille <akim@epita.fr>
11293
11294 * src/files.c, src/files.h (output_infix): New.
11295 (tab_extension): Remove.
11296 (compute_base_names): Compute the former, drop the latter.
11297 * src/output.c (prepare): Insert the muscles `output-infix', and
11298 `output-suffix'.
11299 * src/parse-skel.y (string, string.1): New.
11300 (section.header): Use it.
11301 (section.yacc): Remove.
11302 (prefix): Remove too.
11303 * src/scan-skel.l: Adjust.
11304 * src/bison.simple, src/bison.hairy: Adjust.
11305
11306 2002-01-09 Akim Demaille <akim@epita.fr>
11307
11308 * configure.in (WERROR_CFLAGS): Compute it.
11309 * src/Makefile.am (CFLAGS): Pass it.
11310 * tests/atlocal.in (CFLAGS): Idem.
11311 * src/files.c: Fix a few warnings.
11312 (get_extension_index): Remove, unused.
11313
11314 2002-01-08 Akim Demaille <akim@epita.fr>
11315
11316 * src/getargs.c (AS_FILE_NAME): New.
11317 (getargs): Use it to convert DOSish file names.
11318 * src/files.c (base_name): Rename as full_base_name to avoid
11319 clashes with `base_name ()'.
11320 (filename_split): New.
11321 (compute_base_names): N-th rewrite, using filename_split.
11322
11323 2002-01-08 Akim Demaille <akim@epita.fr>
11324
11325 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
11326 New, stolen from the Fileutils 4.1.
11327 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11328 * configure.in: Check for the presence of memrchr, and of its
11329 prototype.
11330
11331 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
11332
11333 * lib/hash.h (__P): Added definition for this macro.
11334 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
11335 BUILT_SOURCES, to ensure they are generated first.
11336 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
11337 %error-verbose to allow bootstrapping with bison 1.30x.
11338
11339 2002-01-06 Akim Demaille <akim@epita.fr>
11340
11341 * src/reader.c (parse_braces): Don't fetch the next char, the
11342 convention is to fetch on entry.
11343 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
11344 'switch' without a following semicolon.
11345 * tests/regression.at (braces parsing): New.
11346
11347 2002-01-06 Akim Demaille <akim@epita.fr>
11348
11349 Bison is dead wrong in its RR conflict reports.
11350
11351 * tests/torture.at (GNU Cim Grammar): New.
11352 * src/conflicts.c (count_rr_conflicts): Fix.
11353
11354 2002-01-06 Akim Demaille <akim@epita.fr>
11355
11356 Creating package.m4 from configure.ac causes too many problems.
11357
11358 * tests/Makefile.am (package.m4): Create it by hand,
11359 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
11360
11361 2002-01-06 Akim Demaille <akim@epita.fr>
11362
11363 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
11364 skeleton.h.
11365
11366 2002-01-04 Paul Eggert <eggert@twinsun.com>
11367
11368 * doc/bison.texinfo (Debugging):
11369 Remove YYSTDERR; it's no longer defined or used.
11370 Also, s/cstdio.h/cstdio/.
11371
11372 2002-01-03 Akim Demaille <akim@epita.fr>
11373
11374 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
11375
11376 2002-01-03 Akim Demaille <akim@epita.fr>
11377
11378 * src/parse-skel.y (process_skeleton): Don't bind the parser's
11379 tracing code to --trace, wait for a better --trace option, with
11380 args.
11381
11382 2002-01-03 Akim Demaille <akim@epita.fr>
11383
11384 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
11385 The ISO C++ standard is extremely clear about it: stderr is
11386 considered a macro, not a regular symbol (see table 94 `Header
11387 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
11388 Therefore std:: does not apply to it. It still does with fprintf.
11389 Also, s/cstdio.h/cstdio/.
11390
11391 2002-01-03 Akim Demaille <akim@epita.fr>
11392
11393 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
11394 for non system headers.
11395
11396 2002-01-02 Akim Demaille <akim@epita.fr>
11397
11398 Equip the skeleton chain with location tracking, runtime trace,
11399 pure parser and scanner.
11400
11401 * src/parse-skel.y: Request a pure parser, locations, and prefix
11402 renaming.
11403 (%union): Having several members with the same type does not help
11404 type mismatches, simplify.
11405 (YYPRINT, yyprint): New.
11406 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
11407 (skel_error): this.
11408 Handle locations.
11409 * src/scan-skel.l: Adjust to these changes.
11410 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
11411 (LOCATION_PRINT, skel_control_t): New.
11412
11413 2001-12-30 Akim Demaille <akim@epita.fr>
11414
11415 * src/parse-skel.y: Get rid of the shift/reduce conflict:
11416 replace `gb' with BLANKS.
11417 * src/scan-skel.l: Adjust.
11418
11419 2001-12-30 Akim Demaille <akim@epita.fr>
11420
11421 * src/system.h: We don't need nor want bcopy.
11422 Throw away MS-DOS crap: we don't need getpid.
11423 * configure.in: We don't need strndup. It was even causing
11424 problems: because Flex includes the headers *before* us,
11425 _GNU_SOURCE is not defined by config.h, and therefore strndup was
11426 not visible.
11427 * lib/xstrndup.c: New.
11428 * src/scan-skel.l: Use it.
11429 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11430 * src/parse-skel.y: Use %directives instead of #defines.
11431
11432 2001-12-30 Akim Demaille <akim@epita.fr>
11433
11434 * src/skeleton.h: New.
11435 * src/output.c (output_parser, output_master_parser): Remove, dead
11436 code.
11437 * src/output.h (get_lines_number, actions_output, guards_output)
11438 (token_definitions_output): Prototype them.
11439 * src/parse-skel.y: Add the license notice.
11440 Include output.h and skeleton.h.
11441 (process_skeleton): Returns void, and takes a single parameter.
11442 * src/scan-skel.l: Add the license notice.
11443 Include skeleton.h.
11444 Don't use %option yylineno: it seems that then Flex imagines
11445 REJECT has been used, and therefore it won't reallocate its
11446 buffers (which makes no other sense to me than a bug). It results
11447 in warnings for `unused: yy_flex_realloc'.
11448
11449 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
11450
11451 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11452 (MUSCLE_INSERT_PREFIX): ...to there.
11453 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11454 (MUSCLE_INSERT_PREFIX): Move from here...
11455
11456 * src/bison.hairy: Add a section directive. Put braces around muscle
11457 names. This parser skeleton is still broken, but Bison should not
11458 choke on a bad muscle 'syntax'.
11459 * src/bison.simple: Add a section directive. Put braces around muscle
11460 names.
11461
11462 * src/files.h (strsuffix, stringappend): Add declarations.
11463 (tab_extension): Add declaration.
11464 (short_base_name): Add declaration.
11465
11466 * src/files.c (strsuffix, stringappend): No longer static. These
11467 functions are used in the skeleton parser.
11468 (tab_extension): New.
11469 (compute_base_names): Use the computations done in this function
11470 to guess if the generated parsers should have '.tab' in their
11471 names.
11472 (short_base_name): No longer static.
11473
11474 * src/output.c (output_skeleton): New.
11475 (output): Disable call to output_master_parser, and give a try to
11476 a new skeleton handling system.
11477 (guards_output, actions_output): No longer static.
11478 (token_definitions_output, get_lines_number): No longer static.
11479
11480 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11481
11482 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
11483 parse-skel.y.
11484
11485 * src/parse-skel.y: New file.
11486 * src/scan-skel.l: New file.
11487
11488 2001-12-29 Akim Demaille <akim@epita.fr>
11489
11490 %name-prefix is broken.
11491
11492 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11493 Adjust all dependencies.
11494 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11495 %name-prefix.
11496
11497 Renaming yylval but not yylloc is not consistent. Now we do.
11498
11499 * src/bison.simple: Prefix yylloc if used.
11500 * doc/bison.texinfo (Decl Summary): Document that.
11501
11502 2001-12-29 Akim Demaille <akim@epita.fr>
11503
11504 * doc/bison.texinfo: Promote `%long-directive' over
11505 `%long_directive'.
11506 Remove all references to fixed-output-files, yacc is enough.
11507
11508 2001-12-29 Akim Demaille <akim@epita.fr>
11509
11510 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
11511 user prologue. These are defaults.
11512 * tests/actions.at (Mid-rule actions): Make sure the user can
11513 define YYDEBUG and YYERROR_VERBOSE.
11514
11515 2001-12-29 Akim Demaille <akim@epita.fr>
11516
11517 * src/output.c (header_output): Don't forget to export YYLTYPE and
11518 yylloc.
11519 * tests/headers.at (export YYLTYPE): New, make sure it does.
11520 * tests/regression.at (%union and --defines, Invalid CPP headers):
11521 Move to...
11522 * tests/headers.at: here.
11523
11524 2001-12-29 Akim Demaille <akim@epita.fr>
11525
11526 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
11527
11528 2001-12-29 Akim Demaille <akim@epita.fr>
11529
11530 * tests/actions.at (Mid-rule actions): Output on a single line
11531 instead of several.
11532
11533 2001-12-29 Akim Demaille <akim@epita.fr>
11534
11535 * doc/bison.texinfo: Formatting changes.
11536
11537 2001-12-29 Akim Demaille <akim@epita.fr>
11538
11539 Don't store the token defs in a muscle, just be ready to output it
11540 on command. Now possible via `symbols'. Fixes a memory leak.
11541
11542 * src/output.c (token_definitions_output): New.
11543 (output_parser, header_output): Use it.
11544 * src/reader.c (symbols_save): Remove.
11545
11546 2001-12-29 Akim Demaille <akim@epita.fr>
11547
11548 * src/bison.simple: Do not provide a default for YYSTYPE and
11549 YYLTYPE before the user's prologue. Otherwise it's hardly... a
11550 default.
11551
11552 2001-12-29 Akim Demaille <akim@epita.fr>
11553
11554 Mid-rule actions are simply... ignored!
11555
11556 * src/reader.c (readgram): Be sure to attach mid-rule actions to
11557 the empty-rule associated to the dummy symbol, not to the host
11558 rule.
11559 * tests/actions.at (Mid-rule actions): New.
11560
11561 2001-12-29 Akim Demaille <akim@epita.fr>
11562
11563 Memory leak.
11564
11565 * src/reader.c (reader): Free grammar.
11566
11567 2001-12-29 Akim Demaille <akim@epita.fr>
11568
11569 Memory leak.
11570
11571 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
11572 since it allocates it for each state, although only one is needed.
11573 (allocate_storage): Do it here.
11574
11575 2001-12-29 Akim Demaille <akim@epita.fr>
11576
11577 * src/options.h, src/options.c (create_long_option_table): Rename
11578 as...
11579 (long_option_table_new): this, with a clearer prototype.
11580 (percent_table): Remove, unused,
11581 * src/getargs.c (getargs): Adjust.
11582
11583 2001-12-29 Akim Demaille <akim@epita.fr>
11584
11585 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
11586 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
11587 as states.
11588
11589 2001-12-29 Akim Demaille <akim@epita.fr>
11590
11591 * src/lalr.c (build_relations): Rename `states' as `states1'.
11592 Sorry, I don't understand exactly what it is, no better name...
11593
11594 2001-12-29 Akim Demaille <akim@epita.fr>
11595
11596 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
11597 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
11598 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
11599 as rules.
11600
11601 2001-12-29 Akim Demaille <akim@epita.fr>
11602
11603 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
11604 ago.
11605
11606 2001-12-29 Akim Demaille <akim@epita.fr>
11607
11608 * src/reader.c, src/reader.h (user_toknums): Remove.
11609 Adjust all users to use symbols[i]->user_token_number.
11610
11611 2001-12-29 Akim Demaille <akim@epita.fr>
11612
11613 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
11614 Adjust all users to use symbols[i]->prec or ->assoc.
11615
11616 2001-12-29 Akim Demaille <akim@epita.fr>
11617
11618 * src/reader.c, src/reader.h (tags): Remove.
11619 Adjust all users to use symbols[i]->tag.
11620
11621 2001-12-29 Akim Demaille <akim@epita.fr>
11622
11623 * src/gram.h, src/gram.c (symbols): New, similar to state_table
11624 and rule_table.
11625 * src/reader.c (packsymbols): Fill this table.
11626 Drop sprec.
11627 * src/conflicts.c (resolve_sr_conflict): Adjust.
11628 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
11629 single table.
11630 Use symbols[i]->tag instead of tags[i].
11631
11632 2001-12-29 Akim Demaille <akim@epita.fr>
11633
11634 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
11635 In addition, put a comment in there, to replace...
11636 * tests/regression.at (%union and C comments): Remove.
11637
11638 2001-12-29 Akim Demaille <akim@epita.fr>
11639
11640 * tests/regression.at (Web2c Actions): Blindly move the actual
11641 output as expected output. The contents *seem* right to me, but I
11642 can't pretend reading perfectly parser tables... Nonetheless, all
11643 the other tests pass correctly, the table look OK, even though the
11644 presence of `$axiom' is to be noted: AFAICS it is useless (but
11645 harmless).
11646
11647 2001-12-29 Akim Demaille <akim@epita.fr>
11648
11649 * src/reader.c (readgram): Don't add the rule 0 if there were no
11650 rules read. In other words, add it _after_ having performed
11651 grammar sanity checks.
11652 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
11653
11654 2001-12-29 Akim Demaille <akim@epita.fr>
11655
11656 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
11657 visible, and some states have now a different number.
11658
11659 2001-12-29 Akim Demaille <akim@epita.fr>
11660
11661 * src/reader.c (readgram): Bind the initial rule's lineno to that
11662 of the first rule.
11663 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
11664 (Solved SR Conflicts): Adjust rule 0's line number.
11665
11666 2001-12-29 Akim Demaille <akim@epita.fr>
11667
11668 Fix the `GAWK Grammar' failure.
11669
11670 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11671 the reductions of the first state which was mistakenly confused
11672 with the final state because precisely final_state was initialized
11673 to 0.
11674 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11675 now noticed by Bison.
11676 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11677 have a reduction on $default.
11678
11679 2001-12-29 Akim Demaille <akim@epita.fr>
11680
11681 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11682 rule line numbers.
11683 * src/closure.c (print_closure): Likewise.
11684 * src/derives.c (print_derives): Likewise.
11685 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11686 now.
11687
11688 2001-12-29 Akim Demaille <akim@epita.fr>
11689
11690 * src/lalr.c (lookaheads_print): New.
11691 (lalr): Call it when --trace-flag.
11692 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11693 are dumped.
11694
11695 2001-12-29 Akim Demaille <akim@epita.fr>
11696
11697 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11698 when walking through ritem, even via rule->rhs.
11699 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11700 (useful_production, useless_nonterminals): Likewise.
11701 (reduce_grammar_tables): Likewise, plus update nritems.
11702 * src/nullable.c (set_nullable): Likewise.
11703 * src/lalr.c (build_relations): Likewise.
11704 * tests/sets.at (Nullable): Adjust.
11705 Fortunately, now, the $axiom is no longer nullable.
11706
11707 2001-12-29 Akim Demaille <akim@epita.fr>
11708
11709 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
11710 the 0-sentinel.
11711 * src/gram.c (ritem_longest_rhs): Likewise.
11712 * src/reduce.c (nonterminals_reduce): Likewise.
11713 * src/print_graph.c (print_graph): Likewise.
11714 * src/output.c (output_rule_data): Likewise.
11715 * src/nullable.c (set_nullable): Likewise.
11716
11717 2001-12-29 Akim Demaille <akim@epita.fr>
11718
11719 * src/output.c: Comment changes.
11720
11721 2001-12-27 Paul Eggert <eggert@twinsun.com>
11722
11723 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
11724 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
11725 Sparc, as they were causing more porting problems than the
11726 (minor) performance improvement was worth.
11727
11728 Also, catch up with 1.31's YYSTD.
11729
11730 2001-12-27 Akim Demaille <akim@epita.fr>
11731
11732 * src/output.c (output_gram): Rely on nritems, not the
11733 0-sentinel. See below.
11734 Use -1 as separator, not 0.
11735 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
11736 Rely on -1 as separator in yyrhs, instead of 0.
11737 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
11738 twice `Now at end of input', therefore there are two lines less to
11739 expect.
11740
11741 2001-12-27 Akim Demaille <akim@epita.fr>
11742
11743 * tests/regression.at (Unresolved SR Conflicts):
11744 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
11745 below.
11746
11747 2001-12-27 Akim Demaille <akim@epita.fr>
11748
11749 * src/LR0.c (new_state): Recognize the final state by the fact it
11750 is reached by eoftoken.
11751 (insert_start_shifting_state, insert_eof_shifting_state)
11752 (insert_accepting_state, augment_automaton): Remove, since now
11753 these states are automatically computed from the initial state.
11754 (generate_states): Adjust.
11755 * src/print.c: When reporting a rule number to the user, substract
11756 1, so that the axiom rule is rule 0, and the first user rule is 1.
11757 * src/reduce.c: Likewise.
11758 * src/print_graph.c (print_core): For the time being, just as for
11759 the report, depend upon --trace-flags to dump the full set of
11760 items.
11761 * src/reader.c (readgram): Once the grammar read, insert the rule
11762 0: `$axiom: START-SYMBOL $'.
11763 * tests/set.at: Adjust: rule 0 is now displayed, and since the
11764 number of the states has changed (the final state is no longer
11765 necessarily the last), catch up.
11766
11767 2001-12-27 Akim Demaille <akim@epita.fr>
11768
11769 Try to make the use of the eoftoken valid. Given that its value
11770 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
11771 is used instead of > 0 where appropriate, (ii), depend upon nritems
11772 instead of the 0-sentinel.
11773
11774 * src/gram.h, src/gram.c (nritems): New.
11775 Expected to be duplication of nitems, but for the time being...
11776 * src/reader.c (packgram): Assert nritems and nitems are equal.
11777 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
11778 * src/closure.c (print_closure, print_fderives): Likewise.
11779 * src/gram.c (ritem_print): Likewise.
11780 * src/print.c (print_core, print_grammar): Likewise.
11781 * src/print_graph.c: Likewise.
11782
11783 2001-12-27 Akim Demaille <akim@epita.fr>
11784
11785 * src/main.c (main): If there are complains after grammar
11786 reductions, then output the report anyway if requested, then die.
11787 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
11788 * src/reader.c (eoftoken): New.
11789 (parse_token_decl): If the token being defined has value `0', it
11790 is the eoftoken.
11791 (packsymbols): No longer hack `tags' to insert `$' by hand.
11792 Be sure to preserve the value of the eoftoken.
11793 (reader): Make sure eoftoken is defined.
11794 Initialize nsyms to 0: now eoftoken is created just like the others.
11795 * src/print.c (print_grammar): Don't special case the eof token.
11796 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
11797 lie anyway, albeit pleasant.
11798 * tests/calc.at: Exercise error messages with eoftoken.
11799 Change the grammar so that empty input is invalid.
11800 Adjust expectations.
11801 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
11802
11803 2001-12-27 Akim Demaille <akim@epita.fr>
11804
11805 * configure.in: Check the protos of strchr ans strspn.
11806 Replace strchr if needed.
11807 * src/system.h: Provide the protos of strchr, strspn and memchr if
11808 missing.
11809 * lib/strchr.c: New.
11810 * src/reader.c (symbols_save): Use strchr.
11811
11812 2001-12-27 Akim Demaille <akim@epita.fr>
11813
11814 * src/print.c, src/print_graph.c (escape): New.
11815 Use it to quote the TAGS outputs.
11816 * src/print_graph.c (print_state): Now errors are in red, and
11817 reductions in green.
11818 Prefer high to wide: output the state number on a line of its own.
11819
11820 2001-12-27 Akim Demaille <akim@epita.fr>
11821
11822 * src/state.h, src/state.c (reductions_new): New.
11823 * src/LR0.c (set_state_table): Let all the states have a
11824 `reductions', even if reduced to 0.
11825 (save_reductions): Adjust.
11826 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
11827 * src/print.c (print_reductions, print_actions): Adjust.
11828 * src/output.c (action_row): Adjust.
11829
11830 2001-12-27 Akim Demaille <akim@epita.fr>
11831
11832 * src/state.h, src/state.c (errs_new, errs_dup): New.
11833 * src/LR0.c (set_state_table): Let all the states have an errs,
11834 even if reduced to 0.
11835 * src/print.c (print_errs, print_reductions): Adjust.
11836 * src/output.c (output_actions, action_row): Adjust.
11837 * src/conflicts.c (resolve_sr_conflict): Adjust.
11838
11839 2001-12-27 Akim Demaille <akim@epita.fr>
11840
11841 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
11842
11843 2001-12-27 Akim Demaille <akim@epita.fr>
11844
11845 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
11846 * src/print.c: here.
11847 (lookaheadset, shiftset): New, used as additional storage by
11848 print_reductions.
11849 (print_results): Adjust.
11850 (print_shifts, print_gotos, print_errs): New, extracted from...
11851 (print_actions): here.
11852 * src/print_graph.c (print_actions): Remove dead code.
11853
11854 2001-12-27 Akim Demaille <akim@epita.fr>
11855
11856 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
11857 `$n' and `@n'.
11858
11859 2001-12-27 Akim Demaille <akim@epita.fr>
11860
11861 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
11862 (build_relations): Adjust.
11863
11864 2001-12-27 Akim Demaille <akim@epita.fr>
11865
11866 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
11867 duplication.
11868
11869 2001-12-27 Akim Demaille <akim@epita.fr>
11870
11871 * src/reader.c (packgram): Catch nitems overflows.
11872
11873 2001-12-27 Akim Demaille <akim@epita.fr>
11874
11875 * src/files.c, src/files.h (guard_obstack): Remove.
11876 * src/output.c (output): Adjust.
11877 * src/reader.c (parse_braces): New, factoring...
11878 (copy_action, copy_guard): these two which are renamed as...
11879 (parse_action, parse_guard): these.
11880 As a voluntary consequence, using braces around guards is now
11881 mandatory.
11882
11883 2001-12-27 Akim Demaille <akim@epita.fr>
11884
11885 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
11886 * src/reader.c (symbol_list): `guard' and `guard_line' are new
11887 members.
11888 (symbol_list_new): Adjust.
11889 (copy_action): action_line is the first line, not the last.
11890 (copy_guard): Just as for actions, store the `action' only, not
11891 the switch/case/break flesh.
11892 Don't parse the user action that might follow the guard, let...
11893 (readgram): do it, i.e., now, there can be an action after a
11894 guard.
11895 In other words the guard is just explicitly optional.
11896 (packgram): Adjust.
11897 * src/output.c (guards_output): New.
11898 (output_parser): Call it when needed.
11899 (output): Also free the guard and attrs obstacks.
11900 * src/files.c, src/files.h (obstack_save): Remove.
11901 (output_files): Remove.
11902 As a result, if one needs the former `.act' file, using an
11903 appropriate skeleton which requires actions and guards is now
11904 required.
11905 * src/main.c (main): Adjust.
11906 * tests/semantic.at: New.
11907 * tests/regression.at: Use `input.y' as input file name.
11908 Avoid 8+3 problems by requiring input.c when the test needs the
11909 parser.
11910
11911 2001-12-27 Akim Demaille <akim@epita.fr>
11912
11913 * src/reader.c (symbol_list_new): Be sure to initialize all the
11914 fields.
11915
11916 2001-12-27 Akim Demaille <akim@epita.fr>
11917
11918 All the hacks using a final pseudo state are now useless.
11919
11920 * src/LR0.c (set_state_table): state_table holds exactly nstates.
11921 * src/lalr.c (nLA): New.
11922 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
11923 instead of lookaheadsp from the pseudo state (nstate + 1).
11924
11925 2001-12-27 Akim Demaille <akim@epita.fr>
11926
11927 * src/output.c (action_row, token_actions): Use a state_t instead
11928 of a integer, and nlookaheads instead of the following state's
11929 lookaheadsp.
11930
11931 2001-12-27 Akim Demaille <akim@epita.fr>
11932
11933 * src/conflicts.c (log_resolution, flush_shift)
11934 (resolve_sr_conflict, set_conflicts, solve_conflicts)
11935 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
11936 (conflicts_print, print_reductions): Use a state_t instead of an
11937 integer when referring to a state.
11938 As much as possible, depend upon nlookaheads, instead of the
11939 `lookaheadsp' member of the following state (since lookaheads of
11940 successive states are successive, the difference between state n + 1
11941 and n served as the number of lookaheads for state n).
11942 * src/lalr.c (add_lookback_edge): Likewise.
11943 * src/print.c (print_core, print_actions, print_state)
11944 (print_results): Likewise.
11945 * src/print_graph.c (print_core, print_actions, print_state)
11946 (print_graph): Likewise.
11947 * src/conflicts.h: Adjust.
11948
11949 2001-12-27 Akim Demaille <akim@epita.fr>
11950
11951 * src/bison.hairy: Formatting/comment changes.
11952 ANSIfy.
11953 Remove `register' indications.
11954 Add plenty of `static'.
11955
11956 2001-12-27 Akim Demaille <akim@epita.fr>
11957
11958 * src/output.c (prepare): Drop the muscle `ntbase' which
11959 duplicates ntokens.
11960 * src/bison.simple: Formatting/comment changes.
11961 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
11962 is an undocumented synonym.
11963
11964 2001-12-22 Akim Demaille <akim@epita.fr>
11965
11966 * src/output.c (output_table_data): Change the prototype to use
11967 `int' for array ranges: some invocations do pass an int, not a
11968 short.
11969 Reported by Wayne Green.
11970
11971 2001-12-22 Akim Demaille <akim@epita.fr>
11972
11973 Some actions of web2c.y are improperly triggered.
11974 Reported by Mike Castle.
11975
11976 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
11977 * tests/regression.at (Web2c): Rename as...
11978 (Web2c Report): this.
11979 (Web2c Actions): New.
11980
11981 2001-12-22 Akim Demaille <akim@epita.fr>
11982
11983 Reductions in web2c.y are improperly reported.
11984 Reported by Mike Castle.
11985
11986 * src/conflicts.c (print_reductions): Fix.
11987 * tests/regression.at (Web2c): New.
11988
11989 2001-12-18 Akim Demaille <akim@epita.fr>
11990
11991 Some host fail on `assert (!"foo")', which expands to
11992 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
11993 Reported by Nelson Beebee.
11994
11995 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
11996 `#define it_succeeded 0' and `assert (it_succeeded)'.
11997
11998 2001-12-17 Marc Autret <autret_m@epita.fr>
11999
12000 * src/bison.simple: Don't hard code the skeleton line and filename.
12001 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12002 New line counter 'skeleton_line' (skeleton-line muscle).
12003
12004 2001-12-17 Paul Eggert <eggert@twinsun.com>
12005
12006 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12007 YYDEBUG must be defined to a nonzero value.
12008
12009 * src/bison.simple (yytname): Do not assume that the user defines
12010 YYDEBUG to a properly parenthesized expression.
12011
12012 2001-12-17 Akim Demaille <akim@epita.fr>
12013
12014 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12015 nlookaheads is a new member.
12016 Adjust all users.
12017 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12018 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12019 state.
12020
12021 2001-12-17 Akim Demaille <akim@epita.fr>
12022
12023 * src/files.h, src/files.c (open_files, close_files): Remove.
12024 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12025 let...
12026 * src/reader.c (reader): Do it.
12027
12028 2001-12-17 Akim Demaille <akim@epita.fr>
12029
12030 * src/conflicts.c (print_reductions): Formatting changes.
12031
12032 2001-12-17 Akim Demaille <akim@epita.fr>
12033
12034 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
12035 (flush_reduce): New.
12036 (resolve_sr_conflict): Adjust.
12037
12038 2001-12-17 Akim Demaille <akim@epita.fr>
12039
12040 * src/output.c (output_obstack): Be static and rename as...
12041 (format_obstack): this, to avoid any confusion with files.c's
12042 output_obstack.
12043 * src/reader.h (muscle_obstack): Move to...
12044 * src/output.h: here, since it's defined in output.c.
12045
12046 2001-12-17 Akim Demaille <akim@epita.fr>
12047
12048 * src/output.c (action_row, save_column, default_goto)
12049 (sort_actions, matching_state, pack_vector): Better variable
12050 locality.
12051
12052 2001-12-17 Akim Demaille <akim@epita.fr>
12053
12054 * src/output.c: Various formatting changes.
12055
12056 2001-12-17 Akim Demaille <akim@epita.fr>
12057
12058 * src/files.c (output_files): Free the output_obstack.
12059 * src/main.c (main): Call print and print_graph conditionally.
12060 * src/print.c (print): Work unconditionally.
12061 * src/print_graph.c (print_graph): Work unconditionally.
12062 * src/conflicts.c (log_resolution): Output only if verbose_flag.
12063
12064 2001-12-16 Marc Autret <autret_m@epita.fr>
12065
12066 * src/output.c (actions_output): Fix. When we use %no-lines,
12067 there is one less line per action.
12068
12069 2001-12-16 Marc Autret <autret_m@epita.fr>
12070
12071 * src/bison.simple: Remove a useless #line directive.
12072 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
12073 * src/output.c (get_lines_number): New.
12074 (output_parser): Adjust, now takes care about the lines of a
12075 output muscles.
12076 Fix line numbering.
12077 (actions_output): Computes the number of lines taken by actions.
12078 (output_master_parser): Insert new skeleton which is the name of
12079 the output parser file name.
12080
12081 2001-12-15 Marc Autret <autret_m@epita.fr>
12082
12083 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
12084
12085 2001-12-15 Marc Autret <autret_m@epita.fr>
12086
12087 * src/output.c (output_gram): Keep track of the hairy one.
12088
12089 2001-12-15 Akim Demaille <akim@epita.fr>
12090
12091 Make `make distcheck' work.
12092
12093 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
12094 system.h which uses libgettext.h.
12095
12096 2001-12-15 Akim Demaille <akim@epita.fr>
12097
12098 * src/nullable.c (set_nullable): Useless rules must be skipped,
12099 otherwise, since we range over their symbols, we might look at a
12100 nonterminal which no longer ``exists'', i.e., it is not counted in
12101 `nvars', hence we overflow our arrays.
12102
12103 2001-12-15 Akim Demaille <akim@epita.fr>
12104
12105 The header can also be produced directly, without any obstack!
12106 Yahoo!
12107
12108 * src/files.c, src/files.h (defines_obstack): Remove.
12109 (compute_header_macro): Global.
12110 (defines_obstack_save): Remove.
12111 * src/reader.c (parse_union_decl): No longer output to
12112 defines_obstack: its content can be found in the `stype' muscle
12113 anyway.
12114 (output_token_translations): Merge into...
12115 (symbols_output): this.
12116 Rename as...
12117 (symbols_save): this.
12118 (reader): Adjust.
12119 * src/output.c (header_output): New.
12120 (output): Call it.
12121
12122 2001-12-15 Akim Demaille <akim@epita.fr>
12123
12124 * src/reader.c (parse_union_decl): Instead of handling two obstack
12125 simultaneously, use one to define the `stype' muscle, and use the
12126 value of the latter to fill defines_obstack.
12127 (copy_comment): Remove.
12128 (copy_comment2): Work for a single obstack.
12129 Rename as...
12130 (copy_comment): this.
12131
12132 2001-12-15 Akim Demaille <akim@epita.fr>
12133
12134 * src/lex.c, src/lex.h (xgetc): No longer static.
12135 * src/reader.c (parse_union_decl): Revamp.
12136
12137 2001-12-15 Akim Demaille <akim@epita.fr>
12138
12139 Still making progress in separating Bison into (i) input, (ii)
12140 process, (iii) output: now we can directly output the parser file
12141 without using table_obstack at all.
12142
12143 * src/files.c, src/files.h (table_obstack): Bye bye.
12144 (parser_file_name): New.
12145 * src/files.c (compute_output_file_names): Compute it.
12146 * src/output.c (actions_output, output_parser)
12147 (output_master_parser): To a file instead of an obstack.
12148
12149 2001-12-15 Akim Demaille <akim@epita.fr>
12150
12151 Attach actions to rules, instead of pre-outputting them to
12152 actions_obstack.
12153
12154 * src/gram.h (rule_t): action and action_line are new members.
12155 * src/reader.c (symbol_list): Likewise.
12156 (copy_action): Save the actions within the rule.
12157 (packgram): Save them in rule_table.
12158 * src/output.c (actions_output): New.
12159 (output_parser): Use it on `%%actions'.
12160 (output_rule_data): Don't free rule_table.
12161 (output): Do it.
12162 (prepare): Don't save the `action' muscle.
12163 * src/bison.simple: s/%%action/%%actions/.
12164
12165 2001-12-15 Akim Demaille <akim@epita.fr>
12166
12167 * src/reader.c (copy_action): When --yacc, don't append a `;'
12168 to the user action: let it fail if lacking.
12169 Suggested by Arnold Robbins and Tom Tromey.
12170
12171 2001-12-14 Akim Demaille <akim@epita.fr>
12172
12173 * src/lex.c (literalchar): Simply return the char you decoded, non
12174 longer mess around with obstacks and int pointers.
12175 Adjust all callers.
12176
12177 2001-12-14 Akim Demaille <akim@epita.fr>
12178
12179 * src/lex.c (literalchar): Don't escape the special characters,
12180 just decode them, and keep them as char (before, eol was output as
12181 the 2 char string `\n' etc.).
12182 * src/output.c (output_rule_data): Use quotearg to output the
12183 token strings.
12184
12185 2001-12-13 Paul Eggert <eggert@twinsun.com>
12186
12187 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
12188 Do not infringe on the global user namespace when using C++.
12189 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
12190 All uses of `fprintf' and `stderr' changed.
12191
12192 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
12193
12194 2001-12-13 Akim Demaille <akim@epita.fr>
12195
12196 The computation of nullable is broken: it doesn't handle empty
12197 RHS's properly.
12198
12199 * tests/torture.at (GNU AWK Grammar): New.
12200 * tests/sets.at (Nullable): New.
12201 * src/nullable.c (set_nullable): Instead of blindly looping over
12202 `ritems', loop over the rules, and then over their rhs's.
12203
12204 Work around Autotest bugs.
12205
12206 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
12207 frame, because Autotest understand lines starting with a `+' as
12208 traces from the shell. Then, they are not processed properly.
12209 Admittedly an Autotest bug, but we don't have time to wait for
12210 Autotest to catch up.
12211 * tests/regression.at (Broken Closure): Adjust to the new table
12212 frames.
12213 Move to...
12214 * tests/sets.at: here.
12215
12216 2001-12-13 Akim Demaille <akim@epita.fr>
12217
12218 * src/closure.c (closure): Use nrules instead of playing tricks
12219 with BITS_PER_WORD.
12220
12221 2001-12-13 Akim Demaille <akim@epita.fr>
12222
12223 * src/print.c (print_actions): Output the handling of `$' as the
12224 traces do: shifting the token EOF. Before EOF was treated as a
12225 nonterminal.
12226 * tests/regression.at: Adjust some tests.
12227 * src/print_graph.c (print_core): Complete the set of items via
12228 closure. The next-to-final and final states are still unsatisfying,
12229 but that's to be addressed elsewhere.
12230 No longer output the rule numbers, but do output the state number.
12231 A single loop for the shifts + gotos is enough, but picked a
12232 distinct color for each.
12233 (print_graph): Initialize and finalize closure.
12234
12235 2001-12-13 Akim Demaille <akim@epita.fr>
12236
12237 * src/reader.c (readgram): Remove dead code, an strip useless
12238 braces.
12239 (get_type): Remove, unused.
12240
12241 2001-12-12 Akim Demaille <akim@epita.fr>
12242
12243 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
12244 on that of lib/error.c.
12245
12246 2001-12-12 Akim Demaille <akim@epita.fr>
12247
12248 Some hosts don't like `/' in includes.
12249
12250 * src/system.h: Include libgettext.h without qualifying the path.
12251 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
12252 $(top_srcdir).
12253
12254 2001-12-11 Marc Autret <autret_m@epita.fr>
12255
12256 * src/output.c (output_parser): Remove useless muscle.
12257
12258 2001-12-11 Marc Autret <autret_m@epita.fr>
12259
12260 * src/bison.simple: Remove #line just before %%epilogue. It
12261 is now handled in ...
12262 * src/reader.c (read_additionnal_code): Add the output of a
12263 #line for the epilogue.
12264
12265 2001-12-10 Marc Autret <autret_m@epita.fr>
12266
12267 * src/reader.c (copy_definition): Re-use CPP-outed code which
12268 replace precedent remove.
12269 * src/bison.simple: Remove #line before %%prologue because
12270 %%input-line is wrong at this time.
12271
12272 2001-12-10 Marc Autret <autret_m@epita.fr>
12273
12274 * src/reader.c (symbols_output): Clean up.
12275 * src/output.c (output_gram, output): Clean up.
12276
12277 2001-12-10 Akim Demaille <akim@epita.fr>
12278
12279 * src/lalr.c (initialize_lookaheads): New. Extracted from...
12280 * src/LR0.c (set_state_table): here.
12281 * src/lalr.c (lalr): Call it.
12282
12283 2001-12-10 Akim Demaille <akim@epita.fr>
12284
12285 * src/state.h (shifts): Remove the `number' member: shifts are
12286 attached to state, hence no longer need to be labelled with a
12287 state number.
12288
12289 2001-12-10 Akim Demaille <akim@epita.fr>
12290
12291 Now that states have a complete set of members, the linked list of
12292 shifts is useless: just fill directly the state's shifts member.
12293
12294 * src/state.h (shifts): Remove the `next' member.
12295 * src/LR0.c (first_state, last_state): Remove.
12296 Adjust the callers.
12297 (augment_automaton): Don't look for the shifts that must be added
12298 a shift on EOF: it is those of the state we looked for! But now,
12299 since shifts are attached, it is no longer needed to looking
12300 merely by its id: its number.
12301
12302 2001-12-10 Akim Demaille <akim@epita.fr>
12303
12304 * src/LR0.c (augment_automaton): Better variable locality.
12305 Remove an impossible branch: if there is a state corresponding to
12306 the start symbol being shifted, then there is shift for the start
12307 symbol from the initial state.
12308
12309 2001-12-10 Akim Demaille <akim@epita.fr>
12310
12311 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
12312 only when appropriate: when insert_start_shifting_state' is not
12313 invoked.
12314 * tests/regression.at (Rule Line Numbers): Adjust.
12315
12316 2001-12-10 Akim Demaille <akim@epita.fr>
12317
12318 * src/LR0.c (augment_automaton): Now that all states have shifts,
12319 merge the two cases addition shifts to the initial state.
12320
12321 2001-12-10 Akim Demaille <akim@epita.fr>
12322
12323 * src/lalr.c (set_state_table): Move to...
12324 * src/LR0.c: here.
12325 * src/lalr.c (lalr): Don't call it...
12326 * src/LR0.c (generate_states): do it.
12327 * src/LR0.h (first_state): Remove, only the table is used.
12328
12329 2001-12-10 Akim Demaille <akim@epita.fr>
12330
12331 * src/LR0.h (first_shift, first_reduction): Remove.
12332 * src/lalr.c: Don't use first_shift: find shifts through the
12333 states.
12334
12335 2001-12-10 Akim Demaille <akim@epita.fr>
12336
12337 * src/LR0.c: Attach shifts to states as soon as they are
12338 computed.
12339 * src/lalr.c (set_state_table): Instead of assigning shifts to
12340 state, just assert that the mapping was properly done.
12341
12342 2001-12-10 Akim Demaille <akim@epita.fr>
12343
12344 * src/LR0.c (insert_start_shift): Rename as...
12345 (insert_start_shifting_state): this.
12346 (insert_eof_shifting_state, insert_accepting_state): New.
12347 (augment_automaton): Adjust.
12348 Better locality of the variables.
12349 When looking if the start_symbol is shifted from the initial
12350 state, using `while (... symbol != start_symbol ...)' sounds
12351 better than `while (... symbol < start_symbol ...)': If fail
12352 to see how the order between symbols could be relevant!
12353
12354 2001-12-10 Akim Demaille <akim@epita.fr>
12355
12356 * src/getargs.h: Don't declare `spec_name_prefix' and
12357 `spec_file_prefix', declared by src/files.h.
12358 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
12359 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
12360 * src/output.c (prepare): Adjust.
12361 * src/reader.c (symbols_output): Likewise.
12362 * src/vmsgetargs.c: Vaguely adjust, but who cares?
12363
12364 2001-12-10 Akim Demaille <akim@epita.fr>
12365
12366 * src/muscle_tab.c (muscle_init): NULL is a better default than
12367 `"0"'.
12368
12369 2001-12-10 Akim Demaille <akim@epita.fr>
12370
12371 * src/reader.c (reader): Calling symbols_output once is enough.
12372
12373 2001-12-10 Akim Demaille <akim@epita.fr>
12374
12375 Now that states have a complete set of members, the linked list of
12376 reductions is useless: just fill directly the state's reductions
12377 member.
12378
12379 * src/state.h (struct reductions): Remove member `number' and
12380 `next'.
12381 * src/LR0.c (first_reduction, last_reduction): Remove.
12382 (save_reductions): Don't link the new reductions, store them in
12383 this_state.
12384 * src/lalr.c (set_state_table): No need to attach reductions to
12385 states, it's already done.
12386 * src/output.c (output_actions): No longer free the shifts, then
12387 the reductions, then the states: free all the states and their
12388 members.
12389
12390 2001-12-10 Akim Demaille <akim@epita.fr>
12391
12392 * src/options.c (OPTN, DRTV, BOTH): New.
12393 (option_table): Use them.
12394
12395 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
12396 the job of system.h.
12397 * src/options.c: Don't include stdio.h and xalloc.h for the same
12398 reasons.
12399
12400 2001-12-10 Akim Demaille <akim@epita.fr>
12401
12402 * src/output.c (output, prepare): Make sure the values of the
12403 muscles `action' and `prologue' are 0-terminated.
12404
12405 2001-12-10 Akim Demaille <akim@epita.fr>
12406
12407 Clean up GCC warnings.
12408
12409 * src/reader.c (copy_action): `buf' is not used.
12410 (parse_skel_decl): Be static.
12411 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
12412 * src/options.h (create_long_option_table): Have a real prototype.
12413 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
12414 (hash_delete_at): Return const void *.
12415 Adjust casts to preserve the const.
12416
12417 2001-12-10 Akim Demaille <akim@epita.fr>
12418
12419 * configure.in: Require 2.52g.
12420 M4 is not needed, but AUTOM4TE is.
12421 * m4/m4.m4: Remove.
12422 * tests/Makefile.am: Adjust.
12423
12424 2001-12-10 Akim Demaille <akim@epita.fr>
12425
12426 One structure for states is enough, even though theoretically
12427 there are LR(0) states and LALR(1) states.
12428
12429 * src/lalr.h (state_t): Remove.
12430 (state_table): Be state_t **, not state_t *.
12431 * src/state.h (core, CORE_ALLOC): Rename as...
12432 (state_t, STATE_ALLOC): this.
12433 Add the LALR(1) members: shifts, reductions, errs.
12434 * src/LR0.c (state_table): Rename as...
12435 (state_hash): this, to avoid name clashes with the global
12436 `state_table'.
12437 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12438 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12439
12440 2001-12-10 Akim Demaille <akim@epita.fr>
12441
12442 Bison dumps core on bash.y.
12443 Reported by Pascal Bart.
12444
12445 * src/warshall.c (bitmatrix_print): New.
12446 (TC): Use it.
12447 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
12448 j must be the outer loop.
12449 * tests/regression.at (Broken Closure): New.
12450
12451 2001-12-05 Akim Demaille <akim@epita.fr>
12452
12453 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12454 its argument.
12455 Reported by Peter Hamorsky.
12456
12457 2001-12-05 Akim Demaille <akim@epita.fr>
12458
12459 * src/conflicts.c (err_table): Remove.
12460 (resolve_sr_conflict): Adjust.
12461 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12462 Rename as...
12463 (state_t.reductions, state_t.shifts): this.
12464
12465 2001-12-05 Akim Demaille <akim@epita.fr>
12466
12467 * src/reduce.c (reduce_grammar_tables): No longer disable the
12468 removal of useless rules via CPP but via `if (0)', so that the
12469 compiler still check the code is valid.
12470 For instance, it should have noticed `rline' no longer exists: use
12471 the `line' member of rule_t.
12472 * src/gram.c (dummy, rline): Remove, unused.
12473
12474 2001-12-05 Akim Demaille <akim@epita.fr>
12475
12476 * src/output.c (pack_vector): Use assert, not berror.
12477 * src/main.c (berror): Remove, unused.
12478
12479 2001-12-05 Akim Demaille <akim@epita.fr>
12480
12481 New experimental feature: if --verbose --trace output all the
12482 items of a state, not only its kernel.
12483
12484 * src/print.c (print_core): If `trace_flag', then invoke closure
12485 before outputting the items of the state (print_core is no longer
12486 a correct name them).
12487 (print_results): Invoke new_closure/free_closure if needed.
12488
12489 2001-12-05 Akim Demaille <akim@epita.fr>
12490
12491 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12492 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12493 (nitemset): for consistency with the rest of the project.
12494
12495 2001-12-05 Akim Demaille <akim@epita.fr>
12496
12497 * src/closure.c (print_closure): Improve.
12498 (closure): Use it for printing input and output.
12499
12500 2001-12-05 Akim Demaille <akim@epita.fr>
12501
12502 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
12503 indexed by nonterminals.
12504
12505 2001-12-05 Akim Demaille <akim@epita.fr>
12506
12507 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
12508 what it was!).
12509 * src/warshall.h: Remove accidental duplication of the content.
12510
12511 2001-12-05 Akim Demaille <akim@epita.fr>
12512
12513 * src/closure.c (set_fderives): De-obfuscate.
12514
12515 2001-12-05 Akim Demaille <akim@epita.fr>
12516
12517 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
12518
12519 2001-12-05 Akim Demaille <akim@epita.fr>
12520
12521 * src/closure.c (set_firsts): De-obfuscate.
12522
12523 2001-12-05 Akim Demaille <akim@epita.fr>
12524
12525 * src/output.c (action_row): De-obfuscate
12526 using the good o' techniques: arrays not pointers, variable
12527 locality, BITISSET, RESETBIT etc.
12528
12529 2001-12-05 Akim Demaille <akim@epita.fr>
12530
12531 Pessimize the code to simplify it: from now on, all the states
12532 have a valid SHIFTS, which NSHIFTS is possibly 0.
12533
12534 * src/LR0.c (shifts_new): Be global and move to..
12535 * src/state.c, src/state.h: here.
12536 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
12537 * src/print_graph: Adjust.
12538
12539 2001-12-05 Akim Demaille <akim@epita.fr>
12540
12541 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
12542 * src/conflicts.c: Use it.
12543 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
12544 incorrectly ``simplified''.
12545
12546 2001-12-05 Akim Demaille <akim@epita.fr>
12547
12548 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
12549 using the good o' techniques: arrays not pointers, variable
12550 locality, BITISSET, RESETBIT etc.
12551
12552 2001-12-05 Akim Demaille <akim@epita.fr>
12553
12554 * src/state.h (SHIFT_SYMBOL): New.
12555 * src/conflicts.c: Use it to deobfuscate.
12556
12557 2001-12-05 Akim Demaille <akim@epita.fr>
12558
12559 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
12560 (print_reductions): De-obfuscate using the good o' techniques:
12561 arrays not pointers, variable locality, BITISSET.
12562
12563 2001-12-05 Akim Demaille <akim@epita.fr>
12564
12565 * src/conflicts.c (print_reductions): Arrays, not pointers.
12566 Use BITISSET.
12567
12568 2001-12-05 Akim Demaille <akim@epita.fr>
12569
12570 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12571
12572 2001-12-05 Akim Demaille <akim@epita.fr>
12573
12574 * src/conflicts.c (print_reductions): Improve variable locality.
12575
12576 2001-12-05 Akim Demaille <akim@epita.fr>
12577
12578 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12579
12580 2001-12-05 Akim Demaille <akim@epita.fr>
12581
12582 * src/conflicts.c (print_reductions): Improve variable locality.
12583
12584 2001-12-05 Akim Demaille <akim@epita.fr>
12585
12586 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
12587 * src/lalr.c: Use them.
12588
12589 2001-12-05 Akim Demaille <akim@epita.fr>
12590
12591 * src/LR0.c (augment_automaton): Formatting changes.
12592 Better variable locality.
12593
12594 2001-12-05 Akim Demaille <akim@epita.fr>
12595
12596 * src/lalr.c (matrix_print): New.
12597 (transpose): Use it.
12598 Use arrays instead of pointers.
12599
12600 2001-12-05 Akim Demaille <akim@epita.fr>
12601
12602 * src/lalr.c (maxrhs): Move to...
12603 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
12604 * src/lalr.c (build_relations): Adjust.
12605
12606 2001-12-05 Akim Demaille <akim@epita.fr>
12607
12608 * src/lalr.c (transpose): Free the memory allocated to the
12609 argument, as it is replaced by the results by the unique caller.
12610 (build_relations): Merely invoke transpose: it handles the memory
12611 deallocation.
12612 Improve variable locality.
12613 Avoid variables used as mere abbreviations.
12614 (compute_lookaheads): Use arrays instead of pointers.
12615
12616 2001-12-05 Akim Demaille <akim@epita.fr>
12617
12618 * src/lalr.c (initialize_F): Improve variable locality.
12619 Avoid variables used as mere abbreviations.
12620
12621 2001-12-05 Akim Demaille <akim@epita.fr>
12622
12623 * src/derives.c (print_derives): Display the ruleno.
12624 * src/lalr.c (initialize_F, transpose): Better variable locality
12625 to improve readability.
12626 Avoid variables used as mere abbreviations.
12627
12628 2001-12-05 Akim Demaille <akim@epita.fr>
12629
12630 * src/lalr.c (traverse): Use arrays instead of pointers.
12631
12632 2001-12-05 Akim Demaille <akim@epita.fr>
12633
12634 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
12635 the handling of squeue.
12636 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12637
12638 2001-12-05 Akim Demaille <akim@epita.fr>
12639
12640 Because useless nonterminals are now kept alive (instead of being
12641 `destroyed'), we now sometimes examine them, and store information
12642 related to them. Hence we need to know their number, and adjust
12643 memory allocations.
12644
12645 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
12646 static.
12647 * src/LR0.c (allocate_itemsets): The memory allocated to
12648 `symbol_count' was used for two different purpose: once to count
12649 the number of occurrences of each symbol, and later reassigned to
12650 `shift_symbol', containing the symbol that can be shifted from a
12651 given state.
12652 Deobfuscate, i.e., allocate, use and free `symbol_count' here
12653 only, and...
12654 (new_itemsets): Allocate `shift_symbol' here.
12655 (allocate_itemsets): symbol_count includes useless nonterminals.
12656 Make room for them.
12657 (free_storage): Use `free', not `XFREE', for pointers that cannot
12658 be null.
12659
12660 2001-12-05 Akim Demaille <akim@epita.fr>
12661
12662 * src/nullable.c (set_nullable): Deobfuscate the handling of
12663 ritem.
12664 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12665
12666 2001-12-05 Akim Demaille <akim@epita.fr>
12667
12668 * src/gram.c, src/gram.h (ritem_print): New.
12669 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12670 (This useless function was defined only to work around VMS linkers
12671 that can't handle compilation units with variables only).
12672 * src/reduce.c (dump_grammar): Use it to trace the construction of
12673 ritem.
12674
12675 2001-12-04 Paul Eggert <eggert@twinsun.com>
12676
12677 * src/bison.simple (union yyalloc): Change member names
12678 to be the same as the stack names.
12679 (yyparse): yyptr is now union yyalloc *, not char *.
12680 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12681 and may generate better code on some machines.
12682 (yystpcpy): Use prototype if __STDC__ is defined, not just
12683 if __cplusplus is defined.
12684
12685 2001-11-30 Akim Demaille <akim@epita.fr>
12686
12687 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12688 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12689 Gettext doesn't compile cleanly, and dies with -Werror.
12690 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12691 Include WARNING_CFLAGS here.
12692 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12693 before being defined.
12694
12695 2001-11-27 Paul Eggert <eggert@twinsun.com>
12696
12697 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12698 First arg is int, not unsigned.
12699 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12700 (SIZE_MAX, UINT_MAX): New macros.
12701 (quotearg_n_options): Abort if N is negative.
12702 Avoid overflow check on hosts where size_t is 64 bits and int
12703 is 32 bits, as overflow is impossible there.
12704 Fix off-by-one typo that caused unnecessary reallocation.
12705
12706 2001-11-29 Paul Eggert <eggert@twinsun.com>
12707
12708 Name space cleanup in generated parser.
12709
12710 * doc/bison.texinfo (Bison Parser): Discuss system headers
12711 and their effect on the user name space.
12712
12713 * src/bison.simple:
12714 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
12715 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
12716 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
12717
12718 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
12719 on user names when possible.
12720
12721 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
12722 Simplify test for whather <alloca.h> exists.
12723
12724 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
12725
12726 (<stdio.h>): Include if YYDEBUG.
12727
12728 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
12729 ! defined (yyoverflow) && ! defined (yymemcpy).
12730
12731 (yymemcpy, yyparse): Rename local variables as needed so that
12732 they all begin with 'yy'.
12733
12734 (yystrlen, yystpcpy): New functions.
12735
12736 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
12737 All uses changed.
12738
12739 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
12740 instead of relying on string.h functions. Use YYSTACK_ALLOC
12741 and YYSTACK_FREE instead of malloc and free.
12742
12743 2001-11-30 Akim Demaille <akim@epita.fr>
12744
12745 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
12746 before their first uses.
12747 (YYBISON, YYPURE): Move to the top of the output.
12748
12749 2001-11-30 Akim Demaille <akim@epita.fr>
12750
12751 * tests/reduce.at (Useless Nonterminals): Fix.
12752
12753 2001-11-30 Akim Demaille <akim@epita.fr>
12754
12755 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
12756 if body instead of `;' to pacify GCC's warnings.
12757
12758 2001-11-30 Akim Demaille <akim@epita.fr>
12759
12760 Instead of mapping the LHS of unused rules to -1, keep the LHS
12761 valid, but flag the rules as invalid.
12762
12763 * src/gram.h (rule_t): `useful' is a new member.
12764 * src/print.c (print_grammar): Adjust.
12765 * src/derives.c (set_derives): Likewise.
12766 * src/reader.c (packgram, reduce_output): Likewise.
12767 * src/reduce.c (reduce_grammar_tables): Likewise.
12768 * tests/reduce.at (Underivable Rules, Useless Rules): New.
12769
12770 2001-11-30 Akim Demaille <akim@epita.fr>
12771
12772 * src/reduce.c (reduce_output): Formatting changes.
12773 * src/print.c (print_results, print_grammar): Likewise.
12774 * tests/regression.at (Rule Line Numbers)
12775 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
12776
12777 2001-11-30 Akim Demaille <akim@epita.fr>
12778
12779 * src/reduce.c (nonterminals_reduce): Instead of throwing away
12780 useless nonterminals, move them at the end of the symbol arrays.
12781 (reduce_output): Adjust.
12782 * tests/reduce.at (Useless Nonterminals): Adjust.
12783
12784 2001-11-30 Akim Demaille <akim@epita.fr>
12785
12786 * src/reduce.c: Various comment/formatting changes.
12787 (nonterminals_reduce): New, extracted from...
12788 (reduce_grammar_tables): here.
12789 (reduce_grammar): Call nonterminals_reduce.
12790
12791 2001-11-29 Paul Eggert <eggert@twinsun.com>
12792
12793 * src/bison.simple (YYSTACK_REALLOC): Remove.
12794 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
12795 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
12796 New macros.
12797 (union yyalloc): New type.
12798 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
12799 an arbitrary restriction on hosts where size_t is wider than int.
12800
12801 (yyparse): Don't dump core if alloca or malloc fails; instead, report
12802 a parser stack overflow. Allocate just one block of memory for all
12803 three stacks, instead of allocating three blocks; this typically is
12804 faster and reduces fragmentation.
12805
12806 Do not limit the number of items in the stack to a value that fits
12807 in 'int', as this is an arbitrary limit on hosts with 64-bit
12808 size_t and 32-bit int.
12809
12810 2001-11-29 Marc Autret <autret_m@epita.fr>
12811
12812 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
12813 of defining YYERROR_VERBOSE.
12814 [AT_DATA]: $4 is now out of C declarations in the prologue.
12815
12816 2001-11-28 Marc Autret <autret_m@epita.fr>
12817
12818 * src/reader.c (parse_dquoted_param): New.
12819 (parse_skel_decl): Use it.
12820 * src/lex.h: Add its prototype.
12821 * src/lex.c (literalchar): Become not static.
12822
12823 2001-11-28 Marc Autret <autret_m@epita.fr>
12824
12825 * src/output.h: And put its extern declaration here.
12826 * src/output.c (error_verbose): Define here.
12827 (prepare): Echo name modification.
12828 * src/getargs.h: Clean its extern declaration.
12829 * src/getargs.c (error_verbose_flag): Remove.
12830 (getargs): Remove case 'e'.
12831 * src/options.c (option_table): 'error-verbose' is now seen as simple
12832 percent option.
12833 Include output.h.
12834
12835 * src/reader.c (read_declarations): Remove case tok_include.
12836 (parse_include_decl): Remove.
12837 * src/lex.h (token_t): Remove tok_include.
12838 * src/options.c (option_table): 'include' is now a simple command line
12839 option.
12840
12841 2001-11-28 Marc Autret <autret_m@epita.fr>
12842
12843 * src/bison.simple: Adjust muscle names.
12844 * src/muscle_tab.c (muscle_init): Also rename the muscles.
12845 * src/output.c (prepare): s/_/-/ for the muscles names.
12846 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
12847
12848 2001-11-28 Marc Autret <autret_m@epita.fr>
12849
12850 * src/bison.simple: Fix debug.
12851 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
12852
12853 2001-11-28 Akim Demaille <akim@epita.fr>
12854
12855 * src/LR0.c (shifts_new): New.
12856 (save_shifts, insert_start_shift, augment_automaton): Use it.
12857
12858 2001-11-28 Akim Demaille <akim@epita.fr>
12859
12860 * src/closure.c (closure): `b' and `ruleno' denote the same value:
12861 keep ruleno only.
12862
12863 2001-11-28 Akim Demaille <akim@epita.fr>
12864
12865 * src/closure.c (closure): Instead of looping over word in array
12866 then bits in words, loop over bits in array.
12867
12868 2001-11-28 Akim Demaille <akim@epita.fr>
12869
12870 * src/closure.c (closure): No longer optimize the special case
12871 where all the bits of `ruleset[r]' are set to 0, to make the code
12872 clearer.
12873
12874 2001-11-28 Akim Demaille <akim@epita.fr>
12875
12876 * src/closure.c (closure): `r' and `c' are new variables, used to
12877 de-obfuscate accesses to RULESET and CORE.
12878
12879 2001-11-28 Akim Demaille <akim@epita.fr>
12880
12881 * src/reduce.c (reduce_print): Use ngettext.
12882 (dump_grammar): Improve the trace accuracy.
12883
12884 2001-11-28 Akim Demaille <akim@epita.fr>
12885
12886 * src/reduce.c (dump_grammar): Don't translate trace messages.
12887
12888 2001-11-28 Akim Demaille <akim@epita.fr>
12889
12890 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
12891 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
12892 as all tags are free'ed afterwards.
12893 From Enrico Scholz.
12894
12895 2001-11-27 Paul Eggert <eggert@twinsun.com>
12896
12897 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
12898 use alloca when we didn't want to, and vice versa.
12899
12900 2001-11-27 Marc Autret <autret_m@epita.fr>
12901
12902 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
12903 initialization.
12904 * src/output.c (prepare): Remove its update.
12905
12906 2001-11-27 Marc Autret <autret_m@epita.fr>
12907
12908 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
12909 Use %error-verbose.
12910
12911 2001-11-27 Marc Autret <autret_m@epita.fr>
12912
12913 * src/bison.simple: Remove YYERROR_VERBOSE using.
12914 Use %%error_verbose.
12915 (yyparse): Likewise.
12916 * src/output.c (prepare): Give its final value.
12917 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
12918 * src/getargs.h: Add its extern declaration.
12919 * src/getargs.c (error_verbose_flag): New int.
12920 (getargs): Update to catch new case.
12921 * src/options.c (option_table): 'error-verbose' is a new option.
12922 (shortopts): Update.
12923
12924 2001-11-27 Akim Demaille <akim@epita.fr>
12925
12926 * src/system.h: Use intl/libgettext.h.
12927 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
12928
12929 2001-11-27 Akim Demaille <akim@epita.fr>
12930
12931 * tests/torture.at (Exploding the Stack Size with Malloc):
12932 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
12933
12934 2001-11-27 Akim Demaille <akim@epita.fr>
12935
12936 * src/files.c: Include error.h.
12937 Reported by Hans Aberg.
12938
12939 2001-11-26 Marc Autret <autret_m@epita.fr>
12940
12941 * src/reader.c (parse_include_decl): New, not yet implemented.
12942 (read_declarations): Add case tok_include.
12943 * src/getargs.h (include): Add its extern definition.
12944 * src/getargs.c (include): New const char *.
12945 (getargs): Add case '-I'.
12946 * src/options.c (option_table): Add include as command line and
12947 percent option.
12948 * src/lex.h (token_t): Add tok_include.
12949
12950 2001-11-26 Akim Demaille <akim@epita.fr>
12951
12952 * src/reader.c (readgram): Make sure rules for mid-rule actions
12953 have a lineno equal to that of their host rule.
12954 Reported by Hans Aberg.
12955 * tests/regression.at (Rule Line Numbers): New.
12956
12957 2001-11-26 Akim Demaille <akim@epita.fr>
12958
12959 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
12960 size_ts.
12961
12962 2001-11-26 Akim Demaille <akim@epita.fr>
12963
12964 * src/complain.c, src/complain.h (error): Remove, provided by
12965 lib/error.[ch].
12966
12967 2001-11-26 Akim Demaille <akim@epita.fr>
12968
12969 * src/reader.c (read_declarations): Don't abort on tok_illegal,
12970 issue an error message.
12971 * tests/regression.at (Invalid %directive): New.
12972 Reported by Hans Aberg.
12973
12974 2001-11-26 Akim Demaille <akim@epita.fr>
12975
12976 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
12977 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12978
12979 2001-11-26 Akim Demaille <akim@epita.fr>
12980
12981 * src/conflicts.c (conflicts_print): Don't complain at all when
12982 there are no reduce/reduce conflicts, and as many shift/reduce
12983 conflicts as expected.
12984 * tests/regression.at (%expect right): Adjust.
12985
12986 2001-11-23 Akim Demaille <akim@epita.fr>
12987
12988 * lib/alloca.c: Update, from fileutils.
12989
12990 2001-11-23 Akim Demaille <akim@epita.fr>
12991
12992 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
12993
12994 2001-11-23 Akim Demaille <akim@epita.fr>
12995
12996 * src/system.h: Include alloca.h.
12997 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
12998
12999 2001-11-23 Akim Demaille <akim@epita.fr>
13000
13001 * src/print_graph.c (print_actions): Remove `rule', unused.
13002 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13003 pacify GCC's signed < unsigned warnings.
13004 * src/closure.c (itemsetsize): Likewise.
13005 * src/reader.c (symbol_list_new): Static.
13006
13007 2001-11-23 Akim Demaille <akim@epita.fr>
13008
13009 Attaching lineno to buckets is stupid, since only one copy of each
13010 symbol is kept, only the line of the first occurrence is kept too.
13011
13012 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13013 * src/reader.c (rline_allocated): Remove, unused.
13014 (symbol_list): Have a `line' member.
13015 (symbol_list_new): New.
13016 (readgram): Use it.
13017 * src/print.c (print_grammar): Output the rule line numbers.
13018 * tests/regression.at (Solved SR Conflicts)
13019 (Unresolved SR Conflicts): Adjust.
13020 Reported by Hans Aberg.
13021
13022 2001-11-22 Marc Autret <autret_m@epita.fr>
13023
13024 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13025
13026 2001-11-22 Marc Autret <autret_m@epita.fr>
13027
13028 * src/muscle_tab.c (muscle_init): Remove initialization of
13029 skeleton muscle.
13030 * src/output.c (output_master_parser): Do it here.
13031
13032 2001-11-20 Akim Demaille <akim@epita.fr>
13033
13034 * po/sv.po: New.
13035 * configure.in (ALL_LINGUAS): Adjust.
13036 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
13037 longer contains strings to translate.
13038
13039 2001-11-19 Akim Demaille <akim@epita.fr>
13040
13041 * src/conflicts.c (conflicts_print): Add a missing \n.
13042
13043 2001-11-19 Akim Demaille <akim@epita.fr>
13044
13045 * src/nullable.c (nullable_print): New.
13046 (set_nullable): Call it when tracing.
13047 Better locality of variables.
13048
13049 2001-11-19 Akim Demaille <akim@epita.fr>
13050
13051 * src/print.c (print_actions): Better locality of variables.
13052
13053 2001-11-19 Akim Demaille <akim@epita.fr>
13054
13055 * src/derives.c (print_derives): Fix and enrich.
13056 * src/closure.c (print_fderives): Likewise.
13057
13058 2001-11-19 Akim Demaille <akim@epita.fr>
13059
13060 * src/closure.c (itemsetend): Remove, replaced with...
13061 (itemsetsize): new.
13062
13063 2001-11-19 Akim Demaille <akim@epita.fr>
13064
13065 * src/LR0.c (kernel_end): Remove, replaced with...
13066 (kernel_size): new.
13067
13068 2001-11-19 Akim Demaille <akim@epita.fr>
13069
13070 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
13071 to clarify.
13072
13073 2001-11-19 Akim Demaille <akim@epita.fr>
13074
13075 * src/closure.c (closure): Use arrays instead of pointers to clarify.
13076
13077 2001-11-19 Akim Demaille <akim@epita.fr>
13078
13079 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
13080 trace messages.
13081 * src/LR0.c: Likewise.
13082 (allocate_itemsets): Use arrays instead of pointers to clarify.
13083
13084 2001-11-19 Akim Demaille <akim@epita.fr>
13085
13086 * src/getargs.c (statistics_flag): Replace with...
13087 (trace_flag): New.
13088 (longopts): Accept --trace instead of --statistics.
13089 * src/getargs.h, src/options.c: Adjust.
13090 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
13091 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
13092
13093 2001-11-19 Akim Demaille <akim@epita.fr>
13094
13095 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
13096 pointers to clarify the code.
13097 (save_reductions, save_shifts): Factor common parts of alternatives.
13098
13099 2001-11-19 Akim Demaille <akim@epita.fr>
13100
13101 * src/LR0.c (new_state, get_state): Complete TRACE code.
13102 * src/closure.c: Include `reader.h' to get `tags', needed by the
13103 trace code.
13104 Rename the conditional DEBUG as TRACE.
13105 Output consistently TRACEs to stderr, not stdout.
13106 * src/derives.c: Likewise.
13107 * src/reduce.c: (inaccessable_symbols): Using if is better style
13108 than goto.
13109 Use `#if TRACE' instead of `#if 0' for tracing code.
13110
13111 2001-11-19 Akim Demaille <akim@epita.fr>
13112
13113 * src/system.h (LIST_FREE, shortcpy): New.
13114 * src/LR0.c: Use them.
13115 * src/output.c (free_itemsets, free_reductions, free_shifts):
13116 Remove, replaced by LIST_FREE.
13117
13118 2001-11-19 Akim Demaille <akim@epita.fr>
13119
13120 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
13121 (REDUCTIONS_ALLOC): New.
13122 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
13123 allocation.
13124
13125 2001-11-19 Akim Demaille <akim@epita.fr>
13126
13127 * src/LR0.c (new_state): Complete trace code.
13128 * src/nullable.c (set_nullable): Don't translate traces.
13129
13130 2001-11-19 Akim Demaille <akim@epita.fr>
13131
13132 * src/print_graph.c (print_core): Better locality of variables.
13133 * src/print.c (print_core): Likewise.
13134
13135 2001-11-19 Akim Demaille <akim@epita.fr>
13136
13137 * src/vcg.c: You do the output, so you are responsible of the
13138 handling of VCG syntax, in particular: use quotearg.
13139 * src/print_graph.c: Don't.
13140 (print_actions): Don't output the actions as part of the nodes,
13141 since that's the job of the edges.
13142 (print_state): Don't output by hand: fill the node description,
13143 and ask for its output.
13144
13145 2001-11-19 Akim Demaille <akim@epita.fr>
13146
13147 * src/bison.simple (yyparse): When verbosely reporting an error,
13148 no longer put additional quotes around token names.
13149 * tests/calc.at: Adjust.
13150
13151 2001-11-19 Akim Demaille <akim@epita.fr>
13152
13153 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
13154 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
13155 * src/output.c: Adjust.
13156
13157 2001-11-19 Akim Demaille <akim@epita.fr>
13158
13159 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
13160 (rule_t): this.
13161 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
13162
13163 2001-11-19 Akim Demaille <akim@epita.fr>
13164
13165 * src/gram.h (rule_t): New.
13166 (rule_table): New.
13167 (rrhs, rlhs): Remove, part of state_t.
13168 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
13169 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13170 * src/reader.c, src/reduce.c: Adjust.
13171
13172 2001-11-19 Akim Demaille <akim@epita.fr>
13173
13174 * src/reader.c (symbols_output): New, extracted from...
13175 (packsymbols): Here.
13176 (reader): Call it.
13177
13178 2001-11-19 Akim Demaille <akim@epita.fr>
13179
13180 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
13181 (maxrhs): this new function.
13182
13183 2001-11-19 Akim Demaille <akim@epita.fr>
13184
13185 * src/lalr.c (F): New macro to access the variable F.
13186 Adjust.
13187
13188 2001-11-19 Akim Demaille <akim@epita.fr>
13189
13190 * src/lalr.h (LA): New macro to access the variable LA.
13191 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13192 * src/lalr.c: Adjust.
13193
13194 2001-11-19 Akim Demaille <akim@epita.fr>
13195
13196 * src/lalr.c (initialize_LA): Only initialize LA. Let...
13197 (set_state_table): handle the `lookaheads' members.
13198
13199 2001-11-19 Akim Demaille <akim@epita.fr>
13200
13201 * src/lalr.h (lookaheads): Removed array, whose contents is now
13202 a member of...
13203 (state_t): this structure.
13204 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13205 Adjust.
13206
13207 2001-11-19 Akim Demaille <akim@epita.fr>
13208
13209 * src/lalr.h (consistent): Removed array, whose contents is now
13210 a member of...
13211 (state_t): this structure.
13212 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13213 Adjust.
13214
13215 2001-11-19 Akim Demaille <akim@epita.fr>
13216
13217 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
13218 contents are now members of...
13219 (state_t): this structure.
13220 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13221 Adjust.
13222
13223 2001-11-19 Akim Demaille <akim@epita.fr>
13224
13225 * src/lalr.h (state_t): New.
13226 (state_table): Be a state_t * instead of a core **.
13227 (accessing_symbol): Remove, part of state_t.
13228 * src/lalr.c: Adjust.
13229 (set_accessing_symbol): Merge into...
13230 (set_state_table): this.
13231 * src/print_graph.c, src/conflicts.c: Adjust.
13232
13233 2001-11-14 Akim Demaille <akim@epita.fr>
13234
13235 * tests/calc.at, tests/output.at, tests/regression.at,
13236 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
13237 now the tests are run in private dirs, therefore AC_CLEANUP and
13238 family can be simplified to 0-ary.
13239 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
13240 use abs. path to find config.h.
13241 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
13242 stderr, there can be way too much random noise.
13243 Instead pass -Werror to GCC and rely on the exit status.
13244 Reported by Wolfram Wagner.
13245
13246 2001-11-14 Akim Demaille <akim@epita.fr>
13247
13248 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
13249 defined only if yyoverflow is defined, to avoid `warning: unused
13250 variable `yyvs1''.
13251 Reported by The Test Suite.
13252
13253 2001-11-14 Akim Demaille <akim@epita.fr>
13254
13255 * src/print.c: Include reduce.h.
13256 Reported by Hans Aberg.
13257
13258 2001-11-14 Akim Demaille <akim@epita.fr>
13259
13260 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
13261 Revert a previous patch: these are really const.
13262 * src/conflicts.c (conflict_report): Additional useless pair of
13263 braces to pacify GCC's warnings for `if () if () {} else {}'.
13264 * src/lex.c (parse_percent_token): Replace equal_offset with
13265 arg_offset.
13266 arg is const.
13267 Be sure to strdup `arg' when used, since there is no reason for
13268 token_buffer not to change.
13269
13270 2001-11-14 Akim Demaille <akim@epita.fr>
13271
13272 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
13273 definition.
13274 * src/main.c (main): Use them.
13275 Suggested by Hans Aberg.
13276
13277 2001-11-12 Akim Demaille <akim@epita.fr>
13278
13279 * src/system.h (ngettext): Now that we use ngettext, be sure to
13280 provide a default definition when NLS are not used.
13281
13282 2001-11-12 Akim Demaille <akim@epita.fr>
13283
13284 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
13285 Use @kbd to denote user input.
13286 (Language and Grammar): ANSIfy the example.
13287 Adjust its layout for info/notinfo.
13288 (Location Tracking Calc): Output error messages to stderr.
13289 Output locations in a more GNUtically correct way.
13290 Fix a couple of Englishos.
13291 Adjust @group/@end group pairs.
13292
13293 2001-11-12 Akim Demaille <akim@epita.fr>
13294
13295 %expect was not functioning at all.
13296
13297 * src/conflicts.c (expected_conflicts): Set to -1.
13298 (conflict_report): Use ngettext.
13299 (conflicts_print): Check %expect and make its violation an error.
13300 * doc/bison.texinfo (Expect Decl): Adjust.
13301 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
13302 * tests/regression.at (%expect not enough, %expect right)
13303 (%expect too much): New.
13304
13305 2001-11-12 Akim Demaille <akim@epita.fr>
13306
13307 * tests/regression.at (Conflicts): Rename as...
13308 (Unresolved SR Conflicts): this.
13309 (Solved SR Conflicts): New.
13310
13311 2001-11-12 Akim Demaille <akim@epita.fr>
13312
13313 * src/reduce.c (print_results): Rename as...
13314 (reduce_output): This.
13315 Output to OUT, passed as argument, instead of output_obstack.
13316 (dump_grammar): Likewise.
13317 (reduce_free): New.
13318 Also free V1.
13319 (reduce_grammar): No longer call reduce_output, since...
13320 * src/print.c (print_results): do it.
13321 * src/main.c (main): Call reduce_free;
13322
13323 2001-11-12 Akim Demaille <akim@epita.fr>
13324
13325 * src/conflicts.c (print_reductions): Accept OUT as argument.
13326 Output to it, not to output_obstack.
13327 * src/print.c (print_actions): Adjust.
13328
13329 2001-11-12 Akim Demaille <akim@epita.fr>
13330
13331 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
13332 the result instead of using...
13333 (src_total, rrc_total, src_count, rrc_count): Remove.
13334 (any_conflicts): Remove.
13335 (print_conflicts): Split into...
13336 (conflicts_print, conflicts_output): New.
13337 * src/conflicts.h: Adjust.
13338 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
13339 * src/print.c (print_grammar): Issue `\n' between two rules.
13340 * tests/regression.at (Conflicts): New.
13341 Reported by Tom Lane.
13342
13343 2001-11-12 Akim Demaille <akim@epita.fr>
13344
13345 * tests/regression.at (Invalid input): Remove, duplicate with
13346 ``Invalid input: 1''.
13347
13348 2001-11-12 Akim Demaille <akim@epita.fr>
13349
13350 * tests/torture.at (AT_DATA_STACK_TORTURE)
13351 (Exploding the Stack Size with Alloca)
13352 (Exploding the Stack Size with Malloc): New.
13353
13354 2001-11-12 Akim Demaille <akim@epita.fr>
13355
13356 * src/bison.simple (YYSTACK_REALLOC): New.
13357 (yyparse) [!yyoverflow]: Use it and free the old stack.
13358 Reported by Per Allansson.
13359
13360 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
13361
13362 * src/bison.simple: Define type yystype instead of YYSTYPE, and
13363 define CPP macro, which substitute YYSTYPE by yystype.
13364 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
13365 with yyltype/YYLTYPE. This allows inclusion of the generated
13366 header within the parser if the compiler, such as GGC, accepts
13367 multiple equivalent #defines.
13368 From Akim.
13369
13370 2001-11-05 Akim Demaille <akim@epita.fr>
13371
13372 * src/reader.c (symbols_output): New, extracted from...
13373 (packsymbols): here.
13374 (reader): Adjust.
13375
13376 2001-11-05 Akim Demaille <akim@epita.fr>
13377
13378 * src/lex.c (parse_percent_token): s/quotearg/quote/.
13379
13380 2001-11-05 Akim Demaille <akim@epita.fr>
13381
13382 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
13383 pattern.
13384
13385 2001-11-05 Akim Demaille <akim@epita.fr>
13386
13387 * src/options.h (struct option_table_struct): set_flags is void*.
13388 * src/options.c (longopts): Support `--output' and `%output'.
13389 (usage): Adjust.
13390 * src/lex.h (tok_setopt): Remove, replaced with...
13391 (tok_intopt, tok_stropt): these new guys.
13392 * src/lex.c (getopt.h): Not needed.
13393 (token_buffer, unlexed_token_buffer): Not const.
13394 (percent_table): Promote `-' over `_' in directive names.
13395 Active `%name-prefix', `file-prefix', and `output'.
13396 (parse_percent_token): Accept possible arguments to directives.
13397 Promote `-' over `_' in directive names.
13398
13399 2001-11-04 Akim Demaille <akim@epita.fr>
13400
13401 * doc/bison.texinfo (Decl Summary): Split the list into
13402 `directives for grammars' and `directives for bison'.
13403 Sort'em.
13404 Add description of `%name-prefix', `file-prefix', and `output'.
13405 Promote `-' over `_' in directive names.
13406 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
13407 Simplify the description of `--name-prefix'.
13408 Promote `-' over `_' in directive names.
13409 Promote `--output' over `--output-file'.
13410 Fix the description of `--defines'.
13411 * tests/output.at: Exercise %file-prefix and %output.
13412
13413 2001-11-02 Akim Demaille <akim@epita.fr>
13414
13415 * doc/refcard.tex: Update.
13416
13417 2001-11-02 Akim Demaille <akim@epita.fr>
13418
13419 * src/symtab.h (SUNDEF): New.
13420 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
13421 stand for `uninitialized', instead of 0.
13422 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
13423 * src/lex.c (lex): Adjust.
13424
13425 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
13426 Number it 0.
13427 Let yylex return it instead of a plain 0.
13428 Reported by Dick Streefland.
13429
13430 2001-11-02 Akim Demaille <akim@epita.fr>
13431
13432 * tests/regression.at (Mixing %token styles): New test.
13433
13434 2001-11-02 Akim Demaille <akim@epita.fr>
13435
13436 * src/reader.c (parse_thong_decl): Formatting changes.
13437 (token_translations_init): New, extracted from...
13438 (packsymbols): Here.
13439 Adjust.
13440
13441 2001-11-01 Akim Demaille <akim@epita.fr>
13442
13443 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13444 Check that `9foo.y' produces correct cpp guards.
13445 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13446 guards.
13447 Reported by Wwp.
13448
13449 2001-11-01 Akim Demaille <akim@epita.fr>
13450
13451 * tests/regression.at (Invalid input: 2): New.
13452 * src/lex.c (unlexed_token_buffer): New.
13453 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13454 too.
13455 Reported by Wwp.
13456
13457 2001-11-01 Akim Demaille <akim@epita.fr>
13458
13459 * tests/calc.at: Catch up with 1.30.
13460 * configure.in: Bump to 1.49a.
13461 Adjust to newer Autotest.
13462
13463 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
13464
13465 * src/conflicts.c: Move global variables rrc_total and src_total ...
13466 (print_conflicts): here.
13467 * src/output.c (output): Free global variable user_toknums.
13468 * src/lex.c (token_obstack): Become static.
13469
13470 2001-10-18 Akim Demaille <akim@epita.fr>
13471
13472 * tests/atlocal.in (GCC): Add.
13473 * tests/calc.at: s/m4_match/m4_bmatch/.
13474 s/m4_patsubst/m4_bpatsubst/.
13475 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13476 * configure.in: AC_SUBST(GCC).
13477
13478 2001-10-14 Marc Autret <autret_m@epita.fr>
13479
13480 * src/options.c (create_long_option_table): Fix.
13481
13482 2001-10-10 Akim Demaille <akim@epita.fr>
13483
13484 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13485
13486 2001-10-04 Akim Demaille <akim@epita.fr>
13487
13488 * src/reader.c (parse_union_decl): Push the caracters in
13489 union_obstack, not attrs_obstack.
13490
13491 2001-10-04 Akim Demaille <akim@epita.fr>
13492
13493 Merge in the branch 1.29.
13494
13495 * src/reader.c (packsymbols): Use a temporary obstack for
13496 `%%tokendef', since output_stack is already used elsewhere.
13497
13498 2001-10-02 Akim Demaille <akim@epita.fr>
13499
13500 Bump 1.29d.
13501
13502 2001-10-02 Akim Demaille <akim@epita.fr>
13503
13504 Version 1.29c.
13505
13506 2001-10-02 Akim Demaille <akim@epita.fr>
13507
13508 * tests/regression.at (Invalid CPP headers): New.
13509 From Alexander Belopolsky.
13510 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
13511
13512 2001-10-02 Akim Demaille <akim@epita.fr>
13513
13514 * tests/regression.at (Invalid input): New.
13515 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
13516 Reported by Shura.
13517
13518 2001-10-02 Akim Demaille <akim@epita.fr>
13519
13520 * tests/calc.at: Now that --debug works, the tests must be adjusted.
13521
13522 2001-10-02 Akim Demaille <akim@epita.fr>
13523
13524 * src/output.c (output_parser): Assert `skeleton'.
13525 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
13526 systems.
13527 From Shura.
13528
13529 2001-10-01 Marc Autret <autret_m@epita.fr>
13530
13531 * src/lex.h: Echo modifications.
13532 * src/lex.c (unlex): Parameter is now token_t.
13533 From Hans Aberg.
13534
13535 2001-10-01 Marc Autret <autret_m@epita.fr>
13536
13537 * src/main.c: Include lex.h.
13538 From Hans Aberg.
13539
13540 2001-09-29 Akim Demaille <akim@epita.fr>
13541
13542 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
13543
13544 2001-09-28 Akim Demaille <akim@epita.fr>
13545
13546 * tests/testsuite.at: Update to newer Autotest.
13547 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
13548
13549 2001-09-27 Akim Demaille <akim@epita.fr>
13550
13551 Position independent wrapper.
13552
13553 * tests/bison: Remove.
13554 * tests/bison.in: New.
13555 * configure.in: Adjust.
13556
13557 2001-09-27 Paul Eggert <eggert@twinsun.com>
13558
13559 Port quotearg fixes from tar 1.13.24.
13560
13561 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
13562 tm to be declared.
13563 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
13564 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
13565
13566 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
13567 * m4/mbrtowc.m4: New file.
13568 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
13569 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
13570
13571 2001-09-27 Akim Demaille <akim@epita.fr>
13572
13573 Bump to 1.29c.
13574
13575 2001-09-27 Akim Demaille <akim@epita.fr>
13576
13577 Version 1.29b.
13578
13579 2001-09-25 Akim Demaille <akim@epita.fr>
13580
13581 * src/system.h: Include `xalloc.h'.
13582 Remove it from the C files.
13583 * src/files.c (output_files): Free the obstacks.
13584 * src/lex.c (init_lex): Rename as...
13585 (lex_init): this.
13586 (lex_free): New.
13587 * src/main.c (main): Use it.
13588
13589 2001-09-24 Marc Autret <autret_m@epita.fr>
13590
13591 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
13592 to output informations in fout (FILE*).
13593 (open_graph, close_graph): Likewise.
13594 (output_graph, output_edge, output_node): Likewise.
13595 * src/vcg.h: Update function prototypes.
13596 * src/print_graph.c (print_graph): Open output graph file.
13597 (print_actions): Adjust.
13598 * src/files.h: Remove extern declaration.
13599 * src/files.c: Remove graph_obstack declaration.
13600 (open_files): Remove graph_obstack initialization.
13601 (output_files): Remove graph_obstack saving.
13602
13603 2001-09-24 Marc Autret <autret_m@epita.fr>
13604
13605 * src/files.c (compute_output_file_names): Fix.
13606
13607 2001-09-24 Marc Autret <autret_m@epita.fr>,
13608 Akim Demaille <akim@epita.fr>
13609
13610 * src/reader.c (reader): Remove call to free_symtab ().
13611 * src/main.c (main): Call it here.
13612 Include symtab.h.
13613 * src/conflicts.c (initialize_conflicts): Rename as...
13614 (solve_conflicts): this.
13615 * src/print.c (print_core, print_actions, print_state)
13616 (print_grammar): Dump to a file instead a `output_obstack'.
13617 (print_results): Dump `output_obstack', and then proceed with the
13618 FILE *.
13619 * src/files.c (compute_output_file_names, close_files): New.
13620 (output_files): Adjust.
13621 * src/main.c (main): Adjust.
13622
13623 2001-09-23 Marc Autret <autret_m@epita.fr>
13624
13625 * src/files.c (compute_header_macro): Computes header macro name
13626 from spec_defines_file when given.
13627
13628 2001-09-23 Marc Autret <autret_m@epita.fr>
13629
13630 * src/files.c (output_files): Add default extensions.
13631
13632 2001-09-22 Akim Demaille <akim@epita.fr>
13633
13634 * src/conflicts.c (finalize_conflicts): Rename as...
13635 (free_conflicts): this.
13636
13637 2001-09-22 Akim Demaille <akim@epita.fr>
13638
13639 * src/gram.c (gram_free): Rename back as...
13640 (dummy): this.
13641 (output_token_translations): Free `token_translations'.
13642 * src/symtab.c (free_symtab): Free the tag field.
13643
13644 2001-09-22 Akim Demaille <akim@epita.fr>
13645
13646 Remove `translations' as it is always set to true.
13647
13648 * src/gram.h: Adjust.
13649 * src/reader.c (packsymbols, parse_token_decl): Adjust
13650 * src/print.c (print_grammar): Adjust.
13651 * src/output.c (output_token_translations): Adjust.
13652 * src/lex.c (lex): Adjust.
13653 * src/gram.c: Be sure the set pointers to NULL.
13654 (dummy): Rename as...
13655 (gram_free): this.
13656
13657 2001-09-22 Akim Demaille <akim@epita.fr>
13658
13659 * configure.in: Invoke AM_LIB_DMALLOC.
13660 * src/system.h: Use dmalloc.
13661 * src/LR0.c: Be sure to have pointers initialized to NULL.
13662 (allocate_itemsets): Allocate kernel_items only if needed.
13663
13664 2001-09-22 Akim Demaille <akim@epita.fr>
13665
13666 * configure.in: Bump to 1.29b.
13667 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13668 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13669 need xmalloc.c in calc.y.
13670 From Pascal Bart.
13671
13672 2001-09-21 Akim Demaille <akim@epita.fr>
13673
13674 Version 1.29a.
13675 * Makefile.maint, config/config.guess, config/config.sub,
13676 * config/missing: Update from masters.
13677 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13678 upon package.m4.
13679 * configure.in (ALL_LINGUAS): Add `tr'.
13680
13681 2001-09-21 Akim Demaille <akim@epita.fr>
13682
13683 * tests/Makefile.am (package.m4): Move to...
13684 ($(srcdir)/$(TESTSUITE)): here.
13685
13686 2001-09-20 Akim Demaille <akim@epita.fr>
13687
13688 * src/complain.c: No longer try to be standalone: use system.h.
13689 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13690 * src/complain.h: Likewise.
13691 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13692 Remove the unused variable `n'.
13693 From Albert Chin-A-Young.
13694
13695 2001-09-18 Marc Autret <autret_m@epita.fr>
13696
13697 * doc/bison.1: Update.
13698 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13699 descriptions.
13700 (Option Cross Key): Update.
13701 Add --graph.
13702
13703 2001-09-18 Marc Autret <autret_m@epita.fr>
13704
13705 * tests/regression.at: New test (comment in %union).
13706
13707 2001-09-18 Marc Autret <autret_m@epita.fr>
13708
13709 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
13710 do that.
13711 Reported by Keith Browne.
13712
13713 2001-09-18 Marc Autret <autret_m@epita.fr>
13714
13715 * tests/output.at: Add tests for --defines and --graph.
13716
13717 2001-09-18 Marc Autret <autret_m@epita.fr>
13718
13719 * tests/output.at: Removes tests of %{header,src}_extension features.
13720
13721 2001-09-18 Akim Demaille <akim@epita.fr>
13722
13723 * tests/Makefile.am (package.m4): New.
13724 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
13725 (_AT_CHECK_CALC_ERROR): Likewise.
13726 Factor the `, ' part of verbose error messages.
13727
13728 2001-09-18 Marc Autret <autret_m@epita.fr>
13729
13730 * src/getargs.c (longopts): Declare --defines and --graph as options
13731 with optional arguments.
13732 * src/files.h: Add extern declarations.
13733 * src/files.c (spec_graph_file, spec_defines_file): New.
13734 (output_files): Update.
13735 Remove CPP-outed code.
13736
13737 2001-09-18 Marc Autret <autret_m@epita.fr>
13738
13739 Turn off %{source,header}_extension feature.
13740
13741 * src/files.c (compute_exts_from_gf): Update.
13742 (compute_exts_from_src): Update.
13743 (output_files): CPP-out useless code.
13744 * src/files.h: Remove {header,source}_extension extern declarations.
13745 * src/reader.c (parse_dquoted_param): CPP-out.
13746 (parse_header_extension_decl): Remove.
13747 (parse_source_extension_decl): Remove.
13748 (read_declarations): Remove cases tok_{hdrext,srcext}.
13749 * src/lex.c (percent_table): Remove {header,source}_extension entries.
13750 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
13751
13752 2001-09-10 Akim Demaille <akim@epita.fr>
13753
13754 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
13755 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
13756 (AT_CHECK_OUTPUT): this.
13757 Merely check ls' exit status, its output is useless.
13758
13759 2001-09-10 Akim Demaille <akim@epita.fr>
13760
13761 * tests/calc.at: Use m4_match.
13762 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
13763
13764 2001-09-10 Marc Autret <autret_m@epita.fr>,
13765 Akim Demaille <akim@epita.fr>
13766
13767 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
13768 enum color_e.
13769 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
13770 to `normal'.
13771 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
13772 * src/lex.h: Adjust prototype.
13773 (token_t): Add `tok_undef'.
13774 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
13775 (parse_percent_token): Now returns token_t.
13776 Add default statement in switch.
13777 (lex): Separate `c' as an input variable, from the token_t result
13778 part.
13779 (unlexed): Is a token_t.
13780
13781 2001-09-10 Akim Demaille <akim@epita.fr>
13782
13783 * configure.in: Bump to 1.29a.
13784
13785 2001-09-07 Akim Demaille <akim@epita.fr>
13786
13787 Version 1.29.
13788
13789 2001-08-30 Akim Demaille <akim@epita.fr>
13790
13791 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
13792 * m4/atconfig.m4: Remove.
13793 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
13794 * tests/bison: New.
13795 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
13796 m4_if, m4_patsubst, and m4_regexp.
13797 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
13798 `input' file instead of echo.
13799
13800 2001-08-29 Akim Demaille <akim@epita.fr>
13801
13802 Bump to 1.28e.
13803
13804 2001-08-29 Akim Demaille <akim@epita.fr>
13805
13806 Version 1.28d.
13807
13808 2001-08-29 Paul Eggert <eggert@twinsun.com>
13809
13810 * src/bison.simple (yyparse): Don't take the address of an
13811 item before the start of an array, as that doesn't conform to
13812 the C Standard.
13813
13814 2001-08-29 Robert Anisko <anisko_r@epita.fr>
13815
13816 * doc/bison.texinfo (Location Tracking Calc): New node.
13817
13818 2001-08-29 Paul Eggert <eggert@twinsun.com>
13819
13820 * src/output.c (output): Do not define const, as this now
13821 causes more problems than it cures.
13822
13823 2001-08-29 Akim Demaille <akim@epita.fr>
13824
13825 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
13826 the nodes.
13827 Be sure to tag the `detailmenu'.
13828
13829 2001-08-29 Akim Demaille <akim@epita.fr>
13830
13831 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
13832 download in a tmp dir.
13833
13834 2001-08-28 Marc Autret <autret_m@epita.fr>
13835
13836 * config/depcomp: New file.
13837
13838 2001-08-28 Marc Autret <autret_m@epita.fr>
13839
13840 * doc/bison.1 (mandoc): Adjust.
13841 From Juan Manuel Guerrero.
13842
13843 2001-08-28 Marc Autret <autret_m@epita.fr>
13844
13845 * src/print_graph.c (print_state): Fix.
13846
13847 2001-08-27 Marc Autret <autret_m@epita.fr>
13848
13849 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
13850 char * members.
13851 Echo modifications to the functions prototypes.
13852 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
13853
13854 2001-08-27 Marc Autret <autret_m@epita.fr>
13855
13856 * src/vcg.c: Include `xalloc.h'.
13857 (add_colorentry): New.
13858 (add_classname): New.
13859 (add_infoname): New.
13860 * src/vcg.h: Add new prototypes.
13861
13862 2001-08-27 Akim Demaille <akim@epita.fr>
13863
13864 * Makefile.maint: Sync. again with CVS Autoconf.
13865
13866 2001-08-27 Akim Demaille <akim@epita.fr>
13867
13868 * Makefile.maint: Formatting changes.
13869 (po-update, cvs-update, update): New targets.
13870 (AMTAR): Remove.
13871
13872 2001-08-27 Akim Demaille <akim@epita.fr>
13873
13874 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13875 * Makefile.maint: Sync. with CVS Autoconf.
13876
13877 2001-08-27 Marc Autret <autret_m@epita.fr>
13878
13879 * src/vcg.h (struct infoname_s): New.
13880 (struct colorentry_s): New.
13881 (graph_s): New fields {vertical,horizontal}_order in structure.
13882 Add `infoname' field.
13883 Add `colorentry' field;
13884 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
13885 (G_HORIZONTAL_ORDER): New.
13886 (G_INFONAME): New.
13887 (G_COLORENTRY): New.
13888 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
13889 Add output of `infoname'.
13890 Add output of `colorentry'.
13891
13892 2001-08-27 Marc Autret <autret_m@epita.fr>
13893
13894 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
13895 This one shadowed a global parameter.
13896
13897 2001-08-24 Marc Autret <autret_m@epita.fr>
13898
13899 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
13900 instead of `unsigned'.
13901 (print_state): Do not call obstack_object_size () in obstack_grow ()
13902 to avoid macro variables shadowing.
13903
13904 2001-08-23 Marc Autret <autret_m@epita.fr>
13905
13906 * src/lex.c (percent_table): Typo: s/naem/name/.
13907 Add graph option.
13908 Normalize new options declarations.
13909
13910 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
13911
13912 * tests/suite.at: Exercise %header_extension and %source_extension.
13913
13914 2001-08-16 Marc Autret <autret_m@epita.fr>
13915
13916 * src/reader.c (parse_dquoted_param): New.
13917 (parse_header_extension_decl): Use it.
13918 (parse_source_extension_decl): Likewise.
13919
13920 2001-08-16 Marc Autret <autret_m@epita.fr>
13921
13922 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
13923 (get_xxxx_str): Use assert () instead of complain ().
13924 Remove return invokations in default cases.
13925 (get_decision_str): Modify default behaviour. Remove second argument.
13926 Echo modifications on calls.
13927 (output_graph): Fix.
13928
13929 2001-08-16 Marc Autret <autret_m@epita.fr>
13930
13931 * src/getargs.c (usage): Update with ``-g, --graph''.
13932
13933 2001-08-16 Marc Autret <autret_m@epita.fr>
13934
13935 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
13936 (Option Cross Key): Likewise.
13937 * doc/bison.1: Update.
13938
13939 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
13940
13941 * src/output.c (output_master_parser): Don't finish action_obstack.
13942 (output_parser): Don't care about the muscle action, here.
13943 (prepare): Copy the action_obstack in the action muscle.
13944 (output): Free action_obstack.
13945
13946 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
13947
13948 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
13949 will contain `%union' declaration.
13950 (parse_union_decl): Delete #line directive output.
13951 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
13952 informations about %union.
13953 (parse_union_decl): Copy the union_obstack in the muscle stype.
13954 * src/bison.simple: Add new #line directive.
13955 Add typdef %%stype YYSTYPE.
13956
13957 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
13958
13959 * src/bison.simple: Add new `#line' directive.
13960
13961 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
13962
13963 * src/bison.simple: New `#line' directive.
13964 * src/output.c (output_parser): Support new dynamic muscle input_line.
13965
13966 2001-09-22 Marc Autret <autret_m@epita.fr>
13967
13968 * src/output.c (output_master_parser): New.
13969 (output_parser): Be more re-entrant.
13970
13971 2001-09-21 Marc Autret <autret_m@epita.fr>
13972
13973 * src/reader.c (copy_definition, parse_union_decl): Update and use
13974 `linef' muscle.
13975 (copy_action): Likewise.
13976 Use obstack_1grow ().
13977 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
13978
13979 2001-09-21 Marc Autret <autret_m@epita.fr>
13980
13981 * src/options.c (option_table): Adjust.
13982 * src/lex.c (parse_percent_token): Fix.
13983
13984 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
13985
13986 * src/options.c (symtab.h): Include it, need by lex.h.
13987
13988 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
13989
13990 * src/lex.c (parse_percent_token): Change type of variable `tx', which
13991 is now an option_table_struct*.
13992 (option_strcmp): New function option_strcmp.
13993 (parse_percent_token): Call option_strcmp.
13994 * src/getargs.c (xalloc.h, options.h): Include it.
13995 (getargs): Call create_long_option_table.
13996 (getargs): Free longopts at the end of the function.
13997 (shortopts): Move in options.c.
13998 * src/options.c (create_long_option_table): New function. Convert
13999 information from option_table to option structure.
14000 * src/reader.c (options.h): Include it.
14001
14002 * src/Makefile.am: Adjust.
14003 * src/options.c (option_table): Create from longopts and percent_table.
14004 * src/getargs.c (longopts): Delete.
14005 * src/lex.c (struct percent_table_struct): Delete.
14006 (percent_table): Delete.
14007 (options.h): Include it.
14008 * src/options.c: Create.
14009 * src/options.h: Create.
14010 Declare enum opt_access_e.
14011 Define struct option_table_struct.
14012
14013 2001-09-20 Marc Autret <autret_m@epita.fr>
14014
14015 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14016 sections of Bison.
14017
14018 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
14019
14020 * src/bison.simple: s/%%filename/%%skeleton.
14021 * src/muscle_tab.c (getargs.h): Include it.
14022 (muscle_init): Insert new muscle skeleton.
14023
14024 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
14025
14026 * src/output.c (output_parser): Delete unused variable actions_dumped.
14027
14028 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
14029
14030 * src/output.c (output): Delete call to reader_output_yylsp.
14031 * src/reader.c (reader): Likewise.
14032 * src/reader.h: Delete declaration of reader_output_yylsp.
14033
14034 2001-09-02 Marc Autret <autret_m@epita.fr>
14035
14036 * src/reader.c: Include muscle_tab.h.
14037 (parse_union_decl): Update.
14038 (parse_macro_decl): Rename parse_muscle_decl.
14039 Update to use renamed functions and variable.
14040 (read_declarations, copy_action, read_additionnal_code, : Updated
14041 with correct variables and functions names.
14042 (packsymbols, reader): Likewise.
14043
14044 * src/reader.h (muscle_obstack): Extern declaration update.
14045
14046 * src/output.c: Include muscle_tab.h
14047 In all functions using macro_insert, change by using muscle_insert ().
14048 (macro_obstack): Rename muscle_obstack.
14049 Echo modifications in the whole file.
14050 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
14051 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
14052 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
14053
14054 * src/muscle_tab.h: Update double inclusion macros.
14055 (macro_entry_s): Rename muscle_entry_s.
14056 Update prototypes.
14057
14058 * src/muscle_tab.c: Include muscle_tab.h.
14059 Rename macro_tabble to muscle_table.
14060 (mhash1, mhash2, mcmp): Use muscle_entry.
14061 (macro_init): Rename muscle_init. Update.
14062 (macro_insert): Rename muscle_insert. Update.
14063 (macro_find): Rename muscle_find. Update.
14064
14065 * src/main.c: Include muscle_tab.h.
14066 (main): Call muscle_init ().
14067 * src/Makefile.am (bison_SOURCES): Echo modifications.
14068
14069 2001-09-02 Marc Autret <autret_m@epita.fr>
14070
14071 Now the files macro_tab.[ch] are named muscle_tab.[ch].
14072
14073 * src/muscle_tab.c, src/muscle_tab.h: Add files.
14074
14075 2001-09-02 Marc Autret <autret_m@epita.fr>
14076
14077 * src/macrotab.c, src/macrotab.h: Remove.
14078
14079 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
14080
14081 * src/reader.c (copy_guard): Use muscle to specify the `#line'
14082 filename.
14083
14084 2001-09-01 Marc Autret <autret_m@epita.fr>
14085
14086 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
14087 to an explicit value to activate the feature. We do it here.
14088
14089 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14090
14091 * src/output.c (prepare): Delete the `filename' muscule insertion.
14092 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
14093 (parse_union_decl): Likewise.
14094 * src/macrotab.c (macro_init): Initialize filename by infile.
14095
14096 2001-08-31 Marc Autret <autret_m@epita.fr>
14097
14098 * src/bison.simple (YYLSP_NEEDED): New definition.
14099 * src/output.c (prepare): Add macro insertion of `locations_flag'
14100
14101 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14102
14103 * src/output.c (prepare): Delete insertion of previous muscles,
14104 and insert the `prefix' muscles.
14105 * src/macrotab.c (macro_init): Likewise.
14106 (macro_init): Initialization prefix directive by `yy'.
14107 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
14108 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
14109 yylval, yydebug, yyerror, yynerrs and yyparse.
14110 New directive `#define' to substitute yydebug, ... with option
14111 name_prefix.
14112
14113 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14114
14115 * src/main.c (main): Standardize.
14116 * src/output.c (output_table_data, output_parser): Likewise.
14117 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
14118
14119 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
14120
14121 * src/reader.c (read_additionnal_code): Rename %%user_code to
14122 %%epilogue.
14123 * src/output.c (output): Rename %%declarations to %%prologue.
14124 * src/bison.simple: Echo modifications.
14125
14126 2001-08-31 Marc Autret <autret_m@epita.fr>
14127
14128 * src/reader.c (readgram): CleanUp.
14129 (output_token_defines): Likewise.
14130 (packsymbols): Likewise.
14131 (reader): Likewise.
14132 * src/output.c (output): CPP-out useless code.
14133
14134 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
14135
14136 * src/reader.c (reader): Delete obsolete call to function
14137 output_trailers and output_headers.
14138 * src/output.h: Remove obsolete functions prototypes of output_headers
14139 and output_trailers.
14140
14141 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
14142
14143 * src/main.c: Include macrotab.h.
14144 * src/macrotab.h (macro_entry_s): Constify fields.
14145 Adjust functions prototypes.
14146 * src/macrotab.c (macro_insert): Constify key and value.
14147 (macro_find): Constify key.
14148 (macro_insert): Include 'xalloc.h'
14149 (macro_insert): Use XMALLOC.
14150 (macro_find): Constify return value.
14151 * src/output.c (output_table_data): Rename table to table_data.
14152 (output_parser): Constify macro_key, macro_value.
14153
14154 2001-08-30 Marc Autret <autret_m@epita.fr>
14155
14156 * src/reader.c (parse_skel_decl): New.
14157 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
14158 * src/lex.h (token_t): New token `tok_skel'.
14159 * src/lex.c (percent_table): Add skeleton option entry.
14160 Standardize.
14161
14162 2001-08-29 Marc Autret <autret_m@epita.fr>
14163
14164 * src/bison.simple: Add %%user_code directive at the end.
14165 * src/reader.c (read_additionnal_code): New.
14166 (reader): Use it.
14167 * src/output.c (output_program): Remove.
14168 (output): Update.
14169
14170 2001-08-28 Marc Autret <autret_m@epita.fr>
14171
14172 * src/output.c (output_actions): Clean up.
14173 (output_gram): CPP-out useless code.
14174 * src/reader.c (reader): Clean up, CPP-out useless code.
14175
14176 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
14177
14178 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
14179 directive.
14180 * src/bison.simple: Add `%%definitions'.
14181
14182 2001-08-28 Marc Autret <autret_m@epita.fr>
14183
14184 * config/depcomp: New file.
14185
14186 2001-08-27 Paul Eggert <eggert@twinsun.com>
14187
14188 * src/bison.simple (yyparse): Don't take the address of an
14189 item before the start of an array, as that doesn't conform to
14190 the C Standard.
14191
14192 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
14193
14194 * src/output.c (output): Remove the initialization of the macro
14195 obstack. It was done too late here.
14196
14197 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
14198 completely wrong.
14199 (reader): Initialize the macro obstack here, since we need it to grow
14200 '%define' directives.
14201
14202 * src/reader.h: Declare the macro obstack as extern.
14203
14204 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
14205
14206 * src/output.c (output_parser): Fix. Store single '%' characters in
14207 the output obstack instead of throwing them away.
14208
14209 2001-08-27 Akim Demaille <akim@epita.fr>
14210
14211 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14212
14213 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14214
14215 * lib/Makefile.am: Adjust.
14216
14217 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14218
14219 * src/bison.simple: Update and add '%%' directives.
14220
14221 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14222
14223 * src/reader.c (reader): Remove calls to 'output_headers' and
14224 'output_trailers'. Remove some C output.
14225 (readgram): Disable a piece of code that was writing a default
14226 definition for 'YYSTYPE'.
14227 (reader_output_yylsp): Remove.
14228 (packsymbols): Output token defintions to a macro.
14229 (copy_definition): Disable C output.
14230
14231 * src/reader.c (parse_macro_decl): New function used to parse macro
14232 declarations.
14233 (copy_string2): Put the body of copy_string into this new function.
14234 Add a parameter to let the caller choose whether he wants to copy the
14235 string delimiters or not.
14236 (copy_string): Be a simple call to copy_string2 with the last argument
14237 bound to true.
14238 (read_declarations): Add case for macro definition.
14239 (copy_identifier): New.
14240 (parse_macro_decl): Read macro identifiers using copy_identifier
14241 rather than lex.
14242
14243 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14244
14245 * src/output.c (prepare): Add prefixed names.
14246 (output_parser): Output semantic actions.
14247 (output_parser): Fix bug on '%%line' directives.
14248
14249 * src/output.c (output_headers): Remove. The C code printed by this
14250 function should now be in the skeletons.
14251 (output_trailers): Remove.
14252 (output): Disable call to 'reader_output_yylsp'.
14253 (output_rule_data): Do not output tables to the table obstack.
14254
14255 * src/output.c: Remove some C dedicated output.
14256 Improve the use of macro and output obstacks.
14257 (output_defines): Remove.
14258
14259 * src/output.c (output_token_translations): Associate 'translate'
14260 table with a macro. No output to the table obstack.
14261 (output_gram): Same for 'rhs' and 'prhs'.
14262 (output_stos): Same for 'stos'.
14263 (output_rule_data): Same for 'r1' and 'r2'.
14264 (token_actions): Same for 'defact'.
14265 (goto_actions): Same for 'defgoto'.
14266 (output_base): Same for 'pact' and 'pgoto'.
14267 (output_table): Same for 'table'.
14268 (output_check): Same for 'check'.
14269
14270 * src/output.c (output_table_data): New function.
14271 (output_short_table): Remove.
14272 (output_short_or_char_table): Remove.
14273
14274 * src/output.c (output_parser): Replace most of the skeleton copy code
14275 with something new. Skeletons are now processed character by character
14276 rather than line by line, and Bison looks for '%%' macros. This is the
14277 first step in making Bison's output process (a lot) more flexible.
14278 (output_parser): Use the macro table.
14279
14280 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14281
14282 * src/main.c (main): Initialize the macro table.
14283
14284 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14285
14286 * src/lex.c (percent_table): Add tok_define.
14287 * src/lex.h: Add tok_define.
14288
14289 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14290
14291 * src/macrotab.c: New file.
14292 * src/macrotab.h: New file.
14293 * src/Makefile.am: Update.
14294
14295 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
14296
14297 * lib/hash.c: New file.
14298 * lib/hash.h: New file.
14299 * lib/Makefile.am: Update.
14300
14301 2001-08-15 Akim Demaille <akim@epita.fr>
14302
14303 Version 1.28c.
14304
14305 2001-08-15 Marc Autret <autret_m@epita.fr>
14306
14307 * src/reader.c (readgram): Indent output macro YYSTYPE.
14308 (packsymbols): Likewise.
14309 (output_token_defines): Likewise.
14310 * src/files.c: Standardize.
14311 (compute_header_macro): New.
14312 (defines_obstack_save): New. Use compute_header_macro.
14313 (output_files): Update. Use defines_obstack_save.
14314
14315 2001-08-15 Akim Demaille <akim@epita.fr>
14316
14317 * doc/bison.texinfo (Table of Symbols): Document
14318 YYSTACK_USE_ALLOCA.
14319
14320 2001-08-15 Akim Demaille <akim@epita.fr>
14321
14322 * missing: Update from CVS Automake.
14323 * config/config.guess, config/config.sub, config/texinfo.tex:
14324 Update from gnu.org.
14325
14326 2001-08-15 Akim Demaille <akim@epita.fr>
14327
14328 * Makefile.maint: Sync with CVS Autoconf.
14329
14330 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
14331
14332 * doc/bison.texinfo: Include GNU Free Documentation License from
14333 `fdl.texi'.
14334 * doc/fdl.texi: Add to package.
14335
14336 2001-08-14 Marc Autret <autret_m@epita.fr>
14337
14338 Turn on %{source,header}_extension features.
14339
14340 * src/lex.c (percent_table): Un-CPP out header_extension and
14341 source_extension.
14342 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
14343 (compute_exts_from_src): Remove conditions. It restores priorities
14344 between options.
14345
14346 2001-08-14 Marc Autret <autret_m@epita.fr>
14347
14348 * src/files.c (compute_base_names): Add extensions computing when
14349 `--file-prefix' used.
14350 Standardize function calls.
14351
14352 2001-08-13 Marc Autret <autret_m@epita.fr>
14353
14354 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
14355 defining it (defined but null disables alloca).
14356
14357 2001-08-13 Marc Autret <autret_m@epita.fr>
14358
14359 * src/bison.simple (_yy_memcpy): CPP reformat.
14360
14361 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
14362
14363 * tests/atconfig.in (CPPFLAGS): Fix.
14364
14365 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
14366
14367 * doc/bison.texinfo: Include GNU General Public License from
14368 `gpl.texi'.
14369 * doc/gpl.texi: Add to package.
14370
14371 2001-08-10 Marc Autret <autret_m@epita.fr>
14372
14373 * src/print_graph.h: Fix.
14374 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
14375
14376 2001-08-10 Akim Demaille <akim@epita.fr>
14377
14378 * src/system.h: Provide default declarations for stpcpy, strndup,
14379 and strnlen.
14380
14381 2001-08-10 Robert Anisko <anisko_r@epita.fr>
14382
14383 * doc/bison.texinfo (Locations): Update @$ stuff.
14384
14385 2001-08-09 Robert Anisko <anisko_r@epita.fr>
14386
14387 * src/bison.simple (YYLLOC_DEFAULT): Update.
14388 (yyparse): Adjust.
14389
14390 2001-08-08 Marc Autret <autret_m@epita.fr>
14391
14392 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
14393 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
14394 Reported by Fabrice Bauzac.
14395
14396 2001-08-08 Marc Autret <autret_m@epita.fr>
14397
14398 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
14399 * src/vcg.c (output_node): Fix.
14400 * src/vcg.h: Cleanup.
14401 * src/print_graph.c: Add comments.
14402 (node_output_size): New global variable. Simplify the formatting of
14403 the VCG graph output.
14404 (print_actions): Unused code is now used. It notifies the final state
14405 and no action states in the VCG graph. It also give the reduce actions.
14406 The `shift and goto' edges are red and the `go to state' edges are
14407 blue.
14408 Get the current node name and node_obstack by argument.
14409 (node_obstack): New variable.
14410 (print_state): Manage node_obstack.
14411 (print_core): Use node_obstack given by argument.
14412 A node is not only computed here but in print_actions also.
14413 (print_graph): CPP out useless code instead of commenting it.
14414
14415 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
14416
14417 * tests/atconfig.in (CPPFLAGS): Fix.
14418
14419 2001-08-07 Akim Demaille <akim@epita.fr>
14420
14421 * src/print_graph.c (quote): New.
14422 (print_core): Use it.
14423
14424 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
14425
14426 * src/vcg.c (complain.h): Include it.
14427 Unepitaize `return' invocations.
14428 [NDEBUG] (main): Remove.
14429 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
14430 * src/files.c (open_files): Initialize graph_obstack.
14431 * src/print_graph.c (print_actions): CPP out useless code.
14432 (print_core): Don't output the last `\n' in labels.
14433 Use `quote'.
14434 * src/files.c (output_files): Output the VCG file.
14435 * src/main.c (main): Invoke print_graph ();
14436
14437 2001-08-06 Marc Autret <autret_m@epita.fr>
14438
14439 Automaton VCG graph output.
14440 Using option ``-g'' or long option ``--graph'', you can generate
14441 a gram_filename.vcg file containing a VCG description of the LALR (1)
14442 automaton of your grammar.
14443
14444 * src/main.c: Call to print_graph() function.
14445 * src/getargs.h: Update.
14446 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14447 (graph_flag): New flag.
14448 (longopts): Update.
14449 (getargs): Add case `g'.
14450 * src/files.c (graph_obstack): New obstack struct.
14451 (open_files): Initialize new obstack.
14452 (output_files): Saves graph_obstack if required.
14453 * src/files.h (graph_obstack): New extern declaration.
14454 * src/Makefile.am: Add new source files.
14455
14456 2001-08-06 Marc Autret <autret_m@epita.fr>
14457
14458 * src/print_graph.c, src/print_graph.h (graph): New.
14459 * src/vcg.h: New file.
14460 * src/vcg.c: New file, VCG graph handling.
14461
14462 2001-08-06 Marc Autret <autret_m@epita.fr>
14463
14464 Add of %source_extension and %header_extension which specify
14465 the source or/and the header output file extension.
14466
14467 * src/files.c (compute_base_names): Remove initialisation of
14468 src_extension and header_extension.
14469 (compute_exts_from_gf): Update.
14470 (compute_exts_from_src): Update.
14471 (output_files): Update.
14472 * src/reader.c (parse_header_extension_decl): New.
14473 (parse_source_extension_decl): New.
14474 (read_declarations): New case statements for the new tokens.
14475 * src/lex.c (percent_table): Add entries for %source_extension
14476 and %header_extension.
14477 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14478
14479 2001-08-06 Marc Autret <autret_m@epita.fr>
14480
14481 * configure.in: Bump to 1.28c.
14482 * doc/bison.texinfo: Texinfo thingies.
14483
14484 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
14485
14486 * tests/atconfig.in (CPPFLAGS): Add.
14487 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14488
14489 2001-08-03 Akim Demaille <akim@epita.fr>
14490
14491 Version 1.28b.
14492
14493 2001-08-03 Akim Demaille <akim@epita.fr>
14494
14495 * tests/Makefile.am (check-local): Ship testsuite.
14496 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
14497 Include `string.h'.
14498
14499 2001-08-03 Akim Demaille <akim@epita.fr>
14500
14501 * configure.in: Try using -Wformat when compiling.
14502
14503 2001-08-03 Akim Demaille <akim@epita.fr>
14504
14505 * configure.in: Bump to 1.28b.
14506
14507 2001-08-03 Akim Demaille <akim@epita.fr>
14508
14509 * src/complain.c: Adjust strerror_r portability issues.
14510
14511 2001-08-03 Akim Demaille <akim@epita.fr>
14512
14513 Version 1.28a.
14514
14515 2001-08-03 Akim Demaille <akim@epita.fr>
14516
14517 * src/getargs.c, src/getarg.h (skeleton)): Constify.
14518 * src/lex.c (literalchar): Avoid name clashes on `buf'.
14519 * src/getargs.c: Include complain.h.
14520 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
14521 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
14522
14523 2001-08-03 Akim Demaille <akim@epita.fr>
14524
14525 * src/reader.c (readgram): Display hidden chars in error messages.
14526
14527 2001-08-03 Akim Demaille <akim@epita.fr>
14528
14529 Update to gettext 0.10.39.
14530
14531 2001-08-03 Akim Demaille <akim@epita.fr>
14532
14533 * lib/strspn.c: New.
14534
14535 2001-08-01 Marc Autret <autret_m@epita.fr>
14536
14537 * doc/bison.texinfo: Update.
14538 * doc/bison.1 (mandoc): Update.
14539 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
14540 * src/files.c: Support output files extensions computing.
14541 (src_extension): New static variable.
14542 (header_extension): New static variable.
14543 (tr): New function.
14544 (get_extension_index): New function, gets the index of an extension
14545 filename in a string.
14546 (compute_exts_from_gf): New function, computes extensions from the
14547 grammar file extension.
14548 (compute_exts_from_src): New functions, computes extensions from the
14549 C source file extension, file given by ``-o'' option.
14550 (compute_base_names): Update.
14551 (output_files): Update.
14552
14553 2001-08-01 Robert Anisko <anisko_r@epita.fr>
14554
14555 * doc/bison.texi: Document @$.
14556 (Locations): New section.
14557
14558 2001-07-18 Akim Demaille <akim@epita.fr>
14559
14560 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
14561 * config/prev-version.txt, config/move-if-change: New.
14562 * Makefile.am: Adjust.
14563
14564 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
14565
14566 * src/bison.simple (yyparse): Suppress warning `comparaison
14567 between signed and unsigned'.
14568
14569 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
14570
14571 * src/getargs.h (raw_flag): Remove.
14572 * src/getargs.c: Die on `-r'/`--raw'.
14573 * src/lex.c (parse_percent_token): Die on `%raw'.
14574 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
14575 * tests/calc.at: Suppress test with option `--raw'.
14576
14577 2001-07-14 Akim Demaille <akim@epita.fr>
14578
14579 * config/: New.
14580 * configure.in: Require Autoconf 2.50.
14581 Update to gettext 0.10.38.
14582
14583 2001-03-16 Akim Demaille <akim@epita.fr>
14584
14585 * doc/bison.texinfo: ANSIfy the examples.
14586
14587 2001-03-16 Akim Demaille <akim@epita.fr>
14588
14589 * getargs.c (skeleton): New variable.
14590 (longopts): --skeleton is a new option.
14591 (shortopts, getargs): -S is a new option.
14592 * getargs.h: Declare skeleton.
14593 * output.c (output_parser): Use it.
14594
14595 2001-03-16 Akim Demaille <akim@epita.fr>
14596
14597 * m4/strerror_r.m4: New.
14598 * m4/error.m4: Run AC_FUNC_STRERROR_R.
14599 * lib/error.h, lib/error.c: Update.
14600
14601 2001-03-16 Akim Demaille <akim@epita.fr>
14602
14603 * src/getargs.c (longopts): Clean up.
14604
14605 2001-02-21 Akim Demaille <akim@epita.fr>
14606
14607 * src/reader.c (gensym): `gensym_count' is your own.
14608 Use a static buf to create the symbol name, as token_buffer is no
14609 longer a buffer.
14610
14611 2001-02-08 Akim Demaille <akim@epita.fr>
14612
14613 * src/conflicts.c (conflict_report): Be sure not to append to res
14614 between two calls, which could happen if both first sprintf were
14615 skipped, but not the first cp += strlen.
14616
14617 2001-02-08 Akim Demaille <akim@epita.fr>
14618
14619 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
14620 New, from fileutils 4.0.37.
14621 * configure.in: Require Autoconf 2.49c. I took some time before
14622 making this decision. This is the only way out for portability
14623 issues in Bison, it would mean way too much duplicate effort to
14624 import in Bison features implemented in 2.49c since 2.13.
14625 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
14626
14627 2001-02-02 Akim Demaille <akim@epita.fr>
14628
14629 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
14630 * lib/xalloc.h, lib/xmalloc.c: Update.
14631
14632 2001-01-19 Akim Demaille <akim@epita.fr>
14633
14634 Get rid of the ad hoc handling of token_buffer in the scanner: use
14635 the obstacks.
14636
14637 * src/lex.c (token_obstack): New.
14638 (init_lex): Initialize it. No longer call...
14639 (grow_token_buffer): this. Remove it.
14640 Adjust all the places which used it to use the obstack.
14641
14642 2001-01-19 Akim Demaille <akim@epita.fr>
14643
14644 * src/lex.h: Rename all the tokens:
14645 s/\bENDFILE\b/tok_eof/g;
14646 s/\bIDENTIFIER\b/tok_identifier/g;
14647 etc.
14648 Let them be enums, not #define, to ease debugging.
14649 Adjust all the code.
14650
14651 2001-01-18 Akim Demaille <akim@epita.fr>
14652
14653 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
14654 * src/lex.c (maxtoken, grow_token_buffer): Static.
14655
14656 2001-01-18 Akim Demaille <akim@epita.fr>
14657
14658 Since we now use obstacks, more % directives can be enabled.
14659
14660 * src/lex.c (percent_table): Also accept `%yacc',
14661 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
14662 `%debug'.
14663 Handle the actions for `%semantic_parser' and `%pure_parser' here,
14664 instead of returning a token.
14665 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14666 * src/reader.c (read_declarations): Adjust.
14667 * src/files.c (open_files): Don't call `compute_base_names', don't
14668 compute `attrsfile' since they depend upon data which might be
14669 *in* the input file now.
14670 (output_files): Do it here.
14671 * src/output.c (output_headers): Document the fact that this patch
14672 introduces a guaranteed SEGV for semantic parsers.
14673 * doc/bison.texinfo: Document them.
14674 * tests/suite.at: Exercise these %options.
14675
14676 2000-12-20 Akim Demaille <akim@epita.fr>
14677
14678 Also handle the output file (--verbose) with obstacks.
14679
14680 * files.c (foutput): Remove.
14681 (output_obstack): New.
14682 Adjust all dependencies.
14683 * src/conflicts.c: Return a string.
14684 * src/system.h (obstack_grow_string): Rename as...
14685 (obstack_sgrow): this. Be ready to work with non literals.
14686 (obstack_fgrow4): New.
14687
14688 2000-12-20 Akim Demaille <akim@epita.fr>
14689
14690 * src/files.c (open_files): Fix the computation of short_base_name
14691 in the case of `-o foo.tab.c'.
14692
14693 2000-12-20 Akim Demaille <akim@epita.fr>
14694
14695 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14696 (copy_dollar): Now that everything uses obstacks, get rid of the
14697 FILE * parameters.
14698
14699 2000-12-20 Akim Demaille <akim@epita.fr>
14700
14701 * src/files.c (open_files): Actually the `.output' file is based
14702 on the short_base_name, not base_name.
14703 * tests/suite.at (Checking output file names): Adjust.
14704
14705 2000-12-20 Akim Demaille <akim@epita.fr>
14706
14707 * src/bison.s1: Remove, we now use directly...
14708 * src/bison.simple: this.
14709 * src/Makefile.am: Use pkgdata instead of data.
14710
14711 2000-12-20 Akim Demaille <akim@epita.fr>
14712
14713 * src/files.c (guard_obstack): New.
14714 (open_files): Initialize it.
14715 (output_files): Dump it...
14716 * src/files.h: Export it.
14717 * src/reader.c (copy_guard): Use it.
14718
14719 2000-12-19 Akim Demaille <akim@epita.fr>
14720
14721 * src/files.c (outfile, defsfile, actfile): Removed as global
14722 vars.
14723 (open_files): Don't compute them.
14724 (output_files): Adjust.
14725 (base_name, short_base_name): Be global.
14726 Adjust dependencies.
14727
14728 2000-12-19 Akim Demaille <akim@epita.fr>
14729
14730 * src/files.c (strsuffix): New.
14731 (stringappend): Be just like strcat but allocate.
14732 (base_names): Eve out from open_files.
14733 Try to simplify the rather hairy computation of base_name and
14734 short_base_name.
14735 (open_files): Use it.
14736 * tests/suite.at (Checking output file names): New test.
14737
14738 2000-12-19 Akim Demaille <akim@epita.fr>
14739
14740 * src/system.h (obstack_grow_literal_string): Rename as...
14741 (obstack_grow_string): this.
14742 * src/output.c (output_parser): Recognize `%% actions' instead of
14743 `$'.
14744 * src/bison.s1: s/$/%% actions/.
14745 * src/bison.hairy: Likewise.
14746
14747 2000-12-19 Akim Demaille <akim@epita.fr>
14748
14749 * src/output.c (output_parser): Compute the `#line' lines when
14750 there are.
14751 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
14752 Suggested by Hans Aberg.
14753
14754 2000-12-19 Akim Demaille <akim@epita.fr>
14755
14756 Let the handling of the skeleton files be local to the procedures
14757 that use it.
14758
14759 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
14760 longer static.
14761 (fparser, open_extra_files): Remove.
14762 (open_files, output_files): Don't take care of fparser.
14763 * src/files.h: Adjust.
14764 * src/output.c (output_parser): Open and close the file to the
14765 skeleton.
14766 * src/reader.c (read_declarations): When %semantic_parser, open
14767 fguard.
14768
14769 2000-12-19 Akim Demaille <akim@epita.fr>
14770
14771 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
14772 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
14773
14774 2000-12-19 Akim Demaille <akim@epita.fr>
14775
14776 * src/files.c (open_files): Yipee! We no longer need all the code
14777 looking for `/tmp' since we have no tmp file.
14778
14779 2000-12-19 Akim Demaille <akim@epita.fr>
14780
14781 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
14782 New macros.
14783 * src/files.c (open_files): Less dependency on MSDOS etc.
14784
14785 2000-12-14 Akim Demaille <akim@epita.fr>
14786
14787 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
14788 Provide a default definition.
14789 Use it when executing the default @ action.
14790 * src/reader.c (reader_output_yylsp): No longer include
14791 `timestamp' and `text' in the default YYLTYPE.
14792
14793 2000-12-12 Akim Demaille <akim@epita.fr>
14794
14795 * src/reader.c (copy_definition, parse_union_decl, copy_action)
14796 (copy_guard): Quote the file names.
14797 Reported by Laurent Mascherpa.
14798
14799 2000-12-12 Akim Demaille <akim@epita.fr>
14800
14801 * src/output.c (output_headers, output_program, output): Be sure
14802 to escape special characters when outputting filenames.
14803 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
14804 (output_headers): Don't depend on them, Use ACTSTR.
14805
14806 2000-11-17 Akim Demaille <akim@epita.fr>
14807
14808 * lib/obstack.h: Formatting changes.
14809 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
14810 prevents type checking.
14811 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
14812 cast the value to (void *): assigning a `foo *' to a `void *'
14813 variable is valid.
14814 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
14815 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
14816 append characters.
14817
14818 2000-11-17 Akim Demaille <akim@epita.fr>
14819
14820 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
14821 as...
14822 (suite.m4, regression.m4, calc.m4): these.
14823 * tests/atgeneral.m4: Update from CVS Autoconf.
14824
14825 2000-11-17 Akim Demaille <akim@epita.fr>
14826
14827 * tests/regression.m4 (%union and --defines): New test,
14828 demonstrating a current bug in the obstack implementation.
14829
14830 2000-11-17 Akim Demaille <akim@epita.fr>
14831
14832 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
14833 macros.
14834 Use them to declare the variables which are global or local to
14835 `yyparse'.
14836
14837 2000-11-17 Akim Demaille <akim@epita.fr>
14838
14839 * acconfig.h: Remove, no longer used.
14840
14841 2000-11-07 Akim Demaille <akim@epita.fr>
14842
14843 * src: s/Copyright (C)/Copyright/g.
14844
14845 2000-11-07 Akim Demaille <akim@epita.fr>
14846
14847 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
14848 defining.
14849 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
14850
14851 2000-11-07 Akim Demaille <akim@epita.fr>
14852
14853 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
14854 Merge in a single CPP if/else.
14855
14856 2000-11-07 Akim Demaille <akim@epita.fr>
14857
14858 * src/output.c (output): Remove useless variables.
14859 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
14860 argument `data' for consistency with the prototypes.
14861 Qualify it `const'.
14862 (obstack_copy, obstack_copy0): Rename the second argument as
14863 `address' for consistency. Qualify it `const'.
14864 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
14865 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
14866 `const' their input argument (`data' or `address').
14867 Adjust the corresponding macros to include `const' in casts.
14868
14869 2000-11-03 Akim Demaille <akim@epita.fr>
14870
14871 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
14872 s/PFILE1/BISON_HAIRY/.
14873 Adjust dependencies.
14874
14875 2000-11-03 Akim Demaille <akim@epita.fr>
14876
14877 For some reason, this was not applied.
14878
14879 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14880 `unlink': it's no longer used.
14881
14882 2000-11-03 Akim Demaille <akim@epita.fr>
14883
14884 * src/files.c (skeleton_find): New function, eved out of...
14885 (open_files, open_extra_files): here.
14886
14887 2000-11-03 Akim Demaille <akim@epita.fr>
14888
14889 Don't use `atexit'.
14890
14891 * src/files.c (obstack_save): New function.
14892 (done): Rename as...
14893 (output_files): this.
14894 Use `obstack_save'.
14895 * src/main.c (main): Don't use `atexit' to register `done', since
14896 it no longer has to remove tmp files, just call `output_files'
14897 when there are no errors.
14898
14899 2000-11-02 Akim Demaille <akim@epita.fr>
14900
14901 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14902 `unlink': it's no longer used.
14903 * src/files.h: Formatting changes.
14904
14905 2000-11-02 Akim Demaille <akim@epita.fr>
14906
14907 Remove the last uses of mktemp and unlink/delete.
14908
14909 * src/files.c (fdefines, ftable): Removed.
14910 (defines_ostack, table_obstack): New.
14911 Adjust dependencies of the former into uses of the latter.
14912 * src/output.c (output_short_or_char_table, output_short_table):
14913 Convert to using obstacks.
14914 * src/reader.c (copy_comment2): Accept one FILE * and two
14915 obstacks.
14916 (output_token_defines, reader_output_yylsp): Use obstacks.
14917 * src/system.h (obstack_fgrow3): New.
14918 * po/POTFILES.in: Adjust.
14919
14920 2000-11-01 Akim Demaille <akim@epita.fr>
14921
14922 Change each use of `fattrs' into a use of `attrs_obstack'.
14923
14924 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
14925 * src/files.c (fattrs): Remove.
14926 (attrs_obstack): New.
14927 Adjust all dependencies.
14928 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
14929
14930 2000-11-01 Akim Demaille <akim@epita.fr>
14931
14932 Introduce obstacks.
14933 Change each use of `faction' into a use of `action_obstack'.
14934
14935 * lib/obstack.h, lib/obstack.c: New files.
14936 * src/files.c (faction): Remove.
14937 (action_obstack): New.
14938 Adjust all dependencies.
14939
14940 2000-10-20 Akim Demaille <akim@epita.fr>
14941
14942 * lib/quote.h (PARAMS): New macro. Use it.
14943
14944 2000-10-16 Akim Demaille <akim@epita.fr>
14945
14946 * src/output.c (output_short_or_char_table): New function.
14947 (output_short_table, output_token_translations): Use it.
14948 (goto_actions): Use output_short_table.
14949
14950 2000-10-16 Akim Demaille <akim@epita.fr>
14951
14952 * src/symtab.c (bucket_new): New function.
14953 (getsym): Use it.
14954
14955 * src/output.c (output_short_table): New argument to display the
14956 comment associated with the table.
14957 Adjust dependencies.
14958 (output_gram): Use it.
14959 (output_rule_data): Nicer output layout for YYTNAME.
14960
14961 2000-10-16 Akim Demaille <akim@epita.fr>
14962
14963 * src/lex.c (read_typename): New function.
14964 (lex): Use it.
14965 * src/reader.c (copy_dollar): Likewise.
14966
14967 2000-10-16 Akim Demaille <akim@epita.fr>
14968
14969 * src/reader.c (copy_comment2): Expect the input stream to be on
14970 the `/' which is suspected to open a comment, instead of being
14971 called after `//' or `/*' was read.
14972 (copy_comment, copy_definition, parse_union_decl, copy_action)
14973 (copy_guard): Adjust.
14974
14975 2000-10-16 Akim Demaille <akim@epita.fr>
14976
14977 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
14978 `read_signed_integer'.
14979
14980 2000-10-16 Akim Demaille <akim@epita.fr>
14981
14982 * src/reader.c (copy_dollar): New function.
14983 (copy_guard, copy_action): Use it.
14984
14985 2000-10-16 Akim Demaille <akim@epita.fr>
14986
14987 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
14988 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
14989 New files, from Fileutils 4.0.27.
14990 * src/main.c (printable_version): Remove.
14991 * src/lex.c, src/reader.c: Use `quote'.
14992
14993 2000-10-04 Akim Demaille <akim@epita.fr>
14994
14995 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
14996
14997 2000-10-04 Akim Demaille <akim@epita.fr>
14998
14999 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15000
15001 2000-10-04 Akim Demaille <akim@epita.fr>
15002
15003 When a literal string is used to define two different tokens,
15004 `bison -v' segfaults.
15005 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15006
15007 * tests/regression.m4: New file.
15008 Include the core of the sample provided by Piotr Gackiewicz.
15009 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15010 properly.
15011
15012 2000-10-04 Akim Demaille <akim@epita.fr>
15013
15014 * src/reader.c (parse_expect_decl): Keep `count' within the size
15015 of `buffer'.
15016 From Neil Booth.
15017
15018 2000-10-02 Paul Eggert <eggert@twinsun.com>
15019
15020 * bison.s1 (yyparse): Assign the default value
15021 unconditionally, to avoid a GCC warning and make the parser a
15022 tad smaller.
15023
15024 2000-10-02 Akim Demaille <akim@epita.fr>
15025
15026 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15027 options.
15028
15029 2000-10-02 Akim Demaille <akim@epita.fr>
15030
15031 * src/derives.c, src/print.c, src/reduce.c: To ease the
15032 translation, move some `\n' out of the translated strings.
15033
15034 2000-10-02 Akim Demaille <akim@epita.fr>
15035
15036 The location tracking mechanism is precious for parse error
15037 messages. Nevertheless, it is enabled only when `@n' is used in
15038 the grammar, which is a different issue (you can use it in error
15039 message, but not in the grammar per se). Therefore, there should
15040 be another means to enable it.
15041
15042 * src/getargs.c (getargs): Support `--locations'.
15043 (usage): Report it.
15044 * src/getargs.h (locationsflag): Export it.
15045 * src/lex.c (percent_table): Support `%locations'.
15046 * src/reader.c (yylsp_needed): Remove this variable, now replaced
15047 with `locationsflag'.
15048 * doc/bison.texinfo: Document `--locations' and `%locations'.
15049 Sort the options.
15050 * tests/calc.m4: Test it.
15051
15052 For regularity of the names, replace each
15053 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
15054 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
15055 In addition replace each `flag' with `_flag'.
15056
15057 2000-10-02 Akim Demaille <akim@epita.fr>
15058
15059 Also test parse error messages, including with YYERROR_VERBOSE.
15060
15061 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
15062 associative).
15063 Use it to check the computations.
15064 Use it to check `nonassoc' is honored.
15065 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
15066 `--yyerror-verbose'.
15067 (_AT_CHECK_CALC): Adjust to this option.
15068 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
15069
15070 2000-10-02 Akim Demaille <akim@epita.fr>
15071
15072 Test also `--verbose', `--defines' and `--name-prefix'. Testing
15073 the latter demonstrates a flaw in the handling of non debugging
15074 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
15075 was used in order to simplify:
15076
15077 #if YYDEBUG
15078 if (yydebug)
15079 {
15080 ...
15081 }
15082 #endif
15083
15084 into
15085
15086 if (yydebug)
15087 {
15088 ...
15089 }
15090
15091 unfortunately this leads to a CPP conflict when
15092 `--name-prefix=foo' is used since it produces `#define yydebug
15093 foodebug'.
15094
15095 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
15096 (YYDPRINTF): New macro.
15097 Spread its use.
15098 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
15099 the bison options.
15100 Also test `--verbose', `--defines' and `--name-prefix'.
15101
15102 2000-10-02 Akim Demaille <akim@epita.fr>
15103
15104 Improve the readability of the produced parsers.
15105
15106 * src/bison.s1: Formatting changes.
15107 Improve the comment related to the `$' mark.
15108 (yydefault): Don't fall through to `yyresume': `goto' there.
15109 * src/output.c (output_parser): When the `$' is met, skip the end
15110 of its line.
15111 New variable, `number_of_dollar_signs', to check there's exactly
15112 one `$' in the parser skeleton.
15113
15114 2000-10-02 Akim Demaille <akim@epita.fr>
15115
15116 * lib/xstrdup.c: New file, from the fileutils.
15117 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
15118 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
15119 instead of strlen + xmalloc + strcpy.
15120 * src/symtab.c (copys): Remove, use xstrdup instead.
15121
15122 2000-10-02 Akim Demaille <akim@epita.fr>
15123
15124 * src/gram.h (associativity): New enum type which replaces the
15125 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
15126 `right_assoc', `left_assoc' and `non_assoc'.
15127 Adjust all dependencies.
15128 * src/reader.c: Formatting changes.
15129 (LTYPESTR): Don't define it, use it as a literal in
15130 `reader_output_yylsp'.
15131 * src/symtab.h (symbol_class): New enum type which replaces the
15132 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
15133 `sunknown', `stoken and `snterm'.
15134
15135 2000-10-02 Akim Demaille <akim@epita.fr>
15136
15137 * src/getargs.c (fixed_outfiles): Rename as...
15138 (yaccflag): for consistency and accuracy.
15139 Adjust dependencies.
15140
15141 2000-10-02 Akim Demaille <akim@epita.fr>
15142
15143 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
15144 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
15145 difficult and introduced a lot of core dump. It turns out that
15146 Bison used an implementation of `xmalloc' based on `calloc', and
15147 at various places it does depend upon the initialization to 0. I
15148 have not tried to isolate the pertinent places, and all the former
15149 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
15150 someone should address this issue.
15151
15152 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
15153 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
15154 files.
15155 Adjust dependencies.
15156 * src/warshall.h: New file.
15157 Propagate.
15158
15159 2000-10-02 Akim Demaille <akim@epita.fr>
15160
15161 Various anti-`extern in *.c' changes.
15162
15163 * src/system.h: Include `assert.h'.
15164
15165 2000-10-02 Akim Demaille <akim@epita.fr>
15166
15167 * src/state.h (nstates, final_state, first_state, first_shift)
15168 (first_reduction): Move their exportation from here...
15169 * src/LR0.h: to here.
15170 Adjust dependencies.
15171 * src/getargs.c (statisticsflag): New variable.
15172 Add support for `--statistics'.
15173 Adjust dependencies.
15174
15175 Remove a lot of now useless `extern' statements in most files.
15176
15177 2000-10-02 Akim Demaille <akim@epita.fr>
15178
15179 * src/LR0.h: New file.
15180 Propagate its use.
15181
15182 2000-10-02 Akim Demaille <akim@epita.fr>
15183
15184 * src/print.h: New file.
15185 Propagate its use.
15186 * src/print.c: Formatting and ordering changes.
15187 (verbose, terse): Replace with...
15188 (print_results): this new function.
15189 Adjust dependencies.
15190
15191 2000-10-02 Akim Demaille <akim@epita.fr>
15192
15193 * src/conflicts.c (conflict_report): New function.
15194 (conflict_log, verbose_conflict_log): Replace with...
15195 (print_conflicts): this function.
15196 Adjust dependencies.
15197 * src/conflicts.h: New file.
15198 Propagate its inclusion.
15199
15200 2000-10-02 Akim Demaille <akim@epita.fr>
15201
15202 * src/nullable.h: New file.
15203 Propagate its inclusion.
15204 * src/nullable.c: Formatting changes.
15205
15206 2000-10-02 Akim Demaille <akim@epita.fr>
15207
15208 * src/reduce.h: New file.
15209 Propagate its inclusion.
15210 * src/reduce.c: Topological sort and other formatting changes.
15211 (bool, TRUE, FALSE): Move their definition to...
15212 * src/system.h: here.
15213
15214 2000-10-02 Akim Demaille <akim@epita.fr>
15215
15216 * src/files.c: Formatting changes.
15217 (tryopen, tryclose, openfiles): Rename as...
15218 (xfopen, xfclose, open_files): this.
15219 (stringappend): static.
15220 * src/files.h: Complete the list of exported symbols.
15221 Propagate its use.
15222
15223 2000-10-02 Akim Demaille <akim@epita.fr>
15224
15225 * src/reader.h: New file.
15226 Propagate its use instead of tedious list of `extern' and
15227 prototypes.
15228 * src/reader.c: Formatting changes, topological sort,
15229 s/register//.
15230
15231 2000-10-02 Akim Demaille <akim@epita.fr>
15232
15233 * src/lex.h: Prototype `lex.c' exported functions.
15234 * src/reader.c: Adjust.
15235 * src/lex.c: Formatting changes.
15236 (safegetc): Rename as...
15237 (xgetc): this.
15238
15239 2000-10-02 Akim Demaille <akim@epita.fr>
15240
15241 * src/lalr.h: New file.
15242 Propagate its inclusion instead of prototypes and `extern'.
15243 * src/lalr.c: Formatting changes, topological sorting etc.
15244
15245 2000-10-02 Akim Demaille <akim@epita.fr>
15246
15247 * src/output.c (token_actions): Introduce a temporary array,
15248 YYDEFACT, that makes it possible for this function to use
15249 output_short_table.
15250
15251 2000-10-02 Akim Demaille <akim@epita.fr>
15252
15253 `user_toknums' is output as a `short[]' in `output.c', while it is
15254 defined as a `int[]' in `reader.c'. For consistency with the
15255 other output tables, `user_toknums' is now defined as a table of
15256 shorts.
15257
15258 * src/reader.c (user_toknums): Be a short table instead of an int
15259 table.
15260 Adjust dependencies.
15261
15262 Factor the short table outputs.
15263
15264 * src/output.c (output_short_table): New function.
15265 * src/output.c (output_gram, output_stos, output_rule_data)
15266 (output_base, output_table, output_check): Use it.
15267
15268 2000-10-02 Akim Demaille <akim@epita.fr>
15269
15270 * src/output.c (output): Topological sort of the functions, in
15271 order to get rid of the `static' prototypes.
15272 No longer use `register'.
15273 * src/output.h: New file.
15274 Propagate its inclusion in files explicitly prototyping functions
15275 from output.c.
15276
15277 2000-09-21 Akim Demaille <akim@epita.fr>
15278
15279 * src/atgeneral.m4: Update from Autoconf.
15280
15281 2000-09-21 Akim Demaille <akim@epita.fr>
15282
15283 * src/closure.h: New file.
15284 * src/closure.c: Formatting changes, topological sort over the
15285 functions, use of closure.h.
15286 (initialize_closure, finalize_closure): Rename as...
15287 (new_closure, free_closure): these. Adjust dependencies.
15288 * src/LR0.c: Formatting changes, topological sort, use of
15289 cloture.h.
15290 (initialize_states): Rename as...
15291 (new_states): this.
15292 * src/Makefile.am (noinst_HEADERS): Adjust.
15293
15294 2000-09-20 Akim Demaille <akim@epita.fr>
15295
15296 * src/acconfig.h: Don't protect config.h against multiple
15297 inclusion.
15298 Don't define PARAMS.
15299 * src/system.h: Define PARAMS.
15300 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
15301 purpose of config.h. system.h must not try to fix wrong
15302 definitions in config.h.
15303
15304 2000-09-20 Akim Demaille <akim@epita.fr>
15305
15306 * src/derives.h: New file.
15307 * src/main.c, src/derives.h: Use it.
15308 Formatting changes.
15309 * src/Makefile.am (noinst_HEADERS): Adjust.
15310
15311 2000-09-20 Akim Demaille <akim@epita.fr>
15312
15313 * tests/atgeneral.m4: Update from Autoconf.
15314 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
15315 (AT_CHECK_CALC): New macros.
15316 Use these macros to test bison with options `', `--raw',
15317 `--debug', `--yacc', `--yacc --debug'.
15318
15319 2000-09-19 Akim Demaille <akim@epita.fr>
15320
15321 * src/output.c: Formatting changes.
15322 * src/machine.h: Remove, leaving its contents in...
15323 * src/system.h: here.
15324 Include stdio.h.
15325 Adjust all dependencies on stdio.h and machine.h.
15326 * src/getargs.h: New file.
15327 Let all `extern' declarations about getargs.c be replaced with
15328 inclusion of `getargs.h'.
15329 * src/Makefile.am (noinst_HEADERS): Adjust.
15330
15331 * tests/calc.m4 (yyin): Be initialized in main, not on the global
15332 scope.
15333 (yyerror): Returns void, not int.
15334 * doc/bison.texinfo: Formatting changes.
15335
15336 2000-09-19 Akim Demaille <akim@epita.fr>
15337
15338 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
15339 portable.
15340
15341 2000-09-18 Akim Demaille <akim@epita.fr>
15342
15343 * configure.in: Append WARNING_CFLAGS to CFLAGS.
15344 * src/Makefile.am (INCLUDES): Don't.
15345 Be ready to fetch headers in lib/.
15346
15347 2000-09-18 Akim Demaille <akim@epita.fr>
15348
15349 * doc/bison.texinfo: Update the copyright.
15350 ANSIfy and GNUify the examples.
15351 Remove the old menu.
15352
15353 2000-09-18 Akim Demaille <akim@epita.fr>
15354
15355 First set of tests: use the `calc' example from the documentation.
15356
15357 * src/bison.s1 (yyparse): Condition the code using `yytname' which
15358 is defined only when YYDEBUG is.
15359 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
15360 * src/files.c (tryopen, tryclose): Formatting changes.
15361 Move to the top and be static.
15362 * src/reader.c (read_signed_integer): Likewise.
15363 * tests/calc.m4: New file.
15364 * Makefile.am, suite.m4: Adjust.
15365 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
15366
15367 2000-09-18 Akim Demaille <akim@epita.fr>
15368
15369 Add support for an Autotest test suite for Bison.
15370
15371 * m4/m4.m4, m4/atconfig.m4: New files.
15372 * m4/Makefile.am (EXTRA_DIST): Adjust.
15373 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
15374 files.
15375 * src/getargs.c: Display a more standard --version message.
15376 * src/reader.c (reader): Formatting changes.
15377 No longer depend upon VERSION_STRING.
15378 * configure.in: No longer use `dnl'.
15379 Set up the test suite and the new directory `tests/.
15380 (VERSION_STRING): Remove.
15381
15382 2000-04-14 Akim Demaille <akim@epita.fr>
15383
15384 * src/reader.c (copy_comment2): New function, same as former
15385 `copy_comment', but outputs into two FILE *.
15386 (copy_comment): Use it.
15387 (parse_union_decl): Use it.
15388 (get_type, parse_start_decl): Use the same `invalid' message.
15389 (parse_start_decl, parse_union_decl): Use the same `multiple'
15390 message.
15391 (parse_union_decl, copy_guard, copy_action): Use the same
15392 `unmatched' message.
15393 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
15394
15395 2000-03-31 Akim Demaille <akim@epita.fr>
15396
15397 * src/files.c (tryopen, tryclose): Move to the top.
15398 Be static.
15399
15400 2000-03-31 Akim Demaille <akim@epita.fr>
15401
15402 * src/main.c (main): Don't call `done', exit does it.
15403
15404 2000-03-31 Akim Demaille <akim@epita.fr>
15405
15406 * allocate.c: s/return (foo)/return foo/.
15407 * lalr.c: Likewise.
15408 * LR0.c: Likewise.
15409 * output.c: Likewise.
15410 * reader.c: Likewise.
15411 * symtab.c: Likewise.
15412 * vmsgetargs.c: Likewise.
15413
15414 2000-03-31 Akim Demaille <akim@epita.fr>
15415
15416 Clean up the error reporting functions.
15417
15418 * src/report.c: New file.
15419 * src/report.h: Likewise.
15420 * src/Makefile.am: Adjust.
15421 * m4/error.m4: New file.
15422 * m4/Makefile.am: Adjust.
15423 * configure.in (jm_PREREQ_ERROR): Call it.
15424 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
15425 Remove.
15426 (fatal, fatals): Remove. All callers use complain.c::fatal.
15427 (warn, warni, warns, warnss, warnss): Remove. All callers use
15428 complain.c::complain.
15429 (toomany): Remove, use fatal instead.
15430 * src/files.c (done): No argument, use complain_message_count.
15431 * src/main.c (main): Register `done' to `atexit'.
15432
15433 * src/getargs.c (usage): More `fputs', less `fprintf'.
15434
15435 2000-03-28 Akim Demaille <akim@epita.fr>
15436
15437 * lib/: New directory.
15438 * Makefile.am (SUBDIRS): Adjust.
15439 * configure.in: Adjust.
15440 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15441 useless.
15442 * src/alloca.c: Moved to lib/.
15443 * src/getopt.c: Likewise.
15444 * src/getopt1.c: Likewise.
15445 * src/getopt.h: Likewise.
15446 * src/ansi2knr.c: Likewise.
15447 * src/ansi2knr.1: Likewise.
15448 * src/Makefile.am: Adjust.
15449 * lib/Makefile.am: New file.
15450
15451 2000-03-28 Akim Demaille <akim@epita.fr>
15452
15453 * src/getargs.c (usage): Refresh the help message.
15454
15455 2000-03-17 Akim Demaille <akim@epita.fr>
15456
15457 * src/getopt1.c: Updated from textutils 2.0e
15458 * src/getopt.c: Likewise.
15459 * src/getopt.h: Likewise.
15460
15461 2000-03-17 Akim Demaille <akim@epita.fr>
15462
15463 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15464 the file name, not the whole `#line LINE FILE'.
15465
15466 2000-03-17 Akim Demaille <akim@epita.fr>
15467
15468 On syntax errors, report the token on which we choked.
15469
15470 * src/bison.s1 (yyparse): In the label yyerrlab, when
15471 YYERROR_VERBOSE, add yychar in msg.
15472
15473 2000-03-17 Akim Demaille <akim@epita.fr>
15474
15475 * src/reader.c (copy_at): New function.
15476 (copy_guard): Use it.
15477 (copy_action): Use it.
15478
15479 2000-03-17 Akim Demaille <akim@epita.fr>
15480
15481 Be kind to translators, save some useless translations.
15482
15483 * src/main.c (banner): New function.
15484 (fatal_banner): Use it.
15485 (warn_banner): Use it.
15486
15487 2000-03-17 Akim Demaille <akim@epita.fr>
15488
15489 * src/reader.c (copy_definition): Use copy_string and
15490 copy_comment. Removed now unused `match', `ended',
15491 `cplus_comment'.
15492 (copy_comment, copy_string): Moved, to be visible from
15493 copy_definition.
15494
15495 2000-03-17 Akim Demaille <akim@epita.fr>
15496
15497 * src/reader.c (copy_string): Declare `static inline'. No
15498 problems with inline, since it is checked by configure.
15499 (copy_comment): Likewise.
15500
15501 2000-03-17 Akim Demaille <akim@epita.fr>
15502
15503 * src/reader.c (packsymbols): Formatting changes.
15504
15505 2000-03-17 Akim Demaille <akim@epita.fr>
15506
15507 * src/reader.c (copy_comment): New function, factored out from:
15508 (copy_action): Use it. Removed now unused `match', `ended',
15509 `cplus_comment'.
15510 (copy_guard): Likewise.
15511
15512 2000-03-17 Akim Demaille <akim@epita.fr>
15513
15514 * src/reader.c (copy_string): New function, factored out from:
15515 (copy_action): Use it.
15516 (copy_guard): Likewise.
15517
15518 2000-03-17 Akim Demaille <akim@epita.fr>
15519
15520 Change the handling of @s so that they behave exactly like $s.
15521 There is now a pseudo variable @$ (readble and writable), location
15522 of the lhs of the rule (by default ranging from the location of
15523 the first symbol of the rhs, to the location of the last symbol,
15524 or, if the rhs is empty, YYLLOC).
15525
15526 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
15527 yyval.
15528 (yyparse): When providing a default semantic action, provide a
15529 default location action.
15530 (after the $): No longer change `*YYLSP', just stack YYLOC the
15531 same way you stack YYVAL.
15532 * src/reader.c (read_declarations): Use warns.
15533 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
15534 (copy_action, case '@'): Likewise.
15535 Use a standard error message, to save useless work from
15536 translators.
15537
15538 2000-03-17 Akim Demaille <akim@epita.fr>
15539
15540 * src/bison.s1: Formatting and cosmetics changes.
15541 * src/reader.c: Likewise.
15542 Update the Copyright notice.
15543
15544 2000-03-17 Akim Demaille <akim@epita.fr>
15545
15546 * src/bison.s1 (#line): All set to `#line' only, since the
15547 Makefile now handles them.
15548
15549 2000-03-16 Akim Demaille <akim@epita.fr>
15550
15551 * src/output.c (output_rule_data): Output the documentation of
15552 some of the tables.
15553 (Copyright notice): Update.
15554 Formatting changes.
15555
15556 2000-03-16 Akim Demaille <akim@epita.fr>
15557
15558 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
15559 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
15560 One `#if YYDEBUG' remains, since it uses variables which are
15561 defined only if `YYDEBUG != 0'.
15562
15563 2000-03-16 Akim Demaille <akim@epita.fr>
15564
15565 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
15566 and related variables so that the similarities are highlighted.
15567
15568 2000-03-16 Akim Demaille <akim@epita.fr>
15569
15570 * src/bison.s1: Properly indent CPP directives.
15571
15572 2000-03-16 Akim Demaille <akim@epita.fr>
15573
15574 * src/bison.s1: Properly indent the `alloca' CPP section.
15575
15576 2000-03-16 Akim Demaille <akim@epita.fr>
15577
15578 Do not hard code values of directories in `configure.in'.
15579 Update the `configure' tool chain.
15580
15581 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
15582 src/makefile.am.
15583 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
15584 (AC_OUTPUT): Add m4/Makefile.
15585 Bump to bison 1.28a, 1.29 has never been released.
15586 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
15587 handled via src/Makefile.am.
15588 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
15589 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
15590 autoheader.
15591 * Makefile.am (SUBDIRS): Add m4.
15592 (ACLOCAL_AM_FLAGS): New variable.
15593 (AUTOMAKE_OPTIONS): Add check-news.
15594 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
15595 the proper line number and file name.
15596 (DEFS): Propagate the location of bison library files and of the
15597 locale files.
15598 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
15599 builddir.
15600 * acinclude.m4: Remove, replaced by the directory m4.
15601 * m4/Makefile.am (EXTRA_DIST): New variable.
15602 * m4/gettext.m4: New file, from the fileutils.
15603 * m4/lcmessage.m4: Likewise
15604 * m4/progtest.m4: Likewise.
15605 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
15606
15607 2000-03-10 Akim Demaille <akim@epita.fr>
15608
15609 * src/closure.c:
15610 Formatting changes of various comments.
15611 Respect the GNU coding standards at various places.
15612 Don't use `_()' when no translation is needed.
15613
15614 1999-12-13 Jesse Thilo <jthilo@gnu.org>
15615
15616 * src/files.c:
15617 OS/2 honors TMPDIR environment variable.
15618
15619 1999-12-13 Jesse Thilo <jthilo@gnu.org>
15620
15621 * doc/bison.texinfo: Tweaked spelling and grammar.
15622 Updated ISBN.
15623 Removed reference to price of printed copy.
15624 Mention BISON_SIMPLE and BISON_HAIRY.
15625
15626 1999-12-13 Jesse Thilo <jthilo@gnu.org>
15627
15628 * configure.in, NEWS:
15629 Bison 1.29 released.
15630
15631 1999-10-27 Jesse Thilo <jthilo@gnu.org>
15632
15633 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
15634 Added reference card.
15635
15636 1999-07-26 Jesse Thilo <jthilo@gnu.org>
15637
15638 * po/ru.po: Added Russian translation.
15639
15640 1999-07-26 Jesse Thilo <jthilo@gnu.org>
15641
15642 * configure.in: Added Russian translation.
15643
15644 1999-07-06 Jesse Thilo <jthilo@gnu.org>
15645
15646 * configure.in, NEWS, README:
15647 Released version 1.28.
15648
15649 1999-06-14 Jesse Thilo <jthilo@gnu.org>
15650
15651 * src/system.h:
15652 Squashed redefinition warning on some systems.
15653
15654 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
15655 Have configure build version string instead of relying on ANSI string
15656 concatentation.
15657
15658 1999-06-14 Jesse Thilo <jthilo@gnu.org>
15659
15660 * po/POTFILES.in: Got rid of version.c.
15661
15662 1999-06-14 Jesse Thilo <jthilo@gnu.org>
15663
15664 * acconfig.h, configure.in:
15665 Have configure build version string instead of relying on ANSI string
15666 concatentation.
15667
15668 1999-06-08 Jesse Thilo <jthilo@gnu.org>
15669
15670 * doc/bison.1:
15671 Dropped mention of `+' for long-named options.
15672
15673 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15674
15675 * src/files.c: Added <unistd.h> for unlink().
15676
15677 * src/Makefile.am, src/system.h:
15678 I18n fixes.
15679
15680 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15681
15682 * README: Added a FAQ list.
15683
15684 * configure.in, acconfig.h:
15685 I18n fixes.
15686
15687 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15688
15689 * doc/FAQ, doc/Makefile.am:
15690 Added a FAQ list.
15691
15692 1999-05-19 Jesse Thilo <jthilo@gnu.org>
15693
15694 * src/alloc.h, src/symtab.h, src/version.c:
15695 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15696
15697 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15698
15699 * src/.cvsignore, src/Makefile.am:
15700 Reorganized: sources in `src', documentation in `doc'.
15701
15702 * src/lex.c (literalchar):
15703 fixed the code for escaping double quotes (thanks
15704 Jonathan Czisny.)
15705
15706 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15707
15708 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15709 Adjusted paths to reflect directory reorganization.
15710
15711 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15712
15713 * doc/.cvsignore, doc/Makefile.am:
15714 Reorganized: sources in `src', documentation in `doc'.
15715
15716 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15717
15718 * configure.in:
15719 Updated AC_INIT file to reflect directory reorganization.
15720
15721 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
15722 Reorganized: sources in `src', documentation in `doc'.
15723
15724 1999-04-13 Jesse Thilo <jthilo@gnu.org>
15725
15726 * src/allocate.c:
15727 Don't declare calloc() and realloc() if not necessary.
15728
15729 1999-04-13 Jesse Thilo <jthilo@gnu.org>
15730
15731 * configure.in, acconfig.h, acinclude.m4:
15732 Don't declare calloc() and realloc() if not necessary.
15733
15734 1999-03-23 Jesse Thilo <jthilo@gnu.org>
15735
15736 * po/.cvsignore: Added i18n support.
15737
15738 1999-03-23 Jesse Thilo <jthilo@gnu.org>
15739
15740 * acconfig.h, configure.in, Makefile.am:
15741 Added i18n support.
15742
15743 1999-03-22 Jesse Thilo <jthilo@gnu.org>
15744
15745 * src/bison.s1: Fixed #line numbers.
15746
15747 1999-03-15 Jesse Thilo <jthilo@gnu.org>
15748
15749 * po/es.po, po/fr.po, po/nl.po, po/de.po:
15750 Added PO files from Translation Project.
15751
15752 1999-03-03 Jesse Thilo <jthilo@gnu.org>
15753
15754 * Makefile.am:
15755 Added support for non-ANSI compilers (ansi2knr).
15756
15757 1999-02-16 Jesse Thilo <jthilo@gnu.org>
15758
15759 * configure.in: Bumped version number to 1.27.
15760
15761 * Makefile.am:
15762 Added `bison.simple' to list of files removed by `make distclean'.
15763
15764 1999-02-12 Jesse Thilo <jthilo@gnu.org>
15765
15766 * src/files.c, src/files.h:
15767 Defined locations of parser files in config.h instead of Makefile.
15768
15769 1999-02-12 Jesse Thilo <jthilo@gnu.org>
15770
15771 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
15772 Defined locations of parser files in config.h instead of Makefile.
15773
15774 1999-02-09 Jesse Thilo <jthilo@gnu.org>
15775
15776 * Makefile.am:
15777 Removed inappropriate use of $< macro.
15778
15779 1999-02-05 Jesse Thilo <jthilo@gnu.org>
15780
15781 * po/Makefile.in.in, po/POTFILES.in:
15782 Add `po' directory skeleton.
15783
15784 1999-01-27 Jesse Thilo <jthilo@gnu.org>
15785
15786 * README: Document help-bison list.
15787
15788 * configure.in: Add check for mkstemp().
15789
15790 1999-01-20 Jesse Thilo <jthilo@gnu.org>
15791
15792 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
15793 Hush a few compiler warnings.
15794
15795 * src/files.c:
15796 Add tryclose(), which verifies that fclose was successful.
15797 Hush a couple of compiler warnings.
15798
15799 1999-01-20 Jesse Thilo <jthilo@gnu.org>
15800
15801 * Makefile.am, OChangeLog:
15802 ChangeLog is now automatically generated. Include the old version as
15803 OChangeLog.
15804
15805 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15806
15807 * 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:
15808 Update FSF address.
15809
15810 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15811
15812 * doc/bison.texinfo: Fix formatting glitch.
15813
15814 * doc/bison.texinfo: Update FSF address.
15815
15816 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15817
15818 * acconfig.h: Update FSF address.
15819
15820 1999-01-08 Jesse Thilo <jthilo@gnu.org>
15821
15822 * src/system.h:
15823 Don't define PACKAGE here, since config.h defines it.
15824
15825 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15826
15827 * src/reader.c: Update copyright date.
15828
15829 * src/main.c:
15830 Ditch sprintf to statically-sized buffers in fatal/warn functions in
15831 favor of output directly to stderr (avoids buffer overruns).
15832
15833 * src/reader.c: Some checks for premature EOF.
15834
15835 * 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:
15836 Use prototypes if the compiler understands them.
15837
15838 * src/files.c: Honor TMPDIR on Unix hosts.
15839 Use prototypes if the compiler understands them.
15840
15841 * src/reader.c:
15842 Fix a couple of buffer overrun bugs.
15843 Use prototypes if the compiler understands them.
15844
15845 * src/system.h: Include unistd.h and ctype.h.
15846 Use #ifdef instead of #if for NLS symbols.
15847
15848 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15849
15850 * doc/bison.texinfo:
15851 Delete comment "consider using @set for edition number, etc..." since
15852 we now are doing so.
15853
15854 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15855
15856 * configure.in:
15857 Use prototypes if the compiler understands them.
15858
15859 * NEWS: Document 1.26 highlights.
15860
15861 * Makefile.am: Require Automake 1.3 or later.
15862
15863 * acconfig.h:
15864 Use prototypes if the compiler understands them.
15865
15866 1998-12-29 Jesse Thilo <jthilo@gnu.org>
15867
15868 * src/version.c:
15869 Use VERSION symbol from automake for version number.
15870
15871 1998-12-29 Jesse Thilo <jthilo@gnu.org>
15872
15873 * acconfig.h, configure.in, version.cin:
15874 Use VERSION symbol from automake for version number.
15875
15876 1998-11-28 Jesse Thilo <jthilo@gnu.org>
15877
15878 * Makefile.am:
15879 Distribute original version of simple parser (bison.s1), not built
15880 version (bison.simple).
15881
15882 1998-11-28 Jesse Thilo <jthilo@gnu.org>
15883
15884 * doc/bison.texinfo: Add info dir entry.
15885
15886 * doc/bison.texinfo:
15887 Let automake put version number into documentation.
15888
15889 1998-11-26 Jesse Thilo <jthilo@gnu.org>
15890
15891 * src/bison.cld, src/build.com, src/vmshlp.mar:
15892 Add non-RCS files from /gd/gnu/bison.
15893
15894 1998-11-26 Jesse Thilo <jthilo@gnu.org>
15895
15896 * doc/bison.1:
15897 Document the BISON_HAIRY and BISON_SIMPLE variables.
15898
15899 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15900
15901 * src/version.c: Build version.c automatically.
15902
15903 * src/reader.c:
15904 Fix token numbering (used to start at 258, not 257).
15905
15906 * src/system.h: Include config.h.
15907
15908 * src/getargs.c: Update bug report address.
15909
15910 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
15911 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
15912
15913 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15914
15915 * Makefile.am:
15916 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15917
15918 * configure.in, version.cin:
15919 Build version.c automatically.
15920
15921 * AUTHORS: Add AUTHORS file.
15922
15923 * README: Update bug report address.
15924
15925 * bison.simple:
15926 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15927
15928 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
15929 Add automake stuff.
15930
15931 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15932
15933 * doc/bison.texinfo: Clean up some formatting.
15934
15935 1998-05-05 Richard Stallman <rms@gnu.org>
15936
15937 * doc/bison.texinfo:
15938 Explain better why to make a pure parser.
15939
15940 1998-01-05 Richard Stallman <rms@gnu.org>
15941
15942 * src/files.c (openfiles):
15943 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
15944 find a temporary directory, if possible. Do not unlink files while
15945 they are open.
15946
15947 1997-08-25 Richard Stallman <rms@gnu.org>
15948
15949 * src/reader.c (stack_offset;):
15950 Change some warni to warns.
15951
15952 * src/lex.c (literalchar): Use warns, not warni.
15953
15954 1997-06-28 Richard Stallman <rms@gnu.org>
15955
15956 * src/bison.s1: Add a Bison version comment.
15957
15958 * src/main.c (fatal, warn, berror):
15959 Use program_name.
15960
15961 1997-06-28 Richard Stallman <rms@gnu.org>
15962
15963 * Makefile.in (bison_version): New variable.
15964 (dist): Use that variable.
15965 (bison.s1): Substitute the Bison version into bison.simple.
15966
15967 * bison.simple: Add a Bison version comment.
15968
15969 1997-06-18 Richard Stallman <rms@gnu.org>
15970
15971 * src/main.c (fatal, warn, berror):
15972 Make error messages standard.
15973 (toomany): Improve error message text.
15974
15975 * 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:
15976 new.h renamed to alloc.h.
15977
15978 1997-06-18 Richard Stallman <rms@gnu.org>
15979
15980 * Makefile.in: new.h renamed to alloc.h.
15981
15982 1997-05-24 Richard Stallman <rms@gnu.org>
15983
15984 * src/lex.c (literalchar):
15985 Fix the code for escaping \, " and '.
15986
15987 (lex): Avoid trouble when there are many chars
15988 to discard in a char literal with just several chars in it.
15989
15990 1997-05-17 Richard Stallman <rms@gnu.org>
15991
15992 * src/bison.s1:
15993 Use malloc, if using alloca is troublesome.
15994 (YYSTACK_USE_ALLOCA): New flag macro.
15995 Define it for some systems and compilers.
15996 (YYSTACK_ALLOC): New macro.
15997 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15998 If it was malloc'd, free it.
15999
16000 1997-05-17 Richard Stallman <rms@gnu.org>
16001
16002 * bison.simple:
16003 Use malloc, if using alloca is troublesome.
16004 (YYSTACK_USE_ALLOCA): New flag macro.
16005 Define it for some systems and compilers.
16006 (YYSTACK_ALLOC): New macro.
16007 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16008 If it was malloc'd, free it.
16009
16010 1997-04-23 Richard Stallman <rms@gnu.org>
16011
16012 * src/bison.s1:
16013 (alloca) [__hpux]: Always define as __builtin_alloca.
16014
16015 1997-04-23 Richard Stallman <rms@gnu.org>
16016
16017 * bison.simple:
16018 (alloca) [__hpux]: Always define as __builtin_alloca.
16019
16020 1997-04-22 Richard Stallman <rms@gnu.org>
16021
16022 * src/bison.s1:
16023 [__hpux]: Include alloca.h (right for HPUX 10)
16024 instead of declaring alloca (right for HPUX 9).
16025
16026 * src/bison.s1 (__yy_memcpy):
16027 Declare arg `count' as unsigned int.
16028 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16029
16030 1997-04-22 Richard Stallman <rms@gnu.org>
16031
16032 * bison.simple:
16033 [__hpux]: Include alloca.h (right for HPUX 10)
16034 instead of declaring alloca (right for HPUX 9).
16035
16036 * bison.simple (__yy_memcpy):
16037 Declare arg `count' as unsigned int.
16038 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16039
16040 1997-01-03 Richard Stallman <rms@gnu.org>
16041
16042 * src/allocate.c: [__STDC__ or _MSC_VER]:
16043 Declare calloc and realloc to return void *.
16044
16045 1997-01-02 Richard Stallman <rms@gnu.org>
16046
16047 * src/system.h:
16048 [_MSC_VER]: Include stdlib.h and process.h.
16049 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
16050
16051 * src/main.c (main): Return FAILURE as a value.
16052 (printable_version): Declare arg as int, not char.
16053
16054 1997-01-02 Richard Stallman <rms@gnu.org>
16055
16056 * Makefile.in (dist):
16057 Explicitly check for symlinks, and copy them.
16058
16059 1996-12-19 Richard Stallman <rms@gnu.org>
16060
16061 * src/files.c:
16062 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
16063
16064 1996-12-18 Paul Eggert <eggert@gnu.org>
16065
16066 * src/bison.s1 (yyparse):
16067 If __GNUC__ and YYPARSE_PARAM are both defined,
16068 declare yyparse to have a void * argument.
16069
16070 1996-12-18 Paul Eggert <eggert@gnu.org>
16071
16072 * bison.simple (yyparse):
16073 If __GNUC__ and YYPARSE_PARAM are both defined,
16074 declare yyparse to have a void * argument.
16075
16076 1996-12-17 Richard Stallman <rms@gnu.org>
16077
16078 * src/reduce.c (nbits): Add some casts.
16079
16080 1996-08-12 Richard Stallman <rms@gnu.org>
16081
16082 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
16083
16084 1996-08-12 Richard Stallman <rms@gnu.org>
16085
16086 * bison.simple: Test _MSDOS as well as _MSDOS_.
16087
16088 1996-07-31 Richard Stallman <rms@gnu.org>
16089
16090 * src/bison.s1:
16091 [__sun && __i386]: Include alloca.h.
16092
16093 1996-07-31 Richard Stallman <rms@gnu.org>
16094
16095 * bison.simple:
16096 [__sun && __i386]: Include alloca.h.
16097
16098 1996-07-30 Richard Stallman <rms@gnu.org>
16099
16100 * src/bison.s1: Comment change.
16101
16102 * src/bison.s1: Test _MSDOS_, not MSDOS.
16103
16104 1996-07-30 Richard Stallman <rms@gnu.org>
16105
16106 * bison.simple: Comment change.
16107
16108 * bison.simple: Test _MSDOS_, not MSDOS.
16109
16110 1996-06-01 Richard Stallman <rms@gnu.org>
16111
16112 * 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:
16113 Insert `_' macro around many string constants.
16114
16115 * src/main.c:
16116 Insert `_' macro around many string constants.
16117
16118 (main): Call setlocale, bindtextdomain and textdomain.
16119
16120 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
16121 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
16122 [ENABLE_NLS]: Include libintl.h.
16123 [ENABLE_NLS] (gettext): Define.
16124 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
16125 (N_, PACKAGE, LOCALEDIR): New macros.
16126
16127 1996-06-01 Richard Stallman <rms@gnu.org>
16128
16129 * POTFILES.in: New file.
16130
16131 * Makefile.in (allocate.o):
16132 Define target explicitly.
16133
16134 * Makefile.in (CFLAGS): Set to @CFLAGS@.
16135 (LDFLAGS): Set to @LDFLAGS@.
16136 (configure): Run autoconf only if preceding `cd' succeeds.
16137 (bison.s1): Redirect output to temporary file then move the
16138 temporary to the target, rather than redirecting directly to bison.s1.
16139 (clean): Remove config.status and config.log.
16140 (distclean): Don't remove config.status here.
16141
16142 1996-05-12 Richard Stallman <rms@gnu.org>
16143
16144 * src/bison.s1:
16145 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16146
16147 1996-05-12 Richard Stallman <rms@gnu.org>
16148
16149 * bison.simple:
16150 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16151
16152 1996-05-11 Richard Stallman <rms@gnu.org>
16153
16154 * src/bison.s1 (__yy_memcpy):
16155 Really reorder the args, as was supposedly done on Feb 14 1995.
16156 (yyparse): Calls changed accordingly.
16157
16158 1996-05-11 Richard Stallman <rms@gnu.org>
16159
16160 * Makefile.in (dist): Don't use $(srcdir).
16161
16162 * bison.simple (__yy_memcpy):
16163 Really reorder the args, as was supposedly done on Feb 14 1995.
16164 (yyparse): Calls changed accordingly.
16165
16166 1996-01-27 Richard Stallman <rms@gnu.org>
16167
16168 * src/output.c (output_rule_data):
16169 Test YYERROR_VERBOSE in the conditional
16170 around the definition of ttyname.
16171
16172 1995-12-29 Richard Stallman <rms@gnu.org>
16173
16174 * src/bison.s1:
16175 Fix line numbers in #line commands.
16176
16177 1995-12-29 Richard Stallman <rms@gnu.org>
16178
16179 * bison.simple:
16180 Fix line numbers in #line commands.
16181
16182 1995-12-27 Richard Stallman <rms@gnu.org>
16183
16184 * src/bison.s1 (YYPARSE_PARAM_DECL):
16185 In C++, make it always null.
16186 (YYPARSE_PARAM_ARG): New macro.
16187 (yyparse): Use YYPARSE_PARAM_ARG.
16188
16189 1995-12-27 Richard Stallman <rms@gnu.org>
16190
16191 * bison.simple (YYPARSE_PARAM_DECL):
16192 In C++, make it always null.
16193 (YYPARSE_PARAM_ARG): New macro.
16194 (yyparse): Use YYPARSE_PARAM_ARG.
16195
16196 1995-11-29 Richard Stallman <rms@gnu.org>
16197
16198 * doc/bison.texinfo:
16199 Describe literal string tokens, %raw, %no_lines, %token_table.
16200
16201 1995-11-29 Daniel Hagerty <hag@gnu.org>
16202
16203 * doc/bison.texinfo: Fixed update date
16204
16205 1995-10-16 Richard Stallman <rms@gnu.org>
16206
16207 * src/version.c: Version 1.25.
16208
16209 1995-10-16 Richard Stallman <rms@gnu.org>
16210
16211 * NEWS: *** empty log message ***
16212
16213 1995-10-16 Richard Stallman <rms@gnu.org>
16214
16215 * doc/bison.1, doc/bison.rnh:
16216 Add new options.
16217
16218 1995-10-15 Richard Stallman <rms@gnu.org>
16219
16220 * src/vmsgetargs.c, src/getargs.c:
16221 Added -n, -k, and -raw switches.
16222 (noparserflag, toknumflag, rawtoknumflag): New variables.
16223
16224 * src/symtab.h (SALIAS):
16225 New #define for adding aliases to %token.
16226 (struct bucket): Added `alias' field.
16227
16228 * src/reduce.c (reduce_grammar):
16229 Revise error message.
16230 (print_notices): Remove final `.' from error message.
16231
16232 * src/reader.c (reader_output_yylsp):
16233 New function.
16234 (readgram): Use `#if 0' around code that accepted %command
16235 inside grammar rules: The documentation doesn't allow it,
16236 and it will fail since the %command processors scan for the next %.
16237 (parse_token_decl): Extended the %token
16238 declaration to allow a multi-character symbol as an alias.
16239 (parse_thong_decl): New function.
16240 (read_declarations): Added %thong declarations.
16241 (read_declarations): Handle NOOP to deal with allowing
16242 % declarations as another means to specify the flags.
16243 (readgram): Allow %prec prior to semantics embedded in a rule.
16244 (skip_to_char, read_declarations, copy_definition)
16245 (parse_token_decl, parse_start_decl, parse_type_decl)
16246 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
16247 (get_type_name, copy_guard, copy_action, readgram)
16248 (get_type, packsymbols): Revised most error messages.
16249 Changed `fatal' to `warnxxx' to avoid aborting for error.
16250 Revised and use multiple warnxxx functions to avoid using VARARGS1.
16251 (read_declarations): Improve the error message for
16252 an invalid character. Do not abort.
16253 (read_declarations, copy_guard, copy_action): Use
16254 printable_version to avoid unprintable characters in printed output.
16255 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
16256 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
16257 Allow the type of a non-terminal can be given
16258 more than once, as long as all specifications give the same type.
16259
16260 * src/output.c:
16261 (output_headers, output_trailers, output, output_gram)
16262 (output_rule_data): Implement noparserflag variable.
16263 Implement toknumflag variable.
16264 (output): Call reader_output_yylsp to output LTYPESTR.
16265
16266 * src/main.c (main):
16267 If reader sees an error, don't process the grammar.
16268 (fatals): Updated to not use VARARGS1.
16269 (printable_version, int_to_string, warn, warni, warns, warnss)
16270 (warnsss): New error reporting functions. Avoid abort for error.
16271
16272 * src/lex.h:
16273 Added THONG and NOOP for alias processing.
16274 Added SETOPT for the new code that allows setting options with %flags.
16275
16276 * src/lex.c:
16277 Include getopt.h. Add some extern decls.
16278 (safegetc): New function to deal with EOF gracefully.
16279 (literalchar); new function to deal with reading \ escapes.
16280 (lex): Use literalchar.
16281 (lex): Implemented "..." tokens.
16282 (literalchar, lex, parse_percent_token): Made tokenbuffer
16283 always contain the token. This includes growing the token
16284 buffer while reading an integer.
16285 (parse_percent_token): Replaced if-else statement with percent_table.
16286 (parse_percent_token): Added % declarations as another
16287 way to specify the flags -n, -l, and -r. Also added hooks for
16288 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
16289 major changes to files.c.
16290 (lex) Retain in the incoming stream a character following
16291 an incorrect '/'.
16292 (skip_white_space, lex): Revised most error messages
16293 and changed fatal to warn to avoid aborting.
16294 (percent_table): Added %thong declarations.
16295
16296 * src/gram.h: Comment changes.
16297
16298 * src/files.c (openfiles, open_extra_files, done):
16299 Add faction flag
16300 and actfile file. Handle noparserflag. Both for -n switch.
16301
16302 * src/conflicts.c (resolve_sr_conflict):
16303 Remove use of alloca.
16304
16305 1995-06-01 Jim Meyering <meyering@gnu.org>
16306
16307 * doc/bison.texinfo: *** empty log message ***
16308
16309 1995-05-06 Richard Stallman <rms@gnu.org>
16310
16311 * src/bison.s1: Comment change.
16312
16313 1995-05-06 Richard Stallman <rms@gnu.org>
16314
16315 * bison.simple: Comment change.
16316
16317 1995-05-03 Richard Stallman <rms@gnu.org>
16318
16319 * src/version.c: Version now 1.24.
16320
16321 * src/bison.s1: Change distribution terms.
16322
16323 * src/version.c: Version now 1.23.
16324
16325 1995-05-03 Richard Stallman <rms@gnu.org>
16326
16327 * doc/bison.texinfo:
16328 Rewrite "Conditions for Using Bison".
16329 Update version to 1.24.
16330
16331 1995-05-03 Richard Stallman <rms@gnu.org>
16332
16333 * bison.simple: Change distribution terms.
16334
16335 1995-02-23 Richard Stallman <rms@gnu.org>
16336
16337 * src/files.c: Test __VMS_POSIX as well as VMS.
16338
16339 1995-02-14 Jim Meyering <meyering@gnu.org>
16340
16341 * src/bison.s1 (__yy_memcpy):
16342 Renamed from __yy_bcopy to avoid
16343 confusion. Reverse FROM and TO arguments to be consistent with
16344 those of memcpy.
16345
16346 1995-02-14 Jim Meyering <meyering@gnu.org>
16347
16348 * bison.simple (__yy_memcpy):
16349 Renamed from __yy_bcopy to avoid
16350 confusion. Reverse FROM and TO arguments to be consistent with
16351 those of memcpy.
16352
16353 1994-11-10 David J. MacKenzie <djm@gnu.org>
16354
16355 * NEWS: reformat
16356
16357 * NEWS: New file.
16358
16359 * Makefile.in (DISTFILES): Include NEWS.
16360
16361 * Makefile.in (DISTFILES):
16362 Include install-sh, not install.sh.
16363
16364 * configure.in: Update to Autoconf v2 macro names.
16365
16366 1994-10-05 David J. MacKenzie <djm@gnu.org>
16367
16368 * Makefile.in: fix typo
16369
16370 * Makefile.in (prefix, exec_prefix):
16371 Let configure set them.
16372
16373 1994-09-28 David J. MacKenzie <djm@gnu.org>
16374
16375 * Makefile.in: Set datadir to $(prefix)/share.
16376
16377 1994-09-15 Richard Stallman <rms@gnu.org>
16378
16379 * src/bison.s1:
16380 Update copyright notice and GPL version.
16381
16382 1994-09-15 Richard Stallman <rms@gnu.org>
16383
16384 * bison.simple:
16385 Update copyright notice and GPL version.
16386
16387 1994-07-12 Richard Stallman <rms@gnu.org>
16388
16389 * src/reduce.c, src/reader.c:
16390 entered into RCS
16391
16392 1994-05-05 David J. MacKenzie <djm@gnu.org>
16393
16394 * Makefile.in: entered into RCS
16395
16396 1994-03-26 Richard Stallman <rms@gnu.org>
16397
16398 * src/bison.s1: entered into RCS
16399
16400 1994-03-26 Richard Stallman <rms@gnu.org>
16401
16402 * bison.simple: entered into RCS
16403
16404 1994-03-25 Richard Stallman <rms@gnu.org>
16405
16406 * src/main.c: entered into RCS
16407
16408 1994-03-24 Richard Stallman <rms@gnu.org>
16409
16410 * src/conflicts.c: entered into RCS
16411
16412 1994-01-02 Richard Stallman <rms@gnu.org>
16413
16414 * Makefile.in: *** empty log message ***
16415
16416 1993-11-21 Richard Stallman <rms@gnu.org>
16417
16418 * src/bison.s1: *** empty log message ***
16419
16420 1993-11-21 Richard Stallman <rms@gnu.org>
16421
16422 * doc/bison.texinfo: entered into RCS
16423
16424 * doc/bison.texinfo: *** empty log message ***
16425
16426 1993-11-21 Richard Stallman <rms@gnu.org>
16427
16428 * bison.simple: *** empty log message ***
16429
16430 1993-10-25 David J. MacKenzie <djm@gnu.org>
16431
16432 * doc/bison.texinfo: *** empty log message ***
16433
16434 1993-10-19 Richard Stallman <rms@gnu.org>
16435
16436 * src/bison.s1: *** empty log message ***
16437
16438 1993-10-19 Richard Stallman <rms@gnu.org>
16439
16440 * bison.simple: *** empty log message ***
16441
16442 1993-10-14 Richard Stallman <rms@gnu.org>
16443
16444 * src/bison.s1: *** empty log message ***
16445
16446 1993-10-14 Richard Stallman <rms@gnu.org>
16447
16448 * bison.simple: *** empty log message ***
16449
16450 1993-09-14 David J. MacKenzie <djm@gnu.org>
16451
16452 * doc/bison.texinfo: *** empty log message ***
16453
16454 1993-09-13 Noah Friedman <friedman@gnu.org>
16455
16456 * Makefile.in: *** empty log message ***
16457
16458 1993-09-10 Richard Stallman <rms@gnu.org>
16459
16460 * src/conflicts.c: *** empty log message ***
16461
16462 * src/system.h: entered into RCS
16463
16464 1993-09-10 Richard Stallman <rms@gnu.org>
16465
16466 * doc/bison.1: entered into RCS
16467
16468 1993-09-06 Noah Friedman <friedman@gnu.org>
16469
16470 * src/version.c: entered into RCS
16471
16472 1993-09-06 Noah Friedman <friedman@gnu.org>
16473
16474 * Makefile.in: *** empty log message ***
16475
16476 1993-07-30 David J. MacKenzie <djm@gnu.org>
16477
16478 * Makefile.in: *** empty log message ***
16479
16480 1993-07-24 Richard Stallman <rms@gnu.org>
16481
16482 * src/bison.s1: *** empty log message ***
16483
16484 1993-07-24 Richard Stallman <rms@gnu.org>
16485
16486 * bison.simple: *** empty log message ***
16487
16488 1993-07-08 David J. MacKenzie <djm@gnu.org>
16489
16490 * Makefile.in: *** empty log message ***
16491
16492 1993-07-04 Richard Stallman <rms@gnu.org>
16493
16494 * src/bison.s1: *** empty log message ***
16495
16496 1993-07-04 Richard Stallman <rms@gnu.org>
16497
16498 * bison.simple: *** empty log message ***
16499
16500 1993-06-26 David J. MacKenzie <djm@gnu.org>
16501
16502 * src/getargs.c: entered into RCS
16503
16504 1993-06-26 David J. MacKenzie <djm@gnu.org>
16505
16506 * doc/bison.texinfo: *** empty log message ***
16507
16508 * doc/bison.1: New file.
16509
16510 1993-06-25 Richard Stallman <rms@gnu.org>
16511
16512 * src/getargs.c: New file.
16513
16514 1993-06-16 Richard Stallman <rms@gnu.org>
16515
16516 * src/bison.s1: *** empty log message ***
16517
16518 1993-06-16 Richard Stallman <rms@gnu.org>
16519
16520 * bison.simple: *** empty log message ***
16521
16522 1993-06-03 Richard Stallman <rms@gnu.org>
16523
16524 * src/bison.s1: New file.
16525
16526 1993-06-03 Richard Stallman <rms@gnu.org>
16527
16528 * doc/bison.texinfo: *** empty log message ***
16529
16530 1993-06-03 Richard Stallman <rms@gnu.org>
16531
16532 * bison.simple: New file.
16533
16534 1993-05-19 Richard Stallman <rms@gnu.org>
16535
16536 * doc/bison.texinfo: New file.
16537
16538 1993-05-07 Noah Friedman <friedman@gnu.org>
16539
16540 * Makefile.in: *** empty log message ***
16541
16542 1993-04-28 Noah Friedman <friedman@gnu.org>
16543
16544 * src/reader.c: *** empty log message ***
16545
16546 1993-04-23 Noah Friedman <friedman@gnu.org>
16547
16548 * src/alloc.h: entered into RCS
16549
16550 1993-04-20 David J. MacKenzie <djm@gnu.org>
16551
16552 * src/version.c: *** empty log message ***
16553
16554 * src/files.c, src/allocate.c:
16555 entered into RCS
16556
16557 * src/reader.c: *** empty log message ***
16558
16559 * src/lex.c: entered into RCS
16560
16561 * src/conflicts.c: New file.
16562
16563 * src/symtab.c: entered into RCS
16564
16565 * src/alloc.h: New file.
16566
16567 * src/LR0.c: entered into RCS
16568
16569 1993-04-18 Noah Friedman <friedman@gnu.org>
16570
16571 * src/reader.c: New file.
16572
16573 * src/version.c: *** empty log message ***
16574
16575 1993-04-18 Noah Friedman <friedman@gnu.org>
16576
16577 * Makefile.in: *** empty log message ***
16578
16579 1993-04-17 Noah Friedman <friedman@gnu.org>
16580
16581 * Makefile.in: *** empty log message ***
16582
16583 1993-04-15 Richard Stallman <rms@gnu.org>
16584
16585 * src/main.c, src/files.c:
16586 New file.
16587
16588 1993-04-15 Noah Friedman <friedman@gnu.org>
16589
16590 * configure.in: entered into RCS
16591
16592 * configure.in: *** empty log message ***
16593
16594 * configure.in: New file.
16595
16596 1993-04-14 Richard Stallman <rms@gnu.org>
16597
16598 * Makefile.in: New file.
16599
16600 1993-04-13 Richard Stallman <rms@gnu.org>
16601
16602 * src/version.c: New file.
16603
16604 1993-03-25 Richard Stallman <rms@gnu.org>
16605
16606 * src/output.c: entered into RCS
16607
16608 1992-09-25 Richard Stallman <rms@gnu.org>
16609
16610 * configure.bat: entered into RCS
16611
16612 1992-06-22 Richard Stallman <rms@gnu.org>
16613
16614 * src/vmsgetargs.c: entered into RCS
16615
16616 1992-06-22 Richard Stallman <rms@gnu.org>
16617
16618 * doc/bison.rnh: entered into RCS
16619
16620 1992-04-20 David J. MacKenzie <djm@gnu.org>
16621
16622 * README: entered into RCS
16623
16624 1992-01-22 Richard Stallman <rms@gnu.org>
16625
16626 * src/machine.h: entered into RCS
16627
16628 1991-12-21 Richard Stallman <rms@gnu.org>
16629
16630 * src/lalr.c, src/closure.c:
16631 entered into RCS
16632
16633 1991-12-20 Richard Stallman <rms@gnu.org>
16634
16635 * src/state.h: entered into RCS
16636
16637 1991-12-18 Richard Stallman <rms@gnu.org>
16638
16639 * src/print.c, src/nullable.c, src/derives.c:
16640 entered into RCS
16641
16642 1991-11-03 David J. MacKenzie <djm@gnu.org>
16643
16644 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
16645 entered into RCS
16646
16647 1988-09-09 Richard Stallman <rms@gnu.org>
16648
16649 * src/bison.hairy: entered into RCS
16650
16651 1987-12-16 Richard Stallman <rms@gnu.org>
16652
16653 * REFERENCES: entered into RCS
16654
16655
16656 -----
16657
16658 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
16659 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
16660 Software Foundation, Inc.
16661
16662 Copying and distribution of this file, with or without
16663 modification, are permitted provided the copyright notice and this
16664 notice are preserved.
16665
16666 $Id$