]> git.saurik.com Git - bison.git/blame - ChangeLog
Get action warnings (grammar_rule_check) right even when symbol
[bison.git] / ChangeLog
CommitLineData
ffa4ba3a
JD
12006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Get action warnings (grammar_rule_check) right even when symbol
4 declarations appear after the rules. Don't mistake the type of $$ in
5 a midrule to be that of its parent rule's $$.
6 * src/reader.c (grammar_current_rule_end): Don't invoke
7 grammar_rule_check yet since not all symbol declarations may have been
8 parsed yet.
9 (grammar_midrule_action): Likewise.
10 Don't record whether the midrule's $$ has been used yet since actions
11 haven't been translated yet.
12 Record the midrule's parent rule and its RHS index within the parent
13 rule.
14 (grammar_current_rule_action_append): Don't translate the action yet
15 since not all symbol declarations may have been parsed yet and, thus,
16 warnings about types for $$, $n, @$, and @n can't be reported yet.
17 (packgram): Translate the action and invoke grammar_rule_check now that
18 all symbol declarations have been parsed.
19 * src/scan-code.l (handle_action_dollar): Now that this is invoked
20 after parsing the entire grammar file, the symbol list here in the case
21 of a midrule is actually the midrule's empty RHS, so reference its
22 parent rule's RHS where necessary.
23 On the other hand, now that you can already know it's a midrule, you
24 aren't forced to think $$ has the same type as its parent rule's $$.
25 (handle_action_at): In the case of a midrule, reference the parent rule
26 where necessary.
27 * src/symlist.c (symbol_list_new): Initialize new midrule-related
28 members.
29 (symbol_list_length): Now that this is invoked after all rules have
30 been parsed, a NULL symbol (rather than a NULL symbol list node)
31 terminates a rule. symbol_list_print already does this correctly.
32 * src/symlist.h (symbol_list.midrule_parent_rule,
33 symbol_list.midrule_parent_rhs_index): New members so that midrules can
34 remember their relationships with their parents.
35 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
36 fixed by the above patch.
37 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
38 implementing...
39 (Unused values): ... this old test case and...
40 (Unused values before symbol declarations): ... this new test case.
41 This one is the same as `Unused values' except that all symbol
42 declarations appear after the rules in order to catch the rest of the
43 errors fixed by the above patch.
44
e256e17f
JD
452006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
46
300a1930
JD
47 More cleanup.
48 * src/reader.c (current_rule): Declare it static since it's no longer
49 used outside this file.
50 (grammar_current_rule_action_append): Remove redundant arguments from
51 translate_rule_action invocation.
52 * src/reader.h (current_rule): Remove this unused extern.
53 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
54 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 55
381ecb06
JD
562006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
57
58 Clean up yesterday's patch.
59 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
60 to...
61 * src/reader.c (grammar_current_rule_action_append): ... here for
62 consistency with grammar_current_rule_symbol_append.
63 * tests/regression.at (Braced code in declaration in rules section):
64 Make yyerror and yylex static as usual.
65
4210cd0b
JD
662006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
67
68 Fix bug that mistakes braced code in a declaration in the rules section
69 to be a rule action. Mentioned at
70 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
71 * src/scan-gram.l: Move midrule action detection from the start of the
72 scanning of any braced code to...
73 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
74 action. For readability, use $2 and @2 rather than the equivalent
75 global variables.
76 * tests/regression.at (Braced code in declaration in rules section):
77 New test to catch the error fixed by the above patch.
78
79 Work on code readability some.
80 * src/scan-code.l (current_rule): Get rid of this misleading and
81 redundant declaration: it's actually extern'ed in reader.h.
82 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
83 translate_action): Add a rule argument and use it instead of the global
84 current_rule.
85 (translate_rule_action): This already receives current_rule through an
86 argument, so pass it on to translate_action instead of assigning
87 current_rule to current_rule.
88 (translate_symbol_action, translate_code): Pass rule = NULL to
89 translate_action.
90
34f98f46
JD
912006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
92
93 Rename %before-definitions to %start-header and %after-definitions to
94 %end-header. Don't use these declarations to separate pre-prologue
95 blocks from post-prologue blocks. Add new order-independent
96 declarations %before-header and %after-header as alternatives to the
97 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
98 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
99 * NEWS (2.3+): Update for these changes.
100 * data/glr.c (b4_before_definitions): Update to...
101 (b4_start_header): ... this.
102 (b4_after_definitions): Update to...
103 (b4_end_header): ... this.
104 * data/glr.cc: Likewise.
105 * data/lalr1.cc: Likewise.
106 * data/yacc.c: Likewise.
107 * doc/bison.texinfo (The prologue): Update names, and replace remaining
108 prologue blocks with %*-header declarations.
109 (Calc++ Parser): Likewise.
110 (Bison Declaration Summary): Update names.
111 (Bison Symbols): Update description.
112 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
113 (PERCENT_END_HEADER): ... this.
114 (PERCENT_BEFORE_DEFINITIONS): Update to...
115 (PERCENT_START_HEADER): ... this.
116 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
117 (declaration): Update token names and m4 macro names.
118 When parsing %end-header and %start-header, invoke translate_code
119 before muscle_code_grow, and no longer set global booleans to remember
120 whether these declarations have been seen.
121 Parse new %after-header and %before-header.
122 * src/reader.c (before_definitions, after_definitions): Remove.
123 (prologue_augment): Accept a new bool argument to specify whether to
124 augment the pre-prologue or post-prologue.
125 * src/reader.h (before_definitions, after_definitions): Remove these
126 extern's.
127 (prologue_augment): Add new bool argument.
128 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
129 (PERCENT_END_HEADER): ... this.
130 (PERCENT_BEFORE_DEFINITIONS): Update to...
131 (PERCENT_START_HEADER): ... this.
132 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
133 * tests/actions.at (Printers and Destructors): Update names.
134
31b2b07e
JD
1352006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
136
137 Add comparison operators for C++ location classes. Discussed at
138 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
139 * data/c++.m4 (b4_define_location_comparison): New boolean %define
140 declaration indicating whether filename_type has an operator==. If
141 filename_type is `std::string', it defaults to `1', `0' otherwise.
142 * data/location.cc: Iff b4_define_location_comparison is `1', add
143 operator== and operator!= for class position and for class location.
144
145 Some minor fixes.
146 * src/scan-action.l: Remove unused file.
147 * src/symtab.c (symbol_printer_set): Use printer_location not
148 destructor_location.
149 * src/symtab.h (struct symbol): Replace incorrect source comment for
150 printer members.
151 * tests/input.at (Incompatible Aliases): Update output with correct
152 printer location.
153
9bc0dd67
JD
1542006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
155
156 Don't put the pre-prologue in the header file. For the yacc.c code
157 file and the glr.c header and code files, move the pre-prologue before
158 the token definitions. Add new %before-definitions and
159 %after-definitions to declare code that will go in both the header file
160 and code file. Discussed at
161 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
162 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
163 and
164 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
165 * NEWS (2.3+): Describe these changes.
166 * data/glr.c (b4_pre_prologue): Move from within to before...
167 (b4_shared_declarations): ... this.
168 Add new b4_before_definitions before b4_token_enums.
169 Add new b4_after_definitions at the end.
170 * data/glr.cc (b4_pre_prologue): Replace with...
171 (b4_before_definitions): ... this in the header file.
172 (b4_after_definitions): New near the end of the header file.
173 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
174 code file right before including the header file.
175 (b4_before_definitions): New in the previous position of
176 b4_pre_prologue in the header file.
177 (b4_after_definitions): New near the end of the header file.
178 * data/yacc.c: Clean up some m4 quoting especially in the header file.
179 (b4_token_enums_defines): In the code file, move to right before
180 YYSTYPE for consistency with the header file.
181 (b4_before_definitions): New right before b4_token_enums_defines in
182 both the header and code file.
183 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
184 header and code file.
185 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
186 of prologues for %union dependencies.
187 (Bison Declaration Summary): In %defines description, mention the
188 effect of %before-definitions and %after-definitions on the header
189 file.
190 (Calc++ Parser): Forward declare driver in a %before-definitions rather
191 than in the pre-prologue so that make check succeeds.
192 (Bison Symbols): Add entries for %before-definitions and
193 %after-definitions.
194 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
195 %before-definitions.
196 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
197 (declaration): Parse those declarations and append to
198 b4_before_definitions and b4_after_definitions, respectively.
199 * src/reader.c (before_definitions, after_definitions): New bools to
200 track whether those declarations have been seen.
201 (prologue_augment): Add to the post-prologue if %union,
202 %before-definitions, or %after-definitions has been seen.
203 * src/reader.h (before_definitions, after_definitions): New extern's.
204 * src/scan-gram.l: Scan the new declarations.
205 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
206 prologue block in a %before-definitions or a %after-definitions based
207 on whether the %union is declared.
208 * tests/regression.at (Early token definitions with --yacc, Early token
209 definitions without --yacc): Move tests for token definitions into the
210 post-prologue since token names are no longer defined in the
211 pre-prologue.
212
203b9274
AD
2132006-06-20 Akim Demaille <akim@epita.fr>
214
215 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
216 (symbol_get): Use it.
217 * src/parse-gram.y: Use it.
218
a7ee59cf
JD
2192006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
220
221 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
222 build succeeds when configured with --enable-gcc-warnings.
223
5a2baae7
PE
2242006-06-19 Paul Eggert <eggert@cs.ucla.edu>
225
33ad1a9c
PE
226 * src/parse-gram.y (char_name): New function.
227 (CHAR, STRING, string_content): For %printer, properly escape.
228 (ID): Prefer fputs to fprintf.
229 (id): Reindent to be consistent with other rules.
230 Properly quote char.
231
5a2baae7
PE
232 The Translation Project changed its way of publishing translations
233 to maintainers. I haven't received any responses to my request
234 for supporting the old way, or for documenting the new way. I
235 have modified 'bootstrap' to use screen scraping
236 (in this case, HTML scraping). This is unreliable and inelegant,
237 but I don't see any better way. Yuck.
238 * bootstrap (TP_URL, WGET_COMMAND): New vars.
239 (get_translations): New function, which uses HTML scraping to
240 deduce locations of latest translations.
241 Use this function to grab both bison and bison-runtime .po files.
242 Don't bother priming the pump for the runtime-po domain any more,
243 as it's now translated better than bison is.
244
58d7a1a1
AD
2452006-06-19 Akim Demaille <akim@epita.fr>
246
247 * src/scan-gram.l: No longer "parse" things after `%union' until
248 `{'. Rather, return a single "%union" token.
249 No longer make symbols: return strings, and leave the conversion
250 to symbols to the parser.
251 (SC_PRE_CODE, token_type): Remove.
252 * src/parse-gram.y (%union): New field `character'.
253 Sort tokens.
254 (CHAR): New token.
255 (ID, ID_COLON): Now that the scanner no longer makes them
256 identifiers, adjust all uses to invoke symbol_get.
257 (id_colon): New, wraps the conversion from string to symbol.
258 (%union): Accept a possible union_name.
259 (symbol): Now can be a char.
260 * data/c.m4 (b4_union_name): Leave a default value.
261 * data/glr.c, data/yacc.c: Use it.
262
b931235e
JD
2632006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
264
265 For associating token numbers with token names for "yacc.c", don't use
266 #define statements unless `--yacc' is specified; always use enum
267 yytokentype. Most important discussions start at:
268 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
269 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
270 and
271 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
272 * NEWS (2.3+): Mention.
273 * data/c.m4 (b4_yacc_if): New.
274 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
275 token #define's.
276 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
277 on token name definitions.
278 * src/getargs.c (usage): Capitalize `Yacc' in English.
279 * src/output.c (prepare): Define b4_yacc_flag.
280 * tests/regression.at (Early token definitions): Test that tokens names
281 are defined before the pre-prologue not just before the post-prologue.
282 Remove this test case and copy to...
283 (Early token definitions with --yacc): ... this to test #define's.
284 (Early token definitions without --yacc): ... and this to test enums.
285
9e6e7ed2
PE
2862006-06-11 Paul Eggert <eggert@cs.ucla.edu>
287
288 * NEWS: Reword the post-2.3 change to not be so optimistic about
289 removing the old "look-ahead" spelling.
290 Update previous look-ahead/lookahead change reports.
291 * REFERENCES: look-ahead -> lookahead (since that's
292 what he actually wrote).
293 * doc/refcard.tex: look ahead -> lookahead,
294 look-ahead -> lookahead
295
742e4900
JD
2962006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
297
298 For consistency, use `lookahead' instead of `look-ahead' or
299 `look_ahead'. Discussed starting at
300 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
301 and then at
302 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
303 * NEWS: For the next release, note the change to `--report'.
304 * TODO, doc/bison.1: Update English.
305 * doc/bison.texinfo: Update English.
306 (Understanding Your Parser, Bison Options): Document as
307 `--report=lookahead' rather than `--report=look-ahead'.
308 * src/conflicts.c: Update English in comments.
309 (lookahead_set): Rename from look_ahead_set.
310 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
311 (resolve_sr_conflict): Rename local look_ahead_tokens to
312 lookahead_tokens, and update other uses.
313 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
314 count_rr_conflicts, conflicts_free): Update uses.
315 * src/getargs.c (report_args): Move "lookahead" before alternate
316 spellings.
317 (report_types): Update uses.
318 (usage): For `--report' usage description, state `lookahead' spelling
319 rather than `look-ahead'.
320 * src/getargs.h (report.report_lookahead_tokens): Rename from
321 report_look_ahead_tokens.
322 * src/lalr.c: Update English in comments.
323 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
324 (state_lookahead_tokens_count): Rename from
325 state_look_ahead_tokens_count.
326 Rename local n_look_ahead_tokens to n_lookahead_tokens.
327 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
328 Rename local n_look_ahead_tokens to n_lookahead_tokens.
329 Update other uses.
330 Update English in output.
331 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
332 * src/print.c: Update English in comments.
333 (lookahead_set): Rename from look_ahead_set.
334 (print_reduction): Rename argument lookahead_token from
335 look_ahead_token.
336 (print_core, state_default_rule, print_reductions, print_results):
337 Update uses.
338 * src/print_graph.c: Update English in comments.
339 (print_core): Update uses.
340 * src/state.c: Update English in comments.
341 (reductions_new): Update uses.
342 (state_rule_lookahead_tokens_print): Rename from
343 state_rule_look_ahead_tokens_print, and update other uses.
344 * src/state.h: Update English in comments.
345 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
346 (state_rule_lookahead_tokens_print): Rename from
347 state_rule_look_ahead_tokens_print.
348 * src/tables.c: Update English in comments.
349 (conflict_row, action_row): Update uses.
350 * tests/glr-regression.at
351 (Incorrect lookahead during deterministic GLR,
352 Incorrect lookahead during nondeterministic GLR): Rename
353 print_look_ahead to print_lookahead.
354 * tests/torture.at: Update English in comments.
355 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
356 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
357 (Many lookahead tokens): Update uses.
358 * data/glr.c: Update English in comments.
359 * lalr1.cc: Likewise.
360 * yacc.c: Likewise.
361 * src/conflicts.h: Likewise.
362 * src/lalr.h: Likewise.
363 * src/main.c: Likewise.
364 * src/output.c: Likewise.
365 * src/parse-gram.c: Likewise.
366 * src/tables.h: Likewise.
367 * tests/calc.at: Likewise.
368
3c40d0b5
JD
3692006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
370
371 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
372
5d278082
PE
3732006-06-07 Paul Eggert <eggert@cs.ucla.edu>
374
375 * TODO: Add request from Nelson H. F. Beebe to be able to install
376 Bison without installing the yacc script.
377
9e668899
JD
3782006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
379
380 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
381 and yytext if they're already #define'd.
382 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
383 * src/scan-code-c.c: ... here.
384 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
385 <config.h>.
386
0c8e079f
JD
3872006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
388
389 Get Bison to build again when configured with --enable-gcc-warnings.
390 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
391 missing #include's.
392 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
393 loc argument as it shadows a global.
394 * src/scan-gram.l: Remove stray comma that prevents boundary_set
395 invocation.
396
397 * src/.cvsignore: Add scan-code.c.
398
2346344a
AD
3992006-06-07 Akim Demaille <akim@epita.fr>
400
401 * src/scan-gram.l: Move the "add a trailing ; to actions" code
402 to...
403 * src/scan-code.l: here.
404 * tests/input.at (Torturing the Scanner): Fix another location
405 error.
406
4862bdfd
AD
4072006-06-07 Akim Demaille <akim@epita.fr>
408
409 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
410
e9071366
AD
4112006-06-06 Akim Demaille <akim@epita.fr>
412
413 Extract the parsing of user actions from the grammar scanner.
414 As a consequence, the relation between the grammar scanner and
415 parser is much simpler. We can also split "composite tokens" back
416 into simple tokens.
417 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
418 * src/scan-gram.l (add_column_width, adjust_location): Move to and
419 rename as...
420 * src/location.h, src/location.c (add_column_width)
421 (location_compute): these.
422 Fix the column count: the initial column is 0.
423 (location_print): Be robust to ending column being 0.
424 * src/location.h (boundary_set): New.
425 * src/main.c: Adjust to scanner_free being renamed as
426 gram_scanner_free.
427 * src/output.c: Include scan-code.h.
428 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
429 Use boundary_set.
430 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
431 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
432 which is now, again, a separate token.
433 Adjust all dependencies.
434 Whereever actions with $ and @ are used, use translate_code.
435 (action): Remove this nonterminal which is now useless.
436 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
437 (grammar_current_rule_action_append): Use translate_code.
438 (packgram): Bound check ruleno, itemno, and rule_length.
439 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
440 (last_string, last_braced_code_loc, max_left_semantic_context)
441 (scanner_initialize, scanner_free, scanner_last_string_free)
442 (gram_out, gram_lineno, YY_DECL_): Move to...
443 * src/scan-gram.h: this new file.
444 (YY_DECL): Rename as...
445 (GRAM_DECL): this.
446 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
447 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
448 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
449 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
450 Move these declarations, and...
451 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
452 these to...
453 * src/flex-scanner.h: this new file.
454 * src/scan-gram.l (rule_length, rule_length_overflow)
455 (increment_rule_length): Remove.
456 (last_braced_code_loc): Rename as...
457 (gram_last_braced_code_loc): this.
458 Adjust to the changes of the parser.
459 Move all the handling of $ and @ into...
460 * src/scan-code.l: here.
461 * src/scan-gram.l (handle_dollar, handle_at): Remove.
462 (handle_action_dollar, handle_action_at): Move to...
463 * src/scan-code.l: here.
464 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
465 scan-code.h, scan-code-c.c, scan-gram.h.
466 (EXTRA_bison_SOURCES): Add scan-code.l.
467 (BUILT_SOURCES): Add scan-code.c.
468 (yacc): Be robust to white spaces.
469
470 * tests/conflicts.at, tests/input.at, tests/reduce.at,
471 * tests/regression.at: Adjust the column numbers.
472 * tests/regression.at: Adjust the error message.
7891a7c4 473
184e42f0
JD
4742006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
475
476 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
477 Use Akim's wording from
478 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
479
7891a7c4
JD
4802006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
481
482 Between Bison releases, manually append `+' to the previous Bison
483 release number, and use that as a signal to automatically print the
484 ChangeLog's CVS Id keyword from --version. Discussed starting at
485 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
486 * ChangeLog: Add Id header.
487 * configure.ac (AC_INIT): Append `+' to `2.3'.
488 * src/.cvsignore: Add revision.c.
489 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
490 (BUILT_SOURCES): Add revision.c.
491 (revision.c): New target rule. This file defines a new global variable
492 named revision. It initializes it with either the Id from ChangeLog
493 or, if VERSION doesn't contain `+', with the empty string.
494 * src/getargs.c (version): Print the value of revision.
495 * src/revision.h: Extern revision.
496
4ad3ed84
PE
4972006-06-05 Paul Eggert <eggert@cs.ucla.edu>
498
499 * NEWS: Version 2.3.
500 * configure.ac (AC_INIT): Likewise.
501
02103984
PE
5022006-05-30 Paul Eggert <eggert@cs.ucla.edu>
503
504 * data/glr.c (YYRECOVERING): Define to be a function-like macro
505 with no arguments, not as an object-like macro. This is for
506 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
507 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
508 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
509 Document this.
510
2c08afa5
JD
5112006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
512
513 * src/getargs.c (usage): Back out yesterday's modification of the
514 --help output so that we don't have to wait for translation before
515 releasing 2.3.
516
6077da58
PE
5172006-05-29 Paul Eggert <eggert@cs.ucla.edu>
518
519 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
520 Problem reported by Akim Demaille.
521
2a26b6c2
JD
5222006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
523
524 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
525
aefef0d6
PE
5262006-05-26 Paul Eggert <eggert@cs.ucla.edu>
527
528 * data/yacc.c (yy_reduce_print): Omit trailing white space in
529 generated source code. Problem reported by Frans Englich in
530 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
531
fcd8e201
PE
5322006-05-22 Paul Eggert <eggert@cs.ucla.edu>
533
534 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
535 shell, not within 'make', so that 'make' by an ordinary builder
536 (using GNU make) does not worry about configuring gzip. This also
537 works around a bug reported independently by Keith Thompson and by
538 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
539 stderr rather than stdout, messing up the build logs.
540
7b5cdcbd
JD
5412006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
542
543 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
544 to make sure that YYID will never be unused. This fixes a 'make
545 maintainer-check' failure caused by the recent changes to the 'Trivial
546 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
547 not used.
548 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
549
5ad0a449
JD
5502006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
551
552 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
553 state before an empty RHS is always resolved here. Only the location
554 of that state is guaranteed to be resolved, and that's enough. This
555 fixes the remaining bug reported by Derek M. Jones in
556 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
557 * tests/glr-regression.at (Uninitialized location when reporting
558 ambiguity): Test the above case.
559 Also, the embedded comments in this test case claim it checks the case
560 of an empty RHS that has inherited the initial location. However, the
561 corresponding LHS was already resolved, so yyresolveLocations didn't
562 actually have reason to modify it. Fix this by forcing
563 nondeterministic operation at the beginning of the parse.
564
50cce58e
PE
5652006-05-20 Paul Eggert <eggert@cs.ucla.edu>
566
567 * data/c.m4 (b4_yy_symbol_print_generate):
568 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
569 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
570 of the bugs reported today by Derek M Jones in
571 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
572 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
573 defined to be a type name without parens or brackets.
574 (Location Type): Similarly for YYLTYPE.
575 * tests/regression.at (Trivial grammars): Put in a test for this
576 bug that will be caught by 'make maintainer-check' (though not,
577 alas, by 'make check' unless your compiler is picky).
578
ab8d9dc5
PE
5792006-05-19 Paul Eggert <eggert@cs.ucla.edu>
580
0d2c8934 581 * NEWS: Version 2.2.
ab8d9dc5
PE
582 * configure.ac (AC_INIT): Likewise.
583
9138c575
JD
5842006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
585
586 * data/glr.c (yyreportTree): Make room in yystates for the state
587 preceding the RHS. This fixes the segmentation fault reported by Derek
588 M. Jones in
589 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
590 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
591 to the user. Reported for yyreportTree by Derek M. Jones later in the
592 same thread.
593 * THANKS: Add Derek M. Jones.
594 Update my email address.
595 Fix typo in Steve Murphy's name.
596
276f48df
PE
5972006-05-14 Paul Eggert <eggert@cs.ucla.edu>
598
d6645148
PE
599 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
600 checking against YYLAST that caused the parser to miss a potential
601 alternative in its diagnostic.
602 Problem reported by Maria Jose Moron Fernandez in
603 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
604 * data/lalr1.cc (yysyntax_error_): Likewise.
605 * data/yacc.c (yysyntax_error): Likewise.
606 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
607 tokens, in case we run into an older C compiler.
608 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
609 Use them to check for the off-by-one error fixed above.
610
276f48df
PE
611 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
612 YYSIZE_T, not size_t.
613 * tests/regression.at (Trivial grammars): New test, to catch
614 the error fixed by the above patch.
615
cd8b5791
AD
6162006-05-14 Akim Demaille <akim@lrde.epita.fr>
617
618 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
619 scheme.
620 Reported by Steve Murphy.
621
34376418
AD
6222006-05-14 Akim Demaille <akim@lrde.epita.fr>
623
624 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
625 * data/glr.cc: b4_location_flag is now b4_locations_flag.
626
327afc7c
AD
6272006-05-14 Akim Demaille <akim@lrde.epita.fr>
628
629 Implement --trace=m4.
630 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
631 * src/output.c (output_skeleton): When set, pass -dV to m4.
632
633 Factor the handling of flags in m4.
634 * src/output.c (prepare): Rename the muscle names debug, defines,
635 error_verbose to debug_flag, defines_flag, error_verbose_flag.
636 * data/c.m4: Adjust.
637 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
638 Use b4_define_flag_if to define other b4_FLAG_if macros.
639 (b4_location_if): As a consequence, rename as...
640 (b4_locations_if): this, for consistency.
641 Adjust all the skeletons.
642
ba9ecd19
AD
6432006-05-14 Akim Demaille <akim@lrde.epita.fr>
644
645 * etc/bench.pm: Shorten bench names.
646
4e83ea15
AD
6472006-05-14 Akim Demaille <akim@lrde.epita.fr>
648
649 * src/output.h, src/output.c (error_verbose): Move to...
650 * src/getargs.h, src/getargs.c: here.
651 Sort the flags.
652 Adjust dependencies.
653
6e93d810
PE
6542006-05-13 Paul Eggert <eggert@cs.ucla.edu>
655
656 * data/c.m4 (b4_copyright): Put the special exception for Bison
657 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
658 uses changed. Suggested by Akim Demaille. Also, wrap the
659 copyright notice, in case it is longer than 80 columns. Replace
660 comma by newline after title.
6e93d810 661
eaea13f5
PE
6622006-05-11 Paul Eggert <eggert@cs.ucla.edu>
663
664 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
665 incompatibility, not a bug. Mention that it wasn't fixed as of
666 flex 2.5.33.
667
3cf084ec
AD
6682006-05-11 Akim Demaille <akim@lrde.epita.fr>
669
670 * examples/extexi: Enforce the precedence of concatenation over
671 >>.
0a9f1c7d 672 Reported by Tommy Nordgren.
3cf084ec 673
32c96bd7
AD
6742006-05-11 Akim Demaille <akim@lrde.epita.fr>
675
676 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
677 with the member "token".
f94705b2 678 Reported by Martin Nylin.
32c96bd7 679
eaea13f5
PE
6802006-05-08 Paul Eggert <eggert@cs.ucla.edu>
681
682 * data/glr.c: Switch to Bison 2.2 special-exception language in
683 the copyright notice. Use more-regular format for titles and
684 copyright notices.
685 * data/glr.cc: Likewise.
686 * data/location.cc: Likewise.
687 * data/yacc.cc: Likewise.
688 * doc/bison.texinfo (Conditions): Document this.
689 * NEWS: likewise. Upgrade version to 2.2.
690
6e2d1146
AD
6912006-04-27 Akim Demaille <akim@lrde.epita.fr>
692
693 * data/glr.cc: Remove dead code.
694
47671055
PE
6952006-04-25 Paul Eggert <eggert@cs.ucla.edu>
696
697 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
698 that variable and the line breaks the bootstrap. Problem reported
699 by Juan M. Guerrero.
700
ed2e6384
AD
7012006-04-24 Akim Demaille <akim@lrde.epita.fr>
702
703 * doc/bison.texinfo (Multiple start-symbols): New.
704
3cedc2dc
AD
7052006-04-24 Akim Demaille <akim@lrde.epita.fr>
706
707 * etc/README, etc/bench.pl: New.
708
b2ddc3f3
AD
7092006-04-03 Akim Demaille <akim@lrde.epita.fr>
710
711 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
712 rule.
713 Reported by Mickael Labau.
714 * tests/input.at (Torturing the Scanner): Test it.
715
91e3ac9a
PE
7162006-03-16 Paul Eggert <eggert@cs.ucla.edu>
717
718 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
719 Problem reported by Bob Rossi.
720
7212006-03-13 Paul Eggert <eggert@cs.ucla.edu>
722
723 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
724 and didn't really work.
725 For the index, use @ifnotinfo, not @iftex.
726 Minor cleanups of spacing and terminology.
727
5cf61e93
AD
7282006-03-12 Akim Demaille <akim@lrde.epita.fr>
729
730 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
731 of AT_NAME_PREFIX when %name-prefix is not used.
732
aa08666d
AD
7332006-03-12 Akim Demaille <akim@lrde.epita.fr>
734
735 Apply --prefix to C++ skeletons too: they change the namespace.
736 The test suite already exercize these cases.
737 * data/c++.m4 (b4_namespace): New.
738 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
739 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
740 * data/yacc.c, data/glr.c: Remove a useless `[]'.
741 * doc/bison.texinfo: Document it.
742 (Option Cross Key): Use @multitable in all formats. It looks
743 nicer, even in TeX outputs.
744 (Rules): Use the same code whatever the output type is.
745 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
746 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
747 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 748
45567173
AD
7492006-03-10 Akim Demaille <akim@lrde.epita.fr>
750
751 * TODO: Remove dead items.
752
e9d8f881 7532006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
754
755 * doc/FAQ: Remove, merged into...
756 * doc/bison.texinfo (FAQ): this.
757 * doc/Makefile.am (EXTRA_DIST): Adjust.
758
c095d689
AD
7592006-03-10 Akim Demaille <akim@lrde.epita.fr>
760
761 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
762 even if empty.
763 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
764 * doc/bison.texinfo (Calc++ Scanner): Use it.
765
6e0f8287
PE
7662006-03-09 Paul Eggert <eggert@cs.ucla.edu>
767
768 Fix two nits reported by twlevo, plus one more that I discovered.
769
770 * src/assoc.h (assoc_to_string): Give a name to the arg, as
771 this is the usual Bison style.
772 * src/location.h (location_print): Likewise.
773
774 * src/reader.h (token_name): Likewise.
775
d6b771c3
PE
7762006-03-08 Paul Eggert <eggert@cs.ucla.edu>
777
778 Fix some nits reported by twlevo.
779 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
780 and "POSIX". Use more-modern syntax for URLs. Mention C++
781 and ask for Java. Don't hardwire OS version numbers. Add
782 copyright notice.
783 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
784 * src/conflicts.c (solved_conflicts_obstack): Now static.
785
1e137b71
JD
7862006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
787
788 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
789 page. Say "you can use it" not "you may use it" as on the web page;
790 we're describing capabilities not granting permission.
791
73f2e47e
PE
7922006-03-06 Paul Eggert <eggert@cs.ucla.edu>
793
6d05403d
PE
794 * data/glr.c (yyresolveLocations): Rename local variables to avoid
795 shadowing warnings. Use usual patter for iterating through RHS.
796 * tests/glr-regression.at
797 (Uninitialized location when reporting ambiguity):
798 Modify yylex so that it uses its argument, rather than trying
799 to rely on ARGSUSED (which doesn't work for gcc with warnings).
800 const char -> char const.
801
73f2e47e
PE
802 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
803 Don't use tabs inside commands; it messes up 'ps'.
804 Problem reported by twlevo.
805
8710fc41
JD
8062006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
807
808 * tests/glr-regression.at (Uninitialized location when reporting
809 ambiguity): New test case.
810 * data/glr.c (yyresolveLocations): New function, which uses
811 YYLLOC_DEFAULT.
812 (yyresolveValue): Invoke yyresolveLocations before reporting an
813 ambiguity.
814 * doc/bison.texinfo (Default Action for Locations): Note
815 YYLLOC_DEFAULT's usage for ambiguity locations.
816 (GLR Semantic Actions): Cross-reference those notes.
817
ae952af2
JD
8182006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
819
820 * tests/glr-regression.at (Leaked semantic values when reporting
821 ambiguity): Remove unnecessary union and type declarations.
822 (Leaked lookahead after nondeterministic parse syntax error): New test
823 case.
824 * data/glr.c (yyparse): Check for zero stacks remaining before
825 attempting to shift the lookahead so that you don't lose it.
826
35ee866a
JD
8272006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
828
829 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
830 * tests/glr-regression.at (Leaked semantic values when reporting
831 ambiguity): New test case.
832 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
833 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
834 now unnecessary yystackp parameter.
835 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
836 destructors can be called.
837
838 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
839 in existing testcases.
840
520181ab
JD
8412006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
842
843 Don't leak semantic values for parent RHS when a user action cuts the
844 parser, and clean up related code a bit.
845 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
846 cuts parse): Rename to...
847 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
848 for leaked parent RHS values.
849 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
850 between an unresolved state (non-empty chain of semantic options) and
851 an incomplete one (signaled by an empty chain).
ae952af2 852 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
853 successfully or unsuccessfully resolved yyGLRState to...
854 (yyresolveValue): ... here so that yyresolveValue always leaves a
855 yyGLRState with consistent data and thus is easier to understand.
856 Remove the yyvalp and yylocp parameters since they are always just
857 taken from the yys parameter. When reporting a discarded merged value
858 in debugging output, note that it is incompletely merged. Document the
859 interface.
860 (yyresolveAction): If resolving any of the RHS states fails, destroy
861 them all rather than leaking them. Thus, as long as user actions are
862 written to clean up the RHS correctly, yyresolveAction always cleans up
863 the RHS of a semantic option. Document the interface.
864
18d9185c
PE
8652006-02-27 Paul Eggert <eggert@cs.ucla.edu>
866
867 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
868 led to a segmentation fault in GNU Pascal. Problem reported
869 by Waldek Hebisch.
870
841a7737
JD
8712006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
872
873 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
874 mid-rule action inside a nonterminal symbol in order to declare a
875 destructor for its semantic value.
876
fc3f467f
PE
8772006-02-16 Paul Eggert <eggert@cs.ucla.edu>
878
879 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
880 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
881 __cplusplus && ! defined _STDLIB_H && !
882 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
883 defined free))]: Include <stdlib.h> rather than rolling our own
884 declarations of malloc and free, to avoid problems with
885 incompatible declarations (using 'throw') C++'s stdlib.h. This
886 should fix Debian bug 340012
887 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
888 reported by Guillaume Melquiond.
889
a3af26dd
PE
8902006-02-13 Paul Eggert <eggert@cs.ucla.edu>
891
4d7bc38c
PE
892 * NEWS: Clarify symbols versus types in unused-value warnings.
893
a3af26dd
PE
894 * configure.ac (AC_INIT): Bump version number.
895
4e26c69e
PE
8962006-02-13 Paul Eggert <eggert@cs.ucla.edu>
897
898 * NEWS: Version 2.1a.
899 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
900 since C99 requires this.
901
498e897c
PE
9022006-02-11 Paul Eggert <eggert@cs.ucla.edu>
903
904 * m4/c-working.m4: New file.
905 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
906
57bb17ca
PE
9072006-02-10 Paul Eggert <eggert@cs.ucla.edu>
908
909 * Makefile.maint: Merge from coreutils.
910
0be105dc
PE
9112006-02-09 Paul Eggert <eggert@cs.ucla.edu>
912
913 More portability fixes for problems summarized by Nelson H. F. Beebe.
914
915 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
916 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
917 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
918 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
919 messes up because C++ code is compiled in 32-bit mode but linked
920 in 64-bit mode.
921
6fc0c024
PE
9222006-02-08 Paul Eggert <eggert@cs.ucla.edu>
923
924 More portability fixes for problems summarized by Nelson H. F. Beebe.
925
7870f699
PE
926 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
927 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
928
6fc0c024
PE
929 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
930 nodist_PROGRAMS, since we don't need to actually compile the
931 example if we're just doing a plain 'make'. This avoids bothering
932 the installer unnecessarily about problems due to weird C++
933 compilers.
934
fe6c2fde
PE
9352006-02-06 Paul Eggert <eggert@cs.ucla.edu>
936
937 More portability fixes for problems summarized by Nelson H. F. Beebe.
938
939 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
940 than #include "...", and compile with -I'.'. The old method was
941 not portable, according to Posix and the C standard, and it does
942 not work with Sun C 5.7, where previous #line directives affect
943 the working directory used in later #include "..." directives.
944
927b425b
JMG
9452006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
946
947 Various DJGGP specific issues in /djgpp
948
d9735e9e
PE
9492006-02-02 Paul Eggert <eggert@cs.ucla.edu>
950
951 More portability fixes for problems summarized by Nelson H. F. Beebe.
952
953 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
954 '#include <map>' works and that you can apply ++ to iterators.
955
5a6755af
PE
9562006-02-01 Paul Eggert <eggert@cs.ucla.edu>
957
67a0dc4f
PE
958 Work around portability problems summarized by Nelson H. F. Beebe in
959 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
960
8c86f0ef
PE
961 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
962 that '#include <string>' works.
963
de35dd59
PE
964 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
965 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
966 "warning: sorry: semantics of inline function static data `const
967 unsigned char translate_table[262]' are wrong (you'll wind up with
968 multiple copies)".
969
67a0dc4f
PE
970 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
971 or, xor to not_, and_, or_, and xor_, respectively. This works
972 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
973 random system header somewhere that includes the equivalent of
974 <iso646.h>.
975
5a6755af
PE
976 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
977 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 978 Suite Version 2.0.
5a6755af 979
3f001415
JD
9802006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
981
982 During deterministic GLR operation, user actions should be able to
983 influence the parse by changing yychar. To make this easier to fix and
984 to make glr.c easier to evolve in general, don't maintain yytoken in
985 parallel with yychar; just compute yytoken when needed.
986 * tests/glr-regression.at (Incorrect lookahead during deterministic
987 GLR): Check that setting yychar in a user action has the intended
988 effect.
989 * data/glr.c (yyGLRStack): Remove yytokenp member.
990 (yyclearin): Don't set *yytokenp.
991 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
992 yychar rather than *yytokenp to determine the current lookahead.
993 Compute yytoken locally when needed.
994 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
995 point to.
996
997 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
998 after `--report' documentation.
999
e2a8c0f5
PE
10002006-01-30 Paul Eggert <eggert@cs.ucla.edu>
1001
1002 * src/parse-gram.y (grammar_declaration): Location of printer
1003 symbol is @1, not list->location. Bug reported by twlevo.
1004 * tests/input.at (Incompatible Aliases): Adjust to above change.
1005
6b702268
PE
10062006-01-29 Paul Eggert <eggert@cs.ucla.edu>
1007
27622431
PE
1008 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
1009 all the test at once. This makes the output easier to read in the
1010 normal case.
1011
6b702268
PE
1012 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
1013 got from <http://bro-ids.org/download.html>. The bug is that
1014 when two actions appeared in succession, the second one was
1015 scanned before the first one was added to the grammar rule
1016 as a midrule action. Bison then output the incorrect warning
1017 "parse.y:905.17-906.36: warning: unused value: $3".
1018 * src/parse-gram.y (BRACED_CODE, action): These are no longer
1019 associated with a value.
1020 (rhs): Don't invoke grammar_current_rule_action_append.
1021 (action): Invoke it here instead.
1022 * src/reader.c (grammar_midrule_action): Now extern.
1023 (grammar_current_rule_action_append): Don't invoke
1024 grammar_midrule_action; that is now the scanner's job.
1025 * src/reader.h (last_string, last_braced_code_loc):
1026 (grammar_midrule_action): New decls.
1027 * src/scan-gram.l (last_string): Now extern, sigh.
1028 (last_braced_code_loc): New extern variable.
1029 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
1030 rule already has an action.
1031 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
1032 * tests/input.at (AT_CHECK_UNUSED_VALUES):
1033 Add some tests to check that the above changes fixed the bug.
1034
d40ba6c2
PE
10352006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1036
1037 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
1038 All used changed. Check whether the symbol has a destructor,
1039 not whether it is typed.
1040 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
1041 that the values are still reported as unused. All line numbers
1042 adjusted.
1043
401aace6
PE
10442006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1045
1046 Work around a bug in bro 0.8, which underparenthesizes its
1047 definition of YYLLOC_DEFAULT.
1048 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
1049 their arguments.
1050 * data/lalr1.cc: Likewise.
1051 * data/yacc.cc: Likewise.
1052
06f01bc4
PE
10532006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1054
401aace6
PE
1055 Work around a bug in Pike 7.0, and give the Pike folks a
1056 better way to override the usual int widths.
1057 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
1058 user can override the types.
1059 (short): #undef, to work around a bug in Pike 7.0.
1060 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
1061 (union yyalloc.yyss): Use yytype_int16 rather than short.
1062 All uses changed.
1063 (yysigned_char): Remove.
1064 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
1065 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
1066 * tests/regression.at (Web2c Actions): Adjust to above changes.
1067
1068 * src/reader.c (check_and_convert_grammar): New function.
1069 (reader): Close the input file even if something went wrong during
1070 parsing. Minor file descriptor leak reported by twlevo.
1071
06f01bc4
PE
1072 * src/assoc.c (assoc_to_string): Use a default: abort (); case
1073 to pacify gcc -Wswitch-default.
1074 * src/scan-gram.l (adjust_location): Use a default: break; case
1075 to pacify gcc -Wswitch-default.
1076 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
1077 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1078 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1079 Move these decls to scan-skel.l, since they don't need to be
1080 visible elsewhere.
1081 * src/scan-skel.l: Accept the above decls.
1082 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
1083 is used.
1084
02650b7f
PE
10852006-01-21 Paul Eggert <eggert@cs.ucla.edu>
1086
1087 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1088 since we don't want to insist on a version number at the start
1089 of the changelog every time.
1090 * Makefile.maint: Sync from coreutils a bit better.
1091 (sc_trailing_blank): Renamed from sc_trailing_space.
1092 All uses changed.
1093 (sc_no_if_have_config_h, sc_require_config_h):
1094 (sc_prohibit_assert_without_use): New rules.
1095 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
1096 (sc_dd_max_sym_length): Fix leading spaces in rule.
1097 (sc_system_h_headers): Prefix with @.
1098 (sc_useless_cpp_parens, m4-check): Output line numbers.
1099 (changelog-check): Allow version only in head.
1100 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
1101 satisfy new Makefile.maint rule.
1102 * data/glr.c: Likewise.
1103 * data/glr.cc: Likewise.
1104 * data/lalr1.cc: Likewise.
1105 * data/yacc.c: Likewise.
1106 * lib/ebitsetv.c: Likewise.
1107 * lib/lbitset.c: Likewise.
1108 * lib/subpipe.c: Likewise.
1109 * lib/timevar.c: Likewise.
1110 * src/system.h: Likewise.
1111 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
1112 * djgpp/Makefile.maint: Add copyright notice.
1113 * djgpp/README.in: Likewise.
1114 * djgpp/config.bat: Likewise.
1115 * djgpp/config.site: Likewise.
1116 * djgpp/config_h.sed: Likewise.
1117 * djgpp/djunpack.bat: Likewise.
1118 * djgpp/config.sed: Fix copyright notice to match standard format.
1119 * djgpp/subpipe.h: Likewise.
1120 * lib/bitsetv-print.c: Likewise.
1121 * lib/bitsetv.c: Likewise.
1122 * lib/subpipe.h: Likewise.
1123 * lib/timevar.c: Likewise.
1124 * lib/timevar.h: Likewise.
1125 * djgpp/subpipe.c: Use standard recipe for config.h.
1126 * lib/abitset.c: Likewise.
1127 * lib/bitset.c: Likewise.
1128 * lib/bitset_stats.c: Likewise.
1129 * lib/bitsetv-print.c: Likewise.
1130 * lib/bitsetv.c: Likewise.
1131 * lib/ebitsetv.c: Likewise.
1132 * lib/get-errno.c: Likewise.
1133 * lib/lbitset.c: Likewise.
1134 * lib/subpipe.c: Likewise.
1135 * lib/timevar.c: Likewise.
1136 * lib/vbitset.c: Likewise.
1137 * tests/local.at: Likewise.
1138 * src/scan-gram.l: Don't include verify.h, since system.h does
1139 that for us.
1140 * .x-sc_require_config_h: New file.
1141 * .x-sc_unmarked_diagnostics: New file.
1142
287c78f6
PE
11432006-01-20 Paul Eggert <eggert@cs.ucla.edu>
1144
287c78f6
PE
1145 Be a bit more systematic about using 'abort'.
1146 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
1147 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
1148 Put 'default: abort ();' before some other case, to satisfy older
1149 pedantic compilers.
1150 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1151 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
1152 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
1153 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
1154 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
1155 (get_decision_str, get_orientation_str, get_node_alignment_str):
1156 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
1157 (get_linestyle_str, get_arrowstyle_str): Likewise.
1158 * src/conflicts.c (resolve_sr_conflict):
1159 Use a default case rather than one for the one remaining enum
1160 value, to catch invalid enum values as well.
1161 * src/lalr.c (set_goto_map, map_goto):
1162 Prefer "assert (FOO);" to "if (!FOO) abort ();".
1163 * src/nullable.c (nullable_compute, token_definitions_output):
1164 Likewise.
1165 * src/reader.c (packgram, reader): Likewise.
1166 * src/state.c (transitions_to, state_new, state_reduction_find):
1167 Likewise.
1168 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
1169 (symbol_pack): Likewise.
1170 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
1171 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
1172 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
1173 * src/system.h: Don't include <assert.h>.
1174 (assert): New macro.
1175
1176 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
1177 (Destructor Decl, Parser Function, Pure Calling):
1178 Describe rules for braces inside C code more carefully.
287c78f6 1179
c66dfadd
PE
11802006-01-19 Paul Eggert <eggert@cs.ucla.edu>
1181
c21493b8
PE
1182 Fix some porting glitches found by Nelson H. F. Beebe.
1183 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
1184 compilers that don't understand that abort () does not return.
1185 * src/state.c (transitions_to): Likewise.
1186 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1187 that '#include <cstdlib>' works.
1188 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
1189 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
1190 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
1191 for the benefit of some pre-C99 compilers.
1192
b6e3facf
PE
1193 * bootstrap: Undo changes to gnulib files that autoreconf made.
1194
c66dfadd
PE
1195 Minor fixups to get 'make maintainer-check' to work.
1196 * configure.ac: Don't use -Wnested-externs, as it's incompatible
1197 with the new verify.h implementation.
1198 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
1199 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
1200 * data/yacc.c (YYUSE): Likewise.
1201 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
1202 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
1203 * src/parse-gram.y (declaration): Don't pass a string constant
1204 to a function that expects char *, since GCC might complain
1205 about the constant value.
1206 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
1207 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
1208 before #defining them.
1209 * tests/glr-regression.at
1210 (Incorrectly initialized location for empty right-hand side in GLR):
1211 In yyerror, use the msg arg.
1212 (Corrupted semantic options if user action cuts parse):
1213 (Incorrect lookahead during deterministic GLR):
1214 (Incorrect lookahead during nondeterministic GLR):
1215 Don't name a local var 'index'; it shadows string.h's 'index'.
1216
ed94ef2a
AD
12172006-01-19 Akim Demaille <akim@epita.fr>
1218
1219 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
1220 location, not just parts of it.
1221
e9ad4aec
PE
12222006-01-18 Paul Eggert <eggert@cs.ucla.edu>
1223
d6ca7905
PE
1224 * NEWS: Document the fact that multiple %unions are now allowed.
1225 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
1226 * TODO: This feature is now implemented, so remove it from
1227 the wishlist.
d6ca7905 1228
ef1b70e0
PE
1229 * Makefile.maint: Merge with coreutils Makefile.maint.
1230 (CVS_LIST): Use build-aux version if available.
1231 (VERSION_REGEXP): New macro.
1232 (syntax-check-rules): Add sc_no_if_have_config_h,
1233 sc_prohibit_assert_without_use, sc_require_config_h,
1234 sc_useless_cpp_parens.
1235 (sc_obsolete_symbols): Check for O_NDELAY.
1236 (sc_dd_max_sym_length): Track coreutils.
1237 (sc_unmarked_diagnostics): Look in all files, not just *.c.
1238 (sc_useless_cpp_parens): New rule.
1239 (news-date-check): Look for version or today's date.
1240 (changelog-check): Don't require version number near head.
1241 (copyright-check): Use current year instead of hardwiring 2005.
1242 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
1243 (announcement): Add --gpg-key-ID.
1244
1245 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
1246 with "file system".
1247
2073ce56 1248 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
1249 array. Problem reported by twlevo.
1250 * src/reader.c (packgram): Prepend a new sentinel before ritem.
1251 * src/lalr.c (build_relations): Rely on new sentinel.
1252 * src/gram.c (gram_free): Adjust to new sentinel.
1253
b7691f15
JD
12542006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
1255
1256 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
1257 yylookaheadNeeds. All uses updated.
1258 (yysplitStack): Rename local yynewLookaheadStatuses to
1259 yynewLookaheadNeeds.
1260 * data/glr-regression.at (Incorrect lookahead during nondeterministic
1261 GLR): In comments, change `lookahead status' to `lookahead need'.
1262
ddee1b06
PH
12632006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1264
1265 * data/glr.c (yysplitStack): A little stylistic rewrite.
1266
12f4614d
PH
12672006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1268
1269 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
1270
32c29292
JD
12712006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
1272
1273 * doc/bison.texinfo: Fix some typos.
1274 (GLR Semantic Actions): New subsection discussing special
1275 considerations because GLR semantic actions might be deferred.
1276 (Actions): Mention look-ahead usage of yylval.
1277 (Actions and Locations): Mention look-ahead usage of yylloc.
1278 (Special Features for Use in Actions): Add YYEOF entry and mention it
1279 in the yychar entry.
1280 In the yychar entry, remove mention of the local yychar case (pure
1281 parser) since this is irrelevant information when writing semantic
1282 actions and since it's already discussed in `Bison Symbols' where
1283 yychar is otherwise described as an external variable.
1284 In the yychar entry, don't call it the `current' look-ahead since it
1285 isn't when semantic actions are deferred.
1286 In the yychar and yyclearin entries, add note about deferred semantic
1287 actions.
1288 Add yylloc and yylval entries discussing look-ahead usage.
1289 (Look-Ahead Tokens): When discussing yychar, don't call it the
1290 `current' look-ahead, and do mention yylval and yylloc.
1291 (Error Recovery): Cross-reference `Action Features' when mentioning
1292 yyclearin.
1293 (Bison Symbols): In the yychar entry, don't call it the `current'
1294 look-ahead.
1295 In the yylloc and yylval entries, mention look-ahead usage.
1296
de366a2f 12972006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
1298
1299 * tests/glr-regression.at: Update copyright year to 2006.
1300
bf70fa87
JD
13012006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1302
1303 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1304 use during nondeterministic operation to track which stacks have
1305 actually needed the current lookahead.
1306 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1307 Allocate, deallocate, resize, and otherwise shuffle space for
1308 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1309 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1310 appropriately during nondeterministic operation.
1311 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1312 members to store the current lookahead to be used by the deferred
1313 user action.
1314 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1315 from which the RHS is taken. Set the lookahead members of the new
1316 yySemanticOption according to the lookahead status for stack yyk.
1317 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1318 yyaddDeferredAction.
1319 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1320 members of yySemanticOption before invoking yyuserAction, and then set
1321 them back to their current values afterward.
1322 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1323 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1324 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1325 titles for consistency.
1326 (Leaked merged semantic value if user action cuts parse): In order to
1327 suppress lint warnings, use arguments in merge function, and assign
1328 char value < 128 in main.
1329 (Incorrect lookahead during deterministic GLR): New test case.
1330 (Incorrect lookahead during nondeterministic GLR): New test case.
1331
05449a2c
JD
13322006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1333
de366a2f 1334 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
1335 !yyvaluep as signal that no semantic value is available to print.
1336 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1337 to print a semantic value.
1338
4158e0a1 13392006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 1340
4158e0a1
JD
1341 * tests/glr-regression.at: For consistency with my newer test cases,
1342 don't thank myself.
1343
d659304d
JD
13442006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1345
1346 * data/glr.c (yyresolveValue): When merging semantic options, if at
1347 least one user action succeeds but a later one cuts the parse, then
1348 destroy the semantic value before returning rather than leaking it.
1349 (yyresolveStates): If a user action cuts the parse and thus
1350 yyresolveValue fails, ignore the (unset) semantic value rather than
1351 corrupting the yyGLRState, and empty the semantic options list since
1352 the user actions should have called all necessary destructors.
1353 Simplify code with YYCHK.
1354 * tests/glr-regression.at (Corrupted semantic options if user action
1355 cuts parse): New test case.
1356 (Undesirable destructors if user action cuts parse): New test case.
1357 Before applying any of this patch, this test case never actually failed
1358 for me... but only because the corrupted semantic options usually
1359 masked this bug.
1360 (Leaked merged semantic value if user action cuts parse): New test
1361 case.
1362
6ec2c0f2
AD
13632006-01-05 Akim Demaille <akim@epita.fr>
1364
1365 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
1366
1b9c21fb
PE
13672006-01-04 Paul Eggert <eggert@cs.ucla.edu>
1368
1369 * data/c.m4 (b4_c_modern): New macro, with a new provision for
1370 _MSC_VER. Problem reported by Cenzato Marco.
1371 (b4_c_function_def): Use it.
1372 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
1373 b4_c_modern.
1374 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
1375 than rolling our own.
1376
84866159
AD
13772006-01-04 Akim Demaille <akim@epita.fr>
1378
1379 Also warn about non-used mid-rule values.
1380 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
1381 member.
1382 (symbol_list_new): Adjust.
1383 * src/reader.c (symbol_typed_p): New.
1384 (grammar_rule_check): Use it.
1385 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
1386 Check its rule.
1387 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
1388 Use it.
1389 * tests/actions.at (Exotic Dollars): Adjust.
1390
378f4bd8
AD
13912006-01-04 Akim Demaille <akim@epita.fr>
1392
1393 * src/reader.c (grammar_midrule_action): If $$ is set in a
1394 mid-rule, move the `used' bit to its lhs.
1395 * tests/input.at (Unused values): New.
1396 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
1397
e2a21b6f
PE
13982006-01-03 Paul Eggert <eggert@cs.ucla.edu>
1399
54662697
PE
1400 * doc/bison.texinfo (Bison Options): Say more accurately what
1401 --yacc does.
1402 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
1403 about declarations in the grammar when in Yacc mode, as POSIX does
1404 not require a diagnostic when the grammar uses extensions.
1405
1406 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
1407
073f9288
PE
1408 Warn about dubious constructions like "%token T T".
1409 Reported by twlevo.
1410 * src/symtab.h (struct symbol.declared): New member.
1411 * src/symtab.c (symbol_new): Initialize it to false.
1412 (symbol_class_set): New arg DECLARING, specifying whether
1413 this is a declaration that we want to warn about, if there
1414 is more than one of them. All uses changed.
1415
1221b78a
PE
1416 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
1417 Allow multiple %union directives, whose contents concatenate.
1418 * src/parse-gram.y (grammar_declaration): Likewise.
1419 Use muscle_code_grow, so that we don't need stype_line any more.
1420 All uses changed.
1421
1422 * src/muscle_tab.c (muscle_grow): Fix comment.
1423
e2a21b6f
PE
1424 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
1425 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
1426 Update copyright year to 2006.
1427
8f7e3cf9
AD
14282006-01-03 Akim Demaille <akim@epita.fr>
1429
1430 Have glr.cc pass (some of) the calc.at tests.
1431 * data/glr.cc (b4_parse_param_orig): New.
1432 (b4_parse_param): Improve its definition, and bound it more
1433 clearly in the skeleton.
1434 (b4_epilogue): Append, instead of prepending, in order to keep
1435 #line consistency.
1436 Simplify the generation of auxiliary functions: locations and
1437 purity are mandated.
1438 (b4_global_tokens_and_yystype): Honor it.
1439 * data/location.cc (c++.m4): Don't include it.
1440 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
1441 and AT_SKEL_CC_IF.
1442 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
1443 AT_LALR1_CC_IF.
1444 Be sure to initialize the first position's filename.
1445 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
1446 mandated anyway.
1447 (AT_CHECK_CALC_GLR_CC): New.
1448 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
1449
3953ed88
AD
14502006-01-02 Akim Demaille <akim@epita.fr>
1451
1452 * src/output.c (output_skeleton): Don't hard wire the inclusion of
1453 c.m4.
0a96ba81 1454 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
1455 * data/glr.cc: Do not include stack.hh.
1456
9ecafbbf
AD
14572006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1458
1459 * data/glr.c: Reformat whitespace with tabs.
1460 (b4_lpure_formals): Remove this unused m4 macro.
1461 * tests/cxx-type.at: Reformat whitespace with tabs.
1462 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
1463 since it's a member. Rename type to isNterm for clarity.
1464
c4d497a0
AD
14652005-12-29 Akim <akim@sulaco.local>
1466
1467 Let glr.cc catch up with symbol_value_print.
1468 * data/glr.cc (b4_yysymprint_generate): Replace by...
1469 (b4_yy_symbol_print_generate): this.
1470 (yy_symbol_print, yy_symbol_value_print): Declare them.
1471
4517da37
PE
14722005-12-28 Paul Eggert <eggert@cs.ucla.edu>
1473
1474 * src/location.h (boundary): Note that a line or column equal
1475 to INT_MAX indicates an overflow.
1476 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
1477 (rule_length_overflow, increment_rule_length, add_column_width):
1478 New functions.
1479 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
1480 (<SC_BRACED_CODE>"}"):
1481 Use increment_rule_length rather than incrementing it by hand.
1482 (adjust_location, handle_syncline): Diagnose overflow.
1483 (handle_action_dollar, handle_action_at):
1484 Fix bug with monstrosities like $-2147483648.
1485 Remove now-unnecessary checks.
1486 (scan_integer): Verify assumptions and remove now-unnecessary checks.
1487 (convert_ucn_to_byte): Verify assumptions.
1488 (handle_syncline): New arg LOC. All callers changed.
1489 Don't store through a value derived from char const * pointer.
1490
1491 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
1492 GCC warnings.
1493
e3233bf6
PE
14942005-12-27 Paul Eggert <eggert@cs.ucla.edu>
1495
1496 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
1497 Remove unnecessary forward static decls.
1498
8f3596a6
AD
14992005-12-27 Akim Demaille <akim@epita.fr>
1500
1501 * src/reader.c (grammar_current_rule_check): Also check that $$
1502 is used.
1503 Take the rule to check as argument, hence rename as...
1504 (grammar_rule_check): this.
1505 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
1506 Rename as...
1507 (grammar_rule_begin, grammar_rule_end): these, for consistency.
1508 (grammar_midrule_action, grammar_symbol_append): Now static.
1509 * tests/torture.at (input): Don't rely on the default action
1510 being always performed.
1511 * tests/calc.at: "Set" $$ even when the action is "cut" with
1512 YYERROR or other.
1513 * tests/actions.at (Exotic Dollars): Instead of using unused
1514 values, check that the warning is issued.
1515
721be13c
PE
15162005-12-22 Paul Eggert <eggert@cs.ucla.edu>
1517
1518 * NEWS: Improve wording for unused-value warnings.
1519
a0af42fc
AD
15202005-12-22 Akim Demaille <akim@epita.fr>
1521
1522 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
1523 (b4_yysymprint_generate): Rename as...
1524 (b4_yy_symbol_print_generate): this.
1525 Generate yy_symbol_print instead of yysymprint.
1526 Generate also yy_symbol_value_print, and use it.
1527
affac613
AD
15282005-12-22 Akim Demaille <akim@epita.fr>
1529
721be13c 1530 * NEWS: Warn about unused values.
affac613
AD
1531 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1532 a `used' member.
1533 (symbol_list_n_get, symbol_list_n_used_set): New.
1534 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1535 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1536 * src/reader.c (grammar_current_rule_check): Check that values are
1537 used.
1538 * src/symtab.c (symbol_print): Accept 0.
1539 * tests/existing.at: Remove the type information.
1540 Empty the actions.
1541 Remove useless actions (beware of mid-rule actions: perl -000
1542 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1543 * tests/actions.at (Exotic Dollars): Use unused values.
1544 * tests/calc.at: Likewise.
1545 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1546 Likewise.
1547
1548 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1549 rule_useful_p.
1550
9d9b8b70
PE
15512005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1552
8bb4c753
PE
1553 Undo 2005-12-01 tentative license wording change. The wording is
1554 still being reviewed by the lawyers, and we don't want to wait for
1555 them before publishing a test release. For now, revert to the
1556 previous wording.
1557 * NEWS: Undo 2005-12-01 change.
1558 * data/glr.c: Revert to previous license wording.
1559 * data/glr.cc: Likewise.
1560 * data/lalr1.cc: Likewise.
1561 * data/location.cc: Likewise.
1562 * data/yacc.c: Likewise.
1563
9d9b8b70
PE
1564 * NEWS: Reword %destructor vs YYABORT etc.
1565 * data/glr.c: Use American spacing, for consistency.
1566 * data/glr.cc: Likewise.
1567 * data/lalr1.cc: Likewise.
1568 * data/yacc.c: Likewise.
1569 * data/yacc.c: Reformat comments slightly.
1570 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1571 for consistency. Fix some spelling errors and reword recently-included
1572 text slightly.
1573 * tests/cxx-type.at: Cast results of malloc, for C++.
1574
2c3b392a
AD
15752005-12-21 Joel E. Denny <address@hidden>
1576
1577 * tests/cxx-type.at: Construct a tree, count the parents of shared
1578 nodes, and free each node once and only once. Previously, the memory
1579 for semantic values was leaked instead.
1580
d6cff4dc
AD
15812005-12-21 Joel E. Denny <address@hidden>
1582
1583 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
1584 (yylval, yylloc): If pure, #define to yystackp->yyval and
1585 yystackp->yyloc similar to yychar and yynerrs.
1586 (yyparse): If pure, remove local yylval and yylloc. Add local
1587 yystackp to accommodate pure definitions of yylval and yylloc.
1588 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
1589 yylvalp and yyllocp to &yylval and &yylloc.
1590 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
1591 namespace. Previously, nerrs and char were missing, but lval and lloc
1592 weren't necessary.
1593 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
1594 yylvalp and yyllocp parameters since, if pure, these are now always
1595 accessible through yystackp. If not pure, they are still accessible
1596 globally.
1597 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
1598 `if (YYID (N))' to pacify lint.
1599
a85284cf
AD
16002005-12-21 Akim Demaille <akim@epita.fr>
1601
1602 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
1603 destroy the RHS symbols of a rule.
1604 * data/yacc.c (yylen): Initialize to 0.
1605 Keep its value to the number of items to possibly shift.
1606 In particular, a regular successful parse that ends on YYFINAL by
1607 a (internal) YYACCEPT must not have yylen != 0.
1608 (yyerrorlab, yyreturn): Pop the RHS.
1609 Reorder a bit to emphasize the `shifting' bits of code.
1610 (YYPOPSTACK): Now accept a number of items to pop.
1611 * data/lalr1.cc: Likewise.
1612 * data/glr.c: Formatting changes.
1613 Use goto instead of fall through.
1614 * doc/bison.texinfo (Destructor Decl): Complete.
1615
d508c281
JMG
16162005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1617
1618 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1619 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
1620 * djgpp/config.bat: Replace every occurence of the file name
1621 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1622 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1623 * djgpp/config.sed: Replace every occurence of the file name
1624 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1625 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1626 * djgpp/djunpack.bat: DJGPP specific file.
1627 * djgpp/fnchange.lst: DJGPP specific file.
1628 * djgpp/README.in: Add new information about how to unpack the bison
1629 source on MSDOS and other systems which have 8.3 file name restrictions
1630 using djunpack.bat and fnchange.lst.
1631
3e7a2cd9
PE
16322005-12-12 Paul Eggert <eggert@cs.ucla.edu>
1633
1634 * bootstrap (build_cvs_prefix): Remove; unused.
1635 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
1636 when getting gnulib.
1637
16382005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
1639
1640 * data/glr.c: Reorder typedef declarations for structs to match order
1641 of struct declarations.
1642 Rename yystack everywhere to yystackp except in yyparse where it's not
1643 a pointer.
1644 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
1645 consistency.
1646 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
1647 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
1648 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
1649 lint.
1650
877519f8
PE
16512005-12-09 Paul Eggert <eggert@cs.ucla.edu>
1652
0eca5a39
PE
1653 * tests/sets.at (Accept): Fix typos in regular expression used to
1654 sed out the final state number.
1655
2cec9080
PE
1656 Work around portability problem on Solaris 10: flex-generated
1657 files include <stdio.h> before <config.h>, which messes up
1658 because the latter defines __EXTENSIONS__. Address the problem
1659 by creating two new little files that include <config.h> first,
1660 then include the flex-generated files. Rewrite everyone else
1661 to include <config.h> first, as well.
1662 * lib/timevar.c: Always include "config.h".
1663 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
1664 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
1665 (EXTRA_bison_SOURCES): New macro.
1666 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
1667 * src/system.h: Don't include config.h.
1668 * src/LR0.c: Include <config.h> first.
1669 * src/assoc.c: Likewise.
1670 * src/closure.c: Likewise.
1671 * src/complain.c: Likewise.
1672 * src/conflicts.c: Likewise.
1673 * src/derives.c: Likewise.
1674 * src/files.c: Likewise.
1675 * src/getargs.c: Likewise.
1676 * src/gram.c: Likewise.
1677 * src/lalr.c: Likewise.
1678 * src/location.c: Likewise.
1679 * src/main.c: Likewise.
1680 * src/muscle_tab.c: Likewise.
1681 * src/nullable.c: Likewise.
1682 * src/output.c: Likewise.
1683 * src/parse-gram.y: Likewise.
1684 * src/print.c: Likewise.
1685 * src/print_graph.c: Likewise.
1686 * src/reader.c: Likewise.
1687 * src/reduce.c: Likewise.
1688 * src/relation.c: Likewise.
1689 * src/state.c: Likewise.
1690 * src/symlist.c: Likewise.
1691 * src/symtab.c: Likewise.
1692 * src/tables.c: Likewise.
1693 * src/uniqstr.c: Likewise.
1694 * src/vcg.c: Likewise.
1695
877519f8
PE
1696 * src/parse-gram.y: Fix minor problems uncovered by lint.
1697 (current_lhs, current_lhs_location): Now static.
1698 (current_assoc): Remove unused variable.
1699
1700 Cleanups so that Bison-generated parsers have less lint.
1701 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
1702 Prepend /*ARGSUSED*/, for lint's sake.
1703 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
1704 definition if 'lint' is defined.
1705 (YYID): New macro (or function, if lint).
1706 All uses of /*CONSTCOND*/0 replaced by YYID(0).
1707 * data/yacc.c: Likewise.
1708 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
1709 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
1710 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
1711 is C++ only.
1712 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
1713 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
1714 Use YYID(0) rather than 0, for lint.
1715 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
1716 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
1717
f5228370
PE
17182005-12-07 Paul Eggert <eggert@cs.ucla.edu>
1719
1720 * tests/glr-regression.at
1721 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1722 Close memory leak reported by twlevo.
1723
69ce078b
PE
17242005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
1725
6ff99711
PE
1726 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
1727 all stacks.
1728 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
1729 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1730 New test case.
1731 (Duplicated user destructor for lookahead): This test now is expected
1732 to succeed.
1733
af3412cd
PE
17342005-12-01 Paul Eggert <eggert@cs.ucla.edu>
1735
32b5b719 1736 * NEWS: Document the following change.
af3412cd
PE
1737 * data/yacc.c: Say "parser skeleton" rather than "file", since
1738 it's no longer just a file.
1739 * data/glr.c: Grant a special exception for C GLR parsers, that
1740 reads like the already-existing exception for C LALR(1) parsers.
1741 * data/glr.cc: Likewise.
1742 * data/lalr1.cc: Likewise.
1743 * data/location.cc: Likewise.
1744 * data/yacc.c: Reword the "written by" statement to clarify that
1745 it was the parser skeleton, not the entire output file.
1746 * data/glr.c: Written by Paul Hilfinger.
1747 * data/glr.cc: Written by Akim Demaille.
1748 * data/lalr1.cc: Likewise.
1749
035aa4a0
PE
17502005-11-18 Paul Eggert <eggert@cs.ucla.edu>
1751
d9963c85
PE
1752 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
1753 Fix typos in previous change that broke 'make check'.
1754 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
1755 supported in C.
1756 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
1757 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
1758 We can revert this once things settle down.
1759
035aa4a0
PE
1760 * src/conflicts.c (conflicts_print): Don't print file name twice
1761 when %expect fails because there were no conflicts.
1762 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
1763 change.
1764 * tests/conflicts.at (%expect not enough, %expect too much):
1765 (%expect with reduce conflicts): Adjust to new behavior.
1766
17672005-11-18 Akim Demaille <akim@epita.fr>
1768
1769 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
1770 errors.
1771 * NEWS: Document this.
1772 * doc/bison.texinfo (Expect Decl): Likewise.
1773
d1ff7a7c
AD
17742005-11-16 Akim Demaille <akim@epita.fr>
1775
1776 Generalize the display of semantic values and locations in traces.
1777 * data/glr.c (yy_reduce_print): Fix indices (again).
1778 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
1779 literal integers.
1780 * data/lalr1.cc (yyreduce_print): Rename as...
1781 (yy_reduce_print): this.
1782 Display values and locations.
1783 * data/yacc.c (yy_reduce_print): Likewise.
1784 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
1785 (yysymprint): Move higher to be visible from yy_reduce_print).
1786 (yyparse): Adjust.
1787 * tests/calc.at: Adjust the expected length of the traces.
1788
6de5398d
AD
17892005-11-14 Akim Demaille <akim@epita.fr>
1790
1791 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
1792 from 1 to N, while values and location start at 0.
1793 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
1794
a1373f55
AD
17952005-11-14 Akim Demaille <akim@epita.fr>
1796
1797 * data/glr.c (yy_reduce_print): Fix the $ number.
1798
613d8952
AD
17992005-11-14 Akim Demaille <akim@epita.fr>
1800
1801 "Use" parse parameters.
1802 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
1803 * data/glr.c, data/glr.cc: Use them.
1804 * data/glr.c (YYUSE): Have a C++ definition that supports
1805 non-pointer types.
1806
b2741627
AD
18072005-11-14 Akim Demaille <akim@epita.fr>
1808
1809 * data/glr.c (yyexpandGLRStack): Declare only if defined.
1810
5059b5c8
AD
18112005-11-14 Akim Demaille <akim@epita.fr>
1812
42249483
AD
1813 * data/glr.cc: New.
1814 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 1815
4626a15d
AD
18162005-11-12 Akim Demaille <akim@epita.fr>
1817
1818 Let position and location be PODs.
1819 * data/location.cc (position::initialize, location::initialize): New.
1820 (position::position, location::location): Define only if
1821 b4_location_constructors is defined.
1822 * data/lalr1.cc (b4_location_constructors): Define it for backward
1823 compatibility.
1824 * doc/bison.texinfo (Initial Action Decl): Use initialize.
1825
18262005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
1827
1828 * data/lalr1.cc: Move the body of the ctor and dtor into the
1829 parser file (instead of the header).
1830 Wrap the implementations in a "namespace yy".
1831
18322005-11-12 Akim Demaille <akim@epita.fr>
1833
1834 Have glr.c include its header file when created.
1835 * data/glr.c (b4_shared_declarations): New.
1836 Output them verbatim in the parser if !%defines, otherwise
1837 output then in the header file, and include it instead.
1838
1989d947
AD
18392005-11-11 Akim Demaille <akim@epita.fr>
1840
1841 * data/glr.c: Comment changes.
1842
18432005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
1844
1845 When yydebug, report semantic and location values for reductions.
1846 * data/glr.c (yy_reduce_print): Report the semantic values and the
1847 locations.
1848 (YY_REDUCE_PRINT): Adjust.
1849 (yyglrReduce): Use them.
1850 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
1851 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
1852 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
1853 traces.
1854
02998094
AD
18552005-11-10 Akim Demaille <akim@epita.fr>
1856
1857 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
1858 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
1859 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
1860
5210672f
PE
18612005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
1862
1863 * m4/cxx.m4, examples/Makefile.am: Don't build
1864 examples/calc++ if no C++ compiler is available. (trivial change)
1865
a8991a1d
AD
18662005-11-09 Akim Demaille <akim@epita.fr>
1867
1868 * src/scan-skel.l: Use a couple of asserts.
1869
36b5e963
AD
18702005-11-03 Akim Demaille <akim@epita.fr>
1871
1872 In some (weird) cases, the final state number is incorrect.
1873 Reported by Alexandre Duret-Lutz.
1874 * src/LR0.c (state_list_append): Remove the computation of
1875 final_state.
1876 (save_reductions): Do it here.
1877 (get_state): Alpha conversion.
1878 (generate_states): Use a for loop.
1879 * src/gram.h (item_number_is_rule_number)
1880 (item_number_is_symbol_number): New.
1881 * src/state.c: Use assert.
1882 * src/system.h: Include assert.h.
1883 * tests/sets.at (Accept): New.
1884
44e7ead1
PH
18852005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1886
1887 * data/glr.c (yyfill): Adjust comment.
36b5e963 1888 (yyresolveAction): Initialize default location properly
44e7ead1
PH
1889 for empty right-hand sides.
1890 (yydoAction): Ditto.
1891 Add comment explaining apparently dead code.
36b5e963
AD
1892 * tests/glr-regression.at
1893 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 1894 New test.
36b5e963 1895
e10a80ee
PE
18962005-10-30 Paul Eggert <eggert@cs.ucla.edu>
1897
1898 * bootstrap (cleanup_gnulib): New function. Use it to clean up
1899 gnulib when interrupted. This fixes some race conditions and
1900 works around some portability problems (one noted by Paul
1901 Hilfinger).
1902
067b32ee
AD
19032005-10-22 Akim <akim@epita.fr>
1904
1905 * Makefile.cfg: Adjust to config -> build-aux.
1906 Reported by twledo.
1907
4b367315
AD
19082005-10-21 Akim Demaille <akim@epita.fr>
1909
1910 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
1911 the %parse-params.
1912 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
1913 * data/yacc.c (b4_Pure_if): Rename as...
1914 (b4_yacc_pure_if): this.
1915 (YY_SYMBOL_PRINT, yyparse): Adjust.
1916 * doc/bison.texinfo: Formatting changes.
1917
24cc23d9
AD
19182005-10-21 Akim Demaille <akim@epita.fr>
1919
1920 Finish the transition config -> build-aux.
1921 * configure.ac, Makefile.am: Use build-aux.
1922 * config/prev-version, config/announce-gen, config/Makefile.am:
1923 Move to...
1924 * build-aux/prev-version, build-aux/announce-gen,
1925 * build-aux/Makefile.am: here.
1926
d4476375
AD
19272005-10-14 Akim Demaille <akim@epita.fr>
1928
1929 * examples/calc++/test: Use set -x only when VERBOSE.
1930
302c0aee
PE
19312005-10-13 Paul Eggert <eggert@cs.ucla.edu>
1932
1933 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
1934 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
1935
7625ec2c
AD
19362005-10-13 Akim Demaille <akim@epita.fr>
1937
1938 * src/scan-skel.l: Output the base name parts of the parser and
1939 header file names.
302c0aee 1940 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
1941 additional checks.
1942 Use this to exercise C++ outputs in subdirs.
1943 Reported by Oleg Smolsky.
1944
ba0fe3c7
PE
19452005-10-12 Paul Eggert <eggert@cs.ucla.edu>
1946
1947 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
1948 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
1949 Problem reported by John P. Hartmann.
1950 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
1951 already defined it.
1952
9b8a5ce0
AD
19532005-10-12 Akim Demaille <akim@epita.fr>
1954
1955 * src/parse-gram.y (version_check): Exit 63 to please missing
1956 (stands for "version mismatch).
1957 * tests/input.at, doc/bison.texinfo: Adjust.
1958
4f6e011e
PE
19592005-10-10 Paul Eggert <eggert@cs.ucla.edu>
1960
1961 Work around portability problems with Visual Age C compiler
1962 (xlc and xlC_r) reported by John P. Hartmann.
1963 * data/location.cc (initial_column, initial_line): Remove.
1964 All uses replaced by 0 and 1.
1965 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
1966 that xlc complains about.
1967 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 1968 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 1969 as __STDC__.
4d7aa45e
PE
1970 * data/yacc.c (YYMODERN_C): New macro, which also looks at
1971 __STDC_VERSION__. Use it everywhere instead of looking at
1972 __STDC__ and __cplusplus.
4f6e011e 1973
a1b3bf8c
AD
19742005-10-10 Akim Demaille <akim@epita.fr>
1975
1976 * examples/calc++/test: Be quiet unless VERBOSE.
1977
412e44aa
PE
19782005-10-05 Paul Eggert <eggert@cs.ucla.edu>
1979
2a4647a3
PE
1980 * data/c.m4 (yydestruct, yysymprint):
1981 Use YYUSE instead of casting to void.
1982 * data/glr.c (YYUSE): New macro.
1983 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
1984 Use it instead of rolling our own.
1985 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1986 (YYCHK1):
1987 Use /*CONSTCOND*/ to suppress lint warnings.
1988 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1989 (YY_STACK_PRINT): Use 'false' not '0'.
1990 (YYUSE): New macro.
1991 (yysymprint_, yydestruct_): Use it instead of rolling our own.
1992 * data/yacc.c (YYUSE): New macro.
1993 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
1994 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
1995 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
1996
1997
412e44aa
PE
1998 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
1999 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
2000
88c6637f
PE
20012005-10-04 Paul Eggert <eggert@cs.ucla.edu>
2002
2f4f028d
PE
2003 Undo the parts of the unlocked-I/O change that substituted
2004 putc or puts for printf. This might hurt performance a bit,
2005 but some people prefer the printf style.
2006 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
2007 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
2008 All uses replaced by YYFPRINTF and YYDPRINTF.
2009 * data/yacc.c: Likewise.
2010 * lib/bitset.c (bitset_print): Likewise.
2011 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
2012 putc and puts.
2013 * lib/lbitset.c (debug_lbitset): Likewise.
2014 * src/closure.c (print_firsts, print_fderives): Likewise.
2015 * src/gram.c (grammar_dump): Likewise.
2016 * src/lalr.c (look_ahead_tokens_print): Likewise.
2017 * src/output.c (escaped_output): Likewise.
2018 (user_actions_output): Break apart two printfs.
2019 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
2020 * src/reduce.c (reduce_print): Likewise.
2021 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2022 * src/system.h: Include unlocked-io.h rathe than stdio.h.
2023
88c6637f
PE
2024 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2025 Use assignments rather than casts-to-void to suppress
2026 unused-variable warnings. This pacifies 'lint'.
2027 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
2028 unused-variable warnings.
2029
fb32e373
JMG
20302005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2031
2032 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2033
edb8f44f
PE
20342005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2035
fb9c0b33
PE
2036 Use unlocked I/O for a minor performance improvement on hosts like
2037 GNU/Linux and Solaris that support unlocked I/O. The basic idea
2038 is to use the gnlib unlocked-io module, and to prefer putc and
2039 puts to printf when either will work (since the latter doesn't
2040 come in an unlocked flavor).
2041 * bootstrap (gnulib_modules): Add unlocked-io.
2042 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
2043 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
2044 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
2045 and similarly for puts and putc and printf.
2046 * data/yacc.c: Likewise.
2047 * lib/bitset.c (bitset_print): Likewise.
2048 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
2049 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
2050 to printf.
2051 * lib/lbitset.c (debug_lbitset): Likewise.
2052 * src/closure.c (print_firsts, print_fderives): Likewise.
2053 * src/gram.c (grammar_dump): Likewise.
2054 * src/lalr.c (look_ahead_tokens_print): Likewise.
2055 * src/output.c (escaped_output): Likewise.
2056 (user_actions_output): Coalesce two printfs.
2f4f028d 2057 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
2058 * src/reduce.c (reduce_print): Likewise.
2059 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 2060 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 2061
edb8f44f
PE
2062 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
2063 this confuses xgettext.
2064
b50d2359
AD
20652005-10-02 Akim Demaille <akim@epita.fr>
2066
2067 * bootstrap (gnulib_modules): Add strverscmp.
2068 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
2069 * m4/.cvsignore: Add strverscmp.m4.
2070 * src/parse-gram.y (%require): New token, new rule.
2071 (version_check): New.
2072 * src/scan-gram.l (%require): Adjust.
2073 * tests/input.at (AT_REQUIRE): New.
2074 Use it.
2075 * doc/bison.texinfo (Require Decl): New.
2076 (Calc++ Parser): Use %require.
2077
21667f64
AD
20782005-10-02 Akim Demaille <akim@epita.fr>
2079
2080 * data/location.cc: New.
2081
2b81e969
AD
20822005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
2083 Akim Demaille <akim@epita.fr>
2084
2085 Make sure -odir/foo.cc creates dir/location.hh etc.
2086 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
2087 (spec_file_prefix, spec_verbose_file, spec_graph_file)
2088 (spec_defines_file): Now const.
2089 (dir_prefix): New.
2090 (short_base_name): Remove.
2091 * src/files.c: Adjust.
2092 (dirname.h): Include.
2093 (base_name): Don't prototype it.
2094 (finput): Remove, duplicates gram_in.
2095 (full_base_name, short_base_name): Replace by...
2096 (all_but_ext, all_but_tab_ext): these.
2097 (compute_base_names): Rename as...
2098 (compute_file_name_parts): this.
2099 Update to compute the new variables, including dir_prefix.
2100 Adjust dependencies.
2101 * src/output.c (prepare): Output them.
2102 * src/reader.c: Adjust to use gram_in, not finput.
2103 * src/scan-skel.l (@dir_prefix@): New.
2104
ad6a9b97
JMG
21052005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2106
2107 * lib/subpipe.c: New function end_of_output_subpipe() added
2108 to allow support for non-posix systems. This is a no-op function
2109 for posix systems.
2110
2111 * lib/subpipe.h: New function end_of_output_subpipe() added
2112 to allow support for non-posix systems. This is a no-op function
2113 for posix systems.
2114
2115 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
2116 handle the lack of pipe/fork functionality on non-posix systems.
2117
2118 * djgpp/Makefile.maint: DJGPP specific file.
2119
2120 * djgpp/README.in: DJGPP specific file.
2121
2122 * djgpp/config.bat: DJGPP specific configuration file.
2123
2124 * djgpp/config.sed: DJGPP specific configuration file.
2125
2126 * djgpp/config.site: DJGPP specific configuration file.
2127
2128 * djgpp/config_h.sed: DJGPP specific configuration file.
2129
2130 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
2131
2132 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
2133
fc695704
AD
21342005-10-02 Akim Demaille <akim@epita.fr>
2135
2136 * data/location.cc: New, extract from...
2137 * data/lalr1.cc: here.
2138 (location.hh): Include it after the user prologue, in case the
2139 filename type is defined by the user.
2140 Forward declation location and position before the pre-prologue.
2141 (yyresult_): Rename as...
2142 (yyresult): this, it's a local variable, not an attribute.
2143 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
2144
21452005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
2146
2147 * examples/extexi: Restore the #line generation.
2148
fb9712a9
AD
21492005-09-30 Akim Demaille <akim@epita.fr>,
2150 Alexandre Duret-Lutz <adl@gnu.org>
2151
2152 Move the token type and YYSTYPE in the parser class.
2153 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
2154 (parser::token): New, from the moved free definition of tokens.
2155 (parser::semantic_value): Now a full definition instead of an
2156 indirection to YYSTYPE.
2157 (b4_post_prologue): No longer included in the header file, but
2158 in the implementation file.
2159 * doc/bison.texi (C+ Language Interface): Update.
2160 * src/parse-gram.y: Support unary %define.
2161 * tests/actions.at: Define global_tokens_and_yystype for backward
2162 compatibility until we update the tests.
2163 * tests/calc.at: Idem.
2164 (first_line, first_column, last_line, last_column): Define for lalr1.cc
2165 to simplify the code.
2166
55f0c7b1
PE
21672005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2168
2169 Port to SunOS 4.1.4, which lacks strtoul and strerror.
2170 Ah, the good old days! Problem reported by Peter Klein.
2171 * bootstrap (gnulib_modules): Add strerror, strtoul.
2172 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
2173 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
2174
fb9712a9 21752005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
2176
2177 * data/c.m4 (b4_error_verbose_if): New.
2178 * data/lalr1.cc: Use it.
2179 (YYERROR_VERBOSE_IF): Remove.
2180 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
2181 parser members, replaced by...
2182 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
2183 local variables.
2184 (yysyntax_error_): Takes the state number as argument.
2185 (yyreduce_print_): Use the argument yyrule, not the former
2186 attribute yyn_.
2187
8a6f72f3
PE
21882005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2189
2190 * bootstrap (gnulib_modules): Add verify.
2191 * lib/.cvsignore: Add verify.h.
2192 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
2193 * src/system.h (verify): Remove.
2194 Include verify.h instead.
2195 * src/tables.c (tables_generate): Use new API for 'verify'.
2196
0d50976f
PE
21972005-09-21 Paul Eggert <eggert@cs.ucla.edu>
2198
ebc3737e
PE
2199 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
2200 local variables whose names begin with 'yy'.
2201 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2202 Trivial changes from Joel E. Denny.
2203
0d50976f
PE
2204 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
2205 it itself.
2206 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
2207 don't use alloca any more.
2208
2209 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
2210 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 2211 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
2212 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
2213 to match yacc.c, to test more hosts.
2214
a05b79df
PE
22152005-09-20 Paul Eggert <eggert@cs.ucla.edu>
2216
55289366
PE
2217 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
2218 doesn't affect behavior.
2219 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
2220 Solaris, AIX, MSC.
2221 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
2222 This works a bit better with glibc, if user code has already included
2223 stdlib.h.
2224 * doc/bison.texinfo (Bison Parser): Document that users can't
2225 arbitrarily use malloc and free for other purposes. Document
2226 that <alloca.h> and <malloc.h> might be included.
2227 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
2228 user must declare alloca.
2229
a05b79df
PE
2230 * HACKING (release): Forwarn the Translation Project about
2231 stable releses.
2232
3ab2ca22
AD
22332005-09-20 Akim Demaille <akim@epita.fr>
2234
2235 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
2236
a9739e7c
PE
22372005-09-19 Paul Eggert <eggert@cs.ucla.edu>
2238
a702593e
PE
2239 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
2240 (YYSTACK_ALLOC_MAXIMUM): Use it.
2241 (yysyntax_error): New function.
2242 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
2243 multiple syntax errors are reported, and alloca is being used.
2244 Instead, reallocate buffers twice as big each time, so that
2245 we waste at most half the allocated memory. Start with a small
2246 (128-byte) buffer that will suffice in most cases anyway.
2247 Use yysyntax_error to do most of the work.
2248
2249 * doc/bison.texinfo (Error Reporting, Table of Symbols):
2250 yynerrs is the number of errors reported, not the number of
2251 errors encountered.
2252
a9739e7c
PE
2253 * tests/glr-regression.at (Duplicated user destructor for lookahead):
2254 Mark it as expected to fail.
2255 Cast result of malloc; problem reported by twlevo@xs4all.nl.
2256 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
2257 Don't start user-code symbols with "yy", to avoid name space problems.
2258
f479c6c6
AD
22592005-09-19 Akim Demaille <akim@epita.fr>
2260
2261 Remove the traits, failed experiment.
2262 It never proved useful, and anyway because of the current
2263 definition, it was not possible to have several specialization of
2264 this traits, making it useless.
2265 * data/lalr1.cc (yy:traits): Remove.
2266 Inline its definitions in the parser class.
2267
e2586f82
AD
22682005-09-19 Akim Demaille <akim@epita.fr>
2269
2270 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
2271 least Mac OSX with a /usr/local install of gettext.
2272
2e8cf949
AD
22732005-09-19 Akim Demaille <akim@epita.fr>
2274
2275 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
2276 and yytoken for similarity with the other skeletons.
2277
c7fb0b90
AD
22782005-09-19 Akim Demaille <akim@epita.fr>
2279
4e26c69e 2280 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 2281
1bd0deda
PE
22822005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2283
2284 * NEWS: Version 2.1.
2285
2286 * NEWS: Remove notice of yytname change, since it was never in an
2287 official release.
2288 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
2289 diagnostic.
2290 * src/output.c (prepare): Likewise.
2291 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
2292 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
2293 is not defined. This is an awful hack, but it's enough for now.
2294 All callers changed.
2295 * tests/glr-regression-at (make_value): Args are const pointers now,
2296 to avoid GCC warning.
2297 (Duplicated user destructor for lookahead): New test. Currently
2298 skipped. It fails on my host but I'm not sure it'll always fail.
2299
23002005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
2301
2302 * src/symtab.h (struct symbol): Declare the printer and destructor
2303 as const, to avoid accidental calls to free.
2304 (symbol_destructor_set, symbol_printer_set): Adjust.
2305 * src/symtab.c: Adjust.
2306
1bd0deda 23072005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
2308
2309 * data/c.m4 (b4_token_enums): New.
2310 (b4_token_defines): Rename as...
2311 (b4_token_enums_defines): this.
2312 (b4_token_defines): New, output only the #defines.
2313 * data/yacc.c, data/glr.c: Adjust.
2314 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2315 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2316 as default values.
2317
dbcdae2d
AD
23182005-09-16 Akim Demaille <akim@epita.fr>
2319
2320 * data/lalr1.cc (yylex_): Remove, inline its code.
2321 (yyreport_syntax_error_): Remove, replaced by...
2322 (yysyntax_error_): this which returns a string and leaves to the
2323 caller the call to the users' error function.
2324 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2325 Move from members of the parser object...
2326 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2327 to local variables of the parse function.
2328
70d8f291
AD
23292005-09-16 Akim Demaille <akim@epita.fr>
2330
2331 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2332 since it's in Bison's name space.
2333
b47dbebe
PE
23342005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2335
ae199bf1
PE
2336 * data/glr.c (yyresolveValue): Add default case to pacify
2337 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2338
b47dbebe
PE
2339 * NEWS: Document when yyparse started to return 2.
2340 * doc/bison.texinfo (Parser Function): Document when yyparse
2341 returns 2.
2342
2343 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2344 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2345 changed.
2346 (class position): file_name -> filename (reverting). All uses changed.
2347
23482005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2349
2350 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2351 do anything if $@ exists. This reverts part of the 2005-07-07
2352 patch.
2353
00292f66
PE
23542005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2355
2356 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2357 contains obsolete information and isn't worth distributing as a
2358 separate file anyway.
2359 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2360 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2361 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2362 (yyparse): Abort if user code uses longjmp to throw an unexpected
2363 value.
2364
a420f962
PE
23652005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2366
00292f66
PE
2367 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
2368 Suggested by twlevo@xs4all.nl.
2369
127287e9
PE
2370 * data/glr.c (YYCHK1): Do not assume YYE is in range.
2371 This avoids a diagnostic from gcc -Wswitch-enum.
2372 Problem reported by twlevo@xs4all.nl.
2373
a420f962
PE
2374 * doc/bison.texinfo: Don't use "filename", as per GNU coding
2375 standards. Use "file name" or "file" or "name", depending on
2376 the context.
2377 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
2378 not to hack/foo.tab.c.
2379 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
2380 * data/glr.c: b4_filename -> b4_file_name.
2381 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
2382 All uses changed.
2383 (class position): filename -> file_name. All uses changed.
2384 * data/yacc.c: b4_filename -> b4_file_name.
2385 * lib/bitset.h: filename -> file_name in local vars.
2386 * lib/bitset_stats.c: Likewise.
2387 * src/files.c: Likewise.
2388 * src/scan-skel.l ("@output ".*\n): Likewise.
2389 * src/files.c (file_name_split): Renamed from filename_split.
2390 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
2391
23922005-09-08 Paul Eggert <eggert@cs.ucla.edu>
2393
2394 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
2395 to accommodate latest gnulib.
2396
2397 * tests/glr-regression.at (Duplicate representation of merged trees):
2398 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
2399
2400 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
2401 needed.
2402
42a6501d
PE
24032005-08-26 Paul Eggert <eggert@cs.ucla.edu>
2404
2405 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
2406 All uses changed. Invoke user destructor after an error during a
2407 split parse (trivial change from Joel E. Denny).
2408
2409 * tests/glr-regression.at
2410 (User destructor after an error during a split parse): New test case.
2411 Problem reported by Joel E. Denny in:
2412 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
2413
ef9a1faf
PE
24142005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2415
5b4aaf78
PE
2416 * README-cvs: Give URLs for recommended tools.
2417 Mention Gzip version problem, and bootstrapping issues.
2418 Remove troubleshooting section, as it's somewhat obsolete.
2419
b5240ba5
PE
2420 * bootstrap (no_cache): New var, to accommodate different wget
2421 variants. Use it instead of '-C off'. Problem reported by
2422 twlevo@xs4all.nl.
2423
ef9a1faf
PE
2424 * data/glr.c (yydestroyStackItem): New function.
2425 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
2426 debugging information. Problem reported by Joel E. Denny.
2427
e6efa9da
AD
24282005-08-25 Akim Demaille <akim@epita.fr>
2429
2430 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
2431
adc90f13
PE
24322005-08-24 Paul Eggert <eggert@cs.ucla.edu>
2433
2434 * data/glr.c (yyrecoverSyntaxError, yyreturn):
2435 Don't invoke destructor on unresolved entries.
2436 * tests/glr-regression.at
2437 (User destructor for unresolved GLR semantic value): New test case.
2438 Problem reported by Joel E. Denny in:
2439 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
2440
f9315de5
PE
24412005-08-21 Paul Eggert <eggert@cs.ucla.edu>
2442
15d29c1f
PE
2443 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
2444 Add strnlen.c.
2445 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
2446 lib-prefix.m4, po.m4.
2447
dd5f2af2
PE
2448 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
2449 in yydestruct diagnostic, since it might not be an error.
2450 Problem reported by Joel Denny near end of
2451 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 2452 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
2453 * data/yacc.c (yyreturn): Likewise.
2454 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
2455
2456 * src/files.c: Remove obsolete FIXME comment.
2457
2458 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
2459 with the other templates, and to fix bogus run-on messages such
2460 as the one reported at the end of
2461 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2462 All callers changed to avoid the newline.
2463 (yyprocessOneStack): Output two lines rather than one, to accommodate
2464 the above change. This changes the debug output format slightly.
2465
f9315de5
PE
2466 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
2467 reported by Joel E. Denny in
2468 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
2469 (trivial change).
2470 * tests/glr-regression.at (Duplicate representation of merged trees):
2471 New test, from Joel E. Denny in:
2472 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
2473 * THANKS: Add Joel E. Denny.
2474
2475 * configure.ac (AC_INIT): Bump to 2.0c.
2476
04098407
PE
24772005-07-24 Paul Eggert <eggert@cs.ucla.edu>
2478
2479 * NEWS: Version 2.0b.
2480
ca5d2013
PE
2481 * Makefile.am (SUBDIRS): Put examples before tests, so that
2482 "make check" doesn't finish with "All 1 tests passed".
2483
3d54b576
PE
2484 * tests/regression.at (Token definitions): Don't rely on
2485 AT_PARSER_CHECK for data that contains backslashes. It currently
2486 uses 'echo', and 'echo' isn't portable if its argument contains
2487 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
2488 that the byte '\0xff' is not printable in the C locale; it is,
2489 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
2490 not printable, so use '\0x81' to test.
2491
d53ae497
PE
2492 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
2493 version of GCC, since the macro is used with non-GCC compilers.
2494
fc01665e
PE
2495 Fix core dump reported by Pablo De Napoli in
2496 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
2497 * tests/regression.at (Invalid inputs with {}): New test.
2498 * src/parse-gram.y (token_name): Translate type before using
2499 it as an index.
2500
04098407
PE
2501 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
2502 the user's name space. All uses changed to __attribute__
2503 ((__unused__)).
2504 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
2505 Add __attribute__ ((__noreturn__)).
2506
2507 * etc/clcommit: Remove. We weren't using it, and it failed
2508 "make maintainer-distcheck".
2509 * Makefile.maint: Merge from coreutils.
2510 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
2511 (syntax-check-rules): Change list of rules as described below.
2512 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
2513 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
2514 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
2515 (sc_trailing_space): New rules.
2516 (sc_xalloc_h_in_src): Remove.
2517 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2518 (sc_space_tab, sc_error_exit_success, sc_changelog):
2519 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
2520 (makefile-check, po-check, author_mark_check):
2521 (makefile_path_separator_check, copyright-check):
2522 Use grep -n, to make it easier to find violations.
2523 Use CVS_LIST and CVS_LIST_EXCEPT.
2524 (header_regexp, h_re): Remove.
2525 (dd_c): New macro.
2526 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
2527 (my-distcheck): Use more-modern GCC flags.
2528 (signatures, %.asc): Remove.
2529 (rel-files, announcement): Remove signatures.
2530 Restore old updating code, even though we don't use it, so
2531 that we're the same as coreutils.
2532 (alpha, beta, major): Depend on news-date-check.
2533 Make the upload commands.
2534
2535 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2536 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2537 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2538 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2539 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2540 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2541 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2542 * tests/sets.at: Likewise.
2543
2544 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2545 we comment out the Autoconf version number.
2546 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2547 it's error-prone and "make maintainer-distcheck" rejects it.
2548
2549 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2550 Indent calls to "error" to pacify "make maintainer-distcheck",
2551 when the calls are not intended to be translated.
2552 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2553
2554 * src/Makefile.am (DEFS): Use +=, to pacify
2555 "make maintainer-distcheck".
2556 (bison_SOURCES): Add scan-skel.h.
2557 (sc_tight_scope): New rule, from coreutils.
2558
2559 * src/files.c (src_extension, header_extension):
2560 Now static, not extern.
2561 * src/getargs.c (short_options): Likewise.
2562 * src/muscle_tab.c (muscle_table): Likewise.
2563 * src/parse-gram.y (current_class, current_type, current_prec):
2564 Likewise.
2565 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2566 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2567 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2568 void, to avoid warning when NLS is disabled.
2569 * src/output.c: Include scan-skel.h.
2570 (scan_skel): Remove decl, since scan-skel.h does this.
2571 (output_skeleton):
2572 Indent calls to "error" to pacify "make maintainer-distcheck".
2573 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2574 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2575 "make maintainer-distcheck".
2576 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
2577 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
2578 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
2579 (skel_lex_destroy, scan_skel): Move these decls to...
2580 * src/scan-skel.h: New file.
2581 * src/uniqstr.c (uniqstr_assert):
2582 Indent calls to "error" to pacify "make maintainer-distcheck".
2583
2584 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
2585 not @VAR@.
2586
2587 * tests/torture.at: Revamp to avoid misuse of atoi that
2588 "make maintainer-distcheck" complained about.
2589
2590 * examples/extexi (message): Don't print a message more than once,
2591 and omit line-number decoration that makes Emacs compile think
2592 that informative messages are worth worrying about.
2593
25942005-07-22 Paul Eggert <eggert@cs.ucla.edu>
2595
2596 * configure.ac: Update version number.
2597
2598 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
2599 accidentally.
2600 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
2601 autogenerated by the maintainer.
2602 * examples/calc++/.cvsignore: Add *.yy.
2603
2604 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
2605 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2606 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2607
2608 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
2609
2610 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
2611 from maintainer-distcheck about casting the argument of 'free'.
2612
2613 * NEWS: Mention recent yytname changes.
2614 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
2615
2616 * bootstrap: For translations that have not yet been upgraded to
2617 the new runtime-po domain, prime the pump by extracting the
2618 relevant strings from the obsolete translations. This code can be
2619 removed once the bison-runtime domain has been translated by each
2620 team.
2621
2622 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
2623 now that token names are already quoted.
2624
2625 Fix problem reported by Anthony Heading.
2626 * data/glr.c (YYTOKEN_TABLE): New macro.
2627 (yytname): Define if YYTOKEN_TABLE.
2628 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
2629 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
2630 (YYERROR_VERBOSE): Define the same way the other skeletons do.
2631 * src/output.c (prepare_symbols): Output token_table_flag.
2632
0ffda363
PE
26332005-07-21 Paul Eggert <eggert@cs.ucla.edu>
2634
2635 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
2636 again if the first call fails.
2637
2638 * data/glr.c (yytnamerr): New function.
2639 (yyreportSyntaxError): Use it to dequote most string literals.
2640 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
2641 with other skeletons. All uses changed.
2642 (yytnameerr_): New function.
2643 (yyreport_syntax_error): Use it to dequote most string literals.
2644 * data/yacc.c (yytnamerr): New function.
2645 (yyerrlab): Use it to decode most string literals.
2646 * doc/bison.texinfo (Decl Summary, Calling Convention):
2647 Clarify quoting convention of yytname.
2648 * src/output.c (prepare_symbols): Quote all names. This undoes
2649 the 2005-04-17 change, which is now accomplished (mostly) via
2650 changes in the parsers as described above.
2651 * tests/regression.at (Token definitions, Web2c Actions):
2652 Undo most 2005-04-17 change here, too.
2653
26542005-07-20 Paul Eggert <eggert@cs.ucla.edu>
2655
2656 Fix more problems reported by twlevo@xs4all.nl.
2657 * tests/cxx-type.at: Don't pipe output of ./types through sed to
2658 remove trailing spaces. This loses the exit status of ./types,
2659 and isn't needed since ./types shouldn't be emitting trailing
2660 spaces.
2661 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
2662 as the stack isn't valid in that case.
2663
2664 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2665 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2666 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2667 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
2668 is used.
2669 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
2670 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2671 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2672 Likewise.
2673
2674 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
2675 overly-picky compilers that reject 'char *foo = "bar";'.
2676
2677 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
2678 to FILE * parameter, not to stderr. This fixes a typo introduced
2679 in the 2005-07-12 change.
2680
2681 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
2682 warnings from GCC 4.
2683
2684 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
2685 (yyglrShiftDefer, yysplitStack):
2686 Remove unused parameters b4_pure_formals. All uses changed.
2687 (yyglrShift): Remove unused parameters b4_user_formals.
2688 All uses changed.
2689 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
2690
6100a9aa
PE
26912005-07-18 Paul Eggert <eggert@cs.ucla.edu>
2692
258b75ca
PE
2693 Destructor cleanups and regularization among the three skeletons.
2694 * NEWS: Document the behavior changes.
2695 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
2696 stack before failing, as the cleanup code will do it for us now.
2697 * data/lalr1.cc (yyerrlab): Likewise.
2698 * data/glr.c (yyparse): Pop everything off the stack before
2699 freeing it, so that destructors get called properly.
2700 * data/lalr1.cc (yyreturn): Likewise.
2701 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
2702 This is more consistent.
2703 * doc/bison.texinfo (Destructor Decl): Mention more reasons
2704 why destructors might be called. 1.875 -> 2.1.
2705 (Destructor Decl, Decl Summary, Table of Symbols):
2706 Some English-language cleanups for %destructor.
2707 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2708 Add output line for destructor of start symbol.
2709 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
2710 because of that same extra output line.
2711
1a059451
PE
2712 * NEWS: Document minor wording changes in diagnostics of
2713 Bison-generated parsers.
2714 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
2715 Remove unused formals. All uses changed.
2716 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
2717 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
2718 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
2719 Rename yyoverflowab to yyexhaustedlab.
2720 When memory exhaustion occurs during syntax-error reporting,
2721 report it separately rather than in a single diagnostic; this
2722 eases translation.
2723 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
2724 (Memory Exhausted): Renamed from Parser Stack Overflow.
2725 Revamp wording slightly to prefer "memory exhaustion".
2726 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
2727
97460c78
PE
2728 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
2729
30757c8c
PE
2730 Add i18n support to the GLR skeleton. Partially fix the C++
2731 skeleton; a C++ expert needs to finish this. Remove debugging
2732 msgids; there's little point to having them translated, since they
2733 can be understood only by someone who can read the
2734 (English-language) source code.
2735
2736 Generate runtime-po/bison-runtime.pot automatically, so that we
2737 don't have to worry about garbage getting in that file. We'll
2738 make sure after the next official release that old msgids don't
2739 get lost. See
2740 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
2741
2742 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
2743 Now auto-generated.
2744 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
2745 Fix typos in explanations of the runtime file.
2746 * bootstrap: Change gettext keyword from YYI18N to YY_.
2747 Use standard Makefile.in.in in runtime-po, since we'll arrange
2748 for backward-compatible bison-runtime.po files in a different way.
2749 * data/glr.c (YY_): New macro, from yacc.c.
2750 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
2751 Translate messages intended for users.
2752 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
2753 the wording in the other skeletons. We don't know that the memory
2754 is virtual.
2755 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
2756 Use same method that yacc.c uses.
2757 Don't translate debugging messages.
2758 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
2759 it doesn't work (yet), and requires C++ expertise to fix.
2760 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
2761 Move defn to a more logical place, to be consistent with other
2762 skeletons.
2763 Don't translate debugging messages.
2764 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
2765 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
2766 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
2767 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
2768
ac8c5689
PE
2769 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
2770 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
2771 void, not int.
2772 * tests/glr-regression.at (Badly Collapsed GLR States):
2773 Likewise.
2774 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2775 yylex should return 0 at EOF rather than aborting.
2776
6100a9aa
PE
2777 Improve tests for stack overflow in GLR parser.
2778 Problem reported by twlevo@xs4all.nl.
2779 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
2780 All uses removed.
2781 (yyStackOverflow): Just longjmp, but with value 2 so that caller
2782 can handle the problem.
2783 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
2784 (yyparse): New local variable yyresult to record the result.
2785 Use result of setjmp to set it, rather than storing itinto
2786 struct.
2787 (yyDone): Remove label.
2788 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
2789 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
2790 if YYABORT is used).
2791 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
2792 yyparse status; put status > 1 into diagnostic.
2793 Check that status==2 works.
2794 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
2795 Use exit status 3 for failure to open (which shouldn't happen).
2796
15f40952
PE
27972005-07-17 Paul Eggert <eggert@cs.ucla.edu>
2798
67fd79c4
PE
2799 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
2800 1 on syntax error; just let yyparse do its thing.
2801 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
2802 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
2803 (Exploding the Stack Size with Alloca):
2804 (Exploding the Stack Size with Malloc):
2805 Expect exit status 2, not 1, since the parser is supposed to blow
2806 its stack. Problem reported by twlevo@xs4all.nl.
2807
15f40952
PE
2808 * data/glr.c (yyparse): Don't assume that the initial calls
2809 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
2810 Print a stack-overflow message and fail instead.
2811 Initialize the line-number information before creating the stack,
2812 so that the stack-overflow message can report line zero safely.
2813
f32c66b5
PE
28142005-07-14 Paul Eggert <eggert@cs.ucla.edu>
2815
a22ff96f 2816 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
2817 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
2818 (yyuserMerge): Provide a default case if b4_mergers is empty.
2819 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
2820 * tests/glr-regression.at
2821 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 2822 Add casts to pacify C++ compilers.
1beb0b24
PE
2823 * tests/glr-regression.at (Improper merging of GLR delayed action
2824 sets): Declare yylex before using it.
f32c66b5 2825 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
2826 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
2827 test for valgrind; valgrind is independent of g++.
2828 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
2829 for compatibility with POSIX 1003.1-2001 (if running coreutils).
2830 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
2831 Use a destructor, so that we can expand the stack. Change
2832 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 2833
d741bd1b
PE
28342005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2835
2836 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
2837 a valgrind failure. Problem reported by twlevo@xs4all.nl.
2838
0410a6e0
PE
28392005-07-13 Paul Eggert <eggert@cs.ucla.edu>
2840
2841 * PACKAGING: New file, suggested by Bruno Haible and taken from
2842 similar wording in gettext's PACKAGING file.
2843 * NEWS: Mention PACKAGING.
2844 * Makefile.am (EXTRA_DIST): Add PACKAGING.
2845
f7ab6a50
PE
28462005-07-12 Paul Eggert <eggert@cs.ucla.edu>
2847
baf785db 2848 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
2849 * bootstrap: Get runtime translations into runtime-po.
2850 Create runtime-po files automatically, if possible.
2851 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
2852 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
2853 does not infringe on the user's name space.
2854 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
2855 * doc/bison.texinfo (Internationalization): Revamp the English
2856 and Texinfo syntax a bit, to try to make it clearer.
2857 (Bison Options, Option Cross Key): Mention --print-localedir.
2858 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
2859 YYENABLE_NLS. Quote a bit more.
2860 * runtime-po/.cvsignore: New file.
2861 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
2862 * runtime-po/Rules-quot: Remove; now created by bootstrap.
2863 * runtime-po/quot.sed: Likewise.
2864 * runtime-po/boldquot.sed: Likewise.
2865 * runtime-po/en@quot.header: Likewise.
2866 * runtime-po/en@boldquot.header: Likewise.
2867 * runtime-po/insert-header.sin: Likewise.
2868 * runtime-po/remove-potcdate.sin: Likewise.
2869 * runtime-po/Makevars: Likewise.
2870 * runtime-po/LINGUAS: Likewise.
2871 * runtime-po/de.po: Likewise; we will rely on the translation project
2872 to maintain this, so "bootstrap" should get it.
0410a6e0 2873 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
2874 its value.
2875 * src/main.c (main): Bind the bison-runtime domain, too.
2876
28772005-07-12 Bruno Haible <bruno@clisp.org>
2878
2879 * data/yacc.c: Include <libintl.h> when NLS is enabled.
2880 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
2881 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
2882 * runtime-po: New directory.
2883 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
2884 $(DOMAIN).pot-update rule, so that old messages are never dropped.
2885 * runtime-po/Rules-quot: New file, copied from po/.
2886 * runtime-po/quot.sed: Likewise.
2887 * runtime-po/boldquot.sed: Likewise.
2888 * runtime-po/en@quot.header: Likewise.
2889 * runtime-po/en@boldquot.header: Likewise.
2890 * runtime-po/insert-header.sin: Likewise.
2891 * runtime-po/remove-potcdate.sin: Likewise.
2892 * runtime-po/Makevars: New file.
2893 * runtime-po/POTFILES.in: New file.
2894 * runtime-po/LINGUAS: New file.
2895 * runtime-po/bison-runtime.pot: New file.
2896 * runtime-po/de.po: New file.
2897 * m4/bison.m4: New file.
2898 * Makefile.am (SUBDIRS): Add runtime-po.
2899 (aclocaldir, aclocal_DATA): New variables.
2900 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
2901 Define aclocaldir.
2902 * src/getargs.c (usage): Document --print-localedir option.
2903 (PRINT_LOCALEDIR_OPTION): New enum item.
2904 (long_options): Add --print-localedir option.
2905 (getargs): Handle --print-localedir option.
2906 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
2907 (Internationalization): New section.
2908
22dda0f0
AD
29092005-07-12 Akim Demaille <akim@epita.fr>
2910
2911 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
2912 for consistency with the rest of the code.
2913 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
2914 Add separators.
2915
82b248ad
AD
29162005-07-12 Akim Demaille <akim@epita.fr>
2917
2918 * src/parse-gram.y: Use %printer instead of YYPRINT.
2919
fa0e9314
AD
29202005-07-12 Akim Demaille <akim@epita.fr>
2921
867a3e00
AD
2922 * src/symtab.h, src/symtab.c (symbol_print): New.
2923 * src/symlist.h, src/symlist.c (symbol_list_print): New.
2924 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
2925
29262005-07-12 Akim Demaille <akim@epita.fr>
2927
2928 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
2929 b4_at_dollar and b4_dollar_dollar.
2930
e054b190
PE
29312005-07-11 Paul Eggert <eggert@cs.ucla.edu>
2932
2933 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
2934 and Pennello's paper.
2935
34160ec4
PE
29362005-07-09 Paul Eggert <eggert@cs.ucla.edu>
2937
407d4a75
PE
2938 * data/yacc.c (yyparse): Undo previous patch. Instead,
2939 set yylsp[0] and yyvsp[0] only if the initial action
2940 sets yylloc and yylval, respectively.
2941
34160ec4
PE
2942 * data/yacc.c (yyparse): In the initial action, set
2943 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
2944 This avoids the use of undefined variables if the initial
2945 action does not set yylloc and/or yylval.
2946
c3d5a4a7
PE
29472005-07-07 Paul Eggert <eggert@cs.ucla.edu>
2948
b34d96c1
PE
2949 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
2950 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
2951 Remove from CVS. These files are automatically generated.
2952 * examples/extexi: Clarify that this file is now part of Bison,
2953 not GNU M4, and that it works with any POSIX-compatible Awk.
2954 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
2955 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
2956 so that we also get calc++-parser.yy. Geneate it.
2957 Use $(AWK), not gawk, since any conforming Awk will do.
2958 Put comment before action, since older 'make' can't handle comment
2959 in action.
2960 $(BUILT_SOURCES): List all built sources, not just some of them.
2961 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
2962 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
2963 $($(calc_sources_generated)): Remove unnecessary test for existence
2964 of target. (This had a shell syntax error anyway; a stray "x".)
2965 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
2966 calc++-parser.yy.
2967 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
2968
c3d5a4a7
PE
2969 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
2970 implied by the other modules.
2971
828c373b
AD
29722005-07-06 Akim Demaille <akim@epita.fr>
2973
2974 Bind examples/calc++ to the package.
2975 * examples/calc++/Makefile: Remove, replaced by...
2976 * examples/calc++/Makefile.am: ... this new file.
2977 * examples/calc++/test: Remove input.
2978 * examples/calc++/compile: Remove.
2979 * examples/Makefile.am: New.
2980 * configure.ac, Makefile.am: Adjust.
2981 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
2982
63cb01d6
PE
29832005-07-05 Paul Eggert <eggert@cs.ucla.edu>
2984
fd2df2ed
PE
2985 * data/glr.c (yyFail): Drastically simplify; since the format argument
2986 never had any % directives, we can simply pass it to yyerror.
2987 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
2988 be modified later, as that is the usual style in glr.c.
2989 Problems reported by Paul Hilfinger.
2990
63cb01d6
PE
2991 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
2992 and size overflow errors.
2993 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
2994 in case the user prolog sets feature-test macros like _GNU_SOURCE.
2995 (YYSIZEMAX): New macro.
2996 (yystpcpy): New function, taken from yacc.c.
2997 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
2998 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
2999 so that we don't have to maintain their signatures.
3000 (yyFail): Check for buffer overflow, by using vsnprintf rather
3001 than vsprintf. Allocate a bigger buffer if possible.
3002 Report an error if buffer allocation fails.
3003 (yyStackOverflow): New function.
3004 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
3005 the initialization was successful. It might fail if storage was
3006 exhausted.
3007 (yyexpandGLRStack): Add more checks for storage allocation failure.
3008 Use yyStackOverflow to report failures.
3009 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
3010 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
3011 Don't assume stack number fits in int.
3012 (yysplitStack): Check for storage allocation failure.
3013 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
3014 can print diagnostics on storage allocation failure. All callers
3015 changed.
3016 (yyresolveValue): Use yybool for boolean.
3017 (yyreportSyntaxError): Check for size-calculation overflow.
3018 This code is taken from yacc.c.
3019 (yyparse): Check for storage allocation errors when allocating
3020 the initial stack.
3021
1c59e0a1
AD
30222005-07-05 Akim Demaille <akim@epita.fr>
3023
3024 Extract calc++ from the documentation.
3025 * doc/bison.texinfo (Calc++): Add the extraction marks.
3026 * examples/extexi: New, from the aborted GNU Programming 2E.
3027 Separate the different paragraph of a file with empty lines.
3028 * examples/Makefile: Use it to extract the whole calc++ example.
3029
8a0adb01
AD
30302005-06-24 Akim Demaille <akim@epita.fr>
3031
3032 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
3033 class typedefs.
3034
12545799
AD
30352005-06-22 Akim Demaille <akim@epita.fr>
3036
3037 * doc/bison.texinfo (C++ Language Interface): First stab.
3038 (C++ Parsers): Remove.
3039
99be0235
AD
30402005-06-22 Akim Demaille <akim@epita.fr>
3041
3042 * data/lalr1.cc (yylex_): Honor %lex-param.
3043
0ffd4fd1
AD
30442005-06-22 Akim Demaille <akim@epita.fr>
3045
3046 Start a set of simple examples.
3047 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
3048 * examples/calc++/calc++-driver.hh,
3049 * examples/calc++/calc++-parser.yy,
3050 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
3051 * examples/calc++/compile, examples/calc++/test: New.
3052
0925ebb4
PE
30532005-06-09 Paul Eggert <eggert@cs.ucla.edu>
3054
3055 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
3056 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
3057 which stems from the 2005-05-27 patch.
3058
43d3b664
PH
30592005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3060
3061 * data/glr.c: Modify treatment of unused parameters to permit use
3062 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
3063
3062864d
PE
30642005-05-30 Paul Eggert <eggert@cs.ucla.edu>
3065
3066 Fix infringement on user name space reported by Janos Zoltan Szabo.
3067 * data/yacc.c (yyparse): strlen -> yystrlen.
3068
989b5b8e
AD
30692005-05-30 Akim Demaille <akim@epita.fr>
3070
3071 * data/lalr1.cc (_): New.
3072 Translate the various messages.
3073
bedf57f5
PE
30742005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3075
3076 Fix infringement on user name space reported by Bruno Haible.
3077 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
3078 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
3079 the user's name space.
3080 (alloca): Include <stdlib.h> to get it, if it's not built in.
3081 (YYMALLOC, YYFREE): Define only if needed.
3082 (malloc, free): Declare, but only if needed, as this infringes on
3083 the user name space.
3084
4d1801f1
PE
30852005-05-25 Paul Eggert <eggert@cs.ucla.edu>
3086
3087 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
3088 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
3089 with %d format.
3090 * lib/ebitset.c (min, max): Undef before defining.
3091 * lib/vbitset.c (min, max): Likewise.
3092 * lib/subpipe.c (create_subpipe): Save local variables in case
3093 vfork clobbers them.
3094
30952005-05-24 Bruno Haible <bruno@clisp.org>
3096
3097 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
3098 error message syntax used by gcc-4.0.
3099
b94a9e1e
PE
31002005-05-23 Paul Eggert <eggert@cs.ucla.edu>
3101
85ac3861
PE
3102 * README: Mention m4 1.4.3. Remove obsolete advice about
3103 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
3104
b94a9e1e
PE
3105 * bootstrap: Remove workaround for problem I encountered with
3106 gettext 0.14.1; it seems to be fixed now.
3107
51c30d21
PE
31082005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3109
009ce67d
PE
3110 * NEWS: Version 2.0a.
3111
f2a97c62
PE
3112 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
3113 the previous change.
3114
c8775f93
PE
3115 Various maintainer cleanups.
3116 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
3117 conftest*, for benefit of CVS commands run at the same time as
3118 "configure". Add build-aux, since "bootstrap" now creates it and
3119 its subfiles.
3120 * Makefile.cfg (move_if_change): Remove.
3121 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
3122 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
3123 (po_repo, do-po-update, po-update, wget_files, get-targets):
3124 (config.guess-url_prefix, config.sub-url_prefix):
3125 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
3126 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
3127 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
3128 Remove.
3129 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
3130 this is now the recommended name.
3131 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
3132 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
3133 ylwrap. These files now go into build-aux.
3134 * config/move-if-change: Remove.
3135 * config/prev-version.txt: Bump from 1.75 to 2.0.
3136
3ea5f0ec
PE
3137 * bootstrap: Add stdio-safer, unistd-safer modules.
3138 Remove m4/glibc2.m4 (introduced by latest gnulib, but
3139 we don't need it).
3140 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
3141 fopen-safer.c, stdio-safer.h, unistd-safer.h.
3142 * lib/subpipe.c: Include "unistd-safer.h".
3143 (create_subpipe): Make sure all the newly-created
3144 file descriptors are > 2, so that diagnostics don't
3145 get sent down them (which might cause Bison to hang, in theory).
3146 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
3147 * src/files.c (xfopen): Use fopen_safer, not fopen.
3148
51c30d21
PE
3149 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
3150 yesterday's yacc.c fix.
3151
cea1469d
PE
31522005-05-21 Paul Eggert <eggert@cs.ucla.edu>
3153
3ea5f0ec
PE
3154 * data/glr.c, data/lalr1.cc: Update copyright date.
3155
cea1469d
PE
3156 Fix a destructor bug reported by Wolfgang Spraul in
3157 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
3158 * data/yacc.c (yyabortlab): Don't call destructor, and
3159 don't set yychar to EMPTY.
3160 (yyoverflowlab): Don't call destructor.
3161 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
3162 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
3163 since we no longer output the message "discarding lookahead token
3164 end of input ()".
3165
5e6f62f2
PH
31662005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3167
3168 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
3169 fix a small glitch in debugging output.
3170 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
3171 after YY_SYMBOL_PRINT where needed.
3172
3173 (struct yyGLRState): Add some comments.
3174 (struct yySemanticOption): Add some comments.
3175 (union yyGLRStackItem): Add comment.
3176
3177 (yymergeOptionSets): Correct this to properly perform the union,
3178 avoiding infinite reported by Michael Rosien.
3179 Update comment.
3180
3181 * tests/glr-regression.at: Add test for GLR merging error reported
3182 by M. Rosien.
cea1469d 3183
0fb669f9
PE
31842005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3185
3186 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
3187 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
3188 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
3189 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
3190 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
3191 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
3192 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
3193 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
3194 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
3195 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
3196 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
3197 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
3198 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
3199 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
3200 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
3201 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
3202 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
3203 src/derives.h, src/files.c, src/files.h, src/getargs.c,
3204 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
3205 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
3206 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
3207 src/output.h, src/parse-gram.c, src/parse-gram.h,
3208 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
3209 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
3210 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
3211 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
3212 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
3213 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
3214 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
3215 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
3216 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
3217 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
3218 tests/reduce.at, tests/regression.at, tests/sets.at,
3219 tests/synclines.at, tests/testsuite.at, tests/torture.at:
3220 Update FSF postal mail address.
3221
51f4735e
PE
32222005-05-11 Paul Eggert <eggert@cs.ucla.edu>
3223
3224 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
3225 Problem reported by Ralf Menzel.
3226
80ce3401
PE
32272005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3228
3229 * tests/actions.at: Test that stack overflow invokes destructors.
3230 From Marcus Holland-Moritz.
3231 * data/yacc.c (yyerrlab): Move the code that destroys the stack
3232 from here....
3233 (yyreturn): to here. That way, destructors are called properly
3234 even if the stack overflows, or the user calls YYACCEPT or
3235 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
3236 (yyoverflowlab): Destroy the lookahead.
3237
32382005-04-24 Paul Eggert <eggert@cs.ucla.edu>
3239
3240 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
3241
72f000b0
PE
32422005-04-17 Paul Eggert <eggert@cs.ucla.edu>
3243
3244 * NEWS: Bison-generated C parsers no longer quote literal strings
3245 associated with tokens.
3246 * src/output.c (prepare_symbols): Don't escape strings,
3247 since users don't want to see C escapes.
3248 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
3249 in diagnostics.
c19683bb 3250 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
3251 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
3252
1094323f
PE
32532005-04-16 Paul Eggert <eggert@cs.ucla.edu>
3254
3255 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
3256 the data size is known to be too small and we can't increase it.
3257 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
3258
ca407bdf
PE
32592005-04-15 Paul Eggert <eggert@cs.ucla.edu>
3260
3261 * src/parse-gram.y: Include quotearg.h.
3262 (string_as_id): Quote $1 before using it as a key, since the
3263 lexer no longer quotes it for us.
3264 (string_content): Don't strip quotes, since lexer no longer
3265 quotes it for us.
3266 * src/scan-gram.l: Include quotearg.h.
3267 ("\""): Omit quote.
3268 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
3269 a key, since the rest of the lexer doesn't quote it.
3270 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
3271 * tests/regression.at (Token definitions): Check for backslashes
3272 in token strings.
3273
3274 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
3275 (YYSIZE_T): Define to unsigned long int when using an older compiler.
3276 (yyparse): Revamp code to generate long syntax error message, to
3277 make it easier to translate, and to avoid problems with arithmetic
3278 overflow. Change "virtual memory" to "memory" in diagnostic, since
3279 we don't know whether the memory is virtual.
3280
1ce59070
PE
32812005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3282
3283 * NEWS: Bison-generated C parsers now use the _ macro to
3284 translate strings.
3285 * data/yacc.c (_) [!defined _]: New macro.
3286 All English strings wrapped inside this macro.
3287 * doc/bison.texinfo (Bison Parser): Document _.
3288 * po/POTFILES.in: Include src/parse-gram.c, since it now
3289 includes translateable strings that parse-gram.y doesn't.
3290
a749a695
PE
32912005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3292
3293 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
3294 reverting the 2004-10-11 change to this function.
3295 (symbol_check_alias_consistency): Don't call symbol_type_set
3296 if the type name is already correct.
3297 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3298
8fb1053b
PE
32992005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3300
3301 * tests/regression.at (Token definitions): Don't use a token named
3302 c, as that generates a "#define c ..." that runs afoul of buggy
3303 stdlib.h that uses the identifier c as a member of struct
3304 drand48_data. Problem reported by Horst Wente.
3305
ff498c4a
PE
33062005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3307
3308 * bootstrap: Change translation URL from
3309 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3310 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3311 redirection glitches. Problem reported by twlevo@xs4all.nl.
3312
65211d70
PE
33132005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3314
3315 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3316 after operands; POSIX says this isn't portable for the c99 command.
3317
9577fb1f
PE
33182005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3319
3320 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3321 immediately if a data overrun has occurred; this may help us track
3322 down what may be a spurious failure on MacOS.
3323
78b178f7
PE
33242005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3325
a2599d0f
PE
3326 Respond to problems reported by twlevo@xs4all.nl.
3327
3328 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3329
78b178f7
PE
3330 * src/vcg.h: Comment fix.
3331 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3332 (G_CMAX): Change to -1 instead of INT_MAX.
3333
3334 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 3335
7296e729
PE
33362005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3337
3338 * src/tables.c (state_number_to_vector_number): Put it inside an
3339 "#if 0", since it's not currently used. Problem reported by
3340 Roland McGrath.
3341
05ac60f3
PE
33422005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3343
3344 * src/output.c (escaped_output): Renamed from
3345 escaped_file_name_output, since we now use it for symbol tags as
3346 well. All uses changed.
3347 (symbol_destructors_output, symbol_printers_output):
3348 Escape symbol tags too.
3349 Problem reported by Matyas Forstner in
3350 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3351
3352 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3353 not needed.
3354 * src/output.c (user_actions_output, token_definitions_output,
3355 symbol_destructors_output, symbol_printers_output): Likewise.
3356 * src/reader.c (prologue_augment): Likewise.
3357 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3358
3359 * src/vcg.c (output_edge): Don't quote linestyle arg.
3360 Problem reported by twlevo@xs4all.nl.
3361
7eb453ac
PE
33622005-02-28 Paul Eggert <eggert@cs.ucla.edu>
3363
3364 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
3365 example, reported by Derek M Jones. Also, make the example even
3366 more outrageous, to better illustrate how bad the problem is.
3367
4c04c52a
PE
33682005-02-24 Paul Eggert <eggert@cs.ucla.edu>
3369
3370 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
3371 putsym. Typo reported by Sebastian Piping.
3372
a61e1620
PE
33732005-02-23 Paul Eggert <eggert@cs.ucla.edu>
3374
3375 * doc/bison.texinfo (Language and Grammar): some -> same
3376 (Epilogue): int he -> in the
3377 Typos reported by Sebastian Piping via Justin Pence.
3378
9ec93868
PE
33792005-02-07 Paul Eggert <eggert@cs.ucla.edu>
3380
3381 * tests/glr-regression.at (Improper handling of embedded actions
3382 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
3383 embedded actions and $-N in GLR parsers", work around an Autoconf bug
3384 with dollar signs in test names.
3385 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
3386 for a similar reason.
3387
73ce7e7e
PE
33882005-01-28 Paul Eggert <eggert@cs.ucla.edu>
3389
3390 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
3391 wants to redefine G_VIEW.
3392
2e72b98e
PE
33932005-01-27 Paul Eggert <eggert@cs.ucla.edu>
3394
3395 * src/vcg.c (get_view_str): Remove case for normal_view.
3396 Problem reported by twlevo@xs4all.nl.
3397
e0d634e5
PE
33982005-01-24 Paul Eggert <eggert@cs.ucla.edu>
3399
ccf830a4
PE
3400 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
3401 Problem reported by twlevo@xs4all.nl.
3402
e0d634e5
PE
3403 * doc/bison.texinfo: Change @dircategory from "GNU programming
3404 tools" to "Software development". Requested by Richard Stallman
3405 via Karl Berry.
3406
7bbc8cb0
PE
34072005-01-23 Paul Eggert <eggert@cs.ucla.edu>
3408
3409 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
3410 Problem reported by twlevo@xs4all.nl.
3411
08b770bc
PE
34122005-01-21 Paul Eggert <eggert@cs.ucla.edu>
3413
3414 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
3415 keyword; it's not needed with modern compilers, and it doesn't
3416 affect correctness with older compilers. Suggested by
3417 twlevo@xs4all.nl.
3418
95f22ad2
PE
34192005-01-17 Paul Eggert <eggert@cs.ucla.edu>
3420
3421 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
3422 gcc -Wswitch-default.
3423 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3424 * data/yacc.c (yyparse): Likewise.
3425
d229d15c
PE
34262005-01-12 Paul Eggert <eggert@cs.ucla.edu>
3427
3428 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
3429 already. Let config.h define any nonstandard values.
3430
ecadd90f
PE
34312005-01-10 Paul Eggert <eggert@cs.ucla.edu>
3432
3433 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
3434 for the benefit of slower hosts. Problem reported by
3435 Nelson H. F. Beebe.
3436
213744b5
PE
34372005-01-07 Paul Eggert <eggert@cs.ucla.edu>
3438
3439 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
3440 being defined and not used.
3441 * data/lalr1.cc (yyparse): Likewise.
3442 Use "if (false)" rather than "if (0)".
3443
249d3236
PE
34442005-01-05 Paul Eggert <eggert@cs.ucla.edu>
3445
3446 * TODO: Mention that we should allow NUL bytes in tokens.
3447
987cc1fb
PE
34482005-01-02 Paul Eggert <eggert@cs.ucla.edu>
3449
3450 * src/scan-skel.l (<<EOF>>): Don't close standard output.
3451 Problem reported by Hans Aberg.
3452
08fe02d9
PE
34532005-01-01 Paul Eggert <eggert@cs.ucla.edu>
3454
3455 * src/getargs.c (version): Happy new year; update overall
3456 program copyright date from 2004 to 2005.
3457
3458 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
3459 Problem reported by Hans Aberg.
3460 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
3461 (Output file names.): Add a test for the case when standard output
3462 is closed.
3463
010c0266
PE
34642004-12-26 Paul Eggert <eggert@cs.ucla.edu>
3465
3466 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
3467 to fix an oversight in the Bison 2.0 manual.
3468
da12206a
PE
34692004-12-25 Paul Eggert <eggert@cs.ucla.edu>
3470
3471 * NEWS: Version 2.0. Reformat the existing news items since
3472 1.875, so that related items are grouped together.
3a4734aa 3473 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
3474 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
3475
c935d934
PE
3476 * tests/torture.at (Exploding the Stack Size with Alloca): Set
3477 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
3478 otherwise, we're not testing alloca. Unfortunately there's no
3479 simple way to consult HAVE_ALLOCA here.
3480
da12206a
PE
3481 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
3482 for yymsg, too.
3483
3484 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
3485 hand. This avoids a warning about comparing int to size_t when
3486 GCC warnings are enabled.
3487
0a2c5137
PE
34882004-12-22 Paul Eggert <eggert@cs.ucla.edu>
3489
d7e14fc0
PE
3490 * NEWS: Bison-generated parsers no longer default to using the
3491 alloca function (when available) to extend the parser stack, due
3492 to widespread problems in unchecked stack-overflow detection.
3493 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
3494 responsibility to set it to a positive value. This lets the user
3495 specify a value that is not a preprocessor constant.
3496 * data/yacc.c (YYMAXDEPTH): Likewise.
3497 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
3498 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
3499 to be a compile-time constant. However, explain the constraints on it.
3500 Also, explain the constraints on YYINITDEPTH.
3501 (Table of Symbols): Explain that alloca is no longer the default.
3502 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
3503 to 1.
3504
0a2c5137
PE
3505 * doc/bison.texinfo (Location Default Action): Mention that n must
3506 be zero when k is zero. Suggested by Frank Heckenbach.
3507
e019c247
AD
35082004-12-22 Akim Demaille <akim@epita.fr>
3509
3510 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
3511 (parser::state_type, parser::semantic_type, parser::location_type):
3512 Private, not public.
3513 (parser::parse): Return ints, not bool.
3514 Returning a bool introduces a problem: 0 corresponds to false, and
3515 it seems weird to return false on success. Returning true changes
3516 the conventions for yyparse.
3517 Alternatively we could return void and send an exception.
3518 There is no clear consensus (yet?).
3519 (state_stack, semantic_stack, location_stack): Rename as...
3520 (state_stack_type, semantic_stack_type, location_stack_type): these.
3521 Private, not public.
3522 * tests/c++.at: New.
3523 * tests/testsuite.at, tests/Makefile.am: Adjust.
3524
72731bb7
AD
35252004-12-21 Akim Demaille <akim@epita.fr>
3526
3527 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
3528
9a0d8bec
AD
35292004-12-21 Akim Demaille <akim@epita.fr>
3530
3531 Don't impose std::string for filenames.
3532
3533 * data/lalr1.cc (b4_filename_type): New.
3534 (position::filename): Use it.
3535 (parser.hh): Move the inclusion of stack.hh and location.hh below
3536 the user code, so that needed headers for the filename type can be
3537 included first.
72731bb7
AD
3538 Forward declare them before the user code.
3539 * tests/Makefile.am (check-local, installcheck-local): Pass
3540 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 3541
99880de5
AD
35422004-12-20 Akim Demaille <akim@epita.fr>
3543
3544 Use more STL like names: my_class instead of MyClass.
3545
3546 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3547 (SemanticStack, SemanticType, StateStack, StateType)
3548 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3549 (Parser::value): Rename as...
3550 (location_stack, location_type, rhs_number_type, semantic_stack)
3551 (semantic_type, state_stack, state_type, token_number_type, stack)
3552 (slice, traits, parser::yylloc, parser::yylval): these.
3553
3554 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3555
9bec482e
PE
35562004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3557
3558 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3559 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3560
f6fbd3da
PE
35612004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3562
3563 Remove uses of 'short int' and 'unsigned short int'. This raises
3564 some arbitrary limits. It uses more memory but nowadays that's
3565 not much of an issue.
3566
3567 This change does not affect the generated parsers; that's a different
3568 task, as some users will want to conserve memory there.
3569
3570 Ideally we should use size_t to represent all object counts, and
3571 something like ptrdiff_t to represent signed differences of object
3572 counts; but that will require more code-cleanup than I have the
3573 time to do right now.
3574
3575 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
3576 Use size_t, not int or short int, to count objects.
3577 * src/closure.c (nritemset, closure): Likewise.
3578 * src/closure.h (nritemset, closure): Likewise.
3579 * src/nullable.c (nullable_compute): Likewise.
3580 * src/print.c (print_core): Likewise.
3581 * src/print_graph.c (print_core): Likewise.
3582 * src/state.c (state_compare, state_hash): Likewise.
3583 * src/state.h (struct state): Likewise.
3584 * src/tables.c (default_goto, goto_actions): Likewise.
3585
3586 * src/gram.h (rule_number, rule): Use int, not short int.
3587 * src/output.c (prepare_rules): Likewise.
3588 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
3589 errs, reductions): Likewise.
3590 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
3591 Likewise.
3592 * src/tables.c (vector_number, tally, action_number,
3593 ACTION_NUMBER_MINIMUM): Likewise.
3594 * src/output.c (muscle_insert_short_int_table): Remove.
3595
efeed023
AD
35962004-12-17 Akim Demaille <akim@epita.fr>
3597
3598 * data/lalr1.cc: Extensive Doxygenation.
3599 (error_): Rename as...
3600 (error): this, since it is visible to the user.
3601 Adjust callers.
3602 (Parser::message): Now an automatic variable from...
3603 (Parser::yyreport_syntax_error_): here.
3604 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
3605 Parser::error.
3606 * tests/input.at: Escape $.
3607
bc82c5a5
PE
36082004-12-16 Paul Eggert <eggert@cs.ucla.edu>
3609
3610 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
3611 Parenthesize rhs to avoid obscure problems with mistakes like
3612 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
3613 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3614 b4_rhs_location): Likewise.
3615 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3616 b4_rhs_location): Likewise.
3617
fd19f271
AD
36182004-12-16 Akim Demaille <akim@epita.fr>
3619
3620 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
3621 yacc.c: be sure to stay within yycheck_.
3622 * tests/actions.at: Re-enable C++ tests.
3623
10454ea4
AD
36242004-12-16 Akim Demaille <akim@epita.fr>
3625
3626 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
3627 real.
3628
c5b95ccf
AD
36292004-12-16 Akim Demaille <akim@epita.fr>
3630
3631 Use #define to handle the %name-prefix.
3632
3633 * data/glr.c, data/yacc.c: Comment changes.
3634 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
3635 so that one can refer to yylex in the parser file, and have it
3636 renamed, as is the case with other skeletons.
3637
617a8f12
AD
36382004-12-16 Akim Demaille <akim@epita.fr>
3639
3640 Move lalr1.cc internals into yy*.
3641
3642 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
3643 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
3644 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
3645 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
3646 (empty_, final_, terror_, errcode_, ntokens_)
3647 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
3648 (looka_, ilooka_, error_range_, nerrs_):
3649 Rename as...
3650 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
3651 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
3652 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
3653 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
3654 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
3655 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
3656 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
3657 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
3658 these.
3659
1e547e6e
PE
36602004-12-15 Paul Eggert <eggert@cs.ucla.edu>
3661
3662 Fix some problems reported by twlevo at xs4all.
3663 * src/symtab.c (symbol_new): Report an error if the input grammar
3664 contains too many symbols. This is better than calling abort() later.
3665 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
3666 (struct node, struct graph):
3667 Rename member expand to stretch. All uses changed.
3668 (struct graph): Remove member layoutalgorithm. All uses removed.
3669 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
3670 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
3671 All uses changed.
3672 (N_STRETCH): Rename from N_EXPAND. All uses changed.
3673
735d6bd4
AD
36742004-12-15 Akim Demaille <akim@epita.fr>
3675
3676 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
3677 Add more Doxygen comments.
3678 (symprint_, stack_print_, reduce_print_, destruct_, pop)
3679 (report_syntax_error_, translate_): Rename as...
3680 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
3681 (yypop_, yyreport_syntax_error_, yytranslate_): this.
3682
2e1f5829
AD
36832004-12-15 Akim Demaille <akim@epita.fr>
3684
3685 * data/lalr1.cc (lex_): Rename as...
3686 (yylex_): this.
3687 Move the trace here.
3688 Take the %name-prefix into account.
3689 Reported by Alexandre Duret-Lutz.
3690
a3cb6248
AD
36912004-12-15 Akim Demaille <akim@epita.fr>
3692
3693 Simplify the C++ parser constructor.
3694
3695 * data/lalr1.cc (debug_): Rename as...
3696 (yydebug_): so that the parser's internals are always in the yy*
3697 pseudo namespace.
3698 Adjust uses.
3699 (b4_parse_param_decl): Remove the leading comma as it is now only
3700 called as unique argument list.
3701 (Parser::Parser): Remove the constructor accepting a location and
3702 an initial debugging level.
3703 Remove from the other ctor the argument for the debugging level.
3704 (debug_level_type, debug_level, set_debug_level): New.
3705
3706 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
3707 constructor calls.
3708
07fed891
AD
37092004-12-15 Akim Demaille <akim@epita.fr>
3710
3711 Remove b4_root related material: failure experiment
a3cb6248 3712 (which goal was to allow to derive from a class).
07fed891
AD
3713
3714 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
3715 definitions and uses.
3716
e603eaa5
PE
37172004-12-14 Paul Eggert <eggert@cs.ucla.edu>
3718
3719 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
3720 not 2, since it's not portable to subtract 1 from the start of an
3721 array. The new item 0 is never set or used. All uses changed.
3722
3723 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
3724 the default definition of YYLLOC_DEFAULT. Problem reported
3725 by Frank Heckenbach.
3726
fafb007d
PE
37272004-12-12 Paul Eggert <eggert@cs.ucla.edu>
3728
3729 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
3730 the normal case and one for the error case. Just use the
3731 first one uniformly. Problem reported by Frank Heckenbach.
3732 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
3733 use exactly the same macro in both places.
3734 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
3735 so that the normal-case YYRHSLOC works for the error case too.
3736 All uses changed.
3737 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
3738 (YYLLOC_DEFAULT): Use the same macro as glr.c.
3739 * doc/bison.texinfo (Location Default Action): Don't claim that
3740 we have an array of locations. Use the same macro for both glr
3741 and lalr parsers. Mention YYRHSLOC. Mention what happens when
3742 the index is 0.
3743
48814dcd
PE
37442004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3745
a4e1a53b
PE
3746 * HACKING: Update email addresses to send announcements to.
3747
48814dcd
PE
3748 * configure.ac (AC_INIT): Bump version to 1.875f.
3749
337116ba
PE
37502004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3751
3752 * NEWS: Version 1.875e.
3753 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
3754
3755 * src/scan-skel.l: Include "complain.h", for "fatal".
3756
3757 * src/relation.h (relation_print, relation_digraph):
3758 Relation sizes are of type relation_node, not size_t (this is
3759 merely a doc fix, since the two types are equivalent).
3760 (relation_transpose): Relation sizes are of type relation_node,
3761 not int.
3762 * src/relation.c: Likewise.
3763 (top, infinity): Now of type relation_node, not int.
3764 (traverse, relation_transpose): Use relation_node, not int.
3765
3766 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
3767 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
3768 (yyparse): Remove unused local introduced in 2004-10-25 patch.
3769
3770 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 3771 specifying whether the test should be skipped. Use it tp
337116ba 3772 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 3773 fail on some hosts, and should be skipped.
337116ba 3774
da2a7671
PE
37752004-12-08 Paul Eggert <eggert@cs.ucla.edu>
3776
3777 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
3778 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
3779 unless otherwise specified below.
3780
3781 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
3782 to allocate kernel_base, kernel_items, kernel_size, since
3783 they needn't be initialized to 0.
3784 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
3785 * src/closure.c (new_closure): Likewise, for itemset.
3786 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
3787 * src/lalr.c (set_goto_map): Likewise, for temp_map.
3788 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
3789 (build_relations): Likewise for edge, states1, includes.
3790 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
3791 * src/reader.c (packgram): Likewise, for ritem, rules.
3792 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
3793 * src/relation.c (relation_digraph): Likewise for VERTICES.
3794 (relation_transpose): Likewise for new_R, end_R.
3795 * src/symtab.c (symbols_token_translations_init): Likewise for
3796 token_translations.
3797 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
3798 (token_actions): Likewise for yydefact, actrow, conflrow,
3799 conflict_list.
3800 (save_column): Likewise for froms[symno], tos[symno].
3801 (goto_actions): Likewise for state_count.
3802 (pack_table): Likewise for base, pos, check.
3803 (tables_generate): Likewise for width.
3804
3805 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
3806 for initial core. Just have a separate core, so we needn't worry
3807 about whether kernel_size and kernel_base are initialized.
3808
3809 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
3810 kernel_size, kernel_items): Remove unnecessary initialization.
3811 * src/conflicts.c (conflicts): Likewise.
3812 * src/derives.c (derives): Likewise.
3813 * src/muscle_tablc (muscle_insert): Likewise.
3814 * src/relation.c (relation_digraph): Likewise.
3815 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
3816 conflrow, conflict_table, conflict_list, table, check):
3817 Likewise.
3818
3819 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
3820 This is because all callers pass unsigned int.
3821 * src/closure.h (new_closure): Likewise.
3822
3823 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
3824 (build_relations): Initialize includes[i] in all cases.
3825 * src/reader.c (packgram): Always initialize rules[ruleno].prec
3826 and rules[ruleno].precsym. Initialize members in order.
3827 * src/relation.c (relation_transpose): Always initialize new_R[i]
3828 and end_R[i].
3829 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
3830
3831 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
3832 conflict_list[0] was always 0, but now it isn't initialized.
3833
3834 * src/table.c (table_grow): When conflict_table grew, the grown
3835 area wasn't cleared. Fix this.
3836
3837 * lib/.cvsignore: Add strdup.c, strdup.h.
3838 * m4/.cvsignore: Add strdup.m4.
3839
00baeeac
PE
38402004-12-07 Paul Eggert <eggert@cs.ucla.edu>
3841
3842 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
3843 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
3844 GOTO_NUMBER_MAXIMUM, since we occasionally compute
3845 ngotos + 1 without checking for overflow.
3846 (build_relations): Use END_NODE, not -1, to denote end of edges.
3847 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
3848 build_relations): Use goto_number, not int, for goto numbers.
3849 * src/tables.c (save_column, default_goto): Likewise.
3850
be3d9d42
AD
38512004-11-23 Akim Demaille <akim@epita.fr>
3852
3853 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
3854 of #defining from yystype.
3855 Don't typedef yystype, C++ does not need it.
3856 This lets it possible to forward declare it as union.
3857
78e526d5
PE
38582004-11-23 Paul Eggert <eggert@cs.ucla.edu>
3859
3860 * bootstrap (gnulib_modules): Add extensions.
3861 Problem reported by Jim Meyering.
3862
afbb696d
PE
38632004-11-22 Paul Eggert <eggert@cs.ucla.edu>
3864
3865 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
3866 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
3867 src/system.h, src/tables.c: XFREE -> free, to accommodate
3868 recent change to gnulib xalloc.h.
78e526d5 3869 Problem reported by Jim Meyering.
afbb696d 3870
c1f8f16a
AD
38712004-11-17 Akim Demaille <akim@epita.fr>
3872
3873 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
3874
38752004-10-28 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
3876 Alexandre Duret-Lutz <adl@gnu.org>
3877
3878 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
3879 changes.
3880 (YYCDEBUG): Adjust.
3881 Use it instead of cdebug_.
3882 (Parser::debug_stream, Parser::set_debug_stream): New.
3883 (Parser::symprint_): Define cdebug_ for temporary backward
3884 compatibility.
3885 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
3886 debug_stream ().
3887
68e11668
AD
38882004-11-17 Akim Demaille <akim@epita.fr>
3889
3890 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
3891 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
3892 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
3893 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
3894
97cbc73e
PE
38952004-10-27 Paul Eggert <eggert@cs.ucla.edu>
3896
3897 * data/glr.c (yyloc_default): Remove; not used.
3898 Problem reported by Frank Heckenbach.
3899
e342c3be
AD
39002004-10-25 Akim Demaille <akim@epita.fr>
3901
3902 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
3903 Introduce another definition to address simple location arrays.
3904 (yyGLRStack): New member: yyerror_range.
3905 (yyrecoverSyntaxError, yyparse): Update it.
3906 (yyrecoverSyntaxError): Use it when shifting the error token to
3907 have an accurate range, equivalent to the one computed by both
3908 yacc.c and lalr1.cc.
3909 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
3910 that column numbers start at column 0, as per GNU Coding
3911 Standards, the others tests, and the doc.
3912 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
3913 Adjust to the above change (first column is 0).
3914 And adjust the location of the "<error>", now covering the whole
3915 line.
3916
93602feb 39172004-10-22 Akim Demaille <akim@epita.fr>
04098407 3918 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
3919
3920 Remove some arbitrary limits on goto numbers and relations.
3921 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
3922 initial values, since they're never used.
3923 (set_goto_map): ngotos is now unsigned, so test for overflow
3924 by seeing whether it wraps around to zero.
3925 * src/lalr.h (goto_number): Now size_t, not short int.
3926 (GOTO_NUMBER_MAXIMUM): Remove.
3927 * src/relation.c (relation_print, traverse, relation_transpose):
3928 Check for END_NODE rather than looking at sign.
3929 * src/relation.h (END_NODE): New macro.
3930 (relation_node): Now size_t, not short int.
3931
dba08b04
PE
39322004-10-22 Paul Eggert <eggert@cs.ucla.edu>
3933
3934 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
3935 keyword, not an identifier. Problem reported by Baron Schwartz in
3936 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
3937
df09ef2e
AD
39382004-10-11 Akim Demaille <akim@epita.fr>
3939
3940 * src/symtab.c (symbol_check_alias_consistency): Also check
3941 type names, destructors, and printers.
3942 Reported by Alexandre Duret-Lutz.
3943 Recode the handling of associativity and precedence in terms
3944 of symbol_precedence_set.
3945 Accept no redeclaration at all, not even equal to the previous
3946 value.
3947 (redeclaration): New.
3948 Use it to factor redeclaration complaints.
3949 (symbol_make_alias): Don't set the type of the alias, let
3950 symbol_check_alias_consistency do it as for other features.
3951 * src/symtab.h (symbol): Add new member prec_location, and
3952 type_location.
3953 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
3954 * tests/input.at (Incompatible Aliases): New.
3955
146bc99d
PE
39562004-10-09 Paul Eggert <eggert@cs.ucla.edu>
3957
3958 .cvsignore fixes to accommodate gnulib changes,
3959 and the practice of naming build directories "_build".
3960 * .cvsignore: Add "_*". Sort.
3961 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
3962 * m4/.cvsignore: Add "*_gl.m4".
3963
e503aa60
AD
39642004-10-06 Akim Demaille <akim@epita.fr>
3965
3966 * src/parse-gram.y (add_param): Fix the truncation of trailing
3967 spaces.
3968
b4a20338
AD
39692004-10-05 Akim Demaille <akim@epita.fr>
3970
3971 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
3972 whether the reducion was empty or not. This leaves room to
3973 improve the use of YYLLOC_DEFAULT in such a case.
3974 lalr1.cc is still experimental, so changing this is acceptable.
3975 And finally, there are probably not many users who changed the
3976 handling of locations in GLR, so changing is admissible too.
3977
3978 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
3979 empty reduction, set @$ to an empty location ending the previously
3980 stacked symbol.
3981 Adjust uses to make sure the code is triggered on empty
3982 reductions.
3983 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
3984 expected output: empty reductions have empty locations.
3985
f85a5e6f
AD
39862004-09-29 Akim Demaille <akim@epita.fr>
3987
3988 * data/lalr1.cc: Move towards a more standard C++ coding style
3989 for templates: Class < T > -> Class<T>.
3990
b203fc2c
AD
39912004-09-29 Akim Demaille <akim@epita.fr>
3992
3993 * data/lalr1.cc: Reinstall the former ctor, for sake of
3994 compatibility, but warn it will be removed.
3995 Move towards a more standard C++ coding style (i.e., type *var ->
3996 type* var).
3997
5b7e1e73
PE
39982004-09-27 Paul Eggert <eggert@cs.ucla.edu>
3999
3fee967f
PE
4000 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
4001 since it's less likely to work if NULs are involved in the future.
5b7e1e73 4002
0dcca5c2
AD
40032004-09-27 Akim Demaille <akim@epita.fr>
4004
4005 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
4006
6dde1c82
AD
40072004-09-27 Akim Demaille <akim@epita.fr>
4008
4009 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 4010 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
4011 and argument names.
4012 (b4_cc_constructor_call): Likewise.
4013
b233d555
AD
40142004-09-24 Akim Demaille <akim@epita.fr>
4015
4016 * src/parse-gram.y (add_param): Strip the leading and trailing
4017 blanks from a formal argument declaration.
4018 (YY_LOCATION_PRINT): New.
4019
619404e3
AD
40202004-09-24 Akim Demaille <akim@epita.fr>
4021
4022 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
4023 after the location.
4024
dd8d9022
AD
40252004-09-24 Akim Demaille <akim@epita.fr>
4026
4027 * doc/bison.texinfo (Table of Symbols): Sort.
4028
0092f063
AD
40292004-09-21 Akim Demaille <akim@epita.fr>
4030
4031 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
4032 the useless parentheses.
4033 Suggested by Paul Eggert.
4034
451364ed
AD
40352004-09-20 Akim Demaille <akim@epita.fr>
4036
4037 Let the initial-action act on the look-ahead, and use it for the
4038 "initial push" (corresponding to an hypothetical beginning-of-file).
4039 And let lalr1.cc honor %initial-action.
4040
4041 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
4042 example.
4043 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
4044 (Parser::Parser): Remove the ctor that used to initialize it.
4045 (Parser::parse): Like in the other skeletons, issue the "starting
4046 parse" message before any action.
4047 Honor %initial-action.
4048 Initialize the stacks with the lookahead.
4049 * data/yacc.c: Let $$ and @$ in %initial-action designate the
4050 look-ahead.
4051 Push them in the stacks.
4052 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
4053
18d192f0
AD
40542004-09-20 Akim Demaille <akim@epita.fr>
4055
4056 * doc/bison.texinfo (Initial Action Decl): New.
4057
b8458aa5
AD
40582004-09-20 Akim Demaille <akim@epita.fr>
4059
4060 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
4061 clearer criterion to define it.
4062 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
4063 When reducing on an empty RHS, use the latest stacked location as
4064 location.
4065 yylloc is not always available.
4066 * data/glr.c: Likewise.
4067 Also, honor initial-actions.
4068
3fc16193
AD
40692004-09-20 Akim Demaille <akim@epita.fr>
4070
4071 * data/yacc.c (YY_LOCATION_PRINT): New.
4072 Define when we know YYLTYPE's structure, i.e., when the default
4073 YYLLOC_DEFAULT is used.
4074 * data/c.m4 (b4_yysymprint_generate): Use it.
4075 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
4076 value of the result.
4077 (error_start_): Replace with...
4078 (error_range_): this location array.
4079 This allows to replace code relying on the implementation of
4080 locations by portable code.
4081 * data/yacc.c (yylerrsp): Replace with...
4082 (yyerror_range): this.
4083 Every time a token is popped, update yyerror_range[0], to have an
4084 accurate location for the error token.
4085 * data/glr.c (YY_LOCATION_PRINT): New.
4086 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
4087 deference a pointer.
4088 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
4089 report the location in %printers.
4090
4091 * src/scan-skel.l: Instead of abort, report error messages to ease
4092 understanding skeleton scanning failures.
4093
ecfe33e7
AD
40942004-09-16 Akim Demaille <akim@epita.fr>
4095
4096 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
4097 (iterator, const_iterator): these, to be more in the C++ spirit.
4098 Also, return reverse iterators so that when displaying the stack
4099 we display its bottom first.
4100 (Parser::stack_print_, Parser::reduce_print_): Match the messages
4101 from yacc.c.
4102 We should probably use vector here though.
4103
1576d44d
AD
41042004-09-16 Akim Demaille <akim@epita.fr>
4105
4106 Have more complete shift traces.
4107
4108 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
4109 to report Shifts instead of ad hoc YYDPRINTF invocations,
4110 including for the error token.
4111 * data/lalr1.cc (symprint_): Output the location.
4112 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
4113 output the location within the %printer.
4114 Activate GLR tests, at least to make sure they compile properly.
4115 They still don't pass though.
4116 * tests/calc.at: Adjust expect verbose output, since now "Entering
4117 state..." is on a different line than the "Shifting" message.
4118
9c66f418
AD
41192004-09-08 Akim Demaille <akim@epita.fr>
4120
4121 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
4122 Bison directive from the Bison file to the invocation of this
4123 macro, so that these directives are passed to
4124 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
4125 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
4126 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
4127 the extra Bison directives instead of the whole series.
4128 Change the grammar so that there are recoverable errors, and
4129 unrecoverable errors. Now we can have the parser give up before
4130 consuming the whole input. As a result we now can observe that
4131 the lookahead is freed when needed.
4132 Change the parser source to parse argv[1] instead of a hard coded
4133 string.
4134 Simplify yylex, and give a value and location to EOF.
4135 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
4136 passed directives already coded in the file.
4137 Add some tests to check the location of "error".
4138 For some tests, the C++ parser is correct, and not yacc.c.
4139 For other tests, they provide different, but unsatisfying, values,
4140 so keep the C++ value so that at least one parser is "correct"
4141 according to the test suite.
4142 (Actions after errors): Remove, this is subsumed by the
4143 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
4144
52d5733f
AD
41452004-09-06 Akim Demaille <akim@epita.fr>
4146
4147 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 4148 (Parser::pop): New.
52d5733f
AD
4149 Use it.
4150
a0e68930
AD
41512004-09-06 Akim Demaille <akim@epita.fr>
4152
4153 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
4154 argument, an informative message.
4155 Call YY_SYMBOL_PRINT.
4156 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
4157 * data/lalr1.cc (destruct_): Likewise.
4158 In addition, no longer depend on b4_yysymprint_generate and
4159 b4_yydestruct_generate to generate these functions, do it "by
4160 hand".
4161
e757bb10
AD
41622004-09-03 Akim Demaille <akim@epita.fr>
4163
4164 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
4165 invoked, yydestruct the lookahead.
4166 * tests/calc.at (Calculator $1): Update the expected lengths of
4167 traces: there is an added line for the discarded lookahead.
4168 * doc/bison.texinfo (Destructor Decl): Some rewording.
4169 Define "discarded" symbols.
4170
0fe1f06d
AD
41712004-09-02 Akim Demaille <akim@epita.fr>
4172
4173 * data/lalr1.cc (translate_, destruct_): No reason to be static.
4174
284acc8b
AD
41752004-09-02 Akim Demaille <akim@epita.fr>
4176
4177 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
4178 (YYDSYMPRINTF): Rename as...
4179 (YY_SYMBOL_PRINT): this.
4180 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
4181 two.
4182 Use it instead of direct symprint_ calls.
4183 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
4184 one.
4185
a5eb1ed2
AD
41862004-09-02 Akim Demaille <akim@epita.fr>
4187
b7c72fe1
AD
4188 * data/lalr1.cc (b4_yysymprint_generate): New.
4189 (symprint_): New member function, defined when YYDEBUG.
4190 Use it consistently instead of token/nterm debugging output by
4191 hand.
a5eb1ed2
AD
4192 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4193 %printer calls to use cdebug_ when using lalr1.cc.
4194
417141dd
AD
41952004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
4196
4197 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
4198 with #ifdef YYDEBUG.
4199
2fa09258
AD
42002004-08-26 Akim Demaille <akim@epita.fr>
4201
4202 * doc/bison.texinfo (Implementing Loops): Rename as...
4203 (Implementing Gotos/Loops): this.
4204
9378b508
PE
42052004-08-13 Paul Eggert <eggert@cs.ucla.edu>
4206
4207 Adjust to latest gnulib.
4208 * bootstrap (gnulib_modules): Add xalloc-die.
4209 Set LC_ALL=C so that file names sort consistently.
4210 Prefer the gnulib copies of gettext.m4, glibc21.m4,
4211 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
4212 uintmax_t.m4, ulonglong.m4.
4213 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
4214 po.m4 since we are now using _gl.m4 instead.
4215
87a8ad5c
PE
42162004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
4217
4218 * src/scan-action.l: Remove. Scanning of semantic actions is
4219 handled in scan-gram.l.
4220
dca81a78
PE
42212004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
4222
4223 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
4224
4225 * src/location.h (struct): The file member is a uniqstr.
4226 (equal_boundaries): Use UNIQSTR_EQ for comparison.
4227
c9cbf7c5
PE
42282004-07-22 Paul Eggert <eggert@cs.ucla.edu>
4229
4230 Fix bug with non-%union parsers that have printers or destructors,
4231 which led to a Bison core dump. Reported by Peter Fales in
4232 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 4233
c9cbf7c5
PE
4234 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
4235 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
4236 not to our own type.
4237 * src/output.c (symbol_destructors_output, symbol_printers_output):
4238 Don't assume %union.
4239 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
4240 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
4241 UNION-FLAG. All callers changed.
4242 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
4243 Use type char, not unsigned int, when declaring an array of char;
4244 this lets us remove a cast.
4245 (Printers and Destructors): Add non-%union test cases.
4246
fa7e68c3
PE
42472004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4248
4249 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4250 GLR writeups. E.g., avoid frenchspacing and the future tense,
4251 change "lookahead" to "look-ahead", and change "wrt" to "with
4252 respect to".
2fa09258 4253
fa7e68c3
PE
42542004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4255
4256 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
4257 New sections, split off from the GLR Parsers section. Put the new
4258 Simple GLR Parser near the start of the GLR section, for clarity.
4259 Rewrite connective text.
4260
99a9344e
PE
42612004-06-21 Frank Heckenbach <frank@g-n-u.de>
4262
4263 * doc/bison.texinfo (Simple GLR Parsers): New section.
4264
8dd162d3
PE
42652004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4266
4267 * NEWS, TODO, doc/bison.texinfo:
4268 Use "look-ahead" instead of "lookahead", to be consistent.
4269 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
4270 while we're fixing "look-ahead".
4271 * src/conflicts.c (shift_set): Renamed from shiftset.
4272 (look_ahead_set): Renamed from lookaheadset.
4273 * src/print.c: Likewise.
4274 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
4275 name for "lookahead".
4276 (report_types, usage): Likewise.
4277 * src/getargs.h (report_look_ahead_tokens): Renamed from
4278 report_lookaheads.
4279 * src/lalr.c (compute_look_ahead_tokens): Renamed from
4280 compute_lookaheads.
4281 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
4282 (look_ahead_tokens_print): Renamed from lookaheads_print.
4283 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
4284 state_rule_lookaheads_print.
4285 * src/state.h: Likewise.
4286 (reductions.look_ahead_tokens): Renamed from lookaheads.
4287 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
4288 AT_DATA_LOOKAHEADS_GRAMMAR.
4289
57a90331
PE
42902004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4291
4292 * README: Update location of patched M4 distribution.
4293
8ed3234a
PE
42942004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4295
4296 Don't assume the C++ compiler takes the same arguments as the C compiler
4297 (trivial change).
4298 * configure.ac (O0CXXFLAGS): New var.
4299 * tests/atlocal.in (CXXFLAGS): Use it.
4300
07971983
PE
43012004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4302
4303 Fix some "make check" problems with C++ reported by
4304 Albert Chin-A-Young for Tru64 C++ in this thread:
4305 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4306
4307 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4308 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4309 Output to a .cc file for C++, not to a .c file.
4310 * tests/calc.at (AT_CHECK_CALC): Likewise.
4311 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4312 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4313
29058652
PE
43142004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4315
4316 * tests/calc.at, tests/actions.at: Workaround for SGI
4317 C++ compiler. (trivial change)
4318
62cb8a99
PE
43192004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4320
fd418816
PE
4321 Spent a few hours checking out which prerequisite versions the
4322 current sources actually require. I went all the way back to
4323 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4324 a seemingly endless set of combinations of versions more recent
4325 than that. The bottom line is that the current sources require
4326 fairly recent versions of the build tools, and it'll be some work
4327 to change this.
4328 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4329 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4330 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4331 Add comments explaining why those particular versions are
4332 currently needed.
2fa09258 4333
62cb8a99
PE
4334 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4335 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 4336 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
4337
4338 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4339 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4340
caa52c10
PE
43412004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4342
4343 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4344 0.11.5. Suggested by Bruno Haible.
4345 * bootstrap: Remove gettext version checking.
4346
4347 * doc/bison.texinfo (Decl Summary): Also mention that %union
4348 can depend on prerequisite types. Problem reported by Tim
4349 Van Holder.
4350
4bfd5e4e
PE
43512004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4352
2cef3017
PE
4353 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4354 * README-alpha: Don't tell people not to package this.
4355
b9c85d5c
PE
4356 * bootstrap: Don't assume $(...) works; use `...` instead.
4357 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4358 gettext better.
4359
4bfd5e4e
PE
4360 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4361 put into the -d output file, and mention what to do if YYSTYPE is
4362 defined as a macro.
4363
6a36ff94
PE
43642004-05-24 Paul Eggert <eggert@cs.ucla.edu>
4365
6712933e
PE
4366 Undo change made earlier today: it caused autopoint to not bring
4367 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
4368 autopoint's.
4369
4370 * bootstrap: Check that gettext version matches what's in
4371 configure.ac. Warn users to ignore robots.txt ERROR 404.
4372 * bootstrap: Undo today's earlier change (logged below).
4373 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 4374
6a36ff94
PE
4375 The gettext version checking is causing more trouble than it's
4376 curing; remove it. Problem reported by Paul Hilfinger.
4377
4378 * bootstrap: Issue a warning that one can expect a message
4379 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
4380 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
4381
209ea708
PE
43822004-05-23 Paul Eggert <eggert@cs.ucla.edu>
4383
4384 Ensure that the C++ compiler used for testing actually works on a
4385 simple test program; if not, skip the C++-related tests. Problem
4386 reported by Vin Shelton in:
161a71f3 4387 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
4388
4389 * m4/cxx.m4: New file.
4390 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
4391 * tests/atlocal.in (BISON_CXX_WORKS): Add.
4392 * tests/local.at (AT_COMPILE_CXX): Use it.
4393
41ca2549
PE
43942004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4395
383e69dc
PE
4396 * data/glr.c (yylloc): Output this macro even if locations are not
4397 being generated, as the GLR parser needs it even in that case.
4398 Problem reported by Troy A. Johnson
4399 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
4400
41ca2549
PE
4401 * configure.ac (AC_INIT): Update to 1.875e.
4402
e476c87d
PE
44032004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4404
4405 * NEWS: Version 1.875d.
4406 * configure.ac (AC_INIT): Likewise.
4407 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
4408
4409 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
4410 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
4411 lalr1.cc runs afoul of the first, and the last two are no longer
4412 supported by GCC 3.4.0.
4413 * README: Mention GNU m4 1.4 or later; mention m4 patches.
4414 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
4415
233a88ad
PE
44162004-05-06 Paul Eggert <eggert@cs.ucla.edu>
4417
4418 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
4419 unsigned int, for compatibility with latest gnulib hash module.
4420 * src/state.c (state_hash, state_hasher): Likewise.
4421 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
4422 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 4423
12ffdd28
PE
44242004-05-03 Paul Eggert <eggert@cs.ucla.edu>
4425
4426 * NEWS: Unescaped newlines are no longer allowed in char & strings.
4427
4428 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
4429 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
4430 character and string literals.
4431 (unexpected_end): New function.
4432 (unexpected_eof): Use it.
4433 (unexpected_newline): New function.
4434 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
4435 actions.
e476c87d 4436
12ffdd28
PE
4437 * NEWS: Document %expect-rr.
4438
4439 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
4440 Fix typo by replacing $1 with $option.
4441 Remove more 'intl'-related files.
9668e2be 4442 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
4443
4444 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
4445 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
4446 strtoul.c.
4447 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
4448 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
4449 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
4450 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
4451 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
4452 * src/.cvsignore: Add *.output.
4453
4454 * src/parse-gram.y: Put copyright notice inside %{ %} so it
4455 gets copied to the output file.
e476c87d 4456
1f65350a
PE
44572004-04-28 Paul Eggert <eggert@twinsun.com>
4458
4459 Get files from the gnulib and po repositories, instead of relying
4460 on them being in our CVS. Upgrade to latest versions of gnulib
4461 and Automake.
4462
4463 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
4464 * bootstrap: Bootstrap from gnulib and po repositories.
4465 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
4466 * README-cvs: Document these changes. Remove version numbers from
4467 mentions of build tools, since they change so often. Mention Flex.
4468
4469 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
4470 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
4471 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
4472 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 4473 does this for us.
12ffdd28
PE
4474 (AC_ISC_POSIX): Remove; we no longer support this
4475 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
4476 (AC_HEADER_STDC): Remove: we now assume C89 or better.
4477 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
4478 Do not check for C89 headers, except for locale.h which is used
4479 by the Yacc library and must port to K&R hosts.
4480 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
4481 Do not check for C89 functions, except for setlocale which is
4482 used by the Yacc library.
4483 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
4484 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
4485 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
4486 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
4487 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
4488 AM_GNU_GETTEXT): Remove; now done by:
4489 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
4490 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
4491 for us.
4492
4493 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
4494 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
4495 Define to empty, as gnulib.mk will do the rest for us.
4496 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
4497 for us.
4498 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
4499 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
4500
4501 * src/files.c: Include gnulib's xstrndup.h.
4502
4503 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
4504 (REALLOC): Use xnrealloc, for likewise.
4505 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
4506 (strnlen, memrchr): Remove decls; functions no longer used.
4507 Include <stpcpy.h>.
4508
4509 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
4510 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4511 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
4512 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
4513 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
4514 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
4515 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
4516 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
4517 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
4518 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
4519 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
4520 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4521 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
4522 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
4523 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
4524 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
4525 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
4526 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
4527 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4528 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
4529 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
4530 Remove, as these files are now generated automatically
4531 by bootstrap or automake.
4532
4533 * po/ChangeLog: Remove: all but one entry was a duplicate
4534 of this file, and I moved that 2000-11-02 entry here.
4535
4536 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4537 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4538 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4539 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4540 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4541 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4542 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4543 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4544 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4545 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4546 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4547 xstrndup.h.
4548 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4549 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4550 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4551 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4552 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4553 * src/.cvsignore: Remove *_.c.
4554
4555
4556 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4557 support it. (The latest stable gzip doesn't.)
4558
45592004-04-27 Paul Eggert <eggert@twinsun.com>
4560
4561 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4562 case, as stos_ is now used by destructors due to the 2004-02-09
4563 change.
4564
4565 Remove more K&R C support.
4566 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4567 * lib/subpipe.c (errno): Remove decl.
4568 Include <stdlib.h> unconditionally.
4569 (EXIT_FAILURE): Remove macro.
4570 * src/complain.c (vfprintf, strerror): Remove.
4571 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4572 unconditionally.
4573 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4574 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4575 (strchr, strspn, memchr): Remove decls.
4576 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
4577 unconditionally. Do not declare perror.
4578 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
4579 unconditionally.
4580
4581 * src/complain.c (_): Remove useless defn, as system.h defines this.
4582
4583 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
4584 with latest obstack.h.
4585 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
4586 to procedure types, as obstack.h now does that for us.
4587 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
4588
4589 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
4590 so that this include file can stand alone.
4591 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
4592 does this now. Include subpipe.h first after config.h, to
4593 test whether it can stand alone.
4594
4595 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
4596 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
4597 unused declaration.
4598
4599 * tests/synclines.at (%union synch line): Put a dummy member in
4600 the union, because empty unions aren't allowed in C. Caught
4601 by GCC 3.4.0.
4602
4f16766c
PE
46032004-04-13 Jim Meyering <jim@meyering.net>
4604
4605 * src/conflicts.c (conflicts_print): Correct format string typo:
4606 use `%%' to produce literal `%'. (trivial change)
4607
779e7ceb
PE
46082004-03-30 Paul Eggert <eggert@twinsun.com>
4609
4610 * src/getargs.c (version): Update copyright year to 2004.
4611
4612 * data/c.m4 (b4_int_type): Use 'short int' rather than
4613 'short', and similarly for 'long', 'unsigned', etc.
4614 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
4615 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
4616 yy_yypstack, yydumpstack): Likewise.
4617 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
4618 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
4619 Likewise.
4620 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
4621 yy_stack_print, yyparse): Likewise.
4622 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
4623 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
4624 * lib/bitset.c (bitset_print): Likewise.
4625 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
4626 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4627 * lib/bitsetv.c (bitsetv_dump): Likewise.
4628 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
4629 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
4630 Likewise.
4631 * src/LR0.c (allocate_itemsets): Likewise.
4632 * src/gram.h (rule_number, rule): Likewise.
4633 * src/lalr.h (goto_number): Likewise.
4634 * src/nullable.c (nullable_compute): Likewise.
4635 * src/output.c (prepare_rules): Likewise.
4636 * src/relation.c (relation_print, relation_digraph): Likewise.
4637 * src/relation.h (relation_node): Likewise.
4638 * src/state.h (state_number, transitions, errs, reductions,
4639 struct state): Likewise.
4640 * src/symtab.h (symbol_number, struct symbol): Likewise.
4641 * src/tables.c (vector_number, tally, action_number,
4642 default_goto, goto_actions): Likewise.
4643 * tests/existing.at (GNU Cim Grammar): Likewise.
4644 * tests/regression.at (Web2c Actions): Likewise.
4645
4646 * src/output.c (muscle_insert_short_int_table): Renamed from
4647 muscle_insert_short_table. All uses changed.
4648
d6328241
PH
46492004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4650
4651 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
4652 (declaration): Replace expected_conflicts with expected_sr_conflicts.
4653 Add %expect-rr rule.
4f16766c 4654
d6328241
PH
4655 * src/scan-gram.l: Recognize %expect-rr.
4656
4f16766c 4657 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 4658 expected_conflicts.
4f16766c 4659 (expected_rr_conflicts): Declare.
d6328241
PH
4660
4661 * src/conflicts.c (expected_sr_conflicts): Rename from
4662 expected_conflicts.
4663 (expected_rr_conflicts): Define.
4664 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
4665 for GLR parsers.
4666 Use expected_sr_conflicts in place of expected_conflicts.
4667 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 4668
d6328241 4669 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 4670
1452af69
PE
46712004-03-08 Paul Eggert <eggert@gnu.org>
4672
4673 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 4674 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
4675
4676 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
4677 in lalr1.cc.
4678 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
4679 * src/scan-gram.l (scan_integer): New function.
4680 ({int}): Use it.
4681 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
4682 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
4683 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
4684 Say "long int", not "long", for uniformity with GNU style.
4685
006d217d
PE
46862004-02-25 Paul Eggert <eggert@twinsun.com>
4687
4688 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
4689 compilers. This fixes a problem with Intel's C++ compiler being
4690 chatty, reported by Guido Trentalancia in
161a71f3 4691 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 4692
c2729758
ADL
46932004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
4694
4695 Support %destructor and merge error locations in lalr1.cc.
4696
4697 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
4698 (Parser::stos_): Define unconditionally.
4699 (Parser::destruct_): New method. Generate its body with
4700 b4_yydestruct_generate.
4701 (Parser::error_start_): New attribute.
4702 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
4703 token which are discarded.
4704 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
4705 error_start_ when erroneous token are discarded.
4706 (Parser::parse) <yyerrlab1>: Compute the location of the error
4707 token so that it covers all the discarded tokens.
4708 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
4709 it can be called with `%skeleton "lalr1.cc"', and do that.
4710
dd0e0635
PE
47112004-02-02 Paul Eggert <eggert@twinsun.com>
4712
4713 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
4714 $(top_srcdir)/lib and ../lib. This fixes a bug reported
4715 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
4716 There's no need to mention top_builddir since Automake does that
4717 for us.
4718 (INCLUDES): Remove, as Automake says it's obsolescent.
4719 Contents migrated into AM_CPPFLAGS as described above.
4720 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
4721
47222004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4723
4724 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
4725 (yyreportSyntaxError): Handle case where lookahead token is
4726 YYEMPTY.
4727
be16239b
PH
47282004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4729
4730 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
4731 resulting parsers are compilable with C++.
4732
5fa90832
PE
47332003-12-23 Paul Eggert <eggert@twinsun.com>
4734
4735 * config/depcomp, config/install-sh: Sync with Automake 1.8.
4736 * src/output.c (output_skeleton): Rename local var.
4737 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
4738 Bison tokens, as this runs afoul of the 2003-10-07 change that
4739 disallowed NUL bytes in character constants or string literals.
4740
4741 * tests/local.at: Require Autoconf 2.59's Autotest.
4742 * tests/testsuite.at: Don't include local.at, since we now assume
4743 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
4744 including it.
4745 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
4746 multiple inclusion warnings.
dd0e0635 4747
b165c324
AD
47482003-12-02 Akim Demaille <akim@epita.fr>
4749
4750 * doc/bison.texinfo (How Can I Reset the Parser): More about start
4751 conditions.
4752 From Bruno Haible.
4753
26e06a21
ADL
47542003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
4755
4756 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
4757
92ac3705
PE
47582003-10-07 Paul Eggert <eggert@twinsun.com>
4759
6a5ecb38
PE
4760 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
4761 if testsuite doesn't exist.
4762
92ac3705
PE
4763 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
4764 literals, unfortunately.
4765 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
4766 Complain about NUL bytes in character constants or string literals.
4767
91d2c560
PE
47682003-10-05 Paul Eggert <eggert@twinsun.com>
4769
4770 * NEWS: Don't document %no-default-prec, as it's still
4771 too experimental.
4772 * doc/bison.texinfo: Document %no-default-prec only if
4773 the defaultprec flag is set. Normally it's not.
4774
0cc3da3a
PE
47752003-10-04 Paul Eggert <eggert@twinsun.com>
4776
4777 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
4778 non-modifiable lvalue, instead of a modifiable one.
4779 * doc/bison.texinfo (Actions): Document that $$ can
4780 be assigned to. Do not claim that $$ and $N are
4781 array element references: user code should not rely on this.
4782
22fccf95
PE
47832003-10-01 Paul Eggert <eggert@twinsun.com>
4784
4785 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
4786 (grammar_declaration): Use it.
4787 * src/scan-gram.l: New token %no-default-prec.
4788 * tests/conflicts.at: Revamp tests to use %no-default-prec.
4789 * NEWS, doc/bison.texinfo: Document the above.
4790
fc8f2965
AD
47912003-10-01 Akim Demaille <akim@epita.fr>
4792
4793 VCG no longer supports long_straight_phase.
4794
4795 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
4796 * src/print_graph.c (print_graph): Adjust.
4797
39a06c25
PE
47982003-09-30 Frank Heckenbach <frank@g-n-u.de>
4799 and Paul Eggert <eggert@twinsun.com>
4800
4801 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
4802 Table of Symbols): Document %default-prec.
4803 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
4804 (grammar_declaration): Set default_prec on %default-prec.
4805 * src/scan-gram.l (%default-prec): New token.
4806 * src/reader.h (default_prec): New flag.
4807 * src/reader.c: Likewise.
4808 (packgram): Handle it.
4809 * tests/conflicts.at (%default-prec without %prec,
4810 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 4811
39a06c25
PE
48122003-09-30 Paul Eggert <eggert@twinsun.com>
4813
4814 * tests/testsuite.at: Include local.at, not input.at, fixing
4815 a typo in the 2003-08-25 patch.
4816
62b6aef9
AD
48172003-08-27 Akim Demaille <akim@epita.fr>
4818
4819 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
4820 GCC warnings.
4821
89e1cc61
AD
48222003-08-26 Akim Demaille <akim@epita.fr>
4823
4824 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
4825 "<\#" to avoid magic from Gnus when posting parts of this script.
4826
a08460b0
AD
48272003-08-26 Akim Demaille <akim@epita.fr>
4828
4829 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
4830 (Parser::parse): here.
4831 Adjust: nerrs and errstatus is now replaced by...
4832 (Parser::nerrs_, Parser::errstatus_): New.
4833
603f1cfd
AD
48342003-08-25 Akim Demaille <akim@epita.fr>
4835
4836 * config/announce-gen, Makefile.cfg: New.
4837 * Makefile.am: Adjust.
4838 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
4839 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
4840
cd3684cf
AD
48412003-08-25 Akim Demaille <akim@epita.fr>
4842
4843 When reducing initial empty rules, Bison parser read an initial
4844 location that is not defined. This results in garbage, and that
4845 affects Bison's own parser. Therefore we need (i) to extend Bison
4846 to support a means to initialize this location, and (ii) to use
4847 this CVS Bison to fix CVS Bison's parser.
4848
4849 * src/reader.h, reader.c (epilogue_augment): Remove, replace
4850 with...
4851 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
4852 * src/parse-gram.y: Adjust.
4853 (%initial-action): New.
4854 (%error-verbose): Since we require CVS Bison, there is no reason
4855 not to use it.
4856 * src/scan-gram.l: Adjust.
4857 * src/Makefile.am (YACC): New, to make sure we use our own parser.
4858 * data/yacc.c (yyparse): Use b4_initial_action.
4859
4e03e201
AD
48602003-08-25 Akim Demaille <akim@epita.fr>
4861
4862 * doc/bison.texinfo: Don't promote stdout for error messages.
4863
8c182d05
AD
48642003-08-25 Akim Demaille <akim@epita.fr>
4865
4866 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
4867 From Alexandre Duret-Lutz.
4868
6a60c4cf
PE
48692003-08-25 Akim Demaille <akim@epita.fr>
4870
4871 Version 1.875c.
4872
25f66e1a
AD
48732003-08-25 Akim Demaille <akim@epita.fr>
4874
4875 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
4876 Use them.
4877
5348bfbe
AD
48782003-08-25 Akim Demaille <akim@epita.fr>
4879
4880 * data/lalr1.cc (Parser::reduce_print_): New.
4881 Use it.
4882
47301314
AD
48832003-08-25 Akim Demaille <akim@epita.fr>
4884
4885 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
4886 error recovery loops. This patch is based on
161a71f3 4887 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
4888 Also, augment the similarity between lalr1.cc and yacc.c.
4889 Note: the locations of error recovery rules are not correct yet.
4890
4891 * data/lalr1.cc: Comment changes to augment the similarity between
4892 lalr1.cc and yacc.c.
4893 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
4894 (yyerrlab1): Remove, but where it used to be (now the bottom part of
4895 yyerrlab), when hitting EOF, pop the whole stack here instead of
4896 merely falling thru the default error handling mechanism.
4897 (yyerrorlab): New label, with the old contents of YYERROR,
4898 plus the following change: pop the stack of rhs corresponding
4899 to the production that invoked YYERROR. That is how Yacc
4900 behaves (required by POSIX).
4901 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
4902 fail.
4903
1f7a61ff
AD
49042003-08-25 Akim Demaille <akim@epita.fr>
4905
4906 Tune local.at so that people can "autom4te -l autotest calc.at -o
4907 calc" for instance, to extract a sub test suite.
4908
4909 * tests/testsuite.at: Move the initialization, Autotest version
4910 requirement, and AT_TESTED invocation into...
4911 * tests/local.at: here.
4912 * tests/testsuite.at: Include it for compatibility with Autoconf
4913 2.57.
4914 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
4915 be ignore.
4916
327b5b56
PE
49172003-08-04 Paul Eggert <eggert@twinsun.com>
4918
4919 Rework code slightly to avoid gcc -Wtraditional warnings.
4920 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
4921 The returned value is now stored in *YY0. All callers changed.
4922 * src/output.c (merge_output): Adjust to the above change.
4923
0051e3ed
PE
49242003-07-26 Paul Eggert <eggert@twinsun.com>
4925
4926 * data/glr.c (YYASSERT): New macro.
4927 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
4928 yyresolveStates, yyprocessOneStack):
4929 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
4930 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 4931
137437c6
PE
49322003-07-25 Paul Eggert <eggert@twinsun.com>
4933
5b620e06
PE
4934 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
4935 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 4936 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
4937 by Frank Heckenbach, though I have omitted the structure-initialization
4938 part of his glr-knr.diff patch since I recall that the Portable
4939 C Compiler didn't require that change.
4940
137437c6
PE
4941 Let the user specify how to allocate and free memory.
4942 Derived from a suggestion by Frank Heckenbach in
161a71f3 4943 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
4944 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
4945 All uses of free, malloc, realloc changed to use these macros,
4946 and unnecessary casts removed.
4947 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
4948
ddb85ca5
PE
49492003-07-06 Matthias Mann <MatthiasMann@gmx.de>
4950
4951 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
4952 use s.empty() rather than s == "" to test for empty string; see
161a71f3 4953 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
4954 (trivial change)
4955
39910e09
AD
49562003-06-25 Akim Demaille <akim@epita.fr>
4957
4958 * config/depcomp, config/install-sh: Update from masters.
4959
0ae99356
PE
49602003-06-20 Paul Eggert <eggert@twinsun.com>
4961
4962 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
4963 and return properly parenthesized result.
4964 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
4965 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4966 Remove unnecessary parentheses from uses.
4967 * doc/bison.texinfo (Location Default Action): Describe the
4968 conventions for parentheses.
4969
cd05d13c
PE
49702003-06-19 Paul Eggert <eggert@twinsun.com>
4971
81fd08ca
PE
4972 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
4973 yyreportTree): Do not assume that size_t is the same width as int,
4974 when printing sizes. Print sizes using an unsigned format.
4975 Problem reported by Frank Heckenbach in
161a71f3 4976 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 4977
cd05d13c
PE
4978 Port to Forte Developer 7 C compiler.
4979 * data/glr.c (struct YYLTYPE): If locations are not being used,
4980 declare a single dummy member, as empty structs do not conform
4981 to the C standard.
4982 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
4983 the Forte Developer 7 C compiler complains that end-of-loop
4984 code is not reached.
4985
4dcf140b
PE
49862003-06-17 Paul Eggert <eggert@twinsun.com>
4987
4988 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
4989 avoid warnings from picky compilers about redefinition of PARAMS.
4990
8dd76bee
PE
49912003-06-17 Paul Eggert <eggert@twinsun.com>
4992
4993 Version 1.875b.
4994
4995 * NEWS: Document 1.875b.
4996
4997 * lib/bbitset.h: Do not include config.h; that's the includer's job.
4998 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
4999 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
5000 Don't use 'index' in comments, as it's a builtin fn on some hosts.
5001 * lib/bitset_stats.c: Include gettext.h unconditionally, as
5002 per recent gettext manual's suggestion.
5003 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
5004 Use prototypes, not old-style definitions.
5005 * lib/lbitset.c (lbitset_unused_clear): Likewise.
5006 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
5007 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
5008 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
5009 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
5010 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
5011 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
5012 vbitset_or_and_cmp, vbitset_copy): Likewise.
5013
5014 * lib/libiberty.h: Do not include config.h; that's the includer's job.
5015 Do not include <stdlib.h>.
5016 (PARAMS): Define unconditionally for C89.
5017 (ATTRIBUTE_NORETURN): Remove.
5018 (ATTRIBUTE_UNUSED): Define unconditionally.
5019
5020 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 5021 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
5022 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
5023 * lib/vbitset.c, lib/vbitset.h: New files.
5024 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5025 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
5026 from libbitset.
5027
5028 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
5029 `How Can I Reset @code{yyparse}', since texinfo does not allow
5030 arbitrary @ in node names.
5031
5032 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
5033 shouldn't be needed according to the gettext 0.12.1 documentation
5034 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 5035 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 5036 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 5037 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 5038
8dd76bee
PE
5039 * lib/.cvsignore: Add stdbool.h.
5040 * m4/.cvsignore: Add nls.m4, po.m4.
5041
5042 Upgrade to CVS gnulib.
5043 * stdbool_.h: File renamed from stdbool.h.in.
5044 * configure.ac (AM_STDBOOL_H): Invoke this instead of
5045 AC_HEADER_STDBOOL.
5046 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
5047 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
5048 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
5049 (MOSTLYCLEANFILES): New var.
5050 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
5051 (stdbool.h): New rule.
5052 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
5053 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
5054 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
5055 m4/quote.m4: Upgrade to today's gnulib.
5056
5057 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
5058 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
5059 the tests right now.
5060 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
5061 yyerror are declared before use; C99 requires this.
5062
25005f6a
PH
50632003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5064
5065 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
5066 first.
5067 (yyrecoverSyntaxError): Correct the logic for setting and testing
5068 yyerrState.
5069 Correct comment on handling EOF.
5070 Allow states with only a default reduction, rather than failing
8dd76bee 5071 (I can't quite reconstruct why these were not allowed before).
25005f6a 5072
137437c6 5073 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 5074 buffer overruns, corrupting state.
8dd76bee
PE
5075
5076 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
5077 definition.
5078 * src/reader.h (max_left_semantic_context): New variable declaration.
5079 * src/scan-gram.l (max_left_semantic_context): Define.
5080 (handle_action_dollar): Update max_left_semantic_context.
5081 * data/glr.c (YYMAXLEFT): New definition.
5082 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
5083 (yyresolveAction): Ditto.
5084
5085 Fixes to problems with location handling in GLR parsers reported by
5086 Frank Heckenbach (2003/06/05).
5087
5088 * data/glr.c (YYLTYPE): Make trivial if locations not used.
5089 (YYRHSLOC): Add parentheses, and define only if locations used.
5090 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
5091 locations not used.
5092 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
5093 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 5094
25005f6a
PH
5095 * tests/cxx-type.at: Exercise location information; update tests
5096 to differentiate output with and without locations.
8dd76bee 5097 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
5098 because default YYLTYPE not yet defined.
5099 Change semantic actions to compute strings, rather than printing
5100 them directly (to test proper passing of semantics values). Change
5101 output to prefix notation and update test data and expected results.
5102 (yylex): Track locations.
5103 (stmtMerge): Return value rather than printing, and include arguments
5104 in value.
8dd76bee 5105
711f40b7
PE
51062003-06-03 Paul Eggert <eggert@twinsun.com>
5107
5108 Avoid warnings generated by GCC 2.95.4 when Bison is
5109 configured with --enable-gcc-warnings.
5110 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
5111 yy::]b4_parser_class_name[::translate_,
5112 yy::Stack::operator[] (unsigned),
5113 yy::Stack::operator[] (unsigned) const,
5114 yy::Slice::operator[] (unsigned),
5115 yy::Slice::operator[] (unsigned) const):
5116 Rename local vars to avoid warnings.
5117 * tests/glr-regression.at (Improper handling of embedded actions
5118 and $-N in GLR parsers): Remove unused local variable from yylex.
5119 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
5120 (void) as arg when not pure, since we now assume C89 when building
5121 Bison. Pacify GCC by using parameter.
5122
ac695f7d
PE
51232003-06-02 Paul Eggert <eggert@twinsun.com>
5124
5125 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
5126 yy::Location::lines, yy::Location::columns): Rename arguments
5127 to avoid shadowing; this removes a warning generated by GCC 3.3.
5128
26ec81e0
PE
51292003-06-01 Paul Eggert <eggert@twinsun.com>
5130
5131 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
5132 to g++, as GCC 3.3 complains if you do it.
5133 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
5134 everything that WARNING_CFLAGS has, except omit warnings
5135 not suitable for C++.
5136 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
5137 * tests/atlocal.in (CXXFLAGS): New var.
5138 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
5139
5140 Fix a GLR parser bug I reported in February; see
161a71f3 5141 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
5142 The problem was that GLR parsers did not conform to the C standard,
5143 because actions like { $1 = $2 + $3; } expanded to expressions
5144 that invoked YYFILL in separate subexpressions, and YYFILL assigned
5145 to a local variable. The C standard says that expressions
5146 like (var = f ()) + (var = f ()) have undefined behavior.
5147 Another problem was that GCC sometimes issues warnings that
5148 yyfill and its parameters are unused.
5149
5150 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
5151 as possibly unused.
5152 (yyfill): New function.
5153 (YYFILL): Use it.
5154 (yyuserAction): Change type of yynormal to bool, so that it matches
5155 the new yyfill signature. Mark it as possibly unused.
5156
5157
5158 Follow up on a bug I reported in February, where a Bison-generated
5159 parser can loop. Provide a test case and a fix for yacc.c. I
5160 don't have a fix for lalr1.cc or for glr.c, unfortunately.
5161 The original bug report is in:
161a71f3 5162 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
5163
5164 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
5165 macro's size was becoming unwieldy.
5166 (yyerrlab): Do not discard an empty lookahead symbol, as this
5167 might destroy garbage.
5168 (yyerrorlab): New label, with the old contents of YYERROR,
5169 plus the following change: pop the stack of rhs corresponding
5170 to the production that invoked YYERROR. That is how Yacc
5171 behaves, and POSIX requires this behavior.
5172 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
5173 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
5174 Define 'alarm' to do nothing if unistd.h is not available.
5175 Add a new rule "exp: '-' error;" to test the above change to
5176 data/yacc.c. Use 'alarm' to abort any test taking longer than
5177 10 seconds, as it's probably looping.
5178 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
5179 Also, the new yacc.c generates two fewer diagnostics for an
5180 existing test.
5181
d0829076
PE
51822003-05-24 Paul Eggert <eggert@twinsun.com>
5183
c6ae27df
PE
5184 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
5185 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
5186 This fixes a problem reported by John Bowman when the Compaq/HP
5187 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
5188 -ansi -Wall -gall).
5189 * data/yacc.c (union yyalloc): Likewise.
5190 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 5191
d0829076
PE
5192 Switch from 'int' to 'bool' where that makes sense.
5193
5194 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
5195 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
5196 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
5197 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
5198 Return or accept bool, not int. All callers changed.
5199 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
5200 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
5201 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
5202 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
5203 bitset_or_and_cmp_): Likewise.
5204 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
5205 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
5206 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
5207 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
5208 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
5209 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
5210 bitset_stats_or_and_cmp): Likewise.
5211 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
5212 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
5213 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
5214 ebitset_xor_cmp): Likewise.
5215 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
5216 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
5217 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
5218 lbitset_xor_cmp): Likewise.
5219 * lib/bbitset.h: Include <stdbool.h>.
5220 (struct bitset_vtable): The following members now return bool, not
5221 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
5222 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
5223 or_and_cmp).
5224 * src/conflicts.c (count_rr_conflicts): Likewise.
5225 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
5226 All uses changed.
5227 * lib/ebitset.c (ebitset_obstack_init): Likewise.
5228 * lib/lbitset.c (lbitset_obstack_init): Likewise.
5229 * src/getargs.c (debug_flag, defines_flag, locations_flag,
5230 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5231 graph_flag): Likewise.
5232 * src/getargs.h (debug_flag, defines_flag, locations_flag,
5233 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5234 graph_flag): Likewise.
5235 * src/output.c (error_verbose): Likewise.
5236 * src/output.h (error_verbose): Likewise.
5237 * src/reader.c (start_flag, typed): Likewise.
5238 * src/reader.h (typed): Likewise.
5239 * src/getargs.c (LOCATIONS_OPTION): New constant.
5240 (long_options, getargs): Use it.
5241 * src/lalr.c (build_relations): Use bool, not int.
5242 * src/nullable.c (nullable_compute): Likewise.
5243 * src/print.c (print_reductions): Likewise.
5244 * src/tables.c (action_row, pack_vector): Likewise.
5245 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
5246 * src/output.c (prepare): Use it.
5247 * src/output.c (token_definitions_output,
5248 symbol_destructors_output, symbol_destructors_output): Use string,
5249 not boolean integer, to keep track of whether to output separator.
5250 * src/print_graph.c (print_core): Likewise.
5251 * src/state.c (state_rule_lookaheads_print): Likewise.
5252
5253 * config/install-sh: Sync from automake 1.7.5.
5254
6b2584b7
PE
52552003-05-14 Paul Eggert <eggert@twinsun.com>
5256
5257 * src/parse-gram.y (rules_or_grammar_declaration): Require a
5258 semicolon after a grammar declaration, in the interest of possible
5259 future changes to the Bison input language.
5260 Do not allow a stray semicolon at the start of the grammar.
5261 (rhses.1): Allow one or more semicolons after any rule, including
5262 just before "|" as required by POSIX.
5263 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
5264 grammar.
5265
caf37a36
ADL
52662003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
5267
5268 %parse-param support for lalr1.cc.
5269
5270 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
5271 b4_cc_constructor_calls, b4_cc_constructor_call,
5272 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
5273 definitions.
5274 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
5275 parse-param arguments.
5276 (yy::b4_parser_class_name): Declare instance variables to
5277 hold parse-param arguments.
5278 * tests/calc.at: s/value/semantic_value/ because value clashes
5279 with a member of yy::b4_parser_class_name. Adjust C++ code
5280 to handle %parse-param. Enable %parse-param test in C++.
5281
3ab37077
PE
52822003-05-12 Paul Eggert <eggert@twinsun.com>
5283
5284 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
5285 English a bit. Fix fclose typo. Change "const char" to "char
5286 const", and use ANSI C rather than K&R for "main". Suggest
5287 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
5288 and suggest yy_switch_to_buffer.
5289
52902003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
5291
5292 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
5293 C89. This avoids a diagnostic on compilers that define __STDC__
5294 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 5295 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 5296
e743727f
PE
52972003-05-03 Paul Eggert <eggert@twinsun.com>
5298
5299 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5300 Do not overrun array bounds.
5301 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 5302 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 5303
916708d5
AD
53042003-04-29 Akim Demaille <akim@epita.fr>
5305
5306 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5307 * src/getargs.c, src/getargs.h: here, as bool, not int.
5308 (nondeterministic_parser): New.
5309 * src/parse-gram.y, src/scan-gram.l: Support
5310 %nondeterministic-parser.
5311 * src/output.c (prepare): Use nondeterministic_parser instead
5312 of glr_parser where appropriate.
5313 * src/tables.c (conflict_row, action_row, save_row)
5314 (token_actions, token_actions, pack_vector): Ditto.
5315
a06ea4aa
AD
53162003-04-29 Akim Demaille <akim@epita.fr>
5317
5318 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5319
211074ca
AD
53202003-04-29 Akim Demaille <akim@epita.fr>
5321
5322 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5323 with %pure-parser and %locations to exercise the patch from Yakov
5324 Markovitch below.
5325
6175ffe3
PE
53262003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5327
5328 * data/yacc.c: (b4_lex_param): Corrected for the case where
5329 %lex-param is provided and %pure-parser isn't.
5330
b1e95857
PE
53312003-04-27 Paul Eggert <eggert@twinsun.com>
5332
5333 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 5334 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
5335 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5336 if it is not defined.
5337 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5338
acda9df6
PE
53392003-04-26 Paul Eggert <eggert@twinsun.com>
5340
3470c57b
PE
5341 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5342 Declare to be of type suitable for the ninf value itself, not of
5343 type suitable for the corresponding table, since the latter might
5344 be unsigned but the ninf value might be negative. This fixes a
5345 bug reported by Alexandre Duret-Lutz in
161a71f3 5346 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 5347
acda9df6
PE
5348 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5349 invokes it. We shouldn't invoke it twice because it will attempt
5350 to put error.o in the archive twice. This fixes a glitch reported
5351 by Martin Mokrejs in
161a71f3 5352 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 5353
b5250f26
PE
53542003-04-21 Paul Eggert <eggert@twinsun.com>
5355
5356 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5357 to gnulib.
5358
089ac0f1
PE
53592003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5360
5361 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5362 Fix obvious typo that results in uncompilable GLR parsers
5363 when both %pure-parser and %locations are used. (trivial change)
5364
5ededac6
PE
53652003-04-17 Paul Eggert <eggert@twinsun.com>
5366
1b8f2fff
PE
5367 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
5368 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
5369 Do not insert the expected token via unput, as this runs afoul
5370 of a POSIX-compatibility bug in flex 2.5.31.
5371 All uses changed to BEGIN the parent state,
5372 since we no longer insert the expected token via unput.
5373 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
5374 that is no longer emitted after the above change.
5375
5ededac6
PE
5376 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
5377 the first one. This change is from Paul Hilfinger, and it fixes
5378 regression reported by Werner Lemberg in
161a71f3 5379 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
5380
5381 (resolve_sr_conflict): Don't invoke state_errs_set
5382 unless one or more tokens have been explicitly made errors.
5383 Otherwise, the above change causes Bison to abort.
5384
5385 * tests/existing.at (GNU pic Grammar): New test case, taken from
5386 Lemberg's email.
5387
b8be9132
AD
53882003-03-31 Akim Demaille <akim@epita.fr>
5389
5390 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
5391
d423d460
AD
53922003-03-31 Akim Demaille <akim@epita.fr>
5393
5394 * src/output.c (prepare_symbols): Avoid trailing spaces in the
5395 output.
5396
c7e441b4
AD
53972003-03-31 Akim Demaille <akim@epita.fr>
5398
5399 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
5400 From Paul Hilfinger.
5401
231897ad
AD
54022003-03-29 Akim Demaille <akim@epita.fr>
5403
5404 * m4/error.m4: Do not put under dynamic conditions some code which
5405 expansion is under static control.
5406
5b066063
AD
54072003-03-29 Akim Demaille <akim@epita.fr>
5408
5409 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
5410
22a74fec
AD
54112003-03-29 Akim Demaille <akim@epita.fr>
5412
5413 * doc/bison.texinfo (Strings are Destroyed): New.
5414
0eee27e7
PE
54152003-03-13 Paul Eggert <eggert@twinsun.com>
5416
5417 * .cvsignore: Add configure.lineno.
5418 * src/.cvsignore: Add yacc.
5419 * tests/.cvsignore: Add testsuite.log.
5420 * doc/fdl.texi: Sync with latest FSF version.
5421
f61aad93
PE
54222003-03-12 Paul Eggert <eggert@twinsun.com>
5423
537636c7
PE
5424 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
5425 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
5426 cursor, instead of leaving it undefined. This fixes a bug
5427 reported by Tim Van Holder in
161a71f3 5428 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
5429 * tests/input.at (Torturing the Scanner): Test the scanner on
5430 an empty input file, which was Tim Van Holder's test case.
5431
5432 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
5433 <sys/resource.h> can be included, include sys/time.h and
5434 sys/times.h first, if available. This works around the SunOS
5435 4.1.4 porting bug reported by Bruce Becker in
161a71f3 5436 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
5437
5438 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
5439 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
5440 AC_HEADER_SYS_WAIT.
5441
f61aad93
PE
5442 Merge changes from gnulib. This was prompted because the CVS
5443 snapshot didn't build on Solaris 7 due to strnlen problems.
5444
5445 These changes need to be merged back into gnulib:
5446 * lib/hash.c: Include <stdbool.h> unconditionally.
5447 * m4/onceonly.m4 (m4_quote): New macro.
5448 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
5449 Quote AC_FOREACH variable-expansions properly.
5450 The 2003-01-03 obstack.h change also needs merging.
5451 {end of changes requiring merging}
5b066063 5452
f61aad93
PE
5453 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5454 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
5455 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
5456 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
5457 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
5458 New files, imported from gnulib.
5459 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
5460 above.
5461
5462 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
5463 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
5464 gnulib sources.
5465
5466 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
5467 Add.
5468 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
5469 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
5470 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
5471 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
5472 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
5473 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
5474 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
5475 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
5476 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
5477 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
5478 (jm_PREREQ_ARGMATCH): Remove.
5479 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
5480 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
5481
5482 * src/system.h: Include <stdbool.h> unconditionally.
5483
5484 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
5485 assuming at least C89 in the bitset code for some time now.
5486
d2ffe116
AD
54872003-03-03 Akim Demaille <akim@epita.fr>
5488
5489 * ro.po: New.
5490
052826fd
AD
54912003-03-02 Akim Demaille <akim@epita.fr>
5492
5493 * doc/bison.texinfo (Table of Symbols): Reactivate the
5494 documentation for %lex-param, and %parse-param.
5495
c4749565
AD
54962003-03-02 Akim Demaille <akim@epita.fr>
5497
5498 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
5499 generate verbose error messages.
5500 Use the number of tokens as an upper bound in yytname, as it
5501 cannot be a non terminal.
5502
d5286af1
AD
55032003-03-02 Akim Demaille <akim@epita.fr>
5504
5505 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
5506 message.
5507
22e304a6
AD
55082003-03-02 Akim Demaille <akim@epita.fr>
5509
22e304a6
AD
5510 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
5511 Use them to exercise yycheck overrun.
5512 Based on Andrew Suffield's grammar.
5513
67a25fed
AD
55142003-03-02 Akim Demaille <akim@epita.fr>
5515
5516 Create tests/local.at for Bison generic testing macros.
5517
5518 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
5519 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5520 This new file.
5521 * tests/calc.at (AT_CHECK_CALC): Adjust.
5522 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
5523 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
5524 * tests/local.at: here.
5525 (AT_COMPILE_CXX): Tags the tests using it as c++.
5526 Ignore the test if CXX is not functional.
5527
9c2b381f
PE
55282003-03-01 Paul Eggert <eggert@twinsun.com>
5529
5530 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5531 not loc->end, since loc->end might contain garbage and this leads
5532 to undefined behavior on some platforms.
5533 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5534 depend on *loc, so that the reader doesn't give the the false
5535 impression that *loc is initialized.
5536 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5537 does not survive the return.
5538
0433ba88
AD
55392003-03-01 Akim Demaille <akim@epita.fr>
5540
5541 * src/scan-gram.l (code_start): Always initialize it when entering
5542 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5543 yylex invocation. An alternative would be making it static, but
5544 then it starts with the second %%'s beginning, instead of its end.
5545
b305ea69
PE
55462003-02-28 Paul Eggert <eggert@twinsun.com>
5547
5548 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5549 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 5550 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 5551
c3d25e01
PE
55522003-02-26 Paul Eggert <eggert@twinsun.com>
5553
5554 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5555 Remove Sequent/Pyramid discussion (nobody uses them any more).
5556 Merge VMS and MS-DOS discussion; these ports may well be dead
5557 but let's keep mentioning them for now. Put <> around email
5558 addresses. Add copyright notice.
5559
c267ffbc
PE
55602003-02-24 Paul Eggert <eggert@twinsun.com>
5561
5562 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5563 to avoid collision with flex use of yylineno.
5564 Problem reported by Bruce Lilly in
161a71f3 5565 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
5566 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5567 * data/yacc.c (yy_reduce_print): Likewise.
5568
5569 * config/depcomp: Sync with Automake 1.7.3.
5570
f939fc12
AD
55712003-02-21 Akim Demaille <akim@epita.fr>
5572
5573 * data/lalr1.cc: Use temporary variables instead of casts to
5574 change integer types.
5575 Suggested by Paul Eggert.
5576
95923bd6
AD
55772003-02-21 Akim Demaille <akim@epita.fr>
5578
5579 * doc/bison.texinfo: Use "location" consistently to refer to @n,
5580 to avoid confusions with lalr1.cc's notion of Position.
5581 Suggested by Paul Eggert.
5582
2cdc240e
AD
55832003-02-20 Akim Demaille <akim@epita.fr>
5584
5585 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
5586 before initial_columns.
5587 (location.hh): Use consistent variable names when defining the
5588 operator<<.
5589 Use "last" so that we subtract from Positions, not from unsigned.
5590
5d003116
AD
55912003-02-20 Akim Demaille <akim@epita.fr>
5592
5593 * data/lalr1.cc (position.hh): New subfile, including the extended
5594 and Doxygen'ed documentation of class Position.
5595 (location.hh): Use it.
5596 Document a` la Doxygen.
ba1ecc07 5597 With the help of Benoit Perrot.
5d003116 5598
d02b25f9
AD
55992003-02-20 Akim Demaille <akim@epita.fr>
5600
5601 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
5602 AT_YACC_IF.
5603 Redefine AT_YYERROR_SEES_LOC_IF using it.
5604 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
5605 not defined.
5606 Don't use the location in yy::Parser::error_ and
5607 yy::Parser::print_ when not %locations.
5608 Activate more lalr1.cc tests.
5609
0d1c3a04
AD
56102003-02-19 Akim Demaille <akim@epita.fr>
5611
5612 * data/lalr1.cc: When displaying a line number, be sure to make it
5613 an int.
5614
60a777aa
AD
56152003-02-19 Akim Demaille <akim@epita.fr>
5616
5617 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
5618 Remove, useless.
5619 (YYABORT, YYACCEPT, YYERROR): New.
5620 * tests/calc.at: Renable the lalr1.cc test.
5621
0b86fc41
AD
56222003-02-19 Akim Demaille <akim@epita.fr>
5623
5624 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
5625 error recovery, mixing with/without pops and discarding of the
5626 lookahead.
5627 Exercise YYERROR.
5628 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
5629
da99a5dc
PE
56302003-02-17 Paul Eggert <eggert@twinsun.com>
5631
5632 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
5633 * tests/testsuite.at (AT_COMPILE): Use them.
5634 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 5635 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 5636
93b8c255
PE
56372003-02-12 Paul Eggert <eggert@twinsun.com>
5638
5639 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
5640 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 5641 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
5642 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
5643 Check for malloc failure, for consistency with yacc.c.
5644 (yytname_size): Remove, for consistency with yacc.c.
5645
5646 The bug still remains in data/lalr1.cc, as I didn't have time
5647 to fix it there.
5648
7548fed2
AD
56492003-02-06 Akim Demaille <akim@epita.fr>
5650
5651 * configure.ac (GXX): Rename as...
5652 (CXX): this, to keep the original Autoconf semantics.
5653 Require 2.57.
5654 * data/lalr1.cc: Fix b4_copyright invocations.
5655 If YYDEBUG is not defined, don't depend upon name_ being defined.
5656 (location.hh): Include string and iostream.
5657 (Position::filename): New member.
5658 (Position::Position ()): New.
5659 (operator<< (Position)): New.
5660 (operator- (Position, int)): New.
5661 (Location::first, Location::last): Rename as...
5662 (Location::begin, Location::end): these, to mock the conventional
5663 iterator names.
5664 (operator<< (Location)): New.
5665 * tests/atlocal.in (CXX): New.
5666 * tests/testsuite.at (AT_COMPILE_CXX): New.
5667 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
5668 locations in a more synthetic way.
5669 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
5670 lalr1.cc is used.
5671 Adjust the C locations to match those from Emacs: first column is
5672 column 0.
5673 Change all the expected results.
5674 Conform to the GCS: simplify the locations when applicable.
5675 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
5676 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
5677 these CPP macros with the m4 macros new defined by...
5678 (AT_CHECK_PUSHDEFS): this, i.e.:
5679 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 5680 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
5681 New macros.
5682 (AT_CHECK_POPDEFS): Undefine them.
5683 (AT_CHECK_CALC_LALR1_CC): New.
5684 Use it for the first lalr1.cc test.
5685
43a176ef
AD
56862003-02-04 Akim Demaille <akim@epita.fr>
5687
5688 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
5689 Location as is defined.
5690
fc049e9c
AD
56912003-02-04 Akim Demaille <akim@epita.fr>
5692
5693 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
5694 name_ being defined.
5695
a737b216
PE
56962003-02-03 Paul Eggert <eggert@twinsun.com>
5697
5698 * src/gram.h (start_symbol): Remove unused decl.
5699
5700 Use more-consistent naming conventions for local vars.
5701
5702 * src/derives.c (derives_compute): Change type of local var from
5703 int to rule_number.
5704 * src/gram.c (grammar_rules_partial_print): Likewise.
5705 * src/print.c (print_core): Likewise.
5706 * src/reduce.c (reduce_grammar_tables): Likewise.
5707
5708 * src/gram.c (grammar_dump): Change name of item_number *
5709 local var from r to rp.
5710 * src/nullable.c (nullable_compute): Likewise.
5711
5712 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
5713
5714 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
5715 for symbol or symbol_number var.
5716 * src/reader.c (grammar_start_symbol_set): Likewise.
5717 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
5718 Likewise.
5719 * src/state.c (transitions_to): Likewise.
5720 * src/state.h: Likewise.
5721 * src/tables.c (symbol_number_to_vector_number): Likewise.
5722
5723 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
5724 char * var.
5725
5726 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
5727 var.
5728
5729 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
5730 var.
5731
5732 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
5733 Use str, not s, for char * var. Use ch, not c, for character var.
5734 Use size for size var.
5735
5736 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
5737 char * var.
5738 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
5739 uniqstr var.
5740 * src/uniqstr.h: Likewise.
5741
5742 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
5743 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
5744 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
5745 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
5746 param to have same name as that of enum, so that we don't use
5747 "s" to stand for a non-state.
5748
68e93ad5
AD
57492003-02-02 Akim Demaille <akim@epita.fr>
5750
5751 * src/scan-skel.l: Scan more than one inert character per yylex
5752 invocation.
5753
92898986
PE
57542003-02-01 Paul Eggert <eggert@twinsun.com>
5755
5756 Version 1.875a.
5757
1d9d5d71
PE
5758 * po/LINGUAS: Add ms.
5759
0435d061
AD
57602003-01-30 Akim Demaille <akim@epita.fr>
5761
5762 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
5763
6029a57f
PH
57642003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5765
5766 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
5767 of $1.
0435d061
AD
5768
5769 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 5770 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 5771 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 5772
6029a57f
PH
5773 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
5774 (b4_rhs_location): Ditto.
0435d061 5775 (yyfill): New function to copy from stack tree into array
6029a57f 5776 incrementally.
0435d061
AD
5777 (yyuserAction): Modify to allow incremental move of semantic values
5778 to rhs array when in GLR mode.
5779 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
5780 as needed.
5781 Remove dummy use of yystack, as there is now a guaranteed use.
5782 (yydoAction): Modify to allow incremental move of semantic values
5783 to rhs array when in GLR mode.
5784 (yyresolveAction): Ditto.
5785 (yyglrShiftDefer): Update comment.
0435d061 5786 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
5787 (yyglrReduce): Ditto.
5788 (yydoAction): Ditto
0435d061 5789
6029a57f
PH
5790 * tests/glr-regr1.at: Rename to ...
5791 * tests/glr-regression.at: Add new regression test for the problems
5792 described above (adapted from S. Eken).
5793 Update copyright notice.
5794 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
5795 * tests/Makefile.am: Ditto.
5796
6cee6297
PE
57972003-01-28 Paul Eggert <eggert@twinsun.com>
5798
5799 * data/lalr1.cc: Do not use @output_header_name@ unless
5800 b4_defines_flag is set. This fixes two bugs reported by
5801 Tim Van Holder in
161a71f3
PE
5802 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
5803 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 5804
b2a836b5
PE
58052003-01-21 Paul Eggert <eggert@twinsun.com>
5806
5807 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
5808 we don't need to worry about yyerrlab1 being reported as an
5809 "unused label" by non-GCC C compilers. The downside is that if
5810 locations are used then a couple of statements are duplicated each
5811 time YYERROR is invoked, but the upside is that the warnings
5812 should vanish.
5813 (yyerrlab1): Move code to YERROR.
5814 (yyerrlab2): Remove. Change uses back to yyerrlab1.
5815 This reverts some of the 2002-12-27 change.
5816
4196b931
PE
58172003-01-17 Paul Eggert <eggert@twinsun.com>
5818
5819 * src/output.c (symbol_printers_output): Fix typo that led
5820 to core dump. Problem reported by Antonio Rus in
161a71f3 5821 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 5822
3ae831b4
AD
58232003-01-13 Akim Demaille <akim@epita.fr>,
5824 Quoc Peyrot <chojin@lrde.epita.fr>,
5825 Robert Anisko <anisko_r@lrde.epita.fr>
5826
5827 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
5828 when the stacks contain one element, as the loop would otherwise
5829 free the last state, and then use the top state (the one we just
5830 popped). This means that the initial elements will not be freed
5831 explicitly, as is the case in yacc.c; it is not a problem, as
5832 these elements have fake values.
5833
e3aa65c5
PE
58342003-01-11 Paul Eggert <eggert@twinsun.com>
5835
5836 * NEWS: %expect-violations are now just warnings, reverting
5837 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
5838 bootstrapping problem reported by Matthias Klose; see
161a71f3 5839 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
5840 * src/conflicts.c (conflicts_print): Likewise.
5841 * tests/conflicts.at (%expect not enough, %expect too much,
5842 %expect with reduce conflicts): Likewise.
5843 * doc/bison.texinfo (Expect Decl): Document this. Also mention
5844 that the warning is enabled if the number of conflicts changes
5845 (not necessarily increases).
5846
5847 * src/getargs.c (version): Update copyright year.
5848
f0057011
AD
58492003-01-09 Akim Demaille <akim@epita.fr>
5850
5851 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
5852
1ee6d2a0
PE
58532003-01-08 Paul Eggert <eggert@twinsun.com>
5854
5855 * Makefile.maint (WGETFLAGS):
5856 New macro, containing "-C off" to disable proxy caches.
5857 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
5858 (rel-check): Use $(WGET) instead of wget.
5859
d4fd77c4
PE
58602003-01-06 Paul Eggert <eggert@twinsun.com>
5861
5862 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
5863 the GLR paper of Scott, Johnstone and Hussain.
5864
464c6927
PE
58652003-01-04 Paul Eggert <eggert@twinsun.com>
5866
d600ee67
PE
5867 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
5868 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
5869 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
5870 (EXTRA_LIBRARIES): New var, for liby.a.
5871 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
5872 (EXTRA_SCRIPTS): New var, for yacc.
5873
464c6927
PE
5874 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
5875 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
5876 Problem reported by Nelson H. F. Beebe.
5877
58782003-01-03 Paul Eggert <eggert@twinsun.com>
5879
5880 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
5881 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
5882 when compiling Bison 1.875's `bitset bset = obstack_alloc
5883 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
5884
5885 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
5886 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
5887 grow to a huge size with typical invocation.
d600ee67 5888
464c6927
PE
5889 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
5890 Use the pattern recommended by Autoconf 2.57, except also protect
5891 against double-definition.
5892 * src/system.h: Likewise.
5893 Portability issues reported by Nelson H. F. Beebe.
d600ee67 5894
464c6927
PE
5895 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
5896 All uses changed. Provide a definition in both C and C++.
5897 (yytrue, yyfalse): Define even if defined (__cplusplus).
5898
5899 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
5900 Reported by Nelson H. F. Beebe.
d600ee67 5901
464c6927
PE
5902 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
5903
0f42c7d5
PE
59042003-01-02 Paul Eggert <eggert@twinsun.com>
5905
5906 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
5907 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
5908 Bug reported by Nelson H. F. Beebe.
5909
dc546b0f
PE
59102003-01-01 Paul Eggert <eggert@twinsun.com>
5911
5912 * Version 1.875.
5913
2c09b6a7
PE
59142002-12-30 Paul Eggert <eggert@twinsun.com>
5915
5916 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
5917 Moved here from...
5918 (<INITIAL>","): Here. This causes stray "," to be treated
5919 more uniformly.
5920
dc546b0f 5921 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
5922 last brace in braced code when not in Yacc mode, for compatibility
5923 with Bison 1.35. This resurrects the 2001-12-15 patch to
5924 src/reader.c.
5925
5926 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
5927 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
5928
535c0f63
PE
59292002-12-28 Paul Eggert <eggert@twinsun.com>
5930
5931 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
5932 that of SYM's type. This fixes Debian bug 168069, reported by
5933 Thomas Olsson.
d600ee67 5934
963fcc17
PE
59352002-12-28 Paul Eggert <eggert@twinsun.com>
5936
5937 Version 1.75f.
5938
5939 Switch back to the Yacc style of conflict reports, undoing some
5940 of the 2002-07-30 change.
5941 * doc/bison.texinfo (Understanding): Use Yacc style for
5942 conflict reports. Also, use new way of locating rules.
5943 * src/conflicts.c (conflict_report):
5944 Renamed from conflict_report_yacc, removing the old
5945 'conflict_report'. Translate the entire conflict report at once,
5946 so that we don't assume that "," has the same interpretation in
5947 all languages.
5948 (conflicts_output): Use Yacc-style conflict report for each state,
5949 instead of our more-complicated style.
5950 (conflicts_print): Use Yacc-style conflict report, except print
5951 the input file name when not emulating Yacc.
5952 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
5953 Conflicted Reduction, %expect not enough, %expect too much,
5954 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
5955 * tests/existing.at (GNU Cim Grammar): Likewise.
5956 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
5957
5958 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
5959 fatal): Don't invoke fflush; it's not needed and it might even be
5960 harmful for stdout, as stdout might not be open.
5961 * src/reduce.c (reduce_print): Likewise.
5962
b1efe548
PE
59632002-12-27 Paul Eggert <eggert@twinsun.com>
5964
5965 Fix a bug where error locations were not being recorded correctly.
5966 This problem was originally reported by Paul Hilfinger in
161a71f3 5967 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
5968
5969 * data/yacc.c (yyparse): New local var yylerrsp, to record the
5970 top of the location stack's error locations.
5971 (yyerrlab): Set it. When discarding a token, push its location
5972 onto yylerrsp so that we don't lose track of the error's end.
5973 (yyerrlab1): Now is only the target of YYERROR, so that we can
5974 properly record the location of the action that failed. For GCC
5975 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
5976 GCC warning about yyerrlab1 being unused if YYERROR is unused.
5977 (yyerrlab2): New label, which yyerrlab now falls through to.
5978 Compute the error's location by applying YYLLOC_DEFAULT to
5979 the locations of all the symbols that went into the error.
5980 * doc/bison.texinfo (Location Default Action): Mention that
5981 YYLLOC_DEFAULT is also invoked for syntax errors.
5982 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5983 Error locations include the locations of all the tokens that were
5984 discarded, not just the last token.
d600ee67 5985
983c5c2c
PE
59862002-12-26 Paul Eggert <eggert@twinsun.com>
5987
b1efe548
PE
5988 * src/files.c: Include quote.h.
5989 (compute_output_file_names): Warn if we detect conflicting
5990 outputs to the same file. This should catch the misunderstanding
5991 exemplified by Debian Bug 165349, reported by Bruce Stephens..
5992
5993 * src/conflicts.c (conflicts_print): If the user specifies
5994 "%expect N", report an error if there are any reduce/reduce
5995 conflicts. This is what the manual says should happen.
5996 This fixes Debian bug 130890, reported by Anthony DeRobertis.
5997 * tests/conflicts.at (%expect with reduce conflicts): New test.
5998
983c5c2c
PE
5999 Don't use m4_include on relative file names, as it doesn't work as
6000 desired if there happens to be a file with that name under ".".
d600ee67 6001
983c5c2c
PE
6002 * m4sugar/version.m4: Remove; it was included but it wasn't used.
6003 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
6004 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
6005 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
6006 * src/output.c (output_skeleton): Use full path names when
6007 specifying a file to include; don't rely on include path, as
6008 it's unreliable when the working file contains a file with
6009 that name.
d600ee67 6010
983c5c2c
PE
60112002-12-25 Paul Eggert <eggert@twinsun.com>
6012
6013 Remove obsolete references to bison.simple and bison.hairy.
6014 Problem mentioned by Aubin Mahe in
161a71f3 6015 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
6016 * data/glr.c: Comment fix.
6017 * doc/bison.1: Remove references. Also, mention "yacc".
6018
6019 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
6020 with -g option.
6021
6022 * src/parse-gram.y (declaration): Use enum "report_states" rather
6023 than its numeric value 1.
6024
6025 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
6026 opening a new one. This fixes Debian bug 165349, reported by
6027 Bruce Stephens.
6028
23f2d9dc
PE
60292002-12-24 Paul Eggert <eggert@twinsun.com>
6030
6031 Version 1.75e.
6032
6033 * Makefile.maint (cvs-update): Don't assume that the shell
6034 supports $(...), as Solaris sh doesn't.
6035
6036 * src/parse-gram.y (lloc_default): Remove test for empty
6037 nonterminals at the end, since it didn't change the result.
6038
60392002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
6040
6041 If the user does not define YYSTYPE as a macro, Bison now declares it
6042 using typedef instead of defining it as a macro. POSIX requires this.
6043 For consistency, YYLTYPE is also declared instead of defined.
6044
6045 %union directives can now have a tag before the `{', e.g., the
6046 directive `%union foo {...}' now generates the C code
6047 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
6048 The default union tag is `YYSTYPE', for compatibility with Solaris 9
6049 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
6050 instead of `yyltype'.
6051
6052 `yystype' and `yyltype' are now obsolescent macros instead of being
6053 typedefs or tags; they are no longer documented and will be
6054 withdrawn in a future release.
6055
6056 * data/glr.c (b4_location_type): Remove.
6057 (YYSTYPE): Renamed from yystype.
6058 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
6059 (struct YYLTYPE): Renamed from struct yyltype.
6060 (YYLTYPE): Renamed from yyltype.
6061 (yyltype, yystype): New (and obsolescent) macros,
6062 for backward compatibility.
6063 * data/yacc.c: Likewise.
6064
6065 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
6066 does not specify a union tag. This is for compatibility with
6067 Solaris 9 yacc.
6068
6069 * src/parse-gram.y (add_param): 2nd arg is now char * not char
6070 const *, since it is now modified by stripping surrounding { }.
6071 (current_braced_code): Remove.
6072 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
6073 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
6074 trailing " {...}". Now of type <chars>.
6075 (grammar_declaration): Adjust to bundled tokens.
6076 (code_content): Remove; stripping is now done by add_param.
6077 (print_token_value): Print contents of bundled tokens.
6078 (token_name): New function.
6079
6080 * src/reader.h (braced_code, current_braced_code): Remove.
6081 (token_name): New decl.
6082
6083 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
6084 token_type, not braced_code code_kind. All uses changed.
6085 (SC_PRE_CODE): New state, for scanning after a keyword that
6086 has (or usually has) an immediately-following braced code.
6087 (token_type): New local var, to keep track of which token type
6088 to return when scanning braced code.
6089 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 6090 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
6091 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
6092 instead of returning a token type immediately.
6093 (<INITIAL>"{"): Set token type.
6094 (<SC_BRACED_CODE>"}"): Use it.
6095 (handle_action_dollar, handle_action_at): Now returns bool
6096 indicating success. Fail if ! current_rule; this prevents a core dump.
6097 (handle_symbol_code_dollar, handle_symbol_code_at):
6098 Remove; merge body into caller.
6099 (handle_dollar, handle_at): Complain in invalid contexts.
6100
6101 * NEWS, doc/bison.texinfo: Document the above.
6102 * NEWS: Fix years and program names in copyright notice.
6103
879ca4f8
PE
61042002-12-17 Paul Eggert <eggert@twinsun.com>
6105
6106 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
6107 Reporting, Table of Symbols): Omit mentions of %lex-param and
6108 %parse-param from the documentation for now.
6109
1c5fe69d
PE
61102002-12-15 Paul Eggert <eggert@twinsun.com>
6111
6112 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
6113 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
6114 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
6115 disagreed with the Bison documentation. Bug
6116 reported by Andrew Walrond.
d600ee67 6117
1c5fe69d
PE
6118 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
6119 as the caller now does that.
6120 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
6121 (YYEMPTY): Parenthesize right hand side, since others use it.
6122 (yyparse): Don't assume that our generated code is the only code
6123 that sets yychar.
6124
d1de5372
PE
61252002-12-13 Paul Eggert <eggert@twinsun.com>
6126
6127 Version 1.75d.
6128
6129 POSIX requires a "yacc" command.
6130 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
6131 (MOSTLYCLEANFILES): Add yacc.
6132 (yacc): New rule.
1c5fe69d 6133 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
6134 as an alias for bison y.
6135
6136 * po/LINGUAS: Add da.
d600ee67 6137
d1de5372
PE
6138 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
6139 problem with latest <getopt.h>.
6140 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
6141
6142 * doc/fdl.texi: Upgrade to 1.2.
6143 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
6144 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
6145 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
6146 gnulib.
6147 * config/install-sh: Sync with autotools.
6148
6149 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 6150 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
6151 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
6152 locations are requested.
6153 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
6154 locations are requested.
6155
d0f3fe23
PE
61562002-12-12 Paul Eggert <eggert@twinsun.com>
6157
6158 Remove unportable casts and storage allocation tricks.
6159 While we're at it, remove almost all casts, since they
6160 usually aren't needed and are a sign of trouble.
6161
6162 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
6163
6164 * src/derives.c (derives_compute): Do not subtract NTOKENS from
6165 the pointer DSET returned by malloc; this isn't portable.
6166 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
6167 Similarly for DERIVES.
6168 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
6169 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
6170 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
6171
6172 * src/derives.c (derives_compute): Do not bother invoking
6173 int_of_rule_number, since rule numbers are integers.
6174
6175 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
6176 rather than XMALLOC (char, N).
6177
6178 * src/files.c (filename_split): Rewrite to avoid cast.
6179
6180 * src/gram.h (symbol_number_as_item_number,
6181 item_number_as_symbol_number, rule_number_as_item_number,
6182 item_number_as_rule_number):
6183 Now inline functions rather than macros, to avoid casts.
6184 * src/state.h (state_number_as_int): Likewise.
6185 * src/tables.c (state_number_to_vector_number,
6186 symbol_number_to_vector_number): Likewise.
6187
6188 * src/gram.h (int_of_rule_number): Remove; no longer used.
6189
6190 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
6191 since the resulting storage is always stored into.
6192
6193 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
6194 where it's needed.
6195
6196 * src/muscle_tab.c (muscle_m4_output):
6197 Now inline. Return bool, not int.
6198 * src/state.c (state_compare): Likewise.
6199 * src/symtab.c (symbol_check_defined,
6200 symbol_check_alias_consistency, symbol_pack, symbol_translation,
6201 hash_compare_symbol, hash_symbol):
6202 Likewise.
6203 * src/uniqstr.c (uniqstr_print): Likewise.
6204 * src/muscle_tab.c (muscle_m4_output_processor):
6205 New function, to avoid casts.
6206 * src/state.c (state_comparator, stage_hasher): Likewise.
6207 * src/symtab.c (symbol_check_defined_processor,
6208 symbol_check_alias_consistency_processor, symbol_pack_processor,
6209 symbol_translation_processor, hash_symbol_comparator,
6210 hash_symbol_hasher): Likewise.
6211 * src/uniqstr.c (uniqstr_print_processor): Likewise.
6212 * src/muscle_tab.c (muscles_m4_output):
6213 Use new functions instead of casting old functions unportably.
6214 * src/state.c (state_hash_new): Likewise.
6215 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
6216 symbols_token_translations_init):
6217 Likewise.
6218 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
6219
6220 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
6221 var instead of casting to long, to avoid casts.
6222 (prepare_states): Use MALLOC rather than alloca, so that we don't
6223 have to worry about alloca.
6224 * src/state.c (state_hash_lookup): Likewise.
6225
6226 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
6227 local var instead of casting to unsigned char, to avoid casts.
6228
6229 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
6230 STATE_ALLOC): Remove.
6231 (transitions_new, errs_new, reductions_new, state_new): Use malloc
6232 rather than calloc, and use offsetof to avoid allocating slightly
6233 too much storage.
6234 (state_new): Initialize all members.
6235
6236 * src/state.c (state_hash): Use unsigned accumulator, not signed.
6237
6238 * src/symtab.c (symbol_free): Remove; unused.
6239 (symbol_get): Remove cast in lhs of assignment.
6240 (symbols_do): Now static. Accept generic arguments, not
6241 hashing-related ones.
6242
6243 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
6244 (symbol_processor): Remove.
6245 (symbols_do): Remove decl; now static.
6246
6247 * src/system.h (alloca): Remove; decl no longer needed.
6248 (<stddef.h>): Include, for offsetof.
6249 (<inttypes.>, <stdint.h>): Include if available.
6250 (uintptr_t): New type, if system lacks it.
6251 (CALLOC, MALLOC, REALLOC): New macros.
6252 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
6253 new macros.
6254
6255 * src/tables.c (table_size): Now int, to pacify GCC.
6256 (table_grow, table_ninf_remap): Use signed table size.
6257 (save_row): Don't bother initializing locals when not needed.
6258 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
6259 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
6260
6261 * src/vcg.h: Correct misspellings.
6262
6263 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
6264
6265
6266 * src/getargs.c (getargs): Don't assume EOF == -1.
6267
26b4a969
PE
62682002-12-09 Paul Eggert <eggert@twinsun.com>
6269
6270 Change identifier spellings to avoid collisions with names
6271 that are reserved by POSIX.
6272
6273 Don't use names ending in _t, since POSIX reserves them.
6274 For consistency, remove _e and _s endings -- they're weren't
6275 needed to remove ambiguity. All uses changed.
6276 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
6277 turn was just renamed from struniq_t.
6278 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
6279 which in turn was just renamed from struniq_processor_t.
6280 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
6281 in turn was renamed from hash_compare_struniq_t.
6282 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
6283 (state_list): Renamed from state_list_t.
6284 * src/assoc.h (assoc): Renamed from assoc_t.
6285 * src/conflicts.c (enum conflict_resolution): Renamed from
6286 enum conflict_resolution_e.
6287 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
6288 (rule_list): Renamed from rule_list_t.
6289 * src/getargs.h (enum trace): Renamed from enum trace_e.
6290 (enum report): Renamed from enum report_e.
6291 * src/gram.h (item_number): Renamed from item_number_t.
6292 (rule_number): Renamed from rule_number_t.
6293 (struct rule_s): Remove the "rule_s" part; not used.
6294 (rule): Renamed from rule_t.
6295 (rule_filter): Renamed from rule_filter_t.
6296 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6297 (goto_list): Renamed from goto_list_t.
6298 * src/lalr.h (goto_number): Renamed from goto_number_t.
6299 * src/location.h (location): Renamed from location_t.
6300 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6301 and moved here from:
6302 * src/muscle_tab.h (muscle_entry_t): here.
6303 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6304 (rule_list): Renamed from rule_list_t.
6305 * src/print_graph.c (static_graph): Renamed from graph.
6306 * src/reader.h (braced_code): Renamed from braced_code_t.
6307 Remove brace_code_e tag.
6308 * src/relation.h (relation_node): Renamed from relation_node_t.
6309 (relation_nodes): Renamed from relation_nodes_t.
6310 (relation): Renamed from relation_t.
6311 * src/state.h (state_number): Renamed from state_number_t.
6312 (struct state): Renamed from struct state_s.
6313 (state): Renamed from state_t.
6314 (transitions): Renamed from transitions_t. Unused (and
6315 misspelled) transtion_s tag removed.
6316 (errs): Renamed from errs_t. Unused errs_s tag removed.
6317 (reductions): Renamed from reductions_t. Unused tag
6318 reductions_s removed.
6319 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6320 (struct symbol_list): Renamed from struct symbol_list_s.
6321 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6322 (struct symbol): Renamed from struct symbol_s.
6323 (symbol): Renamed from symbol_t.
6324 * src/tables.c (vector_number): Renamed from vector_number_t.
6325 (action_number): Renamed from action_t.
6326 * src/tables.h (base_number): Renamed from base_t.
6327 * src/vcg.h (enum color): Renamed from enum color_e.
6328 (enum textmode): Renamed from enum textmode_e.
6329 (enum shape): Renamed from enum shape_e.
6330 (struct colorentry): Renamed from struct colorentry_s.
6331 (struct classname): Renamed from struct classname_s.
6332 (struct infoname): Renamed from struct infoname_s.
6333 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6334 (enum decision): Renamed from enum decision_e.
6335 (enum orientation): Renamed from enum orientation_e.
6336 (enum alignment): Renamed from enum alignment_e.
6337 (enum arrow_mode): Renamed from enum arrow_mode_e.
6338 (enum crossing_type): Renamed from enum crossing_type_e.
6339 (enum view): Renamed from enum view_e.
6340 (struct node): Renamed from struct node_s.
6341 (node): Renamed from node_t.
6342 (enum linestyle): Renamed from enum linestyle_e.
6343 (enum arrowstyle): Renamed from enum arrowstyle_e.
6344 (struct edge): Renamed from struct edge.
6345 (edge): Renamed from edge_t.
6346 (struct graph): Renamed from struct graph_s.
6347 (graph): Renamed from graph_t.
6348 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6349 Rename value_t -> value.
6350 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6351 value_t_as_yystype -> value_as_yystype.
6352
6353 Don't include <errno.h> in the mainstream code, since it
6354 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6355 * lib/get-errno.c, lib/get-errno.h: New files.
6356 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6357 get-errno.c.
6358 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6359 * src/output.c (output_skeleton): Likewise.
6360 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6361 instead of errno.
6362 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
6363 Likewise.
6364 (handle_action_dollar, handle_action_at): Likewise.
6365 * src/system.h: Do not include <errno.h>.
6366 (TAB_EXT): Renamed from EXT_TAB.
6367 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
6368
6369 Avoid str[a-z]*, since <string.h> reserves that name space.
6370 Change all instances of "struniq" in names to "uniqstr", and
6371 likewise for "STRUNIQ" and "UNIQSTR".
6372 * src/uniqstr.c: Renamed from src/struniq.c.
6373 * src/uniqstr.h: Renamed from src/struniq.h.
6374 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
6375 * src/files.c (strsuffix): Remove; unused.
6376 (concat2): Renamed from stringappend. Now static.
6377 * src/files.h (strsuffix, stringappend): Remove; unused.
6378 * src/parse-gram.y (<chars>): Renamed from <string>.
6379 (<uniqstr>): Renamed from <struniq>.
6380 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
6381 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
6382 (struct graph_s.expand): Renamed from struct graph_s.stretch.
6383 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
6384 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
6385 (N_EXPAND): Renamed from N_STRETCH.
6386
6387 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
6388 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
6389 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
6390 Remove; unused.
6391 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
6392 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
6393 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
6394 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
6395 (BASE_MAXIMUM): Renamed from BASE_MAX.
6396 (BASE_MINIMUM): Renamed from BASE_MIN.
6397 (ACTION_MAX): Remove; unused.
6398 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
6399 Unnecessary casts removed from above defines.
6400
6401
6402 Fix misspelling in names.
6403 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
6404 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
6405 G_NODE_ALIGNEMENT.
6406
6407
6408 * lib/timevar.c (timevar_report): Renamed from time_report,
6409 for consistency with other names.
6410 * lib/timevar.h (timevar_report): New decl.
6411 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
6412
6413
6414 Sort include-file uses.
6415
6416 Reorder all include files under src to be in the order "system.h".
6417 then the ../lib include files in angle brackets (alphabetized),
6418 then the . include files in double-quotes (alphabetized). Fix
6419 dependency breakages encountered in this process, as follows:
6420 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
6421 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
6422 * src/state.h: Include "symtab.h".
6423
996b1c7e
PE
64242002-12-08 Paul Eggert <eggert@twinsun.com>
6425
6426 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
6427 since this causes problems when __file__ contains character
6428 sequences like "@" that are treated specially by src/scan-skel.l.
6429 Instead, just use the file's basename. This fixes the bug
6430 reported by Martin Mokrejs in
161a71f3 6431 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 6432
e19c4e5d
PE
64332002-12-06 Paul Eggert <eggert@twinsun.com>
6434
6435 Add support for rules that do not have trailing semicolons, as
6436 POSIX requires. Improve the quality of locations in Bison
6437 diagnostics.
26b4a969 6438
e19c4e5d
PE
6439 * src/location.c: Include <quotearg.h>.
6440 (empty_location): Now const.
6441 (location_print): New function. Follow the recommendation of the
6442 GNU Coding Standards for locations that span file boundaries.
6443 * src/location.h: Do not include <quotearg.h>; no longer needed.
6444 (boundary): New type.
6445 (location_t): Use it. This allows locations to span file boundaries.
6446 All member uses changed: file -> start.file or end.file (as needed),
6447 first_line -> start.line, first_column -> start.column,
6448 last_line -> end.line, last_column -> end.column.
6449 (equal_boundaries): New function.
6450 (LOCATION_RESET, LOCATION_STEP): Remove.
6451 (LOCATION_PRINT): Remove. All callers changed to use location_print.
6452 (empty_location): Now const.
6453 (location_print): New decl.
6454 * src/parse-gram.y (lloc_default): New function, which handles
6455 empty locations more accurately.
6456 (YYLLOC_DEFAULT): Use it.
6457 (%token COLON): Remove.
6458 (%token ID_COLON): New token.
26b4a969 6459 (rules): Use it.
e19c4e5d
PE
6460 (declarations, rules): Remove trailing semicolon.
6461 (declaration, rules_or_grammar_declaration):
6462 Allow empty (";") declaration.
6463 (symbol_def): Remove empty actions; no longer needed.
6464 (rules_or_grammar_declaration): Remove trailing semicolon.
6465 (semi_colon.opt): Remove.
6466 * src/reader.h: Include location.h.
6467 (scanner_cursor): New decl.
6468 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
6469 rolling our own.
6470 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
6471 of *loc.
6472 (STEP): Remove. No longer needed, now that adjust_location does
6473 the work. All uses removed.
6474 (scanner_cursor): New var.
6475 (adjust_location): Renamed from extend_location. It now sets
6476 *loc and adjusts the scanner cursor. All uses changed.
6477 Don't bother testing for CR.
6478 (handle_syncline): Remove location arg; now updates scanner cursor.
6479 All callers changed.
6480 (unexpected_end_of_file): Now accepts start boundary of token or
6481 comment, not location. All callers changed. Update scanner cursor,
6482 not the location.
6483 (SC_AFTER_IDENTIFIER): New state.
6484 (context_state): Renamed from c_context. All uses changed.
6485 (id_loc, code_start, token_start): New local vars.
6486 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
6487 processing of Yacc white space and equivalents here.
6488 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
6489 instead of returning ID immediately, since we need to search for
6490 a subsequent colon.
6491 (<INITIAL>"'", "\""): Save token_start.
6492 (<INITIAL>"%{", "{", "%%"): Save code_start.
6493 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
6494 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
6495 BEGIN context_state at end, not INITIAL.
6496 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
6497 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
6498 Return correct token start.
6499 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
6500 the start of a character, string or multiline comment is found.
6501 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
6502 Reduction): Adjust reported locations to match the more-precise
6503 results now expected.
6504 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
6505 * tests/reduce.at (Useless Rules, Reduced Automaton,
6506 Underivable Rules): Likewise.
6507 * tests/regression.at (Invalid inputs): No longer `expecting ";"
6508 or "|"' now that so many other tokens are allowed by the new grammar.
6509
6510 * src/complain.h (current_file): Remove duplicate decl;
6511 current_file is now owned by files.h.
6512 * src/complain.c, src/scan-gram.l: Include files.h.
6513
65142002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 6515
e19c4e5d
PE
6516 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
6517 promotes to int; it might be unsigned int.
6518 * data/yacc.c (yy_reduce_print): Likewise.
6519
6520 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
6521 be #defined in the prologue, not in the Bison declarations.
6522 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 6523
b64755e3
PE
65242002-12-02 Paul Eggert <eggert@twinsun.com>
6525
6526 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
6527 * lib/strtoul.c: New file, from gnulib.
6528 This fixes a porting bug reported by Peter Klein in
161a71f3 6529 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 6530
6e746484
PE
65312002-11-30 Paul Eggert <eggert@twinsun.com>
6532
b64755e3
PE
6533 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6534 and put only a forward declaration in the prologue. This is for
6535 consistency with the other scanner helper functions.
6536
6ba55592
PE
6537 Type clashes now generate warnings, not errors, since it
6538 appears that POSIX may allow some grammars with type clashes.
6539 * src/reader.c (grammar_current_rule_check): Warn about
6540 type clashes instead of complaining.
6541 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6542
6e746484
PE
6543 Add Yacc library, since POSIX requires it.
6544 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6545 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6546 * lib/main.c, lib/yyerror.c: New files.
6547
6548 gram_error can be static; it need not be extern.
6549 * src/reader.h (gram_error): Remove decl.
6550 * src/parse-gram.y (gram_error): Now static. Add static decl.
6551 (print_token_value): Omit parameter names from forward decl,
6552 for consistency.
6553
88510f9c
PE
65542002-11-29 Paul Eggert <eggert@twinsun.com>
6555
6e746484
PE
6556 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6557 be declared before being used. E.g., one should typically
6558 declare them in the prologue. Use GNU coding style in examples.
6559 Put "const" consistently after the type it modifies. Mention
6560 that C99 supports "inline". Mention that yyerror traditionally
6561 returns "int".
6562
88510f9c
PE
6563 %parse-param and %lex-param now take just one argument, the
6564 declaration; the argument name is deduced from the declaration.
6565
6566 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6567 Reporting, Table of Symbols): Document this.
6568 * src/parse-gram.y (add_param): New function.
6569 (COMMA): Remove.
6570 (declaration): Implement new rule for %parse-param and %lex-param.
6571 * src/scan-gram.l: "," now elicits a warning, rather than being
6572 a token; this is more compatible with byacc.
6573 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6574
bb92250c
PE
65752002-11-27 Paul Eggert <eggert@twinsun.com>
6576
6577 Rename identifiers to avoid real and potential collisions.
6578
6579 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6580 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 6581 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
6582 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6583 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
6584 * src/parse-gram.y (print_token_value): Renamed from yyprint.
6585 All uses changed.
6586 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
6587 The name "yycontrol" violates the name space rules, and this stuff
6588 wasn't being used anyway.
6589 (input): Remove action; this stuff wasn't being used.
6590 (gram_error): Rename local variable yylloc -> loc.
6591 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
6592 (YY_DECL): Don't use "yy" at start of local variables.
6593 All uses changed, e.g., yylloc -> loc.
6594 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
6595 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
6596 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
6597 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
6598
6599 * src/parse-gram.y (gram_error): loc is now const *.
6600 * src/reader.h (gram_error): Likewise.
6601
3af4feb2
PE
66022002-11-24 Paul Eggert <eggert@twinsun.com>
6603
6604 Version 1.75c.
6605
6606 * tests/actions.at (Actions after errors): Use an output format
6607 more similar to that of the Printers and Destructors test.
6608 Test the position of the ';' token too.
6609 (Printers and Destructors): Likewise.
6610 (Printers and Destructors: %glr-parser): Remove for now, to avoid
6611 unnecessarily alarming people when the test fails.
6612
6613 * data/yacc.c (yyerrlab1): Move this label down, so that the
6614 parser does not discard the lookahead token if the user code
6615 invokes YYERROR. This change is required for POSIX conformance.
6616
6617 * lib/error.c: Sync with gnulib.
6618
66192002-11-22 Paul Eggert <eggert@twinsun.com>
6620
6621 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
6622 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
6623 * lib/xmalloc.c: Likewise.
26b4a969 6624
58004308
PE
66252002-11-20 Paul Eggert <eggert@twinsun.com>
6626
6627 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
6628
66292002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 6630
58004308
PE
6631 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
6632 should use `if (! x) abort ();' rather than `assert (x);', and
6633 anyway it's one less thing to worry about configuring.
6634
6635 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
6636 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
6637 and replace all instances of assert with abort.
6638 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6639 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
6640
6641 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
6642 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
6643 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
6644 hash_find_entry, hash_rehash, hash_insert): Likewise.
6645 * src/conflicts.c (resolve_sr_conflict): Likewise.
6646 * src/lalr.c (set_goto_map, map_goto): Likewise.
6647 * src/nullable.c (nullable_compute): Likewise.
6648 * src/output.c (prepare_rules, token_definitions_output): Likewise.
6649 * src/reader.c (packgram, reader): Likewise.
6650 * src/state.c (state_new, state_free, state_transitions_set,
6651 state_reduction_find): Likewise.
6652 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
6653 symbol_pack): Likewise.
6654 * src/tables.c (conflict_row, pack_vector): Likewise.
6655 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6656 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6657 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
6658 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
6659
6660 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
6661 (ARGMATCH_CONSTRAINT): New macro.
6662 (ARGMATCH_ASSERT): Use it.
6663
6664 * src/system.h (verify): New macro.
6665 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
6666 rather than assert.
6667 * src/tables.c (tables_generate): Likewise.
6668
6669 * src/struniq.c (struniq_assert): Now returns void, and aborts
6670 if the assertion is false.
6671 (struniq_assert_p): Remove.
6672 * src/struniq.h: Likewise.
6673
76ae8198
PE
66742002-11-18 Paul Eggert <eggert@twinsun.com>
6675
6676 * data/glr.c (yygetLRActions): Replace `yyindex' with
6677 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
6678 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 6679 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 6680
d3c4e709
AD
66812002-11-18 Akim Demaille <akim@epita.fr>
6682
6683 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
6684 space.
6685 From Tim Van Holder.
6686
8d8a7238
PE
66872002-11-17 Paul Eggert <eggert@twinsun.com>
6688
6689 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
6690 to "SyntaxError" for consistency with my 2002-11-15 change.
6691
6692 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
6693 not define to {}, since this breaks the common use of `YYDPRINTF
6694 ((...));' if a single statement is desired (e.g. before `else').
6695 Work around GCC warnings by surrounding corresponding calls with
6696 {} if needed.
6697 (yyhasResolvedValue): Remove unused function.
6698 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
6699 loop body.
6700 (yyreportSyntaxError): Renamed from yyreportParseError.
6701 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
6702 All uses changed.
6703 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
6704 extern when possible. Remove unused initializations.
6705
b0937b22
AD
67062002-11-16 Akim Demaille <akim@epita.fr>
6707
6708 Augment the similarity between GLR and LALR traces.
6709
6710 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
6711 (YY_REDUCE_PRINT): New.
6712 (yyparse): Use them.
6713 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
6714 YYDPRINT here.
6715 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
6716 state reached after the reduction/recovery, since...
6717 (yyparse, yyprocessOneStack): Report the state we are entering in.
6718
c5e3e510
AD
67192002-11-16 Akim Demaille <akim@epita.fr>
6720
6721 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
6722 Add support for --trace=skeleton.
6723 * src/scan-skel.l: %option debug.
6724 Scan strings of non-@ or \n instead of character by character.
6725 (scan_skel): Handle trace_skeleton.
6726 (QPUTS): New.
6727 (@output_parser_name@, @output_header_name@): ``Restore'' their
6728 support (used to be M4 macros).
6729 * data/yacc.c: Quote larger chunks, a la glr.c.
6730 * data/lalr1.cc: Likewise.
6731 The header guards are no longer available, so use some other
6732 string than `YYLSP_NEEDED'.
6733
4c6cc1db
AD
67342002-11-16 Akim Demaille <akim@epita.fr>
6735
6736 Make the ``Printers and Destructors'' test more verbose, taking
6737 `yacc.c''s behavior as (possibly wrong) reference.
6738
6739 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
6740 instead of fprint on stdout.
6741 Set and report the last_line of the symbols.
6742 Consistently display values and locations.
6743
6d9e8019
PE
67442002-11-16 Paul Eggert <eggert@twinsun.com>
6745
6746 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
6747
6e649e65
PE
67482002-11-15 Paul Eggert <eggert@twinsun.com>
6749
b25d88f6
PE
6750 * tests/actions.at (Actions after errors): New test case.
6751
6e649e65
PE
6752 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
6753 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
6754 tests/action.at, tests/calc.at, tests/conflicts.at,
6755 tests/cxx-type.at, tests/regression.at:
6756 "parse error" -> "syntax error" for POSIX compatibility.
6757 "parsing stack overflow..." -> "parser stack overflow" so
6758 that code matches Bison documentation.
6759
0f39aab9
AD
67602002-11-15 Akim Demaille <akim@epita.fr>
6761
6762 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
6763 take two BRACED_CODE, not two string_content.
6764 Free the scanner's obstack when we are done.
6765 (code_content): New.
6766 * tests/calc.at: Adjust.
6767 * doc/bison.texinfo: Adjust.
6768 Also, make sure to include the `,' for these declarations.
6769
761c1926
AD
67702002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
6771
6772 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
6773 definition; avoids potential autoreconf problems.
6774
b0f98b10
AD
67752002-11-15 Akim Demaille <akim@epita.fr>
6776
6777 Always check the value returned by yyparse.
6778
6779 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
6780 returned by yyparse.
6781 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
6782 Adjust calls.
6783 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
6784 returned by yyparse.
6785
970785f1
PH
67862002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6787
6788 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
6789 on input.at test.
6790
8fcc7db1
PE
67912002-11-14 Paul Eggert <eggert@twinsun.com>
6792
7ec1b48e
PE
6793 * src/output.c (output_skeleton): Call xfopen instead of
6794 duplicating xfopen's body.
6795
cfff7583 6796 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 6797 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 6798
8fcc7db1
PE
6799 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
6800 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
6801 Group compiler. Instead, use "$CC -E bar.c". Include the .h
6802 file twice in the grammar, as an extra check.
6803
6804 * tests/input.at (Torturing the Scanner): Surround the
6805 backslash-newline tests with "#if 0", to make it less likely that
6806 we'll run into compiler bugs. Bring back solitary \ inside
6807 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 6808 test backslash-newline in C character constant.
8fcc7db1 6809
4e8d992c
AD
68102002-11-14 Akim Demaille <akim@epita.fr>
6811
6812 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
6813 status of the compiler.
f32b346d 6814 Calling `exit 1' is no longer needed.
4e8d992c
AD
6815 Reported by Nelson H. F. Beebe.
6816
9501dc6e
AD
68172002-11-14 Akim Demaille <akim@epita.fr>
6818
6819 * tests/atlocal.in (CPPFLAGS): We have config.h.
6820 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
6821 New.
6822 * tests/actions.at, tests/calc.at, tests/conflicts.at,
6823 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
6824 * tests/regression.at, tests/torture.at: Use them for all the
6825 grammars that are to be compiled.
6826 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
6827 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
6828 * doc/bison.texinfo (GLR Parsers): Document `inline'.
6829
18b519c0
AD
68302002-11-14 Akim Demaille <akim@epita.fr>
6831
6832 * doc/bison.texinfo: Various formatting changes (alignments in
6833 samples, additional @group/@end group, GCS in samples.
6834 Use @deffn instead of simple @table to define the directives,
6835 macros, variables etc.
6836
9a86cdb9
PE
68372002-11-13 Paul Eggert <eggert@twinsun.com>
6838
daa33def 6839 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 6840 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 6841
daa33def 6842 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 6843 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
6844 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
6845 * tests/headers.at (export YYLTYPE): Likewise.
6846
6847 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 6848 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 6849
9a86cdb9
PE
6850 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
6851 comments, since they're not portable. Use GNU coding style.
6852
9c1e26bd
AD
68532002-11-13 Akim Demaille <akim@epita.fr>
6854
6855 * data/yacc.c: Leave bigger chunks of quoted text.
6856 (YYDSYMPRINTF): New.
6857 Use it to report symbol activities.
6858 * data/glr.c (YYDSYMPRINTF): New.
6859 Use it.
6860
87f721cc
PE
68612002-11-12 Paul Eggert <eggert@twinsun.com>
6862
6863 Version 1.75b.
6864
6865 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
6866 (yyglrReduce): Return yyok, not 0.
6867 This should avoid the enumerated-type warnings reported
464c6927 6868 by Nelson H. F. Beebe in
161a71f3 6869 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
6870
6871 * lib/bbitset.h (BITSET_INLINE): Remove.
6872 * lib/bitset.h [! BITSET_INLINE]: Remove.
6873 (bitset_set, bitset_reset, bitset_test): Rename local vars
6874 to avoid shadowing warnings by GCC.
6875
6876 * data/glr.c (inline): Remove #define. It's the user's
6877 responsibility to #define it away, just like 'const'.
464c6927 6878 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 6879 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 6880
87f721cc
PE
6881 * Makefile.maint (po-check): Scan .l and .y files instead of the
6882 .c and the .h files that they generate. This fixes the bug
6883 reported by Tim Van Holder in:
161a71f3 6884 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
6885 Look for N_ as well as for _. Try to avoid matching #define for
6886 N_ and _.
6887 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
6888 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
6889 * src/scan-gram.l: Revamp regular expressions so that " and '
6890 do not confuse xgettext.
6891
6892 * src/struniq.h (struniq_new): Do not declare the return type
6893 to be 'const'; this violates the C standard.
6894 * src/struniq.c (struniq_new): Likewise.
6895
be14ade5
AD
68962002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
6897
6898 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
6899 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
6900 linker.
6901
05291fbc
AD
69022002-11-12 Akim Demaille <akim@epita.fr>
6903
6904 * Makefile.maint: Sync with Autoconf:
6905 (local_updates): New.
6906
1f5fd52e
AD
69072002-11-12 Akim Demaille <akim@epita.fr>
6908
6909 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
6910
283f1e64
AD
69112002-11-12 Akim Demaille <akim@epita.fr>
6912
6913 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
6914 locations.
6915
886b69d1
AD
69162002-11-12 Akim Demaille <akim@epita.fr>
6917
6918 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
6919 not yyvalue.
6920
3df37415
AD
69212002-11-12 Akim Demaille <akim@epita.fr>
6922
6923 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
6924 Use it to test the GLR parser.
6925
7bd6c77e
AD
69262002-11-12 Akim Demaille <akim@epita.fr>
6927
6928 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
6929 defines it.
6930 * data/glr.c (yystos): New.
6931 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
6932 (YYDSYMPRINT): New.
6933 (yyval): Don't define it, it is handled via M4.
6934 (yyrecoverParseError): Free verbosely the discarded symbols.
6935 * data/yacc.c (yysymprint): Remove, rather...
6936 (b4_yysymprint_generate): invoke.
6937 * data/c.m4 (b4_yysymprint_generate): New.
6938 Accept pointers as arguments, as opposed to the version from
6939 yacc.c.
6940 (b4_yydestruct_generate): Likewise.
6941 * tests/cations.at (Printers and Destructors): Use Bison directives
6942 instead of CPP macros.
6943 Don't rely on internal details.
6944
b0400cc6
AD
69452002-11-12 Akim Demaille <akim@epita.fr>
6946
6947 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
6948 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
6949 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
6950 it against YYEMPTY and so forth), work on yytoken (i.e., set
6951 it to YYEMPTY etc.).
6952 (yydestruct): Replace with a b4_yydestruct_generate invocation.
6953 (b4_symbol_actions): Remove.
6954 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
6955 for 0, end-of-input.
6956
72f889cc
AD
69572002-11-12 Akim Demaille <akim@epita.fr>
6958
6959 * doc/bison.texinfo (Destructor Decl): New.
6960
b1ae9233
AD
69612002-11-12 Akim Demaille <akim@epita.fr>
6962
6963 * src/tables.c (tables_generate): Use free for pointers that
6964 cannot be NULL, not XFREE.
6965 (pack_vector): Use assert, not fatal, for bound violations.
6966 * src/state.c (state_new): Likewise.
6967 * src/reader.c (reader): Likewise.
6968 * src/lalr.c (set_goto_map): Likewise.
72f889cc 6969 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
6970 the file name.
6971
7ec2d4cd
AD
69722002-11-12 Akim Demaille <akim@epita.fr>
6973
6974 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
6975 Restore.
6976 * src/scan-gram.l (last_string): Is global to the file, not to
6977 yylex.
6978 * src/parse-gram.y (input): Don't append the epilogue here,
6979 (epilogue.opt): do it here, and free the scanner's obstack.
6980 * src/reader.c (epilogue_set): Rename as...
6981 (epilogue_augment): this.
6982 * data/c.m4 (b4_epilogue): Defaults to empty.
6983
573a6cd3
AD
69842002-11-12 Akim Demaille <akim@epita.fr>
6985
6986 * src/getargs.c (long_options): Remove duplicates.
6987 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
6988 Remove.
6989 * doc/bison.rnh: Remove.
6990 * doc/bison.texinfo (VMS Invocation): Remove.
6991
95612cfa
AD
69922002-11-12 Akim Demaille <akim@epita.fr>
6993
6994 * src/struniq.h, src/struniq.c (struniq_t): Is const.
6995 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
6996
6997 Use struniq for symbols.
6998
6999 * src/symtab.h (symbol_t): The tag member is a struniq.
7000 (symbol_type_set): Adjust.
7001 * src/symtab.c (symbol_new): Takes a struniq.
7002 (symbol_free): Don't free the tag member.
7003 (hash_compare_symbol_t, hash_symbol_t): Rename as...
7004 (hash_compare_symbol, hash_symbol): these.
7005 Use the fact that tags as struniqs.
7006 (symbol_get): Use struniq_new.
7007 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
7008 Returns a strniq.
7009 * src/reader.h (merger_list, grammar_currentmerge_set): The name
7010 and type members are struniqs.
7011 * src/reader.c (get_merge_function)
7012 (grammar_current_rule_merge_set): Adjust.
7013 (TYPE, current_type): Are struniq.
7014
7015 Use struniq for file names.
7016
7017 * src/files.h, src/files.c (infile): Split into...
7018 (grammar_file, current_file): these.
7019 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
7020 * src/reduce.c (reduce_print): Likewise.
7021 * src/getargs.c (getargs): Likewise.
7022 * src/complain.h, src/complain.c: Likewise.
7023 * src/main.c (main): Call struniqs_new early enough to use it for
7024 file names.
7025 Don't free the input file name.
7026
3e6656f9
AD
70272002-11-12 Akim Demaille <akim@epita.fr>
7028
7029 * src/symtab.c (symbol_free): Remove dead deactivated code:
7030 type_name are properly removed.
7031 Don't use XFREE to free items that cannot be NULL.
7032 * src/struniq.h, src/struniq.c: New.
7033 * src/main.c (main): Initialize/free struniqs.
7034 * src/parse-gram.y (%union): Add astruniq member.
7035 (yyprint): Adjust.
7036 * src/scan-gram.l (<{tag}>): Return a struniq.
7037 Free the obstack bit that used to store it.
7038 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
7039
7672019c
PE
70402002-11-11 Paul Eggert <eggert@twinsun.com>
7041
7042 Revamp to fix many (but not all) of the C- and M4-related quoting
7043 problems. Among other things, this fixes the Bison bug reported
7044 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 7045 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
7046
7047 Use new @ escapes consistently. Represent brackets with @{ and @}
7048 rather than @<:@ and @:>@, since this works a bit better with dumb
7049 editors like vi. Represent @ with @@, since @ is now consistently
7050 an escape. Use @oline@ and @ofile@ rather than __oline__ and
7051 __ofile__, to avoid unexpected expansions. Similarly, use @output
7052 rather than #output.
7053
7054 * data/c.m4 (b4_copyright): Omit file name from comment, since
7055 the file name could contain "*/".
7056 (b4_synclines_flag): Don't quote the 2nd argument; it should already
7057 be quoted. All uses changed.
7058
7059 * data/glr.c: Use new @ escapes consistently.
7060 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
7061 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
7062 Remove, since they couldn't handle arbitrary characters in file
7063 names.
7064 * data/lalr1.cc: Likewise.
7065 * data/yacc.c: Likewise.
7066
7067 * src/files.c (output_infix): Remove; all uses removed.
7068 * src/files.h: Likewise.
7069
7070 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
7071 mishandled funny characters in file names, and anyway it isn't
7072 needed any more.
7073 * data/yacc.c: Likewise.
7074 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
7075
7076 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
7077 * data/yacc.c: Likewise.
7078
7079 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
7080 strings now.
7081 (muscle_init): Quote filename as a C string.
7082 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
7083 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
7084 * src/output.c (escaped_file_name_output): New function.
7085 (prepare_symbols): Quote tokens for M4.
7086 (prepare): Don't insert output_infix, output_prefix,
7087 output_parser_name, output_header_name; this is now down by scan-skel.
7088 Insert skeleton as a C string.
7089
7090 * src/output.c (user_actions_output, symbol_destructors_output,
7091 symbol_printers_output): Quote filenames for C and M4.
7092 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7093
7094 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
7095 escapes other than \\ and \'; this simplifies the code.
7096 (<SC_STRING>): Likewise, for \\ and \".
7097 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
7098 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
7099 Use new escapes @{ and @} for [ and ].
7100
7101 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
7102 them with auto vars.
7103 Switch to new escape scheme, where @ is the escape character uniformly.
7104 Abort if a stray escape character is found. Avoid unbounded input
7105 buffer when parsing non-escaped text.
7106
7107 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
7108 __oline__, #output, $@, and @{ do not have unintended meanings.
7109
acea4f3b
PE
71102002-11-09 Paul Eggert <eggert@twinsun.com>
7111
7112 Fix the test failure due to GCC warnings described in
161a71f3 7113 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
7114 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
7115 evaluate to 0 if it's impossible for NINF to be in the respective
7116 table.
7117 (yygetLRActions, yyrecoverParseError): Use them.
7118
7119 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
7120 counted in the token inserted at end of file. Now takes
7121 location_t *, not location_t, so that the location can be
7122 adjusted. All uses changed.
7123
7124 * tests/regression.at (Invalid inputs): Adjust wording in
7125 diagnostic to match the new behavior.
7126
7127 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
7128 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
7129 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
7130 abort ();'. This reduces the runtime of the "Many lookaheads"
7131 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
7132 GCC 3.2.
7133
20ef1ad5
PE
71342002-11-07 Paul Eggert <eggert@twinsun.com>
7135
7136 * src/parse-gram.y (CHARACTER): Remove unused token.
7137 All uses removed.
7138
7139 * src/scan-gram.l: Remove stack option. We no longer use the
7140 stack, since the stack was never deeper than 1; instead, use the
7141 new auto var c_context to record the stacked value.
7142
7143 Remove nounput option. At an unexpected end of file, we now unput
7144 the minimal input necessary to end cleanly; this simplifies the
7145 code.
7146
7147 Avoid unbounded token sizes where this is easy.
7148
7149 (unexpected_end_of_file): New function.
7150 Use it to systematize the error message on unexpected EOF.
7151 (last-string): Now auto, not static.
7152 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
7153 (scanner_last_string_free): Remove; not used.
7154 (percent_percent_count): Move decl to just before use.
7155 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
7156 not the (never otherwised-used) CHARACTER.
7157
93724f13
AD
71582002-11-07 Akim Demaille <akim@epita.fr>
7159
7160 Let yyerror always receive the msg as last argument, so that
7161 yyerror can be variadic.
7162
7163 * data/yacc.c (b4_yyerror_args): New.
7164 Use it when calling yyerror.
7165 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
7166 Use it when calling yyerror.
7167 * doc/bison.texinfo (Error Reporting): Adjust.
7168 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
7169 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
7170
6e40b4eb
AD
71712002-11-06 Akim Demaille <akim@epita.fr>
7172
7173 #line should have quoted strings.
7174 Ideally, this should be done by m4_quotearg.
7175
7176 * src/scan-skel.l: Include quotearg.h.
7177 Quote __ofile__.
7178 * src/output.c (symbol_printers_output)
7179 (symbol_destructors_output): Quote the file name.
7180
2dfbfc12
AD
71812002-11-06 Akim Demaille <akim@epita.fr>
7182
7183 * tests/regression.at (Invalid inputs): Adjust to the recent
7184 messages.
7185
437c2d80
AD
71862002-11-06 Akim Demaille <akim@epita.fr>
7187
7188 Restore --no-lines.
7189 Reported by Jim Kent.
7190
7191 * data/c.m4 (b4_syncline): New.
7192 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
7193 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
7194 * src/output.c (user_actions_output): Likewise.
7195 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 7196 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 7197
900c5db5
AD
71982002-11-06 Akim Demaille <akim@epita.fr>
7199
7200 * src/main.c (main): Free `infile'.
7201 * src/scan-gram.l (handle_syncline): New.
7202 Recognize `#line'.
7203 * src/output.c (user_actions_output, symbol_destructors_output)
7204 (symbol_printers_output): Use the location's file name, not
7205 infile.
7206 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7207
e183b123 72082002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 7209
e183b123 7210 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 7211 either has GLR conflict entries.
e183b123 7212
193eb6b7
PE
72132002-11-05 Paul Eggert <eggert@twinsun.com>
7214
e183b123
PE
7215 * src/scan-gram.l: Use more accurate diagnostics, e.g.
7216 "integer out of range" rather than "invalid value".
7217 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
7218 accordingly.
7219
193eb6b7
PE
7220 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
7221 Also, remove one static variable in the scanner.
7222
7223 * src/scan-gram.l (braces_level): Now auto, not static.
7224 Initialize to zero if the compiler is being picky.
7225 (INITIAL): Clear braces_level instead of incrementing it.
7226 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
7227 as POSIX 1003.1-2001 requires.
7228 * src/system.h (IF_LINT): New macro, taken from coreutils.
7229 * configure.ac: Define "lint" if --enable-gcc-warnings.
7230
29c01725
AD
72312002-11-05 Akim Demaille <akim@epita.fr>
7232
7233 * src/scan-gram.l: When it starts with `%', complain about the
7234 whole directive, not just that `invalid character: %'.
7235
8aeac3ca
AD
72362002-11-04 Akim Demaille <akim@epita.fr>
7237
7238 * Makefile.maint: Update from Autoconf.
7239 (update, cvs-update, po-update, do-po-update): New.
7240
793a58bb
AD
72412002-11-04 Akim Demaille <akim@epita.fr>
7242
7243 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
7244 and yyerror.
7245 Have yyerror `use' its arguments.
7246 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
7247 returns true when location & yacc & pure & parse-param.
7248 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
7249
c4d720cd
AD
72502002-11-04 Akim Demaille <akim@epita.fr>
7251
7252 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
7253 clashes.
7254 * src/scan-gram.l: Use [\'] instead of ['] to pacify
7255 font-lock-mode.
7256 Use complain_at.
7257 Use quote, not quote_n since LOCATION_PRINT no longer uses the
7258 slot 0.
7259
613a0dc5
PE
72602002-11-03 Paul Eggert <eggert@twinsun.com>
7261
7262 * src/reader.c (get_merge_function, grammar_current_rule_check):
7263 Use consistent diagnostics for reporting type name clashes.
7264 Quote the types with <>, for consistency with Yacc.
7265 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
7266
2a8d363a
AD
72672002-11-03 Akim Demaille <akim@epita.fr>
7268
7269 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
7270 New.
7271 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
7272 (b4_parse_param): Remove.
7273 Use b4_identification.
7274 Propagate b4_pure_args where needed to pass them to yyerror.
7275 * data/glr.m4 (b4_parse_param): Remove.
7276 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
7277 (b4_lpure_formals): New.
7278 Use b4_identification.
7279 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
7280 b4_user_formals and b4_user_args.
7281 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
7282 (yyreportAmbiguity): When using a pure parser, also need
7283 the location, and the parse-params.
7284 Adjust callers.
7285 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
7286 When using a pure parser, also need the parse-params.
7287 Adjust callers.
7288 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
7289 (%pure-parser + %parse-param) LALR and GLR parsers.
7290 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
7291 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
7292 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
7293 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
7294 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7295 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7296 * doc/bison.texinfo: Untabify the whole file.
7297 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7298 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7299 (Error Reporting): Adjust to these new directives.
7300 Document %error-verbose, deprecate YYERROR_VERBOSE.
7301
9e32add8
AD
73022002-11-03 Akim Demaille <akim@epita.fr>
7303
7304 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7305 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7306 command line options.
7307 * tests/cxx-type.at: Formatting changes.
7308
b02d90a5
PE
73092002-11-03 Paul Eggert <eggert@twinsun.com>
7310
7311 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7312 to count columns correctly, and to check for invalid inputs.
9e32add8 7313
b02d90a5
PE
7314 Use mbsnwidth to count columns correctly. Account for tabs, too.
7315 Include mbswidth.h.
7316 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7317 (extend_location): New function.
7318 (YY_LINES): Remove.
7319
7320 Handle CRLF in C code rather than in Lex code.
7321 (YY_INPUT): New macro.
7322 (no_cr_read): New function.
7323
7324 Scan UCNs, even though we don't fully handle them yet.
7325 (convert_ucn_to_byte): New function.
7326
7327 Handle backslash-newline correctly in C code.
7328 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7329 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7330 all uses changed.
7331 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7332 Use {splice} wherever C allows backslash-newline.
7333 YY_STEP after space, newline, vertical-tab.
7334 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 7335
b02d90a5
PE
7336 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7337
7338 ({int}, handle_action_dollar, handle_action_at): Check for integer
7339 overflow.
9e32add8 7340
b02d90a5
PE
7341 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7342
7343 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7344 as well as \000. Check for UCHAR_MAX, not 255.
7345 Allow \x with an arbitrary positive number of digits, as in C.
7346 Check for overflow here.
7347 Allow \? and UCNs, for compatibility with C.
7348
7349 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7350 with quote slot used by complain_at.
7351
7352 * tests/input.at: Add tests for backslash-newline, m4 quotes
7353 in symbols, long literals, and funny escapes in strings.
7354
7355 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7356 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7357 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7358 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7359 * m4/mbswidth.m4: New file, from GNU coreutils.
7360
7361 * doc/bison.texinfo (Grammar Outline): Document // comments.
7362 (Symbols): Document that trigraphs have no special meaning in Bison,
7363 nor is backslash-newline allowed.
7364 (Actions): Document that trigraphs have no special meaning.
7365
7366 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
7367 no longer used.
7368
73692002-11-02 Paul Eggert <eggert@twinsun.com>
7370
7371 * src/reader.c: Don't include quote.h; not needed.
7372 (get_merge_function): Reword warning to be consistent with
7373 type clash diagnostic in grammar_current_rule_check.
7374
7375 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
7376 bug in trigraph handling.
7377
7378 * src/output.c (prepare_symbols): When printing token names,
7379 escape "[" as "@<:@" and likewise for "]".
7380
7381 * src/system.h (errno): Remove declaration, as we are now
7382 assuming C89 or better, and C89 guarantees errno.
7383
762b212b
PE
73842002-10-30 Paul Eggert <eggert@twinsun.com>
7385
7386 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
7387 Check for close failures.
7388 * src/files.h (xfclose): Return void, not int, since it always
7389 returned zero.
7390 * src/files.c (xfclose): Likewise. Report I/O error if ferror
7391 indicates one.
7392 * src/output.c (output_skeleton): Use xfclose rather than fclose
7393 and ferror. xfclose now checks ferror.
7394
7395 * data/glr.c (YYLEFTMOST_STATE): Remove.
7396 (yyreportTree): Use a stack-based leftmost state. This avoids
7397 our continuing battles with bogus warnings about initializers.
7398
56100c60
AD
73992002-10-30 Akim Demaille <akim@epita.fr>
7400
7401 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
7402 #if.
7403
51b4a04c
PH
74042002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7405
7406 * tests/glr-regr1.at: New test for reported regressions.
7407 * tests/testsuite.at: Add glr-regr1.at test.
7408 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 7409
bf1ebda2
PE
74102002-10-24 Paul Eggert <eggert@twinsun.com>
7411
5c16c6b1
PE
7412 Version 1.75a.
7413
bf1ebda2
PE
7414 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
7415 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
7416 we use malloc. Don't assume 'A' through 'Z' are contiguous.
7417 Don't assume strdup exists; POSIX says its an XSI extension.
7418 Check for buffer overflow on input.
7419
b526ee61
AD
74202002-10-24 Akim Demaille <akim@epita.fr>
7421
7422 * src/output.c (output_skeleton): Don't disable M4sugar comments
7423 too soon: it results in comments being expanded.
7424 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
7425 first output.
7426
f1886bb2
AD
74272002-10-24 Akim Demaille <akim@epita.fr>
7428
7429 * data/yacc.c (m4_int_type): New.
7430 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
7431 char' as only yacc.c wants K&R portability.
7432 * data/glr.c (yysigned_char): Remove.
7433 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
7434 Reported by Quoc Peyrot.
7435
c5576256
PE
74362002-10-23 Paul Eggert <eggert@twinsun.com>
7437
7438 * src/main.c (main): With --trace=time, report times even if a
7439 non-fatal error occurs. Formerly, the times were reported in some
7440 such cases but not in others.
7441 * src/reader.c (reader): Just return if a complaint has been issued,
7442 instead of exiting, so that 'main' can report times.
7443
27b0ffea
AD
74442002-10-22 Akim Demaille <akim@epita.fr>
7445
7446 * src/system.h: Include sys/types.
7447 Reported by Bert Deknuydt.
7448
223a7883
PE
74492002-10-23 Paul Eggert <eggert@twinsun.com>
7450
7451 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
7452 Suggested by Art Haas.
7453
74542002-10-22 Paul Eggert <eggert@twinsun.com>
7455
7456 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
7457 decl; not needed any more.
7458 * src/main.c (main): Use return to exit, undoing yesterday's change.
7459 The last OS that we could find where this wouldn't work is
7460 SunOS 3.5, and that's too old to worry about now.
7461
7462 * data/glr.c (struct yyltype): Define members even when not
7463 doing locations. This is more consistent with yacc.c, and it
7464 works around the following bug reports:
161a71f3
PE
7465 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
7466 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 7467
223a7883
PE
7468 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
7469 @acronym consistently. Standardize on "Yacc" instead of "YACC",
7470 "Algol" instead of "ALGOL". Give a bit more history about BNF.
7471
8b76775a
AD
74722002-10-22 Akim Demaille <akim@epita.fr>
7473
7474 * data/README: New.
7475
6db10d14
PE
74762002-10-21 Paul Eggert <eggert@twinsun.com>
7477
7478 Be consistent about 'bool'; the old code used an enum in one
7479 module and an int in another, and this violates the C standard.
7480 * m4/stdbool.m4: New file, from coreutils 4.5.3.
7481 * configure.ac (AC_HEADER_STDBOOL): Add.
7482 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
7483 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
7484 * src/symtab.c (hash_compare_symbol_t): Likewise.
7485 * src/system.h (bool, false, true): Use a definition consistent
7486 with ../lib/hash.c. All uses changed.
7487
7488 * src/complain.c (warning_issued): Renamed from warn_message_count,
7489 so that we needn't worry about integer overflow (!).
7490 Now of type bool. All uses changed.
7491 (complaint_issued): Renamed from complain_message_count; likewise.
7492
7493 * src/main.c (main): Use exit to exit with failure.
27b0ffea 7494
6db10d14
PE
7495 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
7496 rather than 1 and 0.
7497 * src/main.c (main): Likewise.
7498 * src/getargs.c (getargs): Likewise.
7499 * src/reader.c (reader): Likewise.
7500
7501 * src/getarg.c (getargs): Remove duplicate code for
7502 "Try `bison --help'".
7503
7504 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
7505 What was that "2" for?
7506
7507 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
7508 * src/getargs.c (usage): Likewise.
7509
7510 * src/getargs.c (getargs): When there are too few operands, report
7511 the last one. When there are too many, report the first extra
7512 one. This is how diffutils does it.
7513
92a060fd
PE
75142002-10-20 Paul Eggert <eggert@twinsun.com>
7515
7516 Remove K&R vestiges.
7517 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
7518 * src/complain.c (VA_START): Remove. Assume prototypes.
7519 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
7520 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
7521 fatal): Assume prototypes.
7522 * src/complain.h: Assume prototypes.
7523 * src/system.h (PARAMS): Remove.
7524 Include <limits.h> unconditionally, since it's guaranteeed even
7525 for a freestanding C89 compiler.
7526 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
7527 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 7528
e7cb57c0
AD
75292002-10-20 Akim Demaille <akim@epita.fr>
7530
7531 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7532 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7533 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7534 (yyresolveStates, yyresolveAction, yyresolveStack)
7535 (yyprocessOneStack): Use them.
7536 (yy_reduce_print): New.
7537 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7538
0245f82d
AD
75392002-10-20 Akim Demaille <akim@epita.fr>
7540
7541 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7542 arguments and output `void'.
7543 (b4_c_function): Rename as...
7544 (b4_c_function_def): this.
7545 (b4_c_function_decl, b4_c_ansi_function_def)
7546 (b4_c_ansi_function_decl): New.
7547 Change the interpretation of the arguments: before `int, foo', now
7548 `int foo, foo'.
7549 * data/yacc.c (yyparse): Prototype and define thanks to these.
7550 Adjust b4_c_function_def uses.
7551 * data/glr.c (yyparse): Likewise, but ANSI only.
7552
39912f52
AD
75532002-10-20 Akim Demaille <akim@epita.fr>
7554
7555 * src/output.c (prepare): Move the definition of `tokens_number',
7556 `nterms_number', `undef_token_number', `user_token_number_max'
7557 to...
7558 (prepare_tokens): Here.
7559 (prepare_tokens): Rename as...
7560 (prepare_symbols): this.
7561 (prepare): Move the definition of `rules_number' to...
7562 (prepare_rules): here.
7563 (prepare): Move the definition of `last', `final_state_number',
7564 `states_number' to...
7565 (prepare_states): here.
7566 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7567
20c1e2ad
AD
75682002-10-20 Akim Demaille <akim@epita.fr>
7569
7570 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7571
21964f43
AD
75722002-10-20 Akim Demaille <akim@epita.fr>
7573
7574 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7575 * data/c.m4: here.
7576
66d30cd4
AD
75772002-10-20 Akim Demaille <akim@epita.fr>
7578
7579 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
7580 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
7581 `pair'.
7582 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
7583 `name' to...
7584 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
7585 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
7586 These.
7587
95f2c9fe
PE
75882002-10-19 Paul Eggert <eggert@twinsun.com>
7589
7590 Do not create a temporary file, as that involves security and
7591 cleanup headaches. Instead, use a pair of pipes.
7592 Derived from a suggestion by Florian Krohm.
7593 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
7594 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
7595 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
7596 (BISON_PREREQ_SUBPIPE): Add.
7597 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
7598 Add subpipe.h, subpipe.c.
7599 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
7600 * po/POTFILES.in: Add lib/subpipe.c.
7601 * src/output.c: Include "subpipe.h".
7602 (m4_invoke): Remove decl.
7603 (scan_skel): New decl.
7604 (output_skeleton): Use pipe rather than temporary file for m4 input.
7605 Check that m4sugar.m4 is readable, to avoid deadlock.
7606 Check for pipe I/O error.
7607 * src/scan-skel.l (readpipe): Remove decl.
7608 (scan_skel): New function, to be used in place of m4_invoke.
7609 Read from stream rather than file.
66d30cd4 7610
95f2c9fe
PE
7611 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
7612 float, as this generates a warning on Solaris 8 + GCC 3.2 with
7613 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
7614 this generates a more-accurate value anyway.
7615
7616 * lib/timevar.c (timervar_accumulate): Rename locals to
7617 avoid confusion with similarly-named more-global.
7618 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
7619
7620 * src/output.c (prepare): Use xstrdup to convert char const *
7621 to char *, to avoid GCC warning.
7622
c19988b7
AD
76232002-10-19 Akim Demaille <akim@epita.fr>
7624
7625 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
7626 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
7627 Use them to have `calc.y' ready for %pure-parser.
7628 * data/yacc.c (YYLEX): Pass a yylex return type to
7629 b4_c_function_call.
7630
ae7453f2
AD
76312002-10-19 Akim Demaille <akim@epita.fr>
7632
7633 Prototype support of %lex-param and %parse-param.
7634
7635 * src/parse-gram.y: Add the definition of the %lex-param and
7636 %parse-param tokens, plus their rules.
7637 Drop the `_' version of %glr-parser.
7638 Add the "," token.
7639 * src/scan-gram.l (INITIAL): Scan them.
7640 * src/muscle_tab.c: Comment changes.
7641 (muscle_insert, muscle_find): Rename `pair' as `probe'.
7642 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
7643 (muscle_entry_s): The `value' member is no longer const.
7644 Adjust all dependencies.
7645 * src/muscle_tab.c (muscle_init): Adjust: use
7646 MUSCLE_INSERT_STRING.
7647 Initialize the obstack earlier.
7648 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
7649 (muscle_pair_list_grow): New.
7650 * data/c.m4 (b4_c_function_call, b4_c_args): New.
7651 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
7652 * tests/calc.at: Use %locations, not --locations.
7653 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
7654
0e575721
AD
76552002-10-19 Akim Demaille <akim@epita.fr>
7656
7657 * src/getargs.c (usage): Take status as argument and exit
7658 accordingly.
7659 Report the traditional `Try ... --help' message when status != 0.
7660 (usage, version): Don't take a FILE * as arg, it is pointless.
7661 (getargs): When there is an incorrect number of arguments, make it
7662 an error, and report it GNUlically thanks to `usage ()'.
7663
724ce7f5
PE
76642002-10-18 Paul Eggert <eggert@twinsun.com>
7665
3a781eb2
PE
7666 * data/glr.c (yyreportParseError): Don't assume that sprintf
7667 yields the length of the printed string, as this is not true
7668 on SunOS 4.1.4. Reported by Peter Klein.
7669
724ce7f5
PE
7670 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
7671 * tests/conflicts.at (%nonassoc and eof): Likewise.
7672 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
7673
473d0a75
AD
76742002-10-17 Akim Demaille <akim@epita.fr>
7675
7676 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
7677 * src/getargs.c (trace_types, trace_args): Adjust.
7678 * src/reader.c (grammar_current_rule_prec_set)
7679 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
7680 Standardize error messages.
7681 And s/@prec/%prec/!
7682 (reader): Use trace_flag to enable scanner/parser debugging,
7683 instead of an adhoc scheme.
7684 * src/scan-gram.l: Remove trailing debugging code.
7685
e76d2469
PE
76862002-10-16 Paul Eggert <eggert@twinsun.com>
7687
93e2236a
PE
7688 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
7689 MUSCLE_TAB_H.
7690
e76d2469
PE
7691 * NEWS: Officially drop support for building Bison with K&R C,
7692 since it didn't work anyway and it's not worth worrying about.
7693 * Makefile.maint (wget_files): Remove ansi2knr.c.
7694 (ansi2knr.c-url_prefix): Remove.
7695 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
7696 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7697 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7698
5bd1c419
PE
76992002-10-15 Paul Eggert <eggert@twinsun.com>
7700
7701 Stop using the "enum_" trick for K&R-style function definitions;
7702 it confused me, and I was the author! Instead, assume that people
7703 who want to use K&R C compilers (when using these modules in GCC,
7704 perhaps?) will run ansi2knr.
7705
7706 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
7707 All uses of "enum_" changed to "enum ".
7708 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7709 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 7710
5bd1c419
PE
7711 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
7712 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
7713 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
7714 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
7715 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
7716 abitset_not, abitset_ones, abitset_or, abitset_or_and,
7717 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
7718 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
7719 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
7720 Use function prototypes; this removes the need for declaring
7721 static functions simply to provide their prototypes.
7722 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
7723 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
7724 bitset_count_, bitset_create, bitset_dump, bitset_first,
7725 bitset_free, bitset_init, bitset_last, bitset_next,
7726 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
7727 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
7728 bitset_print, bitset_release_memory, bitset_toggle_,
7729 bitset_type_choose, bitset_type_get, bitset_type_name_get,
7730 debug_bitset): Likewise.
7731 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
7732 * lib/bitset_stats.c (bitset_log_histogram_print,
7733 bitset_percent_histogram_print, bitset_stats_and,
7734 bitset_stats_and_cmp, bitset_stats_and_or,
7735 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
7736 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
7737 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
7738 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
7739 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
7740 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
7741 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
7742 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
7743 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
7744 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
7745 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
7746 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
7747 bitset_stats_zero): Likewise.
7748 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7749 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7750 bitsetv_dump, debug_bitsetv): Likewise.
7751 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
7752 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
7753 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
7754 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
7755 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
7756 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
7757 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
7758 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
7759 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
7760 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
7761 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
7762 Likewise.
7763 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
7764 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
7765 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
7766 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
7767 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
7768 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
7769 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
7770 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
7771 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
7772 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
7773 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 7774
ae26e1f0
AD
77752002-10-14 Akim Demaille <akim@epita.fr>
7776
7777 Version 1.75.
7778
d43baf71
AD
77792002-10-14 Akim Demaille <akim@epita.fr>
7780
7781 * tests/Makefile.am (maintainer-check-posix): New.
7782
7ebc83e3
AD
77832002-10-14 Akim Demaille <akim@epita.fr>
7784
7785 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
7786 member.
7787
05846dae
AD
77882002-10-14 Akim Demaille <akim@epita.fr>
7789
7790 * src/tables.c (table_ninf_remap): base -> tab.
7791 Reported by Matt Rosing.
7792
1318e37d
PE
77932002-10-14 Paul Eggert <eggert@twinsun.com>
7794
447fbb17
PE
7795 * tests/action.at, tests/calc.at, tests/conflicts.at,
7796 tests/cxx-type.at, tests/headers.at, tests/input.at,
7797 tests/regression.at, tests/synclines.at, tests/torture.at:
7798 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
7799 so that the tests still work even if POSIXLY_CORRECT is set.
7800 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 7801
1318e37d
PE
7802 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
7803 for portability to K&R hosts. Fix typo: signed char is guaranteed
7804 only to 127, not to 128.
7805 * data/glr.c (yysigned_char): New type.
7806 * data/yacc.c (yysigned_char): Likewise.
7807 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
7808
cc0f0794
PE
78092002-10-13 Paul Eggert <eggert@twinsun.com>
7810
5038f418
PE
7811 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
7812 true due to limited range of data type" warning from GCC.
7813
cc0f0794
PE
7814 * data/c.m4 (b4_token_defines): Protect against double-inclusion
7815 by wrapping enum yytokentype's definition inside #ifndef
7816 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
7817
6fed0802
AD
78182002-10-13 Akim Demaille <akim@epita.fr>
7819
7820 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
7821 Un yy- yyrhs to avoid the name clash with the global YYRHS.
7822
32f0598d
AD
78232002-10-13 Akim Demaille <akim@epita.fr>
7824
7825 * Makefile.maint: Update from Autoconf 2.54.
7826 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
7827
7ea9a33f
AD
78282002-10-13 Akim Demaille <akim@epita.fr>
7829
7830 * src/print.c (print_state): Separate the list of solved conflicts
7831 from the other items.
7832 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
7833
ea99527d
AD
78342002-10-13 Akim Demaille <akim@epita.fr>
7835
7836 Let nondeterministic skeletons be usable with deterministic
7837 tables.
7838
7839 With the patch, GAWK compiled by GCC without -O2 passes its test
7840 suite using a GLR parser driven by LALR tables. It fails with -O2
7841 because `struct stat' gives two different answers on my machine:
7842 88 (definition of an auto var) and later 96 (memset on this var).
7843 Hence the stack is badly corrumpted. The headers inclusion is to
7844 blame: if I move the awk.h inclusion before GLR's system header
7845 inclusion, the two struct stat have the same size.
7846
7847 * src/tables.c (pack_table): Always create conflict_table.
7848 (token_actions): Always create conflict_list.
7849 * data/glr.c (YYFLAG): Remove, unused.
7850
f377f69f
AD
78512002-10-13 Akim Demaille <akim@epita.fr>
7852
7853 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
7854 (O0FLAGS): New.
7855 (VALGRIND, GXX): New.
7856 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
7857 * tests/bison.in: Run $PREBISON a pre-command.
7858 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
7859 (maintainer-check-g++): New.
7860 * Makefile.am (maintainer-check): New.
7861
2a1fe6ed
AD
78622002-10-13 Akim Demaille <akim@epita.fr>
7863
7864 * data/glr.c: Formatting changes.
7865 Tweak some trace messages to match yacc.c's.
7866
f50adbbd
AD
78672002-10-13 Akim Demaille <akim@epita.fr>
7868
7869 GLR parsers sometimes raise parse errors instead of performing the
7870 default reduction.
7871 Reported by Charles-Henry de Boysson.
7872
7873 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 7874 check the length of the traces when %glr.
f50adbbd
AD
7875 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
7876 GLR's traces.
7877 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
7878 Test GLR parsers.
7879 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
7880 (yyltype): Remove the yy prefix from the member names.
7881 (yytable): Complete its comment.
7882 (yygetLRActions): Map error action number from YYTABLE from
7883 YYTABLE_NINF to 0.
7884 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
7885 (which was a bug: it should have been YYTABEL_NINF, and yet it was
7886 not satisfying as we could compare an YYACTION computed from
7887 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
7888 only value for error actions.
7889 (yyreportParseError): In verbose parse error messages, don't issue
7890 `error' in the list of expected tokens.
7891 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
7892 next action to perform to match glr.c's decoding.
7893 (yytable): Complete its comment.
7894
bcbad5b9
PE
78952002-10-13 Paul Eggert <eggert@twinsun.com>
7896
7897 Fix problem reported by Henrik Grubbstroem in
161a71f3 7898 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
7899 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
7900 because the Bison parser reads the second action before reducing
7901 the first one.
7902 * src/scan-gram.l (rule_length): New static var.
7903 Use it to keep track of the rule length in the scanner, since
7904 we can't expect the parser to be in lock-step sync with the scanner.
7905 (handle_action_dollar, handle_action_at): Use this var.
7906 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 7907
14904b89
PE
79082002-10-12 Paul Eggert <eggert@twinsun.com>
7909
1fe611e5
PE
7910 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
7911 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
7912 Include <sys/time.h> when checking for clock_t and struct tms.
7913 Use same include order as source.
7914 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 7915 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 7916
1fe611e5
PE
7917 * lib/timevar.c: Update copyright date and clarify comments.
7918 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 7919
1fe611e5
PE
7920 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
7921 GCC version as of today, then merge Bison's changes.
7922 Change "GCC" to "Bison" in copyright notice. timevar.def's
7923 author is Akim, so change that too.
7924
98194095
PE
7925 * src/reader.c (grammar_current_rule_check):
7926 Don't worry about the default action if $$ is untyped.
7927 Prevents bogus warnings reported by Jim Gifford in
161a71f3 7928 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 7929
14904b89
PE
7930 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
7931 * data/glr.c, data/lalr1.cc, data/yacc.c:
7932 Output token definitions before the first part of user declarations.
7933 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 7934 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 7935
ff6dca18
PE
79362002-10-11 Paul Eggert <eggert@twinsun.com>
7937
7938 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
7939 (yyparse): here. This undoes some of the 2002-07-25 change.
7940 Compatibility problem reported by Ralf S. Engelschall with
7941 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
7942
eb714592
AD
79432002-10-11 Akim Demaille <akim@epita.fr>
7944
7945 * tests/regression.at Characters Escapes): New.
7946 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
7947 characters.
7948 Reported by Jan Nieuwenhuizen.
7949
b7195100
AD
79502002-10-11 Akim Demaille <akim@epita.fr>
7951
7952 * po/id.po: New.
7953
f28a0f2d
PE
79542002-10-10 Paul Eggert <eggert@twinsun.com>
7955
7956 Portability fixes for bitsets; this also avoids several GCC
7957 warnings.
7958
7959 * lib/abitset.c: Include <stddef.h>, for offsetof.
7960 * lib/lbitset.c: Likewise.
7961
7962 * lib/abitset.c (abitset_bytes): Return a size that is aligned
7963 properly for vectors of objects. Do not assume that adding a
7964 header size to a multiple of a word size yields a value that is
7965 properly aligned for the whole union.
7966 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7967
7968 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
7969 unique names for structures.
7970 * lib/ebitset.c (ebitset_bytes): Likewise.
7971 * lib/lbitset.c (lbitset_bytes): Likewise.
7972
7973 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
7974 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
7975 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
7976 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
7977 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
7978 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
7979 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
7980 to improve the type-checking that GCC can do.
7981 * lib/bitset.c (bitset_op4_cmp): Likewise.
7982 * lib/bitset_stats.c (bitset_stats_count,
7983 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
7984 bitset_stats_copy, bitset_stats_disjoint_p,
7985 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
7986 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
7987 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
7988 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
7989 bitset_stats_and_or_cmp, bitset_stats_andn_or,
7990 bitset_stats_andn_or_cmp, bitset_stats_or_and,
7991 bitset_stats_or_and_cmp): Likewise.
7992 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
7993 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
7994 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
7995 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
7996
7997 * lib/abitset.h: Include bitset.h, not bbitset.h.
7998 * lib/ebitset.h: Likewise.
7999 * lib/lbitset.h: Likewise.
8000
8001 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
8002 All instances of parameters of type enum bitset_opts are now of
8003 type enum_bitset_opts, to conform to the C Standard, and similarly
8004 for enum_bitset_type.
8005 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8006 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8007
8008 Do not use "struct bitset_struct" to mean different things in
8009 different modules. Not only is this confusing, it violates
8010 the C Standard, which requires that structure types in different
8011 modules must be compatible if one is to be passed to the other.
8012 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
8013 All instances of "struct bitset_struct *" replaced with "bitset".
8014 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
8015 (union bitset_union, struct abitset_struct, struct ebitset_struct,
8016 struct lbitset_struct, struct bitset_stats_struct): New types.
8017 All uses of struct bitset_struct changed to union bitset_union,
8018 etc.
ba0fe3c7 8019 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
8020 struct bitset_struct): Remove.
8021 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
8022 struct bitset_struct): Remove.
8023 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
8024 bitset_struct): Remove.
8025 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
8026 Likewise.
8027
8028 Do not call a function of type T using a call that assumes the
8029 function is of a different type U. Standard C requires that a
8030 function must be called with a type that is compatible with its
8031 definition.
8032 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8033 New decls.
8034 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8035 New functions.
8036 * lib/ebitset.c (PFV): Remove.
8037 * lib/lbitset.c (PFV): Likewise.
8038 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
8039 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
8040 decls.
8041 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
8042 (ebitset_vtable): Use them.
8043 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
8044 lbitset_xor): New functions.
8045 (lbitset_vtable): Use them.
8046
8047 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
8048 Declare.
8049
8050 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
8051 GCC warning.
8052 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
8053 Use offsetof, for simplicity.
8054
6fbe4984
PE
80552002-10-06 Paul Eggert <eggert@twinsun.com>
8056
8057 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
8058 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 8059 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
8060 which was inadvertently undone by the 2002-09-30 patch.
8061 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
8062 the same width as int.
8063
420f93c8
PE
80642002-10-04 Paul Eggert <eggert@twinsun.com>
8065
8066 Version 1.50.
8067
8068 * configure.ac (AC_INIT), NEWS: Increment version number.
8069
8070 * doc/bison.texinfo: Minor spelling, grammar, and white space
8071 fixes.
8072 (Symbols): Mention that any negative value returned from yylex
8073 signifies end-of-input. Warn about negative chars. Mention
8074 the portable Standard C character set.
8075
8076 The GNU coding standard says CFLAGS and YFLAGS are reserved
8077 for the installer to set.
8078 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
8079 * src/Makefile.am (AM_CFLAGS): Likewise.
8080 (AM_YFLAGS): Renamed from YFLAGS.
8081
8082 Fix some MAX and MIN problems.
8083 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
8084 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
8085 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
8086 * src/reader.c (reader): Use it.
8087
8088 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
8089 POSIX 1003.1-2001 has removed fgrep.
8090
80912002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
8092
8093 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
8094 interpreted as signed.
8095 * lib/ebitset.c (ebitset_list): Fix bug.
8096
ff68026d
PE
80972002-10-01 Paul Eggert <eggert@twinsun.com>
8098
8099 More fixes for 64-bit hosts and large bitsets.
8100
8101 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
8102 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
8103 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8104 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
8105 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
8106 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
8107 bitset_count_): Likewise.
8108 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
8109 bitset_first, bitset_last): Likewise.
8110 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
8111 bitset_stats_list_reverse, bitset_stats_size,
8112 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
8113 Likewise.
8114 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8115 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8116 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8117 bitsetv_reflexive_transitive_closure): Likewise.
8118 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
8119 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
8120 Likewise.
8121 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
8122 Likewise.
420f93c8 8123
ff68026d
PE
8124 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
8125 Use size_t, not unsigned int, to count bytes.
8126 * lib/abitset.h (abitset_bytes): Likewise.
8127 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
8128 Likewise.
8129 * lib/bitset.h (bitset_bytes): Likewise.
8130 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
8131 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
8132 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8133 * lib/ebitset.c (ebitset_bytes): Likewise.
8134 * lib/ebitset.h (ebitset_bytes): Likewise.
8135 * lib/lbitset.c (lbitset_bytes): Likewise.
8136 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 8137
ff68026d
PE
8138 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
8139 abitset_subset_p, abitset_disjoint_p, abitset_and,
8140 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
8141 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
8142 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
8143 abitset_or_and, abitset_or_and_cmp):
8144 Use bitset_windex instead of unsigned int.
8145 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8146 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
8147 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
8148 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
8149 Likewise.
8150 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 8151
ff68026d
PE
8152 * lib/bitset.c (bitset_print):
8153 Use proper printf formats for widths of integer types.
8154 * lib/bitset_stats.c (bitset_percent_histogram_print,
8155 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
8156 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8157 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8158 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 8159
ff68026d
PE
8160 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
8161 BITSET_SIZE_MAX): New macros.
8162 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
8163 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
8164 to BITSET_WINDEX_MAX.
8165
8166 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
8167 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
8168 since we now return the bitset_bindex type (not int).
8169
8170 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
8171 when computing sizes.
8172 * lib/ebitset.c (ebitset_elts_grow): Likewise.
8173
8174 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
8175 and avoid cast to unsigned.
8176
6aa452a6
AD
81772002-09-30 Akim Demaille <akim@epita.fr>
8178
8179 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8180 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
8181 Updates from Michael Hayes.
8182
927f7817
AD
81832002-09-30 Art Haas <ahaas@neosoft.com>
8184
8185 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
8186 invocations.
8187 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
8188 defined.
8189
9738f41e
AD
81902002-09-27 Akim Demaille <akim@epita.fr>
8191
8192 Version 1.49c.
8193
a5c75d7f
AD
81942002-09-27 Akim Demaille <akim@epita.fr>
8195
8196 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
8197 (Because of AC_LIBSOURCE).
8198
8280e179
AD
81992002-09-27 Akim Demaille <akim@epita.fr>
8200
8201 Playing with Autoscan.
8202
8203 * configure.ac: Remove the old LIBOBJ tweaks.
8204 (AC_REPLACE_FUNCS): Add strrchr and strtol.
8205 * lib/strrchr.c: New.
8206 * lib/strtol.c: New, from the Coreutils 4.5.1.
8207
ae64af35
AD
82082002-09-27 Akim Demaille <akim@epita.fr>
8209
8210 Playing with Autoscan.
8211
8212 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
8213 * lib/Makefile.am (libbison_a_SOURCES): No longer include
8214 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
8215 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
8216 Coreutils 4.5.1.
8217
d1a1114f
AD
82182002-09-24 Akim Demaille <akim@epita.fr>
8219
8220 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
8221 (Frequently Asked Questions, Parser Stack Overflow): New.
8222
b906441c
AD
82232002-09-13 Akim Demaille <akim@epita.fr>
8224
8225 Playing with autoscan.
8226
8227 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
8228 * src/files.c (skeleton_find): Remove, unused.
8229 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
8230 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
8231
bd701811
AD
82322002-09-13 Akim Demaille <akim@epita.fr>
8233
8234 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
8235 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
8236
e0a13e7b
AD
82372002-09-13 Akim Demaille <akim@epita.fr>
8238
8239 * configure.ac: Require 2.54.
8240 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
8241 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
8242 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
8243 Remove, provided by Autoconf macros.
8244
c97011bf
AD
82452002-09-12 Akim Demaille <akim@epita.fr>
8246
8247 * m4/prereq.m4: Update, from Coreutils 4.5.1.
8248
d862b1be
AD
82492002-09-12 Akim Demaille <akim@epita.fr>
8250
8251 * m4/prereq.m4: Update, from Fileutils 4.1.5.
8252 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
8253 Reported by Martin Mokrejs.
8254
3d38c03a
AD
82552002-09-10 Akim Demaille <akim@epita.fr>
8256
8257 * src/parse-gram.y: Associate a human readable string to each
8258 token type.
8259 * tests/regression.at (Invalid inputs): Adjust.
8260
b6347355
AD
82612002-09-10 Gary V. Vaughan <gary@gnu.org>
8262
8263 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
8264 with an Autoconf-2.5x style configure.ac.
8265
09ba4ab2
PE
82662002-09-06 Paul Eggert <eggert@twinsun.com>
8267
8268 * doc/bison.texinfo (Conditions): Make explicit that the GPL
8269 exception applies only to yacc.c. This is a modification of a
8270 patch originally suggested by Akim Demaille.
8271
21846f69
AD
82722002-09-06 Akim Demaille <akim@epita.fr>
8273
09ba4ab2
PE
8274 * data/c.m4 (b4_copyright): Move the GPL exception comment from
8275 here to...
8276 * data/yacc.c: here.
8277
21846f69
AD
8278 * data/lalr1.cc (struct yyltype): Don't define it, since we use
8279 LocationType.
8280 (b4_ltype): Default to yy::Location from location.hh.
8281
c0ad8bf3
AD
82822002-09-04 Jim Meyering <jim@meyering.net>
8283
8284 * data/yacc.c: Guard the declaration of yytoknum also with
8285 `#ifdef YYPRINT', so it is declared only when used.
8286
3a93251e
AD
82872002-09-04 Akim Demaille <akim@epita.fr>
8288
8289 * configure.in: Rename as...
8290 * configure.ac: this.
8291 Bump to 1.49c.
8292
427c0dda
AD
82932002-09-04 Akim Demaille <akim@epita.fr>
8294
8295 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8296 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8297 translate maintainer only messages.
8298
6a254321
PE
82992002-08-12 Paul Eggert <eggert@twinsun.com>
8300
645e30d1
PE
8301 Version 1.49b.
8302
6a254321
PE
8303 * Makefile.am (SUBDIRS): Remove intl.
8304 (DISTCLEANFILES): Remove.
8305 * NEWS: Mention that GNU M4 is now required. Clarify what is
8306 meant by "larger grammars". Mention the pt_BR translation.
8307 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8308 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8309 Bump version from 0.11.2 to 0.11.5.
8310 (BISON_PREREQ_STAGE): Remove.
8311 (AM_GNU_GETTEXT): Use external gettext.
8312 (AC_OUTPUT): Remove intl/Makefile.
8313
8314 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8315
8316 * data/glr.c: Include string.h, for strlen.
8317 (yyreportParseError): Use size_t for yysize.
8318 (yy_yypstack): No longer nested inside yypstates, as nested
8319 functions are not portable. Do not assume size_t is the
8320 same width as int.
8321 (yypstates): Do not assume that ptrdiff_t is the same width
8322 as int, and similarly for yyposn and YYINDEX.
8323
8324 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8325
8326 * lib/Makefile.am (INCLUDES): Do not include from the intl
8327 directory, which has been removed.
8328 * src/Makefile.am (INCLUDES): Likewise.
8329
8330 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8331 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8332 New vars.
8333
8334 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8335 * tests/Makefile.am (EXTRA_DIST): Likewise.
8336
8337 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8338 Do not assume that bitset_windex is the same width as unsigned.
8339
8340 * lib/abitset.c (abitset_unused_clear): Do not assume that
8341 bitset_word is the same width as int.
8342 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8343 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8344 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8345 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8346 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8347
8348 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8349 portability to one's complement hosts!).
8350 * lib/ebitset.c (ebitset_op1): Likewise.
8351 * lib/lbitset.c (lbitset_op1): Likewise.
8352
8353 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8354 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8355 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8356 Sync with fileutils.
8357 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8358 lib/gettext.h: Sync with diffutils.
8359
8360 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8361 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8362
8363 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
8364 PROTOTYPES to check for prototypes, and "defined __STDC__" to
8365 check for void *.
8366
8367 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
8368 size_t; the old version tried to do this but casted improperly.
8369 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
8370 (bitset_test): Now returns int, not unsigned long.
8371
8372 * lib/bitset_stats.c: Include "gettext.h".
8373 (_): New macro.
8374 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
8375 name locals "index", as it generates unnecessary warnings on some
8376 hosts that have an "index" function.
8377
8378 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
8379 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
8380 they need translation.
8381 * src/LR0.c (state_list_append, new_itemsets, get_state,
8382 append_states, generate_states): Likewise.
8383 * src/assoc.c (assoc_to_string): Likewise.
8384 * src/closure.c (print_closure, set_firsts, closure): Likewise.
8385 * src/gram.c (grammar_dump): Likewise.
8386 * src/injections.c (injections_compute): Likewise.
8387 * src/lalr.c (lookaheads_print): Likewise.
8388 * src/relation.c (relation_transpose): Likewise.
8389 * src/scan-gram.l: Likewise.
8390 * src/tables.c (table_grow, pack_vector): Likewise.
8391
8392 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
8393 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
8394 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
8395 * m4/mbstate_t.m4: Sync with fileutils.
8396 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
8397
8398 * po/LINGUAS: Add pt_BR.
8399 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
8400 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
8401 lib/timevar.c.
8402 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
8403 manual recommends.
8404 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
8405
8406 * src/complain.c (strerror_r): Remove decl; not needed.
8407 (strerror): Use same pattern as ../lib/error.c.
8408
8409 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
8410
8411 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
8412
8413 * src/main.c (main): Cast result of bindtextdomain and textdomain
8414 to void, to avoid a GCC warning when --disable-nls is in effect.
8415
8416 * src/scan-gram.l: Use strings rather than escapes when possible,
8417 to minimize the number of warnings from xgettext.
8418 (handle_action_dollar, handle_action_at): Don't use isdigit,
8419 as it mishandles negative chars and it may not work as expected
8420 outside the C locale.
8421
8422 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
8423 this is a GCC extension and is not portable to other compilers.
8424
8425 * src/system.h (alloca): Use same pattern as ../lib/error.c.
8426 Do not include <ctype.h>; no longer needed.
8427 Do not include <malloc.h>; no longer needed (and generates
8428 warnings on OpenBSD 3.0).
8429
8430 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
8431 it's not portable.
8432
8433 * tests/regression.at: Do not use 'cc -c input.c -o input';
8434 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
8435
8436 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
8437 exit status as failure, not just exit status 1. Sun C exits
8438 with status 2 sometimes.
8439
8440 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
8441 Use it for the two large tests.
8442
c8f002c7
AD
84432002-08-02 Akim Demaille <akim@epita.fr>
8444
8445 * src/conflicts.c (conflicts_output): Don't output rules never
8446 reduced here, since anyway that computation doesn't work.
8447 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
8448 (rule_useless_p, rule_never_reduced_p): New.
8449 (grammar_rules_partial_print): Use a filter instead of a range.
8450 Display the title only if needed.
8451 (grammar_rules_print): Adjust.
8452 (grammar_rules_never_reduced_report): New.
8453 * src/tables.c (action_row): Move the computation of rules never
8454 reduced to...
8455 (token_actions): here.
8456 * src/main.c (main): Make the parser before making the report, so
8457 that rules never reduced are computed.
8458 Call grammar_rules_never_reduced_report.
8459 * src/print.c (print_results): Report rules never reduced.
8460 * tests/conflicts.at, tests/reduce.at: Adjust.
8461
cd08e51e
AD
84622002-08-01 Akim Demaille <akim@epita.fr>
8463
8464 Instead of attaching lookaheads and duplicating the rules being
8465 reduced by a state, attach the lookaheads to the reductions.
8466
8467 * src/state.h (state_t): Remove the `lookaheads',
8468 `lookaheads_rule' member.
8469 (reductions_t): Add a `lookaheads' member.
8470 Use a regular array for the `rules'.
8471 * src/state.c (reductions_new): Initialize the lookaheads member
8472 to 0.
8473 (state_rule_lookaheads_print): Adjust.
8474 * src/state.h, src/state.c (state_reductions_find): New.
8475 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
8476 (count_rr_conflicts): Adjust.
8477 * src/lalr.c (LArule): Remove.
8478 (add_lookback_edge): Adjust.
8479 (state_lookaheads_count): New.
8480 (states_lookaheads_initialize): Merge into...
8481 (initialize_LA): this.
8482 (lalr_free): Adjust.
8483 * src/main.c (main): Don't free nullable and derives too early: it
8484 is used by --verbose.
8485 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
8486
bb0027a9
AD
84872002-08-01 Akim Demaille <akim@epita.fr>
8488
8489 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
8490 `rule_number_t**'.
8491 (set_derives, free_derives): Rename as...
8492 (derives_compute, derives_free): this.
8493 Adjust all dependencies.
8494 * src/nullable.c (set_nullable, free_nullable): Rename as...
8495 (nullable_compute, nullable_free): these.
8496 (rule_list_t): Store rule_t *, not rule_number_t.
8497 * src/state.c (state_rule_lookaheads_print): Directly compare rule
8498 pointers, instead of their numbers.
8499 * src/main.c (main): Call nullable_free, and derives_free earlier,
8500 as they were lo longer used.
8501
3325ddc4
AD
85022002-08-01 Akim Demaille <akim@epita.fr>
8503
8504 * lib/timevar.c (get_time): Include children time.
8505 * src/lalr.h (LA, LArule): Don't export them: used with the
8506 state_t.
8507 * src/lalr.c (LA, LArule): Static.
8508 * src/lalr.h, src/lalr.c (lalr_free): New.
8509 * src/main.c (main): Call it.
8510 * src/tables.c (pack_vector): Check whether loc is >= to the
8511 table_size, not >.
8512 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
8513 (tables_generate): do it, since that's also it which allocates
8514 them.
8515 Don't free LA and LArule, main does.
8516
c6f1a33c
AD
85172002-07-31 Akim Demaille <akim@epita.fr>
8518
8519 Separate parser tables computation and output.
8520
8521 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
8522 (conflict_list, conflict_list_cnt, table, check, table_ninf)
8523 (yydefgoto, yydefact, high): Move to...
8524 * src/tables.h, src/tables.c: here.
8525 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8526 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8527 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
8528 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
8529 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
8530 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8531 (action_row, save_row, token_actions, save_column, default_goto)
8532 (goto_actions, sort_actions, matching_state, pack_vector)
8533 (table_ninf_remap, pack_table, prepare_actions): Move to...
8534 * src/tables.c: here.
8535 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8536 * src/output.c (token_actions, output_base, output_conflicts)
8537 (output_check): Merge into...
8538 (prepare_actions): this.
8539 (actions_output): Rename as...
8540 (user_actions_output): this.
8541 * src/main.c (main): Call tables_generate and tables_free.
8542
1509d42f
AD
85432002-07-31 Akim Demaille <akim@epita.fr>
8544
8545 Steal GCC's --time-report support.
8546
8547 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8548 stolen/adjusted from GCC.
8549 * m4/stage.m4: Remove time related checks.
8550 * m4/timevar.m4: New.
8551 * configure.in: Adjust.
8552 * src/system.h: Adjust to using timevar.h.
8553 * src/getargs.h, src/getargs.c: Support trace_time for
8554 --trace=time.
8555 * src/main.c (stage): Remove.
8556 (main): Replace `stage' invocations with timevar calls.
8557 * src/output.c: Insert pertinent timevar calls.
8558
273a74fa
AD
85592002-07-31 Akim Demaille <akim@epita.fr>
8560
8561 Let --trace have arguments.
8562
8563 * src/getargs.h (enum trace_e): New.
8564 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8565 (long_options, short_options): --trace/-T takes an optional
8566 argument.
8567 Change all the uses of trace_flag to reflect the new flags.
8568 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8569
8570 Strengthen `stage' portability.
8571
8572 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8573 * configure.in: Use it.
8574 Don't check for malloc.h and sys/times.h.
8575 * src/system.h: Include them when appropriate.
8576 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
8577 times and struct tms are available.
8578
217598da
AD
85792002-07-30 Akim Demaille <akim@epita.fr>
8580
8581 In verbose parse error message, don't report `error' as an
8582 expected token.
8583 * tests/actions.at (Printers and Destructors): Adjust.
8584 * tests/calc.at (Calculator $1): Adjust.
8585 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
8586 error message, do not report the parser accepts the error token in
8587 that state.
8588
52489d44
AD
85892002-07-30 Akim Demaille <akim@epita.fr>
8590
8591 Normalize conflict related messages.
8592
8593 * src/complain.h, src/complain.c (warn, complain): New.
8594 * src/conflicts.c (conflicts_print): Use them.
8595 (conflict_report_yacc): New, extracted from...
8596 (conflicts_print): here.
8597 * tests/conflicts.at, tests/existing.at: Adjust.
8598
e8832397
AD
85992002-07-30 Akim Demaille <akim@epita.fr>
8600
8601 Report rules which are never reduced by the parser: those hidden
8602 by conflicts.
8603
8604 * src/LR0.c (save_reductions): Don't make the final state too
8605 different: save its reduction (accept) instead of having a state
8606 without any action (no shift or goto, no reduce).
8607 Note: the final state is now a ``regular'' state, i.e., the
8608 parsers now contain `reduce 0' as default reduction.
8609 Nevertheless, since they decide to `accept' when yystate =
8610 final_state, they still will not reduce rule 0.
8611 * src/print.c (print_actions, print_reduction): Adjust.
8612 * src/output.c (action_row): Track reduced rules.
8613 (token_actions): Report rules never reduced.
8614 * tests/conflicts.at, tests/regression.at: Adjust.
8615
caf23d24
AD
86162002-07-30 Akim Demaille <akim@epita.fr>
8617
8618 `stage' was accidently included in a previous patch.
8619 Initiate its autoconfiscation.
8620
8621 * configure.in: Look for malloc.h and sys/times.h.
8622 * src/main.c (stage): Adjust.
8623 Report only when trace_flag.
8624
640748ee
AD
86252002-07-29 Akim Demaille <akim@epita.fr>
8626
8627 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
8628 state_number_t.
8629 (errs_t): symbol_t*, not symbol_number_t.
8630 (reductions_t): rule_t*, not rule_number_t.
8631 (FOR_EACH_SHIFT): New.
8632 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
8633 * src/print.c, src/print_graph.c: Adjust.
8634
88bce5a2
AD
86352002-07-29 Akim Demaille <akim@epita.fr>
8636
8637 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
8638
8639 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
8640 (endtoken, accept): these.
8641 * src/reader.c (reader): Set endtoken's default tag to "$end".
8642 Set undeftoken's tag to "$undefined" instead of "$undefined.".
8643 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
8644 Adjust.
8645
1bfb97db
AD
86462002-07-29 Akim Demaille <akim@epita.fr>
8647
8648 * src/reduce.c (reduce_grammar): When the language is empty,
8649 complain about the start symbol, not the axiom.
8650 Use its location.
8651 * tests/reduce.at (Empty Language): New.
8652
fc5734fe
AD
86532002-07-26 Akim Demaille <akim@epita.fr>
8654
8655 * src/reader.h, src/reader.c (gram_error): ... can't get
8656 yycontrol without making too strong assumptions on the parser
8657 itself.
8658 * src/output.c (prepare_tokens): Use the real 0th value of
8659 token_translations instead of `0'.
8660 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
8661 visible here.
8662 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
8663 for the time being: %locations ought to provide it to yyerror.
8664
3650b4b8
AD
86652002-07-25 Akim Demaille <akim@epita.fr>
8666
8667 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
8668 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
8669 * tests/regression.at (Web2c Actions): Adjust.
8670
4b3d3a8e
AD
86712002-07-25 Akim Demaille <akim@epita.fr>
8672
8673 Stop storing rules from 1 to nrules + 1.
8674
8675 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
8676 * src/nullable.c, src/output.c, src/print.c, src/reader.c
8677 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
8678 Iterate from 0 to nrules.
8679 Use rule_number_as_item_number and item_number_as_rule_number.
8680 Adjust to `derive' now containing possibly 0.
8681 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
8682 Handle the `- 1' part in rule numbers from/to item numbers.
8683 * src/conflicts.c (log_resolution): Fix the message which reversed
8684 shift and reduce.
8685 * src/output.c (action_row): Initialize default_rule to -1.
8686 (token_actions): Adjust.
8687 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
8688 expected output.
8689 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
8690
4a2a22f4
AD
86912002-07-25 Akim Demaille <akim@epita.fr>
8692
8693 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
8694 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
8695 (b4_c_knr_arg_decl): New.
8696 * data/yacc.c: Use it to define yysymprint, yydestruct, and
8697 yyreport_parse_error.
8698
b8df3223
AD
86992002-07-25 Akim Demaille <akim@epita.fr>
8700
8701 * data/yacc.c (yyreport_parse_error): New, extracted from...
8702 (yyparse): here.
8703 (yydestruct, yysymprint): Move above yyparse.
8704 Be K&R compliant.
8705
a762e609
AD
87062002-07-25 Akim Demaille <akim@epita.fr>
8707
8708 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
8709 replace...
8710 (b4_sint_type, b4_uint_type): these.
8711 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
8712 * tests/regression.at (Web2c Actions): Adjust.
8713
12b0043a
AD
87142002-07-25 Akim Demaille <akim@epita.fr>
8715
8716 * src/gram.h (TIEM_NUMBER_MAX): New.
8717 (item_number_of_rule_number, rule_number_of_item_number): Rename
8718 as...
8719 (rule_number_as_item_number, item_number_as_rule_number): these.
8720 Adjust dependencies.
8721 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8722 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8723 (symbol_number_to_vector_number): New.
8724 (order): Of vector_number_t* type.
8725 (base_t, BASE_MAX, BASE_MIN): New.
8726 (froms, tos, width, pos, check): Of base_t type.
8727 (action_number_t, ACTION_MIN, ACTION_MAX): New.
8728 (actrow): Of action_number_t type.
8729 (conflrow): Of unsigned int type.
8730 (table_ninf, base_ninf): New.
8731 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
8732 (muscle_insert_int_table, muscle_insert_base_table)
8733 (muscle_insert_rule_number_table): New.
8734 (prepare_tokens): Output `toknum' as int_table.
8735 (action_row): Returns a rule_number_t.
8736 Use ACTION_MIN, not SHRT_MIN.
8737 (token_actions): yydefact is rule_number_t*.
8738 (table_ninf_remap): New.
8739 (pack_table): Use it for `base' and `table'.
8740 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
8741 replaced with...
8742 (YYPACT_NINF, YYTABLE_NINF): these.
8743 (yypact, yytable): Compute their types instead of hard-coded
8744 `short'.
8745 * tests/regression.at (Web2c Actions): Adjust.
8746
5dde258a
AD
87472002-07-19 Akim Demaille <akim@epita.fr>
8748
8749 * src/scan-gram.l (id): Can start with an underscore.
8750
a945ec39
AD
87512002-07-16 Akim Demaille <akim@epita.fr>
8752
8753 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
8754 Adjust all former `associativity' dependencies.
8755 * src/symtab.c (symbol_new): Default associativity is `undef', not
8756 `right'.
8757 (symbol_check_alias_consistence): Adjust.
8758
fae437e8
AD
87592002-07-09 Akim Demaille <akim@epita.fr>
8760
8761 * doc/bison.texinfo: Properly set the ``header'' part.
8762 Use @dircategory ``GNU programming tools'' as per Texinfo's
8763 documentation.
8764 Use @copying.
8765
1a715ef2
AD
87662002-07-09 Akim Demaille <akim@epita.fr>
8767
8768 * lib/quotearg.h: Protect against multiple inclusions.
8769 * src/location.h (location_t): Add a `file' member.
8770 (LOCATION_RESET, LOCATION_PRINT): Adjust.
8771 * src/complain.c (warn_at, complain_at, fatal_at): Drop
8772 `error_one_per_line' support.
8773
a5d50994
AD
87742002-07-09 Akim Demaille <akim@epita.fr>
8775
8776 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
8777 * src/reader.c (lineno): Remove.
8778 Adjust all dependencies.
8779 (get_merge_function): Take a location and use complain_at.
8780 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
8781 * tests/regression.at (Invalid inputs, Mixing %token styles):
8782 Adjust.
8783
b275314e
AD
87842002-07-09 Akim Demaille <akim@epita.fr>
8785
8786 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
8787 recovery rule, and forbid extensions when --yacc.
8788 (gram_error): Use complain_at.
8789 * src/reader.c (reader): Exit if there were parse errors.
8790
865b9df1
AD
87912002-07-09 Akim Demaille <akim@epita.fr>
8792
8793 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
8794 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
8795 Reported by R Blake <blakers@mac.com>.
8796
c76e14da
AD
87972002-07-09 Akim Demaille <akim@epita.fr>
8798
8799 * data/yacc.c: Output the copyright notive in the header.
8800
7db2ed2d
AD
88012002-07-03 Akim Demaille <akim@epita.fr>
8802
8803 * src/output.c (froms, tos): Are state_number_t.
8804 (save_column): sp, sp1, and sp2 are state_number_t.
8805 (prepare): Rename `final' as `final_state_number', `nnts' as
8806 `nterms_number', `nrules' as `rules_number', `nstates' as
8807 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
8808 unused.
8809 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
8810 * data/lalr1.cc (nsym_): Remove, unused.
8811
e68e0410
AD
88122002-07-03 Akim Demaille <akim@epita.fr>
8813
8814 * src/lalr.h, src/lalr.c (goto_number_t): New.
8815 * src/lalr.c (goto_list_t): New.
8816 Propagate them.
8817 * src/nullable.c (rule_list_t): New.
8818 Propagate.
8819 * src/types.h: Remove.
8820
e1a4f3a4
AD
88212002-07-03 Akim Demaille <akim@epita.fr>
8822
8823 * src/closure.c (print_fderives): Use rule_rhs_print.
8824 * src/derives.c (print_derives): Use rule_rhs_print.
8825 (rule_list_t): New, replaces `shorts'.
8826 (set_derives): Add comments.
8827 * tests/sets.at (Nullable, Firsts): Adjust.
8828
536545f3
AD
88292002-07-03 Akim Demaille <akim@epita.fr>
8830
8831 * src/output.c (prepare_actions): Free `tally' and `width'.
8832 (prepare_actions): Allocate and free `order'.
8833 * src/symtab.c (symbols_free): Free `symbols'.
8834 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
8835 * src/output.c (m4_invoke): Move to...
8836 * src/scan-skel.l: here.
8837 (<<EOF>>): Close yyout, and free its name.
8838
8b752b00
AD
88392002-07-03 Akim Demaille <akim@epita.fr>
8840
8841 Fix some memory leaks, and fix a bug: state 0 was examined twice.
8842
8843 * src/LR0.c (new_state): Merge into...
8844 (state_list_append): this.
8845 (new_states): Merge into...
8846 (generate_states): here.
8847 (set_states): Don't ensure a proper `errs' state member here, do it...
8848 * src/conflicts.c (conflicts_solve): here.
8849 * src/state.h, src/state.c: Comment changes.
8850 (state_t): Rename member `shifts' as `transitions'.
8851 Adjust all dependencies.
8852 (errs_new): For consistency, also take the values as argument.
8853 (errs_dup): Remove.
8854 (state_errs_set): New.
8855 (state_reductions_set, state_transitions_set): Assert that no
8856 previous value was assigned.
8857 (state_free): New.
8858 (states_free): Use it.
8859 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
8860 temporary storage: use `errs' and `nerrs' as elsewhere.
8861 (set_conflicts): Allocate and free this `errs'.
8862
613f5e1a
AD
88632002-07-02 Akim Demaille <akim@epita.fr>
8864
8865 * lib/libiberty.h: New.
8866 * lib: Update the bitset implementation from upstream.
8867 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
8868 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
8869 * src/main.c: Adjust bitset stats calls.
8870
26e0cadc
PE
88712002-07-01 Paul Eggert <eggert@twinsun.com>
8872
8873 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
8874 char, so that negative chars don't collide with $.
8875
1154cced
AD
88762002-06-30 Akim Demaille <akim@epita.fr>
8877
8878 Have the GLR tests be `warning' checked, and fix the warnings.
8879
8880 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
8881 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
8882 (yyremoveDeletes): `yyi' and `yyj' are size_t.
8883 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
8884 (yyaddDeferredAction): static.
8885 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
8886 (yyreportParseError): yyprefix is const.
8887 yytokenp is used only when verbose.
8888 (yy__GNUC__): Replace with __GNUC__.
8889 (yypdumpstack): yyi is size_t.
8890 (yypreference): Un-yy local variables and arguments, to avoid
8891 clashes with `yyr1'. Anyway, we are not in the user name space.
8892 (yytname_size): be an int, as is compared with ints.
8893 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
8894 Use them.
8895 * tests/cxx-gram.at: Use quotation to protect $1.
8896 Use AT_COMPILE to enable warnings hunts.
8897 Prototype yylex and yyerror.
8898 `Use' argc.
8899 Include `string.h', not `strings.h'.
8900 Produce and prototype stmtMerge only when used.
8901 yylex takes a location.
8902
97650f4e
AD
89032002-06-30 Akim Demaille <akim@epita.fr>
8904
8905 We spend a lot of time in quotearg, in particular when --verbose.
8906
8907 * src/symtab.c (symbol_get): Store a quoted version of the key.
8908 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
8909 Adjust all callers.
8910
d2576365
AD
89112002-06-30 Akim Demaille <akim@epita.fr>
8912
8913 * src/state.h (reductions_t): Rename member `nreds' as num.
8914 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
8915 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
8916
ccaf65bc
AD
89172002-06-30 Akim Demaille <akim@epita.fr>
8918
8919 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
8920 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
8921 (shifts_to): Rename as...
8922 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
8923 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
8924 (TRANSITION_IS_DISABLED, transitions_to): these.
8925
87675353
AD
89262002-06-30 Akim Demaille <akim@epita.fr>
8927
8928 * src/print.c (print_shifts, print_gotos): Merge into...
8929 (print_transitions): this.
8930 (print_transitions, print_errs, print_reductions): Align the
8931 lookaheads columns.
8932 (print_core, print_transitions, print_errs, print_state,
8933 print_grammar): Output empty lines separator before, not after.
8934 (state_default_rule_compute): Rename as...
8935 (state_default_rule): this.
8936 * tests/conflicts.at (Defaulted Conflicted Reduction),
8937 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
8938 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
8939
ce4ccb4b
AD
89402002-06-30 Akim Demaille <akim@epita.fr>
8941
8942 Display items as we display rules.
8943
8944 * src/gram.h, src/gram.c (rule_lhs_print): New.
8945 * src/gram.c (grammar_rules_partial_print): Use it.
8946 * src/print.c (print_core): Likewise.
8947 * tests/conflicts.at (Defaulted Conflicted Reduction),
8948 (Unresolved SR Conflicts): Adjust.
8949 (Unresolved SR Conflicts): Adjust and rename as...
8950 (Resolved SR Conflicts): this, as was meant.
8951 * tests/regression.at (Web2c Report): Adjust.
8952
bc933ef1
AD
89532002-06-30 Akim Demaille <akim@epita.fr>
8954
8955 * src/print.c (state_default_rule_compute): New, extracted from...
8956 (print_reductions): here.
8957 Pessimize, but clarify the code.
8958 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
8959
53d4308d
AD
89602002-06-30 Akim Demaille <akim@epita.fr>
8961
8962 * src/output.c (action_row): Let default_rule be always a rule
8963 number.
8964
574fb2d5
AD
89652002-06-30 Akim Demaille <akim@epita.fr>
8966
8967 * src/closure.c (print_firsts, print_fderives, closure):
8968 Use BITSET_EXECUTE.
8969 * src/lalr.c (lookaheads_print): Likewise.
8970 * src/state.c (state_rule_lookaheads_print): Likewise.
8971 * src/print_graph.c (print_core): Likewise.
8972 * src/print.c (print_reductions): Likewise.
8973 * src/output.c (action_row): Likewise.
8974 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
8975
05811fd7
AD
89762002-06-30 Akim Demaille <akim@epita.fr>
8977
8978 * src/print_graph.c: Use report_flag.
8979
0e4d5753
AD
89802002-06-30 Akim Demaille <akim@epita.fr>
8981
8982 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
8983 to...
8984 * src/relation.h, src/relation.c (traverse, relation_digraph)
8985 (relation_print, relation_transpose): New.
8986
24c7d800
AD
89872002-06-30 Akim Demaille <akim@epita.fr>
8988
8989 * src/state.h, src/state.c (shifts_to): New.
8990 * src/lalr.c (build_relations): Use it.
8991
9222837b
AD
89922002-06-30 Akim Demaille <akim@epita.fr>
8993
8994 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
8995 (item_number_of_rule_number, rule_number_of_item_number): New.
8996 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
8997 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8998 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
8999 Propagate their use.
9000 Much remains to be done, in particular wrt `shorts' from types.h.
9001
260008e5
AD
90022002-06-30 Akim Demaille <akim@epita.fr>
9003
9004 * src/symtab.c (symbol_new): Initialize the `printer' member.
9005
8a731ca8
AD
90062002-06-30 Akim Demaille <akim@epita.fr>
9007
9008 * src/LR0.c (save_reductions): Remove, replaced by...
9009 * src/state.h, src/state.c (state_reductions_set): New.
9010 (reductions, errs): Rename as...
9011 (reductions_t, errs_t): these.
9012 Adjust all dependencies.
9013
32e1e0a4
AD
90142002-06-30 Akim Demaille <akim@epita.fr>
9015
9016 * src/LR0.c (state_list_t, state_list_append): New.
9017 (first_state, last_state): Now symbol_list_t.
9018 (this_state): Remove.
9019 (new_itemsets, append_states, save_reductions): Take a state_t as
9020 argument.
9021 (set_states, generate_states): Adjust.
9022 (save_shifts): Remove, replaced by...
9023 * src/state.h, src/state.c (state_shifts_set): New.
9024 (shifts): Rename as...
9025 (shifts_t): this.
9026 Adjust all dependencies.
9027 * src/state.h (state_t): Remove the `next' member.
9028
e5fb6710
AD
90292002-06-30 Akim Demaille <akim@epita.fr>
9030
9031 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
9032 escaped in slot 0.
9033
c7ca99d4
AD
90342002-06-30 Akim Demaille <akim@epita.fr>
9035
9036 Use hash.h for the state hash table.
9037
9038 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
9039 (allocate_storage): Use state_hash_new.
9040 (free_storage): Use state_hash_free.
9041 (new_state, get_state): Adjust.
9042 * src/lalr.h, src/lalr.c (states): Move to...
9043 * src/states.h (state_t): Remove the `link' member, no longer
9044 used.
9045 * src/states.h, src/states.c: here.
9046 (state_hash_new, state_hash_free, state_hash_lookup)
9047 (state_hash_insert, states_free): New.
9048 * src/states.c (state_table, state_compare, state_hash): New.
9049 * src/output.c (output_actions): Do not free states now, since we
9050 still need to know the final_state number in `prepare', called
9051 afterwards. Do it...
9052 * src/main.c (main): here: call states_free after `output'.
9053
df0e7316
AD
90542002-06-30 Akim Demaille <akim@epita.fr>
9055
9056 * src/state.h, src/state.c (state_new): New, extracted from...
9057 * src/LR0.c (new_state): here.
9058 * src/state.h (STATE_ALLOC): Move to...
9059 * src/state.c: here.
9060 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
9061 * src/state.h, src/state.c: here.
9062
39f41916
AD
90632002-06-30 Akim Demaille <akim@epita.fr>
9064
9065 * src/reader.c (gensym): Rename as...
9066 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
9067 (getsym): Rename as...
9068 (symbol_get): this.
9069
d57650a5
AD
90702002-06-30 Akim Demaille <akim@epita.fr>
9071
9072 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
9073 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
9074 * src/output.c, src/print.c, src/print_graph.c: Propagate.
9075 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
9076
5a08f1ce
AD
90772002-06-30 Akim Demaille <akim@epita.fr>
9078
9079 Make the test suite pass with warnings checked.
9080
9081 * tests/actions.at (Printers and Destructors): Improve.
9082 Avoid unsigned vs. signed issues.
9083 * tests/calc.at: Don't exercise the scanner here, do it...
9084 * tests/input.at (Torturing the Scanner): here.
9085
720623af
PH
90862002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9087
88e7e941 9088 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
9089 reorganize first lines parallel to yacc.c.
9090
fb8135fa
AD
90912002-06-28 Akim Demaille <akim@epita.fr>
9092
9093 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
9094 (b4_token_enum, b4_token_defines): New, factored from...
9095 * data/lalr1.cc, data/yacc.c, glr.c: here.
9096
41442480
AD
90972002-06-28 Akim Demaille <akim@epita.fr>
9098
9099 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
9100 unused variables.
9101 * src/output.c (merger_output): static.
9102
e0e5bf84
AD
91032002-06-28 Akim Demaille <akim@epita.fr>
9104
ba0fe3c7 9105 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
9106 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
9107 pacify GCC.
9108 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 9109
676385e2
PH
91102002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9111
9112 Accumulated changelog for new GLR parsing features.
9113
6a254321 9114 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
9115 conflicts_total_count.
9116 * src/conflicts.h: Ditto.
9117 * src/output.c (token_actions): Use the new name.
9118 (output_conflicts): Change conflp => conflict_list_heads, and
9119 confl => conflict_list for better readability.
9120 * data/glr.c: Use the new names.
9121 * NEWS: Add self to GLR announcement.
e0e5bf84 9122
676385e2
PH
9123 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
9124
9125 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
9126 Akim Demaille.
9127
9128 * data/bison.glr: Change name to glr.c
9129 * data/glr.c: Renamed from bison.glr.
9130 * data/Makefile.am: Add glr.c
e0e5bf84
AD
9131
9132 * src/getargs.c:
9133
676385e2 9134 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 9135 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 9136
676385e2
PH
9137 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9138
9139 * data/bison.glr: Be sure to restore the
9140 current #line when returning to the skeleton contents after having
9141 exposed the input file's #line.
9142
9143 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9144
9145 * data/bison.glr: Bring up to date with changes to bison.simple.
9146
9147 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9148
9149 * data/bison.glr: Correct definitions that use b4_prefix.
9150 Various reformatting.
9151 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
9152 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
9153 yytokenp argument; now part of stack.
9154 (yychar): Define to behave as documented.
9155 (yyclearin): Ditto.
e0e5bf84 9156
676385e2
PH
9157 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9158
9159 * src/reader.h: Add declaration for free_merger_functions.
9160
9161 * src/reader.c (merge_functions): New variable.
9162 (get_merge_function): New function.
9163 (free_merger_functions): New function.
9164 (readgram): Check for %prec that is not followed by a symbol.
9165 Handle %dprec and %merge declarations.
9166 (packgram): Initialize dprec and merger fields in rules array.
9167
9168 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
9169 conflict_list_cnt, conflict_list_free): New variables.
9170 (table_grow): Also grow conflict_table.
e0e5bf84 9171 (prepare_rules): Output dprec and merger tables.
676385e2 9172 (conflict_row): New function.
e0e5bf84 9173 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
9174 default reduction in conflicted states for GLR parser so that there
9175 are spaces for the conflict lists.
9176 (save_row): Also save conflict information.
9177 (token_actions): Allocate conflict list.
9178 (merger_output): New function.
9179 (pack_vector): Pack conflict table, too.
9180 (output_conflicts): New function to output yyconflp and yyconfl.
9181 (output_check): Allocate conflict_tos.
9182 (output_actions): Output conflict tables, also.
9183 (output_skeleton): Output b4_mergers definition.
9184 (prepare): Output b4_max_rhs_length definition.
9185 Use 'bison.glr' as default skeleton for GLR parsers.
9186
9187 * src/gram.c (glr_parser): New flag.
9188 (grammar_free): Call free_merger_functions.
9189
9190 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
9191 all pairs of conflicting reductions, rather than just all tokens
9192 causing conflicts. Needed to size conflict tables.
e0e5bf84 9193 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
9194 interface.
9195 (conflicts_print): Ditto.
9196 (count_total_conflicts): New function.
9197
9198 * src/reader.h (merger_list): New type.
9199 (merge_functions): New variable.
9200
9201 * src/lex.h (tok_dprec, tok_merge): New token types.
9202
9203 * src/gram.h (rule_s): Add dprec and merger fields.
9204 (glr_parser): New flag.
9205
9206 * src/conflicts.h (count_total_conflicts): New function.
9207
9208 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
9209
9210 * doc/bison.texinfo (Generalized LR Parsing): New section.
9211 (GLR Parsers): New section.
9212 (Language and Grammar): Mention GLR parsing.
9213 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
9214 Correct typo ("tge" -> "the").
9215
9216 * data/bison.glr: New skeleton for GLR parsing.
9217
9218 * tests/cxx-gram.at: New tests for GLR parsing.
9219
9220 * tests/testsuite.at: Include cxx-gram.at.
9221
9222 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 9223
676385e2
PH
9224 * src/parse-gram.y:
9225
9226 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
9227
9228 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 9229
b5480d74 92302002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
9231
9232 * src/options.h, src/options.c: Remove.
9233 * src/getargs.c (short_options, long_options): New.
9234
60491a94
AD
92352002-06-27 Akim Demaille <akim@epita.fr>
9236
9237 * data/bison.simple, data/bison.c++: Rename as...
9238 * data/yacc.c, data/lalr1.cc: these.
9239 * doc/bison.texinfo (Environment Variables): Remove.
9240
9be0c25b
AD
92412002-06-25 Raja R Harinath <harinath@cs.umn.edu>
9242
9243 * src/getargs.c (report_argmatch): Initialize strtok().
9244
1ae72863
AD
92452002-06-20 Akim Demaille <akim@epita.fr>
9246
9247 * data/bison.simple (b4_symbol_actions): New, replaces...
9248 (b4_symbol_destructor, b4_symbol_printer): these.
9249 (yysymprint): Be sure to call YYPRINT only for tokens, and using
9250 user token numbers.
9251
87542d29
AD
92522002-06-20 Akim Demaille <akim@epita.fr>
9253
9254 * data/bison.simple (yydestructor): Rename as...
9255 (yydestruct): this.
9256
1a31ed21
AD
92572002-06-20 Akim Demaille <akim@epita.fr>
9258
9259 * src/symtab.h, src/symtab.c (symbol_type_set)
9260 (symbol_destructor_set, symbol_precedence_set): The location is
9261 the last argument.
9262 Adjust all callers.
9263
e776192e
AD
92642002-06-20 Akim Demaille <akim@epita.fr>
9265
9266 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
9267 internals.
9268 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
9269 Takes a location.
9270 * src/symtab.h, src/symtab.c (symbol_class_set)
9271 (symbol_user_token_number_set): Likewise.
9272 Adjust all callers.
9273 Promote complain_at.
9274 * tests/input.at (Type Clashes): Adjust.
9275
5c1180b3
AD
92762002-06-20 Akim Demaille <akim@epita.fr>
9277
9278 * data/bison.simple (YYLEX): Fix the declaration when
9279 %pure-parser.
9280
e3170060
AD
92812002-06-20 Akim Demaille <akim@epita.fr>
9282
9283 * data/bison.simple (yysymprint): Don't print the token number,
9284 just its name.
9285 * tests/actions.at (Destructors): Rename as...
9286 (Printers and Destructors): this.
9287 Also exercise %printer.
9288
253862fd
AD
92892002-06-20 Akim Demaille <akim@epita.fr>
9290
9291 * data/bison.simple (YYDSYMPRINT): New.
9292 Use it to remove many of the #if YYDEBUG/if (yydebug).
9293
366eea36
AD
92942002-06-20 Akim Demaille <akim@epita.fr>
9295
9296 * src/symtab.h, src/symtab.c (symbol_t): printer and
9297 printer_location are new members.
9298 (symbol_printer_set): New.
9299 * src/parse-gram.y (PERCENT_PRINTER): New token.
9300 Handle its associated rule.
9301 * src/scan-gram.l: Adjust.
9302 (handle_destructor_at, handle_destructor_dollar): Rename as...
9303 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9304 * src/output.c (symbol_printers_output): New.
9305 (output_skeleton): Call it.
9306 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9307 since there are already many grammar files with a user `yyprint'.
9308 Replace the calls to YYPRINT to calls to yysymprint.
9309 * tests/calc.at: Adjust.
9310 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9311 taking advantage of parser very internal details (stack size!).
9312
4f25ebb0
AD
93132002-06-20 Akim Demaille <akim@epita.fr>
9314
9315 * src/scan-gram.l: Complete the scanner with the missing patterns
9316 to pacify Flex.
9317 Use `quote' and `symbol_tag_get' where appropriate.
9318
93b68a0e
AD
93192002-06-19 Akim Demaille <akim@epita.fr>
9320
9321 * tests/actions.at (Destructors): Augment to test locations.
9322 * data/bison.simple (yydestructor): Pass it the current location
9323 if locations are enabled.
9324 Prototype only when __STDC__ or C++.
9325 Change the argument names to move into the yy name space: there is
9326 user code here.
9327
58612f1d
AD
93282002-06-19 Akim Demaille <akim@epita.fr>
9329
74310291
AD
9330 * data/bison.simple (b4_pure_if): New.
9331 Use it instead of #ifdef YYPURE.
9332
93332002-06-19 Akim Demaille <akim@epita.fr>
9334
9335 * data/bison.simple (b4_location_if): New.
58612f1d
AD
9336 Use it instead of #ifdef YYLSP_NEEDED.
9337
f25bfb75
AD
93382002-06-19 Akim Demaille <akim@epita.fr>
9339
9340 Prepare @$ in %destructor, but currently don't bind it in the
9341 skeleton, as %location use is not cleaned up yet.
9342
9343 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9344 (handle_action_at): New.
9345 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9346 a braced_code_t and a location as additional arguments.
9347 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9348 unquote one when outputting `b4_dollar_dollar'.
9349 Adjust callers.
9350 * data/bison.simple (b4_eval): Remove.
9351 (b4_symbol_destructor): Adjust.
9352 * tests/input.at (Invalid @n): Adjust.
9353
c732d2c6
AD
93542002-06-19 Zack Weinberg <zack@codesourcery.com>
9355
9356 * doc/bison.texinfo: Document ability to have multiple
9357 prologue sections.
9358
8c165d89
AD
93592002-06-18 Akim Demaille <akim@epita.fr>
9360
9361 * src/files.c (compute_base_names): When computing the output file
9362 names from the input file name, strip the directory part.
9363
ca98bf57
AD
93642002-06-18 Akim Demaille <akim@epita.fr>
9365
9366 * data/bison.simple.new: Comment changes.
9367 Reported by Andreas Schwab.
9368
0bfb02ff
AD
93692002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
9370
9371 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
9372 there are no `label `yyoverflowlab' defined but not used' warnings
9373 when yyoverflow is defined.
9374
24c0aad7
AD
93752002-06-18 Akim Demaille <akim@epita.fr>
9376
9377 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
9378 new member.
9379 (symbol_destructor_set): Adjust.
9380 * src/output.c (symbol_destructors_output): Output the destructor
9381 locations.
9382 Output the symbol name.
9383 * data/bison.simple (b4_symbol_destructor): Adjust.
9384
5719c109
AD
93852002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
9386 and Akim Demaille <akim@epita.fr>
9387
9388 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
9389 what's left on the stack when the error recovery hits EOF.
9390 * tests/actions.at (Destructors): Complete to exercise this case.
9391
9280d3ef
AD
93922002-06-17 Akim Demaille <akim@epita.fr>
9393
9394 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
9395 arguments is really empty, not only equal to `[]'.
9396 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
9397 member.
9398 (symbol_destructor_set): New.
9399 * src/output.c (symbol_destructors_output): New.
9400 * src/reader.h (brace_code_t, current_braced_code): New.
9401 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
9402 (handle_dollar): Rename as...
9403 (handle_action_dollar): this.
9404 (handle_destructor_dollar): New.
9405 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
9406 (grammar_declaration): Use it.
9407 * data/bison.simple (yystos): Is always defined.
9408 (yydestructor): New.
9409 * tests/actions.at (Destructors): New.
9410 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
9411
dafdc66f
AD
94122002-06-17 Akim Demaille <akim@epita.fr>
9413
9414 * src/symlist.h, src/symlist.c (symbol_list_length): New.
9415 * src/scan-gram.l (handle_dollar, handle_at): Compute the
9416 rule_length only when needed.
9417 * src/output.c (actions_output, token_definitions_output): Output
9418 the full M4 block.
9419 * src/symtab.c: Don't access directly to the symbol tag, use
9420 symbol_tag_get.
9421 * src/parse-gram.y: Use symbol_list_free.
9422
56c47203
AD
94232002-06-17 Akim Demaille <akim@epita.fr>
9424
9425 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
9426 (symbol_list_prepend, get_type_name): Move to...
9427 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
9428 (symbol_list_prepend, symbol_list_n_type_name_get): here.
9429 Adjust all callers.
9430 (symbol_list_free): New.
9431 * src/scan-gram.l (handle_dollar): Takes a location.
9432 * tests/input.at (Invalid $n): Adjust.
9433
1e0bab92
AD
94342002-06-17 Akim Demaille <akim@epita.fr>
9435
9436 * src/reader.h, src/reader.c (symbol_list_new): Export it.
9437 (symbol_list_prepend): New.
9438 * src/parse-gram.y (%union): `list' is a new member.
9439 (symbols.1): New, replaces...
9440 (terms_to_prec.1, nterms_to_type.1): these.
9441 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
9442 Take a location as additional argument.
9443 Adjust all callers.
9444
04e60654
AD
94452002-06-15 Akim Demaille <akim@epita.fr>
9446
9447 * src/parse-gram.y: Move %token in the declaration section so that
9448 we don't depend upon CVS Bison.
9449
10e5b8bd
AD
94502002-06-15 Akim Demaille <akim@epita.fr>
9451
9452 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
9453 * src/print.c (print_core): Use it.
9454
9801d40c
AD
94552002-06-15 Akim Demaille <akim@epita.fr>
9456
9457 * src/conflicts.c (log_resolution): Accept the rule involved in
9458 the sr conflicts instead of the lookahead number that points to
9459 that rule.
9460 (flush_reduce): Accept the current lookahead vector as argument,
9461 instead of the index in LA.
9462 (resolve_sr_conflict): Accept the current number of lookahead
9463 bitset to consider for the STATE, instead of the index in LA.
9464 (set_conflicts): Adjust.
9465 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
9466
c0263492
AD
94672002-06-15 Akim Demaille <akim@epita.fr>
9468
9469 * src/state.h (state_t): Replace the `lookaheadsp' member, a
9470 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
9471 Adjust all dependencies.
9472 * src/lalr.c (initialize_lookaheads): Split into...
9473 (states_lookaheads_count, states_lookaheads_initialize): these.
9474 (lalr): Adjust.
9475
9757c359
AD
94762002-06-15 Akim Demaille <akim@epita.fr>
9477
9478 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
9479 out of...
9480 (grammar_rules_print): here.
9481 * src/reduce.c (reduce_output): Use it.
9482 * tests/reduce.at (Useless Rules, Reduced Automaton)
9483 (Underivable Rules): Adjust.
9484
6b98e4b5
AD
94852002-06-15 Akim Demaille <akim@epita.fr>
9486
9487 Copy BYacc's nice way to report the grammar.
9488
9489 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
9490 New.
9491 Don't print the rules' location, it is confusing and useless.
9492 (rule_print): Use grammar_rhs_print.
9493 * src/print.c (print_grammar): Use grammar_rules_print.
9494
6b98e4b5
AD
94952002-06-15 Akim Demaille <akim@epita.fr>
9496
9497 Complete and rationalize `useless thing' warnings.
9498
9499 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
9500 (symbol_tag_print): New.
9501 Use them everywhere in place of accessing directly the tag member.
9502 * src/gram.h, src/gram.c (rule_print): New.
9503 Use it where a rule used to be printed `by hand'.
9504 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
9505 (reduce_grammar_tables): Report the useless rules.
9506 (reduce_print): Useless things are a warning, not an error.
9507 Report it as such.
9508 * tests/reduce.at (Useless Nonterminals, Useless Rules):
9509 (Reduced Automaton, Underivable Rules): Adjust.
9510 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
9511 * tests/conflicts.at (Unresolved SR Conflicts)
9512 (Solved SR Conflicts): Adjust.
9513
ee000ba4
AD
95142002-06-15 Akim Demaille <akim@epita.fr>
9515
9516 Let symbols have a location.
9517
9518 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
9519 (getsym): Adjust.
9520 Adjust all callers.
9521 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
9522 Use location_t, not int.
9523 * src/symtab.c (symbol_check_defined): Take advantage of the
9524 location.
9525 * tests/regression.at (Invalid inputs): Adjust.
9526
8efe435c
AD
95272002-06-15 Akim Demaille <akim@epita.fr>
9528
9529 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
9530 (input): Don't try to initialize yylloc here, do it in the
9531 scanner.
9532 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9533 * src/gram.h (rule_t): Change line and action_line into location
9534 and action_location, of location_t type.
9535 Adjust all dependencies.
9536 * src/location.h, src/location.c (empty_location): New.
9537 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9538 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9539 (grammar_current_rule_symbol_append)
9540 (grammar_current_rule_action_append): Expect a location as argument.
9541 * src/reader.c (grammar_midrule_action): Adjust to attach an
9542 action's location as dummy symbol location.
9543 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9544 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9545 the line numbers.
9546
1921f1d7
AD
95472002-06-14 Akim Demaille <akim@epita.fr>
9548
9549 Grammar declarations may be found in the grammar section.
9550
9551 * src/parse-gram.y (rules_or_grammar_declaration): New.
9552 (declarations): Each declaration may end with a semicolon, not
9553 just...
9554 (grammar_declaration): `"%union"'.
9555 (grammar): Branch to rules_or_grammar_declaration.
9556
4515534c
AD
95572002-06-14 Akim Demaille <akim@epita.fr>
9558
9559 * src/main.c (main): Invoke scanner_free.
9560
f958596b
AD
95612002-06-14 Akim Demaille <akim@epita.fr>
9562
9563 * src/output.c (m4_invoke): Extracted from...
9564 (output_skeleton): here.
9565 Free tempfile.
9566
2c569025
AD
95672002-06-14 Akim Demaille <akim@epita.fr>
9568
9569 * src/parse-gram.y (directives, directive, gram)
9570 (grammar_directives, precedence_directives, precedence_directive):
9571 Rename as...
9572 (declarations, declaration, grammar, grammar_declaration)
9573 (precedence_declaration, precedence_declarator): these.
9574 (symbol_declaration): New.
9575
592e8d4d
AD
95762002-06-14 Akim Demaille <akim@epita.fr>
9577
9578 * src/files.c (action_obstack): Remove, unused.
9579 (output_obstack): Remove it, and all its dependencies, as it is no
9580 longer needed.
9581 * src/reader.c (epilogue_set): Build the epilogue in the
9582 muscle_obstack.
9583 * src/output.h, src/output.c (muscle_obstack): Move to...
9584 * src/muscle_tab.h, src/muscle_tab.h: here.
9585 (muscle_init): Initialize muscle_obstack.
9586 (muscle_free): New.
9587 * src/main.c (main): Call it.
9588
0c15323d
AD
95892002-06-14 Akim Demaille <akim@epita.fr>
9590
9591 * src/location.h: New, extracted from...
9592 * src/reader.h: here.
9593 * src/Makefile.am (noinst_HEADERS): Merge into
9594 (bison_SOURCES): this.
9595 Add location.h.
9596 * src/parse-gram.y: Use location_t instead of Bison's.
9597 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
9598 Use location_t instead of ints.
9599
e96c9728
AD
96002002-06-14 Akim Demaille <akim@epita.fr>
9601
9602 * data/bison.simple, data/bison.c++: Be sure to restore the
9603 current #line when returning to the skeleton contents after having
9604 exposed the input file's #line.
9605
75d1fe16
AD
96062002-06-12 Akim Demaille <akim@epita.fr>
9607
9608 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
9609 eager.
9610 * tests/actions.at (Exotic Dollars): New.
9611
6c35d22c
AD
96122002-06-12 Akim Demaille <akim@epita.fr>
9613
9614 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
9615 ['"/] too eagerly.
9616 * tests/input.at (Torturing the Scanner): New.
9617
1d6412ad
AD
96182002-06-11 Akim Demaille <akim@epita.fr>
9619
9620 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
9621 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
9622 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
9623 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
9624 * src/reader.c (reader): Use it.
9625
4cdb01db
AD
96262002-06-11 Akim Demaille <akim@epita.fr>
9627
9628 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
9629 Adjust all callers.
9630 (scanner_last_string_free): New.
9631
44995b2e
AD
96322002-06-11 Akim Demaille <akim@epita.fr>
9633
9634 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
9635 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
9636 (last_string, YY_OBS_FREE): New.
9637 Use them when returning an ID.
9638
e9955c83
AD
96392002-06-11 Akim Demaille <akim@epita.fr>
9640
9641 Have Bison grammars parsed by a Bison grammar.
9642
9643 * src/reader.c, src/reader.h (prologue_augment): New.
9644 * src/reader.c (copy_definition): Remove.
9645
9646 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
9647 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
9648 (grammar_current_rule_prec_set, grammar_current_rule_check)
9649 (grammar_current_rule_symbol_append)
9650 (grammar_current_rule_action_append): Export.
9651 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
9652 (symbol_list_action_append): Remove.
9653 Hook the routines from reader.
9654 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
9655 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
9656
9657 * src/reader.c (read_declarations): Remove, unused.
9658
9659 * src/parse-gram.y: Handle the epilogue.
9660 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
9661 (grammar_start_symbol_set): this.
9662 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
9663 * src/reader.c (readgram): Remove, unused.
9664 (reader): Adjust to insert eoftoken and axiom where appropriate.
9665
9666 * src/reader.c (copy_dollar): Replace with...
9667 * src/scan-gram.h (handle_dollar): this.
9668 * src/parse-gram.y: Remove `%thong'.
9669
9670 * src/reader.c (copy_at): Replace with...
9671 * src/scan-gram.h (handle_at): this.
9672
9673 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
9674 New.
9675
9676 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
9677 time being.
9678
9679 * src/reader.h, src/reader.c (grammar_rule_end): New.
9680
9681 * src/parse.y (current_type, current_class): New.
9682 Implement `%nterm', `%token' support.
9683 Merge `%term' into `%token'.
9684 (string_as_id): New.
9685 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
9686 type name.
9687
9688 * src/parse-gram.y: Be sure to handle properly the beginning of
9689 rules.
9690
9691 * src/parse-gram.y: Handle %type.
9692 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
9693
9694 * src/parse-gram.y: More directives support.
9695 * src/options.c: No longer handle source directives.
9696
9697 * src/parse-gram.y: Fix %output.
9698
9699 * src/parse-gram.y: Handle %union.
9700 Use the prologue locations.
9701 * src/reader.c (parse_union_decl): Remove.
9702
9703 * src/reader.h, src/reader.c (epilogue_set): New.
9704 * src/parse-gram.y: Use it.
9705
9706 * data/bison.simple, data/bison.c++: b4_stype is now either not
9707 defined, then default to int, or to the contents of %union,
9708 without `union' itself.
9709 Adjust.
9710 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
9711
9712 * src/output.c (actions_output): Don't output braces, as they are
9713 already handled by the scanner.
9714
9715 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
9716 characters to themselves.
9717
9718 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
9719 that the epilogue has a proper #line.
9720
9721 * src/parse-gram.y: Handle precedence/associativity.
9722
9723 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
9724 a terminal.
9725 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
9726 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
9727 at all to define terminals that cannot be emitted.
9728
9729 * src/scan-gram.l: Escape M4 characters.
9730
9731 * src/scan-gram.l: Working properly with escapes in user
9732 strings/characters.
9733
9734 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
9735 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
9736 grammar.
9737 Use more modest sizes, as for the time being the parser does not
9738 release memory, and therefore the process swallows a huge amount
9739 of memory.
9740
9741 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
9742 stricter %token grammar.
9743
9744 * src/symtab.h (associativity): Add `undef_assoc'.
9745 (symbol_precedence_set): Do nothing when passed an undef_assoc.
9746 * src/symtab.c (symbol_check_alias_consistence): Adjust.
9747
9748 * tests/regression.at (Invalid %directive): Remove, as it is now
9749 meaningless.
9750 (Invalid inputs): Adjust to the new error messages.
9751 (Token definitions): The new grammar doesn't allow too many
9752 eccentricities.
9753
9754 * src/lex.h, src/lex.c: Remove.
9755 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
9756 (copy_character, copy_string2, copy_string, copy_identifier)
9757 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
9758 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
9759 (parse_action): Remove.
9760 * po/POTFILES.in: Adjust.
9761
2e047461
AD
97622002-06-11 Akim Demaille <akim@epita.fr>
9763
cd05d13c 9764 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
9765 rule's action member: return the action as a string.
9766 Don't require `rule_length' as an argument: compute it.
9767 (grammar_current_rule_symbol_append)
9768 (grammar_current_rule_action_append): New, eved out from
9769 (readgram): here.
9770 Remove `action_flag', `rulelength', unused now.
9771
9af3fbce
AD
97722002-06-11 Akim Demaille <akim@epita.fr>
9773
9774 * src/reader.c (grammar_current_rule_prec_set).
9775 (grammar_current_rule_check): New, eved out from...
9776 (readgram): here.
9777 Remove `xaction', `first_rhs': useless.
9778 * tests/input.at (Type clashes): New.
9779 * tests/existing.at (GNU Cim Grammar): Adjust.
9780
1485e106
AD
97812002-06-11 Akim Demaille <akim@epita.fr>
9782
9783 * src/reader.c (grammar_midrule_action): New, Eved out from
9784 (readgram): here.
9785
da4160c3
AD
97862002-06-11 Akim Demaille <akim@epita.fr>
9787
9788 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
9789 New.
9790 (readgram): Use them as replacement of inlined code, crule and
9791 crule1.
9792
f6d0f937
AD
97932002-06-11 Akim Demaille <akim@epita.fr>
9794
9795 * src/reader.c (grammar_end, grammar_symbol_append): New.
9796 (readgram): Use them.
9797 Make the use of `p' as local as possible.
9798
69078d4b
AD
97992002-06-10 Akim Demaille <akim@epita.fr>
9800
9801 GCJ's parser requires the tokens to be defined before the prologue.
9802
9803 * data/bison.simple: Output the token definition before the user's
9804 prologue.
9805 * tests/regression.at (Braces parsing, Duplicate string)
9806 (Mixing %token styles): Check the output from bison.
9807 (Early token definitions): New.
9808
5e424082
AD
98092002-06-10 Akim Demaille <akim@epita.fr>
9810
9811 * src/symtab.c (symbol_user_token_number_set): Don't complain when
9812 assigning twice the same user number to a token, so that we can
9813 use it in...
9814 * src/lex.c (lex): here.
9815 Also use `symbol_class_set' instead of hand written code.
9816 * src/reader.c (parse_assoc_decl): Likewise.
9817
44536b35
AD
98182002-06-10 Akim Demaille <akim@epita.fr>
9819
9820 * src/symtab.c, src/symtab.c (symbol_class_set)
9821 (symbol_user_token_number_set): New.
9822 * src/reader.c (parse_token_decl): Use them.
9823 Use a switch instead of ifs.
9824 Use a single argument.
9825
8b9f2372
AD
98262002-06-10 Akim Demaille <akim@epita.fr>
9827
9828 Remove `%thong' support as it is undocumented, unused, duplicates
9829 `%token's job, and creates useless e-mail traffic with people who
9830 want to know what it is, why it is undocumented, unused, and
9831 duplicates `%token's job.
9832
9833 * src/reader.c (parse_thong_decl): Remove.
9834 * src/options.c (option_table): Remove "thong".
9835 * src/lex.h (tok_thong): Remove.
9836
3ae2b51f
AD
98372002-06-10 Akim Demaille <akim@epita.fr>
9838
9839 * src/symtab.c, src/symtab.c (symbol_type_set)
9840 (symbol_precedence_set): New.
9841 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
9842 (value_components_used): Remove, unused.
9843
2f1afb73
AD
98442002-06-09 Akim Demaille <akim@epita.fr>
9845
9846 Move symbols handling code out of the reader.
9847
9848 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
9849 (axiom): Move to...
9850 * src/symtab.h, src/symtab.c: here.
9851
9852 * src/gram.c (start_symbol): Remove: use startsymbol->number.
9853 * src/reader.c (startval): Rename as...
9854 * src/symtab.h, src/symtab.c (startsymbol): this.
9855 * src/reader.c: Adjust.
9856
9857 * src/reader.c (symbol_check_defined, symbol_make_alias)
9858 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9859 (token_translations_init)
9860 Move to...
9861 * src/symtab.c: here.
9862 * src/reader.c (packsymbols): Move to...
9863 * src/symtab.h, src/symtab.c (symbols_pack): here.
9864 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
9865 argument.
9866
e9bca3ad
AD
98672002-06-03 Akim Demaille <akim@epita.fr>
9868
9869 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
9870 then statements.
9871
86eff183
AD
98722002-06-03 Akim Demaille <akim@epita.fr>
9873
9874 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
9875 structs with non literals.
9876 * src/scan-skel.l: never-interactive.
9877 * src/conflicts.c (enum conflict_resolution_e): No trailing
9878 comma.
9879 * src/getargs.c (usage): Split long literal strings.
9880 Reported by Hans Aberg.
9881
717be197
AD
98822002-05-28 Akim Demaille <akim@epita.fr>
9883
9884 * data/bison.c++: Use C++ ostreams.
9885 (cdebug_): New member.
9886
670ddffd
AD
98872002-05-28 Akim Demaille <akim@epita.fr>
9888
9889 * src/output.c (output_skeleton): Be sure to allocate enough room
9890 for `/' _and_ for `\0' in full_skeleton.
9891
769b430f
AD
98922002-05-28 Akim Demaille <akim@epita.fr>
9893
9894 * data/bison.c++: Catch up with bison.simple:
9895 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9896 and Paul Eggert <eggert@twinsun.com>: `error' handing.
9897 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
9898 and popping traces.
9899
7067cb36
PH
99002002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9901
9902 * src/output.c (output_skeleton): Put an explicit path in front of
9903 the skeleton file name, rather than relying on the -I directory,
9904 to partially alleviate effects of having a skeleton file lying around
9905 in the current directory.
769b430f 9906
4a713ec2
PH
99072002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9908
769b430f 9909 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
9910 obstack_printf should be obstack_fgrow1.
9911
b408954b
AD
99122002-05-26 Akim Demaille <akim@epita.fr>
9913
9914 * src/state.h (state_t): `solved_conflicts' is a new member.
9915 * src/LR0.c (new_state): Set it to 0.
9916 * src/conflicts.h, src/conflicts.c (print_conflicts)
9917 (free_conflicts, solve_conflicts): Rename as...
9918 (conflicts_print, conflicts_free, conflicts_solve): these.
9919 Adjust callers.
9920 * src/conflicts.c (enum conflict_resolution_e)
9921 (solved_conflicts_obstack): New, used by...
9922 (log_resolution): this.
9923 Adjust to attach the conflict resolution to each state.
9924 Complete the description with the precedence/associativity
9925 information.
9926 (resolve_sr_conflict): Adjust.
9927 * src/print.c (print_state): Output its solved_conflicts.
9928 * tests/conflicts.at (Unresolved SR Conflicts)
9929 (Solved SR Conflicts): Exercise --report=all.
9930
a49aecd5
AD
99312002-05-26 Akim Demaille <akim@epita.fr>
9932
9933 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9934 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
9935 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
9936 (token_number_t, item_number_as_token_number)
9937 (token_number_as_item_number, muscle_insert_token_number_table):
9938 Rename as...
9939 (symbol_number_t, item_number_as_symbol_number)
9940 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
9941 these, since it is more appropriate.
9942
5504898e
AD
99432002-05-26 Akim Demaille <akim@epita.fr>
9944
9945 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
9946 `Error:' lines.
9947 * data/bison.simple (yystos) [YYDEBUG]: New.
9948 (yyparse) [YYDEBUG]: Display the symbols which are popped during
9949 error recovery.
9950 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
9951
ec3bc396
AD
99522002-05-25 Akim Demaille <akim@epita.fr>
9953
9954 * doc/bison.texinfo (Debugging): Split into...
9955 (Tracing): this new section, its former contents, and...
9956 (Understanding): this new section.
9957 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
9958 by...
9959 (report_flag): this.
9960 Adjust all dependencies.
9961 (report_args, report_types, report_argmatch): New.
9962 (usage, getargs): Report/support -r, --report.
9963 * src/options.h
9964 (struct option_table_struct): Rename as..,
9965 (struct option_table_s): this.
9966 Rename the `set_flag' member to `flag' to match with getopt_long's
9967 struct.
9968 * src/options.c (option_table): Split verbose into an entry for
9969 %verbose, and another for --verbose.
9970 Support --report/-r, so remove -r from the obsolete --raw.
9971 * src/print.c: Attach full item sets and lookaheads reports to
9972 report_flag instead of trace_flag.
9973 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
9974
78df8250
PE
99752002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9976 and Paul Eggert <eggert@twinsun.com>
769b430f 9977
78df8250
PE
9978 * data/bison.simple (yyparse): Correct error handling to conform to
9979 POSIX and yacc. Specifically, after syntax error is discovered,
9980 do not reduce further before shifting the error token.
9981 Clean up the code a bit by removing the labels yyerrdefault,
9982 yyerrhandle, yyerrpop.
9983 * NEWS: Document the above.
9984
c0c9ea05
PH
99852002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9986
9987 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
9988 type; it isn't always big enough, since it doesn't necessarily
9989 include non-terminals.
769b430f 9990 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
9991 the latter can be removed.
9992 (yy_token_number_type): Remove, only one use.
9993 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
9994 don't use TokenNumberType as element type.
769b430f 9995
c0c9ea05
PH
9996 * tests/regression.at: Modify expected output to agree with change
9997 to yyr1 and yytranslate.
769b430f 9998
6390a83f
FK
99992002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
10000
10001 * src/reader.c (parse_action): Use copy_character instead of
10002 obstack_1grow.
10003
db7c8e9a
AD
100042002-05-13 Akim Demaille <akim@epita.fr>
10005
10006 * tests/regression.at (Token definitions): Prototype yylex and
10007 yyerror.
10008
fcc61800
PH
100092002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10010
158c687b 10011 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
10012 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10013 32-bit arithmetic.
10014 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
10015
5683e9b2
AD
100162002-05-07 Akim Demaille <akim@epita.fr>
10017
10018 * tests/synclines.at: Be sure to prototype yylex and yyerror to
10019 avoid GCC warnings.
10020
0c2d3f4c
AD
100212002-05-07 Akim Demaille <akim@epita.fr>
10022
10023 Kill GCC warnings.
10024
10025 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
10026 over the RHS of each rule.
10027 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
10028 * src/state.h (state_t): Member `nitems' is unsigned short.
10029 * src/LR0.c (get_state): Adjust.
10030 * src/reader.c (packgram): Likewise.
10031 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
10032 `Type'.
10033 (muscle_insert_int_table): Remove, unused.
10034 (prepare_rules): Remove `max'.
10035
1565b720
AD
100362002-05-06 Akim Demaille <akim@epita.fr>
10037
10038 * src/closure.c (print_firsts): Display of the symbol tags.
10039 (bitmatrix_print): Move to...
10040 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
10041 here.
10042 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
10043
cfaee611
AD
100442002-05-06 Akim Demaille <akim@epita.fr>
10045
10046 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
10047 hash_do_for_each.
10048
458be8e0
AD
100492002-05-06 Akim Demaille <akim@epita.fr>
10050
10051 * src/LR0.c (new_state, get_state): Instead of using the global
10052 `kernel_size' and `kernel_base', have two new arguments:
10053 `core_size' and `core'.
10054 Adjust callers.
10055
a900a624
AD
100562002-05-06 Akim Demaille <akim@epita.fr>
10057
10058 * src/reader.c (packgram): No longer end `ritem' with a 0
10059 sentinel: it is not used.
10060
d4e7d3a1
AD
100612002-05-05 Akim Demaille <akim@epita.fr>
10062
10063 New experimental feature: display the lookaheads in the report and
10064 graph.
10065
10066 * src/print (print_core): When --trace-flag, display the rules
10067 lookaheads.
10068 * src/print_graph.c (print_core): Likewise.
10069 Swap the arguments.
10070 Adjust caller.
10071
39ceb25b
AD
100722002-05-05 Akim Demaille <akim@epita.fr>
10073
10074 * tests/torture.at (Many lookaheads): New test.
10075
5372019f
AD
100762002-05-05 Akim Demaille <akim@epita.fr>
10077
10078 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
10079 (GENERATE_MUSCLE_INSERT_TABLE): this.
10080 (output_int_table, output_unsigned_int_table, output_short_table)
10081 (output_token_number_table, output_item_number_table): Replace with...
10082 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
10083 (muscle_insert_short_table, muscle_insert_token_number_table)
10084 (muscle_insert_item_number_table): these.
10085 Adjust all callers.
10086 (prepare_tokens): Don't free `translations', since...
10087 * src/reader.h, src/reader.c (grammar_free): do it.
10088 Move to...
10089 * src/gram.h, src/gram.c (grammar_free): here.
10090 * data/bison.simple, data/bison.c++: b4_token_number_max is now
10091 b4_translate_max.
10092
5df5f6d5
AD
100932002-05-05 Akim Demaille <akim@epita.fr>
10094
10095 * src/output.c (output_unsigned_int_table): New.
10096 (prepare_rules): `i' is unsigned.
10097 `prhs', `rline', `r2' are unsigned int.
10098 Rename muscle `rhs_number_max' as `rhs_max'.
10099 Output muscles `prhs_max', `rline_max', and `r2_max'.
10100 Free rline and r1.
10101 * data/bison.simple, data/bison.c++: Adjust to use these muscles
10102 to compute types instead of constant types.
10103 * tests/regression.at (Web2c Actions): Adjust.
10104
b87f8b21
AD
101052002-05-04 Akim Demaille <akim@epita.fr>
10106
10107 * src/symtab.h (SALIAS, SUNDEF): Rename as...
10108 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
10109 Adjust dependencies.
10110 * src/output.c (token_definitions_output): Be sure not to output a
10111 `#define 'a'' when fed with `%token 'a' "a"'.
10112 * tests/regression.at (Token definitions): New.
10113
8bb936e4
PE
101142002-05-03 Paul Eggert <eggert@twinsun.com>
10115
10116 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
10117 for K&R C.
10118
101192002-05-03 gettextize <bug-gnu-gettext@gnu.org>
10120
10121 * Makefile.am (SUBDIRS): Remove intl.
10122 (EXTRA_DIST): Add config/config.rpath.
10123
53c71a12
AD
101242002-05-03 Akim Demaille <akim@epita.fr>
10125
10126 * data/bison.simple (m4_if): Don't output empty enums.
10127 And actually, output valid enum definitions :(.
10128
289dd0cf
AD
101292002-05-03 Akim Demaille <akim@epita.fr>
10130
10131 * configure.bat: Remove, completely obsolete.
10132 * Makefile.am (EXTRA_DIST): Adjust.
10133 Don't distribute config.rpath...
10134 * config/Makefile.am (EXTRA_DIST): Do it.
10135
db85e524
AD
101362002-05-03 Akim Demaille <akim@epita.fr>
10137
10138 * configure.in (GETTEXT_VERSION): New.
10139 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
10140
83ccf991
AD
101412002-05-03 Akim Demaille <akim@epita.fr>
10142
10143 * data/bison.simple (b4_token_enum): New.
10144 (b4_token_defines): Use it to output tokens both as #define and
10145 enums.
10146 Suggested by Paul Eggert.
10147 * src/output.c (token_definitions_output): Don't output spurious
10148 white spaces.
10149
1f418995
AD
101502002-05-03 Akim Demaille <akim@epita.fr>
10151
10152 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10153
45119f04
RA
101542002-05-02 Robert Anisko <robert@lrde.epita.fr>
10155
10156 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
10157 Update the stack class, give a try to deque as the default container.
10158
b2d52318
AD
101592002-05-02 Akim Demaille <akim@epita.fr>
10160
10161 * data/bison.simple (yyparse): Do not implement @$ = @1.
10162 (YYLLOC_DEFAULT): Adjust to do it.
10163 * doc/bison.texinfo (Location Default Action): Fix.
10164
3a8b4109
AD
101652002-05-02 Akim Demaille <akim@epita.fr>
10166
10167 * src/reader.c (parse_braces): Merge into...
10168 (parse_action): this.
10169
84614e13
AD
101702002-05-02 Akim Demaille <akim@epita.fr>
10171
10172 * configure.in (ALL_LINGUAS): Remove.
10173 * po/LINGUAS, hr.po: New.
10174
fdbcd8e2
AD
101752002-05-02 Akim Demaille <akim@epita.fr>
10176
10177 Remove the so called hairy (semantic) parsers.
10178
10179 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
10180 * src/gram.h, src/gram.c (semantic_parser): Remove.
10181 (rule_t): Remove the guard and guard_line members.
10182 * src/lex.h (token_t): remove tok_guard.
10183 * src/options.c (option_table): Remove %guard and %semantic_parser
10184 support.
10185 * src/output.c, src/output.h (guards_output): Remove.
10186 (prepare): Adjust.
10187 (token_definitions_output): Don't output the `T'
10188 tokens (???).
10189 (output_skeleton): Don't output the guards.
10190 * src/files.c, src/files.c (attrsfile): Remove.
10191 * src/reader.c (symbol_list): Remove the guard and guard_line
10192 members.
10193 Adjust dependencies.
10194 (parse_guard): Remove.
10195 * data/bison.hairy: Remove.
10196 * doc/bison.texinfo (Environment Variables): Remove occurrences of
10197 BISON_HAIRY.
10198
82b6cb3f
AD
101992002-05-02 Akim Demaille <akim@epita.fr>
10200
10201 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
10202 (parse_guard): Rename the formal argument `stack_offset' as
10203 `rule_length', which is more readable.
10204 Adjust callers.
10205 (copy_at, copy_dollar): Instead of outputting the hard coded
10206 values of $$, $n and so forth, output invocation to b4_lhs_value,
10207 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
10208 Note: this patch partially drops `semantic-parser' support: it
10209 always does `rule_length - n', where semantic parsers ought to
10210 always use `-n'.
82b6cb3f
AD
10211 * data/bison.simple, data/bison.c++ (b4_lhs_value)
10212 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
10213
6cbfbcc5
AD
102142002-05-02 Akim Demaille <akim@epita.fr>
10215
10216 * configure.in (AC_INIT): Bump to 1.49b.
10217 (AM_INIT_AUTOMAKE): Short invocation.
10218
b8548114
AD
102192002-05-02 Akim Demaille <akim@epita.fr>
10220
10221 Version 1.49a.
10222
c20cd1fa
AD
102232002-05-01 Akim Demaille <akim@epita.fr>
10224
10225 * src/skeleton.h: Remove.
10226
8a9566d4
AD
102272002-05-01 Akim Demaille <akim@epita.fr>
10228
10229 * src/skeleton.h: Fix the #endif.
10230 Reported by Magnus Fromreide.
10231
8c6d399a
PE
102322002-04-26 Paul Eggert <eggert@twinsun.com>
10233
10234 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
10235 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 10236 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 10237
2b7ed18a
RA
102382002-04-25 Robert Anisko <robert@lrde.epita.fr>
10239
10240 * src/scan-skel.l: Postprocess quadrigraphs.
10241
10242 * src/reader.c (copy_character): New function, used to output
10243 single characters while replacing `[' and `]' with quadrigraphs, to
10244 avoid troubles with M4 quotes.
10245 (copy_comment): Output characters with copy_character.
10246 (read_additionnal_code): Likewise.
10247 (copy_string2): Likewise.
10248 (copy_definition): Likewise.
10249
10250 * tests/calc.at: Exercise M4 quoting.
10251
34a89c50
AD
102522002-04-25 Akim Demaille <akim@epita.fr>
10253
10254 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
10255 between `!' and the command.
10256 Reported by Paul Eggert.
10257
0dd1580a
RA
102582002-04-24 Robert Anisko <robert@lrde.epita.fr>
10259
10260 * tests/calc.at: Exercise prologue splitting.
10261
10262 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
10263 `b4_post_prologue' instead of `b4_prologue'.
10264
10265 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
10266 muscles.
10267 (output): Free pre_prologue_obstack and post_prologue_obstack.
10268 * src/files.h, src/files.c (attrs_obstack): Remove.
10269 (pre_prologue_obstack, post_prologue_obstack): New.
10270 * src/reader.c (copy_definition): Add a parameter to specify the
10271 obstack to fill, instead of using attrs_obstack unconditionally.
10272 (read_declarations): Pass pre_prologue_obstack to copy_definition if
10273 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
10274
83c1796f
PE
102752002-04-23 Paul Eggert <eggert@twinsun.com>
10276
10277 * data/bison.simple: Remove unnecessary commentary and white
10278 space differences from 1_29-branch.
10279 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
10280
10281 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
10282 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
10283 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10284 constructors or destructors.
10285
10286 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
10287
1207eeac
AD
102882002-04-23 Akim Demaille <akim@epita.fr>
10289
10290 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
10291 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
10292 location with columns.
10293 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
10294 All reported by Paul Eggert.
10295
78ab8f67
AD
102962002-04-22 Akim Demaille <akim@epita.fr>
10297
10298 * src/reduce.c (dump_grammar): Move to...
10299 * src/gram.h, src/gram.c (grammar_dump): here.
10300 Be sure to separate long item numbers.
10301 Don't read the members of a rule's prec if its nil.
10302
133c20e2
AD
103032002-04-22 Akim Demaille <akim@epita.fr>
10304
10305 * src/output.c (table_size, table_grow): New.
10306 (MAXTABLE): Remove, replace uses with table_size.
10307 (pack_vector): Instead of dying when the table is too big, grow it.
10308
9515e8a7
AD
103092002-04-22 Akim Demaille <akim@epita.fr>
10310
10311 * data/bison.simple (yyr1): Its type is that of a token number.
10312 * data/bison.c++ (r1_): Likewise.
10313 * tests/regression.at (Web2c Actions): Adjust.
10314
23c5a174
AD
103152002-04-22 Akim Demaille <akim@epita.fr>
10316
10317 * src/reader.c (token_translations_init): 256 is now the default
10318 value for the error token, i.e., it will be assigned another
10319 number if the user assigned 256 to one of her tokens.
10320 (reader): Don't force 256 to error.
10321 * doc/bison.texinfo (Symbols): Adjust.
10322 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10323 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10324 etc. instead of 10, 20, 30 (which was used to `jump' over error
10325 (256) and undefined (2)).
10326
5fbb0954
AD
103272002-04-22 Akim Demaille <akim@epita.fr>
10328
10329 Propagate more token_number_t.
10330
10331 * src/gram.h (token_number_as_item_number)
10332 (item_number_as_token_number): New.
10333 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10334 Use it to create output_item_number_table and
10335 output_token_number_table.
10336 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10337 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10338 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10339 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10340
4f940944
AD
103412002-04-22 Akim Demaille <akim@epita.fr>
10342
10343 * src/output.h, src/output.c (get_lines_number): Remove.
10344
3ded9a63
AD
103452002-04-19 Akim Demaille <akim@epita.fr>
10346
10347 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10348 as Lex/Flex'.
10349 (Debugging): More details about enabling the debugging features.
10350 (Table of Symbols): Describe $$, $n, @$, and @n.
10351 Suggested by Tim Josling.
10352
e0c471a9
AD
103532002-04-19 Akim Demaille <akim@epita.fr>
10354
10355 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10356
fecc10cd
AD
103572002-04-10 Akim Demaille <akim@epita.fr>
10358
10359 * src/system.h: Rely on HAVE_LIMITS_H.
10360 Suggested by Paul Eggert.
10361
51dec47b
AD
103622002-04-09 Akim Demaille <akim@epita.fr>
10363
10364 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
10365 full stderr, and strip it according to the bison options, instead
10366 of composing the error message from different bits.
10367 This makes it easier to check for several error messages.
10368 Adjust all the invocations.
10369 Add an invocation exercising the error token.
10370 Add an invocation demonstrating a stupid error message.
10371 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
10372 Adjust the tests.
10373 Error message are for stderr, not stdout.
10374
007a50a4
AD
103752002-04-09 Akim Demaille <akim@epita.fr>
10376
10377 * src/gram.h, src/gram.c (error_token_number): Remove, use
10378 errtoken->number.
10379 * src/reader.c (reader): Don't specify the user token number (2)
10380 for $undefined, as it uselessly prevents using it.
10381 * src/gram.h (token_number_t): Move to...
10382 * src/symtab.h: here.
10383 (state_t.number): Is a token_number_t.
10384 * src/print.c, src/reader.c: Use undeftoken->number instead of
10385 hard coded 2.
10386 (Even though this 2 is not the same as above: the number of the
10387 undeftoken remains being 2, it is its user token number which
10388 might not be 2).
10389 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
10390 `user_token_number_max'.
10391 Output `undef_token_number'.
10392 * data/bison.simple, data/bison.c++: Use them.
10393 Be sure to map invalid yylex return values to
10394 `undef_token_number'. This saves us from gratuitous SEGV.
10395
10396 * tests/conflicts.at (Solved SR Conflicts)
10397 (Unresolved SR Conflicts): Adjust.
10398 * tests/regression.at (Web2c Actions): Adjust.
10399
06446ccf
AD
104002002-04-08 Akim Demaille <akim@epita.fr>
10401
10402 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
10403 Adding #line.
10404 Remove the duplicate `typedefs'.
10405 (RhsNumberType): Fix the declaration and various other typos.
10406 Use __ofile__.
10407 * data/bison.simple: Use __ofile__.
10408 * src/scan-skel.l: Handle __ofile__.
10409
62a3e4f0
AD
104102002-04-08 Akim Demaille <akim@epita.fr>
10411
10412 * src/gram.h (item_number_t): New, the type of item numbers in
10413 RITEM. Note that it must be able to code symbol numbers as
10414 positive number, and the negation of rule numbers as negative
10415 numbers.
10416 Adjust all dependencies (pretty many).
10417 * src/reduce.c (rule): Remove this `short *' pointer: use
10418 item_number_t.
10419 * src/system.h (MINSHORT, MAXSHORT): Remove.
10420 Include `limits.h'.
10421 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
10422 (shortcpy): Remove.
10423 (MAXTABLE): Move to...
10424 * src/output.c (MAXTABLE): here.
10425 (prepare_rules): Use output_int_table to output rhs.
10426 * data/bison.simple, data/bison.c++: Adjust.
10427 * tests/torture.at (Big triangle): Move the limit from 254 to
10428 500.
10429 * tests/regression.at (Web2c Actions): Ajust.
10430
10431 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
10432 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
10433 passes, but produces negative #line number, once fixed, GCC is
10434 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
10435 C), it passes.
10436 * src/state.h (state_h): Code input lines on ints, not shorts.
10437
bb88b0fc
AD
104382002-04-08 Akim Demaille <akim@epita.fr>
10439
10440 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
10441 and then the grammar.
10442
9a636f47
AD
104432002-04-08 Akim Demaille <akim@epita.fr>
10444
10445 * src/system.h: No longer using strndup.
10446
680e8701
AD
104472002-04-07 Akim Demaille <akim@epita.fr>
10448
10449 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
10450 * src/output.c (output_table_data): Return the longest number.
10451 (prepare_tokens): Output `token_number_max').
10452 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
10453 New.
10454 Use them to define yy_token_number_type/TokenNumberType.
10455 Use this type for yytranslate.
10456 * tests/torture.at (Big triangle): Push the limit from 124 to
10457 253.
10458 * tests/regression.at (Web2c Actions): Adjust.
10459
817e9f41
AD
104602002-04-07 Akim Demaille <akim@epita.fr>
10461
10462 * tests/torture.at (Big triangle): New.
10463 (GNU AWK Grammar, GNU Cim Grammar): Move to...
10464 * tests/existing.at: here.
10465
5123689b
AD
104662002-04-07 Akim Demaille <akim@epita.fr>
10467
10468 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
10469 nritems.
10470 Adjust dependencies.
10471
f3849179
AD
104722002-04-07 Akim Demaille <akim@epita.fr>
10473
10474 * src/reader.c: Normalize increments to prefix form.
10475
bd02036a
AD
104762002-04-07 Akim Demaille <akim@epita.fr>
10477
10478 * src/reader.c, symtab.c: Remove debugging code.
10479
db8837cb
AD
104802002-04-07 Akim Demaille <akim@epita.fr>
10481
10482 Rename all the `bucket's as `symbol_t'.
10483
10484 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
10485 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
10486 * src/symtab.c, src/symtab.h (bucket): Rename as...
10487 (symbol_t): this.
10488 (symbol_list_new, bucket_check_defined, bucket_make_alias)
10489 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
10490 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10491 (buckets_new, buckets_free, buckets_do): Rename as...
10492 (symbol_list_new, symbol_check_defined, symbol_make_alias)
10493 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10494 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
10495 (symbols_new, symbols_free, symbols_do): these.
10496
72a23c97
AD
104972002-04-07 Akim Demaille <akim@epita.fr>
10498
10499 Use lib/hash for the symbol table.
10500
10501 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
10502 EOF.
10503 * src/lex.c (lex): Set the `number' member of new terminals.
10504 * src/reader.c (bucket_check_defined, bucket_make_alias)
10505 (bucket_check_alias_consistence, bucket_translation): New.
10506 (reader, grammar_free, readgram, token_translations_init)
10507 (packsymbols): Adjust.
10508 (reader): Number the predefined tokens.
10509 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
10510 for predefined tokens.
10511 * src/symtab.h (bucket): Remove all the hash table related
10512 members.
10513 * src/symtab.c (symtab): Replace by...
10514 (bucket_table): this.
10515 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10516 (buckets_new, buckets_do): New.
10517
280a38c3
AD
105182002-04-07 Akim Demaille <akim@epita.fr>
10519
10520 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
10521 (start_symbol, max_user_token_number, semantic_parser)
10522 (error_token_number): Initialize.
10523 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
10524 Initialize.
10525 (reader): Don't.
10526 (errtoken, eoftoken, undeftoken, axiom): Extern.
10527
03b31c0c
AD
105282002-04-07 Akim Demaille <akim@epita.fr>
10529
10530 * src/gram.h (rule_s): prec and precsym are now pointers
10531 to the bucket giving the priority/associativity.
10532 Member `associativity' removed: useless.
10533 * src/reduce.c, src/conflicts.c: Adjust.
10534
8b3df748
AD
105352002-04-07 Akim Demaille <akim@epita.fr>
10536
10537 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10538 Properly escape the symbols' TAG when outputting them.
10539
e601aa1d
AD
105402002-04-07 Akim Demaille <akim@epita.fr>
10541
10542 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10543
b0299a2e
AD
105442002-04-07 Akim Demaille <akim@epita.fr>
10545
10546 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10547 (LArule): this, which is an array to rule_t*.
10548 * src/print.c, src/conflicts.c: Adjust.
10549
d7e1f00c
AD
105502002-04-07 Akim Demaille <akim@epita.fr>
10551
10552 * src/gram.h (rule_t): Rename `number' as `user_number'.
10553 `number' is a new member.
10554 Adjust dependencies.
10555 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10556
cc9305dd
AD
105572002-04-07 Akim Demaille <akim@epita.fr>
10558
10559 As a result of the previous patch, it is no longer needed
10560 to reorder ritem itself.
10561
10562 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10563
b0940840
AD
105642002-04-07 Akim Demaille <akim@epita.fr>
10565
10566 Be sure never to walk through RITEMS, but use only data related to
10567 the rules themselves. RITEMS should be banished.
10568
10569 * src/output.c (output_token_translations): Rename as...
10570 (prepare_tokens): this.
10571 In addition to `translate', prepare the muscles `tname' and
10572 `toknum', which were handled by...
10573 (output_rule_data): this.
10574 Remove, and move the remainder of its outputs into...
10575 (prepare_rules): this new routines, which also merges content from
10576 (output_gram): this.
10577 (prepare_rules): Be sure never to walk through RITEMS.
10578 (output_stos): Rename as...
10579 (prepare_stos): this.
10580 (output): Always invoke prepare_states, after all, just don't use it
10581 in the output if you don't need it.
10582
643a5994
AD
105832002-04-07 Akim Demaille <akim@epita.fr>
10584
10585 * src/LR0.c (new_state): Display `nstates' as the name of the
10586 newly created state.
10587 Adjust to initialize first_state and last_state if needed.
10588 Be sure to distinguish the initial from the final state.
10589 (new_states): Create the itemset of the initial state, and use
10590 new_state.
10591 * src/closure.c (closure): Now that the initial state has its
10592 items properly set, there is no need for a special case when
10593 creating `ruleset'.
10594
10595 As a result, now the rule 0, reducing to $axiom, is visible in the
10596 outputs. Adjust the test suite.
10597
10598 * tests/conflicts.at (Solved SR Conflicts)
10599 (Unresolved SR Conflicts): Adjust.
10600 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
10601 * tests/conflicts.at (S/R in initial): New.
10602
b4c4ccc2
AD
106032002-04-07 Akim Demaille <akim@epita.fr>
10604
10605 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
10606 the RHS of the rules.
10607 * src/output.c (output_gram): Likewise.
10608
bba97eb2
AD
106092002-04-07 Akim Demaille <akim@epita.fr>
10610
10611 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
10612 bucket.
10613 Adjust all dependencies.
10614 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
10615 `number' of the buckets too.
10616 * src/gram.h: Include `symtab.h'.
10617 (associativity): Move to...
10618 * src/symtab.h: here.
10619 No longer include `gram.h'.
10620
c3b407f4
AD
106212002-04-07 Akim Demaille <akim@epita.fr>
10622
10623 * src/gram.h, src/gram.c (rules_rhs_length): New.
10624 (ritem_longest_rhs): Use it.
10625 * src/gram.h (rule_t): `number' is a new member.
10626 * src/reader.c (packgram): Set it.
10627 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
10628 the end of `rules', and count them out of `nrules'.
10629 (reduce_output, dump_grammar): Adjust.
10630 * src/print.c (print_grammar): It is no longer needed to check for
10631 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
10632 * tests/reduce.at (Reduced Automaton): New test.
10633
11652ab3
AD
106342002-04-07 Akim Demaille <akim@epita.fr>
10635
10636 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
10637 lacking `+ 1' to nrules, Bison reported as useless a token if it
10638 was used solely to set the precedence of the last rule...
10639
26b23c1a
AD
106402002-04-07 Akim Demaille <akim@epita.fr>
10641
10642 * data/bison.c++, data/bison.simple: Don't output the current file
10643 name in #line, to avoid useless diffs between two identical
10644 outputs under different names.
10645
18bcecb0
AD
106462002-04-07 Akim Demaille <akim@epita.fr>
10647
10648 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
10649 Normalize loops to using `< nrules + 1', not `<= nrules'.
10650
fa770c86
AD
106512002-04-07 Akim Demaille <akim@epita.fr>
10652
10653 * TODO: Update.
10654
d9b739c3
AD
106552002-04-07 Akim Demaille <akim@epita.fr>
10656
10657 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
10658 bucket.value as bucket.number.
10659
99013900
AD
106602002-04-07 Akim Demaille <akim@epita.fr>
10661
10662 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
10663 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10664 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
10665 RHS, instead of being an index in RITEMS.
10666
e966383b
PE
106672002-04-04 Paul Eggert <eggert@twinsun.com>
10668
10669 * doc/bison.texinfo: Update copyright date.
10670 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
10671 (Symbols): Warn about running Bison in one character set,
10672 but compiling and/or running in an incompatible one.
10673 Warn about character code 256, too.
10674
106752002-04-03 Paul Eggert <eggert@twinsun.com>
10676
10677 * src/bison.data (YYSTACK_ALLOC): Depend on whether
10678 YYERROR_VERBOSE is nonzero, not whether it is defined.
10679
10680 Merge changes from bison-1_29-branch.
c307773e 10681
8d6c48b9
PE
106822002-03-20 Paul Eggert <eggert@twinsun.com>
10683
10684 Merge fixes from Debian bison_1.34-1.diff.
10685
10686 * configure.in (AC_PREREQ): 2.53.
10687
e53c6322
AD
106882002-03-20 Akim Demaille <akim@epita.fr>
10689
10690 * src/conflicts.c (log_resolution): Argument `resolution' is const.
10691
9ffbeca7
PE
106922002-03-19 Paul Eggert <eggert@twinsun.com>
10693
21db0b2a
PE
10694 * src/bison.simple (YYCOPY): New macro.
10695 (YYSTACK_RELOCATE): Use it.
10696 Remove Type arg; no longer needed. All callers changed.
10697 (yymemcpy): Remove; no longer needed.
10698
9ffbeca7
PE
10699 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
10700 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10701
642cb8f8
AD
107022002-03-19 Akim Demaille <akim@epita.fr>
10703
10704 Test and fix the #line outputs.
10705
10706 * tests/atlocal.at (GCC): New.
10707 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 10708 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
10709 (Action synch line, Epilogue synch line): New tests.
10710 * src/reader.c (parse_union_decl): Define the muscle stype_line.
10711 * data/bison.simple, data/bison.c++: Use it.
10712
3c31a486
AD
107132002-03-19 Akim Demaille <akim@epita.fr>
10714
10715 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
10716 (Solved SR Conflicts, %expect not enough, %expect right)
10717 (%expect too much): Move to...
10718 * tests/conflicts.at: this new file.
10719
0d8bed56
AD
107202002-03-19 Akim Demaille <akim@epita.fr>
10721
10722 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10723 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
10724 that we can move to enums for instance.
10725 * src/output.c (token_definitions_output): Output a list of
10726 `token-name, token-number' instead of the #define.
10727 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
10728
9208d17f
AD
107292002-03-14 Akim Demaille <akim@epita.fr>
10730
10731 Use Gettext 0.11.1.
10732
af27eacb
RA
107332002-03-09 Robert Anisko <robert@lrde.epita.fr>
10734
10735 * data/bison.c++: Make the user able to add members to the generated
10736 parser by subclassing.
10737
9101a310
RA
107382002-03-05 Robert Anisko <robert@lrde.epita.fr>
10739
10740 * src/reader.c (read_additionnal_code): `c' should be an integer, not
10741 a character.
10742 Reported by Nicolas Tisserand and Nicolas Burrus.
10743
fff9bf0b
RA
107442002-03-04 Robert Anisko <robert@lrde.epita.fr>
10745
10746 * src/reader.c: Warn about lacking semi-colons, do not complain.
10747
64dba31e
RA
107482002-03-04 Robert Anisko <robert@lrde.epita.fr>
10749
10750 * data/bison.c++: Remove a debug line.
10751
374f5a14
RA
107522002-03-04 Robert Anisko <robert@lrde.epita.fr>
10753
10754 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
10755 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
10756 provide a default implementation.
10757
bfcf1f3a
AD
107582002-03-04 Akim Demaille <akim@epita.fr>
10759
10760 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
10761 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
10762 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
10763 * tests/semantic.at (Parsing Guards): Similarly.
10764 * src/reader.at (readgram): Complain if the last rule is not ended
10765 with a semi-colon.
10766
65ccf9fc
AD
107672002-03-04 Akim Demaille <akim@epita.fr>
10768
10769 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
10770 * src/closure.c: here.
10771 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
10772 RTC.
10773 * src/warshall.h, src/warshall.c: Remove.
10774 * tests/sets.at (Broken Closure): Adjust.
10775
d0039cbc
AD
107762002-03-04 Akim Demaille <akim@epita.fr>
10777
10778 * src/output.c (output_skeleton): tempdir is const.
10779 bytes_read is unused.
10780
345cea78
AD
107812002-03-04 Akim Demaille <akim@epita.fr>
10782
10783 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10784 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
10785 Update.
10786 From Michael Hayes.
10787
564801f7
AD
107882002-03-04 Akim Demaille <akim@epita.fr>
10789
10790 * src/closure.c (closure): `r' is unused.
10791
e5352bc7
AD
107922002-03-04 Akim Demaille <akim@epita.fr>
10793
10794 * tests/sets.at (Broken Closure): Add the ending `;'.
10795 * src/reader.at (readgram): Complain if a rule is not ended with a
10796 semi-colon.
10797
914feea9
AD
107982002-03-04 Akim Demaille <akim@epita.fr>
10799
10800 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
10801 (count_sr_conflicts): Use bitset_count.
10802 * src/reduce.c (inaccessable_symbols): Ditto.
10803 (bits_size): Remove.
10804 * src/warshall.h, src/warshall.c: Convert to bitsetv.
10805
f0250de6
AD
108062002-03-04 Akim Demaille <akim@epita.fr>
10807
10808 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
10809 * src/reduce.c: Remove the `bitset_zero's following the
10810 `bitset_create's, as now it is performed by the latter.
10811
ef017502
AD
108122002-03-04 Akim Demaille <akim@epita.fr>
10813
10814 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
10815 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
10816 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
10817 latest sources from Michael.
10818
76514394
AD
108192002-03-04 Akim Demaille <akim@epita.fr>
10820
10821 * src/output.c (output): Don't free the grammar.
10822 * src/reader.c (grammar_free): New.
10823 * src/main.c (main): Call it and don't free symtab here.
10824
55024580
AD
108252002-03-04 Akim Demaille <akim@epita.fr>
10826
10827 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
10828 before returning.
10829 Reported by Benoit Perrot.
10830
f9abaa2c
AD
108312002-03-04 Akim Demaille <akim@epita.fr>
10832
10833 Use bitset operations when possible, not loops over bits.
10834
10835 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
10836 bitset_or.
10837 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
10838 * src/reduce.c (useless_nonterminals): Formatting changes.
10839 * src/warshall.c (TC): Use bitset_or.
10840
0e721e75
AD
108412002-03-04 Akim Demaille <akim@epita.fr>
10842
10843 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
10844 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
10845 Ditto.
10846
0fb1ffb1
AD
108472002-03-04 Akim Demaille <akim@epita.fr>
10848
10849 * src/lalr.c (F): Now a bitset*.
10850 Adjust all dependencies.
10851
b86796bf
AD
108522002-03-04 Akim Demaille <akim@epita.fr>
10853
10854 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
10855 Adjust all dependencies.
10856
602bbf31
AD
108572002-03-04 Akim Demaille <akim@epita.fr>
10858
10859 * src/L0.c, src/LR0.h (nstates): Be size_t.
10860 Adjust comparisons (signed vs unsigned).
10861 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
10862 bitset*.
10863 Adjust all dependencies.
10864
d8a0245c
AD
108652002-03-04 Akim Demaille <akim@epita.fr>
10866
10867 * src/closure.c (firsts): Now, also a bitset.
10868 Adjust all dependencies.
10869 (varsetsize): Remove, now unused.
10870 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
10871
34ba9743
AD
108722002-03-04 Akim Demaille <akim@epita.fr>
10873
10874 * src/print.c: Convert to use bitset.h, not hand coded iterations
10875 over ints.
10876
ed86e78c
AD
108772002-03-04 Akim Demaille <akim@epita.fr>
10878
10879 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
10880
dfdb1797
AD
108812002-03-04 Akim Demaille <akim@epita.fr>
10882
10883 * src/closure.c (ruleset): Be a bitset.
10884 (rulesetsize): Remove.
10885
7086e707
AD
108862002-03-04 Akim Demaille <akim@epita.fr>
10887
10888 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10889 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
10890 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
10891 * src/closure.c (fderives): Be an array of bitsets.
10892
98254360
RA
108932002-02-28 Robert Anisko <robert@lrde.epita.fr>
10894
10895 * data/bison.c++: Merge the two generated headers. Insert a copyright
10896 notice in each output file.
10897
a75c057f
AD
108982002-02-28 Akim Demaille <akim@epita.fr>
10899
10900 * data/bison.c++: Copy the prologue of bison.simple to fetch
10901 useful M4 definitions, such as b4_header_guard.
10902
06b00abc
AD
109032002-02-25 Akim Demaille <akim@epita.fr>
10904
10905 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
10906 translator friendly scheme for the bgr
10907 copyright notice.
06b00abc 10908
70e7d534
AD
109092002-02-25 Akim Demaille <akim@epita.fr>
10910
10911 * src/output.c (header_output): Remove, now handled completely via
10912 M4.
10913
abe017f6
AD
109142002-02-25 Akim Demaille <akim@epita.fr>
10915
10916 * m4/m4.m4: New, from CVS Autoconf.
10917 * configure.in: Invoke it.
10918 * src/output.c (output_skeleton): Use its result instead of the
10919 hard coded name.
10920
381fb12e
AD
109212002-02-25 Akim Demaille <akim@epita.fr>
10922
10923 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
10924 Fileutils 4.1.5.
10925 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
10926 * src/output.c (output_skeleton): Use mkstemp to create a real
10927 temporary file.
10928 Move the filling of `skeleton' and its muscle to...
10929 (prepare): here.
10930 (output): Move the definition of the prologue muscle to...
10931 (prepare): here.
10932 * src/system.h (DEFAULT_TMPDIR): New.
10933
6f38107f
PE
109342002-02-14 Paul Eggert <eggert@twinsun.com>
10935
10936 Remove the support for C++ namespace cleanliness; it was
10937 causing more problems than it was curing, since it didn't work
10938 properly on some nonstandard C++ compilers. This can wait
10939 for a proper C++ parser.
10940
10941 * NEWS: Document this.
10942 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
10943 of C++, as it's treated like C now.
10944 * src/bison.simple (YYSTD): Remove.
10945 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
10946 Treat C++ just like Standard C instead of trying to support
10947 namespace cleanliness.
10948
80cce3da
AD
109492002-02-14 Akim Demaille <akim@epita.fr>
10950
10951 * tests/regression.at (else): Adjust to Andreas' change.
10952
842e8679
AD
109532002-02-14 Akim Demaille <akim@epita.fr>
10954
10955 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
10956
4bda3f10
AD
109572002-02-13 Andreas Schwab <schwab@suse.de>
10958
10959 * src/output.c (output_rule_data): Don't output NULL, it might
10960 not be defined yet.
10961
4162fa07 109622002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 10963
4162fa07
RA
10964 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
10965 (Copyright notice): Update.
b418ecd8 10966
bd16a5dc
AD
109672002-02-11 Akim Demaille <akim@epita.fr>
10968
10969 * tests/regression.at (%nonassoc and eof): Don't include
10970 nonportable headers.
10971
8d69a1a3
RA
109722002-02-08 Robert Anisko <robert@lrde.epita.fr>
10973
10974 * data/bison.c++: Correct error recovery. Make the user able to
10975 initialize the starting location.
10976
9b2d0677
AD
109772002-02-07 Akim Demaille <akim@epita.fr>
10978
10979 * tests/input.at: New.
10980
69e2658b
RA
109812002-02-07 Robert Anisko <robert@lrde.epita.fr>
10982
10983 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 10984 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
10985 directives around tables only needed for debugging.
10986
4aacc3a7
RA
109872002-02-07 Robert Anisko <robert@lrde.epita.fr>
10988
10989 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
10990 C++ parsers.
10991 (yy::b4_name::parse): Use print_.
10992
762a801e
RA
109932002-02-07 Robert Anisko <robert@lrde.epita.fr>
10994
10995 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
10996
4bb2bc3f
RA
109972002-02-07 Robert Anisko <robert@lrde.epita.fr>
10998
10999 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
11000 C++ parsers.
11001 (yy::b4_name::parse): Build verbose error messages, and use error_.
11002
6b45a3ca
RA
110032002-02-06 Robert Anisko <robert@lrde.epita.fr>
11004
11005 * data/bison.c++: Fix m4 quoting in comments.
11006
50997c6e
RA
110072002-02-06 Robert Anisko <robert@lrde.epita.fr>
11008
11009 * data/bison.c++: Adjust the parser code. Fix some muscles that were
11010 not expanded by m4.
11011
3f3eed27
AD
110122002-02-05 Akim Demaille <akim@epita.fr>
11013
11014 * data/bison.c++: Adjust to the M4 back end.
11015 More is certainly needed.
11016
be2a1a68
AD
110172002-02-05 Akim Demaille <akim@epita.fr>
11018
11019 Give a try to M4 as a back end.
11020
11021 * lib/readpipe.c: New, from wdiff.
11022 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
11023 BISON_HAIRY.
11024 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
11025 specific values. Now it is m4 that performs the lookup.
11026 * src/parse-skel.y: Remove.
11027 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
11028 * src/output.c (actions_output, guards_output)
11029 (token_definitions_output): No longer keeps track of the output
11030 line number, hence remove the second argument.
11031 (guards_output): Check against the guard member of a rule, not the
11032 action member.
11033 Adjust callers.
11034 (output_skeleton): Don't look for the skeleton location, let m4 do
11035 that.
11036 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
11037 file will be used.
11038 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
11039 (prepare): Given that for the time being changesyntax is not
11040 usable in M4, rename the muscles using `-' to `_'.
11041 Define `defines_flag', `output_parser_name' and `output_header_name'.
11042 * src/output.h (actions_output, guards_output)
11043 (token_definitions_output): Adjust prototypes.
11044 * src/scan-skel.l: Instead of scanning the skeletons, it now
11045 processes the output of m4: `__oline__' and `#output'.
11046 * data/bison.simple: Adjust to be used by M4(sugar).
11047 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
11048 to date.
11049 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
11050 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
11051 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
11052 shamelessly stolen from CVS Autoconf.
11053
beda758b
AD
110542002-02-05 Akim Demaille <akim@epita.fr>
11055
11056 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
11057 * configure.in: Check for the declarations of free and malloc.
11058 * src/muscle_tab.c: Adjust.
11059
5ece6d43
AD
110602002-02-05 Akim Demaille <akim@epita.fr>
11061
11062 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
11063 which have no values.
11064
5bb18f9a
AD
110652002-02-05 Akim Demaille <akim@epita.fr>
11066
11067 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
11068 * data/: here.
11069
894dd62e
PE
110702002-01-29 Paul Eggert <eggert@twinsun.com>
11071
11072 * src/bison.simple (YYSIZE_T): Do not define merely because
11073 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
11074 On some platforms, <alloca.h> does not declare YYSTD (size_t).
11075
82841af7
AD
110762002-01-27 Akim Demaille <akim@epita.fr>
11077
11078 Fix `%nonassoc and eof'.
11079
11080 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
11081 which were not properly copied! Replace
11082 memcpy (res->errs, src->errs, src->nerrs);
11083 with
11084 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
11085 !!!
11086 * tests/regression.at (%nonassoc and eof): Adjust to newest
11087 Autotest: `.' is not in the PATH.
11088
318b76e9
AD
110892002-01-27 Akim Demaille <akim@epita.fr>
11090
11091 * tests/sets.at (AT_EXTRACT_SETS): New.
11092 (Nullable): Use it.
11093 (Firsts): New.
11094
30d2f3d5
AD
110952002-01-26 Akim Demaille <akim@epita.fr>
11096
11097 * tests/actions.at, tests/calc.at, tests/headers.at,
11098 * tests/torture.at: Adjust to the newest Autotest which no longer
11099 forces `.' in the PATH.
11100
30f8c395
AD
111012002-01-25 Akim Demaille <akim@epita.fr>
11102
11103 * tests/regression.at (%nonassoc and eof): New.
11104 Suggested by Robert Anisko.
11105
29ae55f1
AD
111062002-01-24 Akim Demaille <akim@epita.fr>
11107
11108 Bison dumps core when trying to complain about broken input files.
11109 Reported by Cris van Pelt.
11110
11111 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
11112 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
11113 into...
11114 (Invalid inputs): Strengthen: exercise parse_percent_token.
11115
2b548aa6
RA
111162002-01-24 Robert Anisko <robert.anisko@epita.fr>
11117
11118 * src/Makefile.am: Add bison.c++.
11119 * src/bison.c++: New skeleton.
11120
bb0146c2
AD
111212002-01-21 Paolo Bonzini <bonzini@gnu.org>
11122
11123 * po/it.po: New.
11124
bec30531
AD
111252002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
11126
11127 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
11128
fc6edc45
MA
111292002-01-20 Marc Autret <marc@gnu.org>
11130
11131 * src/files.c (compute_output_file_names): Fix
11132
5e5d5415
MA
111332002-01-20 Marc Autret <marc@gnu.org>
11134
11135 * tests/output.at: New test.
11136 * src/files.c (compute_base_names): Don't map extensions when
11137 the YACC flag is set, use defaults.
11138 Reported by Evgeny Stambulchik.
11139
44ea3fbd
MA
111402002-01-20 Marc Autret <marc@gnu.org>
11141
ba0fe3c7
PE
11142 * src/system.h: Need to define __attribute__ away for non-GCC
11143 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
11144 Suggested by Albert Chin-A-Young.
11145
338963d1
TVH
111462002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
11147
11148 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
11149 canonical definition.
11150 * src/system.h: Use the canonical definition for PARAMS (avoids
11151 a conflict with the macro from lib/hash.h).
11152
c57b2479
AD
111532002-01-11 Akim Demaille <akim@epita.fr>
11154
11155 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 11156 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 11157
b85810ae
AD
111582002-01-09 Akim Demaille <akim@epita.fr>
11159
11160 * src/files.c, src/files.h (output_infix): New.
11161 (tab_extension): Remove.
11162 (compute_base_names): Compute the former, drop the latter.
11163 * src/output.c (prepare): Insert the muscles `output-infix', and
11164 `output-suffix'.
11165 * src/parse-skel.y (string, string.1): New.
11166 (section.header): Use it.
11167 (section.yacc): Remove.
11168 (prefix): Remove too.
11169 * src/scan-skel.l: Adjust.
11170 * src/bison.simple, src/bison.hairy: Adjust.
11171
cae60122
AD
111722002-01-09 Akim Demaille <akim@epita.fr>
11173
11174 * configure.in (WERROR_CFLAGS): Compute it.
11175 * src/Makefile.am (CFLAGS): Pass it.
11176 * tests/atlocal.in (CFLAGS): Idem.
11177 * src/files.c: Fix a few warnings.
11178 (get_extension_index): Remove, unused.
11179
ae404801
AD
111802002-01-08 Akim Demaille <akim@epita.fr>
11181
11182 * src/getargs.c (AS_FILE_NAME): New.
11183 (getargs): Use it to convert DOSish file names.
11184 * src/files.c (base_name): Rename as full_base_name to avoid
11185 clashes with `base_name ()'.
11186 (filename_split): New.
11187 (compute_base_names): N-th rewrite, using filename_split.
11188
22312b71
AD
111892002-01-08 Akim Demaille <akim@epita.fr>
11190
11191 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
11192 New, stolen from the Fileutils 4.1.
11193 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11194 * configure.in: Check for the presence of memrchr, and of its
11195 prototype.
11196
a67cef01
TVH
111972002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
11198
11199 * lib/hash.h (__P): Added definition for this macro.
11200 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
11201 BUILT_SOURCES, to ensure they are generated first.
11202 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
11203 %error-verbose to allow bootstrapping with bison 1.30x.
11204
2b25d624
AD
112052002-01-06 Akim Demaille <akim@epita.fr>
11206
11207 * src/reader.c (parse_braces): Don't fetch the next char, the
11208 convention is to fetch on entry.
11209 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
11210 'switch' without a following semicolon.
11211 * tests/regression.at (braces parsing): New.
11212
3460813b
AD
112132002-01-06 Akim Demaille <akim@epita.fr>
11214
11215 Bison is dead wrong in its RR conflict reports.
11216
11217 * tests/torture.at (GNU Cim Grammar): New.
11218 * src/conflicts.c (count_rr_conflicts): Fix.
11219
73784c64
AD
112202002-01-06 Akim Demaille <akim@epita.fr>
11221
11222 Creating package.m4 from configure.ac causes too many problems.
11223
11224 * tests/Makefile.am (package.m4): Create it by hand,
11225 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
11226
25d81090
AD
112272002-01-06 Akim Demaille <akim@epita.fr>
11228
11229 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
11230 skeleton.h.
11231
a9b8959e
PE
112322002-01-04 Paul Eggert <eggert@twinsun.com>
11233
11234 * doc/bison.texinfo (Debugging):
11235 Remove YYSTDERR; it's no longer defined or used.
11236 Also, s/cstdio.h/cstdio/.
11237
25d81090
AD
112382002-01-03 Akim Demaille <akim@epita.fr>
11239
11240 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
11241
1109455c
AD
112422002-01-03 Akim Demaille <akim@epita.fr>
11243
11244 * src/parse-skel.y (process_skeleton): Don't bind the parser's
11245 tracing code to --trace, wait for a better --trace option, with
11246 args.
11247
7ea5e977
AD
112482002-01-03 Akim Demaille <akim@epita.fr>
11249
11250 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
11251 The ISO C++ standard is extremely clear about it: stderr is
11252 considered a macro, not a regular symbol (see table 94 `Header
11253 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
11254 Therefore std:: does not apply to it. It still does with fprintf.
11255 Also, s/cstdio.h/cstdio/.
11256
fab5b110
AD
112572002-01-03 Akim Demaille <akim@epita.fr>
11258
11259 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
11260 for non system headers.
11261
aed7fd9b
AD
112622002-01-02 Akim Demaille <akim@epita.fr>
11263
11264 Equip the skeleton chain with location tracking, runtime trace,
11265 pure parser and scanner.
11266
11267 * src/parse-skel.y: Request a pure parser, locations, and prefix
11268 renaming.
11269 (%union): Having several members with the same type does not help
11270 type mismatches, simplify.
11271 (YYPRINT, yyprint): New.
11272 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
11273 (skel_error): this.
11274 Handle locations.
11275 * src/scan-skel.l: Adjust to these changes.
11276 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
11277 (LOCATION_PRINT, skel_control_t): New.
11278
24fad99e
AD
112792001-12-30 Akim Demaille <akim@epita.fr>
11280
11281 * src/parse-skel.y: Get rid of the shift/reduce conflict:
11282 replace `gb' with BLANKS.
11283 * src/scan-skel.l: Adjust.
11284
a4b36db4
AD
112852001-12-30 Akim Demaille <akim@epita.fr>
11286
11287 * src/system.h: We don't need nor want bcopy.
11288 Throw away MS-DOS crap: we don't need getpid.
11289 * configure.in: We don't need strndup. It was even causing
11290 problems: because Flex includes the headers *before* us,
11291 _GNU_SOURCE is not defined by config.h, and therefore strndup was
11292 not visible.
11293 * lib/xstrndup.c: New.
11294 * src/scan-skel.l: Use it.
11295 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11296 * src/parse-skel.y: Use %directives instead of #defines.
11297
1239777d
AD
112982001-12-30 Akim Demaille <akim@epita.fr>
11299
11300 * src/skeleton.h: New.
11301 * src/output.c (output_parser, output_master_parser): Remove, dead
11302 code.
11303 * src/output.h (get_lines_number, actions_output, guards_output)
11304 (token_definitions_output): Prototype them.
11305 * src/parse-skel.y: Add the license notice.
11306 Include output.h and skeleton.h.
11307 (process_skeleton): Returns void, and takes a single parameter.
11308 * src/scan-skel.l: Add the license notice.
11309 Include skeleton.h.
11310 Don't use %option yylineno: it seems that then Flex imagines
11311 REJECT has been used, and therefore it won't reallocate its
11312 buffers (which makes no other sense to me than a bug). It results
11313 in warnings for `unused: yy_flex_realloc'.
11314
9b3add5b
RA
113152001-12-30 Robert Anisko <robert.anisko@epita.fr>
11316
11317 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11318 (MUSCLE_INSERT_PREFIX): ...to there.
11319 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11320 (MUSCLE_INSERT_PREFIX): Move from here...
11321
11322 * src/bison.hairy: Add a section directive. Put braces around muscle
11323 names. This parser skeleton is still broken, but Bison should not
11324 choke on a bad muscle 'syntax'.
11325 * src/bison.simple: Add a section directive. Put braces around muscle
11326 names.
11327
11328 * src/files.h (strsuffix, stringappend): Add declarations.
11329 (tab_extension): Add declaration.
11330 (short_base_name): Add declaration.
11331
11332 * src/files.c (strsuffix, stringappend): No longer static. These
11333 functions are used in the skeleton parser.
11334 (tab_extension): New.
11335 (compute_base_names): Use the computations done in this function
fab5b110 11336 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
11337 names.
11338 (short_base_name): No longer static.
11339
11340 * src/output.c (output_skeleton): New.
11341 (output): Disable call to output_master_parser, and give a try to
11342 a new skeleton handling system.
11343 (guards_output, actions_output): No longer static.
11344 (token_definitions_output, get_lines_number): No longer static.
11345
11346 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11347
fab5b110 11348 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
11349 parse-skel.y.
11350
11351 * src/parse-skel.y: New file.
11352 * src/scan-skel.l: New file.
11353
b5b61c61
AD
113542001-12-29 Akim Demaille <akim@epita.fr>
11355
11356 %name-prefix is broken.
11357
11358 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11359 Adjust all dependencies.
11360 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11361 %name-prefix.
11362
11363 Renaming yylval but not yylloc is not consistent. Now we do.
11364
11365 * src/bison.simple: Prefix yylloc if used.
11366 * doc/bison.texinfo (Decl Summary): Document that.
11367
8c9a50be
AD
113682001-12-29 Akim Demaille <akim@epita.fr>
11369
11370 * doc/bison.texinfo: Promote `%long-directive' over
11371 `%long_directive'.
11372 Remove all references to fixed-output-files, yacc is enough.
11373
d99361e6
AD
113742001-12-29 Akim Demaille <akim@epita.fr>
11375
11376 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
11377 user prologue. These are defaults.
11378 * tests/actions.at (Mid-rule actions): Make sure the user can
11379 define YYDEBUG and YYERROR_VERBOSE.
11380
b9cecb91
AD
113812001-12-29 Akim Demaille <akim@epita.fr>
11382
11383 * src/output.c (header_output): Don't forget to export YYLTYPE and
11384 yylloc.
11385 * tests/headers.at (export YYLTYPE): New, make sure it does.
11386 * tests/regression.at (%union and --defines, Invalid CPP headers):
11387 Move to...
11388 * tests/headers.at: here.
11389
aea13e97
AD
113902001-12-29 Akim Demaille <akim@epita.fr>
11391
11392 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
11393
931394cb
AD
113942001-12-29 Akim Demaille <akim@epita.fr>
11395
11396 * tests/actions.at (Mid-rule actions): Output on a single line
11397 instead of several.
11398
704a47c4
AD
113992001-12-29 Akim Demaille <akim@epita.fr>
11400
11401 * doc/bison.texinfo: Formatting changes.
11402
091e20bb
AD
114032001-12-29 Akim Demaille <akim@epita.fr>
11404
11405 Don't store the token defs in a muscle, just be ready to output it
11406 on command. Now possible via `symbols'. Fixes a memory leak.
11407
11408 * src/output.c (token_definitions_output): New.
11409 (output_parser, header_output): Use it.
11410 * src/reader.c (symbols_save): Remove.
11411
cce71710
AD
114122001-12-29 Akim Demaille <akim@epita.fr>
11413
11414 * src/bison.simple: Do not provide a default for YYSTYPE and
11415 YYLTYPE before the user's prologue. Otherwise it's hardly... a
11416 default.
11417
82c035a8
AD
114182001-12-29 Akim Demaille <akim@epita.fr>
11419
11420 Mid-rule actions are simply... ignored!
11421
11422 * src/reader.c (readgram): Be sure to attach mid-rule actions to
11423 the empty-rule associated to the dummy symbol, not to the host
11424 rule.
11425 * tests/actions.at (Mid-rule actions): New.
11426
8419d367
AD
114272001-12-29 Akim Demaille <akim@epita.fr>
11428
11429 Memory leak.
11430
11431 * src/reader.c (reader): Free grammar.
11432
375d5806
AD
114332001-12-29 Akim Demaille <akim@epita.fr>
11434
11435 Memory leak.
11436
11437 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
11438 since it allocates it for each state, although only one is needed.
11439 (allocate_storage): Do it here.
11440
f51cb8ff
AD
114412001-12-29 Akim Demaille <akim@epita.fr>
11442
11443 * src/options.h, src/options.c (create_long_option_table): Rename
11444 as...
11445 (long_option_table_new): this, with a clearer prototype.
11446 (percent_table): Remove, unused,
11447 * src/getargs.c (getargs): Adjust.
11448
29e88316
AD
114492001-12-29 Akim Demaille <akim@epita.fr>
11450
11451 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
11452 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
11453 as states.
11454
b9f71f19
AD
114552001-12-29 Akim Demaille <akim@epita.fr>
11456
11457 * src/lalr.c (build_relations): Rename `states' as `states1'.
11458 Sorry, I don't understand exactly what it is, no better name...
11459
1a2b5d37
AD
114602001-12-29 Akim Demaille <akim@epita.fr>
11461
11462 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
11463 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
11464 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
11465 as rules.
11466
1cca533e
AD
114672001-12-29 Akim Demaille <akim@epita.fr>
11468
11469 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
11470 ago.
11471
c03ae966
AD
114722001-12-29 Akim Demaille <akim@epita.fr>
11473
11474 * src/reader.c, src/reader.h (user_toknums): Remove.
11475 Adjust all users to use symbols[i]->user_token_number.
11476
5a670b1e
AD
114772001-12-29 Akim Demaille <akim@epita.fr>
11478
11479 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
11480 Adjust all users to use symbols[i]->prec or ->assoc.
11481
ad949da9
AD
114822001-12-29 Akim Demaille <akim@epita.fr>
11483
11484 * src/reader.c, src/reader.h (tags): Remove.
11485 Adjust all users to use symbols[i]->tag.
11486
0e78e603
AD
114872001-12-29 Akim Demaille <akim@epita.fr>
11488
11489 * src/gram.h, src/gram.c (symbols): New, similar to state_table
11490 and rule_table.
11491 * src/reader.c (packsymbols): Fill this table.
11492 Drop sprec.
11493 * src/conflicts.c (resolve_sr_conflict): Adjust.
11494 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
11495 single table.
11496 Use symbols[i]->tag instead of tags[i].
11497
213e640e
AD
114982001-12-29 Akim Demaille <akim@epita.fr>
11499
11500 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
11501 In addition, put a comment in there, to replace...
11502 * tests/regression.at (%union and C comments): Remove.
11503
e7b8bef1
AD
115042001-12-29 Akim Demaille <akim@epita.fr>
11505
11506 * tests/regression.at (Web2c Actions): Blindly move the actual
11507 output as expected output. The contents *seem* right to me, but I
11508 can't pretend reading perfectly parser tables... Nonetheless, all
11509 the other tests pass correctly, the table look OK, even though the
11510 presence of `$axiom' is to be noted: AFAICS it is useless (but
11511 harmless).
11512
b68e7744
AD
115132001-12-29 Akim Demaille <akim@epita.fr>
11514
11515 * src/reader.c (readgram): Don't add the rule 0 if there were no
11516 rules read. In other words, add it _after_ having performed
11517 grammar sanity checks.
11518 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
11519
78d5bae9
AD
115202001-12-29 Akim Demaille <akim@epita.fr>
11521
11522 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
11523 visible, and some states have now a different number.
11524
ff442794
AD
115252001-12-29 Akim Demaille <akim@epita.fr>
11526
11527 * src/reader.c (readgram): Bind the initial rule's lineno to that
11528 of the first rule.
11529 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
11530 (Solved SR Conflicts): Adjust rule 0's line number.
11531
610ab194
AD
115322001-12-29 Akim Demaille <akim@epita.fr>
11533
11534 Fix the `GAWK Grammar' failure.
11535
11536 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11537 the reductions of the first state which was mistakenly confused
11538 with the final state because precisely final_state was initialized
11539 to 0.
11540 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11541 now noticed by Bison.
11542 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11543 have a reduction on $default.
11544
29d29c8f
AD
115452001-12-29 Akim Demaille <akim@epita.fr>
11546
11547 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11548 rule line numbers.
11549 * src/closure.c (print_closure): Likewise.
11550 * src/derives.c (print_derives): Likewise.
11551 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11552 now.
11553
7c6b64d0
AD
115542001-12-29 Akim Demaille <akim@epita.fr>
11555
11556 * src/lalr.c (lookaheads_print): New.
11557 (lalr): Call it when --trace-flag.
11558 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11559 are dumped.
11560
3d4daee3
AD
115612001-12-29 Akim Demaille <akim@epita.fr>
11562
11563 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11564 when walking through ritem, even via rule->rhs.
11565 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11566 (useful_production, useless_nonterminals): Likewise.
11567 (reduce_grammar_tables): Likewise, plus update nritems.
11568 * src/nullable.c (set_nullable): Likewise.
11569 * src/lalr.c (build_relations): Likewise.
11570 * tests/sets.at (Nullable): Adjust.
11571 Fortunately, now, the $axiom is no longer nullable.
11572
9e7f6bbd
AD
115732001-12-29 Akim Demaille <akim@epita.fr>
11574
11575 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
11576 the 0-sentinel.
11577 * src/gram.c (ritem_longest_rhs): Likewise.
11578 * src/reduce.c (nonterminals_reduce): Likewise.
11579 * src/print_graph.c (print_graph): Likewise.
11580 * src/output.c (output_rule_data): Likewise.
11581 * src/nullable.c (set_nullable): Likewise.
11582
255ef638
AD
115832001-12-29 Akim Demaille <akim@epita.fr>
11584
11585 * src/output.c: Comment changes.
11586
0d8a7363
AD
115872001-12-27 Paul Eggert <eggert@twinsun.com>
11588
11589 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
11590 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
11591 Sparc, as they were causing more porting problems than the
11592 (minor) performance improvement was worth.
11593
11594 Also, catch up with 1.31's YYSTD.
11595
3db472b9
AD
115962001-12-27 Akim Demaille <akim@epita.fr>
11597
11598 * src/output.c (output_gram): Rely on nritems, not the
11599 0-sentinel. See below.
11600 Use -1 as separator, not 0.
11601 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
11602 Rely on -1 as separator in yyrhs, instead of 0.
11603 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
11604 twice `Now at end of input', therefore there are two lines less to
11605 expect.
11606
b365aa05
AD
116072001-12-27 Akim Demaille <akim@epita.fr>
11608
11609 * tests/regression.at (Unresolved SR Conflicts):
11610 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
11611 below.
11612
30171f79
AD
116132001-12-27 Akim Demaille <akim@epita.fr>
11614
11615 * src/LR0.c (new_state): Recognize the final state by the fact it
11616 is reached by eoftoken.
11617 (insert_start_shifting_state, insert_eof_shifting_state)
11618 (insert_accepting_state, augment_automaton): Remove, since now
11619 these states are automatically computed from the initial state.
11620 (generate_states): Adjust.
11621 * src/print.c: When reporting a rule number to the user, substract
11622 1, so that the axiom rule is rule 0, and the first user rule is 1.
11623 * src/reduce.c: Likewise.
11624 * src/print_graph.c (print_core): For the time being, just as for
11625 the report, depend upon --trace-flags to dump the full set of
11626 items.
11627 * src/reader.c (readgram): Once the grammar read, insert the rule
11628 0: `$axiom: START-SYMBOL $'.
11629 * tests/set.at: Adjust: rule 0 is now displayed, and since the
11630 number of the states has changed (the final state is no longer
11631 necessarily the last), catch up.
11632
75142d45
AD
116332001-12-27 Akim Demaille <akim@epita.fr>
11634
11635 Try to make the use of the eoftoken valid. Given that its value
11636 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
11637 is used instead of > 0 where appropriate, (ii), depend upon nritems
11638 instead of the 0-sentinel.
11639
11640 * src/gram.h, src/gram.c (nritems): New.
11641 Expected to be duplication of nitems, but for the time being...
11642 * src/reader.c (packgram): Assert nritems and nitems are equal.
11643 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
11644 * src/closure.c (print_closure, print_fderives): Likewise.
11645 * src/gram.c (ritem_print): Likewise.
11646 * src/print.c (print_core, print_grammar): Likewise.
11647 * src/print_graph.c: Likewise.
11648
b7c49edf
AD
116492001-12-27 Akim Demaille <akim@epita.fr>
11650
11651 * src/main.c (main): If there are complains after grammar
11652 reductions, then output the report anyway if requested, then die.
11653 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
11654 * src/reader.c (eoftoken): New.
11655 (parse_token_decl): If the token being defined has value `0', it
11656 is the eoftoken.
11657 (packsymbols): No longer hack `tags' to insert `$' by hand.
11658 Be sure to preserve the value of the eoftoken.
11659 (reader): Make sure eoftoken is defined.
11660 Initialize nsyms to 0: now eoftoken is created just like the others.
11661 * src/print.c (print_grammar): Don't special case the eof token.
11662 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
11663 lie anyway, albeit pleasant.
11664 * tests/calc.at: Exercise error messages with eoftoken.
11665 Change the grammar so that empty input is invalid.
11666 Adjust expectations.
11667 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
11668
ec2da99f
AD
116692001-12-27 Akim Demaille <akim@epita.fr>
11670
11671 * configure.in: Check the protos of strchr ans strspn.
11672 Replace strchr if needed.
11673 * src/system.h: Provide the protos of strchr, strspn and memchr if
11674 missing.
11675 * lib/strchr.c: New.
11676 * src/reader.c (symbols_save): Use strchr.
11677
8adfa272
AD
116782001-12-27 Akim Demaille <akim@epita.fr>
11679
11680 * src/print.c, src/print_graph.c (escape): New.
11681 Use it to quote the TAGS outputs.
11682 * src/print_graph.c (print_state): Now errors are in red, and
11683 reductions in green.
11684 Prefer high to wide: output the state number on a line of its own.
11685
80dac38c
AD
116862001-12-27 Akim Demaille <akim@epita.fr>
11687
11688 * src/state.h, src/state.c (reductions_new): New.
11689 * src/LR0.c (set_state_table): Let all the states have a
11690 `reductions', even if reduced to 0.
11691 (save_reductions): Adjust.
11692 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
11693 * src/print.c (print_reductions, print_actions): Adjust.
11694 * src/output.c (action_row): Adjust.
11695
2cec70b9
AD
116962001-12-27 Akim Demaille <akim@epita.fr>
11697
11698 * src/state.h, src/state.c (errs_new, errs_dup): New.
11699 * src/LR0.c (set_state_table): Let all the states have an errs,
11700 even if reduced to 0.
11701 * src/print.c (print_errs, print_reductions): Adjust.
11702 * src/output.c (output_actions, action_row): Adjust.
11703 * src/conflicts.c (resolve_sr_conflict): Adjust.
11704
13ca549a
AD
117052001-12-27 Akim Demaille <akim@epita.fr>
11706
11707 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
11708
5092aba5
AD
117092001-12-27 Akim Demaille <akim@epita.fr>
11710
11711 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
11712 * src/print.c: here.
11713 (lookaheadset, shiftset): New, used as additional storage by
11714 print_reductions.
11715 (print_results): Adjust.
11716 (print_shifts, print_gotos, print_errs): New, extracted from...
11717 (print_actions): here.
11718 * src/print_graph.c (print_actions): Remove dead code.
11719
11e2beca
AD
117202001-12-27 Akim Demaille <akim@epita.fr>
11721
11722 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
11723 `$n' and `@n'.
11724
dac3c910
AD
117252001-12-27 Akim Demaille <akim@epita.fr>
11726
11727 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
11728 (build_relations): Adjust.
11729
d0b0fefa
AD
117302001-12-27 Akim Demaille <akim@epita.fr>
11731
11732 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
11733 duplication.
11734
adc8c848
AD
117352001-12-27 Akim Demaille <akim@epita.fr>
11736
11737 * src/reader.c (packgram): Catch nitems overflows.
11738
14d293ac
AD
117392001-12-27 Akim Demaille <akim@epita.fr>
11740
11741 * src/files.c, src/files.h (guard_obstack): Remove.
11742 * src/output.c (output): Adjust.
11743 * src/reader.c (parse_braces): New, factoring...
11744 (copy_action, copy_guard): these two which are renamed as...
11745 (parse_action, parse_guard): these.
11746 As a voluntary consequence, using braces around guards is now
11747 mandatory.
11748
f499b062
AD
117492001-12-27 Akim Demaille <akim@epita.fr>
11750
11751 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
11752 * src/reader.c (symbol_list): `guard' and `guard_line' are new
11753 members.
11754 (symbol_list_new): Adjust.
11755 (copy_action): action_line is the first line, not the last.
11756 (copy_guard): Just as for actions, store the `action' only, not
11757 the switch/case/break flesh.
11758 Don't parse the user action that might follow the guard, let...
11759 (readgram): do it, i.e., now, there can be an action after a
11760 guard.
11761 In other words the guard is just explicitly optional.
11762 (packgram): Adjust.
11763 * src/output.c (guards_output): New.
11764 (output_parser): Call it when needed.
11765 (output): Also free the guard and attrs obstacks.
11766 * src/files.c, src/files.h (obstack_save): Remove.
11767 (output_files): Remove.
11768 As a result, if one needs the former `.act' file, using an
11769 appropriate skeleton which requires actions and guards is now
11770 required.
11771 * src/main.c (main): Adjust.
11772 * tests/semantic.at: New.
11773 * tests/regression.at: Use `input.y' as input file name.
11774 Avoid 8+3 problems by requiring input.c when the test needs the
11775 parser.
11776
d945f5cd
AD
117772001-12-27 Akim Demaille <akim@epita.fr>
11778
11779 * src/reader.c (symbol_list_new): Be sure to initialize all the
11780 fields.
11781
d200e455
AD
117822001-12-27 Akim Demaille <akim@epita.fr>
11783
11784 All the hacks using a final pseudo state are now useless.
11785
11786 * src/LR0.c (set_state_table): state_table holds exactly nstates.
11787 * src/lalr.c (nLA): New.
11788 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
11789 instead of lookaheadsp from the pseudo state (nstate + 1).
11790
f9507c28
AD
117912001-12-27 Akim Demaille <akim@epita.fr>
11792
11793 * src/output.c (action_row, token_actions): Use a state_t instead
11794 of a integer, and nlookaheads instead of the following state's
11795 lookaheadsp.
11796
065fbd27
AD
117972001-12-27 Akim Demaille <akim@epita.fr>
11798
11799 * src/conflicts.c (log_resolution, flush_shift)
11800 (resolve_sr_conflict, set_conflicts, solve_conflicts)
11801 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
11802 (conflicts_print, print_reductions): Use a state_t instead of an
11803 integer when referring to a state.
11804 As much as possible, depend upon nlookaheads, instead of the
11805 `lookaheadsp' member of the following state (since lookaheads of
11806 successive states are successive, the difference between state n + 1
11807 and n served as the number of lookaheads for state n).
11808 * src/lalr.c (add_lookback_edge): Likewise.
11809 * src/print.c (print_core, print_actions, print_state)
11810 (print_results): Likewise.
11811 * src/print_graph.c (print_core, print_actions, print_state)
11812 (print_graph): Likewise.
11813 * src/conflicts.h: Adjust.
11814
1b177bd7
AD
118152001-12-27 Akim Demaille <akim@epita.fr>
11816
11817 * src/bison.hairy: Formatting/comment changes.
11818 ANSIfy.
11819 Remove `register' indications.
11820 Add plenty of `static'.
11821
7742ddeb
AD
118222001-12-27 Akim Demaille <akim@epita.fr>
11823
11824 * src/output.c (prepare): Drop the muscle `ntbase' which
11825 duplicates ntokens.
11826 * src/bison.simple: Formatting/comment changes.
11827 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
11828 is an undocumented synonym.
11829
1fa14068
AD
118302001-12-22 Akim Demaille <akim@epita.fr>
11831
11832 * src/output.c (output_table_data): Change the prototype to use
11833 `int' for array ranges: some invocations do pass an int, not a
11834 short.
11835 Reported by Wayne Green.
11836
b9752825
AD
118372001-12-22 Akim Demaille <akim@epita.fr>
11838
11839 Some actions of web2c.y are improperly triggered.
11840 Reported by Mike Castle.
11841
11842 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
11843 * tests/regression.at (Web2c): Rename as...
11844 (Web2c Report): this.
11845 (Web2c Actions): New.
11846
776209d6
AD
118472001-12-22 Akim Demaille <akim@epita.fr>
11848
11849 Reductions in web2c.y are improperly reported.
11850 Reported by Mike Castle.
11851
11852 * src/conflicts.c (print_reductions): Fix.
11853 * tests/regression.at (Web2c): New.
11854
275fc3ad
AD
118552001-12-18 Akim Demaille <akim@epita.fr>
11856
11857 Some host fail on `assert (!"foo")', which expands to
11858 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
11859 Reported by Nelson Beebee.
11860
11861 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
11862 `#define it_succeeded 0' and `assert (it_succeeded)'.
11863
897668ee
MA
118642001-12-17 Marc Autret <autret_m@epita.fr>
11865
11866 * src/bison.simple: Don't hard code the skeleton line and filename.
11867 * src/output.c (output_parser): Rename 'line' as 'output_line'.
11868 New line counter 'skeleton_line' (skeleton-line muscle).
11869
ab3399e0
PE
118702001-12-17 Paul Eggert <eggert@twinsun.com>
11871
11872 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
11873 YYDEBUG must be defined to a nonzero value.
11874
11875 * src/bison.simple (yytname): Do not assume that the user defines
11876 YYDEBUG to a properly parenthesized expression.
11877
3877f72b
AD
118782001-12-17 Akim Demaille <akim@epita.fr>
11879
11880 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
11881 nlookaheads is a new member.
11882 Adjust all users.
11883 * src/lalr.h (nlookaheads): Remove this orphan declaration.
11884 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
11885 state.
776209d6 11886
331dbc1b
AD
118872001-12-17 Akim Demaille <akim@epita.fr>
11888
11889 * src/files.h, src/files.c (open_files, close_files): Remove.
11890 * src/main.c (main): Don't open/close files, nor invoke lex_free,
11891 let...
11892 * src/reader.c (reader): Do it.
776209d6 11893
be750e4c
AD
118942001-12-17 Akim Demaille <akim@epita.fr>
11895
11896 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 11897
709ae8c6
AD
118982001-12-17 Akim Demaille <akim@epita.fr>
11899
11900 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
11901 (flush_reduce): New.
11902 (resolve_sr_conflict): Adjust.
776209d6 11903
f87685c3
AD
119042001-12-17 Akim Demaille <akim@epita.fr>
11905
11906 * src/output.c (output_obstack): Be static and rename as...
11907 (format_obstack): this, to avoid any confusion with files.c's
11908 output_obstack.
11909 * src/reader.h (muscle_obstack): Move to...
11910 * src/output.h: here, since it's defined in output.c.
11911
837491d8
AD
119122001-12-17 Akim Demaille <akim@epita.fr>
11913
11914 * src/output.c (action_row, save_column, default_goto)
11915 (sort_actions, matching_state, pack_vector): Better variable
11916 locality.
11917
796d61fb
AD
119182001-12-17 Akim Demaille <akim@epita.fr>
11919
11920 * src/output.c: Various formatting changes.
776209d6 11921
64d15509
AD
119222001-12-17 Akim Demaille <akim@epita.fr>
11923
11924 * src/files.c (output_files): Free the output_obstack.
11925 * src/main.c (main): Call print and print_graph conditionally.
11926 * src/print.c (print): Work unconditionally.
11927 * src/print_graph.c (print_graph): Work unconditionally.
11928 * src/conflicts.c (log_resolution): Output only if verbose_flag.
11929
fbc8ecb7
MA
119302001-12-16 Marc Autret <autret_m@epita.fr>
11931
11932 * src/output.c (actions_output): Fix. When we use %no-lines,
11933 there is one less line per action.
11934
f0440388
MA
119352001-12-16 Marc Autret <autret_m@epita.fr>
11936
11937 * src/bison.simple: Remove a useless #line directive.
11938 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
11939 * src/output.c (get_lines_number): New.
776209d6 11940 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
11941 output muscles.
11942 Fix line numbering.
11943 (actions_output): Computes the number of lines taken by actions.
11944 (output_master_parser): Insert new skeleton which is the name of
11945 the output parser file name.
11946
a79986b8
MA
119472001-12-15 Marc Autret <autret_m@epita.fr>
11948
11949 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
11950
4ec8e00f
MA
119512001-12-15 Marc Autret <autret_m@epita.fr>
11952
11953 * src/output.c (output_gram): Keep track of the hairy one.
11954
1a4648ff
AD
119552001-12-15 Akim Demaille <akim@epita.fr>
11956
11957 Make `make distcheck' work.
11958
11959 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
11960 system.h which uses libgettext.h.
11961
9c2c67e6
AD
119622001-12-15 Akim Demaille <akim@epita.fr>
11963
11964 * src/nullable.c (set_nullable): Useless rules must be skipped,
11965 otherwise, since we range over their symbols, we might look at a
11966 nonterminal which no longer ``exists'', i.e., it is not counted in
11967 `nvars', hence we overflow our arrays.
11968
93ede233
AD
119692001-12-15 Akim Demaille <akim@epita.fr>
11970
11971 The header can also be produced directly, without any obstack!
11972 Yahoo!
11973
11974 * src/files.c, src/files.h (defines_obstack): Remove.
11975 (compute_header_macro): Global.
11976 (defines_obstack_save): Remove.
11977 * src/reader.c (parse_union_decl): No longer output to
11978 defines_obstack: its content can be found in the `stype' muscle
11979 anyway.
11980 (output_token_translations): Merge into...
11981 (symbols_output): this.
11982 Rename as...
11983 (symbols_save): this.
11984 (reader): Adjust.
11985 * src/output.c (header_output): New.
11986 (output): Call it.
11987
2666f928
AD
119882001-12-15 Akim Demaille <akim@epita.fr>
11989
11990 * src/reader.c (parse_union_decl): Instead of handling two obstack
11991 simultaneously, use one to define the `stype' muscle, and use the
11992 value of the latter to fill defines_obstack.
11993 (copy_comment): Remove.
11994 (copy_comment2): Work for a single obstack.
11995 Rename as...
11996 (copy_comment): this.
11997
428046f8
AD
119982001-12-15 Akim Demaille <akim@epita.fr>
11999
12000 * src/lex.c, src/lex.h (xgetc): No longer static.
12001 * src/reader.c (parse_union_decl): Revamp.
12002
ea52d706
AD
120032001-12-15 Akim Demaille <akim@epita.fr>
12004
12005 Still making progress in separating Bison into (i) input, (ii)
12006 process, (iii) output: now we can directly output the parser file
12007 without using table_obstack at all.
12008
12009 * src/files.c, src/files.h (table_obstack): Bye bye.
12010 (parser_file_name): New.
12011 * src/files.c (compute_output_file_names): Compute it.
12012 * src/output.c (actions_output, output_parser)
12013 (output_master_parser): To a file instead of an obstack.
12014
3f96f4dc
AD
120152001-12-15 Akim Demaille <akim@epita.fr>
12016
12017 Attach actions to rules, instead of pre-outputting them to
12018 actions_obstack.
12019
12020 * src/gram.h (rule_t): action and action_line are new members.
12021 * src/reader.c (symbol_list): Likewise.
12022 (copy_action): Save the actions within the rule.
12023 (packgram): Save them in rule_table.
12024 * src/output.c (actions_output): New.
12025 (output_parser): Use it on `%%actions'.
12026 (output_rule_data): Don't free rule_table.
12027 (output): Do it.
12028 (prepare): Don't save the `action' muscle.
12029 * src/bison.simple: s/%%action/%%actions/.
12030
51576fb3
AD
120312001-12-15 Akim Demaille <akim@epita.fr>
12032
12033 * src/reader.c (copy_action): When --yacc, don't append a `;'
12034 to the user action: let it fail if lacking.
dee049eb 12035 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 12036
2648a72d
AD
120372001-12-14 Akim Demaille <akim@epita.fr>
12038
12039 * src/lex.c (literalchar): Simply return the char you decoded, non
12040 longer mess around with obstacks and int pointers.
12041 Adjust all callers.
12042
92790e5b
AD
120432001-12-14 Akim Demaille <akim@epita.fr>
12044
12045 * src/lex.c (literalchar): Don't escape the special characters,
12046 just decode them, and keep them as char (before, eol was output as
12047 the 2 char string `\n' etc.).
12048 * src/output.c (output_rule_data): Use quotearg to output the
12049 token strings.
12050
927c1557
PE
120512001-12-13 Paul Eggert <eggert@twinsun.com>
12052
12053 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
12054 Do not infringe on the global user namespace when using C++.
12055 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
12056 All uses of `fprintf' and `stderr' changed.
12057
12058 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
12059
ed8e1f68
AD
120602001-12-13 Akim Demaille <akim@epita.fr>
12061
12062 The computation of nullable is broken: it doesn't handle empty
12063 RHS's properly.
12064
12065 * tests/torture.at (GNU AWK Grammar): New.
12066 * tests/sets.at (Nullable): New.
12067 * src/nullable.c (set_nullable): Instead of blindly looping over
12068 `ritems', loop over the rules, and then over their rhs's.
12069
12070 Work around Autotest bugs.
12071
12072 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
12073 frame, because Autotest understand lines starting with a `+' as
12074 traces from the shell. Then, they are not processed properly.
12075 Admittedly an Autotest bug, but we don't have time to wait for
12076 Autotest to catch up.
12077 * tests/regression.at (Broken Closure): Adjust to the new table
12078 frames.
12079 Move to...
12080 * tests/sets.at: here.
12081
cb581495
AD
120822001-12-13 Akim Demaille <akim@epita.fr>
12083
12084 * src/closure.c (closure): Use nrules instead of playing tricks
12085 with BITS_PER_WORD.
12086
2e729273
AD
120872001-12-13 Akim Demaille <akim@epita.fr>
12088
12089 * src/print.c (print_actions): Output the handling of `$' as the
12090 traces do: shifting the token EOF. Before EOF was treated as a
12091 nonterminal.
12092 * tests/regression.at: Adjust some tests.
12093 * src/print_graph.c (print_core): Complete the set of items via
12094 closure. The next-to-final and final states are still unsatisfying,
12095 but that's to be addressed elsewhere.
12096 No longer output the rule numbers, but do output the state number.
12097 A single loop for the shifts + gotos is enough, but picked a
12098 distinct color for each.
12099 (print_graph): Initialize and finalize closure.
12100
107f7dfb
AD
121012001-12-13 Akim Demaille <akim@epita.fr>
12102
12103 * src/reader.c (readgram): Remove dead code, an strip useless
12104 braces.
12105 (get_type): Remove, unused.
12106
9b53a24f
AD
121072001-12-12 Akim Demaille <akim@epita.fr>
12108
12109 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
12110 on that of lib/error.c.
12111
dbfb6dcd
AD
121122001-12-12 Akim Demaille <akim@epita.fr>
12113
12114 Some hosts don't like `/' in includes.
12115
12116 * src/system.h: Include libgettext.h without qualifying the path.
12117 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
12118 $(top_srcdir).
12119
c25fb648
MA
121202001-12-11 Marc Autret <autret_m@epita.fr>
12121
12122 * src/output.c (output_parser): Remove useless muscle.
12123
710ddc4f
MA
121242001-12-11 Marc Autret <autret_m@epita.fr>
12125
12126 * src/bison.simple: Remove #line just before %%epilogue. It
12127 is now handled in ...
12128 * src/reader.c (read_additionnal_code): Add the output of a
12129 #line for the epilogue.
12130
e83d80b8
MA
121312001-12-10 Marc Autret <autret_m@epita.fr>
12132
927c1557 12133 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
12134 replace precedent remove.
12135 * src/bison.simple: Remove #line before %%prologue because
12136 %%input-line is wrong at this time.
12137
971d5158
MA
121382001-12-10 Marc Autret <autret_m@epita.fr>
12139
12140 * src/reader.c (symbols_output): Clean up.
927c1557 12141 * src/output.c (output_gram, output): Clean up.
971d5158 12142
5edafffd
AD
121432001-12-10 Akim Demaille <akim@epita.fr>
12144
12145 * src/lalr.c (initialize_lookaheads): New. Extracted from...
12146 * src/LR0.c (set_state_table): here.
12147 * src/lalr.c (lalr): Call it.
12148
0279f8e9
AD
121492001-12-10 Akim Demaille <akim@epita.fr>
12150
12151 * src/state.h (shifts): Remove the `number' member: shifts are
12152 attached to state, hence no longer need to be labelled with a
12153 state number.
12154
190c4f5f
AD
121552001-12-10 Akim Demaille <akim@epita.fr>
12156
12157 Now that states have a complete set of members, the linked list of
12158 shifts is useless: just fill directly the state's shifts member.
12159
12160 * src/state.h (shifts): Remove the `next' member.
12161 * src/LR0.c (first_state, last_state): Remove.
12162 Adjust the callers.
12163 (augment_automaton): Don't look for the shifts that must be added
12164 a shift on EOF: it is those of the state we looked for! But now,
12165 since shifts are attached, it is no longer needed to looking
12166 merely by its id: its number.
12167
2a73b93d
AD
121682001-12-10 Akim Demaille <akim@epita.fr>
12169
12170 * src/LR0.c (augment_automaton): Better variable locality.
12171 Remove an impossible branch: if there is a state corresponding to
12172 the start symbol being shifted, then there is shift for the start
12173 symbol from the initial state.
12174
74392f6a
AD
121752001-12-10 Akim Demaille <akim@epita.fr>
12176
12177 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
12178 only when appropriate: when insert_start_shifting_state' is not
12179 invoked.
12180 * tests/regression.at (Rule Line Numbers): Adjust.
12181
37c82725
AD
121822001-12-10 Akim Demaille <akim@epita.fr>
12183
12184 * src/LR0.c (augment_automaton): Now that all states have shifts,
12185 merge the two cases addition shifts to the initial state.
12186
6a164e0c
AD
121872001-12-10 Akim Demaille <akim@epita.fr>
12188
12189 * src/lalr.c (set_state_table): Move to...
12190 * src/LR0.c: here.
12191 * src/lalr.c (lalr): Don't call it...
12192 * src/LR0.c (generate_states): do it.
12193 * src/LR0.h (first_state): Remove, only the table is used.
12194
7215de24
AD
121952001-12-10 Akim Demaille <akim@epita.fr>
12196
12197 * src/LR0.h (first_shift, first_reduction): Remove.
12198 * src/lalr.c: Don't use first_shift: find shifts through the
12199 states.
12200
80e25d4d
AD
122012001-12-10 Akim Demaille <akim@epita.fr>
12202
12203 * src/LR0.c: Attach shifts to states as soon as they are
12204 computed.
12205 * src/lalr.c (set_state_table): Instead of assigning shifts to
12206 state, just assert that the mapping was properly done.
12207
0ab3728b
AD
122082001-12-10 Akim Demaille <akim@epita.fr>
12209
12210 * src/LR0.c (insert_start_shift): Rename as...
12211 (insert_start_shifting_state): this.
12212 (insert_eof_shifting_state, insert_accepting_state): New.
12213 (augment_automaton): Adjust.
12214 Better locality of the variables.
12215 When looking if the start_symbol is shifted from the initial
12216 state, using `while (... symbol != start_symbol ...)' sounds
12217 better than `while (... symbol < start_symbol ...)': If fail
12218 to see how the order between symbols could be relevant!
12219
78af9bbc
AD
122202001-12-10 Akim Demaille <akim@epita.fr>
12221
12222 * src/getargs.h: Don't declare `spec_name_prefix' and
12223 `spec_file_prefix', declared by src/files.h.
12224 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
12225 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
12226 * src/output.c (prepare): Adjust.
12227 * src/reader.c (symbols_output): Likewise.
12228 * src/vmsgetargs.c: Vaguely adjust, but who cares?
12229
bdef2a41
AD
122302001-12-10 Akim Demaille <akim@epita.fr>
12231
12232 * src/muscle_tab.c (muscle_init): NULL is a better default than
12233 `"0"'.
12234
3735969c
AD
122352001-12-10 Akim Demaille <akim@epita.fr>
12236
12237 * src/reader.c (reader): Calling symbols_output once is enough.
12238
49701457
AD
122392001-12-10 Akim Demaille <akim@epita.fr>
12240
12241 Now that states have a complete set of members, the linked list of
12242 reductions is useless: just fill directly the state's reductions
12243 member.
12244
12245 * src/state.h (struct reductions): Remove member `number' and
12246 `next'.
12247 * src/LR0.c (first_reduction, last_reduction): Remove.
12248 (save_reductions): Don't link the new reductions, store them in
12249 this_state.
12250 * src/lalr.c (set_state_table): No need to attach reductions to
12251 states, it's already done.
12252 * src/output.c (output_actions): No longer free the shifts, then
12253 the reductions, then the states: free all the states and their
12254 members.
12255
0edad749
AD
122562001-12-10 Akim Demaille <akim@epita.fr>
12257
12258 * src/options.c (OPTN, DRTV, BOTH): New.
12259 (option_table): Use them.
12260
0edad749
AD
12261 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
12262 the job of system.h.
12263 * src/options.c: Don't include stdio.h and xalloc.h for the same
12264 reasons.
12265
5449dd0f
AD
122662001-12-10 Akim Demaille <akim@epita.fr>
12267
12268 * src/output.c (output, prepare): Make sure the values of the
12269 muscles `action' and `prologue' are 0-terminated.
12270
a870c567
AD
122712001-12-10 Akim Demaille <akim@epita.fr>
12272
12273 Clean up GCC warnings.
12274
12275 * src/reader.c (copy_action): `buf' is not used.
12276 (parse_skel_decl): Be static.
12277 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
12278 * src/options.h (create_long_option_table): Have a real prototype.
12279 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
12280 (hash_delete_at): Return const void *.
12281 Adjust casts to preserve the const.
12282
80df8768
AD
122832001-12-10 Akim Demaille <akim@epita.fr>
12284
12285 * configure.in: Require 2.52g.
12286 M4 is not needed, but AUTOM4TE is.
12287 * m4/m4.m4: Remove.
12288 * tests/Makefile.am: Adjust.
12289
f693ad14
AD
122902001-12-10 Akim Demaille <akim@epita.fr>
12291
12292 One structure for states is enough, even though theoretically
12293 there are LR(0) states and LALR(1) states.
12294
12295 * src/lalr.h (state_t): Remove.
12296 (state_table): Be state_t **, not state_t *.
12297 * src/state.h (core, CORE_ALLOC): Rename as...
12298 (state_t, STATE_ALLOC): this.
12299 Add the LALR(1) members: shifts, reductions, errs.
12300 * src/LR0.c (state_table): Rename as...
12301 (state_hash): this, to avoid name clashes with the global
12302 `state_table'.
12303 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12304 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12305
74ffbcb6
AD
123062001-12-10 Akim Demaille <akim@epita.fr>
12307
12308 Bison dumps core on bash.y.
12309 Reported by Pascal Bart.
12310
12311 * src/warshall.c (bitmatrix_print): New.
12312 (TC): Use it.
ba0fe3c7 12313 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
12314 j must be the outer loop.
12315 * tests/regression.at (Broken Closure): New.
12316
07708e19
AD
123172001-12-05 Akim Demaille <akim@epita.fr>
12318
12319 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12320 its argument.
ba1ecc07 12321 Reported by Peter Hamorsky.
07708e19 12322
92b16366
AD
123232001-12-05 Akim Demaille <akim@epita.fr>
12324
12325 * src/conflicts.c (err_table): Remove.
12326 (resolve_sr_conflict): Adjust.
12327 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12328 Rename as...
12329 (state_t.reductions, state_t.shifts): this.
12330
076ab033
AD
123312001-12-05 Akim Demaille <akim@epita.fr>
12332
12333 * src/reduce.c (reduce_grammar_tables): No longer disable the
12334 removal of useless rules via CPP but via `if (0)', so that the
12335 compiler still check the code is valid.
12336 For instance, it should have noticed `rline' no longer exists: use
12337 the `line' member of rule_t.
12338 * src/gram.c (dummy, rline): Remove, unused.
12339
3843c413
AD
123402001-12-05 Akim Demaille <akim@epita.fr>
12341
12342 * src/output.c (pack_vector): Use assert, not berror.
12343 * src/main.c (berror): Remove, unused.
12344
43168960
AD
123452001-12-05 Akim Demaille <akim@epita.fr>
12346
12347 New experimental feature: if --verbose --trace output all the
12348 items of a state, not only its kernel.
12349
12350 * src/print.c (print_core): If `trace_flag', then invoke closure
12351 before outputting the items of the state (print_core is no longer
12352 a correct name them).
12353 (print_results): Invoke new_closure/free_closure if needed.
12354
b2872512
AD
123552001-12-05 Akim Demaille <akim@epita.fr>
12356
12357 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12358 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12359 (nitemset): for consistency with the rest of the project.
12360
23cbcc6c
AD
123612001-12-05 Akim Demaille <akim@epita.fr>
12362
12363 * src/closure.c (print_closure): Improve.
12364 (closure): Use it for printing input and output.
12365
03ec521c
AD
123662001-12-05 Akim Demaille <akim@epita.fr>
12367
12368 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
12369 indexed by nonterminals.
12370
3a7456dd
AD
123712001-12-05 Akim Demaille <akim@epita.fr>
12372
12373 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
12374 what it was!).
12375 * src/warshall.h: Remove accidental duplication of the content.
12376
1cbcf2e7
AD
123772001-12-05 Akim Demaille <akim@epita.fr>
12378
12379 * src/closure.c (set_fderives): De-obfuscate.
12380
84182270
AD
123812001-12-05 Akim Demaille <akim@epita.fr>
12382
12383 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
12384
3f6f053c
AD
123852001-12-05 Akim Demaille <akim@epita.fr>
12386
12387 * src/closure.c (set_firsts): De-obfuscate.
12388
7a5350ba
AD
123892001-12-05 Akim Demaille <akim@epita.fr>
12390
12391 * src/output.c (action_row): De-obfuscate
12392 using the good o' techniques: arrays not pointers, variable
12393 locality, BITISSET, RESETBIT etc.
12394
d954473d
AD
123952001-12-05 Akim Demaille <akim@epita.fr>
12396
12397 Pessimize the code to simplify it: from now on, all the states
12398 have a valid SHIFTS, which NSHIFTS is possibly 0.
12399
12400 * src/LR0.c (shifts_new): Be global and move to..
12401 * src/state.c, src/state.h: here.
12402 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
12403 * src/print_graph: Adjust.
12404
9839bbe5
AD
124052001-12-05 Akim Demaille <akim@epita.fr>
12406
12407 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
12408 * src/conflicts.c: Use it.
12409 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
12410 incorrectly ``simplified''.
12411
9f136c07
AD
124122001-12-05 Akim Demaille <akim@epita.fr>
12413
12414 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
12415 using the good o' techniques: arrays not pointers, variable
12416 locality, BITISSET, RESETBIT etc.
12417
b608206e
AD
124182001-12-05 Akim Demaille <akim@epita.fr>
12419
12420 * src/state.h (SHIFT_SYMBOL): New.
12421 * src/conflicts.c: Use it to deobfuscate.
12422
52afa962
AD
124232001-12-05 Akim Demaille <akim@epita.fr>
12424
12425 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
12426 (print_reductions): De-obfuscate using the good o' techniques:
12427 arrays not pointers, variable locality, BITISSET.
12428
e74dc321
AD
124292001-12-05 Akim Demaille <akim@epita.fr>
12430
12431 * src/conflicts.c (print_reductions): Arrays, not pointers.
12432 Use BITISSET.
12433
768fca83
AD
124342001-12-05 Akim Demaille <akim@epita.fr>
12435
12436 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12437
a17e599f
AD
124382001-12-05 Akim Demaille <akim@epita.fr>
12439
12440 * src/conflicts.c (print_reductions): Improve variable locality.
12441
a04bc341
AD
124422001-12-05 Akim Demaille <akim@epita.fr>
12443
12444 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12445
c8ea038e
AD
124462001-12-05 Akim Demaille <akim@epita.fr>
12447
12448 * src/conflicts.c (print_reductions): Improve variable locality.
12449
aa2aab3c
AD
124502001-12-05 Akim Demaille <akim@epita.fr>
12451
12452 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
12453 * src/lalr.c: Use them.
12454
b178c8cc
AD
124552001-12-05 Akim Demaille <akim@epita.fr>
12456
12457 * src/LR0.c (augment_automaton): Formatting changes.
12458 Better variable locality.
12459
f67d13aa
AD
124602001-12-05 Akim Demaille <akim@epita.fr>
12461
12462 * src/lalr.c (matrix_print): New.
12463 (transpose): Use it.
12464 Use arrays instead of pointers.
12465
c2713865
AD
124662001-12-05 Akim Demaille <akim@epita.fr>
12467
12468 * src/lalr.c (maxrhs): Move to...
12469 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
12470 * src/lalr.c (build_relations): Adjust.
12471
9887c18a
AD
124722001-12-05 Akim Demaille <akim@epita.fr>
12473
12474 * src/lalr.c (transpose): Free the memory allocated to the
12475 argument, as it is replaced by the results by the unique caller.
12476 (build_relations): Merely invoke transpose: it handles the memory
12477 deallocation.
12478 Improve variable locality.
12479 Avoid variables used as mere abbreviations.
12480 (compute_lookaheads): Use arrays instead of pointers.
12481
4d4f699c
AD
124822001-12-05 Akim Demaille <akim@epita.fr>
12483
12484 * src/lalr.c (initialize_F): Improve variable locality.
12485 Avoid variables used as mere abbreviations.
12486
80a69750
AD
124872001-12-05 Akim Demaille <akim@epita.fr>
12488
12489 * src/derives.c (print_derives): Display the ruleno.
12490 * src/lalr.c (initialize_F, transpose): Better variable locality
12491 to improve readability.
12492 Avoid variables used as mere abbreviations.
12493
fe961097
AD
124942001-12-05 Akim Demaille <akim@epita.fr>
12495
12496 * src/lalr.c (traverse): Use arrays instead of pointers.
12497
e3e4e814
AD
124982001-12-05 Akim Demaille <akim@epita.fr>
12499
12500 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
12501 the handling of squeue.
12502 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12503
630e182b
AD
125042001-12-05 Akim Demaille <akim@epita.fr>
12505
12506 Because useless nonterminals are now kept alive (instead of being
12507 `destroyed'), we now sometimes examine them, and store information
12508 related to them. Hence we need to know their number, and adjust
12509 memory allocations.
12510
12511 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
12512 static.
12513 * src/LR0.c (allocate_itemsets): The memory allocated to
12514 `symbol_count' was used for two different purpose: once to count
12515 the number of occurrences of each symbol, and later reassigned to
12516 `shift_symbol', containing the symbol that can be shifted from a
12517 given state.
12518 Deobfuscate, i.e., allocate, use and free `symbol_count' here
12519 only, and...
12520 (new_itemsets): Allocate `shift_symbol' here.
12521 (allocate_itemsets): symbol_count includes useless nonterminals.
12522 Make room for them.
12523 (free_storage): Use `free', not `XFREE', for pointers that cannot
12524 be null.
12525
81b51460
AD
125262001-12-05 Akim Demaille <akim@epita.fr>
12527
12528 * src/nullable.c (set_nullable): Deobfuscate the handling of
12529 ritem.
12530 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12531
3067fbef
AD
125322001-12-05 Akim Demaille <akim@epita.fr>
12533
12534 * src/gram.c, src/gram.h (ritem_print): New.
12535 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12536 (This useless function was defined only to work around VMS linkers
12537 that can't handle compilation units with variables only).
12538 * src/reduce.c (dump_grammar): Use it to trace the construction of
12539 ritem.
12540
c2bea5f9
PE
125412001-12-04 Paul Eggert <eggert@twinsun.com>
12542
7d27c823
PE
12543 * src/bison.simple (union yyalloc): Change member names
12544 to be the same as the stack names.
12545 (yyparse): yyptr is now union yyalloc *, not char *.
12546 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12547 and may generate better code on some machines.
c2bea5f9
PE
12548 (yystpcpy): Use prototype if __STDC__ is defined, not just
12549 if __cplusplus is defined.
35687a9d 12550
2c8a9dfa
AD
125512001-11-30 Akim Demaille <akim@epita.fr>
12552
12553 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12554 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12555 Gettext doesn't compile cleanly, and dies with -Werror.
12556 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12557 Include WARNING_CFLAGS here.
12558 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12559 before being defined.
12560
f4e421e6
AD
125612001-11-27 Paul Eggert <eggert@twinsun.com>
12562
12563 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12564 First arg is int, not unsigned.
12565 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12566 (SIZE_MAX, UINT_MAX): New macros.
12567 (quotearg_n_options): Abort if N is negative.
12568 Avoid overflow check on hosts where size_t is 64 bits and int
12569 is 32 bits, as overflow is impossible there.
12570 Fix off-by-one typo that caused unnecessary reallocation.
12571
7093d0f5
AD
125722001-11-29 Paul Eggert <eggert@twinsun.com>
12573
12574 Name space cleanup in generated parser.
12575
12576 * doc/bison.texinfo (Bison Parser): Discuss system headers
12577 and their effect on the user name space.
12578
12579 * src/bison.simple:
12580 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
12581 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
12582 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
12583
12584 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
12585 on user names when possible.
12586
12587 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
12588 Simplify test for whather <alloca.h> exists.
12589
12590 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
12591
12592 (<stdio.h>): Include if YYDEBUG.
12593
12594 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
12595 ! defined (yyoverflow) && ! defined (yymemcpy).
12596
12597 (yymemcpy, yyparse): Rename local variables as needed so that
12598 they all begin with 'yy'.
12599
12600 (yystrlen, yystpcpy): New functions.
12601
12602 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
12603 All uses changed.
12604
12605 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
12606 instead of relying on string.h functions. Use YYSTACK_ALLOC
12607 and YYSTACK_FREE instead of malloc and free.
12608
fd51e5ff
AD
126092001-11-30 Akim Demaille <akim@epita.fr>
12610
12611 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
12612 before their first uses.
12613 (YYBISON, YYPURE): Move to the top of the output.
12614
7d13ff5f
AD
126152001-11-30 Akim Demaille <akim@epita.fr>
12616
12617 * tests/reduce.at (Useless Nonterminals): Fix.
12618
892a3995
AD
126192001-11-30 Akim Demaille <akim@epita.fr>
12620
12621 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
12622 if body instead of `;' to pacify GCC's warnings.
12623
68f1e3ed
AD
126242001-11-30 Akim Demaille <akim@epita.fr>
12625
12626 Instead of mapping the LHS of unused rules to -1, keep the LHS
12627 valid, but flag the rules as invalid.
12628
12629 * src/gram.h (rule_t): `useful' is a new member.
12630 * src/print.c (print_grammar): Adjust.
12631 * src/derives.c (set_derives): Likewise.
12632 * src/reader.c (packgram, reduce_output): Likewise.
12633 * src/reduce.c (reduce_grammar_tables): Likewise.
12634 * tests/reduce.at (Underivable Rules, Useless Rules): New.
12635
d2d1b42b
AD
126362001-11-30 Akim Demaille <akim@epita.fr>
12637
12638 * src/reduce.c (reduce_output): Formatting changes.
12639 * src/print.c (print_results, print_grammar): Likewise.
12640 * tests/regression.at (Rule Line Numbers)
12641 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
12642
760b53a8
AD
126432001-11-30 Akim Demaille <akim@epita.fr>
12644
12645 * src/reduce.c (nonterminals_reduce): Instead of throwing away
12646 useless nonterminals, move them at the end of the symbol arrays.
12647 (reduce_output): Adjust.
12648 * tests/reduce.at (Useless Nonterminals): Adjust.
12649
00238958
AD
126502001-11-30 Akim Demaille <akim@epita.fr>
12651
12652 * src/reduce.c: Various comment/formatting changes.
12653 (nonterminals_reduce): New, extracted from...
12654 (reduce_grammar_tables): here.
12655 (reduce_grammar): Call nonterminals_reduce.
12656
396452de
PE
126572001-11-29 Paul Eggert <eggert@twinsun.com>
12658
12659 * src/bison.simple (YYSTACK_REALLOC): Remove.
12660 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
12661 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
12662 New macros.
12663 (union yyalloc): New type.
12664 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
12665 an arbitrary restriction on hosts where size_t is wider than int.
12666
12667 (yyparse): Don't dump core if alloca or malloc fails; instead, report
12668 a parser stack overflow. Allocate just one block of memory for all
12669 three stacks, instead of allocating three blocks; this typically is
12670 faster and reduces fragmentation.
12671
12672 Do not limit the number of items in the stack to a value that fits
12673 in 'int', as this is an arbitrary limit on hosts with 64-bit
12674 size_t and 32-bit int.
12675
147e184c
MA
126762001-11-29 Marc Autret <autret_m@epita.fr>
12677
12678 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
12679 of defining YYERROR_VERBOSE.
12680 [AT_DATA]: $4 is now out of C declarations in the prologue.
12681
426cf563
MA
126822001-11-28 Marc Autret <autret_m@epita.fr>
12683
12684 * src/reader.c (parse_dquoted_param): New.
12685 (parse_skel_decl): Use it.
12686 * src/lex.h: Add its prototype.
12687 * src/lex.c (literalchar): Become not static.
12688
c7925b99
MA
126892001-11-28 Marc Autret <autret_m@epita.fr>
12690
12691 * src/output.h: And put its extern declaration here.
12692 * src/output.c (error_verbose): Define here.
12693 (prepare): Echo name modification.
12694 * src/getargs.h: Clean its extern declaration.
12695 * src/getargs.c (error_verbose_flag): Remove.
12696 (getargs): Remove case 'e'.
12697 * src/options.c (option_table): 'error-verbose' is now seen as simple
12698 percent option.
12699 Include output.h.
12700
12701 * src/reader.c (read_declarations): Remove case tok_include.
12702 (parse_include_decl): Remove.
12703 * src/lex.h (token_t): Remove tok_include.
12704 * src/options.c (option_table): 'include' is now a simple command line
12705 option.
12706
5b5d1929
MA
127072001-11-28 Marc Autret <autret_m@epita.fr>
12708
12709 * src/bison.simple: Adjust muscle names.
12710 * src/muscle_tab.c (muscle_init): Also rename the muscles.
12711 * src/output.c (prepare): s/_/-/ for the muscles names.
12712 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
12713
8850be4b
MA
127142001-11-28 Marc Autret <autret_m@epita.fr>
12715
12716 * src/bison.simple: Fix debug.
12717 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
12718
4a38e613
AD
127192001-11-28 Akim Demaille <akim@epita.fr>
12720
12721 * src/LR0.c (shifts_new): New.
12722 (save_shifts, insert_start_shift, augment_automaton): Use it.
12723
4b35e1c1
AD
127242001-11-28 Akim Demaille <akim@epita.fr>
12725
12726 * src/closure.c (closure): `b' and `ruleno' denote the same value:
12727 keep ruleno only.
12728
d2b04478
AD
127292001-11-28 Akim Demaille <akim@epita.fr>
12730
12731 * src/closure.c (closure): Instead of looping over word in array
12732 then bits in words, loop over bits in array.
12733
2c4c30aa
AD
127342001-11-28 Akim Demaille <akim@epita.fr>
12735
12736 * src/closure.c (closure): No longer optimize the special case
12737 where all the bits of `ruleset[r]' are set to 0, to make the code
12738 clearer.
12739
576890b7
AD
127402001-11-28 Akim Demaille <akim@epita.fr>
12741
12742 * src/closure.c (closure): `r' and `c' are new variables, used to
12743 de-obfuscate accesses to RULESET and CORE.
12744
cb487d7d
AD
127452001-11-28 Akim Demaille <akim@epita.fr>
12746
12747 * src/reduce.c (reduce_print): Use ngettext.
12748 (dump_grammar): Improve the trace accuracy.
12749
6013d43f
AD
127502001-11-28 Akim Demaille <akim@epita.fr>
12751
12752 * src/reduce.c (dump_grammar): Don't translate trace messages.
12753
cb4956ee
AD
127542001-11-28 Akim Demaille <akim@epita.fr>
12755
12756 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
12757 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
12758 as all tags are free'ed afterwards.
12759 From Enrico Scholz.
12760
648185ab
PE
127612001-11-27 Paul Eggert <eggert@twinsun.com>
12762
12763 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
12764 use alloca when we didn't want to, and vice versa.
12765
68254a03
MA
127662001-11-27 Marc Autret <autret_m@epita.fr>
12767
9113b58f
AD
12768 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
12769 initialization.
68254a03
MA
12770 * src/output.c (prepare): Remove its update.
12771
04d843a2
MA
127722001-11-27 Marc Autret <autret_m@epita.fr>
12773
12774 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
12775 Use %error-verbose.
12776
d2079671 127772001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
12778
12779 * src/bison.simple: Remove YYERROR_VERBOSE using.
12780 Use %%error_verbose.
12781 (yyparse): Likewise.
12782 * src/output.c (prepare): Give its final value.
12783 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
12784 * src/getargs.h: Add its extern declaration.
12785 * src/getargs.c (error_verbose_flag): New int.
12786 (getargs): Update to catch new case.
12787 * src/options.c (option_table): 'error-verbose' is a new option.
12788 (shortopts): Update.
12789
e0327bc8
AD
127902001-11-27 Akim Demaille <akim@epita.fr>
12791
12792 * src/system.h: Use intl/libgettext.h.
12793 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
12794
000f1a3c
AD
127952001-11-27 Akim Demaille <akim@epita.fr>
12796
12797 * tests/torture.at (Exploding the Stack Size with Malloc):
12798 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
12799
26cfe0be
AD
128002001-11-27 Akim Demaille <akim@epita.fr>
12801
12802 * src/files.c: Include error.h.
12803 Reported by Hans Aberg.
12804
f6bd5427
MA
128052001-11-26 Marc Autret <autret_m@epita.fr>
12806
d2079671 12807 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
12808 (read_declarations): Add case tok_include.
12809 * src/getargs.h (include): Add its extern definition.
12810 * src/getargs.c (include): New const char *.
12811 (getargs): Add case '-I'.
12812 * src/options.c (option_table): Add include as command line and
12813 percent option.
12814 * src/lex.h (token_t): Add tok_include.
12815
2ca209c1
AD
128162001-11-26 Akim Demaille <akim@epita.fr>
12817
12818 * src/reader.c (readgram): Make sure rules for mid-rule actions
12819 have a lineno equal to that of their host rule.
12820 Reported by Hans Aberg.
12821 * tests/regression.at (Rule Line Numbers): New.
12822
0e41b407
AD
128232001-11-26 Akim Demaille <akim@epita.fr>
12824
12825 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
12826 size_ts.
12827
128282001-11-26 Akim Demaille <akim@epita.fr>
12829
12830 * src/complain.c, src/complain.h (error): Remove, provided by
12831 lib/error.[ch].
12832
e0c40012
AD
128332001-11-26 Akim Demaille <akim@epita.fr>
12834
12835 * src/reader.c (read_declarations): Don't abort on tok_illegal,
12836 issue an error message.
12837 * tests/regression.at (Invalid %directive): New.
12838 Reported by Hans Aberg.
12839
5e147124
AD
128402001-11-26 Akim Demaille <akim@epita.fr>
12841
12842 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
12843 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12844
a034c8b8
AD
128452001-11-26 Akim Demaille <akim@epita.fr>
12846
12847 * src/conflicts.c (conflicts_print): Don't complain at all when
12848 there are no reduce/reduce conflicts, and as many shift/reduce
12849 conflicts as expected.
12850 * tests/regression.at (%expect right): Adjust.
12851
c64a20f3
AD
128522001-11-23 Akim Demaille <akim@epita.fr>
12853
12854 * lib/alloca.c: Update, from fileutils.
12855
5b0d29bb
AD
128562001-11-23 Akim Demaille <akim@epita.fr>
12857
12858 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
12859
722c4bfe
AD
128602001-11-23 Akim Demaille <akim@epita.fr>
12861
12862 * src/system.h: Include alloca.h.
12863 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
12864
6255b435
AD
128652001-11-23 Akim Demaille <akim@epita.fr>
12866
12867 * src/print_graph.c (print_actions): Remove `rule', unused.
12868 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
12869 pacify GCC's signed < unsigned warnings.
12870 * src/closure.c (itemsetsize): Likewise.
12871 * src/reader.c (symbol_list_new): Static.
12872
b29b2ed5
AD
128732001-11-23 Akim Demaille <akim@epita.fr>
12874
12875 Attaching lineno to buckets is stupid, since only one copy of each
12876 symbol is kept, only the line of the first occurrence is kept too.
12877
12878 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
12879 * src/reader.c (rline_allocated): Remove, unused.
12880 (symbol_list): Have a `line' member.
12881 (symbol_list_new): New.
12882 (readgram): Use it.
12883 * src/print.c (print_grammar): Output the rule line numbers.
12884 * tests/regression.at (Solved SR Conflicts)
12885 (Unresolved SR Conflicts): Adjust.
12886 Reported by Hans Aberg.
12887
a81b1d4a
MA
128882001-11-22 Marc Autret <autret_m@epita.fr>
12889
12890 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
12891
c1ecb3c1
MA
128922001-11-22 Marc Autret <autret_m@epita.fr>
12893
12894 * src/muscle_tab.c (muscle_init): Remove initialization of
12895 skeleton muscle.
12896 * src/output.c (output_master_parser): Do it here.
12897
fbe01355
AD
128982001-11-20 Akim Demaille <akim@epita.fr>
12899
12900 * po/sv.po: New.
12901 * configure.in (ALL_LINGUAS): Adjust.
12902 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
12903 longer contains strings to translate.
12904
81e895c0
AD
129052001-11-19 Akim Demaille <akim@epita.fr>
12906
12907 * src/conflicts.c (conflicts_print): Add a missing \n.
12908
6bb1878b
AD
129092001-11-19 Akim Demaille <akim@epita.fr>
12910
12911 * src/nullable.c (nullable_print): New.
12912 (set_nullable): Call it when tracing.
12913 Better locality of variables.
12914
d9ec2d07
AD
129152001-11-19 Akim Demaille <akim@epita.fr>
12916
12917 * src/print.c (print_actions): Better locality of variables.
12918
720e5c1b
AD
129192001-11-19 Akim Demaille <akim@epita.fr>
12920
12921 * src/derives.c (print_derives): Fix and enrich.
12922 * src/closure.c (print_fderives): Likewise.
12923
fb908786
AD
129242001-11-19 Akim Demaille <akim@epita.fr>
12925
12926 * src/closure.c (itemsetend): Remove, replaced with...
12927 (itemsetsize): new.
12928
125ecb56
AD
129292001-11-19 Akim Demaille <akim@epita.fr>
12930
12931 * src/LR0.c (kernel_end): Remove, replaced with...
12932 (kernel_size): new.
12933
d8cf039f
AD
129342001-11-19 Akim Demaille <akim@epita.fr>
12935
12936 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
12937 to clarify.
12938
7bec0760
AD
129392001-11-19 Akim Demaille <akim@epita.fr>
12940
12941 * src/closure.c (closure): Use arrays instead of pointers to clarify.
12942
c87d4863
AD
129432001-11-19 Akim Demaille <akim@epita.fr>
12944
12945 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
12946 trace messages.
12947 * src/LR0.c: Likewise.
12948 (allocate_itemsets): Use arrays instead of pointers to clarify.
12949
9bfe901c
AD
129502001-11-19 Akim Demaille <akim@epita.fr>
12951
12952 * src/getargs.c (statistics_flag): Replace with...
12953 (trace_flag): New.
12954 (longopts): Accept --trace instead of --statistics.
12955 * src/getargs.h, src/options.c: Adjust.
12956 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
12957 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
12958
97db7bd4
AD
129592001-11-19 Akim Demaille <akim@epita.fr>
12960
cc72668c 12961 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
12962 pointers to clarify the code.
12963 (save_reductions, save_shifts): Factor common parts of alternatives.
12964
2c5f66ed
AD
129652001-11-19 Akim Demaille <akim@epita.fr>
12966
12967 * src/LR0.c (new_state, get_state): Complete TRACE code.
12968 * src/closure.c: Include `reader.h' to get `tags', needed by the
12969 trace code.
12970 Rename the conditional DEBUG as TRACE.
12971 Output consistently TRACEs to stderr, not stdout.
12972 * src/derives.c: Likewise.
12973 * src/reduce.c: (inaccessable_symbols): Using if is better style
12974 than goto.
12975 Use `#if TRACE' instead of `#if 0' for tracing code.
12976
300f275f
AD
129772001-11-19 Akim Demaille <akim@epita.fr>
12978
12979 * src/system.h (LIST_FREE, shortcpy): New.
12980 * src/LR0.c: Use them.
12981 * src/output.c (free_itemsets, free_reductions, free_shifts):
12982 Remove, replaced by LIST_FREE.
12983
f59c437a
AD
129842001-11-19 Akim Demaille <akim@epita.fr>
12985
12986 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
12987 (REDUCTIONS_ALLOC): New.
12988 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
12989 allocation.
12990
6986fd9e
AD
129912001-11-19 Akim Demaille <akim@epita.fr>
12992
12993 * src/LR0.c (new_state): Complete trace code.
12994 * src/nullable.c (set_nullable): Don't translate traces.
12995
4bc30f78
AD
129962001-11-19 Akim Demaille <akim@epita.fr>
12997
12998 * src/print_graph.c (print_core): Better locality of variables.
12999 * src/print.c (print_core): Likewise.
13000
08a946e0
AD
130012001-11-19 Akim Demaille <akim@epita.fr>
13002
13003 * src/vcg.c: You do the output, so you are responsible of the
13004 handling of VCG syntax, in particular: use quotearg.
13005 * src/print_graph.c: Don't.
13006 (print_actions): Don't output the actions as part of the nodes,
13007 since that's the job of the edges.
13008 (print_state): Don't output by hand: fill the node description,
9bfe901c 13009 and ask for its output.
08a946e0 13010
f0473484
AD
130112001-11-19 Akim Demaille <akim@epita.fr>
13012
cc72668c
AD
13013 * src/bison.simple (yyparse): When verbosely reporting an error,
13014 no longer put additional quotes around token names.
f0473484
AD
13015 * tests/calc.at: Adjust.
13016
e41dc700
AD
130172001-11-19 Akim Demaille <akim@epita.fr>
13018
13019 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
13020 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
13021 * src/output.c: Adjust.
13022
652a871c
AD
130232001-11-19 Akim Demaille <akim@epita.fr>
13024
13025 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
13026 (rule_t): this.
13027 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
13028
b2ed6e58
AD
130292001-11-19 Akim Demaille <akim@epita.fr>
13030
13031 * src/gram.h (rule_t): New.
13032 (rule_table): New.
13033 (rrhs, rlhs): Remove, part of state_t.
13034 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
13035 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13036 * src/reader.c, src/reduce.c: Adjust.
13037
edad7067
AD
130382001-11-19 Akim Demaille <akim@epita.fr>
13039
13040 * src/reader.c (symbols_output): New, extracted from...
13041 (packsymbols): Here.
13042 (reader): Call it.
13043
3feec034
AD
130442001-11-19 Akim Demaille <akim@epita.fr>
13045
13046 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
13047 (maxrhs): this new function.
13048
ddcd5fdf
AD
130492001-11-19 Akim Demaille <akim@epita.fr>
13050
cc72668c 13051 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
13052 Adjust.
13053
bb527fc2
AD
130542001-11-19 Akim Demaille <akim@epita.fr>
13055
cc72668c 13056 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
13057 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13058 * src/lalr.c: Adjust.
13059
a845a697
AD
130602001-11-19 Akim Demaille <akim@epita.fr>
13061
13062 * src/lalr.c (initialize_LA): Only initialize LA. Let...
13063 (set_state_table): handle the `lookaheads' members.
13064
f004bf6a
AD
130652001-11-19 Akim Demaille <akim@epita.fr>
13066
cc72668c
AD
13067 * src/lalr.h (lookaheads): Removed array, whose contents is now
13068 a member of...
f004bf6a
AD
13069 (state_t): this structure.
13070 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13071 Adjust.
13072
de326cc0
AD
130732001-11-19 Akim Demaille <akim@epita.fr>
13074
cc72668c
AD
13075 * src/lalr.h (consistent): Removed array, whose contents is now
13076 a member of...
de326cc0
AD
13077 (state_t): this structure.
13078 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13079 Adjust.
13080
90b4416b
AD
130812001-11-19 Akim Demaille <akim@epita.fr>
13082
cc72668c
AD
13083 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
13084 contents are now members of...
90b4416b
AD
13085 (state_t): this structure.
13086 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13087 Adjust.
13088
9703cc49
AD
130892001-11-19 Akim Demaille <akim@epita.fr>
13090
13091 * src/lalr.h (state_t): New.
13092 (state_table): Be a state_t * instead of a core **.
13093 (accessing_symbol): Remove, part of state_t.
13094 * src/lalr.c: Adjust.
13095 (set_accessing_symbol): Merge into...
13096 (set_state_table): this.
13097 * src/print_graph.c, src/conflicts.c: Adjust.
13098
d803322e
AD
130992001-11-14 Akim Demaille <akim@epita.fr>
13100
13101 * tests/calc.at, tests/output.at, tests/regression.at,
13102 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
13103 now the tests are run in private dirs, therefore AC_CLEANUP and
13104 family can be simplified to 0-ary.
13105 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
13106 use abs. path to find config.h.
13107 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
13108 stderr, there can be way too much random noise.
13109 Instead pass -Werror to GCC and rely on the exit status.
13110 Reported by Wolfram Wagner.
13111
3d76b07d
AD
131122001-11-14 Akim Demaille <akim@epita.fr>
13113
13114 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
13115 defined only if yyoverflow is defined, to avoid `warning: unused
13116 variable `yyvs1''.
13117 Reported by The Test Suite.
13118
09b503c8
AD
131192001-11-14 Akim Demaille <akim@epita.fr>
13120
13121 * src/print.c: Include reduce.h.
13122 Reported by Hans Aberg.
13123
131242001-11-14 Akim Demaille <akim@epita.fr>
13125
13126 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
13127 Revert a previous patch: these are really const.
13128 * src/conflicts.c (conflict_report): Additional useless pair of
13129 braces to pacify GCC's warnings for `if () if () {} else {}'.
13130 * src/lex.c (parse_percent_token): Replace equal_offset with
13131 arg_offset.
13132 arg is const.
13133 Be sure to strdup `arg' when used, since there is no reason for
13134 token_buffer not to change.
13135
0f37a994
AD
131362001-11-14 Akim Demaille <akim@epita.fr>
13137
13138 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
13139 definition.
13140 * src/main.c (main): Use them.
13141 Suggested by Hans Aberg.
13142
d39d93b8
AD
131432001-11-12 Akim Demaille <akim@epita.fr>
13144
13145 * src/system.h (ngettext): Now that we use ngettext, be sure to
13146 provide a default definition when NLS are not used.
13147
9edcd895
AD
131482001-11-12 Akim Demaille <akim@epita.fr>
13149
13150 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
13151 Use @kbd to denote user input.
13152 (Language and Grammar): ANSIfy the example.
13153 Adjust its layout for info/notinfo.
13154 (Location Tracking Calc): Output error messages to stderr.
13155 Output locations in a more GNUtically correct way.
13156 Fix a couple of Englishos.
13157 Adjust @group/@end group pairs.
13158
7da99ede
AD
131592001-11-12 Akim Demaille <akim@epita.fr>
13160
e3aa65c5 13161 %expect was not functioning at all.
7da99ede
AD
13162
13163 * src/conflicts.c (expected_conflicts): Set to -1.
13164 (conflict_report): Use ngettext.
13165 (conflicts_print): Check %expect and make its violation an error.
13166 * doc/bison.texinfo (Expect Decl): Adjust.
13167 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
13168 * tests/regression.at (%expect not enough, %expect right)
13169 (%expect too much): New.
13170
ba9dda1a
AD
131712001-11-12 Akim Demaille <akim@epita.fr>
13172
13173 * tests/regression.at (Conflicts): Rename as...
13174 (Unresolved SR Conflicts): this.
13175 (Solved SR Conflicts): New.
13176
337c5bd1
AD
131772001-11-12 Akim Demaille <akim@epita.fr>
13178
13179 * src/reduce.c (print_results): Rename as...
13180 (reduce_output): This.
13181 Output to OUT, passed as argument, instead of output_obstack.
13182 (dump_grammar): Likewise.
13183 (reduce_free): New.
13184 Also free V1.
13185 (reduce_grammar): No longer call reduce_output, since...
13186 * src/print.c (print_results): do it.
13187 * src/main.c (main): Call reduce_free;
13188
c73a41af
AD
131892001-11-12 Akim Demaille <akim@epita.fr>
13190
13191 * src/conflicts.c (print_reductions): Accept OUT as argument.
13192 Output to it, not to output_obstack.
13193 * src/print.c (print_actions): Adjust.
13194
0df87bb6
AD
131952001-11-12 Akim Demaille <akim@epita.fr>
13196
13197 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
13198 the result instead of using...
13199 (src_total, rrc_total, src_count, rrc_count): Remove.
13200 (any_conflicts): Remove.
13201 (print_conflicts): Split into...
13202 (conflicts_print, conflicts_output): New.
13203 * src/conflicts.h: Adjust.
13204 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 13205 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
13206 * tests/regression.at (Conflicts): New.
13207 Reported by Tom Lane.
13208
e4d3d4de
AD
132092001-11-12 Akim Demaille <akim@epita.fr>
13210
13211 * tests/regression.at (Invalid input): Remove, duplicate with
13212 ``Invalid input: 1''.
13213
6d7d248e
AD
132142001-11-12 Akim Demaille <akim@epita.fr>
13215
13216 * tests/torture.at (AT_DATA_STACK_TORTURE)
13217 (Exploding the Stack Size with Alloca)
13218 (Exploding the Stack Size with Malloc): New.
13219
e9e4c321
AD
132202001-11-12 Akim Demaille <akim@epita.fr>
13221
13222 * src/bison.simple (YYSTACK_REALLOC): New.
13223 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 13224 Reported by Per Allansson.
e9e4c321 13225
5f7e0832
AD
132262001-11-12 Pascal Bart <pascal.bart@epita.fr>
13227
13228 * src/bison.simple: Define type yystype instead of YYSTYPE, and
13229 define CPP macro, which substitute YYSTYPE by yystype.
13230 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
13231 with yyltype/YYLTYPE. This allows inclusion of the generated
13232 header within the parser if the compiler, such as GGC, accepts
13233 multiple equivalent #defines.
13234 From Akim.
13235
e3f1699f
AD
132362001-11-05 Akim Demaille <akim@epita.fr>
13237
13238 * src/reader.c (symbols_output): New, extracted from...
13239 (packsymbols): here.
13240 (reader): Adjust.
13241
65be0866
AD
132422001-11-05 Akim Demaille <akim@epita.fr>
13243
13244 * src/lex.c (parse_percent_token): s/quotearg/quote/.
13245
e4d910bf
AD
132462001-11-05 Akim Demaille <akim@epita.fr>
13247
13248 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
13249 pattern.
13250
951366c1
AD
132512001-11-05 Akim Demaille <akim@epita.fr>
13252
13253 * src/options.h (struct option_table_struct): set_flags is void*.
13254 * src/options.c (longopts): Support `--output' and `%output'.
13255 (usage): Adjust.
13256 * src/lex.h (tok_setopt): Remove, replaced with...
13257 (tok_intopt, tok_stropt): these new guys.
13258 * src/lex.c (getopt.h): Not needed.
13259 (token_buffer, unlexed_token_buffer): Not const.
13260 (percent_table): Promote `-' over `_' in directive names.
13261 Active `%name-prefix', `file-prefix', and `output'.
13262 (parse_percent_token): Accept possible arguments to directives.
13263 Promote `-' over `_' in directive names.
13264
d8988b2f
AD
132652001-11-04 Akim Demaille <akim@epita.fr>
13266
13267 * doc/bison.texinfo (Decl Summary): Split the list into
13268 `directives for grammars' and `directives for bison'.
13269 Sort'em.
13270 Add description of `%name-prefix', `file-prefix', and `output'.
13271 Promote `-' over `_' in directive names.
13272 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
13273 Simplify the description of `--name-prefix'.
13274 Promote `-' over `_' in directive names.
13275 Promote `--output' over `--output-file'.
13276 Fix the description of `--defines'.
13277 * tests/output.at: Exercise %file-prefix and %output.
13278
6468d18e
AD
132792001-11-02 Akim Demaille <akim@epita.fr>
13280
13281 * doc/refcard.tex: Update.
13282
6b7e85b9
AD
132832001-11-02 Akim Demaille <akim@epita.fr>
13284
13285 * src/symtab.h (SUNDEF): New.
13286 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
13287 stand for `uninitialized', instead of 0.
13288 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
13289 * src/lex.c (lex): Adjust.
13290
13291 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
13292 Number it 0.
13293 Let yylex return it instead of a plain 0.
13294 Reported by Dick Streefland.
13295
cd5aafcf
AD
132962001-11-02 Akim Demaille <akim@epita.fr>
13297
13298 * tests/regression.at (Mixing %token styles): New test.
13299
037ca2f1
AD
133002001-11-02 Akim Demaille <akim@epita.fr>
13301
13302 * src/reader.c (parse_thong_decl): Formatting changes.
13303 (token_translations_init): New, extracted from...
13304 (packsymbols): Here.
13305 Adjust.
13306
270a173c
AD
133072001-11-01 Akim Demaille <akim@epita.fr>
13308
13309 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13310 Check that `9foo.y' produces correct cpp guards.
13311 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13312 guards.
13313 Reported by Wwp.
13314
561f9a30
AD
133152001-11-01 Akim Demaille <akim@epita.fr>
13316
13317 * tests/regression.at (Invalid input: 2): New.
13318 * src/lex.c (unlexed_token_buffer): New.
13319 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13320 too.
13321 Reported by Wwp.
13322
f987e9d2
AD
133232001-11-01 Akim Demaille <akim@epita.fr>
13324
13325 * tests/calc.at: Catch up with 1.30.
13326 * configure.in: Bump to 1.49a.
13327 Adjust to newer Autotest.
13328
0846f581
PB
133292001-10-19 Pascal Bart <pascal.bart@epita.fr>
13330
13331 * src/conflicts.c: Move global variables rrc_total and src_total ...
13332 (print_conflicts): here.
13333 * src/output.c (output): Free global variable user_toknums.
13334 * src/lex.c (token_obstack): Become static.
13335
3c1a79b3
AD
133362001-10-18 Akim Demaille <akim@epita.fr>
13337
13338 * tests/atlocal.in (GCC): Add.
13339 * tests/calc.at: s/m4_match/m4_bmatch/.
13340 s/m4_patsubst/m4_bpatsubst/.
13341 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13342 * configure.in: AC_SUBST(GCC).
13343
5d52e7d0
MA
133442001-10-14 Marc Autret <autret_m@epita.fr>
13345
13346 * src/options.c (create_long_option_table): Fix.
13347
631aa1d3
AD
133482001-10-10 Akim Demaille <akim@epita.fr>
13349
13350 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13351
f6ec6d13
AD
133522001-10-04 Akim Demaille <akim@epita.fr>
13353
13354 * src/reader.c (parse_union_decl): Push the caracters in
13355 union_obstack, not attrs_obstack.
13356
342b8b6e
AD
133572001-10-04 Akim Demaille <akim@epita.fr>
13358
13359 Merge in the branch 1.29.
13360
13361 * src/reader.c (packsymbols): Use a temporary obstack for
13362 `%%tokendef', since output_stack is already used elsewhere.
13363
13364 2001-10-02 Akim Demaille <akim@epita.fr>
13365
13366 Bump 1.29d.
13367
13368 2001-10-02 Akim Demaille <akim@epita.fr>
13369
13370 Version 1.29c.
13371
13372 2001-10-02 Akim Demaille <akim@epita.fr>
13373
13374 * tests/regression.at (Invalid CPP headers): New.
13375 From Alexander Belopolsky.
13376 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
13377
13378 2001-10-02 Akim Demaille <akim@epita.fr>
13379
13380 * tests/regression.at (Invalid input): New.
13381 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
13382 Reported by Shura.
13383
13384 2001-10-02 Akim Demaille <akim@epita.fr>
13385
13386 * tests/calc.at: Now that --debug works, the tests must be adjusted.
13387
13388 2001-10-02 Akim Demaille <akim@epita.fr>
13389
13390 * src/output.c (output_parser): Assert `skeleton'.
13391 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
13392 systems.
13393 From Shura.
13394
13395 2001-10-01 Marc Autret <autret_m@epita.fr>
13396
13397 * src/lex.h: Echo modifications.
13398 * src/lex.c (unlex): Parameter is now token_t.
13399 From Hans Aberg.
13400
13401 2001-10-01 Marc Autret <autret_m@epita.fr>
13402
13403 * src/main.c: Include lex.h.
13404 From Hans Aberg.
13405
13406 2001-09-29 Akim Demaille <akim@epita.fr>
13407
13408 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
13409
13410 2001-09-28 Akim Demaille <akim@epita.fr>
13411
13412 * tests/testsuite.at: Update to newer Autotest.
13413 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
13414
13415 2001-09-27 Akim Demaille <akim@epita.fr>
13416
13417 Position independent wrapper.
13418
13419 * tests/bison: Remove.
13420 * tests/bison.in: New.
13421 * configure.in: Adjust.
13422
13423 2001-09-27 Paul Eggert <eggert@twinsun.com>
13424
13425 Port quotearg fixes from tar 1.13.24.
13426
13427 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
13428 tm to be declared.
13429 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
13430 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
13431
13432 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
13433 * m4/mbrtowc.m4: New file.
13434 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
13435 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
13436
13437 2001-09-27 Akim Demaille <akim@epita.fr>
13438
13439 Bump to 1.29c.
13440
13441 2001-09-27 Akim Demaille <akim@epita.fr>
13442
13443 Version 1.29b.
13444
13445 2001-09-25 Akim Demaille <akim@epita.fr>
13446
13447 * src/system.h: Include `xalloc.h'.
13448 Remove it from the C files.
13449 * src/files.c (output_files): Free the obstacks.
13450 * src/lex.c (init_lex): Rename as...
13451 (lex_init): this.
13452 (lex_free): New.
13453 * src/main.c (main): Use it.
13454
13455 2001-09-24 Marc Autret <autret_m@epita.fr>
13456
13457 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
13458 to output informations in fout (FILE*).
13459 (open_graph, close_graph): Likewise.
13460 (output_graph, output_edge, output_node): Likewise.
13461 * src/vcg.h: Update function prototypes.
13462 * src/print_graph.c (print_graph): Open output graph file.
13463 (print_actions): Adjust.
13464 * src/files.h: Remove extern declaration.
13465 * src/files.c: Remove graph_obstack declaration.
13466 (open_files): Remove graph_obstack initialization.
13467 (output_files): Remove graph_obstack saving.
13468
13469 2001-09-24 Marc Autret <autret_m@epita.fr>
13470
13471 * src/files.c (compute_output_file_names): Fix.
13472
13473 2001-09-24 Marc Autret <autret_m@epita.fr>,
13474 Akim Demaille <akim@epita.fr>
13475
13476 * src/reader.c (reader): Remove call to free_symtab ().
13477 * src/main.c (main): Call it here.
13478 Include symtab.h.
13479 * src/conflicts.c (initialize_conflicts): Rename as...
13480 (solve_conflicts): this.
13481 * src/print.c (print_core, print_actions, print_state)
13482 (print_grammar): Dump to a file instead a `output_obstack'.
13483 (print_results): Dump `output_obstack', and then proceed with the
13484 FILE *.
13485 * src/files.c (compute_output_file_names, close_files): New.
13486 (output_files): Adjust.
13487 * src/main.c (main): Adjust.
13488
13489 2001-09-23 Marc Autret <autret_m@epita.fr>
13490
13491 * src/files.c (compute_header_macro): Computes header macro name
13492 from spec_defines_file when given.
13493
13494 2001-09-23 Marc Autret <autret_m@epita.fr>
13495
13496 * src/files.c (output_files): Add default extensions.
13497
13498 2001-09-22 Akim Demaille <akim@epita.fr>
13499
13500 * src/conflicts.c (finalize_conflicts): Rename as...
13501 (free_conflicts): this.
13502
13503 2001-09-22 Akim Demaille <akim@epita.fr>
13504
13505 * src/gram.c (gram_free): Rename back as...
13506 (dummy): this.
13507 (output_token_translations): Free `token_translations'.
13508 * src/symtab.c (free_symtab): Free the tag field.
13509
13510 2001-09-22 Akim Demaille <akim@epita.fr>
13511
13512 Remove `translations' as it is always set to true.
13513
13514 * src/gram.h: Adjust.
13515 * src/reader.c (packsymbols, parse_token_decl): Adjust
13516 * src/print.c (print_grammar): Adjust.
13517 * src/output.c (output_token_translations): Adjust.
13518 * src/lex.c (lex): Adjust.
13519 * src/gram.c: Be sure the set pointers to NULL.
13520 (dummy): Rename as...
13521 (gram_free): this.
13522
13523 2001-09-22 Akim Demaille <akim@epita.fr>
13524
13525 * configure.in: Invoke AM_LIB_DMALLOC.
13526 * src/system.h: Use dmalloc.
13527 * src/LR0.c: Be sure to have pointers initialized to NULL.
13528 (allocate_itemsets): Allocate kernel_items only if needed.
13529
13530 2001-09-22 Akim Demaille <akim@epita.fr>
13531
13532 * configure.in: Bump to 1.29b.
13533 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13534 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13535 need xmalloc.c in calc.y.
13536 From Pascal Bart.
13537
13538 2001-09-21 Akim Demaille <akim@epita.fr>
13539
13540 Version 1.29a.
13541 * Makefile.maint, config/config.guess, config/config.sub,
13542 * config/missing: Update from masters.
13543 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13544 upon package.m4.
13545 * configure.in (ALL_LINGUAS): Add `tr'.
13546
13547 2001-09-21 Akim Demaille <akim@epita.fr>
13548
13549 * tests/Makefile.am (package.m4): Move to...
13550 ($(srcdir)/$(TESTSUITE)): here.
13551
13552 2001-09-20 Akim Demaille <akim@epita.fr>
13553
13554 * src/complain.c: No longer try to be standalone: use system.h.
13555 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13556 * src/complain.h: Likewise.
13557 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13558 Remove the unused variable `n'.
13559 From Albert Chin-A-Young.
13560
13561 2001-09-18 Marc Autret <autret_m@epita.fr>
13562
13563 * doc/bison.1: Update.
13564 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13565 descriptions.
13566 (Option Cross Key): Update.
13567 Add --graph.
13568
13569 2001-09-18 Marc Autret <autret_m@epita.fr>
13570
13571 * tests/regression.at: New test (comment in %union).
13572
13573 2001-09-18 Marc Autret <autret_m@epita.fr>
13574
13575 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
13576 do that.
13577 Reported by Keith Browne.
13578
13579 2001-09-18 Marc Autret <autret_m@epita.fr>
13580
13581 * tests/output.at: Add tests for --defines and --graph.
13582
13583 2001-09-18 Marc Autret <autret_m@epita.fr>
13584
13585 * tests/output.at: Removes tests of %{header,src}_extension features.
13586
13587 2001-09-18 Akim Demaille <akim@epita.fr>
13588
13589 * tests/Makefile.am (package.m4): New.
13590 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
13591 (_AT_CHECK_CALC_ERROR): Likewise.
13592 Factor the `, ' part of verbose error messages.
13593
13594 2001-09-18 Marc Autret <autret_m@epita.fr>
13595
13596 * src/getargs.c (longopts): Declare --defines and --graph as options
13597 with optional arguments.
13598 * src/files.h: Add extern declarations.
13599 * src/files.c (spec_graph_file, spec_defines_file): New.
13600 (output_files): Update.
13601 Remove CPP-outed code.
13602
13603 2001-09-18 Marc Autret <autret_m@epita.fr>
13604
13605 Turn off %{source,header}_extension feature.
13606
13607 * src/files.c (compute_exts_from_gf): Update.
13608 (compute_exts_from_src): Update.
13609 (output_files): CPP-out useless code.
13610 * src/files.h: Remove {header,source}_extension extern declarations.
13611 * src/reader.c (parse_dquoted_param): CPP-out.
13612 (parse_header_extension_decl): Remove.
13613 (parse_source_extension_decl): Remove.
13614 (read_declarations): Remove cases tok_{hdrext,srcext}.
13615 * src/lex.c (percent_table): Remove {header,source}_extension entries.
13616 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
13617
13618 2001-09-10 Akim Demaille <akim@epita.fr>
13619
13620 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
13621 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
13622 (AT_CHECK_OUTPUT): this.
13623 Merely check ls' exit status, its output is useless.
13624
13625 2001-09-10 Akim Demaille <akim@epita.fr>
13626
13627 * tests/calc.at: Use m4_match.
13628 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
13629
13630 2001-09-10 Marc Autret <autret_m@epita.fr>,
13631 Akim Demaille <akim@epita.fr>
13632
13633 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
13634 enum color_e.
13635 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
13636 to `normal'.
13637 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
13638 * src/lex.h: Adjust prototype.
13639 (token_t): Add `tok_undef'.
13640 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
13641 (parse_percent_token): Now returns token_t.
13642 Add default statement in switch.
13643 (lex): Separate `c' as an input variable, from the token_t result
13644 part.
13645 (unlexed): Is a token_t.
13646
13647 2001-09-10 Akim Demaille <akim@epita.fr>
13648
13649 * configure.in: Bump to 1.29a.
13650
13651 2001-09-07 Akim Demaille <akim@epita.fr>
13652
13653 Version 1.29.
13654
13655 2001-08-30 Akim Demaille <akim@epita.fr>
13656
13657 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
13658 * m4/atconfig.m4: Remove.
13659 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
13660 * tests/bison: New.
13661 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
13662 m4_if, m4_patsubst, and m4_regexp.
13663 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
13664 `input' file instead of echo.
13665
13666 2001-08-29 Akim Demaille <akim@epita.fr>
13667
13668 Bump to 1.28e.
13669
13670 2001-08-29 Akim Demaille <akim@epita.fr>
13671
13672 Version 1.28d.
13673
13674 2001-08-29 Paul Eggert <eggert@twinsun.com>
13675
13676 * src/bison.simple (yyparse): Don't take the address of an
13677 item before the start of an array, as that doesn't conform to
13678 the C Standard.
13679
13680 2001-08-29 Robert Anisko <anisko_r@epita.fr>
13681
13682 * doc/bison.texinfo (Location Tracking Calc): New node.
13683
13684 2001-08-29 Paul Eggert <eggert@twinsun.com>
13685
13686 * src/output.c (output): Do not define const, as this now
13687 causes more problems than it cures.
13688
13689 2001-08-29 Akim Demaille <akim@epita.fr>
13690
13691 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
13692 the nodes.
13693 Be sure to tag the `detailmenu'.
13694
13695 2001-08-29 Akim Demaille <akim@epita.fr>
13696
13697 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
13698 download in a tmp dir.
13699
13700 2001-08-28 Marc Autret <autret_m@epita.fr>
13701
13702 * config/depcomp: New file.
13703
13704 2001-08-28 Marc Autret <autret_m@epita.fr>
13705
13706 * doc/bison.1 (mandoc): Adjust.
13707 From Juan Manuel Guerrero.
13708
13709 2001-08-28 Marc Autret <autret_m@epita.fr>
13710
13711 * src/print_graph.c (print_state): Fix.
13712
13713 2001-08-27 Marc Autret <autret_m@epita.fr>
13714
13715 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
13716 char * members.
13717 Echo modifications to the functions prototypes.
13718 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
13719
13720 2001-08-27 Marc Autret <autret_m@epita.fr>
13721
13722 * src/vcg.c: Include `xalloc.h'.
13723 (add_colorentry): New.
13724 (add_classname): New.
13725 (add_infoname): New.
13726 * src/vcg.h: Add new prototypes.
13727
13728 2001-08-27 Akim Demaille <akim@epita.fr>
13729
13730 * Makefile.maint: Sync. again with CVS Autoconf.
13731
13732 2001-08-27 Akim Demaille <akim@epita.fr>
13733
13734 * Makefile.maint: Formatting changes.
13735 (po-update, cvs-update, update): New targets.
13736 (AMTAR): Remove.
13737
13738 2001-08-27 Akim Demaille <akim@epita.fr>
13739
13740 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13741 * Makefile.maint: Sync. with CVS Autoconf.
13742
13743 2001-08-27 Marc Autret <autret_m@epita.fr>
13744
13745 * src/vcg.h (struct infoname_s): New.
13746 (struct colorentry_s): New.
13747 (graph_s): New fields {vertical,horizontal}_order in structure.
13748 Add `infoname' field.
13749 Add `colorentry' field;
13750 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
13751 (G_HORIZONTAL_ORDER): New.
13752 (G_INFONAME): New.
13753 (G_COLORENTRY): New.
13754 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
13755 Add output of `infoname'.
13756 Add output of `colorentry'.
13757
13758 2001-08-27 Marc Autret <autret_m@epita.fr>
13759
13760 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
13761 This one shadowed a global parameter.
13762
13763 2001-08-24 Marc Autret <autret_m@epita.fr>
13764
13765 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
13766 instead of `unsigned'.
13767 (print_state): Do not call obstack_object_size () in obstack_grow ()
13768 to avoid macro variables shadowing.
13769
13770 2001-08-23 Marc Autret <autret_m@epita.fr>
13771
13772 * src/lex.c (percent_table): Typo: s/naem/name/.
13773 Add graph option.
13774 Normalize new options declarations.
13775
13776 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
13777
13778 * tests/suite.at: Exercise %header_extension and %source_extension.
13779
13780 2001-08-16 Marc Autret <autret_m@epita.fr>
13781
13782 * src/reader.c (parse_dquoted_param): New.
13783 (parse_header_extension_decl): Use it.
13784 (parse_source_extension_decl): Likewise.
13785
13786 2001-08-16 Marc Autret <autret_m@epita.fr>
13787
13788 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
13789 (get_xxxx_str): Use assert () instead of complain ().
13790 Remove return invokations in default cases.
13791 (get_decision_str): Modify default behaviour. Remove second argument.
13792 Echo modifications on calls.
13793 (output_graph): Fix.
13794
13795 2001-08-16 Marc Autret <autret_m@epita.fr>
13796
13797 * src/getargs.c (usage): Update with ``-g, --graph''.
13798
13799 2001-08-16 Marc Autret <autret_m@epita.fr>
13800
13801 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
13802 (Option Cross Key): Likewise.
13803 * doc/bison.1: Update.
13804
1c8c2190
PB
138052001-09-25 Pascal Bart <pascal.bart@epita.fr>
13806
13807 * src/output.c (output_master_parser): Don't finish action_obstack.
13808 (output_parser): Don't care about the muscle action, here.
13809 (prepare): Copy the action_obstack in the action muscle.
13810 (output): Free action_obstack.
13811
180d45ba
PB
138122001-09-23 Pascal Bart <pascal.bart@epita.fr>
13813
13814 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
13815 will contain `%union' declaration.
13816 (parse_union_decl): Delete #line directive output.
13817 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
13818 informations about %union.
13819 (parse_union_decl): Copy the union_obstack in the muscle stype.
13820 * src/bison.simple: Add new #line directive.
13821 Add typdef %%stype YYSTYPE.
13822
c51d1a19
PB
138232001-09-23 Pascal Bart <pascal.bart@epita.fr>
13824
13825 * src/bison.simple: Add new `#line' directive.
13826
6f9344da
PB
138272001-09-22 Pascal Bart <pascal.bart@epita.fr>
13828
13829 * src/bison.simple: New `#line' directive.
13830 * src/output.c (output_parser): Support new dynamic muscle input_line.
13831
652def80
MA
138322001-09-22 Marc Autret <autret_m@epita.fr>
13833
13834 * src/output.c (output_master_parser): New.
13835 (output_parser): Be more re-entrant.
13836
25b222fa
MA
138372001-09-21 Marc Autret <autret_m@epita.fr>
13838
13839 * src/reader.c (copy_definition, parse_union_decl): Update and use
13840 `linef' muscle.
13841 (copy_action): Likewise.
13842 Use obstack_1grow ().
13843 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
13844
6bc35ae5
MA
138452001-09-21 Marc Autret <autret_m@epita.fr>
13846
13847 * src/options.c (option_table): Adjust.
13848 * src/lex.c (parse_percent_token): Fix.
13849
c0629aa1
PB
138502001-09-20 Pascal Bart <pascal.bart@epita.fr>
13851
13852 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 13853
82b6d266
PB
138542001-09-20 Pascal Bart <pascal.bart@epita.fr>
13855
13856 * src/lex.c (parse_percent_token): Change type of variable `tx', which
13857 is now an option_table_struct*.
13858 (option_strcmp): New function option_strcmp.
13859 (parse_percent_token): Call option_strcmp.
13860 * src/getargs.c (xalloc.h, options.h): Include it.
13861 (getargs): Call create_long_option_table.
13862 (getargs): Free longopts at the end of the function.
13863 (shortopts): Move in options.c.
13864 * src/options.c (create_long_option_table): New function. Convert
13865 information from option_table to option structure.
13866 * src/reader.c (options.h): Include it.
13867
13868 * src/Makefile.am: Adjust.
13869 * src/options.c (option_table): Create from longopts and percent_table.
13870 * src/getargs.c (longopts): Delete.
13871 * src/lex.c (struct percent_table_struct): Delete.
13872 (percent_table): Delete.
13873 (options.h): Include it.
13874 * src/options.c: Create.
13875 * src/options.h: Create.
13876 Declare enum opt_access_e.
13877 Define struct option_table_struct.
13878
75f5aaea
MA
138792001-09-20 Marc Autret <autret_m@epita.fr>
13880
13881 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
13882 sections of Bison.
13883
f508cb0a
PB
138842001-09-19 Pascal Bart <pascal.bart@epita.fr>
13885
13886 * src/bison.simple: s/%%filename/%%skeleton.
13887 * src/muscle_tab.c (getargs.h): Include it.
13888 (muscle_init): Insert new muscle skeleton.
13889
13105fc1
PB
138902001-09-18 Pascal Bart <pascal.bart@epita.fr>
13891
13892 * src/output.c (output_parser): Delete unused variable actions_dumped.
13893
b0c4483e
PB
138942001-09-07 Pascal Bart <pascal.bart@epita.fr>
13895
13896 * src/output.c (output): Delete call to reader_output_yylsp.
13897 * src/reader.c (reader): Likewise.
ba0fe3c7 13898 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 13899
11d82f03
MA
139002001-09-02 Marc Autret <autret_m@epita.fr>
13901
13902 * src/reader.c: Include muscle_tab.h.
13903 (parse_union_decl): Update.
13904 (parse_macro_decl): Rename parse_muscle_decl.
13905 Update to use renamed functions and variable.
13906 (read_declarations, copy_action, read_additionnal_code, : Updated
13907 with correct variables and functions names.
13908 (packsymbols, reader): Likewise.
342b8b6e 13909
11d82f03 13910 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 13911
11d82f03
MA
13912 * src/output.c: Include muscle_tab.h
13913 In all functions using macro_insert, change by using muscle_insert ().
13914 (macro_obstack): Rename muscle_obstack.
13915 Echo modifications in the whole file.
13916 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
13917 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
13918 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
13919
13920 * src/muscle_tab.h: Update double inclusion macros.
13921 (macro_entry_s): Rename muscle_entry_s.
13922 Update prototypes.
342b8b6e 13923
11d82f03
MA
13924 * src/muscle_tab.c: Include muscle_tab.h.
13925 Rename macro_tabble to muscle_table.
13926 (mhash1, mhash2, mcmp): Use muscle_entry.
13927 (macro_init): Rename muscle_init. Update.
13928 (macro_insert): Rename muscle_insert. Update.
13929 (macro_find): Rename muscle_find. Update.
13930
13931 * src/main.c: Include muscle_tab.h.
13932 (main): Call muscle_init ().
13933 * src/Makefile.am (bison_SOURCES): Echo modifications.
13934
93a37297
MA
139352001-09-02 Marc Autret <autret_m@epita.fr>
13936
f753cd62 13937 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 13938
f753cd62
MA
13939 * src/muscle_tab.c, src/muscle_tab.h: Add files.
13940
139412001-09-02 Marc Autret <autret_m@epita.fr>
13942
13943 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 13944
682d48cd
PB
139452001-09-01 Pascal Bart <pascal.bart@epita.fr>
13946
342b8b6e 13947 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
13948 filename.
13949
087c8fda
MA
139502001-09-01 Marc Autret <autret_m@epita.fr>
13951
13952 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
13953 to an explicit value to activate the feature. We do it here.
13954
dda680cb
PB
139552001-08-31 Pascal Bart <pascal.bart@epita.fr>
13956
13957 * src/output.c (prepare): Delete the `filename' muscule insertion.
13958 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
13959 (parse_union_decl): Likewise.
13960 * src/macrotab.c (macro_init): Initialize filename by infile.
13961
9e644e64
MA
139622001-08-31 Marc Autret <autret_m@epita.fr>
13963
13964 * src/bison.simple (YYLSP_NEEDED): New definition.
13965 * src/output.c (prepare): Add macro insertion of `locations_flag'
13966
17da6427
PB
139672001-08-31 Pascal Bart <pascal.bart@epita.fr>
13968
13969 * src/output.c (prepare): Delete insertion of previous muscles,
13970 and insert the `prefix' muscles.
13971 * src/macrotab.c (macro_init): Likewise.
13972 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 13973 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
13974 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
13975 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 13976 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
13977 name_prefix.
13978
e8cb70b9
PB
139792001-08-31 Pascal Bart <pascal.bart@epita.fr>
13980
13981 * src/main.c (main): Standardize.
13982 * src/output.c (output_table_data, output_parser): Likewise.
13983 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
13984
63c2d5de
MA
139852001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
13986
342b8b6e 13987 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
13988 %%epilogue.
13989 * src/output.c (output): Rename %%declarations to %%prologue.
13990 * src/bison.simple: Echo modifications.
342b8b6e 13991
d8cb5183
MA
139922001-08-31 Marc Autret <autret_m@epita.fr>
13993
13994 * src/reader.c (readgram): CleanUp.
13995 (output_token_defines): Likewise.
13996 (packsymbols): Likewise.
13997 (reader): Likewise.
13998 * src/output.c (output): CPP-out useless code.
13999
6c686258
PB
140002001-08-31 Pascal Bart <pascal.bart@epita.fr>
14001
342b8b6e 14002 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
14003 output_trailers and output_headers.
14004 * src/output.h: Remove obsolete functions prototypes of output_headers
14005 and output_trailers.
14006
8f451ef7
PB
140072001-08-30 Pascal Bart <pascal.bart@epita.fr>
14008
14009 * src/main.c: Include macrotab.h.
342b8b6e 14010 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
14011 Adjust functions prototypes.
14012 * src/macrotab.c (macro_insert): Constify key and value.
14013 (macro_find): Constify key.
14014 (macro_insert): Include 'xalloc.h'
14015 (macro_insert): Use XMALLOC.
14016 (macro_find): Constify return value.
14017 * src/output.c (output_table_data): Rename table to table_data.
14018 (output_parser): Constify macro_key, macro_value.
14019
997b6fd0 140202001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
14021
14022 * src/reader.c (parse_skel_decl): New.
342b8b6e 14023 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
14024 * src/lex.h (token_t): New token `tok_skel'.
14025 * src/lex.c (percent_table): Add skeleton option entry.
14026 Standardize.
14027
ff48177d
MA
140282001-08-29 Marc Autret <autret_m@epita.fr>
14029
14030 * src/bison.simple: Add %%user_code directive at the end.
14031 * src/reader.c (read_additionnal_code): New.
14032 (reader): Use it.
14033 * src/output.c (output_program): Remove.
14034 (output): Update.
14035
b33160bf
MA
140362001-08-28 Marc Autret <autret_m@epita.fr>
14037
14038 * src/output.c (output_actions): Clean up.
4e5caae2 14039 (output_gram): CPP-out useless code.
b33160bf
MA
14040 * src/reader.c (reader): Clean up, CPP-out useless code.
14041
d1a2daf7
PB
140422001-08-28 Pascal Bart <pascal.bart@epita.fr>
14043
342b8b6e 14044 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 14045 directive.
d1a2daf7
PB
14046 * src/bison.simple: Add `%%definitions'.
14047
2b763dfe
MA
140482001-08-28 Marc Autret <autret_m@epita.fr>
14049
14050 * config/depcomp: New file.
14051
f1a87ef6
PE
140522001-08-27 Paul Eggert <eggert@twinsun.com>
14053
14054 * src/bison.simple (yyparse): Don't take the address of an
14055 item before the start of an array, as that doesn't conform to
14056 the C Standard.
14057
82e236e2
RA
140582001-08-27 Robert Anisko <robert.anisko@epita.fr>
14059
f1a87ef6 14060 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
14061 obstack. It was done too late here.
14062
14063 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
14064 completely wrong.
14065 (reader): Initialize the macro obstack here, since we need it to grow
14066 '%define' directives.
14067
14068 * src/reader.h: Declare the macro obstack as extern.
14069
b0cfa28a
RA
140702001-08-27 Robert Anisko <robert.anisko@epita.fr>
14071
14072 * src/output.c (output_parser): Fix. Store single '%' characters in
14073 the output obstack instead of throwing them away.
14074
6fc74234
AD
140752001-08-27 Akim Demaille <akim@epita.fr>
14076
14077 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14078
9c76d118
RA
140792001-08-25 Robert Anisko <robert.anisko@epita.fr>
14080
14081 * lib/Makefile.am: Adjust.
14082
a8289c62
RA
140832001-08-25 Robert Anisko <robert.anisko@epita.fr>
14084
14085 * src/bison.simple: Update and add '%%' directives.
14086
b6610515
RA
140872001-08-25 Robert Anisko <robert.anisko@epita.fr>
14088
14089 * src/reader.c (reader): Remove calls to 'output_headers' and
14090 'output_trailers'. Remove some C output.
14091 (readgram): Disable a piece of code that was writing a default
14092 definition for 'YYSTYPE'.
14093 (reader_output_yylsp): Remove.
14094 (packsymbols): Output token defintions to a macro.
14095 (copy_definition): Disable C output.
6fc74234 14096
b6610515
RA
14097 * src/reader.c (parse_macro_decl): New function used to parse macro
14098 declarations.
14099 (copy_string2): Put the body of copy_string into this new function.
14100 Add a parameter to let the caller choose whether he wants to copy the
14101 string delimiters or not.
14102 (copy_string): Be a simple call to copy_string2 with the last argument
14103 bound to true.
14104 (read_declarations): Add case for macro definition.
14105 (copy_identifier): New.
6fc74234 14106 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
14107 rather than lex.
14108
26f609ff
RA
141092001-08-25 Robert Anisko <robert.anisko@epita.fr>
14110
14111 * src/output.c (prepare): Add prefixed names.
14112 (output_parser): Output semantic actions.
14113 (output_parser): Fix bug on '%%line' directives.
6fc74234 14114
26f609ff
RA
14115 * src/output.c (output_headers): Remove. The C code printed by this
14116 function should now be in the skeletons.
14117 (output_trailers): Remove.
14118 (output): Disable call to 'reader_output_yylsp'.
14119 (output_rule_data): Do not output tables to the table obstack.
14120
14121 * src/output.c: Remove some C dedicated output.
14122 Improve the use of macro and output obstacks.
14123 (output_defines): Remove.
6fc74234 14124
26f609ff
RA
14125 * src/output.c (output_token_translations): Associate 'translate'
14126 table with a macro. No output to the table obstack.
14127 (output_gram): Same for 'rhs' and 'prhs'.
14128 (output_stos): Same for 'stos'.
14129 (output_rule_data): Same for 'r1' and 'r2'.
14130 (token_actions): Same for 'defact'.
14131 (goto_actions): Same for 'defgoto'.
14132 (output_base): Same for 'pact' and 'pgoto'.
14133 (output_table): Same for 'table'.
14134 (output_check): Same for 'check'.
6fc74234 14135
26f609ff
RA
14136 * src/output.c (output_table_data): New function.
14137 (output_short_table): Remove.
14138 (output_short_or_char_table): Remove.
6fc74234 14139
26f609ff
RA
14140 * src/output.c (output_parser): Replace most of the skeleton copy code
14141 with something new. Skeletons are now processed character by character
14142 rather than line by line, and Bison looks for '%%' macros. This is the
14143 first step in making Bison's output process (a lot) more flexible.
14144 (output_parser): Use the macro table.
14145
6f43b113
RA
141462001-08-25 Robert Anisko <robert.anisko@epita.fr>
14147
14148 * src/main.c (main): Initialize the macro table.
14149
dd3127cf
RA
141502001-08-25 Robert Anisko <robert.anisko@epita.fr>
14151
14152 * src/lex.c (percent_table): Add tok_define.
14153 * src/lex.h: Add tok_define.
14154
aa321494
RA
141552001-08-25 Robert Anisko <robert.anisko@epita.fr>
14156
14157 * src/macrotab.c: New file.
14158 * src/macrotab.h: New file.
14159 * src/Makefile.am: Update.
14160
68bd3b6b
RA
141612001-08-25 Robert Anisko <robert.anisko@epita.fr>
14162
14163 * lib/hash.c: New file.
14164 * lib/hash.h: New file.
14165 * lib/Makefile.am: Update.
14166
45f8dd1e
AD
141672001-08-15 Akim Demaille <akim@epita.fr>
14168
14169 Version 1.28c.
14170
40a64a7a 141712001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
14172
14173 * src/reader.c (readgram): Indent output macro YYSTYPE.
14174 (packsymbols): Likewise.
14175 (output_token_defines): Likewise.
14176 * src/files.c: Standardize.
14177 (compute_header_macro): New.
14178 (defines_obstack_save): New. Use compute_header_macro.
14179 (output_files): Update. Use defines_obstack_save.
14180
f9a8293a
AD
141812001-08-15 Akim Demaille <akim@epita.fr>
14182
14183 * doc/bison.texinfo (Table of Symbols): Document
14184 YYSTACK_USE_ALLOCA.
14185
150ca7a7
AD
141862001-08-15 Akim Demaille <akim@epita.fr>
14187
14188 * missing: Update from CVS Automake.
14189 * config/config.guess, config/config.sub, config/texinfo.tex:
14190 Update from gnu.org.
14191
69b5cec4
AD
141922001-08-15 Akim Demaille <akim@epita.fr>
14193
14194 * Makefile.maint: Sync with CVS Autoconf.
14195
f2b5126e
PB
141962001-08-14 Pascal Bart <pascal.bart@epita.fr>
14197
69b5cec4 14198 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
14199 `fdl.texi'.
14200 * doc/fdl.texi: Add to package.
14201
4ecbf796
MA
142022001-08-14 Marc Autret <autret_m@epita.fr>
14203
14204 Turn on %{source,header}_extension features.
14205
69b5cec4 14206 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
14207 source_extension.
14208 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 14209 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
14210 between options.
14211
95fb5662
MA
142122001-08-14 Marc Autret <autret_m@epita.fr>
14213
14214 * src/files.c (compute_base_names): Add extensions computing when
14215 `--file-prefix' used.
14216 Standardize function calls.
14217
78d09da9
MA
142182001-08-13 Marc Autret <autret_m@epita.fr>
14219
69b5cec4 14220 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
14221 defining it (defined but null disables alloca).
14222
5a009f2c
MA
142232001-08-13 Marc Autret <autret_m@epita.fr>
14224
14225 * src/bison.simple (_yy_memcpy): CPP reformat.
14226
1e41465a
PB
142272001-08-13 Pascal Bart <pascal.bart@epita.fr>
14228
14229 * tests/atconfig.in (CPPFLAGS): Fix.
14230
c67a198d
PB
142312001-08-10 Pascal Bart <pascal.bart@epita.fr>
14232
79282c6c 14233 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
14234 `gpl.texi'.
14235 * doc/gpl.texi: Add to package.
14236
09a6de7e
MA
142372001-08-10 Marc Autret <autret_m@epita.fr>
14238
14239 * src/print_graph.h: Fix.
14240 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
14241
b77b9ee0
AD
142422001-08-10 Akim Demaille <akim@epita.fr>
14243
14244 * src/system.h: Provide default declarations for stpcpy, strndup,
14245 and strnlen.
14246
3e259915
MA
142472001-08-10 Robert Anisko <anisko_r@epita.fr>
14248
14249 * doc/bison.texinfo (Locations): Update @$ stuff.
14250
ca96bc2d
MA
142512001-08-09 Robert Anisko <anisko_r@epita.fr>
14252
14253 * src/bison.simple (YYLLOC_DEFAULT): Update.
14254 (yyparse): Adjust.
14255
fdc6758b
MA
142562001-08-08 Marc Autret <autret_m@epita.fr>
14257
b77b9ee0 14258 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
14259 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
14260 Reported by Fabrice Bauzac.
957d4dbf 14261
600cad3b
MA
142622001-08-08 Marc Autret <autret_m@epita.fr>
14263
14264 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
14265 * src/vcg.c (output_node): Fix.
14266 * src/vcg.h: Cleanup.
14267 * src/print_graph.c: Add comments.
b77b9ee0 14268 (node_output_size): New global variable. Simplify the formatting of
600cad3b 14269 the VCG graph output.
b77b9ee0 14270 (print_actions): Unused code is now used. It notifies the final state
600cad3b 14271 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 14272 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
14273 blue.
14274 Get the current node name and node_obstack by argument.
14275 (node_obstack): New variable.
14276 (print_state): Manage node_obstack.
14277 (print_core): Use node_obstack given by argument.
14278 A node is not only computed here but in print_actions also.
14279 (print_graph): CPP out useless code instead of commenting it.
14280
976e528f
AD
142812001-08-07 Pascal Bart <pascal.bart@epita.fr>
14282
14283 * tests/atconfig.in (CPPFLAGS): Fix.
14284
20e8e5ca
AD
142852001-08-07 Akim Demaille <akim@epita.fr>
14286
14287 * src/print_graph.c (quote): New.
14288 (print_core): Use it.
14289
957d4dbf 142902001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 14291
3e3da797
AD
14292 * src/vcg.c (complain.h): Include it.
14293 Unepitaize `return' invocations.
c4b66126 14294 [NDEBUG] (main): Remove.
79282c6c 14295 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
14296 * src/files.c (open_files): Initialize graph_obstack.
14297 * src/print_graph.c (print_actions): CPP out useless code.
14298 (print_core): Don't output the last `\n' in labels.
14299 Use `quote'.
14300 * src/files.c (output_files): Output the VCG file.
14301 * src/main.c (main): Invoke print_graph ();
3e3da797 14302
957d4dbf 143032001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
14304
14305 Automaton VCG graph output.
14306 Using option ``-g'' or long option ``--graph'', you can generate
14307 a gram_filename.vcg file containing a VCG description of the LALR (1)
14308 automaton of your grammar.
14309
14310 * src/main.c: Call to print_graph() function.
14311 * src/getargs.h: Update.
14312 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14313 (graph_flag): New flag.
14314 (longopts): Update.
14315 (getargs): Add case `g'.
14316 * src/files.c (graph_obstack): New obstack struct.
14317 (open_files): Initialize new obstack.
14318 (output_files): Saves graph_obstack if required.
14319 * src/files.h (graph_obstack): New extern declaration.
14320 * src/Makefile.am: Add new source files.
14321
927c1557 143222001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
14323
14324 * src/print_graph.c, src/print_graph.h (graph): New.
14325 * src/vcg.h: New file.
14326 * src/vcg.c: New file, VCG graph handling.
14327
7333d403
AD
143282001-08-06 Marc Autret <autret_m@epita.fr>
14329
14330 Add of %source_extension and %header_extension which specify
14331 the source or/and the header output file extension.
14332
14333 * src/files.c (compute_base_names): Remove initialisation of
14334 src_extension and header_extension.
14335 (compute_exts_from_gf): Update.
14336 (compute_exts_from_src): Update.
14337 (output_files): Update.
14338 * src/reader.c (parse_header_extension_decl): New.
14339 (parse_source_extension_decl): New.
14340 (read_declarations): New case statements for the new tokens.
14341 * src/lex.c (percent_table): Add entries for %source_extension
14342 and %header_extension.
14343 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14344
84163231
AD
143452001-08-06 Marc Autret <autret_m@epita.fr>
14346
14347 * configure.in: Bump to 1.28c.
14348 * doc/bison.texinfo: Texinfo thingies.
14349
8303fc42
AD
143502001-08-04 Pascal Bart <pascal.bart@epita.fr>
14351
14352 * tests/atconfig.in (CPPFLAGS): Add.
14353 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14354
70a84437
AD
143552001-08-03 Akim Demaille <akim@epita.fr>
14356
14357 Version 1.28b.
14358
2ce10144
AD
143592001-08-03 Akim Demaille <akim@epita.fr>
14360
14361 * tests/Makefile.am (check-local): Ship testsuite.
14362 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
14363 Include `string.h'.
14364
1e3e4bc1
AD
143652001-08-03 Akim Demaille <akim@epita.fr>
14366
14367 * configure.in: Try using -Wformat when compiling.
14368
42b45b7f
AD
143692001-08-03 Akim Demaille <akim@epita.fr>
14370
14371 * configure.in: Bump to 1.28b.
14372
8f13fe33
AD
143732001-08-03 Akim Demaille <akim@epita.fr>
14374
14375 * src/complain.c: Adjust strerror_r portability issues.
14376
b37ba92c
AD
143772001-08-03 Akim Demaille <akim@epita.fr>
14378
14379 Version 1.28a.
14380
b0ce6046
AD
143812001-08-03 Akim Demaille <akim@epita.fr>
14382
14383 * src/getargs.c, src/getarg.h (skeleton)): Constify.
14384 * src/lex.c (literalchar): Avoid name clashes on `buf'.
14385 * src/getargs.c: Include complain.h.
14386 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
14387 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
14388
d01c415b
AD
143892001-08-03 Akim Demaille <akim@epita.fr>
14390
14391 * src/reader.c (readgram): Display hidden chars in error messages.
14392
459dd1a6
AD
143932001-08-03 Akim Demaille <akim@epita.fr>
14394
14395 Update to gettext 0.10.39.
14396
53b74c0c
AD
143972001-08-03 Akim Demaille <akim@epita.fr>
14398
14399 * lib/strspn.c: New.
14400
234a3be3
AD
144012001-08-01 Marc Autret <autret_m@epita.fr>
14402
14403 * doc/bison.texinfo: Update.
14404 * doc/bison.1 (mandoc): Update.
14405 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
14406 * src/files.c: Support output files extensions computing.
14407 (src_extension): New static variable.
14408 (header_extension): New static variable.
14409 (tr): New function.
14410 (get_extension_index): New function, gets the index of an extension
14411 filename in a string.
14412 (compute_exts_from_gf): New function, computes extensions from the
14413 grammar file extension.
14414 (compute_exts_from_src): New functions, computes extensions from the
14415 C source file extension, file given by ``-o'' option.
14416 (compute_base_names): Update.
14417 (output_files): Update.
14418
847bf1f5
AD
144192001-08-01 Robert Anisko <anisko_r@epita.fr>
14420
d995fee7 14421 * doc/bison.texi: Document @$.
847bf1f5
AD
14422 (Locations): New section.
14423
d074a105
AD
144242001-07-18 Akim Demaille <akim@epita.fr>
14425
14426 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
14427 * config/prev-version.txt, config/move-if-change: New.
14428 * Makefile.am: Adjust.
14429
3419715d
AD
144302001-07-08 Pascal Bart <pascal.bart@epita.fr>
14431
14432 * src/bison.simple (yyparse): Suppress warning `comparaison
14433 between signed and unsigned'.
14434
62ab6972
AD
144352001-07-05 Pascal Bart <pascal.bart@epita.fr>
14436
14437 * src/getargs.h (raw_flag): Remove.
14438 * src/getargs.c: Die on `-r'/`--raw'.
14439 * src/lex.c (parse_percent_token): Die on `%raw'.
14440 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
14441 * tests/calc.at: Suppress test with option `--raw'.
14442
1e24cc5b
AD
144432001-07-14 Akim Demaille <akim@epita.fr>
14444
14445 * config/: New.
14446 * configure.in: Require Autoconf 2.50.
14447 Update to gettext 0.10.38.
14448
32dfccf8
AD
144492001-03-16 Akim Demaille <akim@epita.fr>
14450
14451 * doc/bison.texinfo: ANSIfy the examples.
14452
cd5bd6ac
AD
144532001-03-16 Akim Demaille <akim@epita.fr>
14454
14455 * getargs.c (skeleton): New variable.
14456 (longopts): --skeleton is a new option.
14457 (shortopts, getargs): -S is a new option.
14458 * getargs.h: Declare skeleton.
14459 * output.c (output_parser): Use it.
14460
5141b016
AD
144612001-03-16 Akim Demaille <akim@epita.fr>
14462
14463 * m4/strerror_r.m4: New.
14464 * m4/error.m4: Run AC_FUNC_STRERROR_R.
14465 * lib/error.h, lib/error.c: Update.
14466
447992b9
AD
144672001-03-16 Akim Demaille <akim@epita.fr>
14468
14469 * src/getargs.c (longopts): Clean up.
14470
274d42ce
AD
144712001-02-21 Akim Demaille <akim@epita.fr>
14472
14473 * src/reader.c (gensym): `gensym_count' is your own.
14474 Use a static buf to create the symbol name, as token_buffer is no
14475 longer a buffer.
14476
22c821f3
AD
144772001-02-08 Akim Demaille <akim@epita.fr>
14478
14479 * src/conflicts.c (conflict_report): Be sure not to append to res
14480 between two calls, which could happen if both first sprintf were
14481 skipped, but not the first cp += strlen.
14482
18569462
AD
144832001-02-08 Akim Demaille <akim@epita.fr>
14484
14485 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
14486 New, from fileutils 4.0.37.
14487 * configure.in: Require Autoconf 2.49c. I took some time before
14488 making this decision. This is the only way out for portability
14489 issues in Bison, it would mean way too much duplicate effort to
14490 import in Bison features implemented in 2.49c since 2.13.
14491 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
14492
0d8f3c8a
AD
144932001-02-02 Akim Demaille <akim@epita.fr>
14494
14495 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 14496 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 14497
f17bcd1f
AD
144982001-01-19 Akim Demaille <akim@epita.fr>
14499
14500 Get rid of the ad hoc handling of token_buffer in the scanner: use
14501 the obstacks.
14502
14503 * src/lex.c (token_obstack): New.
14504 (init_lex): Initialize it. No longer call...
14505 (grow_token_buffer): this. Remove it.
14506 Adjust all the places which used it to use the obstack.
14507
511e79b3
AD
145082001-01-19 Akim Demaille <akim@epita.fr>
14509
14510 * src/lex.h: Rename all the tokens:
14511 s/\bENDFILE\b/tok_eof/g;
14512 s/\bIDENTIFIER\b/tok_identifier/g;
14513 etc.
14514 Let them be enums, not #define, to ease debugging.
14515 Adjust all the code.
14516
0d6508ef
AD
145172001-01-18 Akim Demaille <akim@epita.fr>
14518
14519 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
14520 * src/lex.c (maxtoken, grow_token_buffer): Static.
14521
6deb4447
AD
145222001-01-18 Akim Demaille <akim@epita.fr>
14523
14524 Since we now use obstacks, more % directives can be enabled.
14525
14526 * src/lex.c (percent_table): Also accept `%yacc',
14527 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
14528 `%debug'.
14529 Handle the actions for `%semantic_parser' and `%pure_parser' here,
14530 instead of returning a token.
14531 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14532 * src/reader.c (read_declarations): Adjust.
14533 * src/files.c (open_files): Don't call `compute_base_names', don't
14534 compute `attrsfile' since they depend upon data which might be
14535 *in* the input file now.
14536 (output_files): Do it here.
14537 * src/output.c (output_headers): Document the fact that this patch
14538 introduces a guaranteed SEGV for semantic parsers.
14539 * doc/bison.texinfo: Document them.
14540 * tests/suite.at: Exercise these %options.
14541
ff4423cc
AD
145422000-12-20 Akim Demaille <akim@epita.fr>
14543
14544 Also handle the output file (--verbose) with obstacks.
14545
14546 * files.c (foutput): Remove.
14547 (output_obstack): New.
14548 Adjust all dependencies.
14549 * src/conflicts.c: Return a string.
14550 * src/system.h (obstack_grow_string): Rename as...
14551 (obstack_sgrow): this. Be ready to work with non literals.
14552 (obstack_fgrow4): New.
14553
956dba3a
AD
145542000-12-20 Akim Demaille <akim@epita.fr>
14555
14556 * src/files.c (open_files): Fix the computation of short_base_name
14557 in the case of `-o foo.tab.c'.
14558
337bab46
AD
145592000-12-20 Akim Demaille <akim@epita.fr>
14560
14561 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14562 (copy_dollar): Now that everything uses obstacks, get rid of the
14563 FILE * parameters.
14564
5d3214b8
AD
145652000-12-20 Akim Demaille <akim@epita.fr>
14566
14567 * src/files.c (open_files): Actually the `.output' file is based
14568 on the short_base_name, not base_name.
14569 * tests/suite.at (Checking output file names): Adjust.
14570
29092a57
AD
145712000-12-20 Akim Demaille <akim@epita.fr>
14572
14573 * src/bison.s1: Remove, we now use directly...
14574 * src/bison.simple: this.
14575 * src/Makefile.am: Use pkgdata instead of data.
14576
ea5607fd
AD
145772000-12-20 Akim Demaille <akim@epita.fr>
14578
14579 * src/files.c (guard_obstack): New.
14580 (open_files): Initialize it.
14581 (output_files): Dump it...
14582 * src/files.h: Export it.
14583 * src/reader.c (copy_guard): Use it.
14584
27110317
AD
145852000-12-19 Akim Demaille <akim@epita.fr>
14586
14587 * src/files.c (outfile, defsfile, actfile): Removed as global
14588 vars.
14589 (open_files): Don't compute them.
14590 (output_files): Adjust.
14591 (base_name, short_base_name): Be global.
14592 Adjust dependencies.
14593
19c50364
AD
145942000-12-19 Akim Demaille <akim@epita.fr>
14595
14596 * src/files.c (strsuffix): New.
14597 (stringappend): Be just like strcat but allocate.
14598 (base_names): Eve out from open_files.
14599 Try to simplify the rather hairy computation of base_name and
14600 short_base_name.
14601 (open_files): Use it.
14602 * tests/suite.at (Checking output file names): New test.
14603
573c1d9f
AD
146042000-12-19 Akim Demaille <akim@epita.fr>
14605
14606 * src/system.h (obstack_grow_literal_string): Rename as...
14607 (obstack_grow_string): this.
14608 * src/output.c (output_parser): Recognize `%% actions' instead of
14609 `$'.
14610 * src/bison.s1: s/$/%% actions/.
14611 * src/bison.hairy: Likewise.
14612
ef7ddedd
AD
146132000-12-19 Akim Demaille <akim@epita.fr>
14614
14615 * src/output.c (output_parser): Compute the `#line' lines when
14616 there are.
14617 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
14618 Suggested by Hans Aberg.
14619
ff61dabd
AD
146202000-12-19 Akim Demaille <akim@epita.fr>
14621
14622 Let the handling of the skeleton files be local to the procedures
14623 that use it.
14624
14625 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
14626 longer static.
14627 (fparser, open_extra_files): Remove.
14628 (open_files, output_files): Don't take care of fparser.
14629 * src/files.h: Adjust.
14630 * src/output.c (output_parser): Open and close the file to the
14631 skeleton.
14632 * src/reader.c (read_declarations): When %semantic_parser, open
14633 fguard.
14634
55b96341
AD
146352000-12-19 Akim Demaille <akim@epita.fr>
14636
14637 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
14638 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
14639
358c15b7
AD
146402000-12-19 Akim Demaille <akim@epita.fr>
14641
14642 * src/files.c (open_files): Yipee! We no longer need all the code
14643 looking for `/tmp' since we have no tmp file.
14644
7de3329e
AD
146452000-12-19 Akim Demaille <akim@epita.fr>
14646
14647 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
14648 New macros.
14649 * src/files.c (open_files): Less dependency on MSDOS etc.
14650
3abcd459
AD
146512000-12-14 Akim Demaille <akim@epita.fr>
14652
14653 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
14654 Provide a default definition.
14655 Use it when executing the default @ action.
14656 * src/reader.c (reader_output_yylsp): No longer include
14657 `timestamp' and `text' in the default YYLTYPE.
14658
2a91a95e
AD
146592000-12-12 Akim Demaille <akim@epita.fr>
14660
14661 * src/reader.c (copy_definition, parse_union_decl, copy_action)
14662 (copy_guard): Quote the file names.
14663 Reported by Laurent Mascherpa.
14664
14d3eb9b
AD
146652000-12-12 Akim Demaille <akim@epita.fr>
14666
14667 * src/output.c (output_headers, output_program, output): Be sure
14668 to escape special characters when outputting filenames.
14669 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
14670 (output_headers): Don't depend on them, Use ACTSTR.
14671
d7045ec6
AD
146722000-11-17 Akim Demaille <akim@epita.fr>
14673
14674 * lib/obstack.h: Formatting changes.
14675 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
14676 prevents type checking.
14677 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
14678 cast the value to (void *): assigning a `foo *' to a `void *'
14679 variable is valid.
14680 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
14681 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
14682 append characters.
14683
6fd54b73
AD
146842000-11-17 Akim Demaille <akim@epita.fr>
14685
14686 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
14687 as...
14688 (suite.m4, regression.m4, calc.m4): these.
14689 * tests/atgeneral.m4: Update from CVS Autoconf.
14690
4c50eae6
AD
146912000-11-17 Akim Demaille <akim@epita.fr>
14692
14693 * tests/regression.m4 (%union and --defines): New test,
14694 demonstrating a current bug in the obstack implementation.
14695
a35f64ea
AD
146962000-11-17 Akim Demaille <akim@epita.fr>
14697
14698 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
14699 macros.
14700 Use them to declare the variables which are global or local to
14701 `yyparse'.
14702
7de23534
AD
147032000-11-17 Akim Demaille <akim@epita.fr>
14704
14705 * acconfig.h: Remove, no longer used.
14706
aa7815f5
AD
147072000-11-07 Akim Demaille <akim@epita.fr>
14708
14709 * src: s/Copyright (C)/Copyright/g.
14710
5af1f549
AD
147112000-11-07 Akim Demaille <akim@epita.fr>
14712
14713 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
14714 defining.
14715 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
14716
553e2b22
AD
147172000-11-07 Akim Demaille <akim@epita.fr>
14718
14719 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
14720 Merge in a single CPP if/else.
14721
8a4f41d6
AD
147222000-11-07 Akim Demaille <akim@epita.fr>
14723
14724 * src/output.c (output): Remove useless variables.
14725 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
14726 argument `data' for consistency with the prototypes.
14727 Qualify it `const'.
14728 (obstack_copy, obstack_copy0): Rename the second argument as
14729 `address' for consistency. Qualify it `const'.
14730 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
14731 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
14732 `const' their input argument (`data' or `address').
14733 Adjust the corresponding macros to include `const' in casts.
14734
095a3fb5
AD
147352000-11-03 Akim Demaille <akim@epita.fr>
14736
14737 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
14738 s/PFILE1/BISON_HAIRY/.
14739 Adjust dependencies.
14740
d1cdce7c
AD
147412000-11-03 Akim Demaille <akim@epita.fr>
14742
090c5ebf 14743 For some reason, this was not applied.
d1cdce7c
AD
14744
14745 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14746 `unlink': it's no longer used.
14747
9311529b
AD
147482000-11-03 Akim Demaille <akim@epita.fr>
14749
14750 * src/files.c (skeleton_find): New function, eved out of...
14751 (open_files, open_extra_files): here.
14752
d8880f69
AD
147532000-11-03 Akim Demaille <akim@epita.fr>
14754
14755 Don't use `atexit'.
14756
14757 * src/files.c (obstack_save): New function.
14758 (done): Rename as...
14759 (output_files): this.
14760 Use `obstack_save'.
14761 * src/main.c (main): Don't use `atexit' to register `done', since
14762 it no longer has to remove tmp files, just call `output_files'
14763 when there are no errors.
14764
0dbb648e
AD
147652000-11-02 Akim Demaille <akim@epita.fr>
14766
14767 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14768 `unlink': it's no longer used.
14769 * src/files.h: Formatting changes.
14770
896fe5c1
AD
147712000-11-02 Akim Demaille <akim@epita.fr>
14772
14773 Remove the last uses of mktemp and unlink/delete.
14774
14775 * src/files.c (fdefines, ftable): Removed.
14776 (defines_ostack, table_obstack): New.
14777 Adjust dependencies of the former into uses of the latter.
14778 * src/output.c (output_short_or_char_table, output_short_table):
14779 Convert to using obstacks.
14780 * src/reader.c (copy_comment2): Accept one FILE * and two
14781 obstacks.
14782 (output_token_defines, reader_output_yylsp): Use obstacks.
14783 * src/system.h (obstack_fgrow3): New.
1f65350a 14784 * po/POTFILES.in: Adjust.
896fe5c1 14785
dd60faec
AD
147862000-11-01 Akim Demaille <akim@epita.fr>
14787
14788 Change each use of `fattrs' into a use of `attrs_obstack'.
14789
14790 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
14791 * src/files.c (fattrs): Remove.
14792 (attrs_obstack): New.
14793 Adjust all dependencies.
14794 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
14795
8c7ebe49
AD
147962000-11-01 Akim Demaille <akim@epita.fr>
14797
14798 Introduce obstacks.
14799 Change each use of `faction' into a use of `action_obstack'.
14800
14801 * lib/obstack.h, lib/obstack.c: New files.
14802 * src/files.c (faction): Remove.
14803 (action_obstack): New.
14804 Adjust all dependencies.
14805
77aee789
AD
148062000-10-20 Akim Demaille <akim@epita.fr>
14807
14808 * lib/quote.h (PARAMS): New macro. Use it.
14809
43591cec
AD
148102000-10-16 Akim Demaille <akim@epita.fr>
14811
14812 * src/output.c (output_short_or_char_table): New function.
14813 (output_short_table, output_token_translations): Use it.
14814 (goto_actions): Use output_short_table.
14815
1e9798d5
AD
148162000-10-16 Akim Demaille <akim@epita.fr>
14817
14818 * src/symtab.c (bucket_new): New function.
14819 (getsym): Use it.
14820
14821 * src/output.c (output_short_table): New argument to display the
14822 comment associated with the table.
14823 Adjust dependencies.
14824 (output_gram): Use it.
14825 (output_rule_data): Nicer output layout for YYTNAME.
14826
f282676b
AD
148272000-10-16 Akim Demaille <akim@epita.fr>
14828
14829 * src/lex.c (read_typename): New function.
14830 (lex): Use it.
14831 * src/reader.c (copy_dollar): Likewise.
14832
550a72a3
AD
148332000-10-16 Akim Demaille <akim@epita.fr>
14834
14835 * src/reader.c (copy_comment2): Expect the input stream to be on
14836 the `/' which is suspected to open a comment, instead of being
14837 called after `//' or `/*' was read.
14838 (copy_comment, copy_definition, parse_union_decl, copy_action)
14839 (copy_guard): Adjust.
14840
131e2fef
AD
148412000-10-16 Akim Demaille <akim@epita.fr>
14842
14843 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
14844 `read_signed_integer'.
14845
79282c5a
AD
148462000-10-16 Akim Demaille <akim@epita.fr>
14847
14848 * src/reader.c (copy_dollar): New function.
14849 (copy_guard, copy_action): Use it.
14850
ff4a34be
AD
148512000-10-16 Akim Demaille <akim@epita.fr>
14852
14853 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
14854 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
14855 New files, from Fileutils 4.0.27.
14856 * src/main.c (printable_version): Remove.
14857 * src/lex.c, src/reader.c: Use `quote'.
14858
148592000-10-04 Akim Demaille <akim@epita.fr>
14860
14861 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
14862
14ded682
AD
148632000-10-04 Akim Demaille <akim@epita.fr>
14864
14865 * doc/bison.texinfo: Various typos spotted by Neil Booth.
14866
8e03724b
AD
148672000-10-04 Akim Demaille <akim@epita.fr>
14868
14869 When a literal string is used to define two different tokens,
14870 `bison -v' segfaults.
14871 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
14872
14873 * tests/regression.m4: New file.
14874 Include the core of the sample provided by Piotr Gackiewicz.
14875 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
14876 properly.
14877
a9e64249
AD
148782000-10-04 Akim Demaille <akim@epita.fr>
14879
14880 * src/reader.c (parse_expect_decl): Keep `count' within the size
14881 of `buffer'.
14882 From Neil Booth.
14883
da9abf43
AD
148842000-10-02 Paul Eggert <eggert@twinsun.com>
14885
14886 * bison.s1 (yyparse): Assign the default value
14887 unconditionally, to avoid a GCC warning and make the parser a
14888 tad smaller.
14889
c33638bb
AD
148902000-10-02 Akim Demaille <akim@epita.fr>
14891
14892 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
14893 options.
14894
444c570a
AD
148952000-10-02 Akim Demaille <akim@epita.fr>
14896
14897 * src/derives.c, src/print.c, src/reduce.c: To ease the
14898 translation, move some `\n' out of the translated strings.
14899
89cab50d
AD
149002000-10-02 Akim Demaille <akim@epita.fr>
14901
14902 The location tracking mechanism is precious for parse error
14903 messages. Nevertheless, it is enabled only when `@n' is used in
14904 the grammar, which is a different issue (you can use it in error
14905 message, but not in the grammar per se). Therefore, there should
14906 be another means to enable it.
14907
14908 * src/getargs.c (getargs): Support `--locations'.
14909 (usage): Report it.
14910 * src/getargs.h (locationsflag): Export it.
14911 * src/lex.c (percent_table): Support `%locations'.
14912 * src/reader.c (yylsp_needed): Remove this variable, now replaced
14913 with `locationsflag'.
14914 * doc/bison.texinfo: Document `--locations' and `%locations'.
14915 Sort the options.
14916 * tests/calc.m4: Test it.
14917
14918 For regularity of the names, replace each
14919 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
14920 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
14921 In addition replace each `flag' with `_flag'.
14922
d6c2cba0
AD
149232000-10-02 Akim Demaille <akim@epita.fr>
14924
14925 Also test parse error messages, including with YYERROR_VERBOSE.
14926
14927 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
14928 associative).
14929 Use it to check the computations.
14930 Use it to check `nonassoc' is honored.
14931 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
14932 `--yyerror-verbose'.
14933 (_AT_CHECK_CALC): Adjust to this option.
14934 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
14935
5a35a6cb
AD
149362000-10-02 Akim Demaille <akim@epita.fr>
14937
14938 Test also `--verbose', `--defines' and `--name-prefix'. Testing
14939 the latter demonstrates a flaw in the handling of non debugging
14940 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
14941 was used in order to simplify:
14942
14943 #if YYDEBUG
14944 if (yydebug)
14945 {
14946 ...
14947 }
14948 #endif
14949
14950 into
14951
14952 if (yydebug)
14953 {
14954 ...
14955 }
14956
14957 unfortunately this leads to a CPP conflict when
14958 `--name-prefix=foo' is used since it produces `#define yydebug
14959 foodebug'.
14960
14961 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
14962 (YYDPRINTF): New macro.
14963 Spread its use.
14964 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
14965 the bison options.
14966 Also test `--verbose', `--defines' and `--name-prefix'.
14967
71da9eea
AD
149682000-10-02 Akim Demaille <akim@epita.fr>
14969
14970 Improve the readability of the produced parsers.
14971
14972 * src/bison.s1: Formatting changes.
14973 Improve the comment related to the `$' mark.
14974 (yydefault): Don't fall through to `yyresume': `goto' there.
14975 * src/output.c (output_parser): When the `$' is met, skip the end
14976 of its line.
14977 New variable, `number_of_dollar_signs', to check there's exactly
14978 one `$' in the parser skeleton.
14979
95e36146
AD
149802000-10-02 Akim Demaille <akim@epita.fr>
14981
14982 * lib/xstrdup.c: New file, from the fileutils.
14983 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
14984 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
14985 instead of strlen + xmalloc + strcpy.
14986 * src/symtab.c (copys): Remove, use xstrdup instead.
14987
d7020c20
AD
149882000-10-02 Akim Demaille <akim@epita.fr>
14989
14990 * src/gram.h (associativity): New enum type which replaces the
14991 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
14992 `right_assoc', `left_assoc' and `non_assoc'.
14993 Adjust all dependencies.
14994 * src/reader.c: Formatting changes.
14995 (LTYPESTR): Don't define it, use it as a literal in
14996 `reader_output_yylsp'.
14997 * src/symtab.h (symbol_class): New enum type which replaces the
14998 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
14999 `sunknown', `stoken and `snterm'.
15000
1916f98e
AD
150012000-10-02 Akim Demaille <akim@epita.fr>
15002
15003 * src/getargs.c (fixed_outfiles): Rename as...
15004 (yaccflag): for consistency and accuracy.
15005 Adjust dependencies.
15006
d7913476
AD
150072000-10-02 Akim Demaille <akim@epita.fr>
15008
15009 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
15010 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
15011 difficult and introduced a lot of core dump. It turns out that
15012 Bison used an implementation of `xmalloc' based on `calloc', and
15013 at various places it does depend upon the initialization to 0. I
15014 have not tried to isolate the pertinent places, and all the former
15015 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
15016 someone should address this issue.
15017
15018 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
15019 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
15020 files.
15021 Adjust dependencies.
15022 * src/warshall.h: New file.
15023 Propagate.
15024
340ef489
AD
150252000-10-02 Akim Demaille <akim@epita.fr>
15026
15027 Various anti-`extern in *.c' changes.
15028
15029 * src/system.h: Include `assert.h'.
15030
b2ca4022
AD
150312000-10-02 Akim Demaille <akim@epita.fr>
15032
15033 * src/state.h (nstates, final_state, first_state, first_shift)
15034 (first_reduction): Move their exportation from here...
15035 * src/LR0.h: to here.
15036 Adjust dependencies.
15037 * src/getargs.c (statisticsflag): New variable.
15038 Add support for `--statistics'.
15039 Adjust dependencies.
15040
15041 Remove a lot of now useless `extern' statements in most files.
15042
403b315b
AD
150432000-10-02 Akim Demaille <akim@epita.fr>
15044
15045 * src/LR0.h: New file.
15046 Propagate its use.
15047
07a58c13
AD
150482000-10-02 Akim Demaille <akim@epita.fr>
15049
15050 * src/print.h: New file.
15051 Propagate its use.
15052 * src/print.c: Formatting and ordering changes.
15053 (verbose, terse): Replace with...
15054 (print_results): this new function.
15055 Adjust dependencies.
15056
0619caf0
AD
150572000-10-02 Akim Demaille <akim@epita.fr>
15058
15059 * src/conflicts.c (conflict_report): New function.
15060 (conflict_log, verbose_conflict_log): Replace with...
15061 (print_conflicts): this function.
15062 Adjust dependencies.
15063 * src/conflicts.h: New file.
15064 Propagate its inclusion.
15065
3519ec76
AD
150662000-10-02 Akim Demaille <akim@epita.fr>
15067
15068 * src/nullable.h: New file.
15069 Propagate its inclusion.
15070 * src/nullable.c: Formatting changes.
15071
015acc48
AD
150722000-10-02 Akim Demaille <akim@epita.fr>
15073
15074 * src/reduce.h: New file.
15075 Propagate its inclusion.
15076 * src/reduce.c: Topological sort and other formatting changes.
15077 (bool, TRUE, FALSE): Move their definition to...
15078 * src/system.h: here.
15079
8963a27b
AD
150802000-10-02 Akim Demaille <akim@epita.fr>
15081
15082 * src/files.c: Formatting changes.
15083 (tryopen, tryclose, openfiles): Rename as...
15084 (xfopen, xfclose, open_files): this.
15085 (stringappend): static.
15086 * src/files.h: Complete the list of exported symbols.
15087 Propagate its use.
15088
a70083a3
AD
150892000-10-02 Akim Demaille <akim@epita.fr>
15090
15091 * src/reader.h: New file.
15092 Propagate its use instead of tedious list of `extern' and
15093 prototypes.
15094 * src/reader.c: Formatting changes, topological sort,
15095 s/register//.
15096
abadc117
AD
150972000-10-02 Akim Demaille <akim@epita.fr>
15098
15099 * src/lex.h: Prototype `lex.c' exported functions.
15100 * src/reader.c: Adjust.
15101 * src/lex.c: Formatting changes.
15102 (safegetc): Rename as...
15103 (xgetc): this.
15104
720d742f
AD
151052000-10-02 Akim Demaille <akim@epita.fr>
15106
15107 * src/lalr.h: New file.
15108 Propagate its inclusion instead of prototypes and `extern'.
15109 * src/lalr.c: Formatting changes, topological sorting etc.
15110
f2acea59
AD
151112000-10-02 Akim Demaille <akim@epita.fr>
15112
15113 * src/output.c (token_actions): Introduce a temporary array,
15114 YYDEFACT, that makes it possible for this function to use
15115 output_short_table.
15116
d019d655
AD
151172000-10-02 Akim Demaille <akim@epita.fr>
15118
15119 `user_toknums' is output as a `short[]' in `output.c', while it is
15120 defined as a `int[]' in `reader.c'. For consistency with the
15121 other output tables, `user_toknums' is now defined as a table of
15122 shorts.
15123
15124 * src/reader.c (user_toknums): Be a short table instead of an int
15125 table.
15126 Adjust dependencies.
15127
15128 Factor the short table outputs.
15129
15130 * src/output.c (output_short_table): New function.
15131 * src/output.c (output_gram, output_stos, output_rule_data)
15132 (output_base, output_table, output_check): Use it.
15133
6c89f1c1
AD
151342000-10-02 Akim Demaille <akim@epita.fr>
15135
15136 * src/output.c (output): Topological sort of the functions, in
15137 order to get rid of the `static' prototypes.
15138 No longer use `register'.
15139 * src/output.h: New file.
15140 Propagate its inclusion in files explicitly prototyping functions
15141 from output.c.
15142
d9efd181
AD
151432000-09-21 Akim Demaille <akim@epita.fr>
15144
15145 * src/atgeneral.m4: Update from Autoconf.
15146
c29240e7 151472000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
15148
15149 * src/closure.h: New file.
15150 * src/closure.c: Formatting changes, topological sort over the
15151 functions, use of closure.h.
15152 (initialize_closure, finalize_closure): Rename as...
15153 (new_closure, free_closure): these. Adjust dependencies.
15154 * src/LR0.c: Formatting changes, topological sort, use of
15155 cloture.h.
15156 (initialize_states): Rename as...
15157 (new_states): this.
15158 * src/Makefile.am (noinst_HEADERS): Adjust.
15159
499daa50
AD
151602000-09-20 Akim Demaille <akim@epita.fr>
15161
15162 * src/acconfig.h: Don't protect config.h against multiple
15163 inclusion.
15164 Don't define PARAMS.
15165 * src/system.h: Define PARAMS.
15166 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
15167 purpose of config.h. system.h must not try to fix wrong
15168 definitions in config.h.
15169
cc84fd5d
AD
151702000-09-20 Akim Demaille <akim@epita.fr>
15171
15172 * src/derives.h: New file.
15173 * src/main.c, src/derives.h: Use it.
15174 Formatting changes.
15175 * src/Makefile.am (noinst_HEADERS): Adjust.
15176
db5b3a89
AD
151772000-09-20 Akim Demaille <akim@epita.fr>
15178
15179 * tests/atgeneral.m4: Update from Autoconf.
15180 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
15181 (AT_CHECK_CALC): New macros.
15182 Use these macros to test bison with options `', `--raw',
15183 `--debug', `--yacc', `--yacc --debug'.
15184
ceed8467
AD
151852000-09-19 Akim Demaille <akim@epita.fr>
15186
15187 * src/output.c: Formatting changes.
15188 * src/machine.h: Remove, leaving its contents in...
15189 * src/system.h: here.
15190 Include stdio.h.
15191 Adjust all dependencies on stdio.h and machine.h.
15192 * src/getargs.h: New file.
15193 Let all `extern' declarations about getargs.c be replaced with
15194 inclusion of `getargs.h'.
15195 * src/Makefile.am (noinst_HEADERS): Adjust.
15196
15197 * tests/calc.m4 (yyin): Be initialized in main, not on the global
15198 scope.
15199 (yyerror): Returns void, not int.
15200 * doc/bison.texinfo: Formatting changes.
15201
05a1d24b
AD
152022000-09-19 Akim Demaille <akim@epita.fr>
15203
15204 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
15205 portable.
15206
cbd25751
AD
152072000-09-18 Akim Demaille <akim@epita.fr>
15208
15209 * configure.in: Append WARNING_CFLAGS to CFLAGS.
15210 * src/Makefile.am (INCLUDES): Don't.
15211 Be ready to fetch headers in lib/.
15212
13863333
AD
152132000-09-18 Akim Demaille <akim@epita.fr>
15214
15215 * doc/bison.texinfo: Update the copyright.
15216 ANSIfy and GNUify the examples.
15217 Remove the old menu.
15218
0d533154
AD
152192000-09-18 Akim Demaille <akim@epita.fr>
15220
15221 First set of tests: use the `calc' example from the documentation.
15222
15223 * src/bison.s1 (yyparse): Condition the code using `yytname' which
15224 is defined only when YYDEBUG is.
15225 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
15226 * src/files.c (tryopen, tryclose): Formatting changes.
15227 Move to the top and be static.
15228 * src/reader.c (read_signed_integer): Likewise.
15229 * tests/calc.m4: New file.
15230 * Makefile.am, suite.m4: Adjust.
15231 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
15232
e79137ac
AD
152332000-09-18 Akim Demaille <akim@epita.fr>
15234
15235 Add support for an Autotest test suite for Bison.
15236
15237 * m4/m4.m4, m4/atconfig.m4: New files.
15238 * m4/Makefile.am (EXTRA_DIST): Adjust.
15239 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
15240 files.
15241 * src/getargs.c: Display a more standard --version message.
15242 * src/reader.c (reader): Formatting changes.
15243 No longer depend upon VERSION_STRING.
15244 * configure.in: No longer use `dnl'.
15245 Set up the test suite and the new directory `tests/.
15246 (VERSION_STRING): Remove.
15247
27821bff
AD
152482000-04-14 Akim Demaille <akim@epita.fr>
15249
15250 * src/reader.c (copy_comment2): New function, same as former
15251 `copy_comment', but outputs into two FILE *.
15252 (copy_comment): Use it.
15253 (parse_union_decl): Use it.
15254 (get_type, parse_start_decl): Use the same `invalid' message.
15255 (parse_start_decl, parse_union_decl): Use the same `multiple'
15256 message.
15257 (parse_union_decl, copy_guard, copy_action): Use the same
15258 `unmatched' message.
15259 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
15260
cfe5fbc0
AD
152612000-03-31 Akim Demaille <akim@epita.fr>
15262
15263 * src/files.c (tryopen, tryclose): Move to the top.
15264 Be static.
15265
cb7db13e
AD
152662000-03-31 Akim Demaille <akim@epita.fr>
15267
15268 * src/main.c (main): Don't call `done', exit does it.
15269
a0f6b076
AD
152702000-03-31 Akim Demaille <akim@epita.fr>
15271
36281465
AD
15272 * allocate.c: s/return (foo)/return foo/.
15273 * lalr.c: Likewise.
15274 * LR0.c: Likewise.
15275 * output.c: Likewise.
15276 * reader.c: Likewise.
15277 * symtab.c: Likewise.
15278 * vmsgetargs.c: Likewise.
15279
152802000-03-31 Akim Demaille <akim@epita.fr>
15281
15282 Clean up the error reporting functions.
a0f6b076
AD
15283
15284 * src/report.c: New file.
15285 * src/report.h: Likewise.
15286 * src/Makefile.am: Adjust.
15287 * m4/error.m4: New file.
15288 * m4/Makefile.am: Adjust.
15289 * configure.in (jm_PREREQ_ERROR): Call it.
15290 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
15291 Remove.
15292 (fatal, fatals): Remove. All callers use complain.c::fatal.
15293 (warn, warni, warns, warnss, warnss): Remove. All callers use
15294 complain.c::complain.
15295 (toomany): Remove, use fatal instead.
15296 * src/files.c (done): No argument, use complain_message_count.
15297 * src/main.c (main): Register `done' to `atexit'.
15298
15299 * src/getargs.c (usage): More `fputs', less `fprintf'.
15300
18539825
AD
153012000-03-28 Akim Demaille <akim@epita.fr>
15302
15303 * lib/: New directory.
15304 * Makefile.am (SUBDIRS): Adjust.
15305 * configure.in: Adjust.
15306 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15307 useless.
15308 * src/alloca.c: Moved to lib/.
15309 * src/getopt.c: Likewise.
15310 * src/getopt1.c: Likewise.
15311 * src/getopt.h: Likewise.
15312 * src/ansi2knr.c: Likewise.
15313 * src/ansi2knr.1: Likewise.
15314 * src/Makefile.am: Adjust.
15315 * lib/Makefile.am: New file.
15316
9f306f2a
AD
153172000-03-28 Akim Demaille <akim@epita.fr>
15318
15319 * src/getargs.c (usage): Refresh the help message.
15320
0ba347b6
AD
153212000-03-17 Akim Demaille <akim@epita.fr>
15322
15323 * src/getopt1.c: Updated from textutils 2.0e
15324 * src/getopt.c: Likewise.
15325 * src/getopt.h: Likewise.
15326
dbe7f271
AD
153272000-03-17 Akim Demaille <akim@epita.fr>
15328
15329 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15330 the file name, not the whole `#line LINE FILE'.
15331
75bbe78d
AD
153322000-03-17 Akim Demaille <akim@epita.fr>
15333
15334 On syntax errors, report the token on which we choked.
15335
aa5fd0ee
AD
15336 * src/bison.s1 (yyparse): In the label yyerrlab, when
15337 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 15338
7b306f52
AD
153392000-03-17 Akim Demaille <akim@epita.fr>
15340
aa5fd0ee 15341 * src/reader.c (copy_at): New function.
7b306f52
AD
15342 (copy_guard): Use it.
15343 (copy_action): Use it.
15344
e87b5700
AD
153452000-03-17 Akim Demaille <akim@epita.fr>
15346
15347 Be kind to translators, save some useless translations.
15348
aa5fd0ee 15349 * src/main.c (banner): New function.
e87b5700
AD
15350 (fatal_banner): Use it.
15351 (warn_banner): Use it.
15352
ae3c3164
AD
153532000-03-17 Akim Demaille <akim@epita.fr>
15354
aa5fd0ee
AD
15355 * src/reader.c (copy_definition): Use copy_string and
15356 copy_comment. Removed now unused `match', `ended',
15357 `cplus_comment'.
ae3c3164
AD
15358 (copy_comment, copy_string): Moved, to be visible from
15359 copy_definition.
15360
4dc58e7c
AD
153612000-03-17 Akim Demaille <akim@epita.fr>
15362
aa5fd0ee
AD
15363 * src/reader.c (copy_string): Declare `static inline'. No
15364 problems with inline, since it is checked by configure.
4dc58e7c
AD
15365 (copy_comment): Likewise.
15366
0a6384c4
AD
153672000-03-17 Akim Demaille <akim@epita.fr>
15368
aa5fd0ee 15369 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 15370
3cef001a
AD
153712000-03-17 Akim Demaille <akim@epita.fr>
15372
aa5fd0ee 15373 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
15374 (copy_action): Use it. Removed now unused `match', `ended',
15375 `cplus_comment'.
15376 (copy_guard): Likewise.
15377
ca36d2ef
AD
153782000-03-17 Akim Demaille <akim@epita.fr>
15379
aa5fd0ee 15380 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
15381 (copy_action): Use it.
15382 (copy_guard): Likewise.
15383
6666f98f
AD
153842000-03-17 Akim Demaille <akim@epita.fr>
15385
15386 Change the handling of @s so that they behave exactly like $s.
15387 There is now a pseudo variable @$ (readble and writable), location
15388 of the lhs of the rule (by default ranging from the location of
15389 the first symbol of the rhs, to the location of the last symbol,
15390 or, if the rhs is empty, YYLLOC).
15391
15392 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
15393 yyval.
15394 (yyparse): When providing a default semantic action, provide a
15395 default location action.
15396 (after the $): No longer change `*YYLSP', just stack YYLOC the
15397 same way you stack YYVAL.
15398 * src/reader.c (read_declarations): Use warns.
15399 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
15400 (copy_action, case '@'): Likewise.
15401 Use a standard error message, to save useless work from
15402 translators.
15403
41aca2e0
AD
154042000-03-17 Akim Demaille <akim@epita.fr>
15405
aa5fd0ee
AD
15406 * src/bison.s1: Formatting and cosmetics changes.
15407 * src/reader.c: Likewise.
41aca2e0
AD
15408 Update the Copyright notice.
15409
dc08c1d5
AD
154102000-03-17 Akim Demaille <akim@epita.fr>
15411
aa5fd0ee
AD
15412 * src/bison.s1 (#line): All set to `#line' only, since the
15413 Makefile now handles them.
dc08c1d5 15414
9ee3c97b
AD
154152000-03-16 Akim Demaille <akim@epita.fr>
15416
15417 * src/output.c (output_rule_data): Output the documentation of
15418 some of the tables.
15419 (Copyright notice): Update.
15420 Formatting changes.
15421
0de741ca
AD
154222000-03-16 Akim Demaille <akim@epita.fr>
15423
15424 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
15425 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
15426 One `#if YYDEBUG' remains, since it uses variables which are
15427 defined only if `YYDEBUG != 0'.
15428
bb10be54
AD
154292000-03-16 Akim Demaille <akim@epita.fr>
15430
15431 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
15432 and related variables so that the similarities are highlighted.
15433
b07b484a
AD
154342000-03-16 Akim Demaille <akim@epita.fr>
15435
15436 * src/bison.s1: Properly indent CPP directives.
15437
361f60b3
AD
154382000-03-16 Akim Demaille <akim@epita.fr>
15439
15440 * src/bison.s1: Properly indent the `alloca' CPP section.
15441
8c44d3ec
AD
154422000-03-16 Akim Demaille <akim@epita.fr>
15443
15444 Do not hard code values of directories in `configure.in'.
15445 Update the `configure' tool chain.
15446
15447 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
15448 src/makefile.am.
15449 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
15450 (AC_OUTPUT): Add m4/Makefile.
15451 Bump to bison 1.28a, 1.29 has never been released.
15452 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
15453 handled via src/Makefile.am.
15454 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
15455 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
15456 autoheader.
15457 * Makefile.am (SUBDIRS): Add m4.
15458 (ACLOCAL_AM_FLAGS): New variable.
15459 (AUTOMAKE_OPTIONS): Add check-news.
15460 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
15461 the proper line number and file name.
15462 (DEFS): Propagate the location of bison library files and of the
15463 locale files.
15464 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
15465 builddir.
15466 * acinclude.m4: Remove, replaced by the directory m4.
15467 * m4/Makefile.am (EXTRA_DIST): New variable.
15468 * m4/gettext.m4: New file, from the fileutils.
15469 * m4/lcmessage.m4: Likewise
15470 * m4/progtest.m4: Likewise.
15471 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
15472
f95997e7
AD
154732000-03-10 Akim Demaille <akim@epita.fr>
15474
15475 * src/closure.c:
15476 Formatting changes of various comments.
15477 Respect the GNU coding standards at various places.
15478 Don't use `_()' when no translation is needed.
15479
154801999-12-13 Jesse Thilo <jthilo@gnu.org>
15481
15482 * src/files.c:
15483 OS/2 honors TMPDIR environment variable.
15484
154851999-12-13 Jesse Thilo <jthilo@gnu.org>
15486
15487 * doc/bison.texinfo: Tweaked spelling and grammar.
15488 Updated ISBN.
15489 Removed reference to price of printed copy.
15490 Mention BISON_SIMPLE and BISON_HAIRY.
15491
154921999-12-13 Jesse Thilo <jthilo@gnu.org>
15493
15494 * configure.in, NEWS:
15495 Bison 1.29 released.
15496
154971999-10-27 Jesse Thilo <jthilo@gnu.org>
15498
15499 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
15500 Added reference card.
15501
155021999-07-26 Jesse Thilo <jthilo@gnu.org>
15503
15504 * po/ru.po: Added Russian translation.
15505
155061999-07-26 Jesse Thilo <jthilo@gnu.org>
15507
15508 * configure.in: Added Russian translation.
15509
155101999-07-06 Jesse Thilo <jthilo@gnu.org>
15511
15512 * configure.in, NEWS, README:
15513 Released version 1.28.
15514
155151999-06-14 Jesse Thilo <jthilo@gnu.org>
15516
15517 * src/system.h:
15518 Squashed redefinition warning on some systems.
15519
15520 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
15521 Have configure build version string instead of relying on ANSI string
15522 concatentation.
15523
155241999-06-14 Jesse Thilo <jthilo@gnu.org>
15525
15526 * po/POTFILES.in: Got rid of version.c.
15527
155281999-06-14 Jesse Thilo <jthilo@gnu.org>
15529
15530 * acconfig.h, configure.in:
15531 Have configure build version string instead of relying on ANSI string
15532 concatentation.
15533
155341999-06-08 Jesse Thilo <jthilo@gnu.org>
15535
15536 * doc/bison.1:
15537 Dropped mention of `+' for long-named options.
15538
155391999-05-30 Jesse Thilo <jthilo@gnu.org>
15540
15541 * src/files.c: Added <unistd.h> for unlink().
15542
15543 * src/Makefile.am, src/system.h:
15544 I18n fixes.
15545
155461999-05-30 Jesse Thilo <jthilo@gnu.org>
15547
15548 * README: Added a FAQ list.
15549
15550 * configure.in, acconfig.h:
15551 I18n fixes.
15552
155531999-05-30 Jesse Thilo <jthilo@gnu.org>
15554
15555 * doc/FAQ, doc/Makefile.am:
15556 Added a FAQ list.
15557
155581999-05-19 Jesse Thilo <jthilo@gnu.org>
15559
15560 * src/alloc.h, src/symtab.h, src/version.c:
15561 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15562
155631999-04-18 Jesse Thilo <jthilo@gnu.org>
15564
15565 * src/.cvsignore, src/Makefile.am:
15566 Reorganized: sources in `src', documentation in `doc'.
15567
15568 * src/lex.c (literalchar):
15569 fixed the code for escaping double quotes (thanks
15570 Jonathan Czisny.)
15571
155721999-04-18 Jesse Thilo <jthilo@gnu.org>
15573
15574 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15575 Adjusted paths to reflect directory reorganization.
15576
155771999-04-18 Jesse Thilo <jthilo@gnu.org>
15578
15579 * doc/.cvsignore, doc/Makefile.am:
15580 Reorganized: sources in `src', documentation in `doc'.
15581
155821999-04-18 Jesse Thilo <jthilo@gnu.org>
15583
15584 * configure.in:
15585 Updated AC_INIT file to reflect directory reorganization.
15586
15587 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
15588 Reorganized: sources in `src', documentation in `doc'.
15589
155901999-04-13 Jesse Thilo <jthilo@gnu.org>
15591
15592 * src/allocate.c:
15593 Don't declare calloc() and realloc() if not necessary.
15594
155951999-04-13 Jesse Thilo <jthilo@gnu.org>
15596
15597 * configure.in, acconfig.h, acinclude.m4:
15598 Don't declare calloc() and realloc() if not necessary.
15599
156001999-03-23 Jesse Thilo <jthilo@gnu.org>
15601
15602 * po/.cvsignore: Added i18n support.
15603
156041999-03-23 Jesse Thilo <jthilo@gnu.org>
15605
15606 * acconfig.h, configure.in, Makefile.am:
15607 Added i18n support.
15608
156091999-03-22 Jesse Thilo <jthilo@gnu.org>
15610
15611 * src/bison.s1: Fixed #line numbers.
15612
156131999-03-15 Jesse Thilo <jthilo@gnu.org>
15614
15615 * po/es.po, po/fr.po, po/nl.po, po/de.po:
15616 Added PO files from Translation Project.
15617
156181999-03-03 Jesse Thilo <jthilo@gnu.org>
15619
15620 * Makefile.am:
15621 Added support for non-ANSI compilers (ansi2knr).
15622
156231999-02-16 Jesse Thilo <jthilo@gnu.org>
15624
15625 * configure.in: Bumped version number to 1.27.
15626
15627 * Makefile.am:
15628 Added `bison.simple' to list of files removed by `make distclean'.
15629
156301999-02-12 Jesse Thilo <jthilo@gnu.org>
15631
15632 * src/files.c, src/files.h:
15633 Defined locations of parser files in config.h instead of Makefile.
15634
156351999-02-12 Jesse Thilo <jthilo@gnu.org>
15636
15637 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
15638 Defined locations of parser files in config.h instead of Makefile.
15639
156401999-02-09 Jesse Thilo <jthilo@gnu.org>
15641
15642 * Makefile.am:
15643 Removed inappropriate use of $< macro.
15644
156451999-02-05 Jesse Thilo <jthilo@gnu.org>
15646
15647 * po/Makefile.in.in, po/POTFILES.in:
15648 Add `po' directory skeleton.
15649
156501999-01-27 Jesse Thilo <jthilo@gnu.org>
15651
15652 * README: Document help-bison list.
15653
15654 * configure.in: Add check for mkstemp().
15655
156561999-01-20 Jesse Thilo <jthilo@gnu.org>
15657
15658 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
15659 Hush a few compiler warnings.
15660
15661 * src/files.c:
15662 Add tryclose(), which verifies that fclose was successful.
15663 Hush a couple of compiler warnings.
15664
156651999-01-20 Jesse Thilo <jthilo@gnu.org>
15666
15667 * Makefile.am, OChangeLog:
15668 ChangeLog is now automatically generated. Include the old version as
15669 OChangeLog.
15670
156711999-01-14 Jesse Thilo <jthilo@gnu.org>
15672
15673 * 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:
15674 Update FSF address.
15675
156761999-01-14 Jesse Thilo <jthilo@gnu.org>
15677
15678 * doc/bison.texinfo: Fix formatting glitch.
15679
15680 * doc/bison.texinfo: Update FSF address.
15681
156821999-01-14 Jesse Thilo <jthilo@gnu.org>
15683
15684 * acconfig.h: Update FSF address.
15685
156861999-01-08 Jesse Thilo <jthilo@gnu.org>
15687
15688 * src/system.h:
15689 Don't define PACKAGE here, since config.h defines it.
15690
156911998-12-30 Jesse Thilo <jthilo@gnu.org>
15692
15693 * src/reader.c: Update copyright date.
15694
15695 * src/main.c:
15696 Ditch sprintf to statically-sized buffers in fatal/warn functions in
15697 favor of output directly to stderr (avoids buffer overruns).
15698
15699 * src/reader.c: Some checks for premature EOF.
15700
15701 * 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:
15702 Use prototypes if the compiler understands them.
15703
15704 * src/files.c: Honor TMPDIR on Unix hosts.
15705 Use prototypes if the compiler understands them.
15706
15707 * src/reader.c:
15708 Fix a couple of buffer overrun bugs.
15709 Use prototypes if the compiler understands them.
15710
15711 * src/system.h: Include unistd.h and ctype.h.
15712 Use #ifdef instead of #if for NLS symbols.
15713
157141998-12-30 Jesse Thilo <jthilo@gnu.org>
15715
15716 * doc/bison.texinfo:
15717 Delete comment "consider using @set for edition number, etc..." since
15718 we now are doing so.
15719
157201998-12-30 Jesse Thilo <jthilo@gnu.org>
15721
15722 * configure.in:
15723 Use prototypes if the compiler understands them.
15724
15725 * NEWS: Document 1.26 highlights.
15726
15727 * Makefile.am: Require Automake 1.3 or later.
15728
15729 * acconfig.h:
15730 Use prototypes if the compiler understands them.
15731
157321998-12-29 Jesse Thilo <jthilo@gnu.org>
15733
15734 * src/version.c:
15735 Use VERSION symbol from automake for version number.
15736
157371998-12-29 Jesse Thilo <jthilo@gnu.org>
15738
15739 * acconfig.h, configure.in, version.cin:
15740 Use VERSION symbol from automake for version number.
15741
157421998-11-28 Jesse Thilo <jthilo@gnu.org>
15743
15744 * Makefile.am:
15745 Distribute original version of simple parser (bison.s1), not built
15746 version (bison.simple).
15747
157481998-11-28 Jesse Thilo <jthilo@gnu.org>
15749
15750 * doc/bison.texinfo: Add info dir entry.
15751
15752 * doc/bison.texinfo:
15753 Let automake put version number into documentation.
15754
157551998-11-26 Jesse Thilo <jthilo@gnu.org>
15756
15757 * src/bison.cld, src/build.com, src/vmshlp.mar:
15758 Add non-RCS files from /gd/gnu/bison.
15759
157601998-11-26 Jesse Thilo <jthilo@gnu.org>
15761
15762 * doc/bison.1:
15763 Document the BISON_HAIRY and BISON_SIMPLE variables.
15764
157651998-11-25 Jesse Thilo <jthilo@gnu.org>
15766
15767 * src/version.c: Build version.c automatically.
15768
15769 * src/reader.c:
15770 Fix token numbering (used to start at 258, not 257).
15771
15772 * src/system.h: Include config.h.
15773
15774 * src/getargs.c: Update bug report address.
15775
15776 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
15777 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
15778
157791998-11-25 Jesse Thilo <jthilo@gnu.org>
15780
15781 * Makefile.am:
15782 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15783
15784 * configure.in, version.cin:
15785 Build version.c automatically.
15786
15787 * AUTHORS: Add AUTHORS file.
15788
15789 * README: Update bug report address.
15790
15791 * bison.simple:
15792 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15793
15794 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
15795 Add automake stuff.
15796
157971998-11-25 Jesse Thilo <jthilo@gnu.org>
15798
15799 * doc/bison.texinfo: Clean up some formatting.
15800
158011998-05-05 Richard Stallman <rms@gnu.org>
15802
15803 * doc/bison.texinfo:
15804 Explain better why to make a pure parser.
15805
158061998-01-05 Richard Stallman <rms@gnu.org>
15807
15808 * src/files.c (openfiles):
15809 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
15810 find a temporary directory, if possible. Do not unlink files while
15811 they are open.
15812
158131997-08-25 Richard Stallman <rms@gnu.org>
15814
15815 * src/reader.c (stack_offset;):
15816 Change some warni to warns.
15817
15818 * src/lex.c (literalchar): Use warns, not warni.
15819
158201997-06-28 Richard Stallman <rms@gnu.org>
15821
15822 * src/bison.s1: Add a Bison version comment.
15823
15824 * src/main.c (fatal, warn, berror):
15825 Use program_name.
15826
158271997-06-28 Richard Stallman <rms@gnu.org>
15828
15829 * Makefile.in (bison_version): New variable.
15830 (dist): Use that variable.
15831 (bison.s1): Substitute the Bison version into bison.simple.
15832
15833 * bison.simple: Add a Bison version comment.
15834
158351997-06-18 Richard Stallman <rms@gnu.org>
15836
15837 * src/main.c (fatal, warn, berror):
15838 Make error messages standard.
15839 (toomany): Improve error message text.
15840
15841 * 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:
15842 new.h renamed to alloc.h.
15843
158441997-06-18 Richard Stallman <rms@gnu.org>
15845
15846 * Makefile.in: new.h renamed to alloc.h.
15847
158481997-05-24 Richard Stallman <rms@gnu.org>
15849
15850 * src/lex.c (literalchar):
15851 Fix the code for escaping \, " and '.
15852
15853 (lex): Avoid trouble when there are many chars
15854 to discard in a char literal with just several chars in it.
15855
158561997-05-17 Richard Stallman <rms@gnu.org>
15857
15858 * src/bison.s1:
15859 Use malloc, if using alloca is troublesome.
15860 (YYSTACK_USE_ALLOCA): New flag macro.
15861 Define it for some systems and compilers.
15862 (YYSTACK_ALLOC): New macro.
15863 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15864 If it was malloc'd, free it.
15865
158661997-05-17 Richard Stallman <rms@gnu.org>
15867
15868 * bison.simple:
15869 Use malloc, if using alloca is troublesome.
15870 (YYSTACK_USE_ALLOCA): New flag macro.
15871 Define it for some systems and compilers.
15872 (YYSTACK_ALLOC): New macro.
15873 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15874 If it was malloc'd, free it.
15875
158761997-04-23 Richard Stallman <rms@gnu.org>
15877
15878 * src/bison.s1:
15879 (alloca) [__hpux]: Always define as __builtin_alloca.
15880
158811997-04-23 Richard Stallman <rms@gnu.org>
15882
15883 * bison.simple:
15884 (alloca) [__hpux]: Always define as __builtin_alloca.
15885
158861997-04-22 Richard Stallman <rms@gnu.org>
15887
15888 * src/bison.s1:
15889 [__hpux]: Include alloca.h (right for HPUX 10)
15890 instead of declaring alloca (right for HPUX 9).
15891
15892 * src/bison.s1 (__yy_memcpy):
15893 Declare arg `count' as unsigned int.
15894 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15895
158961997-04-22 Richard Stallman <rms@gnu.org>
15897
15898 * bison.simple:
15899 [__hpux]: Include alloca.h (right for HPUX 10)
15900 instead of declaring alloca (right for HPUX 9).
15901
15902 * bison.simple (__yy_memcpy):
15903 Declare arg `count' as unsigned int.
15904 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15905
159061997-01-03 Richard Stallman <rms@gnu.org>
15907
15908 * src/allocate.c: [__STDC__ or _MSC_VER]:
15909 Declare calloc and realloc to return void *.
15910
159111997-01-02 Richard Stallman <rms@gnu.org>
15912
15913 * src/system.h:
15914 [_MSC_VER]: Include stdlib.h and process.h.
15915 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
15916
15917 * src/main.c (main): Return FAILURE as a value.
15918 (printable_version): Declare arg as int, not char.
15919
159201997-01-02 Richard Stallman <rms@gnu.org>
15921
15922 * Makefile.in (dist):
15923 Explicitly check for symlinks, and copy them.
15924
159251996-12-19 Richard Stallman <rms@gnu.org>
15926
15927 * src/files.c:
15928 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
15929
159301996-12-18 Paul Eggert <eggert@gnu.org>
15931
15932 * src/bison.s1 (yyparse):
15933 If __GNUC__ and YYPARSE_PARAM are both defined,
15934 declare yyparse to have a void * argument.
15935
159361996-12-18 Paul Eggert <eggert@gnu.org>
15937
15938 * bison.simple (yyparse):
15939 If __GNUC__ and YYPARSE_PARAM are both defined,
15940 declare yyparse to have a void * argument.
15941
159421996-12-17 Richard Stallman <rms@gnu.org>
15943
15944 * src/reduce.c (nbits): Add some casts.
15945
159461996-08-12 Richard Stallman <rms@gnu.org>
15947
15948 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
15949
159501996-08-12 Richard Stallman <rms@gnu.org>
15951
15952 * bison.simple: Test _MSDOS as well as _MSDOS_.
15953
159541996-07-31 Richard Stallman <rms@gnu.org>
15955
15956 * src/bison.s1:
15957 [__sun && __i386]: Include alloca.h.
15958
159591996-07-31 Richard Stallman <rms@gnu.org>
15960
15961 * bison.simple:
15962 [__sun && __i386]: Include alloca.h.
15963
159641996-07-30 Richard Stallman <rms@gnu.org>
15965
15966 * src/bison.s1: Comment change.
15967
15968 * src/bison.s1: Test _MSDOS_, not MSDOS.
15969
159701996-07-30 Richard Stallman <rms@gnu.org>
15971
15972 * bison.simple: Comment change.
15973
15974 * bison.simple: Test _MSDOS_, not MSDOS.
15975
159761996-06-01 Richard Stallman <rms@gnu.org>
15977
15978 * 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:
15979 Insert `_' macro around many string constants.
15980
15981 * src/main.c:
15982 Insert `_' macro around many string constants.
15983
15984 (main): Call setlocale, bindtextdomain and textdomain.
15985
15986 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
15987 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
15988 [ENABLE_NLS]: Include libintl.h.
15989 [ENABLE_NLS] (gettext): Define.
15990 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
15991 (N_, PACKAGE, LOCALEDIR): New macros.
15992
159931996-06-01 Richard Stallman <rms@gnu.org>
15994
15995 * POTFILES.in: New file.
15996
15997 * Makefile.in (allocate.o):
15998 Define target explicitly.
15999
16000 * Makefile.in (CFLAGS): Set to @CFLAGS@.
16001 (LDFLAGS): Set to @LDFLAGS@.
16002 (configure): Run autoconf only if preceding `cd' succeeds.
16003 (bison.s1): Redirect output to temporary file then move the
16004 temporary to the target, rather than redirecting directly to bison.s1.
16005 (clean): Remove config.status and config.log.
16006 (distclean): Don't remove config.status here.
16007
160081996-05-12 Richard Stallman <rms@gnu.org>
16009
16010 * src/bison.s1:
16011 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16012
160131996-05-12 Richard Stallman <rms@gnu.org>
16014
16015 * bison.simple:
16016 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16017
160181996-05-11 Richard Stallman <rms@gnu.org>
16019
16020 * src/bison.s1 (__yy_memcpy):
16021 Really reorder the args, as was supposedly done on Feb 14 1995.
16022 (yyparse): Calls changed accordingly.
16023
160241996-05-11 Richard Stallman <rms@gnu.org>
16025
16026 * Makefile.in (dist): Don't use $(srcdir).
16027
16028 * bison.simple (__yy_memcpy):
16029 Really reorder the args, as was supposedly done on Feb 14 1995.
16030 (yyparse): Calls changed accordingly.
16031
160321996-01-27 Richard Stallman <rms@gnu.org>
16033
16034 * src/output.c (output_rule_data):
16035 Test YYERROR_VERBOSE in the conditional
16036 around the definition of ttyname.
16037
160381995-12-29 Richard Stallman <rms@gnu.org>
16039
16040 * src/bison.s1:
16041 Fix line numbers in #line commands.
16042
160431995-12-29 Richard Stallman <rms@gnu.org>
16044
16045 * bison.simple:
16046 Fix line numbers in #line commands.
16047
160481995-12-27 Richard Stallman <rms@gnu.org>
16049
16050 * src/bison.s1 (YYPARSE_PARAM_DECL):
16051 In C++, make it always null.
16052 (YYPARSE_PARAM_ARG): New macro.
16053 (yyparse): Use YYPARSE_PARAM_ARG.
16054
160551995-12-27 Richard Stallman <rms@gnu.org>
16056
16057 * bison.simple (YYPARSE_PARAM_DECL):
16058 In C++, make it always null.
16059 (YYPARSE_PARAM_ARG): New macro.
16060 (yyparse): Use YYPARSE_PARAM_ARG.
16061
160621995-11-29 Richard Stallman <rms@gnu.org>
16063
16064 * doc/bison.texinfo:
16065 Describe literal string tokens, %raw, %no_lines, %token_table.
16066
160671995-11-29 Daniel Hagerty <hag@gnu.org>
16068
16069 * doc/bison.texinfo: Fixed update date
16070
160711995-10-16 Richard Stallman <rms@gnu.org>
16072
16073 * src/version.c: Version 1.25.
16074
160751995-10-16 Richard Stallman <rms@gnu.org>
16076
16077 * NEWS: *** empty log message ***
16078
160791995-10-16 Richard Stallman <rms@gnu.org>
16080
16081 * doc/bison.1, doc/bison.rnh:
16082 Add new options.
16083
160841995-10-15 Richard Stallman <rms@gnu.org>
16085
16086 * src/vmsgetargs.c, src/getargs.c:
16087 Added -n, -k, and -raw switches.
16088 (noparserflag, toknumflag, rawtoknumflag): New variables.
16089
16090 * src/symtab.h (SALIAS):
16091 New #define for adding aliases to %token.
16092 (struct bucket): Added `alias' field.
16093
16094 * src/reduce.c (reduce_grammar):
16095 Revise error message.
16096 (print_notices): Remove final `.' from error message.
16097
16098 * src/reader.c (reader_output_yylsp):
16099 New function.
16100 (readgram): Use `#if 0' around code that accepted %command
16101 inside grammar rules: The documentation doesn't allow it,
16102 and it will fail since the %command processors scan for the next %.
16103 (parse_token_decl): Extended the %token
16104 declaration to allow a multi-character symbol as an alias.
16105 (parse_thong_decl): New function.
16106 (read_declarations): Added %thong declarations.
16107 (read_declarations): Handle NOOP to deal with allowing
16108 % declarations as another means to specify the flags.
16109 (readgram): Allow %prec prior to semantics embedded in a rule.
16110 (skip_to_char, read_declarations, copy_definition)
16111 (parse_token_decl, parse_start_decl, parse_type_decl)
16112 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
16113 (get_type_name, copy_guard, copy_action, readgram)
16114 (get_type, packsymbols): Revised most error messages.
16115 Changed `fatal' to `warnxxx' to avoid aborting for error.
16116 Revised and use multiple warnxxx functions to avoid using VARARGS1.
16117 (read_declarations): Improve the error message for
16118 an invalid character. Do not abort.
16119 (read_declarations, copy_guard, copy_action): Use
16120 printable_version to avoid unprintable characters in printed output.
16121 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
16122 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
16123 Allow the type of a non-terminal can be given
16124 more than once, as long as all specifications give the same type.
16125
16126 * src/output.c:
16127 (output_headers, output_trailers, output, output_gram)
16128 (output_rule_data): Implement noparserflag variable.
16129 Implement toknumflag variable.
16130 (output): Call reader_output_yylsp to output LTYPESTR.
16131
16132 * src/main.c (main):
16133 If reader sees an error, don't process the grammar.
16134 (fatals): Updated to not use VARARGS1.
16135 (printable_version, int_to_string, warn, warni, warns, warnss)
16136 (warnsss): New error reporting functions. Avoid abort for error.
16137
16138 * src/lex.h:
16139 Added THONG and NOOP for alias processing.
16140 Added SETOPT for the new code that allows setting options with %flags.
16141
16142 * src/lex.c:
16143 Include getopt.h. Add some extern decls.
16144 (safegetc): New function to deal with EOF gracefully.
16145 (literalchar); new function to deal with reading \ escapes.
16146 (lex): Use literalchar.
16147 (lex): Implemented "..." tokens.
16148 (literalchar, lex, parse_percent_token): Made tokenbuffer
16149 always contain the token. This includes growing the token
16150 buffer while reading an integer.
16151 (parse_percent_token): Replaced if-else statement with percent_table.
16152 (parse_percent_token): Added % declarations as another
16153 way to specify the flags -n, -l, and -r. Also added hooks for
16154 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
16155 major changes to files.c.
16156 (lex) Retain in the incoming stream a character following
16157 an incorrect '/'.
16158 (skip_white_space, lex): Revised most error messages
16159 and changed fatal to warn to avoid aborting.
16160 (percent_table): Added %thong declarations.
16161
16162 * src/gram.h: Comment changes.
16163
16164 * src/files.c (openfiles, open_extra_files, done):
16165 Add faction flag
16166 and actfile file. Handle noparserflag. Both for -n switch.
16167
16168 * src/conflicts.c (resolve_sr_conflict):
16169 Remove use of alloca.
16170
161711995-06-01 Jim Meyering <meyering@gnu.org>
16172
16173 * doc/bison.texinfo: *** empty log message ***
16174
161751995-05-06 Richard Stallman <rms@gnu.org>
16176
16177 * src/bison.s1: Comment change.
16178
161791995-05-06 Richard Stallman <rms@gnu.org>
16180
16181 * bison.simple: Comment change.
16182
161831995-05-03 Richard Stallman <rms@gnu.org>
16184
16185 * src/version.c: Version now 1.24.
16186
16187 * src/bison.s1: Change distribution terms.
16188
16189 * src/version.c: Version now 1.23.
16190
161911995-05-03 Richard Stallman <rms@gnu.org>
16192
16193 * doc/bison.texinfo:
16194 Rewrite "Conditions for Using Bison".
16195 Update version to 1.24.
16196
161971995-05-03 Richard Stallman <rms@gnu.org>
16198
16199 * bison.simple: Change distribution terms.
16200
162011995-02-23 Richard Stallman <rms@gnu.org>
16202
16203 * src/files.c: Test __VMS_POSIX as well as VMS.
16204
162051995-02-14 Jim Meyering <meyering@gnu.org>
16206
16207 * src/bison.s1 (__yy_memcpy):
16208 Renamed from __yy_bcopy to avoid
16209 confusion. Reverse FROM and TO arguments to be consistent with
16210 those of memcpy.
16211
162121995-02-14 Jim Meyering <meyering@gnu.org>
16213
16214 * bison.simple (__yy_memcpy):
16215 Renamed from __yy_bcopy to avoid
16216 confusion. Reverse FROM and TO arguments to be consistent with
16217 those of memcpy.
16218
162191994-11-10 David J. MacKenzie <djm@gnu.org>
16220
16221 * NEWS: reformat
16222
16223 * NEWS: New file.
16224
16225 * Makefile.in (DISTFILES): Include NEWS.
16226
16227 * Makefile.in (DISTFILES):
16228 Include install-sh, not install.sh.
16229
16230 * configure.in: Update to Autoconf v2 macro names.
16231
162321994-10-05 David J. MacKenzie <djm@gnu.org>
16233
16234 * Makefile.in: fix typo
16235
16236 * Makefile.in (prefix, exec_prefix):
16237 Let configure set them.
16238
162391994-09-28 David J. MacKenzie <djm@gnu.org>
16240
16241 * Makefile.in: Set datadir to $(prefix)/share.
16242
162431994-09-15 Richard Stallman <rms@gnu.org>
16244
16245 * src/bison.s1:
16246 Update copyright notice and GPL version.
16247
162481994-09-15 Richard Stallman <rms@gnu.org>
16249
16250 * bison.simple:
16251 Update copyright notice and GPL version.
16252
162531994-07-12 Richard Stallman <rms@gnu.org>
16254
16255 * src/reduce.c, src/reader.c:
16256 entered into RCS
16257
162581994-05-05 David J. MacKenzie <djm@gnu.org>
16259
16260 * Makefile.in: entered into RCS
16261
162621994-03-26 Richard Stallman <rms@gnu.org>
16263
16264 * src/bison.s1: entered into RCS
16265
162661994-03-26 Richard Stallman <rms@gnu.org>
16267
16268 * bison.simple: entered into RCS
16269
162701994-03-25 Richard Stallman <rms@gnu.org>
16271
16272 * src/main.c: entered into RCS
16273
162741994-03-24 Richard Stallman <rms@gnu.org>
16275
16276 * src/conflicts.c: entered into RCS
16277
162781994-01-02 Richard Stallman <rms@gnu.org>
16279
16280 * Makefile.in: *** empty log message ***
16281
162821993-11-21 Richard Stallman <rms@gnu.org>
16283
16284 * src/bison.s1: *** empty log message ***
16285
162861993-11-21 Richard Stallman <rms@gnu.org>
16287
16288 * doc/bison.texinfo: entered into RCS
16289
16290 * doc/bison.texinfo: *** empty log message ***
16291
162921993-11-21 Richard Stallman <rms@gnu.org>
16293
16294 * bison.simple: *** empty log message ***
16295
162961993-10-25 David J. MacKenzie <djm@gnu.org>
16297
16298 * doc/bison.texinfo: *** empty log message ***
16299
163001993-10-19 Richard Stallman <rms@gnu.org>
16301
16302 * src/bison.s1: *** empty log message ***
16303
163041993-10-19 Richard Stallman <rms@gnu.org>
16305
16306 * bison.simple: *** empty log message ***
16307
163081993-10-14 Richard Stallman <rms@gnu.org>
16309
16310 * src/bison.s1: *** empty log message ***
16311
163121993-10-14 Richard Stallman <rms@gnu.org>
16313
16314 * bison.simple: *** empty log message ***
16315
163161993-09-14 David J. MacKenzie <djm@gnu.org>
16317
16318 * doc/bison.texinfo: *** empty log message ***
16319
163201993-09-13 Noah Friedman <friedman@gnu.org>
16321
16322 * Makefile.in: *** empty log message ***
16323
163241993-09-10 Richard Stallman <rms@gnu.org>
16325
16326 * src/conflicts.c: *** empty log message ***
16327
16328 * src/system.h: entered into RCS
16329
163301993-09-10 Richard Stallman <rms@gnu.org>
16331
16332 * doc/bison.1: entered into RCS
16333
163341993-09-06 Noah Friedman <friedman@gnu.org>
16335
16336 * src/version.c: entered into RCS
16337
163381993-09-06 Noah Friedman <friedman@gnu.org>
16339
16340 * Makefile.in: *** empty log message ***
16341
163421993-07-30 David J. MacKenzie <djm@gnu.org>
16343
16344 * Makefile.in: *** empty log message ***
16345
163461993-07-24 Richard Stallman <rms@gnu.org>
16347
16348 * src/bison.s1: *** empty log message ***
16349
163501993-07-24 Richard Stallman <rms@gnu.org>
16351
16352 * bison.simple: *** empty log message ***
16353
163541993-07-08 David J. MacKenzie <djm@gnu.org>
16355
16356 * Makefile.in: *** empty log message ***
16357
163581993-07-04 Richard Stallman <rms@gnu.org>
16359
16360 * src/bison.s1: *** empty log message ***
16361
163621993-07-04 Richard Stallman <rms@gnu.org>
16363
16364 * bison.simple: *** empty log message ***
16365
163661993-06-26 David J. MacKenzie <djm@gnu.org>
16367
16368 * src/getargs.c: entered into RCS
16369
163701993-06-26 David J. MacKenzie <djm@gnu.org>
16371
16372 * doc/bison.texinfo: *** empty log message ***
16373
16374 * doc/bison.1: New file.
16375
163761993-06-25 Richard Stallman <rms@gnu.org>
16377
16378 * src/getargs.c: New file.
16379
163801993-06-16 Richard Stallman <rms@gnu.org>
16381
16382 * src/bison.s1: *** empty log message ***
16383
163841993-06-16 Richard Stallman <rms@gnu.org>
16385
16386 * bison.simple: *** empty log message ***
16387
163881993-06-03 Richard Stallman <rms@gnu.org>
16389
16390 * src/bison.s1: New file.
16391
163921993-06-03 Richard Stallman <rms@gnu.org>
16393
16394 * doc/bison.texinfo: *** empty log message ***
16395
163961993-06-03 Richard Stallman <rms@gnu.org>
16397
16398 * bison.simple: New file.
16399
164001993-05-19 Richard Stallman <rms@gnu.org>
16401
16402 * doc/bison.texinfo: New file.
16403
164041993-05-07 Noah Friedman <friedman@gnu.org>
16405
16406 * Makefile.in: *** empty log message ***
16407
164081993-04-28 Noah Friedman <friedman@gnu.org>
16409
16410 * src/reader.c: *** empty log message ***
16411
164121993-04-23 Noah Friedman <friedman@gnu.org>
16413
16414 * src/alloc.h: entered into RCS
16415
164161993-04-20 David J. MacKenzie <djm@gnu.org>
16417
16418 * src/version.c: *** empty log message ***
16419
16420 * src/files.c, src/allocate.c:
16421 entered into RCS
16422
16423 * src/reader.c: *** empty log message ***
16424
16425 * src/lex.c: entered into RCS
16426
16427 * src/conflicts.c: New file.
16428
16429 * src/symtab.c: entered into RCS
16430
16431 * src/alloc.h: New file.
16432
16433 * src/LR0.c: entered into RCS
16434
164351993-04-18 Noah Friedman <friedman@gnu.org>
16436
16437 * src/reader.c: New file.
16438
16439 * src/version.c: *** empty log message ***
16440
164411993-04-18 Noah Friedman <friedman@gnu.org>
16442
16443 * Makefile.in: *** empty log message ***
16444
164451993-04-17 Noah Friedman <friedman@gnu.org>
16446
16447 * Makefile.in: *** empty log message ***
16448
164491993-04-15 Richard Stallman <rms@gnu.org>
16450
16451 * src/main.c, src/files.c:
16452 New file.
16453
164541993-04-15 Noah Friedman <friedman@gnu.org>
16455
16456 * configure.in: entered into RCS
16457
16458 * configure.in: *** empty log message ***
16459
16460 * configure.in: New file.
16461
164621993-04-14 Richard Stallman <rms@gnu.org>
16463
16464 * Makefile.in: New file.
16465
164661993-04-13 Richard Stallman <rms@gnu.org>
16467
16468 * src/version.c: New file.
16469
164701993-03-25 Richard Stallman <rms@gnu.org>
16471
16472 * src/output.c: entered into RCS
16473
164741992-09-25 Richard Stallman <rms@gnu.org>
16475
16476 * configure.bat: entered into RCS
16477
164781992-06-22 Richard Stallman <rms@gnu.org>
16479
16480 * src/vmsgetargs.c: entered into RCS
16481
164821992-06-22 Richard Stallman <rms@gnu.org>
16483
16484 * doc/bison.rnh: entered into RCS
16485
164861992-04-20 David J. MacKenzie <djm@gnu.org>
16487
16488 * README: entered into RCS
16489
164901992-01-22 Richard Stallman <rms@gnu.org>
16491
16492 * src/machine.h: entered into RCS
16493
164941991-12-21 Richard Stallman <rms@gnu.org>
16495
16496 * src/lalr.c, src/closure.c:
16497 entered into RCS
16498
164991991-12-20 Richard Stallman <rms@gnu.org>
16500
16501 * src/state.h: entered into RCS
16502
165031991-12-18 Richard Stallman <rms@gnu.org>
16504
16505 * src/print.c, src/nullable.c, src/derives.c:
16506 entered into RCS
16507
165081991-11-03 David J. MacKenzie <djm@gnu.org>
16509
16510 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
16511 entered into RCS
16512
165131988-09-09 Richard Stallman <rms@gnu.org>
16514
16515 * src/bison.hairy: entered into RCS
16516
165171987-12-16 Richard Stallman <rms@gnu.org>
16518
16519 * REFERENCES: entered into RCS
dc546b0f 16520
f294a2c2 16521
04098407 16522 -----
f294a2c2 16523
04098407 16524 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e2a21b6f
PE
16525 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
16526 Software Foundation, Inc.
f294a2c2 16527
04098407
PE
16528 Copying and distribution of this file, with or without
16529 modification, are permitted provided the copyright notice and this
16530 notice are preserved.
e9071366
AD
16531
16532$Id$