]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Update.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-06-25 Raja R Harinath <harinath@cs.umn.edu>
2
3 * src/getargs.c (report_argmatch): Initialize strtok().
4
52002-06-20 Akim Demaille <akim@epita.fr>
6
7 * data/bison.simple (b4_symbol_actions): New, replaces...
8 (b4_symbol_destructor, b4_symbol_printer): these.
9 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10 user token numbers.
11
122002-06-20 Akim Demaille <akim@epita.fr>
13
14 * data/bison.simple (yydestructor): Rename as...
15 (yydestruct): this.
16
172002-06-20 Akim Demaille <akim@epita.fr>
18
19 * src/symtab.h, src/symtab.c (symbol_type_set)
20 (symbol_destructor_set, symbol_precedence_set): The location is
21 the last argument.
22 Adjust all callers.
23
242002-06-20 Akim Demaille <akim@epita.fr>
25
26 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
27 internals.
28 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
29 Takes a location.
30 * src/symtab.h, src/symtab.c (symbol_class_set)
31 (symbol_user_token_number_set): Likewise.
32 Adjust all callers.
33 Promote complain_at.
34 * tests/input.at (Type Clashes): Adjust.
35
362002-06-20 Akim Demaille <akim@epita.fr>
37
38 * data/bison.simple (YYLEX): Fix the declaration when
39 %pure-parser.
40
412002-06-20 Akim Demaille <akim@epita.fr>
42
43 * data/bison.simple (yysymprint): Don't print the token number,
44 just its name.
45 * tests/actions.at (Destructors): Rename as...
46 (Printers and Destructors): this.
47 Also exercise %printer.
48
492002-06-20 Akim Demaille <akim@epita.fr>
50
51 * data/bison.simple (YYDSYMPRINT): New.
52 Use it to remove many of the #if YYDEBUG/if (yydebug).
53
542002-06-20 Akim Demaille <akim@epita.fr>
55
56 * src/symtab.h, src/symtab.c (symbol_t): printer and
57 printer_location are new members.
58 (symbol_printer_set): New.
59 * src/parse-gram.y (PERCENT_PRINTER): New token.
60 Handle its associated rule.
61 * src/scan-gram.l: Adjust.
62 (handle_destructor_at, handle_destructor_dollar): Rename as...
63 (handle_symbol_code_at, handle_symbol_code_dollar): these.
64 * src/output.c (symbol_printers_output): New.
65 (output_skeleton): Call it.
66 * data/bison.simple (yysymprint): New. Cannot be named yyprint
67 since there are already many grammar files with a user `yyprint'.
68 Replace the calls to YYPRINT to calls to yysymprint.
69 * tests/calc.at: Adjust.
70 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
71 taking advantage of parser very internal details (stack size!).
72
732002-06-20 Akim Demaille <akim@epita.fr>
74
75 * src/scan-gram.l: Complete the scanner with the missing patterns
76 to pacify Flex.
77 Use `quote' and `symbol_tag_get' where appropriate.
78
792002-06-19 Akim Demaille <akim@epita.fr>
80
81 * tests/actions.at (Destructors): Augment to test locations.
82 * data/bison.simple (yydestructor): Pass it the current location
83 if locations are enabled.
84 Prototype only when __STDC__ or C++.
85 Change the argument names to move into the yy name space: there is
86 user code here.
87
882002-06-19 Akim Demaille <akim@epita.fr>
89
90 * data/bison.simple (b4_pure_if): New.
91 Use it instead of #ifdef YYPURE.
92
932002-06-19 Akim Demaille <akim@epita.fr>
94
95 * data/bison.simple (b4_location_if): New.
96 Use it instead of #ifdef YYLSP_NEEDED.
97
982002-06-19 Akim Demaille <akim@epita.fr>
99
100 Prepare @$ in %destructor, but currently don't bind it in the
101 skeleton, as %location use is not cleaned up yet.
102
103 * src/scan-gram.l (handle_dollar, handle_destructor_at)
104 (handle_action_at): New.
105 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
106 a braced_code_t and a location as additional arguments.
107 (handle_destructor_dollar): Instead of requiring `b4_eval', just
108 unquote one when outputting `b4_dollar_dollar'.
109 Adjust callers.
110 * data/bison.simple (b4_eval): Remove.
111 (b4_symbol_destructor): Adjust.
112 * tests/input.at (Invalid @n): Adjust.
113
1142002-06-19 Zack Weinberg <zack@codesourcery.com>
115
116 * doc/bison.texinfo: Document ability to have multiple
117 prologue sections.
118
1192002-06-18 Akim Demaille <akim@epita.fr>
120
121 * src/files.c (compute_base_names): When computing the output file
122 names from the input file name, strip the directory part.
123
1242002-06-18 Akim Demaille <akim@epita.fr>
125
126 * data/bison.simple.new: Comment changes.
127 Reported by Andreas Schwab.
128
1292002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
130
131 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
132 there are no `label `yyoverflowlab' defined but not used' warnings
133 when yyoverflow is defined.
134
1352002-06-18 Akim Demaille <akim@epita.fr>
136
137 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
138 new member.
139 (symbol_destructor_set): Adjust.
140 * src/output.c (symbol_destructors_output): Output the destructor
141 locations.
142 Output the symbol name.
143 * data/bison.simple (b4_symbol_destructor): Adjust.
144
1452002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
146 and Akim Demaille <akim@epita.fr>
147
148 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
149 what's left on the stack when the error recovery hits EOF.
150 * tests/actions.at (Destructors): Complete to exercise this case.
151
1522002-06-17 Akim Demaille <akim@epita.fr>
153
154 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
155 arguments is really empty, not only equal to `[]'.
156 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
157 member.
158 (symbol_destructor_set): New.
159 * src/output.c (symbol_destructors_output): New.
160 * src/reader.h (brace_code_t, current_braced_code): New.
161 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
162 (handle_dollar): Rename as...
163 (handle_action_dollar): this.
164 (handle_destructor_dollar): New.
165 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
166 (grammar_declaration): Use it.
167 * data/bison.simple (yystos): Is always defined.
168 (yydestructor): New.
169 * tests/actions.at (Destructors): New.
170 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
171
1722002-06-17 Akim Demaille <akim@epita.fr>
173
174 * src/symlist.h, src/symlist.c (symbol_list_length): New.
175 * src/scan-gram.l (handle_dollar, handle_at): Compute the
176 rule_length only when needed.
177 * src/output.c (actions_output, token_definitions_output): Output
178 the full M4 block.
179 * src/symtab.c: Don't access directly to the symbol tag, use
180 symbol_tag_get.
181 * src/parse-gram.y: Use symbol_list_free.
182
1832002-06-17 Akim Demaille <akim@epita.fr>
184
185 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
186 (symbol_list_prepend, get_type_name): Move to...
187 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
188 (symbol_list_prepend, symbol_list_n_type_name_get): here.
189 Adjust all callers.
190 (symbol_list_free): New.
191 * src/scan-gram.l (handle_dollar): Takes a location.
192 * tests/input.at (Invalid $n): Adjust.
193
1942002-06-17 Akim Demaille <akim@epita.fr>
195
196 * src/reader.h, src/reader.c (symbol_list_new): Export it.
197 (symbol_list_prepend): New.
198 * src/parse-gram.y (%union): `list' is a new member.
199 (symbols.1): New, replaces...
200 (terms_to_prec.1, nterms_to_type.1): these.
201 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
202 Take a location as additional argument.
203 Adjust all callers.
204
2052002-06-15 Akim Demaille <akim@epita.fr>
206
207 * src/parse-gram.y: Move %token in the declaration section so that
208 we don't depend upon CVS Bison.
209
2102002-06-15 Akim Demaille <akim@epita.fr>
211
212 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
213 * src/print.c (print_core): Use it.
214
2152002-06-15 Akim Demaille <akim@epita.fr>
216
217 * src/conflicts.c (log_resolution): Accept the rule involved in
218 the sr conflicts instead of the lookahead number that points to
219 that rule.
220 (flush_reduce): Accept the current lookahead vector as argument,
221 instead of the index in LA.
222 (resolve_sr_conflict): Accept the current number of lookahead
223 bitset to consider for the STATE, instead of the index in LA.
224 (set_conflicts): Adjust.
225 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
226
2272002-06-15 Akim Demaille <akim@epita.fr>
228
229 * src/state.h (state_t): Replace the `lookaheadsp' member, a
230 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
231 Adjust all dependencies.
232 * src/lalr.c (initialize_lookaheads): Split into...
233 (states_lookaheads_count, states_lookaheads_initialize): these.
234 (lalr): Adjust.
235
2362002-06-15 Akim Demaille <akim@epita.fr>
237
238 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
239 out of...
240 (grammar_rules_print): here.
241 * src/reduce.c (reduce_output): Use it.
242 * tests/reduce.at (Useless Rules, Reduced Automaton)
243 (Underivable Rules): Adjust.
244
2452002-06-15 Akim Demaille <akim@epita.fr>
246
247 Copy BYacc's nice way to report the grammar.
248
249 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
250 New.
251 Don't print the rules' location, it is confusing and useless.
252 (rule_print): Use grammar_rhs_print.
253 * src/print.c (print_grammar): Use grammar_rules_print.
254
2552002-06-15 Akim Demaille <akim@epita.fr>
256
257 Complete and rationalize `useless thing' warnings.
258
259 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
260 (symbol_tag_print): New.
261 Use them everywhere in place of accessing directly the tag member.
262 * src/gram.h, src/gram.c (rule_print): New.
263 Use it where a rule used to be printed `by hand'.
264 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
265 (reduce_grammar_tables): Report the useless rules.
266 (reduce_print): Useless things are a warning, not an error.
267 Report it as such.
268 * tests/reduce.at (Useless Nonterminals, Useless Rules):
269 (Reduced Automaton, Underivable Rules): Adjust.
270 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
271 * tests/conflicts.at (Unresolved SR Conflicts)
272 (Solved SR Conflicts): Adjust.
273
2742002-06-15 Akim Demaille <akim@epita.fr>
275
276 Let symbols have a location.
277
278 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
279 (getsym): Adjust.
280 Adjust all callers.
281 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
282 Use location_t, not int.
283 * src/symtab.c (symbol_check_defined): Take advantage of the
284 location.
285 * tests/regression.at (Invalid inputs): Adjust.
286
2872002-06-15 Akim Demaille <akim@epita.fr>
288
289 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
290 (input): Don't try to initialize yylloc here, do it in the
291 scanner.
292 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
293 * src/gram.h (rule_t): Change line and action_line into location
294 and action_location, of location_t type.
295 Adjust all dependencies.
296 * src/location.h, src/location.c (empty_location): New.
297 * src/reader.h, src/reader.c (grammar_start_symbol_set)
298 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
299 (grammar_current_rule_symbol_append)
300 (grammar_current_rule_action_append): Expect a location as argument.
301 * src/reader.c (grammar_midrule_action): Adjust to attach an
302 action's location as dummy symbol location.
303 * src/symtab.h, src/symtab.c (startsymbol_location): New.
304 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
305 the line numbers.
306
3072002-06-14 Akim Demaille <akim@epita.fr>
308
309 Grammar declarations may be found in the grammar section.
310
311 * src/parse-gram.y (rules_or_grammar_declaration): New.
312 (declarations): Each declaration may end with a semicolon, not
313 just...
314 (grammar_declaration): `"%union"'.
315 (grammar): Branch to rules_or_grammar_declaration.
316
3172002-06-14 Akim Demaille <akim@epita.fr>
318
319 * src/main.c (main): Invoke scanner_free.
320
3212002-06-14 Akim Demaille <akim@epita.fr>
322
323 * src/output.c (m4_invoke): Extracted from...
324 (output_skeleton): here.
325 Free tempfile.
326
3272002-06-14 Akim Demaille <akim@epita.fr>
328
329 * src/parse-gram.y (directives, directive, gram)
330 (grammar_directives, precedence_directives, precedence_directive):
331 Rename as...
332 (declarations, declaration, grammar, grammar_declaration)
333 (precedence_declaration, precedence_declarator): these.
334 (symbol_declaration): New.
335
3362002-06-14 Akim Demaille <akim@epita.fr>
337
338 * src/files.c (action_obstack): Remove, unused.
339 (output_obstack): Remove it, and all its dependencies, as it is no
340 longer needed.
341 * src/reader.c (epilogue_set): Build the epilogue in the
342 muscle_obstack.
343 * src/output.h, src/output.c (muscle_obstack): Move to...
344 * src/muscle_tab.h, src/muscle_tab.h: here.
345 (muscle_init): Initialize muscle_obstack.
346 (muscle_free): New.
347 * src/main.c (main): Call it.
348
3492002-06-14 Akim Demaille <akim@epita.fr>
350
351 * src/location.h: New, extracted from...
352 * src/reader.h: here.
353 * src/Makefile.am (noinst_HEADERS): Merge into
354 (bison_SOURCES): this.
355 Add location.h.
356 * src/parse-gram.y: Use location_t instead of Bison's.
357 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
358 Use location_t instead of ints.
359
3602002-06-14 Akim Demaille <akim@epita.fr>
361
362 * data/bison.simple, data/bison.c++: Be sure to restore the
363 current #line when returning to the skeleton contents after having
364 exposed the input file's #line.
365
3662002-06-12 Akim Demaille <akim@epita.fr>
367
368 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
369 eager.
370 * tests/actions.at (Exotic Dollars): New.
371
3722002-06-12 Akim Demaille <akim@epita.fr>
373
374 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
375 ['"/] too eagerly.
376 * tests/input.at (Torturing the Scanner): New.
377
3782002-06-11 Akim Demaille <akim@epita.fr>
379
380 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
381 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
382 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
383 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
384 * src/reader.c (reader): Use it.
385
3862002-06-11 Akim Demaille <akim@epita.fr>
387
388 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
389 Adjust all callers.
390 (scanner_last_string_free): New.
391
3922002-06-11 Akim Demaille <akim@epita.fr>
393
394 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
395 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
396 (last_string, YY_OBS_FREE): New.
397 Use them when returning an ID.
398
3992002-06-11 Akim Demaille <akim@epita.fr>
400
401 Have Bison grammars parsed by a Bison grammar.
402
403 * src/reader.c, src/reader.h (prologue_augment): New.
404 * src/reader.c (copy_definition): Remove.
405
406 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
407 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
408 (grammar_current_rule_prec_set, grammar_current_rule_check)
409 (grammar_current_rule_symbol_append)
410 (grammar_current_rule_action_append): Export.
411 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
412 (symbol_list_action_append): Remove.
413 Hook the routines from reader.
414 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
415 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
416
417 * src/reader.c (read_declarations): Remove, unused.
418
419 * src/parse-gram.y: Handle the epilogue.
420 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
421 (grammar_start_symbol_set): this.
422 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
423 * src/reader.c (readgram): Remove, unused.
424 (reader): Adjust to insert eoftoken and axiom where appropriate.
425
426 * src/reader.c (copy_dollar): Replace with...
427 * src/scan-gram.h (handle_dollar): this.
428 * src/parse-gram.y: Remove `%thong'.
429
430 * src/reader.c (copy_at): Replace with...
431 * src/scan-gram.h (handle_at): this.
432
433 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
434 New.
435
436 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
437 time being.
438
439 * src/reader.h, src/reader.c (grammar_rule_end): New.
440
441 * src/parse.y (current_type, current_class): New.
442 Implement `%nterm', `%token' support.
443 Merge `%term' into `%token'.
444 (string_as_id): New.
445 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
446 type name.
447
448 * src/parse-gram.y: Be sure to handle properly the beginning of
449 rules.
450
451 * src/parse-gram.y: Handle %type.
452 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
453
454 * src/parse-gram.y: More directives support.
455 * src/options.c: No longer handle source directives.
456
457 * src/parse-gram.y: Fix %output.
458
459 * src/parse-gram.y: Handle %union.
460 Use the prologue locations.
461 * src/reader.c (parse_union_decl): Remove.
462
463 * src/reader.h, src/reader.c (epilogue_set): New.
464 * src/parse-gram.y: Use it.
465
466 * data/bison.simple, data/bison.c++: b4_stype is now either not
467 defined, then default to int, or to the contents of %union,
468 without `union' itself.
469 Adjust.
470 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
471
472 * src/output.c (actions_output): Don't output braces, as they are
473 already handled by the scanner.
474
475 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
476 characters to themselves.
477
478 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
479 that the epilogue has a proper #line.
480
481 * src/parse-gram.y: Handle precedence/associativity.
482
483 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
484 a terminal.
485 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
486 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
487 at all to define terminals that cannot be emitted.
488
489 * src/scan-gram.l: Escape M4 characters.
490
491 * src/scan-gram.l: Working properly with escapes in user
492 strings/characters.
493
494 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
495 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
496 grammar.
497 Use more modest sizes, as for the time being the parser does not
498 release memory, and therefore the process swallows a huge amount
499 of memory.
500
501 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
502 stricter %token grammar.
503
504 * src/symtab.h (associativity): Add `undef_assoc'.
505 (symbol_precedence_set): Do nothing when passed an undef_assoc.
506 * src/symtab.c (symbol_check_alias_consistence): Adjust.
507
508 * tests/regression.at (Invalid %directive): Remove, as it is now
509 meaningless.
510 (Invalid inputs): Adjust to the new error messages.
511 (Token definitions): The new grammar doesn't allow too many
512 eccentricities.
513
514 * src/lex.h, src/lex.c: Remove.
515 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
516 (copy_character, copy_string2, copy_string, copy_identifier)
517 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
518 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
519 (parse_action): Remove.
520 * po/POTFILES.in: Adjust.
521
5222002-06-11 Akim Demaille <akim@epita.fr>
523
524 * src/reader.c (parse_action): Don't store directly into the
525 rule's action member: return the action as a string.
526 Don't require `rule_length' as an argument: compute it.
527 (grammar_current_rule_symbol_append)
528 (grammar_current_rule_action_append): New, eved out from
529 (readgram): here.
530 Remove `action_flag', `rulelength', unused now.
531
5322002-06-11 Akim Demaille <akim@epita.fr>
533
534 * src/reader.c (grammar_current_rule_prec_set).
535 (grammar_current_rule_check): New, eved out from...
536 (readgram): here.
537 Remove `xaction', `first_rhs': useless.
538 * tests/input.at (Type clashes): New.
539 * tests/existing.at (GNU Cim Grammar): Adjust.
540
5412002-06-11 Akim Demaille <akim@epita.fr>
542
543 * src/reader.c (grammar_midrule_action): New, Eved out from
544 (readgram): here.
545
5462002-06-11 Akim Demaille <akim@epita.fr>
547
548 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
549 New.
550 (readgram): Use them as replacement of inlined code, crule and
551 crule1.
552
5532002-06-11 Akim Demaille <akim@epita.fr>
554
555 * src/reader.c (grammar_end, grammar_symbol_append): New.
556 (readgram): Use them.
557 Make the use of `p' as local as possible.
558
5592002-06-10 Akim Demaille <akim@epita.fr>
560
561 GCJ's parser requires the tokens to be defined before the prologue.
562
563 * data/bison.simple: Output the token definition before the user's
564 prologue.
565 * tests/regression.at (Braces parsing, Duplicate string)
566 (Mixing %token styles): Check the output from bison.
567 (Early token definitions): New.
568
5692002-06-10 Akim Demaille <akim@epita.fr>
570
571 * src/symtab.c (symbol_user_token_number_set): Don't complain when
572 assigning twice the same user number to a token, so that we can
573 use it in...
574 * src/lex.c (lex): here.
575 Also use `symbol_class_set' instead of hand written code.
576 * src/reader.c (parse_assoc_decl): Likewise.
577
5782002-06-10 Akim Demaille <akim@epita.fr>
579
580 * src/symtab.c, src/symtab.c (symbol_class_set)
581 (symbol_user_token_number_set): New.
582 * src/reader.c (parse_token_decl): Use them.
583 Use a switch instead of ifs.
584 Use a single argument.
585
5862002-06-10 Akim Demaille <akim@epita.fr>
587
588 Remove `%thong' support as it is undocumented, unused, duplicates
589 `%token's job, and creates useless e-mail traffic with people who
590 want to know what it is, why it is undocumented, unused, and
591 duplicates `%token's job.
592
593 * src/reader.c (parse_thong_decl): Remove.
594 * src/options.c (option_table): Remove "thong".
595 * src/lex.h (tok_thong): Remove.
596
5972002-06-10 Akim Demaille <akim@epita.fr>
598
599 * src/symtab.c, src/symtab.c (symbol_type_set)
600 (symbol_precedence_set): New.
601 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
602 (value_components_used): Remove, unused.
603
6042002-06-09 Akim Demaille <akim@epita.fr>
605
606 Move symbols handling code out of the reader.
607
608 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
609 (axiom): Move to...
610 * src/symtab.h, src/symtab.c: here.
611
612 * src/gram.c (start_symbol): Remove: use startsymbol->number.
613 * src/reader.c (startval): Rename as...
614 * src/symtab.h, src/symtab.c (startsymbol): this.
615 * src/reader.c: Adjust.
616
617 * src/reader.c (symbol_check_defined, symbol_make_alias)
618 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
619 (token_translations_init)
620 Move to...
621 * src/symtab.c: here.
622 * src/reader.c (packsymbols): Move to...
623 * src/symtab.h, src/symtab.c (symbols_pack): here.
624 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
625 argument.
626
6272002-06-03 Akim Demaille <akim@epita.fr>
628
629 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
630 then statements.
631
6322002-06-03 Akim Demaille <akim@epita.fr>
633
634 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
635 structs with non literals.
636 * src/scan-skel.l: never-interactive.
637 * src/conflicts.c (enum conflict_resolution_e): No trailing
638 comma.
639 * src/getargs.c (usage): Split long literal strings.
640 Reported by Hans Aberg.
641
6422002-05-28 Akim Demaille <akim@epita.fr>
643
644 * data/bison.c++: Use C++ ostreams.
645 (cdebug_): New member.
646
6472002-05-28 Akim Demaille <akim@epita.fr>
648
649 * src/output.c (output_skeleton): Be sure to allocate enough room
650 for `/' _and_ for `\0' in full_skeleton.
651
6522002-05-28 Akim Demaille <akim@epita.fr>
653
654 * data/bison.c++: Catch up with bison.simple:
655 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
656 and Paul Eggert <eggert@twinsun.com>: `error' handing.
657 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
658 and popping traces.
659
6602002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
661
662 * src/output.c (output_skeleton): Put an explicit path in front of
663 the skeleton file name, rather than relying on the -I directory,
664 to partially alleviate effects of having a skeleton file lying around
665 in the current directory.
666
6672002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
668
669 * src/conflicts.c (log_resolution): Correct typo:
670 obstack_printf should be obstack_fgrow1.
671
6722002-05-26 Akim Demaille <akim@epita.fr>
673
674 * src/state.h (state_t): `solved_conflicts' is a new member.
675 * src/LR0.c (new_state): Set it to 0.
676 * src/conflicts.h, src/conflicts.c (print_conflicts)
677 (free_conflicts, solve_conflicts): Rename as...
678 (conflicts_print, conflicts_free, conflicts_solve): these.
679 Adjust callers.
680 * src/conflicts.c (enum conflict_resolution_e)
681 (solved_conflicts_obstack): New, used by...
682 (log_resolution): this.
683 Adjust to attach the conflict resolution to each state.
684 Complete the description with the precedence/associativity
685 information.
686 (resolve_sr_conflict): Adjust.
687 * src/print.c (print_state): Output its solved_conflicts.
688 * tests/conflicts.at (Unresolved SR Conflicts)
689 (Solved SR Conflicts): Exercise --report=all.
690
6912002-05-26 Akim Demaille <akim@epita.fr>
692
693 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
694 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
695 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
696 (token_number_t, item_number_as_token_number)
697 (token_number_as_item_number, muscle_insert_token_number_table):
698 Rename as...
699 (symbol_number_t, item_number_as_symbol_number)
700 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
701 these, since it is more appropriate.
702
7032002-05-26 Akim Demaille <akim@epita.fr>
704
705 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
706 `Error:' lines.
707 * data/bison.simple (yystos) [YYDEBUG]: New.
708 (yyparse) [YYDEBUG]: Display the symbols which are popped during
709 error recovery.
710 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
711
7122002-05-25 Akim Demaille <akim@epita.fr>
713
714 * doc/bison.texinfo (Debugging): Split into...
715 (Tracing): this new section, its former contents, and...
716 (Understanding): this new section.
717 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
718 by...
719 (report_flag): this.
720 Adjust all dependencies.
721 (report_args, report_types, report_argmatch): New.
722 (usage, getargs): Report/support -r, --report.
723 * src/options.h
724 (struct option_table_struct): Rename as..,
725 (struct option_table_s): this.
726 Rename the `set_flag' member to `flag' to match with getopt_long's
727 struct.
728 * src/options.c (option_table): Split verbose into an entry for
729 %verbose, and another for --verbose.
730 Support --report/-r, so remove -r from the obsolete --raw.
731 * src/print.c: Attach full item sets and lookaheads reports to
732 report_flag instead of trace_flag.
733 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
734
7352002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
736 and Paul Eggert <eggert@twinsun.com>
737
738 * data/bison.simple (yyparse): Correct error handling to conform to
739 POSIX and yacc. Specifically, after syntax error is discovered,
740 do not reduce further before shifting the error token.
741 Clean up the code a bit by removing the labels yyerrdefault,
742 yyerrhandle, yyerrpop.
743 * NEWS: Document the above.
744
7452002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
746
747 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
748 type; it isn't always big enough, since it doesn't necessarily
749 include non-terminals.
750 (yytranslate): Expand definition of yy_token_number_type, so that
751 the latter can be removed.
752 (yy_token_number_type): Remove, only one use.
753 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
754 don't use TokenNumberType as element type.
755
756 * tests/regression.at: Modify expected output to agree with change
757 to yyr1 and yytranslate.
758
7592002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
760
761 * src/reader.c (parse_action): Use copy_character instead of
762 obstack_1grow.
763
7642002-05-13 Akim Demaille <akim@epita.fr>
765
766 * tests/regression.at (Token definitions): Prototype yylex and
767 yyerror.
768
7692002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
770
771 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
772 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
773 32-bit arithmetic.
774 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
775
7762002-05-07 Akim Demaille <akim@epita.fr>
777
778 * tests/synclines.at: Be sure to prototype yylex and yyerror to
779 avoid GCC warnings.
780
7812002-05-07 Akim Demaille <akim@epita.fr>
782
783 Kill GCC warnings.
784
785 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
786 over the RHS of each rule.
787 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
788 * src/state.h (state_t): Member `nitems' is unsigned short.
789 * src/LR0.c (get_state): Adjust.
790 * src/reader.c (packgram): Likewise.
791 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
792 `Type'.
793 (muscle_insert_int_table): Remove, unused.
794 (prepare_rules): Remove `max'.
795
7962002-05-06 Akim Demaille <akim@epita.fr>
797
798 * src/closure.c (print_firsts): Display of the symbol tags.
799 (bitmatrix_print): Move to...
800 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
801 here.
802 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
803
8042002-05-06 Akim Demaille <akim@epita.fr>
805
806 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
807 hash_do_for_each.
808
8092002-05-06 Akim Demaille <akim@epita.fr>
810
811 * src/LR0.c (new_state, get_state): Instead of using the global
812 `kernel_size' and `kernel_base', have two new arguments:
813 `core_size' and `core'.
814 Adjust callers.
815
8162002-05-06 Akim Demaille <akim@epita.fr>
817
818 * src/reader.c (packgram): No longer end `ritem' with a 0
819 sentinel: it is not used.
820
8212002-05-05 Akim Demaille <akim@epita.fr>
822
823 New experimental feature: display the lookaheads in the report and
824 graph.
825
826 * src/print (print_core): When --trace-flag, display the rules
827 lookaheads.
828 * src/print_graph.c (print_core): Likewise.
829 Swap the arguments.
830 Adjust caller.
831
8322002-05-05 Akim Demaille <akim@epita.fr>
833
834 * tests/torture.at (Many lookaheads): New test.
835
8362002-05-05 Akim Demaille <akim@epita.fr>
837
838 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
839 (GENERATE_MUSCLE_INSERT_TABLE): this.
840 (output_int_table, output_unsigned_int_table, output_short_table)
841 (output_token_number_table, output_item_number_table): Replace with...
842 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
843 (muscle_insert_short_table, muscle_insert_token_number_table)
844 (muscle_insert_item_number_table): these.
845 Adjust all callers.
846 (prepare_tokens): Don't free `translations', since...
847 * src/reader.h, src/reader.c (grammar_free): do it.
848 Move to...
849 * src/gram.h, src/gram.c (grammar_free): here.
850 * data/bison.simple, data/bison.c++: b4_token_number_max is now
851 b4_translate_max.
852
8532002-05-05 Akim Demaille <akim@epita.fr>
854
855 * src/output.c (output_unsigned_int_table): New.
856 (prepare_rules): `i' is unsigned.
857 `prhs', `rline', `r2' are unsigned int.
858 Rename muscle `rhs_number_max' as `rhs_max'.
859 Output muscles `prhs_max', `rline_max', and `r2_max'.
860 Free rline and r1.
861 * data/bison.simple, data/bison.c++: Adjust to use these muscles
862 to compute types instead of constant types.
863 * tests/regression.at (Web2c Actions): Adjust.
864
8652002-05-04 Akim Demaille <akim@epita.fr>
866
867 * src/symtab.h (SALIAS, SUNDEF): Rename as...
868 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
869 Adjust dependencies.
870 * src/output.c (token_definitions_output): Be sure not to output a
871 `#define 'a'' when fed with `%token 'a' "a"'.
872 * tests/regression.at (Token definitions): New.
873
8742002-05-03 Paul Eggert <eggert@twinsun.com>
875
876 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
877 for K&R C.
878
8792002-05-03 gettextize <bug-gnu-gettext@gnu.org>
880
881 * Makefile.am (SUBDIRS): Remove intl.
882 (EXTRA_DIST): Add config/config.rpath.
883
8842002-05-03 Akim Demaille <akim@epita.fr>
885
886 * data/bison.simple (m4_if): Don't output empty enums.
887 And actually, output valid enum definitions :(.
888
8892002-05-03 Akim Demaille <akim@epita.fr>
890
891 * configure.bat: Remove, completely obsolete.
892 * Makefile.am (EXTRA_DIST): Adjust.
893 Don't distribute config.rpath...
894 * config/Makefile.am (EXTRA_DIST): Do it.
895
8962002-05-03 Akim Demaille <akim@epita.fr>
897
898 * configure.in (GETTEXT_VERSION): New.
899 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
900
9012002-05-03 Akim Demaille <akim@epita.fr>
902
903 * data/bison.simple (b4_token_enum): New.
904 (b4_token_defines): Use it to output tokens both as #define and
905 enums.
906 Suggested by Paul Eggert.
907 * src/output.c (token_definitions_output): Don't output spurious
908 white spaces.
909
9102002-05-03 Akim Demaille <akim@epita.fr>
911
912 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
913
9142002-05-02 Robert Anisko <robert@lrde.epita.fr>
915
916 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
917 Update the stack class, give a try to deque as the default container.
918
9192002-05-02 Akim Demaille <akim@epita.fr>
920
921 * data/bison.simple (yyparse): Do not implement @$ = @1.
922 (YYLLOC_DEFAULT): Adjust to do it.
923 * doc/bison.texinfo (Location Default Action): Fix.
924
9252002-05-02 Akim Demaille <akim@epita.fr>
926
927 * src/reader.c (parse_braces): Merge into...
928 (parse_action): this.
929
9302002-05-02 Akim Demaille <akim@epita.fr>
931
932 * configure.in (ALL_LINGUAS): Remove.
933 * po/LINGUAS, hr.po: New.
934
9352002-05-02 Akim Demaille <akim@epita.fr>
936
937 Remove the so called hairy (semantic) parsers.
938
939 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
940 * src/gram.h, src/gram.c (semantic_parser): Remove.
941 (rule_t): Remove the guard and guard_line members.
942 * src/lex.h (token_t): remove tok_guard.
943 * src/options.c (option_table): Remove %guard and %semantic_parser
944 support.
945 * src/output.c, src/output.h (guards_output): Remove.
946 (prepare): Adjust.
947 (token_definitions_output): Don't output the `T'
948 tokens (???).
949 (output_skeleton): Don't output the guards.
950 * src/files.c, src/files.c (attrsfile): Remove.
951 * src/reader.c (symbol_list): Remove the guard and guard_line
952 members.
953 Adjust dependencies.
954 (parse_guard): Remove.
955 * data/bison.hairy: Remove.
956 * doc/bison.texinfo (Environment Variables): Remove occurrences of
957 BISON_HAIRY.
958
9592002-05-02 Akim Demaille <akim@epita.fr>
960
961 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
962 (parse_guard): Rename the formal argument `stack_offset' as
963 `rule_length', which is more readable.
964 Adjust callers.
965 (copy_at, copy_dollar): Instead of outputting the hard coded
966 values of $$, $n and so forth, output invocation to b4_lhs_value,
967 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
968 Note: this patch partially drops `semantic-parser' support: it
969 always does `rule_length - n', where semantic parsers ought to
970 always use `-n'.
971 * data/bison.simple, data/bison.c++ (b4_lhs_value)
972 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
973
9742002-05-02 Akim Demaille <akim@epita.fr>
975
976 * configure.in (AC_INIT): Bump to 1.49b.
977 (AM_INIT_AUTOMAKE): Short invocation.
978
9792002-05-02 Akim Demaille <akim@epita.fr>
980
981 Version 1.49a.
982
9832002-05-01 Akim Demaille <akim@epita.fr>
984
985 * src/skeleton.h: Remove.
986
9872002-05-01 Akim Demaille <akim@epita.fr>
988
989 * src/skeleton.h: Fix the #endif.
990 Reported by Magnus Fromreide.
991
9922002-04-26 Paul Eggert <eggert@twinsun.com>
993
994 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
995 Define if we define YYSTYPE and YYLTYPE, respectively.
996 (YYCOPY): Fix [] quoting problem in the non-GCC case.
997
9982002-04-25 Robert Anisko <robert@lrde.epita.fr>
999
1000 * src/scan-skel.l: Postprocess quadrigraphs.
1001
1002 * src/reader.c (copy_character): New function, used to output
1003 single characters while replacing `[' and `]' with quadrigraphs, to
1004 avoid troubles with M4 quotes.
1005 (copy_comment): Output characters with copy_character.
1006 (read_additionnal_code): Likewise.
1007 (copy_string2): Likewise.
1008 (copy_definition): Likewise.
1009
1010 * tests/calc.at: Exercise M4 quoting.
1011
10122002-04-25 Akim Demaille <akim@epita.fr>
1013
1014 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
1015 between `!' and the command.
1016 Reported by Paul Eggert.
1017
10182002-04-24 Robert Anisko <robert@lrde.epita.fr>
1019
1020 * tests/calc.at: Exercise prologue splitting.
1021
1022 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
1023 `b4_post_prologue' instead of `b4_prologue'.
1024
1025 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
1026 muscles.
1027 (output): Free pre_prologue_obstack and post_prologue_obstack.
1028 * src/files.h, src/files.c (attrs_obstack): Remove.
1029 (pre_prologue_obstack, post_prologue_obstack): New.
1030 * src/reader.c (copy_definition): Add a parameter to specify the
1031 obstack to fill, instead of using attrs_obstack unconditionally.
1032 (read_declarations): Pass pre_prologue_obstack to copy_definition if
1033 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
1034
10352002-04-23 Paul Eggert <eggert@twinsun.com>
1036
1037 * data/bison.simple: Remove unnecessary commentary and white
1038 space differences from 1_29-branch.
1039 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
1040
1041 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
1042 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
1043 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
1044 constructors or destructors.
1045
1046 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
1047
10482002-04-23 Akim Demaille <akim@epita.fr>
1049
1050 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
1051 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
1052 location with columns.
1053 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
1054 All reported by Paul Eggert.
1055
10562002-04-22 Akim Demaille <akim@epita.fr>
1057
1058 * src/reduce.c (dump_grammar): Move to...
1059 * src/gram.h, src/gram.c (grammar_dump): here.
1060 Be sure to separate long item numbers.
1061 Don't read the members of a rule's prec if its nil.
1062
10632002-04-22 Akim Demaille <akim@epita.fr>
1064
1065 * src/output.c (table_size, table_grow): New.
1066 (MAXTABLE): Remove, replace uses with table_size.
1067 (pack_vector): Instead of dying when the table is too big, grow it.
1068
10692002-04-22 Akim Demaille <akim@epita.fr>
1070
1071 * data/bison.simple (yyr1): Its type is that of a token number.
1072 * data/bison.c++ (r1_): Likewise.
1073 * tests/regression.at (Web2c Actions): Adjust.
1074
10752002-04-22 Akim Demaille <akim@epita.fr>
1076
1077 * src/reader.c (token_translations_init): 256 is now the default
1078 value for the error token, i.e., it will be assigned another
1079 number if the user assigned 256 to one of her tokens.
1080 (reader): Don't force 256 to error.
1081 * doc/bison.texinfo (Symbols): Adjust.
1082 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
1083 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
1084 etc. instead of 10, 20, 30 (which was used to `jump' over error
1085 (256) and undefined (2)).
1086
10872002-04-22 Akim Demaille <akim@epita.fr>
1088
1089 Propagate more token_number_t.
1090
1091 * src/gram.h (token_number_as_item_number)
1092 (item_number_as_token_number): New.
1093 * src/output.c (GENERATE_OUTPUT_TABLE): New.
1094 Use it to create output_item_number_table and
1095 output_token_number_table.
1096 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
1097 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
1098 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
1099 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
1100
11012002-04-22 Akim Demaille <akim@epita.fr>
1102
1103 * src/output.h, src/output.c (get_lines_number): Remove.
1104
11052002-04-19 Akim Demaille <akim@epita.fr>
1106
1107 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
1108 as Lex/Flex'.
1109 (Debugging): More details about enabling the debugging features.
1110 (Table of Symbols): Describe $$, $n, @$, and @n.
1111 Suggested by Tim Josling.
1112
11132002-04-19 Akim Demaille <akim@epita.fr>
1114
1115 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
1116
11172002-04-10 Akim Demaille <akim@epita.fr>
1118
1119 * src/system.h: Rely on HAVE_LIMITS_H.
1120 Suggested by Paul Eggert.
1121
11222002-04-09 Akim Demaille <akim@epita.fr>
1123
1124 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
1125 full stderr, and strip it according to the bison options, instead
1126 of composing the error message from different bits.
1127 This makes it easier to check for several error messages.
1128 Adjust all the invocations.
1129 Add an invocation exercising the error token.
1130 Add an invocation demonstrating a stupid error message.
1131 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
1132 Adjust the tests.
1133 Error message are for stderr, not stdout.
1134
11352002-04-09 Akim Demaille <akim@epita.fr>
1136
1137 * src/gram.h, src/gram.c (error_token_number): Remove, use
1138 errtoken->number.
1139 * src/reader.c (reader): Don't specify the user token number (2)
1140 for $undefined, as it uselessly prevents using it.
1141 * src/gram.h (token_number_t): Move to...
1142 * src/symtab.h: here.
1143 (state_t.number): Is a token_number_t.
1144 * src/print.c, src/reader.c: Use undeftoken->number instead of
1145 hard coded 2.
1146 (Even though this 2 is not the same as above: the number of the
1147 undeftoken remains being 2, it is its user token number which
1148 might not be 2).
1149 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
1150 `user_token_number_max'.
1151 Output `undef_token_number'.
1152 * data/bison.simple, data/bison.c++: Use them.
1153 Be sure to map invalid yylex return values to
1154 `undef_token_number'. This saves us from gratuitous SEGV.
1155
1156 * tests/conflicts.at (Solved SR Conflicts)
1157 (Unresolved SR Conflicts): Adjust.
1158 * tests/regression.at (Web2c Actions): Adjust.
1159
11602002-04-08 Akim Demaille <akim@epita.fr>
1161
1162 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
1163 Adding #line.
1164 Remove the duplicate `typedefs'.
1165 (RhsNumberType): Fix the declaration and various other typos.
1166 Use __ofile__.
1167 * data/bison.simple: Use __ofile__.
1168 * src/scan-skel.l: Handle __ofile__.
1169
11702002-04-08 Akim Demaille <akim@epita.fr>
1171
1172 * src/gram.h (item_number_t): New, the type of item numbers in
1173 RITEM. Note that it must be able to code symbol numbers as
1174 positive number, and the negation of rule numbers as negative
1175 numbers.
1176 Adjust all dependencies (pretty many).
1177 * src/reduce.c (rule): Remove this `short *' pointer: use
1178 item_number_t.
1179 * src/system.h (MINSHORT, MAXSHORT): Remove.
1180 Include `limits.h'.
1181 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
1182 (shortcpy): Remove.
1183 (MAXTABLE): Move to...
1184 * src/output.c (MAXTABLE): here.
1185 (prepare_rules): Use output_int_table to output rhs.
1186 * data/bison.simple, data/bison.c++: Adjust.
1187 * tests/torture.at (Big triangle): Move the limit from 254 to
1188 500.
1189 * tests/regression.at (Web2c Actions): Ajust.
1190
1191 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
1192 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
1193 passes, but produces negative #line number, once fixed, GCC is
1194 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
1195 C), it passes.
1196 * src/state.h (state_h): Code input lines on ints, not shorts.
1197
11982002-04-08 Akim Demaille <akim@epita.fr>
1199
1200 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
1201 and then the grammar.
1202
12032002-04-08 Akim Demaille <akim@epita.fr>
1204
1205 * src/system.h: No longer using strndup.
1206
12072002-04-07 Akim Demaille <akim@epita.fr>
1208
1209 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
1210 * src/output.c (output_table_data): Return the longest number.
1211 (prepare_tokens): Output `token_number_max').
1212 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
1213 New.
1214 Use them to define yy_token_number_type/TokenNumberType.
1215 Use this type for yytranslate.
1216 * tests/torture.at (Big triangle): Push the limit from 124 to
1217 253.
1218 * tests/regression.at (Web2c Actions): Adjust.
1219
12202002-04-07 Akim Demaille <akim@epita.fr>
1221
1222 * tests/torture.at (Big triangle): New.
1223 (GNU AWK Grammar, GNU Cim Grammar): Move to...
1224 * tests/existing.at: here.
1225
12262002-04-07 Akim Demaille <akim@epita.fr>
1227
1228 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
1229 nritems.
1230 Adjust dependencies.
1231
12322002-04-07 Akim Demaille <akim@epita.fr>
1233
1234 * src/reader.c: Normalize increments to prefix form.
1235
12362002-04-07 Akim Demaille <akim@epita.fr>
1237
1238 * src/reader.c, symtab.c: Remove debugging code.
1239
12402002-04-07 Akim Demaille <akim@epita.fr>
1241
1242 Rename all the `bucket's as `symbol_t'.
1243
1244 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
1245 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
1246 * src/symtab.c, src/symtab.h (bucket): Rename as...
1247 (symbol_t): this.
1248 (symbol_list_new, bucket_check_defined, bucket_make_alias)
1249 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
1250 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
1251 (buckets_new, buckets_free, buckets_do): Rename as...
1252 (symbol_list_new, symbol_check_defined, symbol_make_alias)
1253 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
1254 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
1255 (symbols_new, symbols_free, symbols_do): these.
1256
12572002-04-07 Akim Demaille <akim@epita.fr>
1258
1259 Use lib/hash for the symbol table.
1260
1261 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
1262 EOF.
1263 * src/lex.c (lex): Set the `number' member of new terminals.
1264 * src/reader.c (bucket_check_defined, bucket_make_alias)
1265 (bucket_check_alias_consistence, bucket_translation): New.
1266 (reader, grammar_free, readgram, token_translations_init)
1267 (packsymbols): Adjust.
1268 (reader): Number the predefined tokens.
1269 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
1270 for predefined tokens.
1271 * src/symtab.h (bucket): Remove all the hash table related
1272 members.
1273 * src/symtab.c (symtab): Replace by...
1274 (bucket_table): this.
1275 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
1276 (buckets_new, buckets_do): New.
1277
12782002-04-07 Akim Demaille <akim@epita.fr>
1279
1280 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
1281 (start_symbol, max_user_token_number, semantic_parser)
1282 (error_token_number): Initialize.
1283 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
1284 Initialize.
1285 (reader): Don't.
1286 (errtoken, eoftoken, undeftoken, axiom): Extern.
1287
12882002-04-07 Akim Demaille <akim@epita.fr>
1289
1290 * src/gram.h (rule_s): prec and precsym are now pointers
1291 to the bucket giving the priority/associativity.
1292 Member `associativity' removed: useless.
1293 * src/reduce.c, src/conflicts.c: Adjust.
1294
12952002-04-07 Akim Demaille <akim@epita.fr>
1296
1297 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
1298 Properly escape the symbols' TAG when outputting them.
1299
13002002-04-07 Akim Demaille <akim@epita.fr>
1301
1302 * src/lalr.h (LA): Is a bitsetv, not bitset*.
1303
13042002-04-07 Akim Demaille <akim@epita.fr>
1305
1306 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
1307 (LArule): this, which is an array to rule_t*.
1308 * src/print.c, src/conflicts.c: Adjust.
1309
13102002-04-07 Akim Demaille <akim@epita.fr>
1311
1312 * src/gram.h (rule_t): Rename `number' as `user_number'.
1313 `number' is a new member.
1314 Adjust dependencies.
1315 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
1316
13172002-04-07 Akim Demaille <akim@epita.fr>
1318
1319 As a result of the previous patch, it is no longer needed
1320 to reorder ritem itself.
1321
1322 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
1323
13242002-04-07 Akim Demaille <akim@epita.fr>
1325
1326 Be sure never to walk through RITEMS, but use only data related to
1327 the rules themselves. RITEMS should be banished.
1328
1329 * src/output.c (output_token_translations): Rename as...
1330 (prepare_tokens): this.
1331 In addition to `translate', prepare the muscles `tname' and
1332 `toknum', which were handled by...
1333 (output_rule_data): this.
1334 Remove, and move the remainder of its outputs into...
1335 (prepare_rules): this new routines, which also merges content from
1336 (output_gram): this.
1337 (prepare_rules): Be sure never to walk through RITEMS.
1338 (output_stos): Rename as...
1339 (prepare_stos): this.
1340 (output): Always invoke prepare_states, after all, just don't use it
1341 in the output if you don't need it.
1342
13432002-04-07 Akim Demaille <akim@epita.fr>
1344
1345 * src/LR0.c (new_state): Display `nstates' as the name of the
1346 newly created state.
1347 Adjust to initialize first_state and last_state if needed.
1348 Be sure to distinguish the initial from the final state.
1349 (new_states): Create the itemset of the initial state, and use
1350 new_state.
1351 * src/closure.c (closure): Now that the initial state has its
1352 items properly set, there is no need for a special case when
1353 creating `ruleset'.
1354
1355 As a result, now the rule 0, reducing to $axiom, is visible in the
1356 outputs. Adjust the test suite.
1357
1358 * tests/conflicts.at (Solved SR Conflicts)
1359 (Unresolved SR Conflicts): Adjust.
1360 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
1361 * tests/conflicts.at (S/R in initial): New.
1362
13632002-04-07 Akim Demaille <akim@epita.fr>
1364
1365 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
1366 the RHS of the rules.
1367 * src/output.c (output_gram): Likewise.
1368
13692002-04-07 Akim Demaille <akim@epita.fr>
1370
1371 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
1372 bucket.
1373 Adjust all dependencies.
1374 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
1375 `number' of the buckets too.
1376 * src/gram.h: Include `symtab.h'.
1377 (associativity): Move to...
1378 * src/symtab.h: here.
1379 No longer include `gram.h'.
1380
13812002-04-07 Akim Demaille <akim@epita.fr>
1382
1383 * src/gram.h, src/gram.c (rules_rhs_length): New.
1384 (ritem_longest_rhs): Use it.
1385 * src/gram.h (rule_t): `number' is a new member.
1386 * src/reader.c (packgram): Set it.
1387 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
1388 the end of `rules', and count them out of `nrules'.
1389 (reduce_output, dump_grammar): Adjust.
1390 * src/print.c (print_grammar): It is no longer needed to check for
1391 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
1392 * tests/reduce.at (Reduced Automaton): New test.
1393
13942002-04-07 Akim Demaille <akim@epita.fr>
1395
1396 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
1397 lacking `+ 1' to nrules, Bison reported as useless a token if it
1398 was used solely to set the precedence of the last rule...
1399
14002002-04-07 Akim Demaille <akim@epita.fr>
1401
1402 * data/bison.c++, data/bison.simple: Don't output the current file
1403 name in #line, to avoid useless diffs between two identical
1404 outputs under different names.
1405
14062002-04-07 Akim Demaille <akim@epita.fr>
1407
1408 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
1409 Normalize loops to using `< nrules + 1', not `<= nrules'.
1410
14112002-04-07 Akim Demaille <akim@epita.fr>
1412
1413 * TODO: Update.
1414
14152002-04-07 Akim Demaille <akim@epita.fr>
1416
1417 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
1418 bucket.value as bucket.number.
1419
14202002-04-07 Akim Demaille <akim@epita.fr>
1421
1422 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
1423 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
1424 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
1425 RHS, instead of being an index in RITEMS.
1426
14272002-04-04 Paul Eggert <eggert@twinsun.com>
1428
1429 * doc/bison.texinfo: Update copyright date.
1430 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
1431 (Symbols): Warn about running Bison in one character set,
1432 but compiling and/or running in an incompatible one.
1433 Warn about character code 256, too.
1434
14352002-04-03 Paul Eggert <eggert@twinsun.com>
1436
1437 * src/bison.data (YYSTACK_ALLOC): Depend on whether
1438 YYERROR_VERBOSE is nonzero, not whether it is defined.
1439
1440 Merge changes from bison-1_29-branch.
1441
14422002-03-20 Paul Eggert <eggert@twinsun.com>
1443
1444 Merge fixes from Debian bison_1.34-1.diff.
1445
1446 * configure.in (AC_PREREQ): 2.53.
1447
14482002-03-20 Akim Demaille <akim@epita.fr>
1449
1450 * src/conflicts.c (log_resolution): Argument `resolution' is const.
1451
14522002-03-19 Paul Eggert <eggert@twinsun.com>
1453
1454 * src/bison.simple (YYCOPY): New macro.
1455 (YYSTACK_RELOCATE): Use it.
1456 Remove Type arg; no longer needed. All callers changed.
1457 (yymemcpy): Remove; no longer needed.
1458
1459 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
1460 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1461
14622002-03-19 Akim Demaille <akim@epita.fr>
1463
1464 Test and fix the #line outputs.
1465
1466 * tests/atlocal.at (GCC): New.
1467 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
1468 (Prologue synch line, ,%union synch line, Postprologue synch line)
1469 (Action synch line, Epilogue synch line): New tests.
1470 * src/reader.c (parse_union_decl): Define the muscle stype_line.
1471 * data/bison.simple, data/bison.c++: Use it.
1472
14732002-03-19 Akim Demaille <akim@epita.fr>
1474
1475 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
1476 (Solved SR Conflicts, %expect not enough, %expect right)
1477 (%expect too much): Move to...
1478 * tests/conflicts.at: this new file.
1479
14802002-03-19 Akim Demaille <akim@epita.fr>
1481
1482 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
1483 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
1484 that we can move to enums for instance.
1485 * src/output.c (token_definitions_output): Output a list of
1486 `token-name, token-number' instead of the #define.
1487 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
1488
14892002-03-14 Akim Demaille <akim@epita.fr>
1490
1491 Use Gettext 0.11.1.
1492
14932002-03-09 Robert Anisko <robert@lrde.epita.fr>
1494
1495 * data/bison.c++: Make the user able to add members to the generated
1496 parser by subclassing.
1497
14982002-03-05 Robert Anisko <robert@lrde.epita.fr>
1499
1500 * src/reader.c (read_additionnal_code): `c' should be an integer, not
1501 a character.
1502 Reported by Nicolas Tisserand and Nicolas Burrus.
1503
15042002-03-04 Robert Anisko <robert@lrde.epita.fr>
1505
1506 * src/reader.c: Warn about lacking semi-colons, do not complain.
1507
15082002-03-04 Robert Anisko <robert@lrde.epita.fr>
1509
1510 * data/bison.c++: Remove a debug line.
1511
15122002-03-04 Robert Anisko <robert@lrde.epita.fr>
1513
1514 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
1515 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
1516 provide a default implementation.
1517
15182002-03-04 Akim Demaille <akim@epita.fr>
1519
1520 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
1521 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
1522 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
1523 * tests/semantic.at (Parsing Guards): Similarly.
1524 * src/reader.at (readgram): Complain if the last rule is not ended
1525 with a semi-colon.
1526
15272002-03-04 Akim Demaille <akim@epita.fr>
1528
1529 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
1530 * src/closure.c: here.
1531 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
1532 RTC.
1533 * src/warshall.h, src/warshall.c: Remove.
1534 * tests/sets.at (Broken Closure): Adjust.
1535
15362002-03-04 Akim Demaille <akim@epita.fr>
1537
1538 * src/output.c (output_skeleton): tempdir is const.
1539 bytes_read is unused.
1540
15412002-03-04 Akim Demaille <akim@epita.fr>
1542
1543 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1544 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
1545 Update.
1546 From Michael Hayes.
1547
15482002-03-04 Akim Demaille <akim@epita.fr>
1549
1550 * src/closure.c (closure): `r' is unused.
1551
15522002-03-04 Akim Demaille <akim@epita.fr>
1553
1554 * tests/sets.at (Broken Closure): Add the ending `;'.
1555 * src/reader.at (readgram): Complain if a rule is not ended with a
1556 semi-colon.
1557
15582002-03-04 Akim Demaille <akim@epita.fr>
1559
1560 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
1561 (count_sr_conflicts): Use bitset_count.
1562 * src/reduce.c (inaccessable_symbols): Ditto.
1563 (bits_size): Remove.
1564 * src/warshall.h, src/warshall.c: Convert to bitsetv.
1565
15662002-03-04 Akim Demaille <akim@epita.fr>
1567
1568 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
1569 * src/reduce.c: Remove the `bitset_zero's following the
1570 `bitset_create's, as now it is performed by the latter.
1571
15722002-03-04 Akim Demaille <akim@epita.fr>
1573
1574 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
1575 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
1576 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
1577 latest sources from Michael.
1578
15792002-03-04 Akim Demaille <akim@epita.fr>
1580
1581 * src/output.c (output): Don't free the grammar.
1582 * src/reader.c (grammar_free): New.
1583 * src/main.c (main): Call it and don't free symtab here.
1584
15852002-03-04 Akim Demaille <akim@epita.fr>
1586
1587 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
1588 before returning.
1589 Reported by Benoit Perrot.
1590
15912002-03-04 Akim Demaille <akim@epita.fr>
1592
1593 Use bitset operations when possible, not loops over bits.
1594
1595 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
1596 bitset_or.
1597 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
1598 * src/reduce.c (useless_nonterminals): Formatting changes.
1599 * src/warshall.c (TC): Use bitset_or.
1600
16012002-03-04 Akim Demaille <akim@epita.fr>
1602
1603 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
1604 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
1605 Ditto.
1606
16072002-03-04 Akim Demaille <akim@epita.fr>
1608
1609 * src/lalr.c (F): Now a bitset*.
1610 Adjust all dependencies.
1611
16122002-03-04 Akim Demaille <akim@epita.fr>
1613
1614 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
1615 Adjust all dependencies.
1616
16172002-03-04 Akim Demaille <akim@epita.fr>
1618
1619 * src/L0.c, src/LR0.h (nstates): Be size_t.
1620 Adjust comparisons (signed vs unsigned).
1621 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
1622 bitset*.
1623 Adjust all dependencies.
1624
16252002-03-04 Akim Demaille <akim@epita.fr>
1626
1627 * src/closure.c (firsts): Now, also a bitset.
1628 Adjust all dependencies.
1629 (varsetsize): Remove, now unused.
1630 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
1631
16322002-03-04 Akim Demaille <akim@epita.fr>
1633
1634 * src/print.c: Convert to use bitset.h, not hand coded iterations
1635 over ints.
1636
16372002-03-04 Akim Demaille <akim@epita.fr>
1638
1639 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1640
16412002-03-04 Akim Demaille <akim@epita.fr>
1642
1643 * src/closure.c (ruleset): Be a bitset.
1644 (rulesetsize): Remove.
1645
16462002-03-04 Akim Demaille <akim@epita.fr>
1647
1648 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1649 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1650 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1651 * src/closure.c (fderives): Be an array of bitsets.
1652
16532002-02-28 Robert Anisko <robert@lrde.epita.fr>
1654
1655 * data/bison.c++: Merge the two generated headers. Insert a copyright
1656 notice in each output file.
1657
16582002-02-28 Akim Demaille <akim@epita.fr>
1659
1660 * data/bison.c++: Copy the prologue of bison.simple to fetch
1661 useful M4 definitions, such as b4_header_guard.
1662
16632002-02-25 Akim Demaille <akim@epita.fr>
1664
1665 * src/getargs.c (version): Give the name of the authors, and use a
1666 translator friendly scheme for the bgr
1667 copyright notice.
1668
16692002-02-25 Akim Demaille <akim@epita.fr>
1670
1671 * src/output.c (header_output): Remove, now handled completely via
1672 M4.
1673
16742002-02-25 Akim Demaille <akim@epita.fr>
1675
1676 * m4/m4.m4: New, from CVS Autoconf.
1677 * configure.in: Invoke it.
1678 * src/output.c (output_skeleton): Use its result instead of the
1679 hard coded name.
1680
16812002-02-25 Akim Demaille <akim@epita.fr>
1682
1683 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1684 Fileutils 4.1.5.
1685 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1686 * src/output.c (output_skeleton): Use mkstemp to create a real
1687 temporary file.
1688 Move the filling of `skeleton' and its muscle to...
1689 (prepare): here.
1690 (output): Move the definition of the prologue muscle to...
1691 (prepare): here.
1692 * src/system.h (DEFAULT_TMPDIR): New.
1693
16942002-02-14 Paul Eggert <eggert@twinsun.com>
1695
1696 Remove the support for C++ namespace cleanliness; it was
1697 causing more problems than it was curing, since it didn't work
1698 properly on some nonstandard C++ compilers. This can wait
1699 for a proper C++ parser.
1700
1701 * NEWS: Document this.
1702 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1703 of C++, as it's treated like C now.
1704 * src/bison.simple (YYSTD): Remove.
1705 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1706 Treat C++ just like Standard C instead of trying to support
1707 namespace cleanliness.
1708
17092002-02-14 Akim Demaille <akim@epita.fr>
1710
1711 * tests/regression.at (else): Adjust to Andreas' change.
1712
17132002-02-14 Akim Demaille <akim@epita.fr>
1714
1715 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1716
17172002-02-13 Andreas Schwab <schwab@suse.de>
1718
1719 * src/output.c (output_rule_data): Don't output NULL, it might
1720 not be defined yet.
1721
17222002-02-11 Robert Anisko <robert@lrde.epita.fr>
1723
1724 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1725 (Copyright notice): Update.
1726
17272002-02-11 Akim Demaille <akim@epita.fr>
1728
1729 * tests/regression.at (%nonassoc and eof): Don't include
1730 nonportable headers.
1731
17322002-02-08 Robert Anisko <robert@lrde.epita.fr>
1733
1734 * data/bison.c++: Correct error recovery. Make the user able to
1735 initialize the starting location.
1736
17372002-02-07 Akim Demaille <akim@epita.fr>
1738
1739 * tests/input.at: New.
1740
17412002-02-07 Robert Anisko <robert@lrde.epita.fr>
1742
1743 * data/bison.c++: Replace some direct m4 expansions by constants. Be
1744 more consistent when naming methods and variables. Put preprocessor
1745 directives around tables only needed for debugging.
1746
17472002-02-07 Robert Anisko <robert@lrde.epita.fr>
1748
1749 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1750 C++ parsers.
1751 (yy::b4_name::parse): Use print_.
1752
17532002-02-07 Robert Anisko <robert@lrde.epita.fr>
1754
1755 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1756
17572002-02-07 Robert Anisko <robert@lrde.epita.fr>
1758
1759 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1760 C++ parsers.
1761 (yy::b4_name::parse): Build verbose error messages, and use error_.
1762
17632002-02-06 Robert Anisko <robert@lrde.epita.fr>
1764
1765 * data/bison.c++: Fix m4 quoting in comments.
1766
17672002-02-06 Robert Anisko <robert@lrde.epita.fr>
1768
1769 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1770 not expanded by m4.
1771
17722002-02-05 Akim Demaille <akim@epita.fr>
1773
1774 * data/bison.c++: Adjust to the M4 back end.
1775 More is certainly needed.
1776
17772002-02-05 Akim Demaille <akim@epita.fr>
1778
1779 Give a try to M4 as a back end.
1780
1781 * lib/readpipe.c: New, from wdiff.
1782 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1783 BISON_HAIRY.
1784 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1785 specific values. Now it is m4 that performs the lookup.
1786 * src/parse-skel.y: Remove.
1787 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1788 * src/output.c (actions_output, guards_output)
1789 (token_definitions_output): No longer keeps track of the output
1790 line number, hence remove the second argument.
1791 (guards_output): Check against the guard member of a rule, not the
1792 action member.
1793 Adjust callers.
1794 (output_skeleton): Don't look for the skeleton location, let m4 do
1795 that.
1796 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1797 file will be used.
1798 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1799 (prepare): Given that for the time being changesyntax is not
1800 usable in M4, rename the muscles using `-' to `_'.
1801 Define `defines_flag', `output_parser_name' and `output_header_name'.
1802 * src/output.h (actions_output, guards_output)
1803 (token_definitions_output): Adjust prototypes.
1804 * src/scan-skel.l: Instead of scanning the skeletons, it now
1805 processes the output of m4: `__oline__' and `#output'.
1806 * data/bison.simple: Adjust to be used by M4(sugar).
1807 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1808 to date.
1809 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1810 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1811 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1812 shamelessly stolen from CVS Autoconf.
1813
18142002-02-05 Akim Demaille <akim@epita.fr>
1815
1816 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1817 * configure.in: Check for the declarations of free and malloc.
1818 * src/muscle_tab.c: Adjust.
1819
18202002-02-05 Akim Demaille <akim@epita.fr>
1821
1822 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1823 which have no values.
1824
18252002-02-05 Akim Demaille <akim@epita.fr>
1826
1827 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1828 * data/: here.
1829
18302002-01-29 Paul Eggert <eggert@twinsun.com>
1831
1832 * src/bison.simple (YYSIZE_T): Do not define merely because
1833 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1834 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1835
18362002-01-27 Akim Demaille <akim@epita.fr>
1837
1838 Fix `%nonassoc and eof'.
1839
1840 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1841 which were not properly copied! Replace
1842 memcpy (res->errs, src->errs, src->nerrs);
1843 with
1844 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1845 !!!
1846 * tests/regression.at (%nonassoc and eof): Adjust to newest
1847 Autotest: `.' is not in the PATH.
1848
18492002-01-27 Akim Demaille <akim@epita.fr>
1850
1851 * tests/sets.at (AT_EXTRACT_SETS): New.
1852 (Nullable): Use it.
1853 (Firsts): New.
1854
18552002-01-26 Akim Demaille <akim@epita.fr>
1856
1857 * tests/actions.at, tests/calc.at, tests/headers.at,
1858 * tests/torture.at: Adjust to the newest Autotest which no longer
1859 forces `.' in the PATH.
1860
18612002-01-25 Akim Demaille <akim@epita.fr>
1862
1863 * tests/regression.at (%nonassoc and eof): New.
1864 Suggested by Robert Anisko.
1865
18662002-01-24 Akim Demaille <akim@epita.fr>
1867
1868 Bison dumps core when trying to complain about broken input files.
1869 Reported by Cris van Pelt.
1870
1871 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1872 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1873 into...
1874 (Invalid inputs): Strengthen: exercise parse_percent_token.
1875
18762002-01-24 Robert Anisko <robert.anisko@epita.fr>
1877
1878 * src/Makefile.am: Add bison.c++.
1879 * src/bison.c++: New skeleton.
1880
18812002-01-21 Paolo Bonzini <bonzini@gnu.org>
1882
1883 * po/it.po: New.
1884
18852002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1886
1887 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1888
18892002-01-20 Marc Autret <marc@gnu.org>
1890
1891 * src/files.c (compute_output_file_names): Fix
1892
18932002-01-20 Marc Autret <marc@gnu.org>
1894
1895 * tests/output.at: New test.
1896 * src/files.c (compute_base_names): Don't map extensions when
1897 the YACC flag is set, use defaults.
1898 Reported by Evgeny Stambulchik.
1899
19002002-01-20 Marc Autret <marc@gnu.org>
1901
1902 * src/system.h: Need to define __attribute__ away for non-GCC
1903 compilers as well (i.e. the vendor C compiler).
1904 Suggested by Albert Chin-A-Young.
1905
19062002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1907
1908 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1909 canonical definition.
1910 * src/system.h: Use the canonical definition for PARAMS (avoids
1911 a conflict with the macro from lib/hash.h).
1912
19132002-01-11 Akim Demaille <akim@epita.fr>
1914
1915 * configure.in: Use AC_FUNC_STRNLEN.
1916 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
1917
19182002-01-09 Akim Demaille <akim@epita.fr>
1919
1920 * src/files.c, src/files.h (output_infix): New.
1921 (tab_extension): Remove.
1922 (compute_base_names): Compute the former, drop the latter.
1923 * src/output.c (prepare): Insert the muscles `output-infix', and
1924 `output-suffix'.
1925 * src/parse-skel.y (string, string.1): New.
1926 (section.header): Use it.
1927 (section.yacc): Remove.
1928 (prefix): Remove too.
1929 * src/scan-skel.l: Adjust.
1930 * src/bison.simple, src/bison.hairy: Adjust.
1931
19322002-01-09 Akim Demaille <akim@epita.fr>
1933
1934 * configure.in (WERROR_CFLAGS): Compute it.
1935 * src/Makefile.am (CFLAGS): Pass it.
1936 * tests/atlocal.in (CFLAGS): Idem.
1937 * src/files.c: Fix a few warnings.
1938 (get_extension_index): Remove, unused.
1939
19402002-01-08 Akim Demaille <akim@epita.fr>
1941
1942 * src/getargs.c (AS_FILE_NAME): New.
1943 (getargs): Use it to convert DOSish file names.
1944 * src/files.c (base_name): Rename as full_base_name to avoid
1945 clashes with `base_name ()'.
1946 (filename_split): New.
1947 (compute_base_names): N-th rewrite, using filename_split.
1948
19492002-01-08 Akim Demaille <akim@epita.fr>
1950
1951 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1952 New, stolen from the Fileutils 4.1.
1953 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1954 * configure.in: Check for the presence of memrchr, and of its
1955 prototype.
1956
19572002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1958
1959 * lib/hash.h (__P): Added definition for this macro.
1960 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1961 BUILT_SOURCES, to ensure they are generated first.
1962 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1963 %error-verbose to allow bootstrapping with bison 1.30x.
1964
19652002-01-06 Akim Demaille <akim@epita.fr>
1966
1967 * src/reader.c (parse_braces): Don't fetch the next char, the
1968 convention is to fetch on entry.
1969 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1970 'switch' without a following semicolon.
1971 * tests/regression.at (braces parsing): New.
1972
19732002-01-06 Akim Demaille <akim@epita.fr>
1974
1975 Bison is dead wrong in its RR conflict reports.
1976
1977 * tests/torture.at (GNU Cim Grammar): New.
1978 * src/conflicts.c (count_rr_conflicts): Fix.
1979
19802002-01-06 Akim Demaille <akim@epita.fr>
1981
1982 Creating package.m4 from configure.ac causes too many problems.
1983
1984 * tests/Makefile.am (package.m4): Create it by hand,
1985 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1986
19872002-01-06 Akim Demaille <akim@epita.fr>
1988
1989 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1990 skeleton.h.
1991
19922002-01-04 Paul Eggert <eggert@twinsun.com>
1993
1994 * doc/bison.texinfo (Debugging):
1995 Remove YYSTDERR; it's no longer defined or used.
1996 Also, s/cstdio.h/cstdio/.
1997
19982002-01-03 Akim Demaille <akim@epita.fr>
1999
2000 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
2001
20022002-01-03 Akim Demaille <akim@epita.fr>
2003
2004 * src/parse-skel.y (process_skeleton): Don't bind the parser's
2005 tracing code to --trace, wait for a better --trace option, with
2006 args.
2007
20082002-01-03 Akim Demaille <akim@epita.fr>
2009
2010 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
2011 The ISO C++ standard is extremely clear about it: stderr is
2012 considered a macro, not a regular symbol (see table 94 `Header
2013 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
2014 Therefore std:: does not apply to it. It still does with fprintf.
2015 Also, s/cstdio.h/cstdio/.
2016
20172002-01-03 Akim Demaille <akim@epita.fr>
2018
2019 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
2020 for non system headers.
2021
20222002-01-02 Akim Demaille <akim@epita.fr>
2023
2024 Equip the skeleton chain with location tracking, runtime trace,
2025 pure parser and scanner.
2026
2027 * src/parse-skel.y: Request a pure parser, locations, and prefix
2028 renaming.
2029 (%union): Having several members with the same type does not help
2030 type mismatches, simplify.
2031 (YYPRINT, yyprint): New.
2032 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
2033 (skel_error): this.
2034 Handle locations.
2035 * src/scan-skel.l: Adjust to these changes.
2036 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
2037 (LOCATION_PRINT, skel_control_t): New.
2038
20392001-12-30 Akim Demaille <akim@epita.fr>
2040
2041 * src/parse-skel.y: Get rid of the shift/reduce conflict:
2042 replace `gb' with BLANKS.
2043 * src/scan-skel.l: Adjust.
2044
20452001-12-30 Akim Demaille <akim@epita.fr>
2046
2047 * src/system.h: We don't need nor want bcopy.
2048 Throw away MS-DOS crap: we don't need getpid.
2049 * configure.in: We don't need strndup. It was even causing
2050 problems: because Flex includes the headers *before* us,
2051 _GNU_SOURCE is not defined by config.h, and therefore strndup was
2052 not visible.
2053 * lib/xstrndup.c: New.
2054 * src/scan-skel.l: Use it.
2055 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
2056 * src/parse-skel.y: Use %directives instead of #defines.
2057
20582001-12-30 Akim Demaille <akim@epita.fr>
2059
2060 * src/skeleton.h: New.
2061 * src/output.c (output_parser, output_master_parser): Remove, dead
2062 code.
2063 * src/output.h (get_lines_number, actions_output, guards_output)
2064 (token_definitions_output): Prototype them.
2065 * src/parse-skel.y: Add the license notice.
2066 Include output.h and skeleton.h.
2067 (process_skeleton): Returns void, and takes a single parameter.
2068 * src/scan-skel.l: Add the license notice.
2069 Include skeleton.h.
2070 Don't use %option yylineno: it seems that then Flex imagines
2071 REJECT has been used, and therefore it won't reallocate its
2072 buffers (which makes no other sense to me than a bug). It results
2073 in warnings for `unused: yy_flex_realloc'.
2074
20752001-12-30 Robert Anisko <robert.anisko@epita.fr>
2076
2077 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
2078 (MUSCLE_INSERT_PREFIX): ...to there.
2079 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
2080 (MUSCLE_INSERT_PREFIX): Move from here...
2081
2082 * src/bison.hairy: Add a section directive. Put braces around muscle
2083 names. This parser skeleton is still broken, but Bison should not
2084 choke on a bad muscle 'syntax'.
2085 * src/bison.simple: Add a section directive. Put braces around muscle
2086 names.
2087
2088 * src/files.h (strsuffix, stringappend): Add declarations.
2089 (tab_extension): Add declaration.
2090 (short_base_name): Add declaration.
2091
2092 * src/files.c (strsuffix, stringappend): No longer static. These
2093 functions are used in the skeleton parser.
2094 (tab_extension): New.
2095 (compute_base_names): Use the computations done in this function
2096 to guess if the generated parsers should have '.tab' in their
2097 names.
2098 (short_base_name): No longer static.
2099
2100 * src/output.c (output_skeleton): New.
2101 (output): Disable call to output_master_parser, and give a try to
2102 a new skeleton handling system.
2103 (guards_output, actions_output): No longer static.
2104 (token_definitions_output, get_lines_number): No longer static.
2105
2106 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
2107
2108 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
2109 parse-skel.y.
2110
2111 * src/parse-skel.y: New file.
2112 * src/scan-skel.l: New file.
2113
21142001-12-29 Akim Demaille <akim@epita.fr>
2115
2116 %name-prefix is broken.
2117
2118 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
2119 Adjust all dependencies.
2120 * tests/headers.at (export YYLTYPE): Strengthen this test: use
2121 %name-prefix.
2122
2123 Renaming yylval but not yylloc is not consistent. Now we do.
2124
2125 * src/bison.simple: Prefix yylloc if used.
2126 * doc/bison.texinfo (Decl Summary): Document that.
2127
21282001-12-29 Akim Demaille <akim@epita.fr>
2129
2130 * doc/bison.texinfo: Promote `%long-directive' over
2131 `%long_directive'.
2132 Remove all references to fixed-output-files, yacc is enough.
2133
21342001-12-29 Akim Demaille <akim@epita.fr>
2135
2136 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
2137 user prologue. These are defaults.
2138 * tests/actions.at (Mid-rule actions): Make sure the user can
2139 define YYDEBUG and YYERROR_VERBOSE.
2140
21412001-12-29 Akim Demaille <akim@epita.fr>
2142
2143 * src/output.c (header_output): Don't forget to export YYLTYPE and
2144 yylloc.
2145 * tests/headers.at (export YYLTYPE): New, make sure it does.
2146 * tests/regression.at (%union and --defines, Invalid CPP headers):
2147 Move to...
2148 * tests/headers.at: here.
2149
21502001-12-29 Akim Demaille <akim@epita.fr>
2151
2152 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
2153
21542001-12-29 Akim Demaille <akim@epita.fr>
2155
2156 * tests/actions.at (Mid-rule actions): Output on a single line
2157 instead of several.
2158
21592001-12-29 Akim Demaille <akim@epita.fr>
2160
2161 * doc/bison.texinfo: Formatting changes.
2162
21632001-12-29 Akim Demaille <akim@epita.fr>
2164
2165 Don't store the token defs in a muscle, just be ready to output it
2166 on command. Now possible via `symbols'. Fixes a memory leak.
2167
2168 * src/output.c (token_definitions_output): New.
2169 (output_parser, header_output): Use it.
2170 * src/reader.c (symbols_save): Remove.
2171
21722001-12-29 Akim Demaille <akim@epita.fr>
2173
2174 * src/bison.simple: Do not provide a default for YYSTYPE and
2175 YYLTYPE before the user's prologue. Otherwise it's hardly... a
2176 default.
2177
21782001-12-29 Akim Demaille <akim@epita.fr>
2179
2180 Mid-rule actions are simply... ignored!
2181
2182 * src/reader.c (readgram): Be sure to attach mid-rule actions to
2183 the empty-rule associated to the dummy symbol, not to the host
2184 rule.
2185 * tests/actions.at (Mid-rule actions): New.
2186
21872001-12-29 Akim Demaille <akim@epita.fr>
2188
2189 Memory leak.
2190
2191 * src/reader.c (reader): Free grammar.
2192
21932001-12-29 Akim Demaille <akim@epita.fr>
2194
2195 Memory leak.
2196
2197 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
2198 since it allocates it for each state, although only one is needed.
2199 (allocate_storage): Do it here.
2200
22012001-12-29 Akim Demaille <akim@epita.fr>
2202
2203 * src/options.h, src/options.c (create_long_option_table): Rename
2204 as...
2205 (long_option_table_new): this, with a clearer prototype.
2206 (percent_table): Remove, unused,
2207 * src/getargs.c (getargs): Adjust.
2208
22092001-12-29 Akim Demaille <akim@epita.fr>
2210
2211 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
2212 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
2213 as states.
2214
22152001-12-29 Akim Demaille <akim@epita.fr>
2216
2217 * src/lalr.c (build_relations): Rename `states' as `states1'.
2218 Sorry, I don't understand exactly what it is, no better name...
2219
22202001-12-29 Akim Demaille <akim@epita.fr>
2221
2222 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
2223 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
2224 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
2225 as rules.
2226
22272001-12-29 Akim Demaille <akim@epita.fr>
2228
2229 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
2230 ago.
2231
22322001-12-29 Akim Demaille <akim@epita.fr>
2233
2234 * src/reader.c, src/reader.h (user_toknums): Remove.
2235 Adjust all users to use symbols[i]->user_token_number.
2236
22372001-12-29 Akim Demaille <akim@epita.fr>
2238
2239 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
2240 Adjust all users to use symbols[i]->prec or ->assoc.
2241
22422001-12-29 Akim Demaille <akim@epita.fr>
2243
2244 * src/reader.c, src/reader.h (tags): Remove.
2245 Adjust all users to use symbols[i]->tag.
2246
22472001-12-29 Akim Demaille <akim@epita.fr>
2248
2249 * src/gram.h, src/gram.c (symbols): New, similar to state_table
2250 and rule_table.
2251 * src/reader.c (packsymbols): Fill this table.
2252 Drop sprec.
2253 * src/conflicts.c (resolve_sr_conflict): Adjust.
2254 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
2255 single table.
2256 Use symbols[i]->tag instead of tags[i].
2257
22582001-12-29 Akim Demaille <akim@epita.fr>
2259
2260 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
2261 In addition, put a comment in there, to replace...
2262 * tests/regression.at (%union and C comments): Remove.
2263
22642001-12-29 Akim Demaille <akim@epita.fr>
2265
2266 * tests/regression.at (Web2c Actions): Blindly move the actual
2267 output as expected output. The contents *seem* right to me, but I
2268 can't pretend reading perfectly parser tables... Nonetheless, all
2269 the other tests pass correctly, the table look OK, even though the
2270 presence of `$axiom' is to be noted: AFAICS it is useless (but
2271 harmless).
2272
22732001-12-29 Akim Demaille <akim@epita.fr>
2274
2275 * src/reader.c (readgram): Don't add the rule 0 if there were no
2276 rules read. In other words, add it _after_ having performed
2277 grammar sanity checks.
2278 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
2279
22802001-12-29 Akim Demaille <akim@epita.fr>
2281
2282 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
2283 visible, and some states have now a different number.
2284
22852001-12-29 Akim Demaille <akim@epita.fr>
2286
2287 * src/reader.c (readgram): Bind the initial rule's lineno to that
2288 of the first rule.
2289 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
2290 (Solved SR Conflicts): Adjust rule 0's line number.
2291
22922001-12-29 Akim Demaille <akim@epita.fr>
2293
2294 Fix the `GAWK Grammar' failure.
2295
2296 * src/LR0.c (final_state): Initialize to -1 so that we do compute
2297 the reductions of the first state which was mistakenly confused
2298 with the final state because precisely final_state was initialized
2299 to 0.
2300 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
2301 now noticed by Bison.
2302 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
2303 have a reduction on $default.
2304
23052001-12-29 Akim Demaille <akim@epita.fr>
2306
2307 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
2308 rule line numbers.
2309 * src/closure.c (print_closure): Likewise.
2310 * src/derives.c (print_derives): Likewise.
2311 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
2312 now.
2313
23142001-12-29 Akim Demaille <akim@epita.fr>
2315
2316 * src/lalr.c (lookaheads_print): New.
2317 (lalr): Call it when --trace-flag.
2318 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
2319 are dumped.
2320
23212001-12-29 Akim Demaille <akim@epita.fr>
2322
2323 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
2324 when walking through ritem, even via rule->rhs.
2325 * src/reduce.c (dump_grammar, useful_production, reduce_output)
2326 (useful_production, useless_nonterminals): Likewise.
2327 (reduce_grammar_tables): Likewise, plus update nritems.
2328 * src/nullable.c (set_nullable): Likewise.
2329 * src/lalr.c (build_relations): Likewise.
2330 * tests/sets.at (Nullable): Adjust.
2331 Fortunately, now, the $axiom is no longer nullable.
2332
23332001-12-29 Akim Demaille <akim@epita.fr>
2334
2335 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
2336 the 0-sentinel.
2337 * src/gram.c (ritem_longest_rhs): Likewise.
2338 * src/reduce.c (nonterminals_reduce): Likewise.
2339 * src/print_graph.c (print_graph): Likewise.
2340 * src/output.c (output_rule_data): Likewise.
2341 * src/nullable.c (set_nullable): Likewise.
2342
23432001-12-29 Akim Demaille <akim@epita.fr>
2344
2345 * src/output.c: Comment changes.
2346
23472001-12-27 Paul Eggert <eggert@twinsun.com>
2348
2349 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
2350 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
2351 Sparc, as they were causing more porting problems than the
2352 (minor) performance improvement was worth.
2353
2354 Also, catch up with 1.31's YYSTD.
2355
23562001-12-27 Akim Demaille <akim@epita.fr>
2357
2358 * src/output.c (output_gram): Rely on nritems, not the
2359 0-sentinel. See below.
2360 Use -1 as separator, not 0.
2361 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
2362 Rely on -1 as separator in yyrhs, instead of 0.
2363 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
2364 twice `Now at end of input', therefore there are two lines less to
2365 expect.
2366
23672001-12-27 Akim Demaille <akim@epita.fr>
2368
2369 * tests/regression.at (Unresolved SR Conflicts):
2370 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
2371 below.
2372
23732001-12-27 Akim Demaille <akim@epita.fr>
2374
2375 * src/LR0.c (new_state): Recognize the final state by the fact it
2376 is reached by eoftoken.
2377 (insert_start_shifting_state, insert_eof_shifting_state)
2378 (insert_accepting_state, augment_automaton): Remove, since now
2379 these states are automatically computed from the initial state.
2380 (generate_states): Adjust.
2381 * src/print.c: When reporting a rule number to the user, substract
2382 1, so that the axiom rule is rule 0, and the first user rule is 1.
2383 * src/reduce.c: Likewise.
2384 * src/print_graph.c (print_core): For the time being, just as for
2385 the report, depend upon --trace-flags to dump the full set of
2386 items.
2387 * src/reader.c (readgram): Once the grammar read, insert the rule
2388 0: `$axiom: START-SYMBOL $'.
2389 * tests/set.at: Adjust: rule 0 is now displayed, and since the
2390 number of the states has changed (the final state is no longer
2391 necessarily the last), catch up.
2392
23932001-12-27 Akim Demaille <akim@epita.fr>
2394
2395 Try to make the use of the eoftoken valid. Given that its value
2396 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
2397 is used instead of > 0 where appropriate, (ii), depend upon nritems
2398 instead of the 0-sentinel.
2399
2400 * src/gram.h, src/gram.c (nritems): New.
2401 Expected to be duplication of nitems, but for the time being...
2402 * src/reader.c (packgram): Assert nritems and nitems are equal.
2403 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
2404 * src/closure.c (print_closure, print_fderives): Likewise.
2405 * src/gram.c (ritem_print): Likewise.
2406 * src/print.c (print_core, print_grammar): Likewise.
2407 * src/print_graph.c: Likewise.
2408
24092001-12-27 Akim Demaille <akim@epita.fr>
2410
2411 * src/main.c (main): If there are complains after grammar
2412 reductions, then output the report anyway if requested, then die.
2413 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
2414 * src/reader.c (eoftoken): New.
2415 (parse_token_decl): If the token being defined has value `0', it
2416 is the eoftoken.
2417 (packsymbols): No longer hack `tags' to insert `$' by hand.
2418 Be sure to preserve the value of the eoftoken.
2419 (reader): Make sure eoftoken is defined.
2420 Initialize nsyms to 0: now eoftoken is created just like the others.
2421 * src/print.c (print_grammar): Don't special case the eof token.
2422 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
2423 lie anyway, albeit pleasant.
2424 * tests/calc.at: Exercise error messages with eoftoken.
2425 Change the grammar so that empty input is invalid.
2426 Adjust expectations.
2427 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
2428
24292001-12-27 Akim Demaille <akim@epita.fr>
2430
2431 * configure.in: Check the protos of strchr ans strspn.
2432 Replace strchr if needed.
2433 * src/system.h: Provide the protos of strchr, strspn and memchr if
2434 missing.
2435 * lib/strchr.c: New.
2436 * src/reader.c (symbols_save): Use strchr.
2437
24382001-12-27 Akim Demaille <akim@epita.fr>
2439
2440 * src/print.c, src/print_graph.c (escape): New.
2441 Use it to quote the TAGS outputs.
2442 * src/print_graph.c (print_state): Now errors are in red, and
2443 reductions in green.
2444 Prefer high to wide: output the state number on a line of its own.
2445
24462001-12-27 Akim Demaille <akim@epita.fr>
2447
2448 * src/state.h, src/state.c (reductions_new): New.
2449 * src/LR0.c (set_state_table): Let all the states have a
2450 `reductions', even if reduced to 0.
2451 (save_reductions): Adjust.
2452 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
2453 * src/print.c (print_reductions, print_actions): Adjust.
2454 * src/output.c (action_row): Adjust.
2455
24562001-12-27 Akim Demaille <akim@epita.fr>
2457
2458 * src/state.h, src/state.c (errs_new, errs_dup): New.
2459 * src/LR0.c (set_state_table): Let all the states have an errs,
2460 even if reduced to 0.
2461 * src/print.c (print_errs, print_reductions): Adjust.
2462 * src/output.c (output_actions, action_row): Adjust.
2463 * src/conflicts.c (resolve_sr_conflict): Adjust.
2464
24652001-12-27 Akim Demaille <akim@epita.fr>
2466
2467 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
2468
24692001-12-27 Akim Demaille <akim@epita.fr>
2470
2471 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
2472 * src/print.c: here.
2473 (lookaheadset, shiftset): New, used as additional storage by
2474 print_reductions.
2475 (print_results): Adjust.
2476 (print_shifts, print_gotos, print_errs): New, extracted from...
2477 (print_actions): here.
2478 * src/print_graph.c (print_actions): Remove dead code.
2479
24802001-12-27 Akim Demaille <akim@epita.fr>
2481
2482 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
2483 `$n' and `@n'.
2484
24852001-12-27 Akim Demaille <akim@epita.fr>
2486
2487 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
2488 (build_relations): Adjust.
2489
24902001-12-27 Akim Demaille <akim@epita.fr>
2491
2492 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
2493 duplication.
2494
24952001-12-27 Akim Demaille <akim@epita.fr>
2496
2497 * src/reader.c (packgram): Catch nitems overflows.
2498
24992001-12-27 Akim Demaille <akim@epita.fr>
2500
2501 * src/files.c, src/files.h (guard_obstack): Remove.
2502 * src/output.c (output): Adjust.
2503 * src/reader.c (parse_braces): New, factoring...
2504 (copy_action, copy_guard): these two which are renamed as...
2505 (parse_action, parse_guard): these.
2506 As a voluntary consequence, using braces around guards is now
2507 mandatory.
2508
25092001-12-27 Akim Demaille <akim@epita.fr>
2510
2511 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
2512 * src/reader.c (symbol_list): `guard' and `guard_line' are new
2513 members.
2514 (symbol_list_new): Adjust.
2515 (copy_action): action_line is the first line, not the last.
2516 (copy_guard): Just as for actions, store the `action' only, not
2517 the switch/case/break flesh.
2518 Don't parse the user action that might follow the guard, let...
2519 (readgram): do it, i.e., now, there can be an action after a
2520 guard.
2521 In other words the guard is just explicitly optional.
2522 (packgram): Adjust.
2523 * src/output.c (guards_output): New.
2524 (output_parser): Call it when needed.
2525 (output): Also free the guard and attrs obstacks.
2526 * src/files.c, src/files.h (obstack_save): Remove.
2527 (output_files): Remove.
2528 As a result, if one needs the former `.act' file, using an
2529 appropriate skeleton which requires actions and guards is now
2530 required.
2531 * src/main.c (main): Adjust.
2532 * tests/semantic.at: New.
2533 * tests/regression.at: Use `input.y' as input file name.
2534 Avoid 8+3 problems by requiring input.c when the test needs the
2535 parser.
2536
25372001-12-27 Akim Demaille <akim@epita.fr>
2538
2539 * src/reader.c (symbol_list_new): Be sure to initialize all the
2540 fields.
2541
25422001-12-27 Akim Demaille <akim@epita.fr>
2543
2544 All the hacks using a final pseudo state are now useless.
2545
2546 * src/LR0.c (set_state_table): state_table holds exactly nstates.
2547 * src/lalr.c (nLA): New.
2548 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
2549 instead of lookaheadsp from the pseudo state (nstate + 1).
2550
25512001-12-27 Akim Demaille <akim@epita.fr>
2552
2553 * src/output.c (action_row, token_actions): Use a state_t instead
2554 of a integer, and nlookaheads instead of the following state's
2555 lookaheadsp.
2556
25572001-12-27 Akim Demaille <akim@epita.fr>
2558
2559 * src/conflicts.c (log_resolution, flush_shift)
2560 (resolve_sr_conflict, set_conflicts, solve_conflicts)
2561 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
2562 (conflicts_print, print_reductions): Use a state_t instead of an
2563 integer when referring to a state.
2564 As much as possible, depend upon nlookaheads, instead of the
2565 `lookaheadsp' member of the following state (since lookaheads of
2566 successive states are successive, the difference between state n + 1
2567 and n served as the number of lookaheads for state n).
2568 * src/lalr.c (add_lookback_edge): Likewise.
2569 * src/print.c (print_core, print_actions, print_state)
2570 (print_results): Likewise.
2571 * src/print_graph.c (print_core, print_actions, print_state)
2572 (print_graph): Likewise.
2573 * src/conflicts.h: Adjust.
2574
25752001-12-27 Akim Demaille <akim@epita.fr>
2576
2577 * src/bison.hairy: Formatting/comment changes.
2578 ANSIfy.
2579 Remove `register' indications.
2580 Add plenty of `static'.
2581
25822001-12-27 Akim Demaille <akim@epita.fr>
2583
2584 * src/output.c (prepare): Drop the muscle `ntbase' which
2585 duplicates ntokens.
2586 * src/bison.simple: Formatting/comment changes.
2587 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
2588 is an undocumented synonym.
2589
25902001-12-22 Akim Demaille <akim@epita.fr>
2591
2592 * src/output.c (output_table_data): Change the prototype to use
2593 `int' for array ranges: some invocations do pass an int, not a
2594 short.
2595 Reported by Wayne Green.
2596
25972001-12-22 Akim Demaille <akim@epita.fr>
2598
2599 Some actions of web2c.y are improperly triggered.
2600 Reported by Mike Castle.
2601
2602 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
2603 * tests/regression.at (Web2c): Rename as...
2604 (Web2c Report): this.
2605 (Web2c Actions): New.
2606
26072001-12-22 Akim Demaille <akim@epita.fr>
2608
2609 Reductions in web2c.y are improperly reported.
2610 Reported by Mike Castle.
2611
2612 * src/conflicts.c (print_reductions): Fix.
2613 * tests/regression.at (Web2c): New.
2614
26152001-12-18 Akim Demaille <akim@epita.fr>
2616
2617 Some host fail on `assert (!"foo")', which expands to
2618 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
2619 Reported by Nelson Beebee.
2620
2621 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
2622 `#define it_succeeded 0' and `assert (it_succeeded)'.
2623
26242001-12-17 Marc Autret <autret_m@epita.fr>
2625
2626 * src/bison.simple: Don't hard code the skeleton line and filename.
2627 * src/output.c (output_parser): Rename 'line' as 'output_line'.
2628 New line counter 'skeleton_line' (skeleton-line muscle).
2629
26302001-12-17 Paul Eggert <eggert@twinsun.com>
2631
2632 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2633 YYDEBUG must be defined to a nonzero value.
2634
2635 * src/bison.simple (yytname): Do not assume that the user defines
2636 YYDEBUG to a properly parenthesized expression.
2637
26382001-12-17 Akim Demaille <akim@epita.fr>
2639
2640 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2641 nlookaheads is a new member.
2642 Adjust all users.
2643 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2644 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2645 state.
2646
26472001-12-17 Akim Demaille <akim@epita.fr>
2648
2649 * src/files.h, src/files.c (open_files, close_files): Remove.
2650 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2651 let...
2652 * src/reader.c (reader): Do it.
2653
26542001-12-17 Akim Demaille <akim@epita.fr>
2655
2656 * src/conflicts.c (print_reductions): Formatting changes.
2657
26582001-12-17 Akim Demaille <akim@epita.fr>
2659
2660 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2661 (flush_reduce): New.
2662 (resolve_sr_conflict): Adjust.
2663
26642001-12-17 Akim Demaille <akim@epita.fr>
2665
2666 * src/output.c (output_obstack): Be static and rename as...
2667 (format_obstack): this, to avoid any confusion with files.c's
2668 output_obstack.
2669 * src/reader.h (muscle_obstack): Move to...
2670 * src/output.h: here, since it's defined in output.c.
2671
26722001-12-17 Akim Demaille <akim@epita.fr>
2673
2674 * src/output.c (action_row, save_column, default_goto)
2675 (sort_actions, matching_state, pack_vector): Better variable
2676 locality.
2677
26782001-12-17 Akim Demaille <akim@epita.fr>
2679
2680 * src/output.c: Various formatting changes.
2681
26822001-12-17 Akim Demaille <akim@epita.fr>
2683
2684 * src/files.c (output_files): Free the output_obstack.
2685 * src/main.c (main): Call print and print_graph conditionally.
2686 * src/print.c (print): Work unconditionally.
2687 * src/print_graph.c (print_graph): Work unconditionally.
2688 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2689
26902001-12-16 Marc Autret <autret_m@epita.fr>
2691
2692 * src/output.c (actions_output): Fix. When we use %no-lines,
2693 there is one less line per action.
2694
26952001-12-16 Marc Autret <autret_m@epita.fr>
2696
2697 * src/bison.simple: Remove a useless #line directive.
2698 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2699 * src/output.c (get_lines_number): New.
2700 (output_parser): Adjust, now takes care about the lines of a
2701 output muscles.
2702 Fix line numbering.
2703 (actions_output): Computes the number of lines taken by actions.
2704 (output_master_parser): Insert new skeleton which is the name of
2705 the output parser file name.
2706
27072001-12-15 Marc Autret <autret_m@epita.fr>
2708
2709 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2710
27112001-12-15 Marc Autret <autret_m@epita.fr>
2712
2713 * src/output.c (output_gram): Keep track of the hairy one.
2714
27152001-12-15 Akim Demaille <akim@epita.fr>
2716
2717 Make `make distcheck' work.
2718
2719 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2720 system.h which uses libgettext.h.
2721
27222001-12-15 Akim Demaille <akim@epita.fr>
2723
2724 * src/nullable.c (set_nullable): Useless rules must be skipped,
2725 otherwise, since we range over their symbols, we might look at a
2726 nonterminal which no longer ``exists'', i.e., it is not counted in
2727 `nvars', hence we overflow our arrays.
2728
27292001-12-15 Akim Demaille <akim@epita.fr>
2730
2731 The header can also be produced directly, without any obstack!
2732 Yahoo!
2733
2734 * src/files.c, src/files.h (defines_obstack): Remove.
2735 (compute_header_macro): Global.
2736 (defines_obstack_save): Remove.
2737 * src/reader.c (parse_union_decl): No longer output to
2738 defines_obstack: its content can be found in the `stype' muscle
2739 anyway.
2740 (output_token_translations): Merge into...
2741 (symbols_output): this.
2742 Rename as...
2743 (symbols_save): this.
2744 (reader): Adjust.
2745 * src/output.c (header_output): New.
2746 (output): Call it.
2747
27482001-12-15 Akim Demaille <akim@epita.fr>
2749
2750 * src/reader.c (parse_union_decl): Instead of handling two obstack
2751 simultaneously, use one to define the `stype' muscle, and use the
2752 value of the latter to fill defines_obstack.
2753 (copy_comment): Remove.
2754 (copy_comment2): Work for a single obstack.
2755 Rename as...
2756 (copy_comment): this.
2757
27582001-12-15 Akim Demaille <akim@epita.fr>
2759
2760 * src/lex.c, src/lex.h (xgetc): No longer static.
2761 * src/reader.c (parse_union_decl): Revamp.
2762
27632001-12-15 Akim Demaille <akim@epita.fr>
2764
2765 Still making progress in separating Bison into (i) input, (ii)
2766 process, (iii) output: now we can directly output the parser file
2767 without using table_obstack at all.
2768
2769 * src/files.c, src/files.h (table_obstack): Bye bye.
2770 (parser_file_name): New.
2771 * src/files.c (compute_output_file_names): Compute it.
2772 * src/output.c (actions_output, output_parser)
2773 (output_master_parser): To a file instead of an obstack.
2774
27752001-12-15 Akim Demaille <akim@epita.fr>
2776
2777 Attach actions to rules, instead of pre-outputting them to
2778 actions_obstack.
2779
2780 * src/gram.h (rule_t): action and action_line are new members.
2781 * src/reader.c (symbol_list): Likewise.
2782 (copy_action): Save the actions within the rule.
2783 (packgram): Save them in rule_table.
2784 * src/output.c (actions_output): New.
2785 (output_parser): Use it on `%%actions'.
2786 (output_rule_data): Don't free rule_table.
2787 (output): Do it.
2788 (prepare): Don't save the `action' muscle.
2789 * src/bison.simple: s/%%action/%%actions/.
2790
27912001-12-15 Akim Demaille <akim@epita.fr>
2792
2793 * src/reader.c (copy_action): When --yacc, don't append a `;'
2794 to the user action: let it fail if lacking.
2795 Suggested by Arnold Robbins and Tom Tromey.
2796
27972001-12-14 Akim Demaille <akim@epita.fr>
2798
2799 * src/lex.c (literalchar): Simply return the char you decoded, non
2800 longer mess around with obstacks and int pointers.
2801 Adjust all callers.
2802
28032001-12-14 Akim Demaille <akim@epita.fr>
2804
2805 * src/lex.c (literalchar): Don't escape the special characters,
2806 just decode them, and keep them as char (before, eol was output as
2807 the 2 char string `\n' etc.).
2808 * src/output.c (output_rule_data): Use quotearg to output the
2809 token strings.
2810
28112001-12-13 Paul Eggert <eggert@twinsun.com>
2812
2813 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2814 Do not infringe on the global user namespace when using C++.
2815 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2816 All uses of `fprintf' and `stderr' changed.
2817
2818 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2819
28202001-12-13 Akim Demaille <akim@epita.fr>
2821
2822 The computation of nullable is broken: it doesn't handle empty
2823 RHS's properly.
2824
2825 * tests/torture.at (GNU AWK Grammar): New.
2826 * tests/sets.at (Nullable): New.
2827 * src/nullable.c (set_nullable): Instead of blindly looping over
2828 `ritems', loop over the rules, and then over their rhs's.
2829
2830 Work around Autotest bugs.
2831
2832 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2833 frame, because Autotest understand lines starting with a `+' as
2834 traces from the shell. Then, they are not processed properly.
2835 Admittedly an Autotest bug, but we don't have time to wait for
2836 Autotest to catch up.
2837 * tests/regression.at (Broken Closure): Adjust to the new table
2838 frames.
2839 Move to...
2840 * tests/sets.at: here.
2841
28422001-12-13 Akim Demaille <akim@epita.fr>
2843
2844 * src/closure.c (closure): Use nrules instead of playing tricks
2845 with BITS_PER_WORD.
2846
28472001-12-13 Akim Demaille <akim@epita.fr>
2848
2849 * src/print.c (print_actions): Output the handling of `$' as the
2850 traces do: shifting the token EOF. Before EOF was treated as a
2851 nonterminal.
2852 * tests/regression.at: Adjust some tests.
2853 * src/print_graph.c (print_core): Complete the set of items via
2854 closure. The next-to-final and final states are still unsatisfying,
2855 but that's to be addressed elsewhere.
2856 No longer output the rule numbers, but do output the state number.
2857 A single loop for the shifts + gotos is enough, but picked a
2858 distinct color for each.
2859 (print_graph): Initialize and finalize closure.
2860
28612001-12-13 Akim Demaille <akim@epita.fr>
2862
2863 * src/reader.c (readgram): Remove dead code, an strip useless
2864 braces.
2865 (get_type): Remove, unused.
2866
28672001-12-12 Akim Demaille <akim@epita.fr>
2868
2869 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2870 on that of lib/error.c.
2871
28722001-12-12 Akim Demaille <akim@epita.fr>
2873
2874 Some hosts don't like `/' in includes.
2875
2876 * src/system.h: Include libgettext.h without qualifying the path.
2877 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2878 $(top_srcdir).
2879
28802001-12-11 Marc Autret <autret_m@epita.fr>
2881
2882 * src/output.c (output_parser): Remove useless muscle.
2883
28842001-12-11 Marc Autret <autret_m@epita.fr>
2885
2886 * src/bison.simple: Remove #line just before %%epilogue. It
2887 is now handled in ...
2888 * src/reader.c (read_additionnal_code): Add the output of a
2889 #line for the epilogue.
2890
28912001-12-10 Marc Autret <autret_m@epita.fr>
2892
2893 * src/reader.c (copy_definition): Re-use CPP-outed code which
2894 replace precedent remove.
2895 * src/bison.simple: Remove #line before %%prologue because
2896 %%input-line is wrong at this time.
2897
28982001-12-10 Marc Autret <autret_m@epita.fr>
2899
2900 * src/reader.c (symbols_output): Clean up.
2901 * src/output.c (output_gram, output): Clean up.
2902
29032001-12-10 Akim Demaille <akim@epita.fr>
2904
2905 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2906 * src/LR0.c (set_state_table): here.
2907 * src/lalr.c (lalr): Call it.
2908
29092001-12-10 Akim Demaille <akim@epita.fr>
2910
2911 * src/state.h (shifts): Remove the `number' member: shifts are
2912 attached to state, hence no longer need to be labelled with a
2913 state number.
2914
29152001-12-10 Akim Demaille <akim@epita.fr>
2916
2917 Now that states have a complete set of members, the linked list of
2918 shifts is useless: just fill directly the state's shifts member.
2919
2920 * src/state.h (shifts): Remove the `next' member.
2921 * src/LR0.c (first_state, last_state): Remove.
2922 Adjust the callers.
2923 (augment_automaton): Don't look for the shifts that must be added
2924 a shift on EOF: it is those of the state we looked for! But now,
2925 since shifts are attached, it is no longer needed to looking
2926 merely by its id: its number.
2927
29282001-12-10 Akim Demaille <akim@epita.fr>
2929
2930 * src/LR0.c (augment_automaton): Better variable locality.
2931 Remove an impossible branch: if there is a state corresponding to
2932 the start symbol being shifted, then there is shift for the start
2933 symbol from the initial state.
2934
29352001-12-10 Akim Demaille <akim@epita.fr>
2936
2937 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2938 only when appropriate: when insert_start_shifting_state' is not
2939 invoked.
2940 * tests/regression.at (Rule Line Numbers): Adjust.
2941
29422001-12-10 Akim Demaille <akim@epita.fr>
2943
2944 * src/LR0.c (augment_automaton): Now that all states have shifts,
2945 merge the two cases addition shifts to the initial state.
2946
29472001-12-10 Akim Demaille <akim@epita.fr>
2948
2949 * src/lalr.c (set_state_table): Move to...
2950 * src/LR0.c: here.
2951 * src/lalr.c (lalr): Don't call it...
2952 * src/LR0.c (generate_states): do it.
2953 * src/LR0.h (first_state): Remove, only the table is used.
2954
29552001-12-10 Akim Demaille <akim@epita.fr>
2956
2957 * src/LR0.h (first_shift, first_reduction): Remove.
2958 * src/lalr.c: Don't use first_shift: find shifts through the
2959 states.
2960
29612001-12-10 Akim Demaille <akim@epita.fr>
2962
2963 * src/LR0.c: Attach shifts to states as soon as they are
2964 computed.
2965 * src/lalr.c (set_state_table): Instead of assigning shifts to
2966 state, just assert that the mapping was properly done.
2967
29682001-12-10 Akim Demaille <akim@epita.fr>
2969
2970 * src/LR0.c (insert_start_shift): Rename as...
2971 (insert_start_shifting_state): this.
2972 (insert_eof_shifting_state, insert_accepting_state): New.
2973 (augment_automaton): Adjust.
2974 Better locality of the variables.
2975 When looking if the start_symbol is shifted from the initial
2976 state, using `while (... symbol != start_symbol ...)' sounds
2977 better than `while (... symbol < start_symbol ...)': If fail
2978 to see how the order between symbols could be relevant!
2979
29802001-12-10 Akim Demaille <akim@epita.fr>
2981
2982 * src/getargs.h: Don't declare `spec_name_prefix' and
2983 `spec_file_prefix', declared by src/files.h.
2984 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2985 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2986 * src/output.c (prepare): Adjust.
2987 * src/reader.c (symbols_output): Likewise.
2988 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2989
29902001-12-10 Akim Demaille <akim@epita.fr>
2991
2992 * src/muscle_tab.c (muscle_init): NULL is a better default than
2993 `"0"'.
2994
29952001-12-10 Akim Demaille <akim@epita.fr>
2996
2997 * src/reader.c (reader): Calling symbols_output once is enough.
2998
29992001-12-10 Akim Demaille <akim@epita.fr>
3000
3001 Now that states have a complete set of members, the linked list of
3002 reductions is useless: just fill directly the state's reductions
3003 member.
3004
3005 * src/state.h (struct reductions): Remove member `number' and
3006 `next'.
3007 * src/LR0.c (first_reduction, last_reduction): Remove.
3008 (save_reductions): Don't link the new reductions, store them in
3009 this_state.
3010 * src/lalr.c (set_state_table): No need to attach reductions to
3011 states, it's already done.
3012 * src/output.c (output_actions): No longer free the shifts, then
3013 the reductions, then the states: free all the states and their
3014 members.
3015
30162001-12-10 Akim Demaille <akim@epita.fr>
3017
3018 * src/options.c (OPTN, DRTV, BOTH): New.
3019 (option_table): Use them.
3020
3021 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
3022 the job of system.h.
3023 * src/options.c: Don't include stdio.h and xalloc.h for the same
3024 reasons.
3025
30262001-12-10 Akim Demaille <akim@epita.fr>
3027
3028 * src/output.c (output, prepare): Make sure the values of the
3029 muscles `action' and `prologue' are 0-terminated.
3030
30312001-12-10 Akim Demaille <akim@epita.fr>
3032
3033 Clean up GCC warnings.
3034
3035 * src/reader.c (copy_action): `buf' is not used.
3036 (parse_skel_decl): Be static.
3037 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
3038 * src/options.h (create_long_option_table): Have a real prototype.
3039 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
3040 (hash_delete_at): Return const void *.
3041 Adjust casts to preserve the const.
3042
30432001-12-10 Akim Demaille <akim@epita.fr>
3044
3045 * configure.in: Require 2.52g.
3046 M4 is not needed, but AUTOM4TE is.
3047 * m4/m4.m4: Remove.
3048 * tests/Makefile.am: Adjust.
3049
30502001-12-10 Akim Demaille <akim@epita.fr>
3051
3052 One structure for states is enough, even though theoretically
3053 there are LR(0) states and LALR(1) states.
3054
3055 * src/lalr.h (state_t): Remove.
3056 (state_table): Be state_t **, not state_t *.
3057 * src/state.h (core, CORE_ALLOC): Rename as...
3058 (state_t, STATE_ALLOC): this.
3059 Add the LALR(1) members: shifts, reductions, errs.
3060 * src/LR0.c (state_table): Rename as...
3061 (state_hash): this, to avoid name clashes with the global
3062 `state_table'.
3063 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
3064 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
3065
30662001-12-10 Akim Demaille <akim@epita.fr>
3067
3068 Bison dumps core on bash.y.
3069 Reported by Pascal Bart.
3070
3071 * src/warshall.c (bitmatrix_print): New.
3072 (TC): Use it.
3073 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
3074 j must be the outer loop.
3075 * tests/regression.at (Broken Closure): New.
3076
30772001-12-05 Akim Demaille <akim@epita.fr>
3078
3079 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
3080 its argument.
3081