]> git.saurik.com Git - bison.git/blame - ChangeLog
Make the test suite pass with warnings checked.
[bison.git] / ChangeLog
CommitLineData
5a08f1ce
AD
12002-06-30 Akim Demaille <akim@epita.fr>
2
3 Make the test suite pass with warnings checked.
4
5 * tests/actions.at (Printers and Destructors): Improve.
6 Avoid unsigned vs. signed issues.
7 * tests/calc.at: Don't exercise the scanner here, do it...
8 * tests/input.at (Torturing the Scanner): here.
9
10
720623af
PH
112002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12
13 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
14 reorganize first lines parallel to yacc.c.
15
fb8135fa
AD
162002-06-28 Akim Demaille <akim@epita.fr>
17
18 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
19 (b4_token_enum, b4_token_defines): New, factored from...
20 * data/lalr1.cc, data/yacc.c, glr.c: here.
21
41442480
AD
222002-06-28 Akim Demaille <akim@epita.fr>
23
24 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
25 unused variables.
26 * src/output.c (merger_output): static.
27
e0e5bf84
AD
282002-06-28 Akim Demaille <akim@epita.fr>
29
30 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
31 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
32 pacify GCC.
33 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 34
676385e2
PH
352002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
36
37 Accumulated changelog for new GLR parsing features.
38
e0e5bf84 39 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
40 conflicts_total_count.
41 * src/conflicts.h: Ditto.
42 * src/output.c (token_actions): Use the new name.
43 (output_conflicts): Change conflp => conflict_list_heads, and
44 confl => conflict_list for better readability.
45 * data/glr.c: Use the new names.
46 * NEWS: Add self to GLR announcement.
e0e5bf84 47
676385e2
PH
48 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
49
50 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
51 Akim Demaille.
52
53 * data/bison.glr: Change name to glr.c
54 * data/glr.c: Renamed from bison.glr.
55 * data/Makefile.am: Add glr.c
e0e5bf84
AD
56
57 * src/getargs.c:
58
676385e2
PH
59 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
60 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 61
676385e2
PH
62 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
63
64 * data/bison.glr: Be sure to restore the
65 current #line when returning to the skeleton contents after having
66 exposed the input file's #line.
67
68 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
69
70 * data/bison.glr: Bring up to date with changes to bison.simple.
71
72 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
73
74 * data/bison.glr: Correct definitions that use b4_prefix.
75 Various reformatting.
76 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
77 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
78 yytokenp argument; now part of stack.
79 (yychar): Define to behave as documented.
80 (yyclearin): Ditto.
e0e5bf84 81
676385e2
PH
82 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
83
84 * src/reader.h: Add declaration for free_merger_functions.
85
86 * src/reader.c (merge_functions): New variable.
87 (get_merge_function): New function.
88 (free_merger_functions): New function.
89 (readgram): Check for %prec that is not followed by a symbol.
90 Handle %dprec and %merge declarations.
91 (packgram): Initialize dprec and merger fields in rules array.
92
93 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
94 conflict_list_cnt, conflict_list_free): New variables.
95 (table_grow): Also grow conflict_table.
e0e5bf84 96 (prepare_rules): Output dprec and merger tables.
676385e2 97 (conflict_row): New function.
e0e5bf84 98 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
99 default reduction in conflicted states for GLR parser so that there
100 are spaces for the conflict lists.
101 (save_row): Also save conflict information.
102 (token_actions): Allocate conflict list.
103 (merger_output): New function.
104 (pack_vector): Pack conflict table, too.
105 (output_conflicts): New function to output yyconflp and yyconfl.
106 (output_check): Allocate conflict_tos.
107 (output_actions): Output conflict tables, also.
108 (output_skeleton): Output b4_mergers definition.
109 (prepare): Output b4_max_rhs_length definition.
110 Use 'bison.glr' as default skeleton for GLR parsers.
111
112 * src/gram.c (glr_parser): New flag.
113 (grammar_free): Call free_merger_functions.
114
115 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
116 all pairs of conflicting reductions, rather than just all tokens
117 causing conflicts. Needed to size conflict tables.
e0e5bf84 118 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
119 interface.
120 (conflicts_print): Ditto.
121 (count_total_conflicts): New function.
122
123 * src/reader.h (merger_list): New type.
124 (merge_functions): New variable.
125
126 * src/lex.h (tok_dprec, tok_merge): New token types.
127
128 * src/gram.h (rule_s): Add dprec and merger fields.
129 (glr_parser): New flag.
130
131 * src/conflicts.h (count_total_conflicts): New function.
132
133 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
134
135 * doc/bison.texinfo (Generalized LR Parsing): New section.
136 (GLR Parsers): New section.
137 (Language and Grammar): Mention GLR parsing.
138 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
139 Correct typo ("tge" -> "the").
140
141 * data/bison.glr: New skeleton for GLR parsing.
142
143 * tests/cxx-gram.at: New tests for GLR parsing.
144
145 * tests/testsuite.at: Include cxx-gram.at.
146
147 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 148
676385e2
PH
149 * src/parse-gram.y:
150
151 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
152
153 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 154
b5480d74 1552002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
156
157 * src/options.h, src/options.c: Remove.
158 * src/getargs.c (short_options, long_options): New.
159
60491a94
AD
1602002-06-27 Akim Demaille <akim@epita.fr>
161
162 * data/bison.simple, data/bison.c++: Rename as...
163 * data/yacc.c, data/lalr1.cc: these.
164 * doc/bison.texinfo (Environment Variables): Remove.
165
9be0c25b
AD
1662002-06-25 Raja R Harinath <harinath@cs.umn.edu>
167
168 * src/getargs.c (report_argmatch): Initialize strtok().
169
1ae72863
AD
1702002-06-20 Akim Demaille <akim@epita.fr>
171
172 * data/bison.simple (b4_symbol_actions): New, replaces...
173 (b4_symbol_destructor, b4_symbol_printer): these.
174 (yysymprint): Be sure to call YYPRINT only for tokens, and using
175 user token numbers.
176
87542d29
AD
1772002-06-20 Akim Demaille <akim@epita.fr>
178
179 * data/bison.simple (yydestructor): Rename as...
180 (yydestruct): this.
181
1a31ed21
AD
1822002-06-20 Akim Demaille <akim@epita.fr>
183
184 * src/symtab.h, src/symtab.c (symbol_type_set)
185 (symbol_destructor_set, symbol_precedence_set): The location is
186 the last argument.
187 Adjust all callers.
188
e776192e
AD
1892002-06-20 Akim Demaille <akim@epita.fr>
190
191 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
192 internals.
193 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
194 Takes a location.
195 * src/symtab.h, src/symtab.c (symbol_class_set)
196 (symbol_user_token_number_set): Likewise.
197 Adjust all callers.
198 Promote complain_at.
199 * tests/input.at (Type Clashes): Adjust.
200
5c1180b3
AD
2012002-06-20 Akim Demaille <akim@epita.fr>
202
203 * data/bison.simple (YYLEX): Fix the declaration when
204 %pure-parser.
205
e3170060
AD
2062002-06-20 Akim Demaille <akim@epita.fr>
207
208 * data/bison.simple (yysymprint): Don't print the token number,
209 just its name.
210 * tests/actions.at (Destructors): Rename as...
211 (Printers and Destructors): this.
212 Also exercise %printer.
213
253862fd
AD
2142002-06-20 Akim Demaille <akim@epita.fr>
215
216 * data/bison.simple (YYDSYMPRINT): New.
217 Use it to remove many of the #if YYDEBUG/if (yydebug).
218
366eea36
AD
2192002-06-20 Akim Demaille <akim@epita.fr>
220
221 * src/symtab.h, src/symtab.c (symbol_t): printer and
222 printer_location are new members.
223 (symbol_printer_set): New.
224 * src/parse-gram.y (PERCENT_PRINTER): New token.
225 Handle its associated rule.
226 * src/scan-gram.l: Adjust.
227 (handle_destructor_at, handle_destructor_dollar): Rename as...
228 (handle_symbol_code_at, handle_symbol_code_dollar): these.
229 * src/output.c (symbol_printers_output): New.
230 (output_skeleton): Call it.
231 * data/bison.simple (yysymprint): New. Cannot be named yyprint
232 since there are already many grammar files with a user `yyprint'.
233 Replace the calls to YYPRINT to calls to yysymprint.
234 * tests/calc.at: Adjust.
235 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
236 taking advantage of parser very internal details (stack size!).
237
4f25ebb0
AD
2382002-06-20 Akim Demaille <akim@epita.fr>
239
240 * src/scan-gram.l: Complete the scanner with the missing patterns
241 to pacify Flex.
242 Use `quote' and `symbol_tag_get' where appropriate.
243
93b68a0e
AD
2442002-06-19 Akim Demaille <akim@epita.fr>
245
246 * tests/actions.at (Destructors): Augment to test locations.
247 * data/bison.simple (yydestructor): Pass it the current location
248 if locations are enabled.
249 Prototype only when __STDC__ or C++.
250 Change the argument names to move into the yy name space: there is
251 user code here.
252
58612f1d
AD
2532002-06-19 Akim Demaille <akim@epita.fr>
254
74310291
AD
255 * data/bison.simple (b4_pure_if): New.
256 Use it instead of #ifdef YYPURE.
257
2582002-06-19 Akim Demaille <akim@epita.fr>
259
260 * data/bison.simple (b4_location_if): New.
58612f1d
AD
261 Use it instead of #ifdef YYLSP_NEEDED.
262
f25bfb75
AD
2632002-06-19 Akim Demaille <akim@epita.fr>
264
265 Prepare @$ in %destructor, but currently don't bind it in the
266 skeleton, as %location use is not cleaned up yet.
267
268 * src/scan-gram.l (handle_dollar, handle_destructor_at)
269 (handle_action_at): New.
270 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
271 a braced_code_t and a location as additional arguments.
272 (handle_destructor_dollar): Instead of requiring `b4_eval', just
273 unquote one when outputting `b4_dollar_dollar'.
274 Adjust callers.
275 * data/bison.simple (b4_eval): Remove.
276 (b4_symbol_destructor): Adjust.
277 * tests/input.at (Invalid @n): Adjust.
278
c732d2c6
AD
2792002-06-19 Zack Weinberg <zack@codesourcery.com>
280
281 * doc/bison.texinfo: Document ability to have multiple
282 prologue sections.
283
8c165d89
AD
2842002-06-18 Akim Demaille <akim@epita.fr>
285
286 * src/files.c (compute_base_names): When computing the output file
287 names from the input file name, strip the directory part.
288
ca98bf57
AD
2892002-06-18 Akim Demaille <akim@epita.fr>
290
291 * data/bison.simple.new: Comment changes.
292 Reported by Andreas Schwab.
293
0bfb02ff
AD
2942002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
295
296 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
297 there are no `label `yyoverflowlab' defined but not used' warnings
298 when yyoverflow is defined.
299
24c0aad7
AD
3002002-06-18 Akim Demaille <akim@epita.fr>
301
302 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
303 new member.
304 (symbol_destructor_set): Adjust.
305 * src/output.c (symbol_destructors_output): Output the destructor
306 locations.
307 Output the symbol name.
308 * data/bison.simple (b4_symbol_destructor): Adjust.
309
5719c109
AD
3102002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
311 and Akim Demaille <akim@epita.fr>
312
313 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
314 what's left on the stack when the error recovery hits EOF.
315 * tests/actions.at (Destructors): Complete to exercise this case.
316
9280d3ef
AD
3172002-06-17 Akim Demaille <akim@epita.fr>
318
319 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
320 arguments is really empty, not only equal to `[]'.
321 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
322 member.
323 (symbol_destructor_set): New.
324 * src/output.c (symbol_destructors_output): New.
325 * src/reader.h (brace_code_t, current_braced_code): New.
326 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
327 (handle_dollar): Rename as...
328 (handle_action_dollar): this.
329 (handle_destructor_dollar): New.
330 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
331 (grammar_declaration): Use it.
332 * data/bison.simple (yystos): Is always defined.
333 (yydestructor): New.
334 * tests/actions.at (Destructors): New.
335 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
336
dafdc66f
AD
3372002-06-17 Akim Demaille <akim@epita.fr>
338
339 * src/symlist.h, src/symlist.c (symbol_list_length): New.
340 * src/scan-gram.l (handle_dollar, handle_at): Compute the
341 rule_length only when needed.
342 * src/output.c (actions_output, token_definitions_output): Output
343 the full M4 block.
344 * src/symtab.c: Don't access directly to the symbol tag, use
345 symbol_tag_get.
346 * src/parse-gram.y: Use symbol_list_free.
347
56c47203
AD
3482002-06-17 Akim Demaille <akim@epita.fr>
349
350 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
351 (symbol_list_prepend, get_type_name): Move to...
352 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
353 (symbol_list_prepend, symbol_list_n_type_name_get): here.
354 Adjust all callers.
355 (symbol_list_free): New.
356 * src/scan-gram.l (handle_dollar): Takes a location.
357 * tests/input.at (Invalid $n): Adjust.
358
1e0bab92
AD
3592002-06-17 Akim Demaille <akim@epita.fr>
360
361 * src/reader.h, src/reader.c (symbol_list_new): Export it.
362 (symbol_list_prepend): New.
363 * src/parse-gram.y (%union): `list' is a new member.
364 (symbols.1): New, replaces...
365 (terms_to_prec.1, nterms_to_type.1): these.
366 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
367 Take a location as additional argument.
368 Adjust all callers.
369
04e60654
AD
3702002-06-15 Akim Demaille <akim@epita.fr>
371
372 * src/parse-gram.y: Move %token in the declaration section so that
373 we don't depend upon CVS Bison.
374
10e5b8bd
AD
3752002-06-15 Akim Demaille <akim@epita.fr>
376
377 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
378 * src/print.c (print_core): Use it.
379
9801d40c
AD
3802002-06-15 Akim Demaille <akim@epita.fr>
381
382 * src/conflicts.c (log_resolution): Accept the rule involved in
383 the sr conflicts instead of the lookahead number that points to
384 that rule.
385 (flush_reduce): Accept the current lookahead vector as argument,
386 instead of the index in LA.
387 (resolve_sr_conflict): Accept the current number of lookahead
388 bitset to consider for the STATE, instead of the index in LA.
389 (set_conflicts): Adjust.
390 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
391
c0263492
AD
3922002-06-15 Akim Demaille <akim@epita.fr>
393
394 * src/state.h (state_t): Replace the `lookaheadsp' member, a
395 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
396 Adjust all dependencies.
397 * src/lalr.c (initialize_lookaheads): Split into...
398 (states_lookaheads_count, states_lookaheads_initialize): these.
399 (lalr): Adjust.
400
9757c359
AD
4012002-06-15 Akim Demaille <akim@epita.fr>
402
403 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
404 out of...
405 (grammar_rules_print): here.
406 * src/reduce.c (reduce_output): Use it.
407 * tests/reduce.at (Useless Rules, Reduced Automaton)
408 (Underivable Rules): Adjust.
409
6b98e4b5
AD
4102002-06-15 Akim Demaille <akim@epita.fr>
411
412 Copy BYacc's nice way to report the grammar.
413
414 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
415 New.
416 Don't print the rules' location, it is confusing and useless.
417 (rule_print): Use grammar_rhs_print.
418 * src/print.c (print_grammar): Use grammar_rules_print.
419
6b98e4b5
AD
4202002-06-15 Akim Demaille <akim@epita.fr>
421
422 Complete and rationalize `useless thing' warnings.
423
424 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
425 (symbol_tag_print): New.
426 Use them everywhere in place of accessing directly the tag member.
427 * src/gram.h, src/gram.c (rule_print): New.
428 Use it where a rule used to be printed `by hand'.
429 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
430 (reduce_grammar_tables): Report the useless rules.
431 (reduce_print): Useless things are a warning, not an error.
432 Report it as such.
433 * tests/reduce.at (Useless Nonterminals, Useless Rules):
434 (Reduced Automaton, Underivable Rules): Adjust.
435 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
436 * tests/conflicts.at (Unresolved SR Conflicts)
437 (Solved SR Conflicts): Adjust.
438
ee000ba4
AD
4392002-06-15 Akim Demaille <akim@epita.fr>
440
441 Let symbols have a location.
442
443 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
444 (getsym): Adjust.
445 Adjust all callers.
446 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
447 Use location_t, not int.
448 * src/symtab.c (symbol_check_defined): Take advantage of the
449 location.
450 * tests/regression.at (Invalid inputs): Adjust.
451
8efe435c
AD
4522002-06-15 Akim Demaille <akim@epita.fr>
453
454 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
455 (input): Don't try to initialize yylloc here, do it in the
456 scanner.
457 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
458 * src/gram.h (rule_t): Change line and action_line into location
459 and action_location, of location_t type.
460 Adjust all dependencies.
461 * src/location.h, src/location.c (empty_location): New.
462 * src/reader.h, src/reader.c (grammar_start_symbol_set)
463 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
464 (grammar_current_rule_symbol_append)
465 (grammar_current_rule_action_append): Expect a location as argument.
466 * src/reader.c (grammar_midrule_action): Adjust to attach an
467 action's location as dummy symbol location.
468 * src/symtab.h, src/symtab.c (startsymbol_location): New.
469 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
470 the line numbers.
471
1921f1d7
AD
4722002-06-14 Akim Demaille <akim@epita.fr>
473
474 Grammar declarations may be found in the grammar section.
475
476 * src/parse-gram.y (rules_or_grammar_declaration): New.
477 (declarations): Each declaration may end with a semicolon, not
478 just...
479 (grammar_declaration): `"%union"'.
480 (grammar): Branch to rules_or_grammar_declaration.
481
4515534c
AD
4822002-06-14 Akim Demaille <akim@epita.fr>
483
484 * src/main.c (main): Invoke scanner_free.
485
f958596b
AD
4862002-06-14 Akim Demaille <akim@epita.fr>
487
488 * src/output.c (m4_invoke): Extracted from...
489 (output_skeleton): here.
490 Free tempfile.
491
2c569025
AD
4922002-06-14 Akim Demaille <akim@epita.fr>
493
494 * src/parse-gram.y (directives, directive, gram)
495 (grammar_directives, precedence_directives, precedence_directive):
496 Rename as...
497 (declarations, declaration, grammar, grammar_declaration)
498 (precedence_declaration, precedence_declarator): these.
499 (symbol_declaration): New.
500
592e8d4d
AD
5012002-06-14 Akim Demaille <akim@epita.fr>
502
503 * src/files.c (action_obstack): Remove, unused.
504 (output_obstack): Remove it, and all its dependencies, as it is no
505 longer needed.
506 * src/reader.c (epilogue_set): Build the epilogue in the
507 muscle_obstack.
508 * src/output.h, src/output.c (muscle_obstack): Move to...
509 * src/muscle_tab.h, src/muscle_tab.h: here.
510 (muscle_init): Initialize muscle_obstack.
511 (muscle_free): New.
512 * src/main.c (main): Call it.
513
0c15323d
AD
5142002-06-14 Akim Demaille <akim@epita.fr>
515
516 * src/location.h: New, extracted from...
517 * src/reader.h: here.
518 * src/Makefile.am (noinst_HEADERS): Merge into
519 (bison_SOURCES): this.
520 Add location.h.
521 * src/parse-gram.y: Use location_t instead of Bison's.
522 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
523 Use location_t instead of ints.
524
e96c9728
AD
5252002-06-14 Akim Demaille <akim@epita.fr>
526
527 * data/bison.simple, data/bison.c++: Be sure to restore the
528 current #line when returning to the skeleton contents after having
529 exposed the input file's #line.
530
75d1fe16
AD
5312002-06-12 Akim Demaille <akim@epita.fr>
532
533 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
534 eager.
535 * tests/actions.at (Exotic Dollars): New.
536
6c35d22c
AD
5372002-06-12 Akim Demaille <akim@epita.fr>
538
539 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
540 ['"/] too eagerly.
541 * tests/input.at (Torturing the Scanner): New.
542
1d6412ad
AD
5432002-06-11 Akim Demaille <akim@epita.fr>
544
545 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
546 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
547 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
548 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
549 * src/reader.c (reader): Use it.
550
4cdb01db
AD
5512002-06-11 Akim Demaille <akim@epita.fr>
552
553 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
554 Adjust all callers.
555 (scanner_last_string_free): New.
556
44995b2e
AD
5572002-06-11 Akim Demaille <akim@epita.fr>
558
559 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
560 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
561 (last_string, YY_OBS_FREE): New.
562 Use them when returning an ID.
563
e9955c83
AD
5642002-06-11 Akim Demaille <akim@epita.fr>
565
566 Have Bison grammars parsed by a Bison grammar.
567
568 * src/reader.c, src/reader.h (prologue_augment): New.
569 * src/reader.c (copy_definition): Remove.
570
571 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
572 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
573 (grammar_current_rule_prec_set, grammar_current_rule_check)
574 (grammar_current_rule_symbol_append)
575 (grammar_current_rule_action_append): Export.
576 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
577 (symbol_list_action_append): Remove.
578 Hook the routines from reader.
579 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
580 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
581
582 * src/reader.c (read_declarations): Remove, unused.
583
584 * src/parse-gram.y: Handle the epilogue.
585 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
586 (grammar_start_symbol_set): this.
587 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
588 * src/reader.c (readgram): Remove, unused.
589 (reader): Adjust to insert eoftoken and axiom where appropriate.
590
591 * src/reader.c (copy_dollar): Replace with...
592 * src/scan-gram.h (handle_dollar): this.
593 * src/parse-gram.y: Remove `%thong'.
594
595 * src/reader.c (copy_at): Replace with...
596 * src/scan-gram.h (handle_at): this.
597
598 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
599 New.
600
601 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
602 time being.
603
604 * src/reader.h, src/reader.c (grammar_rule_end): New.
605
606 * src/parse.y (current_type, current_class): New.
607 Implement `%nterm', `%token' support.
608 Merge `%term' into `%token'.
609 (string_as_id): New.
610 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
611 type name.
612
613 * src/parse-gram.y: Be sure to handle properly the beginning of
614 rules.
615
616 * src/parse-gram.y: Handle %type.
617 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
618
619 * src/parse-gram.y: More directives support.
620 * src/options.c: No longer handle source directives.
621
622 * src/parse-gram.y: Fix %output.
623
624 * src/parse-gram.y: Handle %union.
625 Use the prologue locations.
626 * src/reader.c (parse_union_decl): Remove.
627
628 * src/reader.h, src/reader.c (epilogue_set): New.
629 * src/parse-gram.y: Use it.
630
631 * data/bison.simple, data/bison.c++: b4_stype is now either not
632 defined, then default to int, or to the contents of %union,
633 without `union' itself.
634 Adjust.
635 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
636
637 * src/output.c (actions_output): Don't output braces, as they are
638 already handled by the scanner.
639
640 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
641 characters to themselves.
642
643 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
644 that the epilogue has a proper #line.
645
646 * src/parse-gram.y: Handle precedence/associativity.
647
648 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
649 a terminal.
650 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
651 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
652 at all to define terminals that cannot be emitted.
653
654 * src/scan-gram.l: Escape M4 characters.
655
656 * src/scan-gram.l: Working properly with escapes in user
657 strings/characters.
658
659 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
660 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
661 grammar.
662 Use more modest sizes, as for the time being the parser does not
663 release memory, and therefore the process swallows a huge amount
664 of memory.
665
666 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
667 stricter %token grammar.
668
669 * src/symtab.h (associativity): Add `undef_assoc'.
670 (symbol_precedence_set): Do nothing when passed an undef_assoc.
671 * src/symtab.c (symbol_check_alias_consistence): Adjust.
672
673 * tests/regression.at (Invalid %directive): Remove, as it is now
674 meaningless.
675 (Invalid inputs): Adjust to the new error messages.
676 (Token definitions): The new grammar doesn't allow too many
677 eccentricities.
678
679 * src/lex.h, src/lex.c: Remove.
680 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
681 (copy_character, copy_string2, copy_string, copy_identifier)
682 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
683 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
684 (parse_action): Remove.
685 * po/POTFILES.in: Adjust.
686
2e047461
AD
6872002-06-11 Akim Demaille <akim@epita.fr>
688
689 * src/reader.c (parse_action): Don't store directly into the
690 rule's action member: return the action as a string.
691 Don't require `rule_length' as an argument: compute it.
692 (grammar_current_rule_symbol_append)
693 (grammar_current_rule_action_append): New, eved out from
694 (readgram): here.
695 Remove `action_flag', `rulelength', unused now.
696
9af3fbce
AD
6972002-06-11 Akim Demaille <akim@epita.fr>
698
699 * src/reader.c (grammar_current_rule_prec_set).
700 (grammar_current_rule_check): New, eved out from...
701 (readgram): here.
702 Remove `xaction', `first_rhs': useless.
703 * tests/input.at (Type clashes): New.
704 * tests/existing.at (GNU Cim Grammar): Adjust.
705
1485e106
AD
7062002-06-11 Akim Demaille <akim@epita.fr>
707
708 * src/reader.c (grammar_midrule_action): New, Eved out from
709 (readgram): here.
710
da4160c3
AD
7112002-06-11 Akim Demaille <akim@epita.fr>
712
713 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
714 New.
715 (readgram): Use them as replacement of inlined code, crule and
716 crule1.
717
f6d0f937
AD
7182002-06-11 Akim Demaille <akim@epita.fr>
719
720 * src/reader.c (grammar_end, grammar_symbol_append): New.
721 (readgram): Use them.
722 Make the use of `p' as local as possible.
723
69078d4b
AD
7242002-06-10 Akim Demaille <akim@epita.fr>
725
726 GCJ's parser requires the tokens to be defined before the prologue.
727
728 * data/bison.simple: Output the token definition before the user's
729 prologue.
730 * tests/regression.at (Braces parsing, Duplicate string)
731 (Mixing %token styles): Check the output from bison.
732 (Early token definitions): New.
733
5e424082
AD
7342002-06-10 Akim Demaille <akim@epita.fr>
735
736 * src/symtab.c (symbol_user_token_number_set): Don't complain when
737 assigning twice the same user number to a token, so that we can
738 use it in...
739 * src/lex.c (lex): here.
740 Also use `symbol_class_set' instead of hand written code.
741 * src/reader.c (parse_assoc_decl): Likewise.
742
44536b35
AD
7432002-06-10 Akim Demaille <akim@epita.fr>
744
745 * src/symtab.c, src/symtab.c (symbol_class_set)
746 (symbol_user_token_number_set): New.
747 * src/reader.c (parse_token_decl): Use them.
748 Use a switch instead of ifs.
749 Use a single argument.
750
8b9f2372
AD
7512002-06-10 Akim Demaille <akim@epita.fr>
752
753 Remove `%thong' support as it is undocumented, unused, duplicates
754 `%token's job, and creates useless e-mail traffic with people who
755 want to know what it is, why it is undocumented, unused, and
756 duplicates `%token's job.
757
758 * src/reader.c (parse_thong_decl): Remove.
759 * src/options.c (option_table): Remove "thong".
760 * src/lex.h (tok_thong): Remove.
761
3ae2b51f
AD
7622002-06-10 Akim Demaille <akim@epita.fr>
763
764 * src/symtab.c, src/symtab.c (symbol_type_set)
765 (symbol_precedence_set): New.
766 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
767 (value_components_used): Remove, unused.
768
2f1afb73
AD
7692002-06-09 Akim Demaille <akim@epita.fr>
770
771 Move symbols handling code out of the reader.
772
773 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
774 (axiom): Move to...
775 * src/symtab.h, src/symtab.c: here.
776
777 * src/gram.c (start_symbol): Remove: use startsymbol->number.
778 * src/reader.c (startval): Rename as...
779 * src/symtab.h, src/symtab.c (startsymbol): this.
780 * src/reader.c: Adjust.
781
782 * src/reader.c (symbol_check_defined, symbol_make_alias)
783 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
784 (token_translations_init)
785 Move to...
786 * src/symtab.c: here.
787 * src/reader.c (packsymbols): Move to...
788 * src/symtab.h, src/symtab.c (symbols_pack): here.
789 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
790 argument.
791
e9bca3ad
AD
7922002-06-03 Akim Demaille <akim@epita.fr>
793
794 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
795 then statements.
796
86eff183
AD
7972002-06-03 Akim Demaille <akim@epita.fr>
798
799 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
800 structs with non literals.
801 * src/scan-skel.l: never-interactive.
802 * src/conflicts.c (enum conflict_resolution_e): No trailing
803 comma.
804 * src/getargs.c (usage): Split long literal strings.
805 Reported by Hans Aberg.
806
717be197
AD
8072002-05-28 Akim Demaille <akim@epita.fr>
808
809 * data/bison.c++: Use C++ ostreams.
810 (cdebug_): New member.
811
670ddffd
AD
8122002-05-28 Akim Demaille <akim@epita.fr>
813
814 * src/output.c (output_skeleton): Be sure to allocate enough room
815 for `/' _and_ for `\0' in full_skeleton.
816
769b430f
AD
8172002-05-28 Akim Demaille <akim@epita.fr>
818
819 * data/bison.c++: Catch up with bison.simple:
820 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
821 and Paul Eggert <eggert@twinsun.com>: `error' handing.
822 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
823 and popping traces.
824
7067cb36
PH
8252002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
826
827 * src/output.c (output_skeleton): Put an explicit path in front of
828 the skeleton file name, rather than relying on the -I directory,
829 to partially alleviate effects of having a skeleton file lying around
830 in the current directory.
769b430f 831
4a713ec2
PH
8322002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
833
769b430f 834 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
835 obstack_printf should be obstack_fgrow1.
836
b408954b
AD
8372002-05-26 Akim Demaille <akim@epita.fr>
838
839 * src/state.h (state_t): `solved_conflicts' is a new member.
840 * src/LR0.c (new_state): Set it to 0.
841 * src/conflicts.h, src/conflicts.c (print_conflicts)
842 (free_conflicts, solve_conflicts): Rename as...
843 (conflicts_print, conflicts_free, conflicts_solve): these.
844 Adjust callers.
845 * src/conflicts.c (enum conflict_resolution_e)
846 (solved_conflicts_obstack): New, used by...
847 (log_resolution): this.
848 Adjust to attach the conflict resolution to each state.
849 Complete the description with the precedence/associativity
850 information.
851 (resolve_sr_conflict): Adjust.
852 * src/print.c (print_state): Output its solved_conflicts.
853 * tests/conflicts.at (Unresolved SR Conflicts)
854 (Solved SR Conflicts): Exercise --report=all.
855
a49aecd5
AD
8562002-05-26 Akim Demaille <akim@epita.fr>
857
858 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
859 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
860 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
861 (token_number_t, item_number_as_token_number)
862 (token_number_as_item_number, muscle_insert_token_number_table):
863 Rename as...
864 (symbol_number_t, item_number_as_symbol_number)
865 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
866 these, since it is more appropriate.
867
5504898e
AD
8682002-05-26 Akim Demaille <akim@epita.fr>
869
870 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
871 `Error:' lines.
872 * data/bison.simple (yystos) [YYDEBUG]: New.
873 (yyparse) [YYDEBUG]: Display the symbols which are popped during
874 error recovery.
875 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
876
ec3bc396
AD
8772002-05-25 Akim Demaille <akim@epita.fr>
878
879 * doc/bison.texinfo (Debugging): Split into...
880 (Tracing): this new section, its former contents, and...
881 (Understanding): this new section.
882 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
883 by...
884 (report_flag): this.
885 Adjust all dependencies.
886 (report_args, report_types, report_argmatch): New.
887 (usage, getargs): Report/support -r, --report.
888 * src/options.h
889 (struct option_table_struct): Rename as..,
890 (struct option_table_s): this.
891 Rename the `set_flag' member to `flag' to match with getopt_long's
892 struct.
893 * src/options.c (option_table): Split verbose into an entry for
894 %verbose, and another for --verbose.
895 Support --report/-r, so remove -r from the obsolete --raw.
896 * src/print.c: Attach full item sets and lookaheads reports to
897 report_flag instead of trace_flag.
898 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
899
78df8250
PE
9002002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
901 and Paul Eggert <eggert@twinsun.com>
769b430f 902
78df8250
PE
903 * data/bison.simple (yyparse): Correct error handling to conform to
904 POSIX and yacc. Specifically, after syntax error is discovered,
905 do not reduce further before shifting the error token.
906 Clean up the code a bit by removing the labels yyerrdefault,
907 yyerrhandle, yyerrpop.
908 * NEWS: Document the above.
909
c0c9ea05
PH
9102002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
911
912 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
913 type; it isn't always big enough, since it doesn't necessarily
914 include non-terminals.
769b430f 915 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
916 the latter can be removed.
917 (yy_token_number_type): Remove, only one use.
918 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
919 don't use TokenNumberType as element type.
769b430f 920
c0c9ea05
PH
921 * tests/regression.at: Modify expected output to agree with change
922 to yyr1 and yytranslate.
769b430f 923
6390a83f
FK
9242002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
925
926 * src/reader.c (parse_action): Use copy_character instead of
927 obstack_1grow.
928
db7c8e9a
AD
9292002-05-13 Akim Demaille <akim@epita.fr>
930
931 * tests/regression.at (Token definitions): Prototype yylex and
932 yyerror.
933
fcc61800
PH
9342002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
935
158c687b 936 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
937 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
938 32-bit arithmetic.
939 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
940
5683e9b2
AD
9412002-05-07 Akim Demaille <akim@epita.fr>
942
943 * tests/synclines.at: Be sure to prototype yylex and yyerror to
944 avoid GCC warnings.
945
0c2d3f4c
AD
9462002-05-07 Akim Demaille <akim@epita.fr>
947
948 Kill GCC warnings.
949
950 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
951 over the RHS of each rule.
952 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
953 * src/state.h (state_t): Member `nitems' is unsigned short.
954 * src/LR0.c (get_state): Adjust.
955 * src/reader.c (packgram): Likewise.
956 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
957 `Type'.
958 (muscle_insert_int_table): Remove, unused.
959 (prepare_rules): Remove `max'.
960
1565b720
AD
9612002-05-06 Akim Demaille <akim@epita.fr>
962
963 * src/closure.c (print_firsts): Display of the symbol tags.
964 (bitmatrix_print): Move to...
965 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
966 here.
967 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
968
cfaee611
AD
9692002-05-06 Akim Demaille <akim@epita.fr>
970
971 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
972 hash_do_for_each.
973
458be8e0
AD
9742002-05-06 Akim Demaille <akim@epita.fr>
975
976 * src/LR0.c (new_state, get_state): Instead of using the global
977 `kernel_size' and `kernel_base', have two new arguments:
978 `core_size' and `core'.
979 Adjust callers.
980
a900a624
AD
9812002-05-06 Akim Demaille <akim@epita.fr>
982
983 * src/reader.c (packgram): No longer end `ritem' with a 0
984 sentinel: it is not used.
985
d4e7d3a1
AD
9862002-05-05 Akim Demaille <akim@epita.fr>
987
988 New experimental feature: display the lookaheads in the report and
989 graph.
990
991 * src/print (print_core): When --trace-flag, display the rules
992 lookaheads.
993 * src/print_graph.c (print_core): Likewise.
994 Swap the arguments.
995 Adjust caller.
996
39ceb25b
AD
9972002-05-05 Akim Demaille <akim@epita.fr>
998
999 * tests/torture.at (Many lookaheads): New test.
1000
5372019f
AD
10012002-05-05 Akim Demaille <akim@epita.fr>
1002
1003 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
1004 (GENERATE_MUSCLE_INSERT_TABLE): this.
1005 (output_int_table, output_unsigned_int_table, output_short_table)
1006 (output_token_number_table, output_item_number_table): Replace with...
1007 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
1008 (muscle_insert_short_table, muscle_insert_token_number_table)
1009 (muscle_insert_item_number_table): these.
1010 Adjust all callers.
1011 (prepare_tokens): Don't free `translations', since...
1012 * src/reader.h, src/reader.c (grammar_free): do it.
1013 Move to...
1014 * src/gram.h, src/gram.c (grammar_free): here.
1015 * data/bison.simple, data/bison.c++: b4_token_number_max is now
1016 b4_translate_max.
1017
5df5f6d5
AD
10182002-05-05 Akim Demaille <akim@epita.fr>
1019
1020 * src/output.c (output_unsigned_int_table): New.
1021 (prepare_rules): `i' is unsigned.
1022 `prhs', `rline', `r2' are unsigned int.
1023 Rename muscle `rhs_number_max' as `rhs_max'.
1024 Output muscles `prhs_max', `rline_max', and `r2_max'.
1025 Free rline and r1.
1026 * data/bison.simple, data/bison.c++: Adjust to use these muscles
1027 to compute types instead of constant types.
1028 * tests/regression.at (Web2c Actions): Adjust.
1029
b87f8b21
AD
10302002-05-04 Akim Demaille <akim@epita.fr>
1031
1032 * src/symtab.h (SALIAS, SUNDEF): Rename as...
1033 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
1034 Adjust dependencies.
1035 * src/output.c (token_definitions_output): Be sure not to output a
1036 `#define 'a'' when fed with `%token 'a' "a"'.
1037 * tests/regression.at (Token definitions): New.
1038
8bb936e4
PE
10392002-05-03 Paul Eggert <eggert@twinsun.com>
1040
1041 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
1042 for K&R C.
1043
10442002-05-03 gettextize <bug-gnu-gettext@gnu.org>
1045
1046 * Makefile.am (SUBDIRS): Remove intl.
1047 (EXTRA_DIST): Add config/config.rpath.
1048
53c71a12
AD
10492002-05-03 Akim Demaille <akim@epita.fr>
1050
1051 * data/bison.simple (m4_if): Don't output empty enums.
1052 And actually, output valid enum definitions :(.
1053
289dd0cf
AD
10542002-05-03 Akim Demaille <akim@epita.fr>
1055
1056 * configure.bat: Remove, completely obsolete.
1057 * Makefile.am (EXTRA_DIST): Adjust.
1058 Don't distribute config.rpath...
1059 * config/Makefile.am (EXTRA_DIST): Do it.
1060
db85e524
AD
10612002-05-03 Akim Demaille <akim@epita.fr>
1062
1063 * configure.in (GETTEXT_VERSION): New.
1064 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
1065
83ccf991
AD
10662002-05-03 Akim Demaille <akim@epita.fr>
1067
1068 * data/bison.simple (b4_token_enum): New.
1069 (b4_token_defines): Use it to output tokens both as #define and
1070 enums.
1071 Suggested by Paul Eggert.
1072 * src/output.c (token_definitions_output): Don't output spurious
1073 white spaces.
1074
1f418995
AD
10752002-05-03 Akim Demaille <akim@epita.fr>
1076
1077 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
1078
45119f04
RA
10792002-05-02 Robert Anisko <robert@lrde.epita.fr>
1080
1081 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
1082 Update the stack class, give a try to deque as the default container.
1083
b2d52318
AD
10842002-05-02 Akim Demaille <akim@epita.fr>
1085
1086 * data/bison.simple (yyparse): Do not implement @$ = @1.
1087 (YYLLOC_DEFAULT): Adjust to do it.
1088 * doc/bison.texinfo (Location Default Action): Fix.
1089
3a8b4109
AD
10902002-05-02 Akim Demaille <akim@epita.fr>
1091
1092 * src/reader.c (parse_braces): Merge into...
1093 (parse_action): this.
1094
84614e13
AD
10952002-05-02 Akim Demaille <akim@epita.fr>
1096
1097 * configure.in (ALL_LINGUAS): Remove.
1098 * po/LINGUAS, hr.po: New.
1099
fdbcd8e2
AD
11002002-05-02 Akim Demaille <akim@epita.fr>
1101
1102 Remove the so called hairy (semantic) parsers.
1103
1104 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
1105 * src/gram.h, src/gram.c (semantic_parser): Remove.
1106 (rule_t): Remove the guard and guard_line members.
1107 * src/lex.h (token_t): remove tok_guard.
1108 * src/options.c (option_table): Remove %guard and %semantic_parser
1109 support.
1110 * src/output.c, src/output.h (guards_output): Remove.
1111 (prepare): Adjust.
1112 (token_definitions_output): Don't output the `T'
1113 tokens (???).
1114 (output_skeleton): Don't output the guards.
1115 * src/files.c, src/files.c (attrsfile): Remove.
1116 * src/reader.c (symbol_list): Remove the guard and guard_line
1117 members.
1118 Adjust dependencies.
1119 (parse_guard): Remove.
1120 * data/bison.hairy: Remove.
1121 * doc/bison.texinfo (Environment Variables): Remove occurrences of
1122 BISON_HAIRY.
1123
82b6cb3f
AD
11242002-05-02 Akim Demaille <akim@epita.fr>
1125
1126 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
1127 (parse_guard): Rename the formal argument `stack_offset' as
1128 `rule_length', which is more readable.
1129 Adjust callers.
1130 (copy_at, copy_dollar): Instead of outputting the hard coded
1131 values of $$, $n and so forth, output invocation to b4_lhs_value,
1132 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
1133 Note: this patch partially drops `semantic-parser' support: it
1134 always does `rule_length - n', where semantic parsers ought to
1135 always use `-n'.
82b6cb3f
AD
1136 * data/bison.simple, data/bison.c++ (b4_lhs_value)
1137 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
1138
6cbfbcc5
AD
11392002-05-02 Akim Demaille <akim@epita.fr>
1140
1141 * configure.in (AC_INIT): Bump to 1.49b.
1142 (AM_INIT_AUTOMAKE): Short invocation.
1143
b8548114
AD
11442002-05-02 Akim Demaille <akim@epita.fr>
1145
1146 Version 1.49a.
1147
c20cd1fa
AD
11482002-05-01 Akim Demaille <akim@epita.fr>
1149
1150 * src/skeleton.h: Remove.
1151
8a9566d4
AD
11522002-05-01 Akim Demaille <akim@epita.fr>
1153
1154 * src/skeleton.h: Fix the #endif.
1155 Reported by Magnus Fromreide.
1156
8c6d399a
PE
11572002-04-26 Paul Eggert <eggert@twinsun.com>
1158
1159 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
1160 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 1161 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 1162
2b7ed18a
RA
11632002-04-25 Robert Anisko <robert@lrde.epita.fr>
1164
1165 * src/scan-skel.l: Postprocess quadrigraphs.
1166
1167 * src/reader.c (copy_character): New function, used to output
1168 single characters while replacing `[' and `]' with quadrigraphs, to
1169 avoid troubles with M4 quotes.
1170 (copy_comment): Output characters with copy_character.
1171 (read_additionnal_code): Likewise.
1172 (copy_string2): Likewise.
1173 (copy_definition): Likewise.
1174
1175 * tests/calc.at: Exercise M4 quoting.
1176
34a89c50
AD
11772002-04-25 Akim Demaille <akim@epita.fr>
1178
1179 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
1180 between `!' and the command.
1181 Reported by Paul Eggert.
1182
0dd1580a
RA
11832002-04-24 Robert Anisko <robert@lrde.epita.fr>
1184
1185 * tests/calc.at: Exercise prologue splitting.
1186
1187 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
1188 `b4_post_prologue' instead of `b4_prologue'.
1189
1190 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
1191 muscles.
1192 (output): Free pre_prologue_obstack and post_prologue_obstack.
1193 * src/files.h, src/files.c (attrs_obstack): Remove.
1194 (pre_prologue_obstack, post_prologue_obstack): New.
1195 * src/reader.c (copy_definition): Add a parameter to specify the
1196 obstack to fill, instead of using attrs_obstack unconditionally.
1197 (read_declarations): Pass pre_prologue_obstack to copy_definition if
1198 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
1199
83c1796f
PE
12002002-04-23 Paul Eggert <eggert@twinsun.com>
1201
1202 * data/bison.simple: Remove unnecessary commentary and white
1203 space differences from 1_29-branch.
1204 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
1205
1206 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
1207 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
1208 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
1209 constructors or destructors.
1210
1211 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
1212
1207eeac
AD
12132002-04-23 Akim Demaille <akim@epita.fr>
1214
1215 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
1216 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
1217 location with columns.
1218 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
1219 All reported by Paul Eggert.
1220
78ab8f67
AD
12212002-04-22 Akim Demaille <akim@epita.fr>
1222
1223 * src/reduce.c (dump_grammar): Move to...
1224 * src/gram.h, src/gram.c (grammar_dump): here.
1225 Be sure to separate long item numbers.
1226 Don't read the members of a rule's prec if its nil.
1227
133c20e2
AD
12282002-04-22 Akim Demaille <akim@epita.fr>
1229
1230 * src/output.c (table_size, table_grow): New.
1231 (MAXTABLE): Remove, replace uses with table_size.
1232 (pack_vector): Instead of dying when the table is too big, grow it.
1233
9515e8a7
AD
12342002-04-22 Akim Demaille <akim@epita.fr>
1235
1236 * data/bison.simple (yyr1): Its type is that of a token number.
1237 * data/bison.c++ (r1_): Likewise.
1238 * tests/regression.at (Web2c Actions): Adjust.
1239
23c5a174
AD
12402002-04-22 Akim Demaille <akim@epita.fr>
1241
1242 * src/reader.c (token_translations_init): 256 is now the default
1243 value for the error token, i.e., it will be assigned another
1244 number if the user assigned 256 to one of her tokens.
1245 (reader): Don't force 256 to error.
1246 * doc/bison.texinfo (Symbols): Adjust.
1247 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
1248 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
1249 etc. instead of 10, 20, 30 (which was used to `jump' over error
1250 (256) and undefined (2)).
1251
5fbb0954
AD
12522002-04-22 Akim Demaille <akim@epita.fr>
1253
1254 Propagate more token_number_t.
1255
1256 * src/gram.h (token_number_as_item_number)
1257 (item_number_as_token_number): New.
1258 * src/output.c (GENERATE_OUTPUT_TABLE): New.
1259 Use it to create output_item_number_table and
1260 output_token_number_table.
1261 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
1262 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
1263 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
1264 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
1265
4f940944
AD
12662002-04-22 Akim Demaille <akim@epita.fr>
1267
1268 * src/output.h, src/output.c (get_lines_number): Remove.
1269
3ded9a63
AD
12702002-04-19 Akim Demaille <akim@epita.fr>
1271
1272 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
1273 as Lex/Flex'.
1274 (Debugging): More details about enabling the debugging features.
1275 (Table of Symbols): Describe $$, $n, @$, and @n.
1276 Suggested by Tim Josling.
1277
e0c471a9
AD
12782002-04-19 Akim Demaille <akim@epita.fr>
1279
1280 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
1281
fecc10cd
AD
12822002-04-10 Akim Demaille <akim@epita.fr>
1283
1284 * src/system.h: Rely on HAVE_LIMITS_H.
1285 Suggested by Paul Eggert.
1286
51dec47b
AD
12872002-04-09 Akim Demaille <akim@epita.fr>
1288
1289 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
1290 full stderr, and strip it according to the bison options, instead
1291 of composing the error message from different bits.
1292 This makes it easier to check for several error messages.
1293 Adjust all the invocations.
1294 Add an invocation exercising the error token.
1295 Add an invocation demonstrating a stupid error message.
1296 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
1297 Adjust the tests.
1298 Error message are for stderr, not stdout.
1299
007a50a4
AD
13002002-04-09 Akim Demaille <akim@epita.fr>
1301
1302 * src/gram.h, src/gram.c (error_token_number): Remove, use
1303 errtoken->number.
1304 * src/reader.c (reader): Don't specify the user token number (2)
1305 for $undefined, as it uselessly prevents using it.
1306 * src/gram.h (token_number_t): Move to...
1307 * src/symtab.h: here.
1308 (state_t.number): Is a token_number_t.
1309 * src/print.c, src/reader.c: Use undeftoken->number instead of
1310 hard coded 2.
1311 (Even though this 2 is not the same as above: the number of the
1312 undeftoken remains being 2, it is its user token number which
1313 might not be 2).
1314 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
1315 `user_token_number_max'.
1316 Output `undef_token_number'.
1317 * data/bison.simple, data/bison.c++: Use them.
1318 Be sure to map invalid yylex return values to
1319 `undef_token_number'. This saves us from gratuitous SEGV.
1320
1321 * tests/conflicts.at (Solved SR Conflicts)
1322 (Unresolved SR Conflicts): Adjust.
1323 * tests/regression.at (Web2c Actions): Adjust.
1324
06446ccf
AD
13252002-04-08 Akim Demaille <akim@epita.fr>
1326
1327 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
1328 Adding #line.
1329 Remove the duplicate `typedefs'.
1330 (RhsNumberType): Fix the declaration and various other typos.
1331 Use __ofile__.
1332 * data/bison.simple: Use __ofile__.
1333 * src/scan-skel.l: Handle __ofile__.
1334
62a3e4f0
AD
13352002-04-08 Akim Demaille <akim@epita.fr>
1336
1337 * src/gram.h (item_number_t): New, the type of item numbers in
1338 RITEM. Note that it must be able to code symbol numbers as
1339 positive number, and the negation of rule numbers as negative
1340 numbers.
1341 Adjust all dependencies (pretty many).
1342 * src/reduce.c (rule): Remove this `short *' pointer: use
1343 item_number_t.
1344 * src/system.h (MINSHORT, MAXSHORT): Remove.
1345 Include `limits.h'.
1346 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
1347 (shortcpy): Remove.
1348 (MAXTABLE): Move to...
1349 * src/output.c (MAXTABLE): here.
1350 (prepare_rules): Use output_int_table to output rhs.
1351 * data/bison.simple, data/bison.c++: Adjust.
1352 * tests/torture.at (Big triangle): Move the limit from 254 to
1353 500.
1354 * tests/regression.at (Web2c Actions): Ajust.
1355
1356 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
1357 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
1358 passes, but produces negative #line number, once fixed, GCC is
1359 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
1360 C), it passes.
1361 * src/state.h (state_h): Code input lines on ints, not shorts.
1362
bb88b0fc
AD
13632002-04-08 Akim Demaille <akim@epita.fr>
1364
1365 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
1366 and then the grammar.
1367
9a636f47
AD
13682002-04-08 Akim Demaille <akim@epita.fr>
1369
1370 * src/system.h: No longer using strndup.
1371
680e8701
AD
13722002-04-07 Akim Demaille <akim@epita.fr>
1373
1374 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
1375 * src/output.c (output_table_data): Return the longest number.
1376 (prepare_tokens): Output `token_number_max').
1377 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
1378 New.
1379 Use them to define yy_token_number_type/TokenNumberType.
1380 Use this type for yytranslate.
1381 * tests/torture.at (Big triangle): Push the limit from 124 to
1382 253.
1383 * tests/regression.at (Web2c Actions): Adjust.
1384
817e9f41
AD
13852002-04-07 Akim Demaille <akim@epita.fr>
1386
1387 * tests/torture.at (Big triangle): New.
1388 (GNU AWK Grammar, GNU Cim Grammar): Move to...
1389 * tests/existing.at: here.
1390
5123689b
AD
13912002-04-07 Akim Demaille <akim@epita.fr>
1392
1393 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
1394 nritems.
1395 Adjust dependencies.
1396
f3849179
AD
13972002-04-07 Akim Demaille <akim@epita.fr>
1398
1399 * src/reader.c: Normalize increments to prefix form.
1400
bd02036a
AD
14012002-04-07 Akim Demaille <akim@epita.fr>
1402
1403 * src/reader.c, symtab.c: Remove debugging code.
1404
db8837cb
AD
14052002-04-07 Akim Demaille <akim@epita.fr>
1406
1407 Rename all the `bucket's as `symbol_t'.
1408
1409 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
1410 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
1411 * src/symtab.c, src/symtab.h (bucket): Rename as...
1412 (symbol_t): this.
1413 (symbol_list_new, bucket_check_defined, bucket_make_alias)
1414 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
1415 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
1416 (buckets_new, buckets_free, buckets_do): Rename as...
1417 (symbol_list_new, symbol_check_defined, symbol_make_alias)
1418 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
1419 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
1420 (symbols_new, symbols_free, symbols_do): these.
1421
72a23c97
AD
14222002-04-07 Akim Demaille <akim@epita.fr>
1423
1424 Use lib/hash for the symbol table.
1425
1426 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
1427 EOF.
1428 * src/lex.c (lex): Set the `number' member of new terminals.
1429 * src/reader.c (bucket_check_defined, bucket_make_alias)
1430 (bucket_check_alias_consistence, bucket_translation): New.
1431 (reader, grammar_free, readgram, token_translations_init)
1432 (packsymbols): Adjust.
1433 (reader): Number the predefined tokens.
1434 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
1435 for predefined tokens.
1436 * src/symtab.h (bucket): Remove all the hash table related
1437 members.
1438 * src/symtab.c (symtab): Replace by...
1439 (bucket_table): this.
1440 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
1441 (buckets_new, buckets_do): New.
1442
280a38c3
AD
14432002-04-07 Akim Demaille <akim@epita.fr>
1444
1445 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
1446 (start_symbol, max_user_token_number, semantic_parser)
1447 (error_token_number): Initialize.
1448 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
1449 Initialize.
1450 (reader): Don't.
1451 (errtoken, eoftoken, undeftoken, axiom): Extern.
1452
03b31c0c
AD
14532002-04-07 Akim Demaille <akim@epita.fr>
1454
1455 * src/gram.h (rule_s): prec and precsym are now pointers
1456 to the bucket giving the priority/associativity.
1457 Member `associativity' removed: useless.
1458 * src/reduce.c, src/conflicts.c: Adjust.
1459
8b3df748
AD
14602002-04-07 Akim Demaille <akim@epita.fr>
1461
1462 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
1463 Properly escape the symbols' TAG when outputting them.
1464
e601aa1d
AD
14652002-04-07 Akim Demaille <akim@epita.fr>
1466
1467 * src/lalr.h (LA): Is a bitsetv, not bitset*.
1468
b0299a2e
AD
14692002-04-07 Akim Demaille <akim@epita.fr>
1470
1471 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
1472 (LArule): this, which is an array to rule_t*.
1473 * src/print.c, src/conflicts.c: Adjust.
1474
d7e1f00c
AD
14752002-04-07 Akim Demaille <akim@epita.fr>
1476
1477 * src/gram.h (rule_t): Rename `number' as `user_number'.
1478 `number' is a new member.
1479 Adjust dependencies.
1480 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
1481
cc9305dd
AD
14822002-04-07 Akim Demaille <akim@epita.fr>
1483
1484 As a result of the previous patch, it is no longer needed
1485 to reorder ritem itself.
1486
1487 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
1488
b0940840
AD
14892002-04-07 Akim Demaille <akim@epita.fr>
1490
1491 Be sure never to walk through RITEMS, but use only data related to
1492 the rules themselves. RITEMS should be banished.
1493
1494 * src/output.c (output_token_translations): Rename as...
1495 (prepare_tokens): this.
1496 In addition to `translate', prepare the muscles `tname' and
1497 `toknum', which were handled by...
1498 (output_rule_data): this.
1499 Remove, and move the remainder of its outputs into...
1500 (prepare_rules): this new routines, which also merges content from
1501 (output_gram): this.
1502 (prepare_rules): Be sure never to walk through RITEMS.
1503 (output_stos): Rename as...
1504 (prepare_stos): this.
1505 (output): Always invoke prepare_states, after all, just don't use it
1506 in the output if you don't need it.
1507
643a5994
AD
15082002-04-07 Akim Demaille <akim@epita.fr>
1509
1510 * src/LR0.c (new_state): Display `nstates' as the name of the
1511 newly created state.
1512 Adjust to initialize first_state and last_state if needed.
1513 Be sure to distinguish the initial from the final state.
1514 (new_states): Create the itemset of the initial state, and use
1515 new_state.
1516 * src/closure.c (closure): Now that the initial state has its
1517 items properly set, there is no need for a special case when
1518 creating `ruleset'.
1519
1520 As a result, now the rule 0, reducing to $axiom, is visible in the
1521 outputs. Adjust the test suite.
1522
1523 * tests/conflicts.at (Solved SR Conflicts)
1524 (Unresolved SR Conflicts): Adjust.
1525 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
1526 * tests/conflicts.at (S/R in initial): New.
1527
b4c4ccc2
AD
15282002-04-07 Akim Demaille <akim@epita.fr>
1529
1530 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
1531 the RHS of the rules.
1532 * src/output.c (output_gram): Likewise.
1533
bba97eb2
AD
15342002-04-07 Akim Demaille <akim@epita.fr>
1535
1536 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
1537 bucket.
1538 Adjust all dependencies.
1539 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
1540 `number' of the buckets too.
1541 * src/gram.h: Include `symtab.h'.
1542 (associativity): Move to...
1543 * src/symtab.h: here.
1544 No longer include `gram.h'.
1545
c3b407f4
AD
15462002-04-07 Akim Demaille <akim@epita.fr>
1547
1548 * src/gram.h, src/gram.c (rules_rhs_length): New.
1549 (ritem_longest_rhs): Use it.
1550 * src/gram.h (rule_t): `number' is a new member.
1551 * src/reader.c (packgram): Set it.
1552 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
1553 the end of `rules', and count them out of `nrules'.
1554 (reduce_output, dump_grammar): Adjust.
1555 * src/print.c (print_grammar): It is no longer needed to check for
1556 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
1557 * tests/reduce.at (Reduced Automaton): New test.
1558
11652ab3
AD
15592002-04-07 Akim Demaille <akim@epita.fr>
1560
1561 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
1562 lacking `+ 1' to nrules, Bison reported as useless a token if it
1563 was used solely to set the precedence of the last rule...
1564
26b23c1a
AD
15652002-04-07 Akim Demaille <akim@epita.fr>
1566
1567 * data/bison.c++, data/bison.simple: Don't output the current file
1568 name in #line, to avoid useless diffs between two identical
1569 outputs under different names.
1570
18bcecb0
AD
15712002-04-07 Akim Demaille <akim@epita.fr>
1572
1573 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
1574 Normalize loops to using `< nrules + 1', not `<= nrules'.
1575
fa770c86
AD
15762002-04-07 Akim Demaille <akim@epita.fr>
1577
1578 * TODO: Update.
1579
d9b739c3
AD
15802002-04-07 Akim Demaille <akim@epita.fr>
1581
1582 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
1583 bucket.value as bucket.number.
1584
99013900
AD
15852002-04-07 Akim Demaille <akim@epita.fr>
1586
1587 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
1588 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
1589 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
1590 RHS, instead of being an index in RITEMS.
1591
e966383b
PE
15922002-04-04 Paul Eggert <eggert@twinsun.com>
1593
1594 * doc/bison.texinfo: Update copyright date.
1595 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
1596 (Symbols): Warn about running Bison in one character set,
1597 but compiling and/or running in an incompatible one.
1598 Warn about character code 256, too.
1599
16002002-04-03 Paul Eggert <eggert@twinsun.com>
1601
1602 * src/bison.data (YYSTACK_ALLOC): Depend on whether
1603 YYERROR_VERBOSE is nonzero, not whether it is defined.
1604
1605 Merge changes from bison-1_29-branch.
c307773e 1606
8d6c48b9
PE
16072002-03-20 Paul Eggert <eggert@twinsun.com>
1608
1609 Merge fixes from Debian bison_1.34-1.diff.
1610
1611 * configure.in (AC_PREREQ): 2.53.
1612
e53c6322
AD
16132002-03-20 Akim Demaille <akim@epita.fr>
1614
1615 * src/conflicts.c (log_resolution): Argument `resolution' is const.
1616
9ffbeca7
PE
16172002-03-19 Paul Eggert <eggert@twinsun.com>
1618
21db0b2a
PE
1619 * src/bison.simple (YYCOPY): New macro.
1620 (YYSTACK_RELOCATE): Use it.
1621 Remove Type arg; no longer needed. All callers changed.
1622 (yymemcpy): Remove; no longer needed.
1623
9ffbeca7
PE
1624 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
1625 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1626
642cb8f8
AD
16272002-03-19 Akim Demaille <akim@epita.fr>
1628
1629 Test and fix the #line outputs.
1630
1631 * tests/atlocal.at (GCC): New.
1632 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
1633 (Prologue synch line, ,%union synch line, Postprologue synch line)
1634 (Action synch line, Epilogue synch line): New tests.
1635 * src/reader.c (parse_union_decl): Define the muscle stype_line.
1636 * data/bison.simple, data/bison.c++: Use it.
1637
3c31a486
AD
16382002-03-19 Akim Demaille <akim@epita.fr>
1639
1640 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
1641 (Solved SR Conflicts, %expect not enough, %expect right)
1642 (%expect too much): Move to...
1643 * tests/conflicts.at: this new file.
1644
0d8bed56
AD
16452002-03-19 Akim Demaille <akim@epita.fr>
1646
1647 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
1648 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
1649 that we can move to enums for instance.
1650 * src/output.c (token_definitions_output): Output a list of
1651 `token-name, token-number' instead of the #define.
1652 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
1653
9208d17f
AD
16542002-03-14 Akim Demaille <akim@epita.fr>
1655
1656 Use Gettext 0.11.1.
1657
af27eacb
RA
16582002-03-09 Robert Anisko <robert@lrde.epita.fr>
1659
1660 * data/bison.c++: Make the user able to add members to the generated
1661 parser by subclassing.
1662
9101a310
RA
16632002-03-05 Robert Anisko <robert@lrde.epita.fr>
1664
1665 * src/reader.c (read_additionnal_code): `c' should be an integer, not
1666 a character.
1667 Reported by Nicolas Tisserand and Nicolas Burrus.
1668
fff9bf0b
RA
16692002-03-04 Robert Anisko <robert@lrde.epita.fr>
1670
1671 * src/reader.c: Warn about lacking semi-colons, do not complain.
1672
64dba31e
RA
16732002-03-04 Robert Anisko <robert@lrde.epita.fr>
1674
1675 * data/bison.c++: Remove a debug line.
1676
374f5a14
RA
16772002-03-04 Robert Anisko <robert@lrde.epita.fr>
1678
1679 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
1680 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
1681 provide a default implementation.
1682
bfcf1f3a
AD
16832002-03-04 Akim Demaille <akim@epita.fr>
1684
1685 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
1686 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
1687 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
1688 * tests/semantic.at (Parsing Guards): Similarly.
1689 * src/reader.at (readgram): Complain if the last rule is not ended
1690 with a semi-colon.
1691
65ccf9fc
AD
16922002-03-04 Akim Demaille <akim@epita.fr>
1693
1694 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
1695 * src/closure.c: here.
1696 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
1697 RTC.
1698 * src/warshall.h, src/warshall.c: Remove.
1699 * tests/sets.at (Broken Closure): Adjust.
1700
d0039cbc
AD
17012002-03-04 Akim Demaille <akim@epita.fr>
1702
1703 * src/output.c (output_skeleton): tempdir is const.
1704 bytes_read is unused.
1705
345cea78
AD
17062002-03-04 Akim Demaille <akim@epita.fr>
1707
1708 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1709 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
1710 Update.
1711 From Michael Hayes.
1712
564801f7
AD
17132002-03-04 Akim Demaille <akim@epita.fr>
1714
1715 * src/closure.c (closure): `r' is unused.
1716
e5352bc7
AD
17172002-03-04 Akim Demaille <akim@epita.fr>
1718
1719 * tests/sets.at (Broken Closure): Add the ending `;'.
1720 * src/reader.at (readgram): Complain if a rule is not ended with a
1721 semi-colon.
1722
914feea9
AD
17232002-03-04 Akim Demaille <akim@epita.fr>
1724
1725 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
1726 (count_sr_conflicts): Use bitset_count.
1727 * src/reduce.c (inaccessable_symbols): Ditto.
1728 (bits_size): Remove.
1729 * src/warshall.h, src/warshall.c: Convert to bitsetv.
1730
f0250de6
AD
17312002-03-04 Akim Demaille <akim@epita.fr>
1732
1733 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
1734 * src/reduce.c: Remove the `bitset_zero's following the
1735 `bitset_create's, as now it is performed by the latter.
1736
ef017502
AD
17372002-03-04 Akim Demaille <akim@epita.fr>
1738
1739 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
1740 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
1741 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
1742 latest sources from Michael.
1743
76514394
AD
17442002-03-04 Akim Demaille <akim@epita.fr>
1745
1746 * src/output.c (output): Don't free the grammar.
1747 * src/reader.c (grammar_free): New.
1748 * src/main.c (main): Call it and don't free symtab here.
1749
55024580
AD
17502002-03-04 Akim Demaille <akim@epita.fr>
1751
1752 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
1753 before returning.
1754 Reported by Benoit Perrot.
1755
f9abaa2c
AD
17562002-03-04 Akim Demaille <akim@epita.fr>
1757
1758 Use bitset operations when possible, not loops over bits.
1759
1760 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
1761 bitset_or.
1762 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
1763 * src/reduce.c (useless_nonterminals): Formatting changes.
1764 * src/warshall.c (TC): Use bitset_or.
1765
0e721e75
AD
17662002-03-04 Akim Demaille <akim@epita.fr>
1767
1768 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
1769 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
1770 Ditto.
1771
0fb1ffb1
AD
17722002-03-04 Akim Demaille <akim@epita.fr>
1773
1774 * src/lalr.c (F): Now a bitset*.
1775 Adjust all dependencies.
1776
b86796bf
AD
17772002-03-04 Akim Demaille <akim@epita.fr>
1778
1779 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
1780 Adjust all dependencies.
1781
602bbf31
AD
17822002-03-04 Akim Demaille <akim@epita.fr>
1783
1784 * src/L0.c, src/LR0.h (nstates): Be size_t.
1785 Adjust comparisons (signed vs unsigned).
1786 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
1787 bitset*.
1788 Adjust all dependencies.
1789
d8a0245c
AD
17902002-03-04 Akim Demaille <akim@epita.fr>
1791
1792 * src/closure.c (firsts): Now, also a bitset.
1793 Adjust all dependencies.
1794 (varsetsize): Remove, now unused.
1795 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
1796
34ba9743
AD
17972002-03-04 Akim Demaille <akim@epita.fr>
1798
1799 * src/print.c: Convert to use bitset.h, not hand coded iterations
1800 over ints.
1801
ed86e78c
AD
18022002-03-04 Akim Demaille <akim@epita.fr>
1803
1804 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1805
dfdb1797
AD
18062002-03-04 Akim Demaille <akim@epita.fr>
1807
1808 * src/closure.c (ruleset): Be a bitset.
1809 (rulesetsize): Remove.
1810
7086e707
AD
18112002-03-04 Akim Demaille <akim@epita.fr>
1812
1813 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1814 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1815 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1816 * src/closure.c (fderives): Be an array of bitsets.
1817
98254360
RA
18182002-02-28 Robert Anisko <robert@lrde.epita.fr>
1819
1820 * data/bison.c++: Merge the two generated headers. Insert a copyright
1821 notice in each output file.
1822
a75c057f
AD
18232002-02-28 Akim Demaille <akim@epita.fr>
1824
1825 * data/bison.c++: Copy the prologue of bison.simple to fetch
1826 useful M4 definitions, such as b4_header_guard.
1827
06b00abc
AD
18282002-02-25 Akim Demaille <akim@epita.fr>
1829
1830 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
1831 translator friendly scheme for the bgr
1832 copyright notice.
06b00abc 1833
70e7d534
AD
18342002-02-25 Akim Demaille <akim@epita.fr>
1835
1836 * src/output.c (header_output): Remove, now handled completely via
1837 M4.
1838
abe017f6
AD
18392002-02-25 Akim Demaille <akim@epita.fr>
1840
1841 * m4/m4.m4: New, from CVS Autoconf.
1842 * configure.in: Invoke it.
1843 * src/output.c (output_skeleton): Use its result instead of the
1844 hard coded name.
1845
381fb12e
AD
18462002-02-25 Akim Demaille <akim@epita.fr>
1847
1848 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1849 Fileutils 4.1.5.
1850 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1851 * src/output.c (output_skeleton): Use mkstemp to create a real
1852 temporary file.
1853 Move the filling of `skeleton' and its muscle to...
1854 (prepare): here.
1855 (output): Move the definition of the prologue muscle to...
1856 (prepare): here.
1857 * src/system.h (DEFAULT_TMPDIR): New.
1858
6f38107f
PE
18592002-02-14 Paul Eggert <eggert@twinsun.com>
1860
1861 Remove the support for C++ namespace cleanliness; it was
1862 causing more problems than it was curing, since it didn't work
1863 properly on some nonstandard C++ compilers. This can wait
1864 for a proper C++ parser.
1865
1866 * NEWS: Document this.
1867 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1868 of C++, as it's treated like C now.
1869 * src/bison.simple (YYSTD): Remove.
1870 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1871 Treat C++ just like Standard C instead of trying to support
1872 namespace cleanliness.
1873
80cce3da
AD
18742002-02-14 Akim Demaille <akim@epita.fr>
1875
1876 * tests/regression.at (else): Adjust to Andreas' change.
1877
842e8679
AD
18782002-02-14 Akim Demaille <akim@epita.fr>
1879
1880 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1881
4bda3f10
AD
18822002-02-13 Andreas Schwab <schwab@suse.de>
1883
1884 * src/output.c (output_rule_data): Don't output NULL, it might
1885 not be defined yet.
1886
4162fa07 18872002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 1888
4162fa07
RA
1889 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1890 (Copyright notice): Update.
b418ecd8 1891
bd16a5dc
AD
18922002-02-11 Akim Demaille <akim@epita.fr>
1893
1894 * tests/regression.at (%nonassoc and eof): Don't include
1895 nonportable headers.
1896
8d69a1a3
RA
18972002-02-08 Robert Anisko <robert@lrde.epita.fr>
1898
1899 * data/bison.c++: Correct error recovery. Make the user able to
1900 initialize the starting location.
1901
9b2d0677
AD
19022002-02-07 Akim Demaille <akim@epita.fr>
1903
1904 * tests/input.at: New.
1905
69e2658b
RA
19062002-02-07 Robert Anisko <robert@lrde.epita.fr>
1907
1908 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 1909 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
1910 directives around tables only needed for debugging.
1911
4aacc3a7
RA
19122002-02-07 Robert Anisko <robert@lrde.epita.fr>
1913
1914 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1915 C++ parsers.
1916 (yy::b4_name::parse): Use print_.
1917
762a801e
RA
19182002-02-07 Robert Anisko <robert@lrde.epita.fr>
1919
1920 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1921
4bb2bc3f
RA
19222002-02-07 Robert Anisko <robert@lrde.epita.fr>
1923
1924 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1925 C++ parsers.
1926 (yy::b4_name::parse): Build verbose error messages, and use error_.
1927
6b45a3ca
RA
19282002-02-06 Robert Anisko <robert@lrde.epita.fr>
1929
1930 * data/bison.c++: Fix m4 quoting in comments.
1931
50997c6e
RA
19322002-02-06 Robert Anisko <robert@lrde.epita.fr>
1933
1934 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1935 not expanded by m4.
1936
3f3eed27
AD
19372002-02-05 Akim Demaille <akim@epita.fr>
1938
1939 * data/bison.c++: Adjust to the M4 back end.
1940 More is certainly needed.
1941
be2a1a68
AD
19422002-02-05 Akim Demaille <akim@epita.fr>
1943
1944 Give a try to M4 as a back end.
1945
1946 * lib/readpipe.c: New, from wdiff.
1947 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1948 BISON_HAIRY.
1949 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1950 specific values. Now it is m4 that performs the lookup.
1951 * src/parse-skel.y: Remove.
1952 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1953 * src/output.c (actions_output, guards_output)
1954 (token_definitions_output): No longer keeps track of the output
1955 line number, hence remove the second argument.
1956 (guards_output): Check against the guard member of a rule, not the
1957 action member.
1958 Adjust callers.
1959 (output_skeleton): Don't look for the skeleton location, let m4 do
1960 that.
1961 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1962 file will be used.
1963 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1964 (prepare): Given that for the time being changesyntax is not
1965 usable in M4, rename the muscles using `-' to `_'.
1966 Define `defines_flag', `output_parser_name' and `output_header_name'.
1967 * src/output.h (actions_output, guards_output)
1968 (token_definitions_output): Adjust prototypes.
1969 * src/scan-skel.l: Instead of scanning the skeletons, it now
1970 processes the output of m4: `__oline__' and `#output'.
1971 * data/bison.simple: Adjust to be used by M4(sugar).
1972 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1973 to date.
1974 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1975 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1976 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1977 shamelessly stolen from CVS Autoconf.
1978
beda758b
AD
19792002-02-05 Akim Demaille <akim@epita.fr>
1980
1981 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1982 * configure.in: Check for the declarations of free and malloc.
1983 * src/muscle_tab.c: Adjust.
1984
5ece6d43
AD
19852002-02-05 Akim Demaille <akim@epita.fr>
1986
1987 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1988 which have no values.
1989
5bb18f9a
AD
19902002-02-05 Akim Demaille <akim@epita.fr>
1991
1992 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1993 * data/: here.
1994
894dd62e
PE
19952002-01-29 Paul Eggert <eggert@twinsun.com>
1996
1997 * src/bison.simple (YYSIZE_T): Do not define merely because
1998 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1999 On some platforms, <alloca.h> does not declare YYSTD (size_t).
2000
82841af7
AD
20012002-01-27 Akim Demaille <akim@epita.fr>
2002
2003 Fix `%nonassoc and eof'.
2004
2005 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
2006 which were not properly copied! Replace
2007 memcpy (res->errs, src->errs, src->nerrs);
2008 with
2009 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
2010 !!!
2011 * tests/regression.at (%nonassoc and eof): Adjust to newest
2012 Autotest: `.' is not in the PATH.
2013
318b76e9
AD
20142002-01-27 Akim Demaille <akim@epita.fr>
2015
2016 * tests/sets.at (AT_EXTRACT_SETS): New.
2017 (Nullable): Use it.
2018 (Firsts): New.
2019
30d2f3d5
AD
20202002-01-26 Akim Demaille <akim@epita.fr>
2021
2022 * tests/actions.at, tests/calc.at, tests/headers.at,
2023 * tests/torture.at: Adjust to the newest Autotest which no longer
2024 forces `.' in the PATH.
2025
30f8c395
AD
20262002-01-25 Akim Demaille <akim@epita.fr>
2027
2028 * tests/regression.at (%nonassoc and eof): New.
2029 Suggested by Robert Anisko.
2030
29ae55f1
AD
20312002-01-24 Akim Demaille <akim@epita.fr>
2032
2033 Bison dumps core when trying to complain about broken input files.
2034 Reported by Cris van Pelt.
2035
2036 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
2037 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
2038 into...
2039 (Invalid inputs): Strengthen: exercise parse_percent_token.
2040
2b548aa6
RA
20412002-01-24 Robert Anisko <robert.anisko@epita.fr>
2042
2043 * src/Makefile.am: Add bison.c++.
2044 * src/bison.c++: New skeleton.
2045
bb0146c2
AD
20462002-01-21 Paolo Bonzini <bonzini@gnu.org>
2047
2048 * po/it.po: New.
2049
bec30531
AD
20502002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
2051
2052 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
2053
fc6edc45
MA
20542002-01-20 Marc Autret <marc@gnu.org>
2055
2056 * src/files.c (compute_output_file_names): Fix
2057
5e5d5415
MA
20582002-01-20 Marc Autret <marc@gnu.org>
2059
2060 * tests/output.at: New test.
2061 * src/files.c (compute_base_names): Don't map extensions when
2062 the YACC flag is set, use defaults.
2063 Reported by Evgeny Stambulchik.
2064
44ea3fbd
MA
20652002-01-20 Marc Autret <marc@gnu.org>
2066
bb0146c2 2067 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
2068 compilers as well (i.e. the vendor C compiler).
2069 Suggested by Albert Chin-A-Young.
2070
338963d1
TVH
20712002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
2072
2073 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
2074 canonical definition.
2075 * src/system.h: Use the canonical definition for PARAMS (avoids
2076 a conflict with the macro from lib/hash.h).
2077
c57b2479
AD
20782002-01-11 Akim Demaille <akim@epita.fr>
2079
2080 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 2081 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 2082
b85810ae
AD
20832002-01-09 Akim Demaille <akim@epita.fr>
2084
2085 * src/files.c, src/files.h (output_infix): New.
2086 (tab_extension): Remove.
2087 (compute_base_names): Compute the former, drop the latter.
2088 * src/output.c (prepare): Insert the muscles `output-infix', and
2089 `output-suffix'.
2090 * src/parse-skel.y (string, string.1): New.
2091 (section.header): Use it.
2092 (section.yacc): Remove.
2093 (prefix): Remove too.
2094 * src/scan-skel.l: Adjust.
2095 * src/bison.simple, src/bison.hairy: Adjust.
2096
cae60122
AD
20972002-01-09 Akim Demaille <akim@epita.fr>
2098
2099 * configure.in (WERROR_CFLAGS): Compute it.
2100 * src/Makefile.am (CFLAGS): Pass it.
2101 * tests/atlocal.in (CFLAGS): Idem.
2102 * src/files.c: Fix a few warnings.
2103 (get_extension_index): Remove, unused.
2104
ae404801
AD
21052002-01-08 Akim Demaille <akim@epita.fr>
2106
2107 * src/getargs.c (AS_FILE_NAME): New.
2108 (getargs): Use it to convert DOSish file names.
2109 * src/files.c (base_name): Rename as full_base_name to avoid
2110 clashes with `base_name ()'.
2111 (filename_split): New.
2112 (compute_base_names): N-th rewrite, using filename_split.
2113
22312b71
AD
21142002-01-08 Akim Demaille <akim@epita.fr>
2115
2116 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
2117 New, stolen from the Fileutils 4.1.
2118 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2119 * configure.in: Check for the presence of memrchr, and of its
2120 prototype.
2121
a67cef01
TVH
21222002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
2123
2124 * lib/hash.h (__P): Added definition for this macro.
2125 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
2126 BUILT_SOURCES, to ensure they are generated first.
2127 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
2128 %error-verbose to allow bootstrapping with bison 1.30x.
2129
2b25d624
AD
21302002-01-06 Akim Demaille <akim@epita.fr>
2131
2132 * src/reader.c (parse_braces): Don't fetch the next char, the
2133 convention is to fetch on entry.
2134 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
2135 'switch' without a following semicolon.
2136 * tests/regression.at (braces parsing): New.
2137
3460813b
AD
21382002-01-06 Akim Demaille <akim@epita.fr>
2139
2140 Bison is dead wrong in its RR conflict reports.
2141
2142 * tests/torture.at (GNU Cim Grammar): New.
2143 * src/conflicts.c (count_rr_conflicts): Fix.
2144
73784c64
AD
21452002-01-06 Akim Demaille <akim@epita.fr>
2146
2147 Creating package.m4 from configure.ac causes too many problems.
2148
2149 * tests/Makefile.am (package.m4): Create it by hand,
2150 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
2151
25d81090
AD
21522002-01-06 Akim Demaille <akim@epita.fr>
2153
2154 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
2155 skeleton.h.
2156
a9b8959e
PE
21572002-01-04 Paul Eggert <eggert@twinsun.com>
2158
2159 * doc/bison.texinfo (Debugging):
2160 Remove YYSTDERR; it's no longer defined or used.
2161 Also, s/cstdio.h/cstdio/.
2162
25d81090
AD
21632002-01-03 Akim Demaille <akim@epita.fr>
2164
2165 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
2166
1109455c
AD
21672002-01-03 Akim Demaille <akim@epita.fr>
2168
2169 * src/parse-skel.y (process_skeleton): Don't bind the parser's
2170 tracing code to --trace, wait for a better --trace option, with
2171 args.
2172
7ea5e977
AD
21732002-01-03 Akim Demaille <akim@epita.fr>
2174
2175 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
2176 The ISO C++ standard is extremely clear about it: stderr is
2177 considered a macro, not a regular symbol (see table 94 `Header
2178 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
2179 Therefore std:: does not apply to it. It still does with fprintf.
2180 Also, s/cstdio.h/cstdio/.
2181
fab5b110
AD
21822002-01-03 Akim Demaille <akim@epita.fr>
2183
2184 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
2185 for non system headers.
2186
aed7fd9b
AD
21872002-01-02 Akim Demaille <akim@epita.fr>
2188
2189 Equip the skeleton chain with location tracking, runtime trace,
2190 pure parser and scanner.
2191
2192 * src/parse-skel.y: Request a pure parser, locations, and prefix
2193 renaming.
2194 (%union): Having several members with the same type does not help
2195 type mismatches, simplify.
2196 (YYPRINT, yyprint): New.
2197 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
2198 (skel_error): this.
2199 Handle locations.
2200 * src/scan-skel.l: Adjust to these changes.
2201 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
2202 (LOCATION_PRINT, skel_control_t): New.
2203
24fad99e
AD
22042001-12-30 Akim Demaille <akim@epita.fr>
2205
2206 * src/parse-skel.y: Get rid of the shift/reduce conflict:
2207 replace `gb' with BLANKS.
2208 * src/scan-skel.l: Adjust.
2209
a4b36db4
AD
22102001-12-30 Akim Demaille <akim@epita.fr>
2211
2212 * src/system.h: We don't need nor want bcopy.
2213 Throw away MS-DOS crap: we don't need getpid.
2214 * configure.in: We don't need strndup. It was even causing
2215 problems: because Flex includes the headers *before* us,
2216 _GNU_SOURCE is not defined by config.h, and therefore strndup was
2217 not visible.
2218 * lib/xstrndup.c: New.
2219 * src/scan-skel.l: Use it.
2220 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
2221 * src/parse-skel.y: Use %directives instead of #defines.
2222
1239777d
AD
22232001-12-30 Akim Demaille <akim@epita.fr>
2224
2225 * src/skeleton.h: New.
2226 * src/output.c (output_parser, output_master_parser): Remove, dead
2227 code.
2228 * src/output.h (get_lines_number, actions_output, guards_output)
2229 (token_definitions_output): Prototype them.
2230 * src/parse-skel.y: Add the license notice.
2231 Include output.h and skeleton.h.
2232 (process_skeleton): Returns void, and takes a single parameter.
2233 * src/scan-skel.l: Add the license notice.
2234 Include skeleton.h.
2235 Don't use %option yylineno: it seems that then Flex imagines
2236 REJECT has been used, and therefore it won't reallocate its
2237 buffers (which makes no other sense to me than a bug). It results
2238 in warnings for `unused: yy_flex_realloc'.
2239
9b3add5b
RA
22402001-12-30 Robert Anisko <robert.anisko@epita.fr>
2241
2242 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
2243 (MUSCLE_INSERT_PREFIX): ...to there.
2244 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
2245 (MUSCLE_INSERT_PREFIX): Move from here...
2246
2247 * src/bison.hairy: Add a section directive. Put braces around muscle
2248 names. This parser skeleton is still broken, but Bison should not
2249 choke on a bad muscle 'syntax'.
2250 * src/bison.simple: Add a section directive. Put braces around muscle
2251 names.
2252
2253 * src/files.h (strsuffix, stringappend): Add declarations.
2254 (tab_extension): Add declaration.
2255 (short_base_name): Add declaration.
2256
2257 * src/files.c (strsuffix, stringappend): No longer static. These
2258 functions are used in the skeleton parser.
2259 (tab_extension): New.
2260 (compute_base_names): Use the computations done in this function
fab5b110 2261 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
2262 names.
2263 (short_base_name): No longer static.
2264
2265 * src/output.c (output_skeleton): New.
2266 (output): Disable call to output_master_parser, and give a try to
2267 a new skeleton handling system.
2268 (guards_output, actions_output): No longer static.
2269 (token_definitions_output, get_lines_number): No longer static.
2270
2271 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
2272
fab5b110 2273 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
2274 parse-skel.y.
2275
2276 * src/parse-skel.y: New file.
2277 * src/scan-skel.l: New file.
2278
b5b61c61
AD
22792001-12-29 Akim Demaille <akim@epita.fr>
2280
2281 %name-prefix is broken.
2282
2283 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
2284 Adjust all dependencies.
2285 * tests/headers.at (export YYLTYPE): Strengthen this test: use
2286 %name-prefix.
2287
2288 Renaming yylval but not yylloc is not consistent. Now we do.
2289
2290 * src/bison.simple: Prefix yylloc if used.
2291 * doc/bison.texinfo (Decl Summary): Document that.
2292
8c9a50be
AD
22932001-12-29 Akim Demaille <akim@epita.fr>
2294
2295 * doc/bison.texinfo: Promote `%long-directive' over
2296 `%long_directive'.
2297 Remove all references to fixed-output-files, yacc is enough.
2298
d99361e6
AD
22992001-12-29 Akim Demaille <akim@epita.fr>
2300
2301 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
2302 user prologue. These are defaults.
2303 * tests/actions.at (Mid-rule actions): Make sure the user can
2304 define YYDEBUG and YYERROR_VERBOSE.
2305
b9cecb91
AD
23062001-12-29 Akim Demaille <akim@epita.fr>
2307
2308 * src/output.c (header_output): Don't forget to export YYLTYPE and
2309 yylloc.
2310 * tests/headers.at (export YYLTYPE): New, make sure it does.
2311 * tests/regression.at (%union and --defines, Invalid CPP headers):
2312 Move to...
2313 * tests/headers.at: here.
2314
aea13e97
AD
23152001-12-29 Akim Demaille <akim@epita.fr>
2316
2317 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
2318
931394cb
AD
23192001-12-29 Akim Demaille <akim@epita.fr>
2320
2321 * tests/actions.at (Mid-rule actions): Output on a single line
2322 instead of several.
2323
704a47c4
AD
23242001-12-29 Akim Demaille <akim@epita.fr>
2325
2326 * doc/bison.texinfo: Formatting changes.
2327
091e20bb
AD
23282001-12-29 Akim Demaille <akim@epita.fr>
2329
2330 Don't store the token defs in a muscle, just be ready to output it
2331 on command. Now possible via `symbols'. Fixes a memory leak.
2332
2333 * src/output.c (token_definitions_output): New.
2334 (output_parser, header_output): Use it.
2335 * src/reader.c (symbols_save): Remove.
2336
cce71710
AD
23372001-12-29 Akim Demaille <akim@epita.fr>
2338
2339 * src/bison.simple: Do not provide a default for YYSTYPE and
2340 YYLTYPE before the user's prologue. Otherwise it's hardly... a
2341 default.
2342
82c035a8
AD
23432001-12-29 Akim Demaille <akim@epita.fr>
2344
2345 Mid-rule actions are simply... ignored!
2346
2347 * src/reader.c (readgram): Be sure to attach mid-rule actions to
2348 the empty-rule associated to the dummy symbol, not to the host
2349 rule.
2350 * tests/actions.at (Mid-rule actions): New.
2351
8419d367
AD
23522001-12-29 Akim Demaille <akim@epita.fr>
2353
2354 Memory leak.
2355
2356 * src/reader.c (reader): Free grammar.
2357
375d5806
AD
23582001-12-29 Akim Demaille <akim@epita.fr>
2359
2360 Memory leak.
2361
2362 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
2363 since it allocates it for each state, although only one is needed.
2364 (allocate_storage): Do it here.
2365
f51cb8ff
AD
23662001-12-29 Akim Demaille <akim@epita.fr>
2367
2368 * src/options.h, src/options.c (create_long_option_table): Rename
2369 as...
2370 (long_option_table_new): this, with a clearer prototype.
2371 (percent_table): Remove, unused,
2372 * src/getargs.c (getargs): Adjust.
2373
29e88316
AD
23742001-12-29 Akim Demaille <akim@epita.fr>
2375
2376 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
2377 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
2378 as states.
2379
b9f71f19
AD
23802001-12-29 Akim Demaille <akim@epita.fr>
2381
2382 * src/lalr.c (build_relations): Rename `states' as `states1'.
2383 Sorry, I don't understand exactly what it is, no better name...
2384
1a2b5d37
AD
23852001-12-29 Akim Demaille <akim@epita.fr>
2386
2387 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
2388 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
2389 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
2390 as rules.
2391
1cca533e
AD
23922001-12-29 Akim Demaille <akim@epita.fr>
2393
2394 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
2395 ago.
2396
c03ae966
AD
23972001-12-29 Akim Demaille <akim@epita.fr>
2398
2399 * src/reader.c, src/reader.h (user_toknums): Remove.
2400 Adjust all users to use symbols[i]->user_token_number.
2401
5a670b1e
AD
24022001-12-29 Akim Demaille <akim@epita.fr>
2403
2404 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
2405 Adjust all users to use symbols[i]->prec or ->assoc.
2406
ad949da9
AD
24072001-12-29 Akim Demaille <akim@epita.fr>
2408
2409 * src/reader.c, src/reader.h (tags): Remove.
2410 Adjust all users to use symbols[i]->tag.
2411
0e78e603
AD
24122001-12-29 Akim Demaille <akim@epita.fr>
2413
2414 * src/gram.h, src/gram.c (symbols): New, similar to state_table
2415 and rule_table.
2416 * src/reader.c (packsymbols): Fill this table.
2417 Drop sprec.
2418 * src/conflicts.c (resolve_sr_conflict): Adjust.
2419 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
2420 single table.
2421 Use symbols[i]->tag instead of tags[i].
2422
213e640e
AD
24232001-12-29 Akim Demaille <akim@epita.fr>
2424
2425 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
2426 In addition, put a comment in there, to replace...
2427 * tests/regression.at (%union and C comments): Remove.
2428
e7b8bef1
AD
24292001-12-29 Akim Demaille <akim@epita.fr>
2430
2431 * tests/regression.at (Web2c Actions): Blindly move the actual
2432 output as expected output. The contents *seem* right to me, but I
2433 can't pretend reading perfectly parser tables... Nonetheless, all
2434 the other tests pass correctly, the table look OK, even though the
2435 presence of `$axiom' is to be noted: AFAICS it is useless (but
2436 harmless).
2437
b68e7744
AD
24382001-12-29 Akim Demaille <akim@epita.fr>
2439
2440 * src/reader.c (readgram): Don't add the rule 0 if there were no
2441 rules read. In other words, add it _after_ having performed
2442 grammar sanity checks.
2443 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
2444
78d5bae9
AD
24452001-12-29 Akim Demaille <akim@epita.fr>
2446
2447 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
2448 visible, and some states have now a different number.
2449
ff442794
AD
24502001-12-29 Akim Demaille <akim@epita.fr>
2451
2452 * src/reader.c (readgram): Bind the initial rule's lineno to that
2453 of the first rule.
2454 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
2455 (Solved SR Conflicts): Adjust rule 0's line number.
2456
610ab194
AD
24572001-12-29 Akim Demaille <akim@epita.fr>
2458
2459 Fix the `GAWK Grammar' failure.
2460
2461 * src/LR0.c (final_state): Initialize to -1 so that we do compute
2462 the reductions of the first state which was mistakenly confused
2463 with the final state because precisely final_state was initialized
2464 to 0.
2465 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
2466 now noticed by Bison.
2467 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
2468 have a reduction on $default.
2469
29d29c8f
AD
24702001-12-29 Akim Demaille <akim@epita.fr>
2471
2472 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
2473 rule line numbers.
2474 * src/closure.c (print_closure): Likewise.
2475 * src/derives.c (print_derives): Likewise.
2476 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
2477 now.
2478
7c6b64d0
AD
24792001-12-29 Akim Demaille <akim@epita.fr>
2480
2481 * src/lalr.c (lookaheads_print): New.
2482 (lalr): Call it when --trace-flag.
2483 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
2484 are dumped.
2485
3d4daee3
AD
24862001-12-29 Akim Demaille <akim@epita.fr>
2487
2488 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
2489 when walking through ritem, even via rule->rhs.
2490 * src/reduce.c (dump_grammar, useful_production, reduce_output)
2491 (useful_production, useless_nonterminals): Likewise.
2492 (reduce_grammar_tables): Likewise, plus update nritems.
2493 * src/nullable.c (set_nullable): Likewise.
2494 * src/lalr.c (build_relations): Likewise.
2495 * tests/sets.at (Nullable): Adjust.
2496 Fortunately, now, the $axiom is no longer nullable.
2497
9e7f6bbd
AD
24982001-12-29 Akim Demaille <akim@epita.fr>
2499
2500 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
2501 the 0-sentinel.
2502 * src/gram.c (ritem_longest_rhs): Likewise.
2503 * src/reduce.c (nonterminals_reduce): Likewise.
2504 * src/print_graph.c (print_graph): Likewise.
2505 * src/output.c (output_rule_data): Likewise.
2506 * src/nullable.c (set_nullable): Likewise.
2507
255ef638
AD
25082001-12-29 Akim Demaille <akim@epita.fr>
2509
2510 * src/output.c: Comment changes.
2511
0d8a7363
AD
25122001-12-27 Paul Eggert <eggert@twinsun.com>
2513
2514 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
2515 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
2516 Sparc, as they were causing more porting problems than the
2517 (minor) performance improvement was worth.
2518
2519 Also, catch up with 1.31's YYSTD.
2520
3db472b9
AD
25212001-12-27 Akim Demaille <akim@epita.fr>
2522
2523 * src/output.c (output_gram): Rely on nritems, not the
2524 0-sentinel. See below.
2525 Use -1 as separator, not 0.
2526 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
2527 Rely on -1 as separator in yyrhs, instead of 0.
2528 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
2529 twice `Now at end of input', therefore there are two lines less to
2530 expect.
2531
b365aa05
AD
25322001-12-27 Akim Demaille <akim@epita.fr>
2533
2534 * tests/regression.at (Unresolved SR Conflicts):
2535 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
2536 below.
2537
30171f79
AD
25382001-12-27 Akim Demaille <akim@epita.fr>
2539
2540 * src/LR0.c (new_state): Recognize the final state by the fact it
2541 is reached by eoftoken.
2542 (insert_start_shifting_state, insert_eof_shifting_state)
2543 (insert_accepting_state, augment_automaton): Remove, since now
2544 these states are automatically computed from the initial state.
2545 (generate_states): Adjust.
2546 * src/print.c: When reporting a rule number to the user, substract
2547 1, so that the axiom rule is rule 0, and the first user rule is 1.
2548 * src/reduce.c: Likewise.
2549 * src/print_graph.c (print_core): For the time being, just as for
2550 the report, depend upon --trace-flags to dump the full set of
2551 items.
2552 * src/reader.c (readgram): Once the grammar read, insert the rule
2553 0: `$axiom: START-SYMBOL $'.
2554 * tests/set.at: Adjust: rule 0 is now displayed, and since the
2555 number of the states has changed (the final state is no longer
2556 necessarily the last), catch up.
2557
75142d45
AD
25582001-12-27 Akim Demaille <akim@epita.fr>
2559
2560 Try to make the use of the eoftoken valid. Given that its value
2561 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
2562 is used instead of > 0 where appropriate, (ii), depend upon nritems
2563 instead of the 0-sentinel.
2564
2565 * src/gram.h, src/gram.c (nritems): New.
2566 Expected to be duplication of nitems, but for the time being...
2567 * src/reader.c (packgram): Assert nritems and nitems are equal.
2568 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
2569 * src/closure.c (print_closure, print_fderives): Likewise.
2570 * src/gram.c (ritem_print): Likewise.
2571 * src/print.c (print_core, print_grammar): Likewise.
2572 * src/print_graph.c: Likewise.
2573
b7c49edf
AD
25742001-12-27 Akim Demaille <akim@epita.fr>
2575
2576 * src/main.c (main): If there are complains after grammar
2577 reductions, then output the report anyway if requested, then die.
2578 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
2579 * src/reader.c (eoftoken): New.
2580 (parse_token_decl): If the token being defined has value `0', it
2581 is the eoftoken.
2582 (packsymbols): No longer hack `tags' to insert `$' by hand.
2583 Be sure to preserve the value of the eoftoken.
2584 (reader): Make sure eoftoken is defined.
2585 Initialize nsyms to 0: now eoftoken is created just like the others.
2586 * src/print.c (print_grammar): Don't special case the eof token.
2587 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
2588 lie anyway, albeit pleasant.
2589 * tests/calc.at: Exercise error messages with eoftoken.
2590 Change the grammar so that empty input is invalid.
2591 Adjust expectations.
2592 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
2593
ec2da99f
AD
25942001-12-27 Akim Demaille <akim@epita.fr>
2595
2596 * configure.in: Check the protos of strchr ans strspn.
2597 Replace strchr if needed.
2598 * src/system.h: Provide the protos of strchr, strspn and memchr if
2599 missing.
2600 * lib/strchr.c: New.
2601 * src/reader.c (symbols_save): Use strchr.
2602
8adfa272
AD
26032001-12-27 Akim Demaille <akim@epita.fr>
2604
2605 * src/print.c, src/print_graph.c (escape): New.
2606 Use it to quote the TAGS outputs.
2607 * src/print_graph.c (print_state): Now errors are in red, and
2608 reductions in green.
2609 Prefer high to wide: output the state number on a line of its own.
2610
80dac38c
AD
26112001-12-27 Akim Demaille <akim@epita.fr>
2612
2613 * src/state.h, src/state.c (reductions_new): New.
2614 * src/LR0.c (set_state_table): Let all the states have a
2615 `reductions', even if reduced to 0.
2616 (save_reductions): Adjust.
2617 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
2618 * src/print.c (print_reductions, print_actions): Adjust.
2619 * src/output.c (action_row): Adjust.
2620
2cec70b9
AD
26212001-12-27 Akim Demaille <akim@epita.fr>
2622
2623 * src/state.h, src/state.c (errs_new, errs_dup): New.
2624 * src/LR0.c (set_state_table): Let all the states have an errs,
2625 even if reduced to 0.
2626 * src/print.c (print_errs, print_reductions): Adjust.
2627 * src/output.c (output_actions, action_row): Adjust.
2628 * src/conflicts.c (resolve_sr_conflict): Adjust.
2629
13ca549a
AD
26302001-12-27 Akim Demaille <akim@epita.fr>
2631
2632 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
2633
5092aba5
AD
26342001-12-27 Akim Demaille <akim@epita.fr>
2635
2636 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
2637 * src/print.c: here.
2638 (lookaheadset, shiftset): New, used as additional storage by
2639 print_reductions.
2640 (print_results): Adjust.
2641 (print_shifts, print_gotos, print_errs): New, extracted from...
2642 (print_actions): here.
2643 * src/print_graph.c (print_actions): Remove dead code.
2644
11e2beca
AD
26452001-12-27 Akim Demaille <akim@epita.fr>
2646
2647 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
2648 `$n' and `@n'.
2649
dac3c910
AD
26502001-12-27 Akim Demaille <akim@epita.fr>
2651
2652 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
2653 (build_relations): Adjust.
2654
d0b0fefa
AD
26552001-12-27 Akim Demaille <akim@epita.fr>
2656
2657 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
2658 duplication.
2659
adc8c848
AD
26602001-12-27 Akim Demaille <akim@epita.fr>
2661
2662 * src/reader.c (packgram): Catch nitems overflows.
2663
14d293ac
AD
26642001-12-27 Akim Demaille <akim@epita.fr>
2665
2666 * src/files.c, src/files.h (guard_obstack): Remove.
2667 * src/output.c (output): Adjust.
2668 * src/reader.c (parse_braces): New, factoring...
2669 (copy_action, copy_guard): these two which are renamed as...
2670 (parse_action, parse_guard): these.
2671 As a voluntary consequence, using braces around guards is now
2672 mandatory.
2673
f499b062
AD
26742001-12-27 Akim Demaille <akim@epita.fr>
2675
2676 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
2677 * src/reader.c (symbol_list): `guard' and `guard_line' are new
2678 members.
2679 (symbol_list_new): Adjust.
2680 (copy_action): action_line is the first line, not the last.
2681 (copy_guard): Just as for actions, store the `action' only, not
2682 the switch/case/break flesh.
2683 Don't parse the user action that might follow the guard, let...
2684 (readgram): do it, i.e., now, there can be an action after a
2685 guard.
2686 In other words the guard is just explicitly optional.
2687 (packgram): Adjust.
2688 * src/output.c (guards_output): New.
2689 (output_parser): Call it when needed.
2690 (output): Also free the guard and attrs obstacks.
2691 * src/files.c, src/files.h (obstack_save): Remove.
2692 (output_files): Remove.
2693 As a result, if one needs the former `.act' file, using an
2694 appropriate skeleton which requires actions and guards is now
2695 required.
2696 * src/main.c (main): Adjust.
2697 * tests/semantic.at: New.
2698 * tests/regression.at: Use `input.y' as input file name.
2699 Avoid 8+3 problems by requiring input.c when the test needs the
2700 parser.
2701
d945f5cd
AD
27022001-12-27 Akim Demaille <akim@epita.fr>
2703
2704 * src/reader.c (symbol_list_new): Be sure to initialize all the
2705 fields.
2706
d200e455
AD
27072001-12-27 Akim Demaille <akim@epita.fr>
2708
2709 All the hacks using a final pseudo state are now useless.
2710
2711 * src/LR0.c (set_state_table): state_table holds exactly nstates.
2712 * src/lalr.c (nLA): New.
2713 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
2714 instead of lookaheadsp from the pseudo state (nstate + 1).
2715
f9507c28
AD
27162001-12-27 Akim Demaille <akim@epita.fr>
2717
2718 * src/output.c (action_row, token_actions): Use a state_t instead
2719 of a integer, and nlookaheads instead of the following state's
2720 lookaheadsp.
2721
065fbd27
AD
27222001-12-27 Akim Demaille <akim@epita.fr>
2723
2724 * src/conflicts.c (log_resolution, flush_shift)
2725 (resolve_sr_conflict, set_conflicts, solve_conflicts)
2726 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
2727 (conflicts_print, print_reductions): Use a state_t instead of an
2728 integer when referring to a state.
2729 As much as possible, depend upon nlookaheads, instead of the
2730 `lookaheadsp' member of the following state (since lookaheads of
2731 successive states are successive, the difference between state n + 1
2732 and n served as the number of lookaheads for state n).
2733 * src/lalr.c (add_lookback_edge): Likewise.
2734 * src/print.c (print_core, print_actions, print_state)
2735 (print_results): Likewise.
2736 * src/print_graph.c (print_core, print_actions, print_state)
2737 (print_graph): Likewise.
2738 * src/conflicts.h: Adjust.
2739
1b177bd7
AD
27402001-12-27 Akim Demaille <akim@epita.fr>
2741
2742 * src/bison.hairy: Formatting/comment changes.
2743 ANSIfy.
2744 Remove `register' indications.
2745 Add plenty of `static'.
2746
7742ddeb
AD
27472001-12-27 Akim Demaille <akim@epita.fr>
2748
2749 * src/output.c (prepare): Drop the muscle `ntbase' which
2750 duplicates ntokens.
2751 * src/bison.simple: Formatting/comment changes.
2752 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
2753 is an undocumented synonym.
2754
1fa14068
AD
27552001-12-22 Akim Demaille <akim@epita.fr>
2756
2757 * src/output.c (output_table_data): Change the prototype to use
2758 `int' for array ranges: some invocations do pass an int, not a
2759 short.
2760 Reported by Wayne Green.
2761
b9752825
AD
27622001-12-22 Akim Demaille <akim@epita.fr>
2763
2764 Some actions of web2c.y are improperly triggered.
2765 Reported by Mike Castle.
2766
2767 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
2768 * tests/regression.at (Web2c): Rename as...
2769 (Web2c Report): this.
2770 (Web2c Actions): New.
2771
776209d6
AD
27722001-12-22 Akim Demaille <akim@epita.fr>
2773
2774 Reductions in web2c.y are improperly reported.
2775 Reported by Mike Castle.
2776
2777 * src/conflicts.c (print_reductions): Fix.
2778 * tests/regression.at (Web2c): New.
2779
275fc3ad
AD
27802001-12-18 Akim Demaille <akim@epita.fr>
2781
2782 Some host fail on `assert (!"foo")', which expands to
2783 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
2784 Reported by Nelson Beebee.
2785
2786 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
2787 `#define it_succeeded 0' and `assert (it_succeeded)'.
2788
897668ee
MA
27892001-12-17 Marc Autret <autret_m@epita.fr>
2790
2791 * src/bison.simple: Don't hard code the skeleton line and filename.
2792 * src/output.c (output_parser): Rename 'line' as 'output_line'.
2793 New line counter 'skeleton_line' (skeleton-line muscle).
2794
ab3399e0
PE
27952001-12-17 Paul Eggert <eggert@twinsun.com>
2796
2797 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2798 YYDEBUG must be defined to a nonzero value.
2799
2800 * src/bison.simple (yytname): Do not assume that the user defines
2801 YYDEBUG to a properly parenthesized expression.
2802
3877f72b
AD
28032001-12-17 Akim Demaille <akim@epita.fr>
2804
2805 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2806 nlookaheads is a new member.
2807 Adjust all users.
2808 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2809 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2810 state.
776209d6 2811
331dbc1b
AD
28122001-12-17 Akim Demaille <akim@epita.fr>
2813
2814 * src/files.h, src/files.c (open_files, close_files): Remove.
2815 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2816 let...
2817 * src/reader.c (reader): Do it.
776209d6 2818
be750e4c
AD
28192001-12-17 Akim Demaille <akim@epita.fr>
2820
2821 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 2822
709ae8c6
AD
28232001-12-17 Akim Demaille <akim@epita.fr>
2824
2825 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2826 (flush_reduce): New.
2827 (resolve_sr_conflict): Adjust.
776209d6 2828
f87685c3
AD
28292001-12-17 Akim Demaille <akim@epita.fr>
2830
2831 * src/output.c (output_obstack): Be static and rename as...
2832 (format_obstack): this, to avoid any confusion with files.c's
2833 output_obstack.
2834 * src/reader.h (muscle_obstack): Move to...
2835 * src/output.h: here, since it's defined in output.c.
2836
837491d8
AD
28372001-12-17 Akim Demaille <akim@epita.fr>
2838
2839 * src/output.c (action_row, save_column, default_goto)
2840 (sort_actions, matching_state, pack_vector): Better variable
2841 locality.
2842
796d61fb
AD
28432001-12-17 Akim Demaille <akim@epita.fr>
2844
2845 * src/output.c: Various formatting changes.
776209d6 2846
64d15509
AD
28472001-12-17 Akim Demaille <akim@epita.fr>
2848
2849 * src/files.c (output_files): Free the output_obstack.
2850 * src/main.c (main): Call print and print_graph conditionally.
2851 * src/print.c (print): Work unconditionally.
2852 * src/print_graph.c (print_graph): Work unconditionally.
2853 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2854
fbc8ecb7
MA
28552001-12-16 Marc Autret <autret_m@epita.fr>
2856
2857 * src/output.c (actions_output): Fix. When we use %no-lines,
2858 there is one less line per action.
2859
f0440388
MA
28602001-12-16 Marc Autret <autret_m@epita.fr>
2861
2862 * src/bison.simple: Remove a useless #line directive.
2863 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2864 * src/output.c (get_lines_number): New.
776209d6 2865 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
2866 output muscles.
2867 Fix line numbering.
2868 (actions_output): Computes the number of lines taken by actions.
2869 (output_master_parser): Insert new skeleton which is the name of
2870 the output parser file name.
2871
a79986b8
MA
28722001-12-15 Marc Autret <autret_m@epita.fr>
2873
2874 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2875
4ec8e00f
MA
28762001-12-15 Marc Autret <autret_m@epita.fr>
2877
2878 * src/output.c (output_gram): Keep track of the hairy one.
2879
1a4648ff
AD
28802001-12-15 Akim Demaille <akim@epita.fr>
2881
2882 Make `make distcheck' work.
2883
2884 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2885 system.h which uses libgettext.h.
2886
9c2c67e6
AD
28872001-12-15 Akim Demaille <akim@epita.fr>
2888
2889 * src/nullable.c (set_nullable): Useless rules must be skipped,
2890 otherwise, since we range over their symbols, we might look at a
2891 nonterminal which no longer ``exists'', i.e., it is not counted in
2892 `nvars', hence we overflow our arrays.
2893
93ede233
AD
28942001-12-15 Akim Demaille <akim@epita.fr>
2895
2896 The header can also be produced directly, without any obstack!
2897 Yahoo!
2898
2899 * src/files.c, src/files.h (defines_obstack): Remove.
2900 (compute_header_macro): Global.
2901 (defines_obstack_save): Remove.
2902 * src/reader.c (parse_union_decl): No longer output to
2903 defines_obstack: its content can be found in the `stype' muscle
2904 anyway.
2905 (output_token_translations): Merge into...
2906 (symbols_output): this.
2907 Rename as...
2908 (symbols_save): this.
2909 (reader): Adjust.
2910 * src/output.c (header_output): New.
2911 (output): Call it.
2912
2666f928
AD
29132001-12-15 Akim Demaille <akim@epita.fr>
2914
2915 * src/reader.c (parse_union_decl): Instead of handling two obstack
2916 simultaneously, use one to define the `stype' muscle, and use the
2917 value of the latter to fill defines_obstack.
2918 (copy_comment): Remove.
2919 (copy_comment2): Work for a single obstack.
2920 Rename as...
2921 (copy_comment): this.
2922
428046f8
AD
29232001-12-15 Akim Demaille <akim@epita.fr>
2924
2925 * src/lex.c, src/lex.h (xgetc): No longer static.
2926 * src/reader.c (parse_union_decl): Revamp.
2927
ea52d706
AD
29282001-12-15 Akim Demaille <akim@epita.fr>
2929
2930 Still making progress in separating Bison into (i) input, (ii)
2931 process, (iii) output: now we can directly output the parser file
2932 without using table_obstack at all.
2933
2934 * src/files.c, src/files.h (table_obstack): Bye bye.
2935 (parser_file_name): New.
2936 * src/files.c (compute_output_file_names): Compute it.
2937 * src/output.c (actions_output, output_parser)
2938 (output_master_parser): To a file instead of an obstack.
2939
3f96f4dc
AD
29402001-12-15 Akim Demaille <akim@epita.fr>
2941
2942 Attach actions to rules, instead of pre-outputting them to
2943 actions_obstack.
2944
2945 * src/gram.h (rule_t): action and action_line are new members.
2946 * src/reader.c (symbol_list): Likewise.
2947 (copy_action): Save the actions within the rule.
2948 (packgram): Save them in rule_table.
2949 * src/output.c (actions_output): New.
2950 (output_parser): Use it on `%%actions'.
2951 (output_rule_data): Don't free rule_table.
2952 (output): Do it.
2953 (prepare): Don't save the `action' muscle.
2954 * src/bison.simple: s/%%action/%%actions/.
2955
51576fb3
AD
29562001-12-15 Akim Demaille <akim@epita.fr>
2957
2958 * src/reader.c (copy_action): When --yacc, don't append a `;'
2959 to the user action: let it fail if lacking.
dee049eb 2960 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2961
2648a72d
AD
29622001-12-14 Akim Demaille <akim@epita.fr>
2963
2964 * src/lex.c (literalchar): Simply return the char you decoded, non
2965 longer mess around with obstacks and int pointers.
2966 Adjust all callers.
2967
92790e5b
AD
29682001-12-14 Akim Demaille <akim@epita.fr>
2969
2970 * src/lex.c (literalchar): Don't escape the special characters,
2971 just decode them, and keep them as char (before, eol was output as
2972 the 2 char string `\n' etc.).
2973 * src/output.c (output_rule_data): Use quotearg to output the
2974 token strings.
2975
927c1557
PE
29762001-12-13 Paul Eggert <eggert@twinsun.com>
2977
2978 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2979 Do not infringe on the global user namespace when using C++.
2980 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2981 All uses of `fprintf' and `stderr' changed.
2982
2983 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2984
ed8e1f68
AD
29852001-12-13 Akim Demaille <akim@epita.fr>
2986
2987 The computation of nullable is broken: it doesn't handle empty
2988 RHS's properly.
2989
2990 * tests/torture.at (GNU AWK Grammar): New.
2991 * tests/sets.at (Nullable): New.
2992 * src/nullable.c (set_nullable): Instead of blindly looping over
2993 `ritems', loop over the rules, and then over their rhs's.
2994
2995 Work around Autotest bugs.
2996
2997 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2998 frame, because Autotest understand lines starting with a `+' as
2999 traces from the shell. Then, they are not processed properly.
3000 Admittedly an Autotest bug, but we don't have time to wait for
3001 Autotest to catch up.
3002 * tests/regression.at (Broken Closure): Adjust to the new table
3003 frames.
3004 Move to...
3005 * tests/sets.at: here.
3006
cb581495
AD
30072001-12-13 Akim Demaille <akim@epita.fr>
3008
3009 * src/closure.c (closure): Use nrules instead of playing tricks
3010 with BITS_PER_WORD.
3011
2e729273
AD
30122001-12-13 Akim Demaille <akim@epita.fr>
3013
3014 * src/print.c (print_actions): Output the handling of `$' as the
3015 traces do: shifting the token EOF. Before EOF was treated as a
3016 nonterminal.
3017 * tests/regression.at: Adjust some tests.
3018 * src/print_graph.c (print_core): Complete the set of items via
3019 closure. The next-to-final and final states are still unsatisfying,
3020 but that's to be addressed elsewhere.
3021 No longer output the rule numbers, but do output the state number.
3022 A single loop for the shifts + gotos is enough, but picked a
3023 distinct color for each.
3024 (print_graph): Initialize and finalize closure.
3025
107f7dfb
AD
30262001-12-13 Akim Demaille <akim@epita.fr>
3027
3028 * src/reader.c (readgram): Remove dead code, an strip useless
3029 braces.
3030 (get_type): Remove, unused.
3031
9b53a24f
AD
30322001-12-12 Akim Demaille <akim@epita.fr>
3033
3034 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
3035 on that of lib/error.c.
3036
dbfb6dcd
AD
30372001-12-12 Akim Demaille <akim@epita.fr>
3038
3039 Some hosts don't like `/' in includes.
3040
3041 * src/system.h: Include libgettext.h without qualifying the path.
3042 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
3043 $(top_srcdir).
3044
c25fb648
MA
30452001-12-11 Marc Autret <autret_m@epita.fr>
3046
3047 * src/output.c (output_parser): Remove useless muscle.
3048
710ddc4f
MA
30492001-12-11 Marc Autret <autret_m@epita.fr>
3050
3051 * src/bison.simple: Remove #line just before %%epilogue. It
3052 is now handled in ...
3053 * src/reader.c (read_additionnal_code): Add the output of a
3054 #line for the epilogue.
3055
e83d80b8
MA
30562001-12-10 Marc Autret <autret_m@epita.fr>
3057
927c1557 3058 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
3059 replace precedent remove.
3060 * src/bison.simple: Remove #line before %%prologue because
3061 %%input-line is wrong at this time.
3062
971d5158
MA
30632001-12-10 Marc Autret <autret_m@epita.fr>
3064
3065 * src/reader.c (symbols_output): Clean up.
927c1557 3066 * src/output.c (output_gram, output): Clean up.
971d5158 3067
5edafffd
AD
30682001-12-10 Akim Demaille <akim@epita.fr>
3069
3070 * src/lalr.c (initialize_lookaheads): New. Extracted from...
3071 * src/LR0.c (set_state_table): here.
3072 * src/lalr.c (lalr): Call it.
3073
0279f8e9
AD
30742001-12-10 Akim Demaille <akim@epita.fr>
3075
3076 * src/state.h (shifts): Remove the `number' member: shifts are
3077 attached to state, hence no longer need to be labelled with a
3078 state number.
3079
190c4f5f
AD
30802001-12-10 Akim Demaille <akim@epita.fr>
3081
3082 Now that states have a complete set of members, the linked list of
3083 shifts is useless: just fill directly the state's shifts member.
3084
3085 * src/state.h (shifts): Remove the `next' member.
3086 * src/LR0.c (first_state, last_state): Remove.
3087 Adjust the callers.
3088 (augment_automaton): Don't look for the shifts that must be added
3089 a shift on EOF: it is those of the state we looked for! But now,
3090 since shifts are attached, it is no longer needed to looking
3091 merely by its id: its number.
3092
2a73b93d
AD
30932001-12-10 Akim Demaille <akim@epita.fr>
3094
3095 * src/LR0.c (augment_automaton): Better variable locality.
3096 Remove an impossible branch: if there is a state corresponding to
3097 the start symbol being shifted, then there is shift for the start
3098 symbol from the initial state.
3099
74392f6a
AD
31002001-12-10 Akim Demaille <akim@epita.fr>
3101
3102 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
3103 only when appropriate: when insert_start_shifting_state' is not
3104 invoked.
3105 * tests/regression.at (Rule Line Numbers): Adjust.
3106
37c82725
AD
31072001-12-10 Akim Demaille <akim@epita.fr>
3108
3109 * src/LR0.c (augment_automaton): Now that all states have shifts,
3110 merge the two cases addition shifts to the initial state.
3111
6a164e0c
AD
31122001-12-10 Akim Demaille <akim@epita.fr>
3113
3114 * src/lalr.c (set_state_table): Move to...
3115 * src/LR0.c: here.
3116 * src/lalr.c (lalr): Don't call it...
3117 * src/LR0.c (generate_states): do it.
3118 * src/LR0.h (first_state): Remove, only the table is used.
3119
7215de24
AD
31202001-12-10 Akim Demaille <akim@epita.fr>
3121
3122 * src/LR0.h (first_shift, first_reduction): Remove.
3123 * src/lalr.c: Don't use first_shift: find shifts through the
3124 states.
3125
80e25d4d
AD
31262001-12-10 Akim Demaille <akim@epita.fr>
3127
3128 * src/LR0.c: Attach shifts to states as soon as they are
3129 computed.
3130 * src/lalr.c (set_state_table): Instead of assigning shifts to
3131 state, just assert that the mapping was properly done.
3132
0ab3728b
AD
31332001-12-10 Akim Demaille <akim@epita.fr>
3134
3135 * src/LR0.c (insert_start_shift): Rename as...
3136 (insert_start_shifting_state): this.
3137 (insert_eof_shifting_state, insert_accepting_state): New.
3138 (augment_automaton): Adjust.
3139 Better locality of the variables.
3140 When looking if the start_symbol is shifted from the initial
3141 state, using `while (... symbol != start_symbol ...)' sounds
3142 better than `while (... symbol < start_symbol ...)': If fail
3143 to see how the order between symbols could be relevant!
3144
78af9bbc
AD
31452001-12-10 Akim Demaille <akim@epita.fr>
3146
3147 * src/getargs.h: Don't declare `spec_name_prefix' and
3148 `spec_file_prefix', declared by src/files.h.
3149 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
3150 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
3151 * src/output.c (prepare): Adjust.
3152 * src/reader.c (symbols_output): Likewise.
3153 * src/vmsgetargs.c: Vaguely adjust, but who cares?
3154
bdef2a41
AD
31552001-12-10 Akim Demaille <akim@epita.fr>
3156
3157 * src/muscle_tab.c (muscle_init): NULL is a better default than
3158 `"0"'.
3159
3735969c
AD
31602001-12-10 Akim Demaille <akim@epita.fr>
3161
3162 * src/reader.c (reader): Calling symbols_output once is enough.
3163
49701457
AD
31642001-12-10 Akim Demaille <akim@epita.fr>
3165
3166 Now that states have a complete set of members, the linked list of
3167 reductions is useless: just fill directly the state's reductions
3168 member.
3169
3170 * src/state.h (struct reductions): Remove member `number' and
3171 `next'.
3172 * src/LR0.c (first_reduction, last_reduction): Remove.
3173 (save_reductions): Don't link the new reductions, store them in
3174 this_state.
3175 * src/lalr.c (set_state_table): No need to attach reductions to
3176 states, it's already done.
3177 * src/output.c (output_actions): No longer free the shifts, then
3178 the reductions, then the states: free all the states and their
3179 members.
3180
0edad749
AD
31812001-12-10 Akim Demaille <akim@epita.fr>
3182
3183 * src/options.c (OPTN, DRTV, BOTH): New.
3184 (option_table): Use them.
3185
0edad749
AD
3186 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
3187 the job of system.h.
3188 * src/options.c: Don't include stdio.h and xalloc.h for the same
3189 reasons.
3190
5449dd0f
AD
31912001-12-10 Akim Demaille <akim@epita.fr>
3192
3193 * src/output.c (output, prepare): Make sure the values of the
3194 muscles `action' and `prologue' are 0-terminated.
3195
a870c567
AD
31962001-12-10 Akim Demaille <akim@epita.fr>
3197
3198 Clean up GCC warnings.
3199
3200 * src/reader.c (copy_action): `buf' is not used.
3201 (parse_skel_decl): Be static.
3202 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
3203 * src/options.h (create_long_option_table): Have a real prototype.
3204 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
3205 (hash_delete_at): Return const void *.
3206 Adjust casts to preserve the const.
3207
80df8768
AD
32082001-12-10 Akim Demaille <akim@epita.fr>
3209
3210 * configure.in: Require 2.52g.
3211 M4 is not needed, but AUTOM4TE is.
3212 * m4/m4.m4: Remove.
3213 * tests/Makefile.am: Adjust.
3214
f693ad14
AD
32152001-12-10 Akim Demaille <akim@epita.fr>
3216
3217 One structure for states is enough, even though theoretically
3218 there are LR(0) states and LALR(1) states.
3219
3220 * src/lalr.h (state_t): Remove.
3221 (state_table): Be state_t **, not state_t *.
3222 * src/state.h (core, CORE_ALLOC): Rename as...
3223 (state_t, STATE_ALLOC): this.
3224 Add the LALR(1) members: shifts, reductions, errs.
3225 * src/LR0.c (state_table): Rename as...
3226 (state_hash): this, to avoid name clashes with the global
3227 `state_table'.
3228 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
3229 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
3230
74ffbcb6
AD
32312001-12-10 Akim Demaille <akim@epita.fr>
3232
3233 Bison dumps core on bash.y.
3234 Reported by Pascal Bart.
3235
3236 * src/warshall.c (bitmatrix_print): New.
3237 (TC): Use it.
3238 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
3239 j must be the outer loop.
3240 * tests/regression.at (Broken Closure): New.
3241
07708e19
AD
32422001-12-05 Akim Demaille <akim@epita.fr>
3243
3244 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
3245 its argument.
3246