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