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