]> git.saurik.com Git - bison.git/blob - ChangeLog
* src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
[bison.git] / ChangeLog
1 2002-06-30 Akim Demaille <akim@epita.fr>
2
3 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4 (item_number_of_rule_number, rule_number_of_item_number): New.
5 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
6 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
8 Propagate their use.
9 Much remains to be done, in particular wrt `shorts' from types.h.
10
11
12 2002-06-30 Akim Demaille <akim@epita.fr>
13
14 * src/symtab.c (symbol_new): Initialize the `printer' member.
15
16
17 2002-06-30 Akim Demaille <akim@epita.fr>
18
19 * src/LR0.c (save_reductions): Remove, replaced by...
20 * src/state.h, src/state.c (state_reductions_set): New.
21 (reductions, errs): Rename as...
22 (reductions_t, errs_t): these.
23 Adjust all dependencies.
24
25
26 2002-06-30 Akim Demaille <akim@epita.fr>
27
28 * src/LR0.c (state_list_t, state_list_append): New.
29 (first_state, last_state): Now symbol_list_t.
30 (this_state): Remove.
31 (new_itemsets, append_states, save_reductions): Take a state_t as
32 argument.
33 (set_states, generate_states): Adjust.
34 (save_shifts): Remove, replaced by...
35 * src/state.h, src/state.c (state_shifts_set): New.
36 (shifts): Rename as...
37 (shifts_t): this.
38 Adjust all dependencies.
39 * src/state.h (state_t): Remove the `next' member.
40
41
42 2002-06-30 Akim Demaille <akim@epita.fr>
43
44 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
45 escaped in slot 0.
46
47
48 2002-06-30 Akim Demaille <akim@epita.fr>
49
50 Use hash.h for the state hash table.
51
52 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
53 (allocate_storage): Use state_hash_new.
54 (free_storage): Use state_hash_free.
55 (new_state, get_state): Adjust.
56 * src/lalr.h, src/lalr.c (states): Move to...
57 * src/states.h (state_t): Remove the `link' member, no longer
58 used.
59 * src/states.h, src/states.c: here.
60 (state_hash_new, state_hash_free, state_hash_lookup)
61 (state_hash_insert, states_free): New.
62 * src/states.c (state_table, state_compare, state_hash): New.
63 * src/output.c (output_actions): Do not free states now, since we
64 still need to know the final_state number in `prepare', called
65 afterwards. Do it...
66 * src/main.c (main): here: call states_free after `output'.
67
68
69 2002-06-30 Akim Demaille <akim@epita.fr>
70
71 Use hash.h for the state hash table.
72
73 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
74 (allocate_storage): Use state_hash_new.
75 (free_storage): Use state_hash_free.
76 (new_state, get_state): Adjust.
77 * src/lalr.h, src/lalr.c (states): Move to...
78 * src/states.h (state_t): Remove the `link' member, no longer
79 used.
80 * src/states.h, src/states.c: here.
81 (state_hash_new, state_hash_free, state_hash_lookup)
82 (state_hash_insert, states_free): New.
83 * src/states.c (state_table, state_compare, state_hash): New.
84 * src/output.c (output_actions): Do not free states now, since we
85 still need to know the final_state number in `prepare', called
86 afterwards. Do it...
87 * src/main.c (main): here: call states_free after `output'.
88
89
90 2002-06-30 Akim Demaille <akim@epita.fr>
91
92 * src/state.h, src/state.c (state_new): New, extracted from...
93 * src/LR0.c (new_state): here.
94 * src/state.h (STATE_ALLOC): Move to...
95 * src/state.c: here.
96 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
97 * src/state.h, src/state.c: here.
98
99
100 2002-06-30 Akim Demaille <akim@epita.fr>
101
102 * src/reader.c (gensym): Rename as...
103 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
104 (getsym): Rename as...
105 (symbol_get): this.
106
107
108 2002-06-30 Akim Demaille <akim@epita.fr>
109
110 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
111 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
112 * src/output.c, src/print.c, src/print_graph.c: Propagate.
113 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
114
115 2002-06-30 Akim Demaille <akim@epita.fr>
116
117 Make the test suite pass with warnings checked.
118
119 * tests/actions.at (Printers and Destructors): Improve.
120 Avoid unsigned vs. signed issues.
121 * tests/calc.at: Don't exercise the scanner here, do it...
122 * tests/input.at (Torturing the Scanner): here.
123
124
125 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
126
127 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
128 reorganize first lines parallel to yacc.c.
129
130 2002-06-28 Akim Demaille <akim@epita.fr>
131
132 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
133 (b4_token_enum, b4_token_defines): New, factored from...
134 * data/lalr1.cc, data/yacc.c, glr.c: here.
135
136 2002-06-28 Akim Demaille <akim@epita.fr>
137
138 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
139 unused variables.
140 * src/output.c (merger_output): static.
141
142 2002-06-28 Akim Demaille <akim@epita.fr>
143
144 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
145 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
146 pacify GCC.
147 * src/output.c (save_row): Initialize all the variables to pacify GCC.
148
149 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
150
151 Accumulated changelog for new GLR parsing features.
152
153 * src/conflicts.c (count_total_conflicts): Change name to
154 conflicts_total_count.
155 * src/conflicts.h: Ditto.
156 * src/output.c (token_actions): Use the new name.
157 (output_conflicts): Change conflp => conflict_list_heads, and
158 confl => conflict_list for better readability.
159 * data/glr.c: Use the new names.
160 * NEWS: Add self to GLR announcement.
161
162 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
163
164 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
165 Akim Demaille.
166
167 * data/bison.glr: Change name to glr.c
168 * data/glr.c: Renamed from bison.glr.
169 * data/Makefile.am: Add glr.c
170
171 * src/getargs.c:
172
173 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
174 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
175
176 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
177
178 * data/bison.glr: Be sure to restore the
179 current #line when returning to the skeleton contents after having
180 exposed the input file's #line.
181
182 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
183
184 * data/bison.glr: Bring up to date with changes to bison.simple.
185
186 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
187
188 * data/bison.glr: Correct definitions that use b4_prefix.
189 Various reformatting.
190 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
191 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
192 yytokenp argument; now part of stack.
193 (yychar): Define to behave as documented.
194 (yyclearin): Ditto.
195
196 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
197
198 * src/reader.h: Add declaration for free_merger_functions.
199
200 * src/reader.c (merge_functions): New variable.
201 (get_merge_function): New function.
202 (free_merger_functions): New function.
203 (readgram): Check for %prec that is not followed by a symbol.
204 Handle %dprec and %merge declarations.
205 (packgram): Initialize dprec and merger fields in rules array.
206
207 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
208 conflict_list_cnt, conflict_list_free): New variables.
209 (table_grow): Also grow conflict_table.
210 (prepare_rules): Output dprec and merger tables.
211 (conflict_row): New function.
212 (action_row): Output conflict lists for GLR parser. Don't use
213 default reduction in conflicted states for GLR parser so that there
214 are spaces for the conflict lists.
215 (save_row): Also save conflict information.
216 (token_actions): Allocate conflict list.
217 (merger_output): New function.
218 (pack_vector): Pack conflict table, too.
219 (output_conflicts): New function to output yyconflp and yyconfl.
220 (output_check): Allocate conflict_tos.
221 (output_actions): Output conflict tables, also.
222 (output_skeleton): Output b4_mergers definition.
223 (prepare): Output b4_max_rhs_length definition.
224 Use 'bison.glr' as default skeleton for GLR parsers.
225
226 * src/gram.c (glr_parser): New flag.
227 (grammar_free): Call free_merger_functions.
228
229 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
230 all pairs of conflicting reductions, rather than just all tokens
231 causing conflicts. Needed to size conflict tables.
232 (conflicts_output): Modify call to count_rr_conflicts for new
233 interface.
234 (conflicts_print): Ditto.
235 (count_total_conflicts): New function.
236
237 * src/reader.h (merger_list): New type.
238 (merge_functions): New variable.
239
240 * src/lex.h (tok_dprec, tok_merge): New token types.
241
242 * src/gram.h (rule_s): Add dprec and merger fields.
243 (glr_parser): New flag.
244
245 * src/conflicts.h (count_total_conflicts): New function.
246
247 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
248
249 * doc/bison.texinfo (Generalized LR Parsing): New section.
250 (GLR Parsers): New section.
251 (Language and Grammar): Mention GLR parsing.
252 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
253 Correct typo ("tge" -> "the").
254
255 * data/bison.glr: New skeleton for GLR parsing.
256
257 * tests/cxx-gram.at: New tests for GLR parsing.
258
259 * tests/testsuite.at: Include cxx-gram.at.
260
261 * tests/Makefile.am: Add cxx-gram.at.
262
263 * src/parse-gram.y:
264
265 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
266
267 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
268
269 2002-06-27 Akim Demaille <akim@epita.fr>
270
271 * src/options.h, src/options.c: Remove.
272 * src/getargs.c (short_options, long_options): New.
273
274 2002-06-27 Akim Demaille <akim@epita.fr>
275
276 * data/bison.simple, data/bison.c++: Rename as...
277 * data/yacc.c, data/lalr1.cc: these.
278 * doc/bison.texinfo (Environment Variables): Remove.
279
280 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
281
282 * src/getargs.c (report_argmatch): Initialize strtok().
283
284 2002-06-20 Akim Demaille <akim@epita.fr>
285
286 * data/bison.simple (b4_symbol_actions): New, replaces...
287 (b4_symbol_destructor, b4_symbol_printer): these.
288 (yysymprint): Be sure to call YYPRINT only for tokens, and using
289 user token numbers.
290
291 2002-06-20 Akim Demaille <akim@epita.fr>
292
293 * data/bison.simple (yydestructor): Rename as...
294 (yydestruct): this.
295
296 2002-06-20 Akim Demaille <akim@epita.fr>
297
298 * src/symtab.h, src/symtab.c (symbol_type_set)
299 (symbol_destructor_set, symbol_precedence_set): The location is
300 the last argument.
301 Adjust all callers.
302
303 2002-06-20 Akim Demaille <akim@epita.fr>
304
305 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
306 internals.
307 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
308 Takes a location.
309 * src/symtab.h, src/symtab.c (symbol_class_set)
310 (symbol_user_token_number_set): Likewise.
311 Adjust all callers.
312 Promote complain_at.
313 * tests/input.at (Type Clashes): Adjust.
314
315 2002-06-20 Akim Demaille <akim@epita.fr>
316
317 * data/bison.simple (YYLEX): Fix the declaration when
318 %pure-parser.
319
320 2002-06-20 Akim Demaille <akim@epita.fr>
321
322 * data/bison.simple (yysymprint): Don't print the token number,
323 just its name.
324 * tests/actions.at (Destructors): Rename as...
325 (Printers and Destructors): this.
326 Also exercise %printer.
327
328 2002-06-20 Akim Demaille <akim@epita.fr>
329
330 * data/bison.simple (YYDSYMPRINT): New.
331 Use it to remove many of the #if YYDEBUG/if (yydebug).
332
333 2002-06-20 Akim Demaille <akim@epita.fr>
334
335 * src/symtab.h, src/symtab.c (symbol_t): printer and
336 printer_location are new members.
337 (symbol_printer_set): New.
338 * src/parse-gram.y (PERCENT_PRINTER): New token.
339 Handle its associated rule.
340 * src/scan-gram.l: Adjust.
341 (handle_destructor_at, handle_destructor_dollar): Rename as...
342 (handle_symbol_code_at, handle_symbol_code_dollar): these.
343 * src/output.c (symbol_printers_output): New.
344 (output_skeleton): Call it.
345 * data/bison.simple (yysymprint): New. Cannot be named yyprint
346 since there are already many grammar files with a user `yyprint'.
347 Replace the calls to YYPRINT to calls to yysymprint.
348 * tests/calc.at: Adjust.
349 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
350 taking advantage of parser very internal details (stack size!).
351
352 2002-06-20 Akim Demaille <akim@epita.fr>
353
354 * src/scan-gram.l: Complete the scanner with the missing patterns
355 to pacify Flex.
356 Use `quote' and `symbol_tag_get' where appropriate.
357
358 2002-06-19 Akim Demaille <akim@epita.fr>
359
360 * tests/actions.at (Destructors): Augment to test locations.
361 * data/bison.simple (yydestructor): Pass it the current location
362 if locations are enabled.
363 Prototype only when __STDC__ or C++.
364 Change the argument names to move into the yy name space: there is
365 user code here.
366
367 2002-06-19 Akim Demaille <akim@epita.fr>
368
369 * data/bison.simple (b4_pure_if): New.
370 Use it instead of #ifdef YYPURE.
371
372 2002-06-19 Akim Demaille <akim@epita.fr>
373
374 * data/bison.simple (b4_location_if): New.
375 Use it instead of #ifdef YYLSP_NEEDED.
376
377 2002-06-19 Akim Demaille <akim@epita.fr>
378
379 Prepare @$ in %destructor, but currently don't bind it in the
380 skeleton, as %location use is not cleaned up yet.
381
382 * src/scan-gram.l (handle_dollar, handle_destructor_at)
383 (handle_action_at): New.
384 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
385 a braced_code_t and a location as additional arguments.
386 (handle_destructor_dollar): Instead of requiring `b4_eval', just
387 unquote one when outputting `b4_dollar_dollar'.
388 Adjust callers.
389 * data/bison.simple (b4_eval): Remove.
390 (b4_symbol_destructor): Adjust.
391 * tests/input.at (Invalid @n): Adjust.
392
393 2002-06-19 Zack Weinberg <zack@codesourcery.com>
394
395 * doc/bison.texinfo: Document ability to have multiple
396 prologue sections.
397
398 2002-06-18 Akim Demaille <akim@epita.fr>
399
400 * src/files.c (compute_base_names): When computing the output file
401 names from the input file name, strip the directory part.
402
403 2002-06-18 Akim Demaille <akim@epita.fr>
404
405 * data/bison.simple.new: Comment changes.
406 Reported by Andreas Schwab.
407
408 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
409
410 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
411 there are no `label `yyoverflowlab' defined but not used' warnings
412 when yyoverflow is defined.
413
414 2002-06-18 Akim Demaille <akim@epita.fr>
415
416 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
417 new member.
418 (symbol_destructor_set): Adjust.
419 * src/output.c (symbol_destructors_output): Output the destructor
420 locations.
421 Output the symbol name.
422 * data/bison.simple (b4_symbol_destructor): Adjust.
423
424 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
425 and Akim Demaille <akim@epita.fr>
426
427 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
428 what's left on the stack when the error recovery hits EOF.
429 * tests/actions.at (Destructors): Complete to exercise this case.
430
431 2002-06-17 Akim Demaille <akim@epita.fr>
432
433 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
434 arguments is really empty, not only equal to `[]'.
435 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
436 member.
437 (symbol_destructor_set): New.
438 * src/output.c (symbol_destructors_output): New.
439 * src/reader.h (brace_code_t, current_braced_code): New.
440 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
441 (handle_dollar): Rename as...
442 (handle_action_dollar): this.
443 (handle_destructor_dollar): New.
444 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
445 (grammar_declaration): Use it.
446 * data/bison.simple (yystos): Is always defined.
447 (yydestructor): New.
448 * tests/actions.at (Destructors): New.
449 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
450
451 2002-06-17 Akim Demaille <akim@epita.fr>
452
453 * src/symlist.h, src/symlist.c (symbol_list_length): New.
454 * src/scan-gram.l (handle_dollar, handle_at): Compute the
455 rule_length only when needed.
456 * src/output.c (actions_output, token_definitions_output): Output
457 the full M4 block.
458 * src/symtab.c: Don't access directly to the symbol tag, use
459 symbol_tag_get.
460 * src/parse-gram.y: Use symbol_list_free.
461
462 2002-06-17 Akim Demaille <akim@epita.fr>
463
464 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
465 (symbol_list_prepend, get_type_name): Move to...
466 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
467 (symbol_list_prepend, symbol_list_n_type_name_get): here.
468 Adjust all callers.
469 (symbol_list_free): New.
470 * src/scan-gram.l (handle_dollar): Takes a location.
471 * tests/input.at (Invalid $n): Adjust.
472
473 2002-06-17 Akim Demaille <akim@epita.fr>
474
475 * src/reader.h, src/reader.c (symbol_list_new): Export it.
476 (symbol_list_prepend): New.
477 * src/parse-gram.y (%union): `list' is a new member.
478 (symbols.1): New, replaces...
479 (terms_to_prec.1, nterms_to_type.1): these.
480 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
481 Take a location as additional argument.
482 Adjust all callers.
483
484 2002-06-15 Akim Demaille <akim@epita.fr>
485
486 * src/parse-gram.y: Move %token in the declaration section so that
487 we don't depend upon CVS Bison.
488
489 2002-06-15 Akim Demaille <akim@epita.fr>
490
491 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
492 * src/print.c (print_core): Use it.
493
494 2002-06-15 Akim Demaille <akim@epita.fr>
495
496 * src/conflicts.c (log_resolution): Accept the rule involved in
497 the sr conflicts instead of the lookahead number that points to
498 that rule.
499 (flush_reduce): Accept the current lookahead vector as argument,
500 instead of the index in LA.
501 (resolve_sr_conflict): Accept the current number of lookahead
502 bitset to consider for the STATE, instead of the index in LA.
503 (set_conflicts): Adjust.
504 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
505
506 2002-06-15 Akim Demaille <akim@epita.fr>
507
508 * src/state.h (state_t): Replace the `lookaheadsp' member, a
509 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
510 Adjust all dependencies.
511 * src/lalr.c (initialize_lookaheads): Split into...
512 (states_lookaheads_count, states_lookaheads_initialize): these.
513 (lalr): Adjust.
514
515 2002-06-15 Akim Demaille <akim@epita.fr>
516
517 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
518 out of...
519 (grammar_rules_print): here.
520 * src/reduce.c (reduce_output): Use it.
521 * tests/reduce.at (Useless Rules, Reduced Automaton)
522 (Underivable Rules): Adjust.
523
524 2002-06-15 Akim Demaille <akim@epita.fr>
525
526 Copy BYacc's nice way to report the grammar.
527
528 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
529 New.
530 Don't print the rules' location, it is confusing and useless.
531 (rule_print): Use grammar_rhs_print.
532 * src/print.c (print_grammar): Use grammar_rules_print.
533
534 2002-06-15 Akim Demaille <akim@epita.fr>
535
536 Complete and rationalize `useless thing' warnings.
537
538 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
539 (symbol_tag_print): New.
540 Use them everywhere in place of accessing directly the tag member.
541 * src/gram.h, src/gram.c (rule_print): New.
542 Use it where a rule used to be printed `by hand'.
543 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
544 (reduce_grammar_tables): Report the useless rules.
545 (reduce_print): Useless things are a warning, not an error.
546 Report it as such.
547 * tests/reduce.at (Useless Nonterminals, Useless Rules):
548 (Reduced Automaton, Underivable Rules): Adjust.
549 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
550 * tests/conflicts.at (Unresolved SR Conflicts)
551 (Solved SR Conflicts): Adjust.
552
553 2002-06-15 Akim Demaille <akim@epita.fr>
554
555 Let symbols have a location.
556
557 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
558 (getsym): Adjust.
559 Adjust all callers.
560 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
561 Use location_t, not int.
562 * src/symtab.c (symbol_check_defined): Take advantage of the
563 location.
564 * tests/regression.at (Invalid inputs): Adjust.
565
566 2002-06-15 Akim Demaille <akim@epita.fr>
567
568 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
569 (input): Don't try to initialize yylloc here, do it in the
570 scanner.
571 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
572 * src/gram.h (rule_t): Change line and action_line into location
573 and action_location, of location_t type.
574 Adjust all dependencies.
575 * src/location.h, src/location.c (empty_location): New.
576 * src/reader.h, src/reader.c (grammar_start_symbol_set)
577 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
578 (grammar_current_rule_symbol_append)
579 (grammar_current_rule_action_append): Expect a location as argument.
580 * src/reader.c (grammar_midrule_action): Adjust to attach an
581 action's location as dummy symbol location.
582 * src/symtab.h, src/symtab.c (startsymbol_location): New.
583 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
584 the line numbers.
585
586 2002-06-14 Akim Demaille <akim@epita.fr>
587
588 Grammar declarations may be found in the grammar section.
589
590 * src/parse-gram.y (rules_or_grammar_declaration): New.
591 (declarations): Each declaration may end with a semicolon, not
592 just...
593 (grammar_declaration): `"%union"'.
594 (grammar): Branch to rules_or_grammar_declaration.
595
596 2002-06-14 Akim Demaille <akim@epita.fr>
597
598 * src/main.c (main): Invoke scanner_free.
599
600 2002-06-14 Akim Demaille <akim@epita.fr>
601
602 * src/output.c (m4_invoke): Extracted from...
603 (output_skeleton): here.
604 Free tempfile.
605
606 2002-06-14 Akim Demaille <akim@epita.fr>
607
608 * src/parse-gram.y (directives, directive, gram)
609 (grammar_directives, precedence_directives, precedence_directive):
610 Rename as...
611 (declarations, declaration, grammar, grammar_declaration)
612 (precedence_declaration, precedence_declarator): these.
613 (symbol_declaration): New.
614
615 2002-06-14 Akim Demaille <akim@epita.fr>
616
617 * src/files.c (action_obstack): Remove, unused.
618 (output_obstack): Remove it, and all its dependencies, as it is no
619 longer needed.
620 * src/reader.c (epilogue_set): Build the epilogue in the
621 muscle_obstack.
622 * src/output.h, src/output.c (muscle_obstack): Move to...
623 * src/muscle_tab.h, src/muscle_tab.h: here.
624 (muscle_init): Initialize muscle_obstack.
625 (muscle_free): New.
626 * src/main.c (main): Call it.
627
628 2002-06-14 Akim Demaille <akim@epita.fr>
629
630 * src/location.h: New, extracted from...
631 * src/reader.h: here.
632 * src/Makefile.am (noinst_HEADERS): Merge into
633 (bison_SOURCES): this.
634 Add location.h.
635 * src/parse-gram.y: Use location_t instead of Bison's.
636 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
637 Use location_t instead of ints.
638
639 2002-06-14 Akim Demaille <akim@epita.fr>
640
641 * data/bison.simple, data/bison.c++: Be sure to restore the
642 current #line when returning to the skeleton contents after having
643 exposed the input file's #line.
644
645 2002-06-12 Akim Demaille <akim@epita.fr>
646
647 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
648 eager.
649 * tests/actions.at (Exotic Dollars): New.
650
651 2002-06-12 Akim Demaille <akim@epita.fr>
652
653 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
654 ['"/] too eagerly.
655 * tests/input.at (Torturing the Scanner): New.
656
657 2002-06-11 Akim Demaille <akim@epita.fr>
658
659 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
660 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
661 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
662 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
663 * src/reader.c (reader): Use it.
664
665 2002-06-11 Akim Demaille <akim@epita.fr>
666
667 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
668 Adjust all callers.
669 (scanner_last_string_free): New.
670
671 2002-06-11 Akim Demaille <akim@epita.fr>
672
673 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
674 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
675 (last_string, YY_OBS_FREE): New.
676 Use them when returning an ID.
677
678 2002-06-11 Akim Demaille <akim@epita.fr>
679
680 Have Bison grammars parsed by a Bison grammar.
681
682 * src/reader.c, src/reader.h (prologue_augment): New.
683 * src/reader.c (copy_definition): Remove.
684
685 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
686 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
687 (grammar_current_rule_prec_set, grammar_current_rule_check)
688 (grammar_current_rule_symbol_append)
689 (grammar_current_rule_action_append): Export.
690 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
691 (symbol_list_action_append): Remove.
692 Hook the routines from reader.
693 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
694 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
695
696 * src/reader.c (read_declarations): Remove, unused.
697
698 * src/parse-gram.y: Handle the epilogue.
699 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
700 (grammar_start_symbol_set): this.
701 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
702 * src/reader.c (readgram): Remove, unused.
703 (reader): Adjust to insert eoftoken and axiom where appropriate.
704
705 * src/reader.c (copy_dollar): Replace with...
706 * src/scan-gram.h (handle_dollar): this.
707 * src/parse-gram.y: Remove `%thong'.
708
709 * src/reader.c (copy_at): Replace with...
710 * src/scan-gram.h (handle_at): this.
711
712 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
713 New.
714
715 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
716 time being.
717
718 * src/reader.h, src/reader.c (grammar_rule_end): New.
719
720 * src/parse.y (current_type, current_class): New.
721 Implement `%nterm', `%token' support.
722 Merge `%term' into `%token'.
723 (string_as_id): New.
724 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
725 type name.
726
727 * src/parse-gram.y: Be sure to handle properly the beginning of
728 rules.
729
730 * src/parse-gram.y: Handle %type.
731 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
732
733 * src/parse-gram.y: More directives support.
734 * src/options.c: No longer handle source directives.
735
736 * src/parse-gram.y: Fix %output.
737
738 * src/parse-gram.y: Handle %union.
739 Use the prologue locations.
740 * src/reader.c (parse_union_decl): Remove.
741
742 * src/reader.h, src/reader.c (epilogue_set): New.
743 * src/parse-gram.y: Use it.
744
745 * data/bison.simple, data/bison.c++: b4_stype is now either not
746 defined, then default to int, or to the contents of %union,
747 without `union' itself.
748 Adjust.
749 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
750
751 * src/output.c (actions_output): Don't output braces, as they are
752 already handled by the scanner.
753
754 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
755 characters to themselves.
756
757 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
758 that the epilogue has a proper #line.
759
760 * src/parse-gram.y: Handle precedence/associativity.
761
762 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
763 a terminal.
764 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
765 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
766 at all to define terminals that cannot be emitted.
767
768 * src/scan-gram.l: Escape M4 characters.
769
770 * src/scan-gram.l: Working properly with escapes in user
771 strings/characters.
772
773 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
774 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
775 grammar.
776 Use more modest sizes, as for the time being the parser does not
777 release memory, and therefore the process swallows a huge amount
778 of memory.
779
780 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
781 stricter %token grammar.
782
783 * src/symtab.h (associativity): Add `undef_assoc'.
784 (symbol_precedence_set): Do nothing when passed an undef_assoc.
785 * src/symtab.c (symbol_check_alias_consistence): Adjust.
786
787 * tests/regression.at (Invalid %directive): Remove, as it is now
788 meaningless.
789 (Invalid inputs): Adjust to the new error messages.
790 (Token definitions): The new grammar doesn't allow too many
791 eccentricities.
792
793 * src/lex.h, src/lex.c: Remove.
794 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
795 (copy_character, copy_string2, copy_string, copy_identifier)
796 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
797 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
798 (parse_action): Remove.
799 * po/POTFILES.in: Adjust.
800
801 2002-06-11 Akim Demaille <akim@epita.fr>
802
803 * src/reader.c (parse_action): Don't store directly into the
804 rule's action member: return the action as a string.
805 Don't require `rule_length' as an argument: compute it.
806 (grammar_current_rule_symbol_append)
807 (grammar_current_rule_action_append): New, eved out from
808 (readgram): here.
809 Remove `action_flag', `rulelength', unused now.
810
811 2002-06-11 Akim Demaille <akim@epita.fr>
812
813 * src/reader.c (grammar_current_rule_prec_set).
814 (grammar_current_rule_check): New, eved out from...
815 (readgram): here.
816 Remove `xaction', `first_rhs': useless.
817 * tests/input.at (Type clashes): New.
818 * tests/existing.at (GNU Cim Grammar): Adjust.
819
820 2002-06-11 Akim Demaille <akim@epita.fr>
821
822 * src/reader.c (grammar_midrule_action): New, Eved out from
823 (readgram): here.
824
825 2002-06-11 Akim Demaille <akim@epita.fr>
826
827 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
828 New.
829 (readgram): Use them as replacement of inlined code, crule and
830 crule1.
831
832 2002-06-11 Akim Demaille <akim@epita.fr>
833
834 * src/reader.c (grammar_end, grammar_symbol_append): New.
835 (readgram): Use them.
836 Make the use of `p' as local as possible.
837
838 2002-06-10 Akim Demaille <akim@epita.fr>
839
840 GCJ's parser requires the tokens to be defined before the prologue.
841
842 * data/bison.simple: Output the token definition before the user's
843 prologue.
844 * tests/regression.at (Braces parsing, Duplicate string)
845 (Mixing %token styles): Check the output from bison.
846 (Early token definitions): New.
847
848 2002-06-10 Akim Demaille <akim@epita.fr>
849
850 * src/symtab.c (symbol_user_token_number_set): Don't complain when
851 assigning twice the same user number to a token, so that we can
852 use it in...
853 * src/lex.c (lex): here.
854 Also use `symbol_class_set' instead of hand written code.
855 * src/reader.c (parse_assoc_decl): Likewise.
856
857 2002-06-10 Akim Demaille <akim@epita.fr>
858
859 * src/symtab.c, src/symtab.c (symbol_class_set)
860 (symbol_user_token_number_set): New.
861 * src/reader.c (parse_token_decl): Use them.
862 Use a switch instead of ifs.
863 Use a single argument.
864
865 2002-06-10 Akim Demaille <akim@epita.fr>
866
867 Remove `%thong' support as it is undocumented, unused, duplicates
868 `%token's job, and creates useless e-mail traffic with people who
869 want to know what it is, why it is undocumented, unused, and
870 duplicates `%token's job.
871
872 * src/reader.c (parse_thong_decl): Remove.
873 * src/options.c (option_table): Remove "thong".
874 * src/lex.h (tok_thong): Remove.
875
876 2002-06-10 Akim Demaille <akim@epita.fr>
877
878 * src/symtab.c, src/symtab.c (symbol_type_set)
879 (symbol_precedence_set): New.
880 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
881 (value_components_used): Remove, unused.
882
883 2002-06-09 Akim Demaille <akim@epita.fr>
884
885 Move symbols handling code out of the reader.
886
887 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
888 (axiom): Move to...
889 * src/symtab.h, src/symtab.c: here.
890
891 * src/gram.c (start_symbol): Remove: use startsymbol->number.
892 * src/reader.c (startval): Rename as...
893 * src/symtab.h, src/symtab.c (startsymbol): this.
894 * src/reader.c: Adjust.
895
896 * src/reader.c (symbol_check_defined, symbol_make_alias)
897 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
898 (token_translations_init)
899 Move to...
900 * src/symtab.c: here.
901 * src/reader.c (packsymbols): Move to...
902 * src/symtab.h, src/symtab.c (symbols_pack): here.
903 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
904 argument.
905
906 2002-06-03 Akim Demaille <akim@epita.fr>
907
908 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
909 then statements.
910
911 2002-06-03 Akim Demaille <akim@epita.fr>
912
913 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
914 structs with non literals.
915 * src/scan-skel.l: never-interactive.
916 * src/conflicts.c (enum conflict_resolution_e): No trailing
917 comma.
918 * src/getargs.c (usage): Split long literal strings.
919 Reported by Hans Aberg.
920
921 2002-05-28 Akim Demaille <akim@epita.fr>
922
923 * data/bison.c++: Use C++ ostreams.
924 (cdebug_): New member.
925
926 2002-05-28 Akim Demaille <akim@epita.fr>
927
928 * src/output.c (output_skeleton): Be sure to allocate enough room
929 for `/' _and_ for `\0' in full_skeleton.
930
931 2002-05-28 Akim Demaille <akim@epita.fr>
932
933 * data/bison.c++: Catch up with bison.simple:
934 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
935 and Paul Eggert <eggert@twinsun.com>: `error' handing.
936 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
937 and popping traces.
938
939 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
940
941 * src/output.c (output_skeleton): Put an explicit path in front of
942 the skeleton file name, rather than relying on the -I directory,
943 to partially alleviate effects of having a skeleton file lying around
944 in the current directory.
945
946 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
947
948 * src/conflicts.c (log_resolution): Correct typo:
949 obstack_printf should be obstack_fgrow1.
950
951 2002-05-26 Akim Demaille <akim@epita.fr>
952
953 * src/state.h (state_t): `solved_conflicts' is a new member.
954 * src/LR0.c (new_state): Set it to 0.
955 * src/conflicts.h, src/conflicts.c (print_conflicts)
956 (free_conflicts, solve_conflicts): Rename as...
957 (conflicts_print, conflicts_free, conflicts_solve): these.
958 Adjust callers.
959 * src/conflicts.c (enum conflict_resolution_e)
960 (solved_conflicts_obstack): New, used by...
961 (log_resolution): this.
962 Adjust to attach the conflict resolution to each state.
963 Complete the description with the precedence/associativity
964 information.
965 (resolve_sr_conflict): Adjust.
966 * src/print.c (print_state): Output its solved_conflicts.
967 * tests/conflicts.at (Unresolved SR Conflicts)
968 (Solved SR Conflicts): Exercise --report=all.
969
970 2002-05-26 Akim Demaille <akim@epita.fr>
971
972 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
973 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
974 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
975 (token_number_t, item_number_as_token_number)
976 (token_number_as_item_number, muscle_insert_token_number_table):
977 Rename as...
978 (symbol_number_t, item_number_as_symbol_number)
979 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
980 these, since it is more appropriate.
981
982 2002-05-26 Akim Demaille <akim@epita.fr>
983
984 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
985 `Error:' lines.
986 * data/bison.simple (yystos) [YYDEBUG]: New.
987 (yyparse) [YYDEBUG]: Display the symbols which are popped during
988 error recovery.
989 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
990
991 2002-05-25 Akim Demaille <akim@epita.fr>
992
993 * doc/bison.texinfo (Debugging): Split into...
994 (Tracing): this new section, its former contents, and...
995 (Understanding): this new section.
996 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
997 by...
998 (report_flag): this.
999 Adjust all dependencies.
1000 (report_args, report_types, report_argmatch): New.
1001 (usage, getargs): Report/support -r, --report.
1002 * src/options.h
1003 (struct option_table_struct): Rename as..,
1004 (struct option_table_s): this.
1005 Rename the `set_flag' member to `flag' to match with getopt_long's
1006 struct.
1007 * src/options.c (option_table): Split verbose into an entry for
1008 %verbose, and another for --verbose.
1009 Support --report/-r, so remove -r from the obsolete --raw.
1010 * src/print.c: Attach full item sets and lookaheads reports to
1011 report_flag instead of trace_flag.
1012 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
1013
1014 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1015 and Paul Eggert <eggert@twinsun.com>
1016
1017 * data/bison.simple (yyparse): Correct error handling to conform to
1018 POSIX and yacc. Specifically, after syntax error is discovered,
1019 do not reduce further before shifting the error token.
1020 Clean up the code a bit by removing the labels yyerrdefault,
1021 yyerrhandle, yyerrpop.
1022 * NEWS: Document the above.
1023
1024 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1025
1026 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
1027 type; it isn't always big enough, since it doesn't necessarily
1028 include non-terminals.
1029 (yytranslate): Expand definition of yy_token_number_type, so that
1030 the latter can be removed.
1031 (yy_token_number_type): Remove, only one use.
1032 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
1033 don't use TokenNumberType as element type.
1034
1035 * tests/regression.at: Modify expected output to agree with change
1036 to yyr1 and yytranslate.
1037
1038 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
1039
1040 * src/reader.c (parse_action): Use copy_character instead of
1041 obstack_1grow.
1042
1043 2002-05-13 Akim Demaille <akim@epita.fr>
1044
1045 * tests/regression.at (Token definitions): Prototype yylex and
1046 yyerror.
1047
1048 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1049
1050 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
1051 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
1052 32-bit arithmetic.
1053 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
1054
1055 2002-05-07 Akim Demaille <akim@epita.fr>
1056
1057 * tests/synclines.at: Be sure to prototype yylex and yyerror to
1058 avoid GCC warnings.
1059
1060 2002-05-07 Akim Demaille <akim@epita.fr>
1061
1062 Kill GCC warnings.
1063
1064 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
1065 over the RHS of each rule.
1066 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
1067 * src/state.h (state_t): Member `nitems' is unsigned short.
1068 * src/LR0.c (get_state): Adjust.
1069 * src/reader.c (packgram): Likewise.
1070 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
1071 `Type'.
1072 (muscle_insert_int_table): Remove, unused.
1073 (prepare_rules): Remove `max'.
1074
1075 2002-05-06 Akim Demaille <akim@epita.fr>
1076
1077 * src/closure.c (print_firsts): Display of the symbol tags.
1078 (bitmatrix_print): Move to...
1079 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
1080 here.
1081 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
1082
1083 2002-05-06 Akim Demaille <akim@epita.fr>
1084
1085 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
1086 hash_do_for_each.
1087
1088 2002-05-06 Akim Demaille <akim@epita.fr>
1089
1090 * src/LR0.c (new_state, get_state): Instead of using the global
1091 `kernel_size' and `kernel_base', have two new arguments:
1092 `core_size' and `core'.
1093 Adjust callers.
1094
1095 2002-05-06 Akim Demaille <akim@epita.fr>
1096
1097 * src/reader.c (packgram): No longer end `ritem' with a 0
1098 sentinel: it is not used.
1099
1100 2002-05-05 Akim Demaille <akim@epita.fr>
1101
1102 New experimental feature: display the lookaheads in the report and
1103 graph.
1104
1105 * src/print (print_core): When --trace-flag, display the rules
1106 lookaheads.
1107 * src/print_graph.c (print_core): Likewise.
1108 Swap the arguments.
1109 Adjust caller.
1110
1111 2002-05-05 Akim Demaille <akim@epita.fr>
1112
1113 * tests/torture.at (Many lookaheads): New test.
1114
1115 2002-05-05 Akim Demaille <akim@epita.fr>
1116
1117 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
1118 (GENERATE_MUSCLE_INSERT_TABLE): this.
1119 (output_int_table, output_unsigned_int_table, output_short_table)
1120 (output_token_number_table, output_item_number_table): Replace with...
1121 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
1122 (muscle_insert_short_table, muscle_insert_token_number_table)
1123 (muscle_insert_item_number_table): these.
1124 Adjust all callers.
1125 (prepare_tokens): Don't free `translations', since...
1126 * src/reader.h, src/reader.c (grammar_free): do it.
1127 Move to...
1128 * src/gram.h, src/gram.c (grammar_free): here.
1129 * data/bison.simple, data/bison.c++: b4_token_number_max is now
1130 b4_translate_max.
1131
1132 2002-05-05 Akim Demaille <akim@epita.fr>
1133
1134 * src/output.c (output_unsigned_int_table): New.
1135 (prepare_rules): `i' is unsigned.
1136 `prhs', `rline', `r2' are unsigned int.
1137 Rename muscle `rhs_number_max' as `rhs_max'.
1138 Output muscles `prhs_max', `rline_max', and `r2_max'.
1139 Free rline and r1.
1140 * data/bison.simple, data/bison.c++: Adjust to use these muscles
1141 to compute types instead of constant types.
1142 * tests/regression.at (Web2c Actions): Adjust.
1143
1144 2002-05-04 Akim Demaille <akim@epita.fr>
1145
1146 * src/symtab.h (SALIAS, SUNDEF): Rename as...
1147 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
1148 Adjust dependencies.
1149 * src/output.c (token_definitions_output): Be sure not to output a
1150 `#define 'a'' when fed with `%token 'a' "a"'.
1151 * tests/regression.at (Token definitions): New.
1152
1153 2002-05-03 Paul Eggert <eggert@twinsun.com>
1154
1155 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
1156 for K&R C.
1157
1158 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
1159
1160 * Makefile.am (SUBDIRS): Remove intl.
1161 (EXTRA_DIST): Add config/config.rpath.
1162
1163 2002-05-03 Akim Demaille <akim@epita.fr>
1164
1165 * data/bison.simple (m4_if): Don't output empty enums.
1166 And actually, output valid enum definitions :(.
1167
1168 2002-05-03 Akim Demaille <akim@epita.fr>
1169
1170 * configure.bat: Remove, completely obsolete.
1171 * Makefile.am (EXTRA_DIST): Adjust.
1172 Don't distribute config.rpath...
1173 * config/Makefile.am (EXTRA_DIST): Do it.
1174
1175 2002-05-03 Akim Demaille <akim@epita.fr>
1176
1177 * configure.in (GETTEXT_VERSION): New.
1178 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
1179
1180 2002-05-03 Akim Demaille <akim@epita.fr>
1181
1182 * data/bison.simple (b4_token_enum): New.
1183 (b4_token_defines): Use it to output tokens both as #define and
1184 enums.
1185 Suggested by Paul Eggert.
1186 * src/output.c (token_definitions_output): Don't output spurious
1187 white spaces.
1188
1189 2002-05-03 Akim Demaille <akim@epita.fr>
1190
1191 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
1192
1193 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
1194
1195 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
1196 Update the stack class, give a try to deque as the default container.
1197
1198 2002-05-02 Akim Demaille <akim@epita.fr>
1199
1200 * data/bison.simple (yyparse): Do not implement @$ = @1.
1201 (YYLLOC_DEFAULT): Adjust to do it.
1202 * doc/bison.texinfo (Location Default Action): Fix.
1203
1204 2002-05-02 Akim Demaille <akim@epita.fr>
1205
1206 * src/reader.c (parse_braces): Merge into...
1207 (parse_action): this.
1208
1209 2002-05-02 Akim Demaille <akim@epita.fr>
1210
1211 * configure.in (ALL_LINGUAS): Remove.
1212 * po/LINGUAS, hr.po: New.
1213
1214 2002-05-02 Akim Demaille <akim@epita.fr>
1215
1216 Remove the so called hairy (semantic) parsers.
1217
1218 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
1219 * src/gram.h, src/gram.c (semantic_parser): Remove.
1220 (rule_t): Remove the guard and guard_line members.
1221 * src/lex.h (token_t): remove tok_guard.
1222 * src/options.c (option_table): Remove %guard and %semantic_parser
1223 support.
1224 * src/output.c, src/output.h (guards_output): Remove.
1225 (prepare): Adjust.
1226 (token_definitions_output): Don't output the `T'
1227 tokens (???).
1228 (output_skeleton): Don't output the guards.
1229 * src/files.c, src/files.c (attrsfile): Remove.
1230 * src/reader.c (symbol_list): Remove the guard and guard_line
1231 members.
1232 Adjust dependencies.
1233 (parse_guard): Remove.
1234 * data/bison.hairy: Remove.
1235 * doc/bison.texinfo (Environment Variables): Remove occurrences of
1236 BISON_HAIRY.
1237
1238 2002-05-02 Akim Demaille <akim@epita.fr>
1239
1240 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
1241 (parse_guard): Rename the formal argument `stack_offset' as
1242 `rule_length', which is more readable.
1243 Adjust callers.
1244 (copy_at, copy_dollar): Instead of outputting the hard coded
1245 values of $$, $n and so forth, output invocation to b4_lhs_value,
1246 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
1247 Note: this patch partially drops `semantic-parser' support: it
1248 always does `rule_length - n', where semantic parsers ought to
1249 always use `-n'.
1250 * data/bison.simple, data/bison.c++ (b4_lhs_value)
1251 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
1252
1253 2002-05-02 Akim Demaille <akim@epita.fr>
1254
1255 * configure.in (AC_INIT): Bump to 1.49b.
1256 (AM_INIT_AUTOMAKE): Short invocation.
1257
1258 2002-05-02 Akim Demaille <akim@epita.fr>
1259
1260 Version 1.49a.
1261
1262 2002-05-01 Akim Demaille <akim@epita.fr>
1263
1264 * src/skeleton.h: Remove.
1265
1266 2002-05-01 Akim Demaille <akim@epita.fr>
1267
1268 * src/skeleton.h: Fix the #endif.
1269 Reported by Magnus Fromreide.
1270
1271 2002-04-26 Paul Eggert <eggert@twinsun.com>
1272
1273 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
1274 Define if we define YYSTYPE and YYLTYPE, respectively.
1275 (YYCOPY): Fix [] quoting problem in the non-GCC case.
1276
1277 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
1278
1279 * src/scan-skel.l: Postprocess quadrigraphs.
1280
1281 * src/reader.c (copy_character): New function, used to output
1282 single characters while replacing `[' and `]' with quadrigraphs, to
1283 avoid troubles with M4 quotes.
1284 (copy_comment): Output characters with copy_character.
1285 (read_additionnal_code): Likewise.
1286 (copy_string2): Likewise.
1287 (copy_definition): Likewise.
1288
1289 * tests/calc.at: Exercise M4 quoting.
1290
1291 2002-04-25 Akim Demaille <akim@epita.fr>
1292
1293 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
1294 between `!' and the command.
1295 Reported by Paul Eggert.
1296
1297 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
1298
1299 * tests/calc.at: Exercise prologue splitting.
1300
1301 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
1302 `b4_post_prologue' instead of `b4_prologue'.
1303
1304 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
1305 muscles.
1306 (output): Free pre_prologue_obstack and post_prologue_obstack.
1307 * src/files.h, src/files.c (attrs_obstack): Remove.
1308 (pre_prologue_obstack, post_prologue_obstack): New.
1309 * src/reader.c (copy_definition): Add a parameter to specify the
1310 obstack to fill, instead of using attrs_obstack unconditionally.
1311 (read_declarations): Pass pre_prologue_obstack to copy_definition if
1312 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
1313
1314 2002-04-23 Paul Eggert <eggert@twinsun.com>
1315
1316 * data/bison.simple: Remove unnecessary commentary and white
1317 space differences from 1_29-branch.
1318 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
1319
1320 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
1321 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
1322 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
1323 constructors or destructors.
1324
1325 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
1326
1327 2002-04-23 Akim Demaille <akim@epita.fr>
1328
1329 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
1330 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
1331 location with columns.
1332 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
1333 All reported by Paul Eggert.
1334
1335 2002-04-22 Akim Demaille <akim@epita.fr>
1336
1337 * src/reduce.c (dump_grammar): Move to...
1338 * src/gram.h, src/gram.c (grammar_dump): here.
1339 Be sure to separate long item numbers.
1340 Don't read the members of a rule's prec if its nil.
1341
1342 2002-04-22 Akim Demaille <akim@epita.fr>
1343
1344 * src/output.c (table_size, table_grow): New.
1345 (MAXTABLE): Remove, replace uses with table_size.
1346 (pack_vector): Instead of dying when the table is too big, grow it.
1347
1348 2002-04-22 Akim Demaille <akim@epita.fr>
1349
1350 * data/bison.simple (yyr1): Its type is that of a token number.
1351 * data/bison.c++ (r1_): Likewise.
1352 * tests/regression.at (Web2c Actions): Adjust.
1353
1354 2002-04-22 Akim Demaille <akim@epita.fr>
1355
1356 * src/reader.c (token_translations_init): 256 is now the default
1357 value for the error token, i.e., it will be assigned another
1358 number if the user assigned 256 to one of her tokens.
1359 (reader): Don't force 256 to error.
1360 * doc/bison.texinfo (Symbols): Adjust.
1361 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
1362 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
1363 etc. instead of 10, 20, 30 (which was used to `jump' over error
1364 (256) and undefined (2)).
1365
1366 2002-04-22 Akim Demaille <akim@epita.fr>
1367
1368 Propagate more token_number_t.
1369
1370 * src/gram.h (token_number_as_item_number)
1371 (item_number_as_token_number): New.
1372 * src/output.c (GENERATE_OUTPUT_TABLE): New.
1373 Use it to create output_item_number_table and
1374 output_token_number_table.
1375 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
1376 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
1377 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
1378 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
1379
1380 2002-04-22 Akim Demaille <akim@epita.fr>
1381
1382 * src/output.h, src/output.c (get_lines_number): Remove.
1383
1384 2002-04-19 Akim Demaille <akim@epita.fr>
1385
1386 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
1387 as Lex/Flex'.
1388 (Debugging): More details about enabling the debugging features.
1389 (Table of Symbols): Describe $$, $n, @$, and @n.
1390 Suggested by Tim Josling.
1391
1392 2002-04-19 Akim Demaille <akim@epita.fr>
1393
1394 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
1395
1396 2002-04-10 Akim Demaille <akim@epita.fr>
1397
1398 * src/system.h: Rely on HAVE_LIMITS_H.
1399 Suggested by Paul Eggert.
1400
1401 2002-04-09 Akim Demaille <akim@epita.fr>
1402
1403 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
1404 full stderr, and strip it according to the bison options, instead
1405 of composing the error message from different bits.
1406 This makes it easier to check for several error messages.
1407 Adjust all the invocations.
1408 Add an invocation exercising the error token.
1409 Add an invocation demonstrating a stupid error message.
1410 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
1411 Adjust the tests.
1412 Error message are for stderr, not stdout.
1413
1414 2002-04-09 Akim Demaille <akim@epita.fr>
1415
1416 * src/gram.h, src/gram.c (error_token_number): Remove, use
1417 errtoken->number.
1418 * src/reader.c (reader): Don't specify the user token number (2)
1419 for $undefined, as it uselessly prevents using it.
1420 * src/gram.h (token_number_t): Move to...
1421 * src/symtab.h: here.
1422 (state_t.number): Is a token_number_t.
1423 * src/print.c, src/reader.c: Use undeftoken->number instead of
1424 hard coded 2.
1425 (Even though this 2 is not the same as above: the number of the
1426 undeftoken remains being 2, it is its user token number which
1427 might not be 2).
1428 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
1429 `user_token_number_max'.
1430 Output `undef_token_number'.
1431 * data/bison.simple, data/bison.c++: Use them.
1432 Be sure to map invalid yylex return values to
1433 `undef_token_number'. This saves us from gratuitous SEGV.
1434
1435 * tests/conflicts.at (Solved SR Conflicts)
1436 (Unresolved SR Conflicts): Adjust.
1437 * tests/regression.at (Web2c Actions): Adjust.
1438
1439 2002-04-08 Akim Demaille <akim@epita.fr>
1440
1441 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
1442 Adding #line.
1443 Remove the duplicate `typedefs'.
1444 (RhsNumberType): Fix the declaration and various other typos.
1445 Use __ofile__.
1446 * data/bison.simple: Use __ofile__.
1447 * src/scan-skel.l: Handle __ofile__.
1448
1449 2002-04-08 Akim Demaille <akim@epita.fr>
1450
1451 * src/gram.h (item_number_t): New, the type of item numbers in
1452 RITEM. Note that it must be able to code symbol numbers as
1453 positive number, and the negation of rule numbers as negative
1454 numbers.
1455 Adjust all dependencies (pretty many).
1456 * src/reduce.c (rule): Remove this `short *' pointer: use
1457 item_number_t.
1458 * src/system.h (MINSHORT, MAXSHORT): Remove.
1459 Include `limits.h'.
1460 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
1461 (shortcpy): Remove.
1462 (MAXTABLE): Move to...
1463 * src/output.c (MAXTABLE): here.
1464 (prepare_rules): Use output_int_table to output rhs.
1465 * data/bison.simple, data/bison.c++: Adjust.
1466 * tests/torture.at (Big triangle): Move the limit from 254 to
1467 500.
1468 * tests/regression.at (Web2c Actions): Ajust.
1469
1470 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
1471 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
1472 passes, but produces negative #line number, once fixed, GCC is
1473 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
1474 C), it passes.
1475 * src/state.h (state_h): Code input lines on ints, not shorts.
1476
1477 2002-04-08 Akim Demaille <akim@epita.fr>
1478
1479 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
1480 and then the grammar.
1481
1482 2002-04-08 Akim Demaille <akim@epita.fr>
1483
1484 * src/system.h: No longer using strndup.
1485
1486 2002-04-07 Akim Demaille <akim@epita.fr>
1487
1488 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
1489 * src/output.c (output_table_data): Return the longest number.
1490 (prepare_tokens): Output `token_number_max').
1491 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
1492 New.
1493 Use them to define yy_token_number_type/TokenNumberType.
1494 Use this type for yytranslate.
1495 * tests/torture.at (Big triangle): Push the limit from 124 to
1496 253.
1497 * tests/regression.at (Web2c Actions): Adjust.
1498
1499 2002-04-07 Akim Demaille <akim@epita.fr>
1500
1501 * tests/torture.at (Big triangle): New.
1502 (GNU AWK Grammar, GNU Cim Grammar): Move to...
1503 * tests/existing.at: here.
1504
1505 2002-04-07 Akim Demaille <akim@epita.fr>
1506
1507 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
1508 nritems.
1509 Adjust dependencies.
1510
1511 2002-04-07 Akim Demaille <akim@epita.fr>
1512
1513 * src/reader.c: Normalize increments to prefix form.
1514
1515 2002-04-07 Akim Demaille <akim@epita.fr>
1516
1517 * src/reader.c, symtab.c: Remove debugging code.
1518
1519 2002-04-07 Akim Demaille <akim@epita.fr>
1520
1521 Rename all the `bucket's as `symbol_t'.
1522
1523 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
1524 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
1525 * src/symtab.c, src/symtab.h (bucket): Rename as...
1526 (symbol_t): this.
1527 (symbol_list_new, bucket_check_defined, bucket_make_alias)
1528 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
1529 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
1530 (buckets_new, buckets_free, buckets_do): Rename as...
1531 (symbol_list_new, symbol_check_defined, symbol_make_alias)
1532 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
1533 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
1534 (symbols_new, symbols_free, symbols_do): these.
1535
1536 2002-04-07 Akim Demaille <akim@epita.fr>
1537
1538 Use lib/hash for the symbol table.
1539
1540 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
1541 EOF.
1542 * src/lex.c (lex): Set the `number' member of new terminals.
1543 * src/reader.c (bucket_check_defined, bucket_make_alias)
1544 (bucket_check_alias_consistence, bucket_translation): New.
1545 (reader, grammar_free, readgram, token_translations_init)
1546 (packsymbols): Adjust.
1547 (reader): Number the predefined tokens.
1548 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
1549 for predefined tokens.
1550 * src/symtab.h (bucket): Remove all the hash table related
1551 members.
1552 * src/symtab.c (symtab): Replace by...
1553 (bucket_table): this.
1554 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
1555 (buckets_new, buckets_do): New.
1556
1557 2002-04-07 Akim Demaille <akim@epita.fr>
1558
1559 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
1560 (start_symbol, max_user_token_number, semantic_parser)
1561 (error_token_number): Initialize.
1562 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
1563 Initialize.
1564 (reader): Don't.
1565 (errtoken, eoftoken, undeftoken, axiom): Extern.
1566
1567 2002-04-07 Akim Demaille <akim@epita.fr>
1568
1569 * src/gram.h (rule_s): prec and precsym are now pointers
1570 to the bucket giving the priority/associativity.
1571 Member `associativity' removed: useless.
1572 * src/reduce.c, src/conflicts.c: Adjust.
1573
1574 2002-04-07 Akim Demaille <akim@epita.fr>
1575
1576 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
1577 Properly escape the symbols' TAG when outputting them.
1578
1579 2002-04-07 Akim Demaille <akim@epita.fr>
1580
1581 * src/lalr.h (LA): Is a bitsetv, not bitset*.
1582
1583 2002-04-07 Akim Demaille <akim@epita.fr>
1584
1585 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
1586 (LArule): this, which is an array to rule_t*.
1587 * src/print.c, src/conflicts.c: Adjust.
1588
1589 2002-04-07 Akim Demaille <akim@epita.fr>
1590
1591 * src/gram.h (rule_t): Rename `number' as `user_number'.
1592 `number' is a new member.
1593 Adjust dependencies.
1594 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
1595
1596 2002-04-07 Akim Demaille <akim@epita.fr>
1597
1598 As a result of the previous patch, it is no longer needed
1599 to reorder ritem itself.
1600
1601 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
1602
1603 2002-04-07 Akim Demaille <akim@epita.fr>
1604
1605 Be sure never to walk through RITEMS, but use only data related to
1606 the rules themselves. RITEMS should be banished.
1607
1608 * src/output.c (output_token_translations): Rename as...
1609 (prepare_tokens): this.
1610 In addition to `translate', prepare the muscles `tname' and
1611 `toknum', which were handled by...
1612 (output_rule_data): this.
1613 Remove, and move the remainder of its outputs into...
1614 (prepare_rules): this new routines, which also merges content from
1615 (output_gram): this.
1616 (prepare_rules): Be sure never to walk through RITEMS.
1617 (output_stos): Rename as...
1618 (prepare_stos): this.
1619 (output): Always invoke prepare_states, after all, just don't use it
1620 in the output if you don't need it.
1621
1622 2002-04-07 Akim Demaille <akim@epita.fr>
1623
1624 * src/LR0.c (new_state): Display `nstates' as the name of the
1625 newly created state.
1626 Adjust to initialize first_state and last_state if needed.
1627 Be sure to distinguish the initial from the final state.
1628 (new_states): Create the itemset of the initial state, and use
1629 new_state.
1630 * src/closure.c (closure): Now that the initial state has its
1631 items properly set, there is no need for a special case when
1632 creating `ruleset'.
1633
1634 As a result, now the rule 0, reducing to $axiom, is visible in the
1635 outputs. Adjust the test suite.
1636
1637 * tests/conflicts.at (Solved SR Conflicts)
1638 (Unresolved SR Conflicts): Adjust.
1639 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
1640 * tests/conflicts.at (S/R in initial): New.
1641
1642 2002-04-07 Akim Demaille <akim@epita.fr>
1643
1644 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
1645 the RHS of the rules.
1646 * src/output.c (output_gram): Likewise.
1647
1648 2002-04-07 Akim Demaille <akim@epita.fr>
1649
1650 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
1651 bucket.
1652 Adjust all dependencies.
1653 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
1654 `number' of the buckets too.
1655 * src/gram.h: Include `symtab.h'.
1656 (associativity): Move to...
1657 * src/symtab.h: here.
1658 No longer include `gram.h'.
1659
1660 2002-04-07 Akim Demaille <akim@epita.fr>
1661
1662 * src/gram.h, src/gram.c (rules_rhs_length): New.
1663 (ritem_longest_rhs): Use it.
1664 * src/gram.h (rule_t): `number' is a new member.
1665 * src/reader.c (packgram): Set it.
1666 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
1667 the end of `rules', and count them out of `nrules'.
1668 (reduce_output, dump_grammar): Adjust.
1669 * src/print.c (print_grammar): It is no longer needed to check for
1670 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
1671 * tests/reduce.at (Reduced Automaton): New test.
1672
1673 2002-04-07 Akim Demaille <akim@epita.fr>
1674
1675 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
1676 lacking `+ 1' to nrules, Bison reported as useless a token if it
1677 was used solely to set the precedence of the last rule...
1678
1679 2002-04-07 Akim Demaille <akim@epita.fr>
1680
1681 * data/bison.c++, data/bison.simple: Don't output the current file
1682 name in #line, to avoid useless diffs between two identical
1683 outputs under different names.
1684
1685 2002-04-07 Akim Demaille <akim@epita.fr>
1686
1687 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
1688 Normalize loops to using `< nrules + 1', not `<= nrules'.
1689
1690 2002-04-07 Akim Demaille <akim@epita.fr>
1691
1692 * TODO: Update.
1693
1694 2002-04-07 Akim Demaille <akim@epita.fr>
1695
1696 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
1697 bucket.value as bucket.number.
1698
1699 2002-04-07 Akim Demaille <akim@epita.fr>
1700
1701 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
1702 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
1703 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
1704 RHS, instead of being an index in RITEMS.
1705
1706 2002-04-04 Paul Eggert <eggert@twinsun.com>
1707
1708 * doc/bison.texinfo: Update copyright date.
1709 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
1710 (Symbols): Warn about running Bison in one character set,
1711 but compiling and/or running in an incompatible one.
1712 Warn about character code 256, too.
1713
1714 2002-04-03 Paul Eggert <eggert@twinsun.com>
1715
1716 * src/bison.data (YYSTACK_ALLOC): Depend on whether
1717 YYERROR_VERBOSE is nonzero, not whether it is defined.
1718
1719 Merge changes from bison-1_29-branch.
1720
1721 2002-03-20 Paul Eggert <eggert@twinsun.com>
1722
1723 Merge fixes from Debian bison_1.34-1.diff.
1724
1725 * configure.in (AC_PREREQ): 2.53.
1726
1727 2002-03-20 Akim Demaille <akim@epita.fr>
1728
1729 * src/conflicts.c (log_resolution): Argument `resolution' is const.
1730
1731 2002-03-19 Paul Eggert <eggert@twinsun.com>
1732
1733 * src/bison.simple (YYCOPY): New macro.
1734 (YYSTACK_RELOCATE): Use it.
1735 Remove Type arg; no longer needed. All callers changed.
1736 (yymemcpy): Remove; no longer needed.
1737
1738 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
1739 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1740
1741 2002-03-19 Akim Demaille <akim@epita.fr>
1742
1743 Test and fix the #line outputs.
1744
1745 * tests/atlocal.at (GCC): New.
1746 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
1747 (Prologue synch line, ,%union synch line, Postprologue synch line)
1748 (Action synch line, Epilogue synch line): New tests.
1749 * src/reader.c (parse_union_decl): Define the muscle stype_line.
1750 * data/bison.simple, data/bison.c++: Use it.
1751
1752 2002-03-19 Akim Demaille <akim@epita.fr>
1753
1754 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
1755 (Solved SR Conflicts, %expect not enough, %expect right)
1756 (%expect too much): Move to...
1757 * tests/conflicts.at: this new file.
1758
1759 2002-03-19 Akim Demaille <akim@epita.fr>
1760
1761 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
1762 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
1763 that we can move to enums for instance.
1764 * src/output.c (token_definitions_output): Output a list of
1765 `token-name, token-number' instead of the #define.
1766 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
1767
1768 2002-03-14 Akim Demaille <akim@epita.fr>
1769
1770 Use Gettext 0.11.1.
1771
1772 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
1773
1774 * data/bison.c++: Make the user able to add members to the generated
1775 parser by subclassing.
1776
1777 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
1778
1779 * src/reader.c (read_additionnal_code): `c' should be an integer, not
1780 a character.
1781 Reported by Nicolas Tisserand and Nicolas Burrus.
1782
1783 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
1784
1785 * src/reader.c: Warn about lacking semi-colons, do not complain.
1786
1787 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
1788
1789 * data/bison.c++: Remove a debug line.
1790
1791 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
1792
1793 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
1794 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
1795 provide a default implementation.
1796
1797 2002-03-04 Akim Demaille <akim@epita.fr>
1798
1799 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
1800 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
1801 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
1802 * tests/semantic.at (Parsing Guards): Similarly.
1803 * src/reader.at (readgram): Complain if the last rule is not ended
1804 with a semi-colon.
1805
1806 2002-03-04 Akim Demaille <akim@epita.fr>
1807
1808 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
1809 * src/closure.c: here.
1810 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
1811 RTC.
1812 * src/warshall.h, src/warshall.c: Remove.
1813 * tests/sets.at (Broken Closure): Adjust.
1814
1815 2002-03-04 Akim Demaille <akim@epita.fr>
1816
1817 * src/output.c (output_skeleton): tempdir is const.
1818 bytes_read is unused.
1819
1820 2002-03-04 Akim Demaille <akim@epita.fr>
1821
1822 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1823 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
1824 Update.
1825 From Michael Hayes.
1826
1827 2002-03-04 Akim Demaille <akim@epita.fr>
1828
1829 * src/closure.c (closure): `r' is unused.
1830
1831 2002-03-04 Akim Demaille <akim@epita.fr>
1832
1833 * tests/sets.at (Broken Closure): Add the ending `;'.
1834 * src/reader.at (readgram): Complain if a rule is not ended with a
1835 semi-colon.
1836
1837 2002-03-04 Akim Demaille <akim@epita.fr>
1838
1839 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
1840 (count_sr_conflicts): Use bitset_count.
1841 * src/reduce.c (inaccessable_symbols): Ditto.
1842 (bits_size): Remove.
1843 * src/warshall.h, src/warshall.c: Convert to bitsetv.
1844
1845 2002-03-04 Akim Demaille <akim@epita.fr>
1846
1847 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
1848 * src/reduce.c: Remove the `bitset_zero's following the
1849 `bitset_create's, as now it is performed by the latter.
1850
1851 2002-03-04 Akim Demaille <akim@epita.fr>
1852
1853 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
1854 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
1855 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
1856 latest sources from Michael.
1857
1858 2002-03-04 Akim Demaille <akim@epita.fr>
1859
1860 * src/output.c (output): Don't free the grammar.
1861 * src/reader.c (grammar_free): New.
1862 * src/main.c (main): Call it and don't free symtab here.
1863
1864 2002-03-04 Akim Demaille <akim@epita.fr>
1865
1866 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
1867 before returning.
1868 Reported by Benoit Perrot.
1869
1870 2002-03-04 Akim Demaille <akim@epita.fr>
1871
1872 Use bitset operations when possible, not loops over bits.
1873
1874 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
1875 bitset_or.
1876 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
1877 * src/reduce.c (useless_nonterminals): Formatting changes.
1878 * src/warshall.c (TC): Use bitset_or.
1879
1880 2002-03-04 Akim Demaille <akim@epita.fr>
1881
1882 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
1883 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
1884 Ditto.
1885
1886 2002-03-04 Akim Demaille <akim@epita.fr>
1887
1888 * src/lalr.c (F): Now a bitset*.
1889 Adjust all dependencies.
1890
1891 2002-03-04 Akim Demaille <akim@epita.fr>
1892
1893 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
1894 Adjust all dependencies.
1895
1896 2002-03-04 Akim Demaille <akim@epita.fr>
1897
1898 * src/L0.c, src/LR0.h (nstates): Be size_t.
1899 Adjust comparisons (signed vs unsigned).
1900 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
1901 bitset*.
1902 Adjust all dependencies.
1903
1904 2002-03-04 Akim Demaille <akim@epita.fr>
1905
1906 * src/closure.c (firsts): Now, also a bitset.
1907 Adjust all dependencies.
1908 (varsetsize): Remove, now unused.
1909 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
1910
1911 2002-03-04 Akim Demaille <akim@epita.fr>
1912
1913 * src/print.c: Convert to use bitset.h, not hand coded iterations
1914 over ints.
1915
1916 2002-03-04 Akim Demaille <akim@epita.fr>
1917
1918 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1919
1920 2002-03-04 Akim Demaille <akim@epita.fr>
1921
1922 * src/closure.c (ruleset): Be a bitset.
1923 (rulesetsize): Remove.
1924
1925 2002-03-04 Akim Demaille <akim@epita.fr>
1926
1927 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1928 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1929 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1930 * src/closure.c (fderives): Be an array of bitsets.
1931
1932 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
1933
1934 * data/bison.c++: Merge the two generated headers. Insert a copyright
1935 notice in each output file.
1936
1937 2002-02-28 Akim Demaille <akim@epita.fr>
1938
1939 * data/bison.c++: Copy the prologue of bison.simple to fetch
1940 useful M4 definitions, such as b4_header_guard.
1941
1942 2002-02-25 Akim Demaille <akim@epita.fr>
1943
1944 * src/getargs.c (version): Give the name of the authors, and use a
1945 translator friendly scheme for the bgr
1946 copyright notice.
1947
1948 2002-02-25 Akim Demaille <akim@epita.fr>
1949
1950 * src/output.c (header_output): Remove, now handled completely via
1951 M4.
1952
1953 2002-02-25 Akim Demaille <akim@epita.fr>
1954
1955 * m4/m4.m4: New, from CVS Autoconf.
1956 * configure.in: Invoke it.
1957 * src/output.c (output_skeleton): Use its result instead of the
1958 hard coded name.
1959
1960 2002-02-25 Akim Demaille <akim@epita.fr>
1961
1962 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1963 Fileutils 4.1.5.
1964 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1965 * src/output.c (output_skeleton): Use mkstemp to create a real
1966 temporary file.
1967 Move the filling of `skeleton' and its muscle to...
1968 (prepare): here.
1969 (output): Move the definition of the prologue muscle to...
1970 (prepare): here.
1971 * src/system.h (DEFAULT_TMPDIR): New.
1972
1973 2002-02-14 Paul Eggert <eggert@twinsun.com>
1974
1975 Remove the support for C++ namespace cleanliness; it was
1976 causing more problems than it was curing, since it didn't work
1977 properly on some nonstandard C++ compilers. This can wait
1978 for a proper C++ parser.
1979
1980 * NEWS: Document this.
1981 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1982 of C++, as it's treated like C now.
1983 * src/bison.simple (YYSTD): Remove.
1984 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1985 Treat C++ just like Standard C instead of trying to support
1986 namespace cleanliness.
1987
1988 2002-02-14 Akim Demaille <akim@epita.fr>
1989
1990 * tests/regression.at (else): Adjust to Andreas' change.
1991
1992 2002-02-14 Akim Demaille <akim@epita.fr>
1993
1994 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1995
1996 2002-02-13 Andreas Schwab <schwab@suse.de>
1997
1998 * src/output.c (output_rule_data): Don't output NULL, it might
1999 not be defined yet.
2000
2001 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
2002
2003 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
2004 (Copyright notice): Update.
2005
2006 2002-02-11 Akim Demaille <akim@epita.fr>
2007
2008 * tests/regression.at (%nonassoc and eof): Don't include
2009 nonportable headers.
2010
2011 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
2012
2013 * data/bison.c++: Correct error recovery. Make the user able to
2014 initialize the starting location.
2015
2016 2002-02-07 Akim Demaille <akim@epita.fr>
2017
2018 * tests/input.at: New.
2019
2020 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
2021
2022 * data/bison.c++: Replace some direct m4 expansions by constants. Be
2023 more consistent when naming methods and variables. Put preprocessor
2024 directives around tables only needed for debugging.
2025
2026 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
2027
2028 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
2029 C++ parsers.
2030 (yy::b4_name::parse): Use print_.
2031
2032 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
2033
2034 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
2035
2036 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
2037
2038 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
2039 C++ parsers.
2040 (yy::b4_name::parse): Build verbose error messages, and use error_.
2041
2042 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
2043
2044 * data/bison.c++: Fix m4 quoting in comments.
2045
2046 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
2047
2048 * data/bison.c++: Adjust the parser code. Fix some muscles that were
2049 not expanded by m4.
2050
2051 2002-02-05 Akim Demaille <akim@epita.fr>
2052
2053 * data/bison.c++: Adjust to the M4 back end.
2054 More is certainly needed.
2055
2056 2002-02-05 Akim Demaille <akim@epita.fr>
2057
2058 Give a try to M4 as a back end.
2059
2060 * lib/readpipe.c: New, from wdiff.
2061 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
2062 BISON_HAIRY.
2063 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
2064 specific values. Now it is m4 that performs the lookup.
2065 * src/parse-skel.y: Remove.
2066 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
2067 * src/output.c (actions_output, guards_output)
2068 (token_definitions_output): No longer keeps track of the output
2069 line number, hence remove the second argument.
2070 (guards_output): Check against the guard member of a rule, not the
2071 action member.
2072 Adjust callers.
2073 (output_skeleton): Don't look for the skeleton location, let m4 do
2074 that.
2075 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
2076 file will be used.
2077 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
2078 (prepare): Given that for the time being changesyntax is not
2079 usable in M4, rename the muscles using `-' to `_'.
2080 Define `defines_flag', `output_parser_name' and `output_header_name'.
2081 * src/output.h (actions_output, guards_output)
2082 (token_definitions_output): Adjust prototypes.
2083 * src/scan-skel.l: Instead of scanning the skeletons, it now
2084 processes the output of m4: `__oline__' and `#output'.
2085 * data/bison.simple: Adjust to be used by M4(sugar).
2086 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
2087 to date.
2088 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
2089 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
2090 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
2091 shamelessly stolen from CVS Autoconf.
2092
2093 2002-02-05 Akim Demaille <akim@epita.fr>
2094
2095 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
2096 * configure.in: Check for the declarations of free and malloc.
2097 * src/muscle_tab.c: Adjust.
2098
2099 2002-02-05 Akim Demaille <akim@epita.fr>
2100
2101 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
2102 which have no values.
2103
2104 2002-02-05 Akim Demaille <akim@epita.fr>
2105
2106 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
2107 * data/: here.
2108
2109 2002-01-29 Paul Eggert <eggert@twinsun.com>
2110
2111 * src/bison.simple (YYSIZE_T): Do not define merely because
2112 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
2113 On some platforms, <alloca.h> does not declare YYSTD (size_t).
2114
2115 2002-01-27 Akim Demaille <akim@epita.fr>
2116
2117 Fix `%nonassoc and eof'.
2118
2119 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
2120 which were not properly copied! Replace
2121 memcpy (res->errs, src->errs, src->nerrs);
2122 with
2123 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
2124 !!!
2125 * tests/regression.at (%nonassoc and eof): Adjust to newest
2126 Autotest: `.' is not in the PATH.
2127
2128 2002-01-27 Akim Demaille <akim@epita.fr>
2129
2130 * tests/sets.at (AT_EXTRACT_SETS): New.
2131 (Nullable): Use it.
2132 (Firsts): New.
2133
2134 2002-01-26 Akim Demaille <akim@epita.fr>
2135
2136 * tests/actions.at, tests/calc.at, tests/headers.at,
2137 * tests/torture.at: Adjust to the newest Autotest which no longer
2138 forces `.' in the PATH.
2139
2140 2002-01-25 Akim Demaille <akim@epita.fr>
2141
2142 * tests/regression.at (%nonassoc and eof): New.
2143 Suggested by Robert Anisko.
2144
2145 2002-01-24 Akim Demaille <akim@epita.fr>
2146
2147 Bison dumps core when trying to complain about broken input files.
2148 Reported by Cris van Pelt.
2149
2150 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
2151 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
2152 into...
2153 (Invalid inputs): Strengthen: exercise parse_percent_token.
2154
2155 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
2156
2157 * src/Makefile.am: Add bison.c++.
2158 * src/bison.c++: New skeleton.
2159
2160 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
2161
2162 * po/it.po: New.
2163
2164 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
2165
2166 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
2167
2168 2002-01-20 Marc Autret <marc@gnu.org>
2169
2170 * src/files.c (compute_output_file_names): Fix
2171
2172 2002-01-20 Marc Autret <marc@gnu.org>
2173
2174 * tests/output.at: New test.
2175 * src/files.c (compute_base_names): Don't map extensions when
2176 the YACC flag is set, use defaults.
2177 Reported by Evgeny Stambulchik.
2178
2179 2002-01-20 Marc Autret <marc@gnu.org>
2180
2181 * src/system.h: Need to define __attribute__ away for non-GCC
2182 compilers as well (i.e. the vendor C compiler).
2183 Suggested by Albert Chin-A-Young.
2184
2185 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
2186
2187 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
2188 canonical definition.
2189 * src/system.h: Use the canonical definition for PARAMS (avoids
2190 a conflict with the macro from lib/hash.h).
2191
2192 2002-01-11 Akim Demaille <akim@epita.fr>
2193
2194 * configure.in: Use AC_FUNC_STRNLEN.
2195 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
2196
2197 2002-01-09 Akim Demaille <akim@epita.fr>
2198
2199 * src/files.c, src/files.h (output_infix): New.
2200 (tab_extension): Remove.
2201 (compute_base_names): Compute the former, drop the latter.
2202 * src/output.c (prepare): Insert the muscles `output-infix', and
2203 `output-suffix'.
2204 * src/parse-skel.y (string, string.1): New.
2205 (section.header): Use it.
2206 (section.yacc): Remove.
2207 (prefix): Remove too.
2208 * src/scan-skel.l: Adjust.
2209 * src/bison.simple, src/bison.hairy: Adjust.
2210
2211 2002-01-09 Akim Demaille <akim@epita.fr>
2212
2213 * configure.in (WERROR_CFLAGS): Compute it.
2214 * src/Makefile.am (CFLAGS): Pass it.
2215 * tests/atlocal.in (CFLAGS): Idem.
2216 * src/files.c: Fix a few warnings.
2217 (get_extension_index): Remove, unused.
2218
2219 2002-01-08 Akim Demaille <akim@epita.fr>
2220
2221 * src/getargs.c (AS_FILE_NAME): New.
2222 (getargs): Use it to convert DOSish file names.
2223 * src/files.c (base_name): Rename as full_base_name to avoid
2224 clashes with `base_name ()'.
2225 (filename_split): New.
2226 (compute_base_names): N-th rewrite, using filename_split.
2227
2228 2002-01-08 Akim Demaille <akim@epita.fr>
2229
2230 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
2231 New, stolen from the Fileutils 4.1.
2232 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2233 * configure.in: Check for the presence of memrchr, and of its
2234 prototype.
2235
2236 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
2237
2238 * lib/hash.h (__P): Added definition for this macro.
2239 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
2240 BUILT_SOURCES, to ensure they are generated first.
2241 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
2242 %error-verbose to allow bootstrapping with bison 1.30x.
2243
2244 2002-01-06 Akim Demaille <akim@epita.fr>
2245
2246 * src/reader.c (parse_braces): Don't fetch the next char, the
2247 convention is to fetch on entry.
2248 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
2249 'switch' without a following semicolon.
2250 * tests/regression.at (braces parsing): New.
2251
2252 2002-01-06 Akim Demaille <akim@epita.fr>
2253
2254 Bison is dead wrong in its RR conflict reports.
2255
2256 * tests/torture.at (GNU Cim Grammar): New.
2257 * src/conflicts.c (count_rr_conflicts): Fix.
2258
2259 2002-01-06 Akim Demaille <akim@epita.fr>
2260
2261 Creating package.m4 from configure.ac causes too many problems.
2262
2263 * tests/Makefile.am (package.m4): Create it by hand,
2264 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
2265
2266 2002-01-06 Akim Demaille <akim@epita.fr>
2267
2268 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
2269 skeleton.h.
2270
2271 2002-01-04 Paul Eggert <eggert@twinsun.com>
2272
2273 * doc/bison.texinfo (Debugging):
2274 Remove YYSTDERR; it's no longer defined or used.
2275 Also, s/cstdio.h/cstdio/.
2276
2277 2002-01-03 Akim Demaille <akim@epita.fr>
2278
2279 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
2280
2281 2002-01-03 Akim Demaille <akim@epita.fr>
2282
2283 * src/parse-skel.y (process_skeleton): Don't bind the parser's
2284 tracing code to --trace, wait for a better --trace option, with
2285 args.
2286
2287 2002-01-03 Akim Demaille <akim@epita.fr>
2288
2289 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
2290 The ISO C++ standard is extremely clear about it: stderr is
2291 considered a macro, not a regular symbol (see table 94 `Header
2292 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
2293 Therefore std:: does not apply to it. It still does with fprintf.
2294 Also, s/cstdio.h/cstdio/.
2295
2296 2002-01-03 Akim Demaille <akim@epita.fr>
2297
2298 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
2299 for non system headers.
2300
2301 2002-01-02 Akim Demaille <akim@epita.fr>
2302
2303 Equip the skeleton chain with location tracking, runtime trace,
2304 pure parser and scanner.
2305
2306 * src/parse-skel.y: Request a pure parser, locations, and prefix
2307 renaming.
2308 (%union): Having several members with the same type does not help
2309 type mismatches, simplify.
2310 (YYPRINT, yyprint): New.
2311 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
2312 (skel_error): this.
2313 Handle locations.
2314 * src/scan-skel.l: Adjust to these changes.
2315 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
2316 (LOCATION_PRINT, skel_control_t): New.
2317
2318 2001-12-30 Akim Demaille <akim@epita.fr>
2319
2320 * src/parse-skel.y: Get rid of the shift/reduce conflict:
2321 replace `gb' with BLANKS.
2322 * src/scan-skel.l: Adjust.
2323
2324 2001-12-30 Akim Demaille <akim@epita.fr>
2325
2326 * src/system.h: We don't need nor want bcopy.
2327 Throw away MS-DOS crap: we don't need getpid.
2328 * configure.in: We don't need strndup. It was even causing
2329 problems: because Flex includes the headers *before* us,
2330 _GNU_SOURCE is not defined by config.h, and therefore strndup was
2331 not visible.
2332 * lib/xstrndup.c: New.
2333 * src/scan-skel.l: Use it.
2334 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
2335 * src/parse-skel.y: Use %directives instead of #defines.
2336
2337 2001-12-30 Akim Demaille <akim@epita.fr>
2338
2339 * src/skeleton.h: New.
2340 * src/output.c (output_parser, output_master_parser): Remove, dead
2341 code.
2342 * src/output.h (get_lines_number, actions_output, guards_output)
2343 (token_definitions_output): Prototype them.
2344 * src/parse-skel.y: Add the license notice.
2345 Include output.h and skeleton.h.
2346 (process_skeleton): Returns void, and takes a single parameter.
2347 * src/scan-skel.l: Add the license notice.
2348 Include skeleton.h.
2349 Don't use %option yylineno: it seems that then Flex imagines
2350 REJECT has been used, and therefore it won't reallocate its
2351 buffers (which makes no other sense to me than a bug). It results
2352 in warnings for `unused: yy_flex_realloc'.
2353
2354 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
2355
2356 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
2357 (MUSCLE_INSERT_PREFIX): ...to there.
2358 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
2359 (MUSCLE_INSERT_PREFIX): Move from here...
2360
2361 * src/bison.hairy: Add a section directive. Put braces around muscle
2362 names. This parser skeleton is still broken, but Bison should not
2363 choke on a bad muscle 'syntax'.
2364 * src/bison.simple: Add a section directive. Put braces around muscle
2365 names.
2366
2367 * src/files.h (strsuffix, stringappend): Add declarations.
2368 (tab_extension): Add declaration.
2369 (short_base_name): Add declaration.
2370
2371 * src/files.c (strsuffix, stringappend): No longer static. These
2372 functions are used in the skeleton parser.
2373 (tab_extension): New.
2374 (compute_base_names): Use the computations done in this function
2375 to guess if the generated parsers should have '.tab' in their
2376 names.
2377 (short_base_name): No longer static.
2378
2379 * src/output.c (output_skeleton): New.
2380 (output): Disable call to output_master_parser, and give a try to
2381 a new skeleton handling system.
2382 (guards_output, actions_output): No longer static.
2383 (token_definitions_output, get_lines_number): No longer static.
2384
2385 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
2386
2387 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
2388 parse-skel.y.
2389
2390 * src/parse-skel.y: New file.
2391 * src/scan-skel.l: New file.
2392
2393 2001-12-29 Akim Demaille <akim@epita.fr>
2394
2395 %name-prefix is broken.
2396
2397 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
2398 Adjust all dependencies.
2399 * tests/headers.at (export YYLTYPE): Strengthen this test: use
2400 %name-prefix.
2401
2402 Renaming yylval but not yylloc is not consistent. Now we do.
2403
2404 * src/bison.simple: Prefix yylloc if used.
2405 * doc/bison.texinfo (Decl Summary): Document that.
2406
2407 2001-12-29 Akim Demaille <akim@epita.fr>
2408
2409 * doc/bison.texinfo: Promote `%long-directive' over
2410 `%long_directive'.
2411 Remove all references to fixed-output-files, yacc is enough.
2412
2413 2001-12-29 Akim Demaille <akim@epita.fr>
2414
2415 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
2416 user prologue. These are defaults.
2417 * tests/actions.at (Mid-rule actions): Make sure the user can
2418 define YYDEBUG and YYERROR_VERBOSE.
2419
2420 2001-12-29 Akim Demaille <akim@epita.fr>
2421
2422 * src/output.c (header_output): Don't forget to export YYLTYPE and
2423 yylloc.
2424 * tests/headers.at (export YYLTYPE): New, make sure it does.
2425 * tests/regression.at (%union and --defines, Invalid CPP headers):
2426 Move to...
2427 * tests/headers.at: here.
2428
2429 2001-12-29 Akim Demaille <akim@epita.fr>
2430
2431 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
2432
2433 2001-12-29 Akim Demaille <akim@epita.fr>
2434
2435 * tests/actions.at (Mid-rule actions): Output on a single line
2436 instead of several.
2437
2438 2001-12-29 Akim Demaille <akim@epita.fr>
2439
2440 * doc/bison.texinfo: Formatting changes.
2441
2442 2001-12-29 Akim Demaille <akim@epita.fr>
2443
2444 Don't store the token defs in a muscle, just be ready to output it
2445 on command. Now possible via `symbols'. Fixes a memory leak.
2446
2447 * src/output.c (token_definitions_output): New.
2448 (output_parser, header_output): Use it.
2449 * src/reader.c (symbols_save): Remove.
2450
2451 2001-12-29 Akim Demaille <akim@epita.fr>
2452
2453 * src/bison.simple: Do not provide a default for YYSTYPE and
2454 YYLTYPE before the user's prologue. Otherwise it's hardly... a
2455 default.
2456
2457 2001-12-29 Akim Demaille <akim@epita.fr>
2458
2459 Mid-rule actions are simply... ignored!
2460
2461 * src/reader.c (readgram): Be sure to attach mid-rule actions to
2462 the empty-rule associated to the dummy symbol, not to the host
2463 rule.
2464 * tests/actions.at (Mid-rule actions): New.
2465
2466 2001-12-29 Akim Demaille <akim@epita.fr>
2467
2468 Memory leak.
2469
2470 * src/reader.c (reader): Free grammar.
2471
2472 2001-12-29 Akim Demaille <akim@epita.fr>
2473
2474 Memory leak.
2475
2476 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
2477 since it allocates it for each state, although only one is needed.
2478 (allocate_storage): Do it here.
2479
2480 2001-12-29 Akim Demaille <akim@epita.fr>
2481
2482 * src/options.h, src/options.c (create_long_option_table): Rename
2483 as...
2484 (long_option_table_new): this, with a clearer prototype.
2485 (percent_table): Remove, unused,
2486 * src/getargs.c (getargs): Adjust.
2487
2488 2001-12-29 Akim Demaille <akim@epita.fr>
2489
2490 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
2491 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
2492 as states.
2493
2494 2001-12-29 Akim Demaille <akim@epita.fr>
2495
2496 * src/lalr.c (build_relations): Rename `states' as `states1'.
2497 Sorry, I don't understand exactly what it is, no better name...
2498
2499 2001-12-29 Akim Demaille <akim@epita.fr>
2500
2501 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
2502 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
2503 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
2504 as rules.
2505
2506 2001-12-29 Akim Demaille <akim@epita.fr>
2507
2508 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
2509 ago.
2510
2511 2001-12-29 Akim Demaille <akim@epita.fr>
2512
2513 * src/reader.c, src/reader.h (user_toknums): Remove.
2514 Adjust all users to use symbols[i]->user_token_number.
2515
2516 2001-12-29 Akim Demaille <akim@epita.fr>
2517
2518 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
2519 Adjust all users to use symbols[i]->prec or ->assoc.
2520
2521 2001-12-29 Akim Demaille <akim@epita.fr>
2522
2523 * src/reader.c, src/reader.h (tags): Remove.
2524 Adjust all users to use symbols[i]->tag.
2525
2526 2001-12-29 Akim Demaille <akim@epita.fr>
2527
2528 * src/gram.h, src/gram.c (symbols): New, similar to state_table
2529 and rule_table.
2530 * src/reader.c (packsymbols): Fill this table.
2531 Drop sprec.
2532 * src/conflicts.c (resolve_sr_conflict): Adjust.
2533 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
2534 single table.
2535 Use symbols[i]->tag instead of tags[i].
2536
2537 2001-12-29 Akim Demaille <akim@epita.fr>
2538
2539 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
2540 In addition, put a comment in there, to replace...
2541 * tests/regression.at (%union and C comments): Remove.
2542
2543 2001-12-29 Akim Demaille <akim@epita.fr>
2544
2545 * tests/regression.at (Web2c Actions): Blindly move the actual
2546 output as expected output. The contents *seem* right to me, but I
2547 can't pretend reading perfectly parser tables... Nonetheless, all
2548 the other tests pass correctly, the table look OK, even though the
2549 presence of `$axiom' is to be noted: AFAICS it is useless (but
2550 harmless).
2551
2552 2001-12-29 Akim Demaille <akim@epita.fr>
2553
2554 * src/reader.c (readgram): Don't add the rule 0 if there were no
2555 rules read. In other words, add it _after_ having performed
2556 grammar sanity checks.
2557 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
2558
2559 2001-12-29 Akim Demaille <akim@epita.fr>
2560
2561 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
2562 visible, and some states have now a different number.
2563
2564 2001-12-29 Akim Demaille <akim@epita.fr>
2565
2566 * src/reader.c (readgram): Bind the initial rule's lineno to that
2567 of the first rule.
2568 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
2569 (Solved SR Conflicts): Adjust rule 0's line number.
2570
2571 2001-12-29 Akim Demaille <akim@epita.fr>
2572
2573 Fix the `GAWK Grammar' failure.
2574
2575 * src/LR0.c (final_state): Initialize to -1 so that we do compute
2576 the reductions of the first state which was mistakenly confused
2577 with the final state because precisely final_state was initialized
2578 to 0.
2579 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
2580 now noticed by Bison.
2581 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
2582 have a reduction on $default.
2583
2584 2001-12-29 Akim Demaille <akim@epita.fr>
2585
2586 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
2587 rule line numbers.
2588 * src/closure.c (print_closure): Likewise.
2589 * src/derives.c (print_derives): Likewise.
2590 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
2591 now.
2592
2593 2001-12-29 Akim Demaille <akim@epita.fr>
2594
2595 * src/lalr.c (lookaheads_print): New.
2596 (lalr): Call it when --trace-flag.
2597 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
2598 are dumped.
2599
2600 2001-12-29 Akim Demaille <akim@epita.fr>
2601
2602 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
2603 when walking through ritem, even via rule->rhs.
2604 * src/reduce.c (dump_grammar, useful_production, reduce_output)
2605 (useful_production, useless_nonterminals): Likewise.
2606 (reduce_grammar_tables): Likewise, plus update nritems.
2607 * src/nullable.c (set_nullable): Likewise.
2608 * src/lalr.c (build_relations): Likewise.
2609 * tests/sets.at (Nullable): Adjust.
2610 Fortunately, now, the $axiom is no longer nullable.
2611
2612 2001-12-29 Akim Demaille <akim@epita.fr>
2613
2614 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
2615 the 0-sentinel.
2616 * src/gram.c (ritem_longest_rhs): Likewise.
2617 * src/reduce.c (nonterminals_reduce): Likewise.
2618 * src/print_graph.c (print_graph): Likewise.
2619 * src/output.c (output_rule_data): Likewise.
2620 * src/nullable.c (set_nullable): Likewise.
2621
2622 2001-12-29 Akim Demaille <akim@epita.fr>
2623
2624 * src/output.c: Comment changes.
2625
2626 2001-12-27 Paul Eggert <eggert@twinsun.com>
2627
2628 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
2629 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
2630 Sparc, as they were causing more porting problems than the
2631 (minor) performance improvement was worth.
2632
2633 Also, catch up with 1.31's YYSTD.
2634
2635 2001-12-27 Akim Demaille <akim@epita.fr>
2636
2637 * src/output.c (output_gram): Rely on nritems, not the
2638 0-sentinel. See below.
2639 Use -1 as separator, not 0.
2640 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
2641 Rely on -1 as separator in yyrhs, instead of 0.
2642 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
2643 twice `Now at end of input', therefore there are two lines less to
2644 expect.
2645
2646 2001-12-27 Akim Demaille <akim@epita.fr>
2647
2648 * tests/regression.at (Unresolved SR Conflicts):
2649 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
2650 below.
2651
2652 2001-12-27 Akim Demaille <akim@epita.fr>
2653
2654 * src/LR0.c (new_state): Recognize the final state by the fact it
2655 is reached by eoftoken.
2656 (insert_start_shifting_state, insert_eof_shifting_state)
2657 (insert_accepting_state, augment_automaton): Remove, since now
2658 these states are automatically computed from the initial state.
2659 (generate_states): Adjust.
2660 * src/print.c: When reporting a rule number to the user, substract
2661 1, so that the axiom rule is rule 0, and the first user rule is 1.
2662 * src/reduce.c: Likewise.
2663 * src/print_graph.c (print_core): For the time being, just as for
2664 the report, depend upon --trace-flags to dump the full set of
2665 items.
2666 * src/reader.c (readgram): Once the grammar read, insert the rule
2667 0: `$axiom: START-SYMBOL $'.
2668 * tests/set.at: Adjust: rule 0 is now displayed, and since the
2669 number of the states has changed (the final state is no longer
2670 necessarily the last), catch up.
2671
2672 2001-12-27 Akim Demaille <akim@epita.fr>
2673
2674 Try to make the use of the eoftoken valid. Given that its value
2675 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
2676 is used instead of > 0 where appropriate, (ii), depend upon nritems
2677 instead of the 0-sentinel.
2678
2679 * src/gram.h, src/gram.c (nritems): New.
2680 Expected to be duplication of nitems, but for the time being...
2681 * src/reader.c (packgram): Assert nritems and nitems are equal.
2682 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
2683 * src/closure.c (print_closure, print_fderives): Likewise.
2684 * src/gram.c (ritem_print): Likewise.
2685 * src/print.c (print_core, print_grammar): Likewise.
2686 * src/print_graph.c: Likewise.
2687
2688 2001-12-27 Akim Demaille <akim@epita.fr>
2689
2690 * src/main.c (main): If there are complains after grammar
2691 reductions, then output the report anyway if requested, then die.
2692 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
2693 * src/reader.c (eoftoken): New.
2694 (parse_token_decl): If the token being defined has value `0', it
2695 is the eoftoken.
2696 (packsymbols): No longer hack `tags' to insert `$' by hand.
2697 Be sure to preserve the value of the eoftoken.
2698 (reader): Make sure eoftoken is defined.
2699 Initialize nsyms to 0: now eoftoken is created just like the others.
2700 * src/print.c (print_grammar): Don't special case the eof token.
2701 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
2702 lie anyway, albeit pleasant.
2703 * tests/calc.at: Exercise error messages with eoftoken.
2704 Change the grammar so that empty input is invalid.
2705 Adjust expectations.
2706 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
2707
2708 2001-12-27 Akim Demaille <akim@epita.fr>
2709
2710 * configure.in: Check the protos of strchr ans strspn.
2711 Replace strchr if needed.
2712 * src/system.h: Provide the protos of strchr, strspn and memchr if
2713 missing.
2714 * lib/strchr.c: New.
2715 * src/reader.c (symbols_save): Use strchr.
2716
2717 2001-12-27 Akim Demaille <akim@epita.fr>
2718
2719 * src/print.c, src/print_graph.c (escape): New.
2720 Use it to quote the TAGS outputs.
2721 * src/print_graph.c (print_state): Now errors are in red, and
2722 reductions in green.
2723 Prefer high to wide: output the state number on a line of its own.
2724
2725 2001-12-27 Akim Demaille <akim@epita.fr>
2726
2727 * src/state.h, src/state.c (reductions_new): New.
2728 * src/LR0.c (set_state_table): Let all the states have a
2729 `reductions', even if reduced to 0.
2730 (save_reductions): Adjust.
2731 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
2732 * src/print.c (print_reductions, print_actions): Adjust.
2733 * src/output.c (action_row): Adjust.
2734
2735 2001-12-27 Akim Demaille <akim@epita.fr>
2736
2737 * src/state.h, src/state.c (errs_new, errs_dup): New.
2738 * src/LR0.c (set_state_table): Let all the states have an errs,
2739 even if reduced to 0.
2740 * src/print.c (print_errs, print_reductions): Adjust.
2741 * src/output.c (output_actions, action_row): Adjust.
2742 * src/conflicts.c (resolve_sr_conflict): Adjust.
2743
2744 2001-12-27 Akim Demaille <akim@epita.fr>
2745
2746 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
2747
2748 2001-12-27 Akim Demaille <akim@epita.fr>
2749
2750 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
2751 * src/print.c: here.
2752 (lookaheadset, shiftset): New, used as additional storage by
2753 print_reductions.
2754 (print_results): Adjust.
2755 (print_shifts, print_gotos, print_errs): New, extracted from...
2756 (print_actions): here.
2757 * src/print_graph.c (print_actions): Remove dead code.
2758
2759 2001-12-27 Akim Demaille <akim@epita.fr>
2760
2761 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
2762 `$n' and `@n'.
2763
2764 2001-12-27 Akim Demaille <akim@epita.fr>
2765
2766 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
2767 (build_relations): Adjust.
2768
2769 2001-12-27 Akim Demaille <akim@epita.fr>
2770
2771 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
2772 duplication.
2773
2774 2001-12-27 Akim Demaille <akim@epita.fr>
2775
2776 * src/reader.c (packgram): Catch nitems overflows.
2777
2778 2001-12-27 Akim Demaille <akim@epita.fr>
2779
2780 * src/files.c, src/files.h (guard_obstack): Remove.
2781 * src/output.c (output): Adjust.
2782 * src/reader.c (parse_braces): New, factoring...
2783 (copy_action, copy_guard): these two which are renamed as...
2784 (parse_action, parse_guard): these.
2785 As a voluntary consequence, using braces around guards is now
2786 mandatory.
2787
2788 2001-12-27 Akim Demaille <akim@epita.fr>
2789
2790 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
2791 * src/reader.c (symbol_list): `guard' and `guard_line' are new
2792 members.
2793 (symbol_list_new): Adjust.
2794 (copy_action): action_line is the first line, not the last.
2795 (copy_guard): Just as for actions, store the `action' only, not
2796 the switch/case/break flesh.
2797 Don't parse the user action that might follow the guard, let...
2798 (readgram): do it, i.e., now, there can be an action after a
2799 guard.
2800 In other words the guard is just explicitly optional.
2801 (packgram): Adjust.
2802 * src/output.c (guards_output): New.
2803 (output_parser): Call it when needed.
2804 (output): Also free the guard and attrs obstacks.
2805 * src/files.c, src/files.h (obstack_save): Remove.
2806 (output_files): Remove.
2807 As a result, if one needs the former `.act' file, using an
2808 appropriate skeleton which requires actions and guards is now
2809 required.
2810 * src/main.c (main): Adjust.
2811 * tests/semantic.at: New.
2812 * tests/regression.at: Use `input.y' as input file name.
2813 Avoid 8+3 problems by requiring input.c when the test needs the
2814 parser.
2815
2816 2001-12-27 Akim Demaille <akim@epita.fr>
2817
2818 * src/reader.c (symbol_list_new): Be sure to initialize all the
2819 fields.
2820
2821 2001-12-27 Akim Demaille <akim@epita.fr>
2822
2823 All the hacks using a final pseudo state are now useless.
2824
2825 * src/LR0.c (set_state_table): state_table holds exactly nstates.
2826 * src/lalr.c (nLA): New.
2827 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
2828 instead of lookaheadsp from the pseudo state (nstate + 1).
2829
2830 2001-12-27 Akim Demaille <akim@epita.fr>
2831
2832 * src/output.c (action_row, token_actions): Use a state_t instead
2833 of a integer, and nlookaheads instead of the following state's
2834 lookaheadsp.
2835
2836 2001-12-27 Akim Demaille <akim@epita.fr>
2837
2838 * src/conflicts.c (log_resolution, flush_shift)
2839 (resolve_sr_conflict, set_conflicts, solve_conflicts)
2840 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
2841 (conflicts_print, print_reductions): Use a state_t instead of an
2842 integer when referring to a state.
2843 As much as possible, depend upon nlookaheads, instead of the
2844 `lookaheadsp' member of the following state (since lookaheads of
2845 successive states are successive, the difference between state n + 1
2846 and n served as the number of lookaheads for state n).
2847 * src/lalr.c (add_lookback_edge): Likewise.
2848 * src/print.c (print_core, print_actions, print_state)
2849 (print_results): Likewise.
2850 * src/print_graph.c (print_core, print_actions, print_state)
2851 (print_graph): Likewise.
2852 * src/conflicts.h: Adjust.
2853
2854 2001-12-27 Akim Demaille <akim@epita.fr>
2855
2856 * src/bison.hairy: Formatting/comment changes.
2857 ANSIfy.
2858 Remove `register' indications.
2859 Add plenty of `static'.
2860
2861 2001-12-27 Akim Demaille <akim@epita.fr>
2862
2863 * src/output.c (prepare): Drop the muscle `ntbase' which
2864 duplicates ntokens.
2865 * src/bison.simple: Formatting/comment changes.
2866 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
2867 is an undocumented synonym.
2868
2869 2001-12-22 Akim Demaille <akim@epita.fr>
2870
2871 * src/output.c (output_table_data): Change the prototype to use
2872 `int' for array ranges: some invocations do pass an int, not a
2873 short.
2874 Reported by Wayne Green.
2875
2876 2001-12-22 Akim Demaille <akim@epita.fr>
2877
2878 Some actions of web2c.y are improperly triggered.
2879 Reported by Mike Castle.
2880
2881 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
2882 * tests/regression.at (Web2c): Rename as...
2883 (Web2c Report): this.
2884 (Web2c Actions): New.
2885
2886 2001-12-22 Akim Demaille <akim@epita.fr>
2887
2888 Reductions in web2c.y are improperly reported.
2889 Reported by Mike Castle.
2890
2891 * src/conflicts.c (print_reductions): Fix.
2892 * tests/regression.at (Web2c): New.
2893
2894 2001-12-18 Akim Demaille <akim@epita.fr>
2895
2896 Some host fail on `assert (!"foo")', which expands to
2897 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
2898 Reported by Nelson Beebee.
2899
2900 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
2901 `#define it_succeeded 0' and `assert (it_succeeded)'.
2902
2903 2001-12-17 Marc Autret <autret_m@epita.fr>
2904
2905 * src/bison.simple: Don't hard code the skeleton line and filename.
2906 * src/output.c (output_parser): Rename 'line' as 'output_line'.
2907 New line counter 'skeleton_line' (skeleton-line muscle).
2908
2909 2001-12-17 Paul Eggert <eggert@twinsun.com>
2910
2911 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2912 YYDEBUG must be defined to a nonzero value.
2913
2914 * src/bison.simple (yytname): Do not assume that the user defines
2915 YYDEBUG to a properly parenthesized expression.
2916
2917 2001-12-17 Akim Demaille <akim@epita.fr>
2918
2919 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2920 nlookaheads is a new member.
2921 Adjust all users.
2922 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2923 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2924 state.
2925
2926 2001-12-17 Akim Demaille <akim@epita.fr>
2927
2928 * src/files.h, src/files.c (open_files, close_files): Remove.
2929 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2930 let...
2931 * src/reader.c (reader): Do it.
2932
2933 2001-12-17 Akim Demaille <akim@epita.fr>
2934
2935 * src/conflicts.c (print_reductions): Formatting changes.
2936
2937 2001-12-17 Akim Demaille <akim@epita.fr>
2938
2939 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2940 (flush_reduce): New.
2941 (resolve_sr_conflict): Adjust.
2942
2943 2001-12-17 Akim Demaille <akim@epita.fr>
2944
2945 * src/output.c (output_obstack): Be static and rename as...
2946 (format_obstack): this, to avoid any confusion with files.c's
2947 output_obstack.
2948 * src/reader.h (muscle_obstack): Move to...
2949 * src/output.h: here, since it's defined in output.c.
2950
2951 2001-12-17 Akim Demaille <akim@epita.fr>
2952
2953 * src/output.c (action_row, save_column, default_goto)
2954 (sort_actions, matching_state, pack_vector): Better variable
2955 locality.
2956
2957 2001-12-17 Akim Demaille <akim@epita.fr>
2958
2959 * src/output.c: Various formatting changes.
2960
2961 2001-12-17 Akim Demaille <akim@epita.fr>
2962
2963 * src/files.c (output_files): Free the output_obstack.
2964 * src/main.c (main): Call print and print_graph conditionally.
2965 * src/print.c (print): Work unconditionally.
2966 * src/print_graph.c (print_graph): Work unconditionally.
2967 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2968
2969 2001-12-16 Marc Autret <autret_m@epita.fr>
2970
2971 * src/output.c (actions_output): Fix. When we use %no-lines,
2972 there is one less line per action.
2973
2974 2001-12-16 Marc Autret <autret_m@epita.fr>
2975
2976 * src/bison.simple: Remove a useless #line directive.
2977 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2978 * src/output.c (get_lines_number): New.
2979 (output_parser): Adjust, now takes care about the lines of a
2980 output muscles.
2981 Fix line numbering.
2982 (actions_output): Computes the number of lines taken by actions.
2983 (output_master_parser): Insert new skeleton which is the name of
2984 the output parser file name.
2985
2986 2001-12-15 Marc Autret <autret_m@epita.fr>
2987
2988 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2989
2990 2001-12-15 Marc Autret <autret_m@epita.fr>
2991
2992 * src/output.c (output_gram): Keep track of the hairy one.
2993
2994 2001-12-15 Akim Demaille <akim@epita.fr>
2995
2996 Make `make distcheck' work.
2997
2998 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2999 system.h which uses libgettext.h.
3000
3001 2001-12-15 Akim Demaille <akim@epita.fr>
3002
3003 * src/nullable.c (set_nullable): Useless rules must be skipped,
3004 otherwise, since we range over their symbols, we might look at a
3005 nonterminal which no longer ``exists'', i.e., it is not counted in
3006 `nvars', hence we overflow our arrays.
3007
3008 2001-12-15 Akim Demaille <akim@epita.fr>
3009
3010 The header can also be produced directly, without any obstack!
3011 Yahoo!
3012
3013 * src/files.c, src/files.h (defines_obstack): Remove.
3014 (compute_header_macro): Global.
3015 (defines_obstack_save): Remove.
3016 * src/reader.c (parse_union_decl): No longer output to
3017 defines_obstack: its content can be found in the `stype' muscle
3018 anyway.
3019 (output_token_translations): Merge into...
3020 (symbols_output): this.
3021 Rename as...
3022 (symbols_save): this.
3023 (reader): Adjust.
3024 * src/output.c (header_output): New.
3025 (output): Call it.
3026
3027 2001-12-15 Akim Demaille <akim@epita.fr>
3028
3029 * src/reader.c (parse_union_decl): Instead of handling two obstack
3030 simultaneously, use one to define the `stype' muscle, and use the
3031 value of the latter to fill defines_obstack.
3032 (copy_comment): Remove.
3033 (copy_comment2): Work for a single obstack.
3034 Rename as...
3035 (copy_comment): this.
3036
3037 2001-12-15 Akim Demaille <akim@epita.fr>
3038
3039 * src/lex.c, src/lex.h (xgetc): No longer static.
3040 * src/reader.c (parse_union_decl): Revamp.
3041
3042 2001-12-15 Akim Demaille <akim@epita.fr>
3043
3044 Still making progress in separating Bison into (i) input, (ii)
3045 process, (iii) output: now we can directly output the parser file
3046 without using table_obstack at all.
3047
3048 * src/files.c, src/files.h (table_obstack): Bye bye.
3049 (parser_file_name): New.
3050 * src/files.c (compute_output_file_names): Compute it.
3051 * src/output.c (actions_output, output_parser)
3052 (output_master_parser): To a file instead of an obstack.
3053
3054 2001-12-15 Akim Demaille <akim@epita.fr>
3055
3056 Attach actions to rules, instead of pre-outputting them to
3057 actions_obstack.
3058
3059 * src/gram.h (rule_t): action and action_line are new members.
3060 * src/reader.c (symbol_list): Likewise.
3061 (copy_action): Save the actions within the rule.
3062 (packgram): Save them in rule_table.
3063 * src/output.c (actions_output): New.
3064 (output_parser): Use it on `%%actions'.
3065 (output_rule_data): Don't free rule_table.
3066 (output): Do it.
3067 (prepare): Don't save the `action' muscle.
3068 * src/bison.simple: s/%%action/%%actions/.
3069
3070 2001-12-15 Akim Demaille <akim@epita.fr>
3071
3072 * src/reader.c (copy_action): When --yacc, don't append a `;'
3073 to the user action: let it fail if lacking.
3074 Suggested by Arnold Robbins and Tom Tromey.
3075
3076 2001-12-14 Akim Demaille <akim@epita.fr>
3077
3078 * src/lex.c (literalchar): Simply return the char you decoded, non
3079 longer mess around with obstacks and int pointers.
3080 Adjust all callers.
3081
3082 2001-12-14 Akim Demaille <akim@epita.fr>
3083
3084 * src/lex.c (literalchar): Don't escape the special characters,
3085 just decode them, and keep them as char (before, eol was output as
3086 the 2 char string `\n' etc.).
3087 * src/output.c (output_rule_data): Use quotearg to output the
3088 token strings.
3089
3090 2001-12-13 Paul Eggert <eggert@twinsun.com>
3091
3092 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
3093 Do not infringe on the global user namespace when using C++.
3094 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
3095 All uses of `fprintf' and `stderr' changed.
3096
3097 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
3098
3099 2001-12-13 Akim Demaille <akim@epita.fr>
3100
3101 The computation of nullable is broken: it doesn't handle empty
3102 RHS's properly.
3103
3104 * tests/torture.at (GNU AWK Grammar): New.
3105 * tests/sets.at (Nullable): New.
3106 * src/nullable.c (set_nullable): Instead of blindly looping over
3107 `ritems', loop over the rules, and then over their rhs's.
3108
3109 Work around Autotest bugs.
3110
3111 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
3112 frame, because Autotest understand lines starting with a `+' as
3113 traces from the shell. Then, they are not processed properly.
3114 Admittedly an Autotest bug, but we don't have time to wait for
3115 Autotest to catch up.
3116 * tests/regression.at (Broken Closure): Adjust to the new table
3117 frames.
3118 Move to...
3119 * tests/sets.at: here.
3120
3121 2001-12-13 Akim Demaille <akim@epita.fr>
3122
3123 * src/closure.c (closure): Use nrules instead of playing tricks
3124 with BITS_PER_WORD.
3125
3126 2001-12-13 Akim Demaille <akim@epita.fr>
3127
3128 * src/print.c (print_actions): Output the handling of `$' as the
3129 traces do: shifting the token EOF. Before EOF was treated as a
3130 nonterminal.
3131 * tests/regression.at: Adjust some tests.
3132 * src/print_graph.c (print_core): Complete the set of items via
3133 closure. The next-to-final and final states are still unsatisfying,
3134 but that's to be addressed elsewhere.
3135 No longer output the rule numbers, but do output the state number.
3136 A single loop for the shifts + gotos is enough, but picked a
3137 distinct color for each.
3138 (print_graph): Initialize and finalize closure.
3139
3140 2001-12-13 Akim Demaille <akim@epita.fr>
3141
3142 * src/reader.c (readgram): Remove dead code, an strip useless
3143 braces.
3144 (get_type): Remove, unused.
3145
3146 2001-12-12 Akim Demaille <akim@epita.fr>
3147
3148 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
3149 on that of lib/error.c.
3150
3151 2001-12-12 Akim Demaille <akim@epita.fr>
3152
3153 Some hosts don't like `/' in includes.
3154
3155 * src/system.h: Include libgettext.h without qualifying the path.
3156 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
3157 $(top_srcdir).
3158
3159 2001-12-11 Marc Autret <autret_m@epita.fr>
3160
3161 * src/output.c (output_parser): Remove useless muscle.
3162
3163 2001-12-11 Marc Autret <autret_m@epita.fr>
3164
3165 * src/bison.simple: Remove #line just before %%epilogue. It
3166 is now handled in ...
3167 * src/reader.c (read_additionnal_code): Add the output of a
3168 #line for the epilogue.
3169
3170 2001-12-10 Marc Autret <autret_m@epita.fr>
3171
3172 * src/reader.c (copy_definition): Re-use CPP-outed code which
3173 replace precedent remove.
3174 * src/bison.simple: Remove #line before %%prologue because
3175 %%input-line is wrong at this time.
3176
3177 2001-12-10 Marc Autret <autret_m@epita.fr>
3178
3179 * src/reader.c (symbols_output): Clean up.
3180 * src/output.c (output_gram, output): Clean up.
3181
3182 2001-12-10 Akim Demaille <akim@epita.fr>
3183
3184 * src/lalr.c (initialize_lookaheads): New. Extracted from...
3185 * src/LR0.c (set_state_table): here.
3186 * src/lalr.c (lalr): Call it.
3187
3188 2001-12-10 Akim Demaille <akim@epita.fr>
3189
3190 * src/state.h (shifts): Remove the `number' member: shifts are
3191 attached to state, hence no longer need to be labelled with a
3192 state number.
3193
3194 2001-12-10 Akim Demaille <akim@epita.fr>
3195
3196 Now that states have a complete set of members, the linked list of
3197 shifts is useless: just fill directly the state's shifts member.
3198
3199 * src/state.h (shifts): Remove the `next' member.
3200 * src/LR0.c (first_state, last_state): Remove.
3201 Adjust the callers.
3202 (augment_automaton): Don't look for the shifts that must be added
3203 a shift on EOF: it is those of the state we looked for! But now,
3204 since shifts are attached, it is no longer needed to looking
3205 merely by its id: its number.
3206
3207 2001-12-10 Akim Demaille <akim@epita.fr>
3208
3209 * src/LR0.c (augment_automaton): Better variable locality.
3210 Remove an impossible branch: if there is a state corresponding to
3211 the start symbol being shifted, then there is shift for the start
3212 symbol from the initial state.
3213
3214 2001-12-10 Akim Demaille <akim@epita.fr>
3215
3216 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
3217 only when appropriate: when insert_start_shifting_state' is not
3218 invoked.
3219 * tests/regression.at (Rule Line Numbers): Adjust.
3220
3221 2001-12-10 Akim Demaille <akim@epita.fr>
3222
3223 * src/LR0.c (augment_automaton): Now that all states have shifts,
3224 merge the two cases addition shifts to the initial state.
3225
3226 2001-12-10 Akim Demaille <akim@epita.fr>
3227
3228 * src/lalr.c (set_state_table): Move to...
3229 * src/LR0.c: here.
3230 * src/lalr.c (lalr): Don't call it...
3231 * src/LR0.c (generate_states): do it.
3232 * src/LR0.h (first_state): Remove, only the table is used.
3233
3234 2001-12-10 Akim Demaille <akim@epita.fr>
3235
3236 * src/LR0.h (first_shift, first_reduction): Remove.
3237 * src/lalr.c: Don't use first_shift: find shifts through the
3238 states.
3239
3240 2001-12-10 Akim Demaille <akim@epita.fr>
3241
3242 * src/LR0.c: Attach shifts to states as soon as they are
3243 computed.
3244 * src/lalr.c (set_state_table): Instead of assigning shifts to
3245 state, just assert that the mapping was properly done.
3246
3247 2001-12-10 Akim Demaille <akim@epita.fr>
3248
3249 * src/LR0.c (insert_start_shift): Rename as...
3250 (insert_start_shifting_state): this.
3251 (insert_eof_shifting_state, insert_accepting_state): New.
3252 (augment_automaton): Adjust.
3253 Better locality of the variables.
3254 When looking if the start_symbol is shifted from the initial
3255 state, using `while (... symbol != start_symbol ...)' sounds
3256 better than `while (... symbol < start_symbol ...)': If fail
3257 to see how the order between symbols could be relevant!
3258
3259 2001-12-10 Akim Demaille <akim@epita.fr>
3260
3261 * src/getargs.h: Don't declare `spec_name_prefix' and
3262 `spec_file_prefix', declared by src/files.h.
3263 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
3264 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
3265 * src/output.c (prepare): Adjust.
3266 * src/reader.c (symbols_output): Likewise.
3267 * src/vmsgetargs.c: Vaguely adjust, but who cares?
3268
3269 2001-12-10 Akim Demaille <akim@epita.fr>
3270
3271 * src/muscle_tab.c (muscle_init): NULL is a better default than
3272 `"0"'.
3273
3274 2001-12-10 Akim Demaille <akim@epita.fr>
3275
3276 * src/reader.c (reader): Calling symbols_output once is enough.
3277
3278 2001-12-10 Akim Demaille <akim@epita.fr>
3279
3280 Now that states have a complete set of members, the linked list of
3281 reductions is useless: just fill directly the state's reductions
3282 member.
3283
3284 * src/state.h (struct reductions): Remove member `number' and
3285 `next'.
3286 * src/LR0.c (first_reduction, last_reduction): Remove.
3287 (save_reductions): Don't link the new reductions, store them in
3288 this_state.
3289 * src/lalr.c (set_state_table): No need to attach reductions to
3290 states, it's already done.
3291 * src/output.c (output_actions): No longer free the shifts, then
3292 the reductions, then the states: free all the states and their
3293 members.
3294
3295 2001-12-10 Akim Demaille <akim@epita.fr>
3296
3297 * src/options.c (OPTN, DRTV, BOTH): New.
3298 (option_table): Use them.
3299
3300 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
3301 the job of system.h.
3302 * src/options.c: Don't include stdio.h and xalloc.h for the same
3303 reasons.
3304
3305 2001-12-10 Akim Demaille <akim@epita.fr>
3306
3307 * src/output.c (output, prepare): Make sure the values of the
3308 muscles `action' and `prologue' are 0-terminated.
3309
3310 2001-12-10 Akim Demaille <akim@epita.fr>
3311
3312 Clean up GCC warnings.
3313
3314 * src/reader.c (copy_action): `buf' is not used.
3315 (parse_skel_decl): Be static.
3316 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
3317 * src/options.h (create_long_option_table): Have a real prototype.
3318 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
3319 (hash_delete_at): Return const void *.
3320 Adjust casts to preserve the const.
3321
3322 2001-12-10 Akim Demaille <akim@epita.fr>
3323
3324 * configure.in: Require 2.52g.
3325 M4 is not needed, but AUTOM4TE is.
3326 * m4/m4.m4: Remove.
3327 * tests/Makefile.am: Adjust.
3328
3329 2001-12-10 Akim Demaille <akim@epita.fr>
3330
3331 One structure for states is enough, even though theoretically
3332 there are LR(0) states and LALR(1) states.
3333
3334 * src/lalr.h (state_t): Remove.
3335 (state_table): Be state_t **, not state_t *.
3336 * src/state.h (core, CORE_ALLOC): Rename as...
3337 (state_t, STATE_ALLOC): this.
3338 Add the LALR(1) members: shifts, reductions, errs.
3339 * src/LR0.c (state_table): Rename as...
3340 (state_hash): this, to avoid name clashes with the global
3341 `state_table'.
3342 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
3343 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
3344
3345 2001-12-10 Akim Demaille <akim@epita.fr>
3346
3347 Bison dumps core on bash.y.
3348 Reported by Pascal Bart.
3349
3350 * src/warshall.c (bitmatrix_print): New.
3351 (TC): Use it.
3352 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
3353 j must be the outer loop.
3354 * tests/regression.at (Broken Closure): New.
3355
3356 2001-12-05 Akim Demaille <akim@epita.fr>
3357
3358 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
3359 its argument.
3360 Reported by Peter Hámorský.
3361
3362 2001-12-05 Akim Demaille <akim@epita.fr>
3363
3364 * src/conflicts.c (err_table): Remove.
3365 (resolve_sr_conflict): Adjust.
3366 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
3367 Rename as...
3368 (state_t.reductions, state_t.shifts): this.
3369
3370 2001-12-05 Akim Demaille <akim@epita.fr>
3371
3372 * src/reduce.c (reduce_grammar_tables): No longer disable the
3373 removal of useless rules via CPP but via `if (0)', so that the
3374 compiler still check the code is valid.
3375 For instance, it should have noticed `rline' no longer exists: use
3376 the `line' member of rule_t.
3377 * src/gram.c (dummy, rline): Remove, unused.
3378
3379 2001-12-05 Akim Demaille <akim@epita.fr>
3380
3381 * src/output.c (pack_vector): Use assert, not berror.
3382 * src/main.c (berror): Remove, unused.
3383
3384 2001-12-05 Akim Demaille <akim@epita.fr>
3385
3386 New experimental feature: if --verbose --trace output all the
3387 items of a state, not only its kernel.
3388
3389 * src/print.c (print_core): If `trace_flag', then invoke closure
3390 before outputting the items of the state (print_core is no longer
3391 a correct name them).
3392 (print_results): Invoke new_closure/free_closure if needed.
3393
3394 2001-12-05 Akim Demaille <akim@epita.fr>
3395
3396 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
3397 * src/closure.c, src/closure.h (itemsetsize): Rename as...
3398 (nitemset): for consistency with the rest of the project.
3399
3400 2001-12-05 Akim Demaille <akim@epita.fr>
3401
3402 * src/closure.c (print_closure): Improve.
3403 (closure): Use it for printing input and output.
3404
3405 2001-12-05 Akim Demaille <akim@epita.fr>
3406
3407 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
3408 indexed by nonterminals.
3409
3410 2001-12-05 Akim Demaille <akim@epita.fr>
3411
3412 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
3413 what it was!).
3414 * src/warshall.h: Remove accidental duplication of the content.
3415
3416 2001-12-05 Akim Demaille <akim@epita.fr>
3417
3418 * src/closure.c (set_fderives): De-obfuscate.
3419
3420 2001-12-05 Akim Demaille <akim@epita.fr>
3421
3422 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
3423
3424 2001-12-05 Akim Demaille <akim@epita.fr>
3425
3426 * src/closure.c (set_firsts): De-obfuscate.
3427
3428 2001-12-05 Akim Demaille <akim@epita.fr>
3429
3430 * src/output.c (action_row): De-obfuscate
3431 using the good o' techniques: arrays not pointers, variable
3432 locality, BITISSET, RESETBIT etc.
3433
3434 2001-12-05 Akim Demaille <akim@epita.fr>
3435
3436 Pessimize the code to simplify it: from now on, all the states
3437 have a valid SHIFTS, which NSHIFTS is possibly 0.
3438
3439 * src/LR0.c (shifts_new): Be global and move to..
3440 * src/state.c, src/state.h: here.
3441 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
3442 * src/print_graph: Adjust.
3443
3444 2001-12-05 Akim Demaille <akim@epita.fr>
3445
3446 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
3447 * src/conflicts.c: Use it.
3448 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
3449 incorrectly ``simplified''.
3450
3451 2001-12-05 Akim Demaille <akim@epita.fr>
3452
3453 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
3454 using the good o' techniques: arrays not pointers, variable
3455 locality, BITISSET, RESETBIT etc.
3456
3457 2001-12-05 Akim Demaille <akim@epita.fr>
3458
3459 * src/state.h (SHIFT_SYMBOL): New.
3460 * src/conflicts.c: Use it to deobfuscate.
3461
3462 2001-12-05 Akim Demaille <akim@epita.fr>
3463
3464 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
3465 (print_reductions): De-obfuscate using the good o' techniques:
3466 arrays not pointers, variable locality, BITISSET.
3467
3468 2001-12-05 Akim Demaille <akim@epita.fr>
3469
3470 * src/conflicts.c (print_reductions): Arrays, not pointers.
3471 Use BITISSET.
3472
3473 2001-12-05 Akim Demaille <akim@epita.fr>
3474
3475 * src/conflicts.c (print_reductions): Pessimize, but clarify.
3476
3477 2001-12-05 Akim Demaille <akim@epita.fr>
3478
3479 * src/conflicts.c (print_reductions): Improve variable locality.
3480
3481 2001-12-05 Akim Demaille <akim@epita.fr>
3482
3483 * src/conflicts.c (print_reductions): Pessimize, but clarify.
3484
3485 2001-12-05 Akim Demaille <akim@epita.fr>
3486
3487 * src/conflicts.c (print_reductions): Improve variable locality.
3488
3489 2001-12-05 Akim Demaille <akim@epita.fr>
3490
3491 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
3492 * src/lalr.c: Use them.
3493
3494 2001-12-05 Akim Demaille <akim@epita.fr>
3495
3496 * src/LR0.c (augment_automaton): Formatting changes.
3497 Better variable locality.
3498
3499 2001-12-05 Akim Demaille <akim@epita.fr>
3500
3501 * src/lalr.c (matrix_print): New.
3502 (transpose): Use it.
3503 Use arrays instead of pointers.
3504
3505 2001-12-05 Akim Demaille <akim@epita.fr>
3506
3507 * src/lalr.c (maxrhs): Move to...
3508 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
3509 * src/lalr.c (build_relations): Adjust.
3510
3511 2001-12-05 Akim Demaille <akim@epita.fr>
3512
3513 * src/lalr.c (transpose): Free the memory allocated to the
3514 argument, as it is replaced by the results by the unique caller.
3515 (build_relations): Merely invoke transpose: it handles the memory
3516 deallocation.
3517 Improve variable locality.
3518 Avoid variables used as mere abbreviations.
3519 (compute_lookaheads): Use arrays instead of pointers.
3520
3521 2001-12-05 Akim Demaille <akim@epita.fr>
3522
3523 * src/lalr.c (initialize_F): Improve variable locality.
3524 Avoid variables used as mere abbreviations.
3525
3526 2001-12-05 Akim Demaille <akim@epita.fr>
3527
3528 * src/derives.c (print_derives): Display the ruleno.
3529 * src/lalr.c (initialize_F, transpose): Better variable locality
3530 to improve readability.
3531 Avoid variables used as mere abbreviations.
3532
3533 2001-12-05 Akim Demaille <akim@epita.fr>
3534
3535 * src/lalr.c (traverse): Use arrays instead of pointers.
3536
3537 2001-12-05 Akim Demaille <akim@epita.fr>
3538
3539 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
3540 the handling of squeue.
3541 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
3542
3543 2001-12-05 Akim Demaille <akim@epita.fr>
3544
3545 Because useless nonterminals are now kept alive (instead of being
3546 `destroyed'), we now sometimes examine them, and store information
3547 related to them. Hence we need to know their number, and adjust
3548 memory allocations.
3549
3550 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
3551 static.
3552 * src/LR0.c (allocate_itemsets): The memory allocated to
3553 `symbol_count' was used for two different purpose: once to count
3554 the number of occurrences of each symbol, and later reassigned to
3555 `shift_symbol', containing the symbol that can be shifted from a
3556 given state.
3557 Deobfuscate, i.e., allocate, use and free `symbol_count' here
3558 only, and...
3559 (new_itemsets): Allocate `shift_symbol' here.
3560 (allocate_itemsets): symbol_count includes useless nonterminals.
3561 Make room for them.
3562 (free_storage): Use `free', not `XFREE', for pointers that cannot
3563 be null.
3564
3565 2001-12-05 Akim Demaille <akim@epita.fr>
3566
3567 * src/nullable.c (set_nullable): Deobfuscate the handling of
3568 ritem.
3569 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
3570
3571 2001-12-05 Akim Demaille <akim@epita.fr>
3572
3573 * src/gram.c, src/gram.h (ritem_print): New.
3574 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
3575 (This useless function was defined only to work around VMS linkers
3576 that can't handle compilation units with variables only).
3577 * src/reduce.c (dump_grammar): Use it to trace the construction of
3578 ritem.
3579
3580 2001-12-04 Paul Eggert <eggert@twinsun.com>
3581
3582 * src/bison.simple (union yyalloc): Change member names
3583 to be the same as the stack names.
3584 (yyparse): yyptr is now union yyalloc *, not char *.
3585 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
3586 and may generate better code on some machines.
3587 (yystpcpy): Use prototype if __STDC__ is defined, not just
3588 if __cplusplus is defined.
3589
3590 2001-11-30 Akim Demaille <akim@epita.fr>
3591
3592 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
3593 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
3594 Gettext doesn't compile cleanly, and dies with -Werror.
3595 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
3596 Include WARNING_CFLAGS here.
3597 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
3598 before being defined.
3599
3600 2001-11-27 Paul Eggert <eggert@twinsun.com>
3601
3602 * lib/quotearg.h (quotearg_n, quotearg_n_style):
3603 First arg is int, not unsigned.
3604 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
3605 (SIZE_MAX, UINT_MAX): New macros.
3606 (quotearg_n_options): Abort if N is negative.
3607 Avoid overflow check on hosts where size_t is 64 bits and int
3608 is 32 bits, as overflow is impossible there.
3609 Fix off-by-one typo that caused unnecessary reallocation.
3610
3611 2001-11-29 Paul Eggert <eggert@twinsun.com>
3612
3613 Name space cleanup in generated parser.
3614
3615 * doc/bison.texinfo (Bison Parser): Discuss system headers
3616 and their effect on the user name space.
3617
3618 * src/bison.simple:
3619 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
3620 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
3621 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
3622
3623 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
3624 on user names when possible.
3625
3626 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
3627 Simplify test for whather <alloca.h> exists.
3628
3629 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
3630
3631 (<stdio.h>): Include if YYDEBUG.
3632
3633 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
3634 ! defined (yyoverflow) && ! defined (yymemcpy).
3635
3636 (yymemcpy, yyparse): Rename local variables as needed so that
3637 they all begin with 'yy'.
3638
3639 (yystrlen, yystpcpy): New functions.
3640
3641 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
3642 All uses changed.
3643
3644 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
3645 instead of relying on string.h functions. Use YYSTACK_ALLOC
3646 and YYSTACK_FREE instead of malloc and free.
3647
3648 2001-11-30 Akim Demaille <akim@epita.fr>
3649
3650 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
3651 before their first uses.
3652 (YYBISON, YYPURE): Move to the top of the output.
3653
3654 2001-11-30 Akim Demaille <akim@epita.fr>
3655
3656 * tests/reduce.at (Useless Nonterminals): Fix.
3657
3658 2001-11-30 Akim Demaille <akim@epita.fr>
3659
3660 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
3661 if body instead of `;' to pacify GCC's warnings.
3662
3663 2001-11-30 Akim Demaille <akim@epita.fr>
3664
3665 Instead of mapping the LHS of unused rules to -1, keep the LHS
3666 valid, but flag the rules as invalid.
3667
3668 * src/gram.h (rule_t): `useful' is a new member.
3669 * src/print.c (print_grammar): Adjust.
3670 * src/derives.c (set_derives): Likewise.
3671 * src/reader.c (packgram, reduce_output): Likewise.
3672 * src/reduce.c (reduce_grammar_tables): Likewise.
3673 * tests/reduce.at (Underivable Rules, Useless Rules): New.
3674
3675 2001-11-30 Akim Demaille <akim@epita.fr>
3676
3677 * src/reduce.c (reduce_output): Formatting changes.
3678 * src/print.c (print_results, print_grammar): Likewise.
3679 * tests/regression.at (Rule Line Numbers)
3680 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
3681
3682 2001-11-30 Akim Demaille <akim@epita.fr>
3683
3684 * src/reduce.c (nonterminals_reduce): Instead of throwing away
3685 useless nonterminals, move them at the end of the symbol arrays.
3686 (reduce_output): Adjust.
3687 * tests/reduce.at (Useless Nonterminals): Adjust.
3688
3689 2001-11-30 Akim Demaille <akim@epita.fr>
3690
3691 * src/reduce.c: Various comment/formatting changes.
3692 (nonterminals_reduce): New, extracted from...
3693 (reduce_grammar_tables): here.
3694 (reduce_grammar): Call nonterminals_reduce.
3695
3696 2001-11-29 Paul Eggert <eggert@twinsun.com>
3697
3698 * src/bison.simple (YYSTACK_REALLOC): Remove.
3699 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
3700 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
3701 New macros.
3702 (union yyalloc): New type.
3703 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
3704 an arbitrary restriction on hosts where size_t is wider than int.
3705
3706 (yyparse): Don't dump core if alloca or malloc fails; instead, report
3707 a parser stack overflow. Allocate just one block of memory for all
3708 three stacks, instead of allocating three blocks; this typically is
3709 faster and reduces fragmentation.
3710
3711 Do not limit the number of items in the stack to a value that fits
3712 in 'int', as this is an arbitrary limit on hosts with 64-bit
3713 size_t and 32-bit int.
3714
3715 2001-11-29 Marc Autret <autret_m@epita.fr>
3716
3717 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
3718 of defining YYERROR_VERBOSE.
3719 [AT_DATA]: $4 is now out of C declarations in the prologue.
3720
3721 2001-11-28 Marc Autret <autret_m@epita.fr>
3722
3723 * src/reader.c (parse_dquoted_param): New.
3724 (parse_skel_decl): Use it.
3725 * src/lex.h: Add its prototype.
3726 * src/lex.c (literalchar): Become not static.
3727
3728 2001-11-28 Marc Autret <autret_m@epita.fr>
3729
3730 * src/output.h: And put its extern declaration here.
3731 * src/output.c (error_verbose): Define here.
3732 (prepare): Echo name modification.
3733 * src/getargs.h: Clean its extern declaration.
3734 * src/getargs.c (error_verbose_flag): Remove.
3735 (getargs): Remove case 'e'.
3736 * src/options.c (option_table): 'error-verbose' is now seen as simple
3737 percent option.
3738 Include output.h.
3739
3740 * src/reader.c (read_declarations): Remove case tok_include.
3741 (parse_include_decl): Remove.
3742 * src/lex.h (token_t): Remove tok_include.
3743 * src/options.c (option_table): 'include' is now a simple command line
3744 option.
3745
3746 2001-11-28 Marc Autret <autret_m@epita.fr>
3747
3748 * src/bison.simple: Adjust muscle names.
3749 * src/muscle_tab.c (muscle_init): Also rename the muscles.
3750 * src/output.c (prepare): s/_/-/ for the muscles names.
3751 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
3752
3753 2001-11-28 Marc Autret <autret_m@epita.fr>
3754
3755 * src/bison.simple: Fix debug.
3756 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
3757
3758 2001-11-28 Akim Demaille <akim@epita.fr>
3759
3760 * src/LR0.c (shifts_new): New.
3761 (save_shifts, insert_start_shift, augment_automaton): Use it.
3762
3763 2001-11-28 Akim Demaille <akim@epita.fr>
3764
3765 * src/closure.c (closure): `b' and `ruleno' denote the same value:
3766 keep ruleno only.
3767
3768 2001-11-28 Akim Demaille <akim@epita.fr>
3769
3770 * src/closure.c (closure): Instead of looping over word in array
3771 then bits in words, loop over bits in array.
3772
3773 2001-11-28 Akim Demaille <akim@epita.fr>
3774
3775 * src/closure.c (closure): No longer optimize the special case
3776 where all the bits of `ruleset[r]' are set to 0, to make the code
3777 clearer.
3778
3779 2001-11-28 Akim Demaille <akim@epita.fr>
3780
3781 * src/closure.c (closure): `r' and `c' are new variables, used to
3782 de-obfuscate accesses to RULESET and CORE.
3783
3784 2001-11-28 Akim Demaille <akim@epita.fr>
3785
3786 * src/reduce.c (reduce_print): Use ngettext.
3787 (dump_grammar): Improve the trace accuracy.
3788
3789 2001-11-28 Akim Demaille <akim@epita.fr>
3790
3791 * src/reduce.c (dump_grammar): Don't translate trace messages.
3792
3793 2001-11-28 Akim Demaille <akim@epita.fr>
3794
3795 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
3796 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
3797 as all tags are free'ed afterwards.
3798 From Enrico Scholz.
3799
3800 2001-11-27 Paul Eggert <eggert@twinsun.com>
3801
3802 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
3803 use alloca when we didn't want to, and vice versa.
3804
3805 2001-11-27 Marc Autret <autret_m@epita.fr>
3806
3807 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
3808 initialization.
3809 * src/output.c (prepare): Remove its update.
3810
3811 2001-11-27 Marc Autret <autret_m@epita.fr>
3812
3813 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
3814 Use %error-verbose.
3815
3816 2001-11-27 Marc Autret <autret_m@epita.fr>
3817
3818 * src/bison.simple: Remove YYERROR_VERBOSE using.
3819 Use %%error_verbose.
3820 (yyparse): Likewise.
3821 * src/output.c (prepare): Give its final value.
3822 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
3823 * src/getargs.h: Add its extern declaration.
3824 * src/getargs.c (error_verbose_flag): New int.
3825 (getargs): Update to catch new case.
3826 * src/options.c (option_table): 'error-verbose' is a new option.
3827 (shortopts): Update.
3828
3829 2001-11-27 Akim Demaille <akim@epita.fr>
3830
3831 * src/system.h: Use intl/libgettext.h.
3832 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
3833
3834 2001-11-27 Akim Demaille <akim@epita.fr>
3835
3836 * tests/torture.at (Exploding the Stack Size with Malloc):
3837 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
3838
3839 2001-11-27 Akim Demaille <akim@epita.fr>
3840
3841 * src/files.c: Include error.h.
3842 Reported by Hans Aberg.
3843
3844 2001-11-26 Marc Autret <autret_m@epita.fr>
3845
3846 * src/reader.c (parse_include_decl): New, not yet implemented.
3847 (read_declarations): Add case tok_include.
3848 * src/getargs.h (include): Add its extern definition.
3849 * src/getargs.c (include): New const char *.
3850 (getargs): Add case '-I'.
3851 * src/options.c (option_table): Add include as command line and
3852 percent option.
3853 * src/lex.h (token_t): Add tok_include.
3854
3855 2001-11-26 Akim Demaille <akim@epita.fr>
3856
3857 * src/reader.c (readgram): Make sure rules for mid-rule actions
3858 have a lineno equal to that of their host rule.
3859 Reported by Hans Aberg.
3860 * tests/regression.at (Rule Line Numbers): New.
3861
3862 2001-11-26 Akim Demaille <akim@epita.fr>
3863
3864 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
3865 size_ts.
3866
3867 2001-11-26 Akim Demaille <akim@epita.fr>
3868
3869 * src/complain.c, src/complain.h (error): Remove, provided by
3870 lib/error.[ch].
3871
3872 2001-11-26 Akim Demaille <akim@epita.fr>
3873
3874 * src/reader.c (read_declarations): Don't abort on tok_illegal,
3875 issue an error message.
3876 * tests/regression.at (Invalid %directive): New.
3877 Reported by Hans Aberg.
3878
3879 2001-11-26 Akim Demaille <akim@epita.fr>
3880
3881 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
3882 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
3883
3884 2001-11-26 Akim Demaille <akim@epita.fr>
3885
3886 * src/conflicts.c (conflicts_print): Don't complain at all when
3887 there are no reduce/reduce conflicts, and as many shift/reduce
3888 conflicts as expected.
3889 * tests/regression.at (%expect right): Adjust.
3890
3891 2001-11-23 Akim Demaille <akim@epita.fr>
3892
3893 * lib/alloca.c: Update, from fileutils.
3894
3895 2001-11-23 Akim Demaille <akim@epita.fr>
3896
3897 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
3898
3899 2001-11-23 Akim Demaille <akim@epita.fr>
3900
3901 * src/system.h: Include alloca.h.
3902 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
3903
3904 2001-11-23 Akim Demaille <akim@epita.fr>
3905
3906 * src/print_graph.c (print_actions): Remove `rule', unused.
3907 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
3908 pacify GCC's signed < unsigned warnings.
3909 * src/closure.c (itemsetsize): Likewise.
3910 * src/reader.c (symbol_list_new): Static.
3911
3912 2001-11-23 Akim Demaille <akim@epita.fr>
3913
3914 Attaching lineno to buckets is stupid, since only one copy of each
3915 symbol is kept, only the line of the first occurrence is kept too.
3916
3917 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
3918 * src/reader.c (rline_allocated): Remove, unused.
3919 (symbol_list): Have a `line' member.
3920 (symbol_list_new): New.
3921 (readgram): Use it.
3922 * src/print.c (print_grammar): Output the rule line numbers.
3923 * tests/regression.at (Solved SR Conflicts)
3924 (Unresolved SR Conflicts): Adjust.
3925 Reported by Hans Aberg.
3926
3927 2001-11-22 Marc Autret <autret_m@epita.fr>
3928
3929 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
3930
3931 2001-11-22 Marc Autret <autret_m@epita.fr>
3932
3933 * src/muscle_tab.c (muscle_init): Remove initialization of
3934 skeleton muscle.
3935 * src/output.c (output_master_parser): Do it here.
3936
3937 2001-11-20 Akim Demaille <akim@epita.fr>
3938
3939 * po/sv.po: New.
3940 * configure.in (ALL_LINGUAS): Adjust.
3941 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
3942 longer contains strings to translate.
3943
3944 2001-11-19 Akim Demaille <akim@epita.fr>
3945
3946 * src/conflicts.c (conflicts_print): Add a missing \n.
3947
3948 2001-11-19 Akim Demaille <akim@epita.fr>
3949
3950 * src/nullable.c (nullable_print): New.
3951 (set_nullable): Call it when tracing.
3952 Better locality of variables.
3953
3954 2001-11-19 Akim Demaille <akim@epita.fr>
3955
3956 * src/print.c (print_actions): Better locality of variables.
3957
3958 2001-11-19 Akim Demaille <akim@epita.fr>
3959
3960 * src/derives.c (print_derives): Fix and enrich.
3961 * src/closure.c (print_fderives): Likewise.
3962
3963 2001-11-19 Akim Demaille <akim@epita.fr>
3964
3965 * src/closure.c (itemsetend): Remove, replaced with...
3966 (itemsetsize): new.
3967
3968 2001-11-19 Akim Demaille <akim@epita.fr>
3969
3970 * src/LR0.c (kernel_end): Remove, replaced with...
3971 (kernel_size): new.
3972
3973 2001-11-19 Akim Demaille <akim@epita.fr>
3974
3975 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
3976 to clarify.
3977
3978 2001-11-19 Akim Demaille <akim@epita.fr>
3979
3980 * src/closure.c (closure): Use arrays instead of pointers to clarify.
3981
3982 2001-11-19 Akim Demaille <akim@epita.fr>
3983
3984 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
3985 trace messages.
3986 * src/LR0.c: Likewise.
3987 (allocate_itemsets): Use arrays instead of pointers to clarify.
3988
3989 2001-11-19 Akim Demaille <akim@epita.fr>
3990
3991 * src/getargs.c (statistics_flag): Replace with...
3992 (trace_flag): New.
3993 (longopts): Accept --trace instead of --statistics.
3994 * src/getargs.h, src/options.c: Adjust.
3995 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
3996 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
3997
3998 2001-11-19 Akim Demaille <akim@epita.fr>
3999
4000 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
4001 pointers to clarify the code.
4002 (save_reductions, save_shifts): Factor common parts of alternatives.
4003
4004 2001-11-19 Akim Demaille <akim@epita.fr>
4005
4006 * src/LR0.c (new_state, get_state): Complete TRACE code.
4007 * src/closure.c: Include `reader.h' to get `tags', needed by the
4008 trace code.
4009 Rename the conditional DEBUG as TRACE.
4010 Output consistently TRACEs to stderr, not stdout.
4011 * src/derives.c: Likewise.
4012 * src/reduce.c: (inaccessable_symbols): Using if is better style
4013 than goto.
4014 Use `#if TRACE' instead of `#if 0' for tracing code.
4015
4016 2001-11-19 Akim Demaille <akim@epita.fr>
4017
4018 * src/system.h (LIST_FREE, shortcpy): New.
4019 * src/LR0.c: Use them.
4020 * src/output.c (free_itemsets, free_reductions, free_shifts):
4021 Remove, replaced by LIST_FREE.
4022
4023 2001-11-19 Akim Demaille <akim@epita.fr>
4024
4025 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
4026 (REDUCTIONS_ALLOC): New.
4027 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
4028 allocation.
4029
4030 2001-11-19 Akim Demaille <akim@epita.fr>
4031
4032 * src/LR0.c (new_state): Complete trace code.
4033 * src/nullable.c (set_nullable): Don't translate traces.
4034
4035 2001-11-19 Akim Demaille <akim@epita.fr>
4036
4037 * src/print_graph.c (print_core): Better locality of variables.
4038 * src/print.c (print_core): Likewise.
4039
4040 2001-11-19 Akim Demaille <akim@epita.fr>
4041
4042 * src/vcg.c: You do the output, so you are responsible of the
4043 handling of VCG syntax, in particular: use quotearg.
4044 * src/print_graph.c: Don't.
4045 (print_actions): Don't output the actions as part of the nodes,
4046 since that's the job of the edges.
4047 (print_state): Don't output by hand: fill the node description,
4048 and ask for its output.
4049
4050 2001-11-19 Akim Demaille <akim@epita.fr>
4051
4052 * src/bison.simple (yyparse): When verbosely reporting an error,
4053 no longer put additional quotes around token names.
4054 * tests/calc.at: Adjust.
4055
4056 2001-11-19 Akim Demaille <akim@epita.fr>
4057
4058 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
4059 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
4060 * src/output.c: Adjust.
4061
4062 2001-11-19 Akim Demaille <akim@epita.fr>
4063
4064 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
4065 (rule_t): this.
4066 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
4067
4068 2001-11-19 Akim Demaille <akim@epita.fr>
4069
4070 * src/gram.h (rule_t): New.
4071 (rule_table): New.
4072 (rrhs, rlhs): Remove, part of state_t.
4073 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
4074 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4075 * src/reader.c, src/reduce.c: Adjust.
4076
4077 2001-11-19 Akim Demaille <akim@epita.fr>
4078
4079 * src/reader.c (symbols_output): New, extracted from...
4080 (packsymbols): Here.
4081 (reader): Call it.
4082
4083 2001-11-19 Akim Demaille <akim@epita.fr>
4084
4085 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
4086 (maxrhs): this new function.
4087
4088 2001-11-19 Akim Demaille <akim@epita.fr>
4089
4090 * src/lalr.c (F): New macro to access the variable F.
4091 Adjust.
4092
4093 2001-11-19 Akim Demaille <akim@epita.fr>
4094
4095 * src/lalr.h (LA): New macro to access the variable LA.
4096 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
4097 * src/lalr.c: Adjust.
4098
4099 2001-11-19 Akim Demaille <akim@epita.fr>
4100
4101 * src/lalr.c (initialize_LA): Only initialize LA. Let...
4102 (set_state_table): handle the `lookaheads' members.
4103
4104 2001-11-19 Akim Demaille <akim@epita.fr>
4105
4106 * src/lalr.h (lookaheads): Removed array, whose contents is now
4107 a member of...
4108 (state_t): this structure.
4109 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
4110 Adjust.
4111
4112 2001-11-19 Akim Demaille <akim@epita.fr>
4113
4114 * src/lalr.h (consistent): Removed array, whose contents is now
4115 a member of...
4116 (state_t): this structure.
4117 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
4118 Adjust.
4119
4120 2001-11-19 Akim Demaille <akim@epita.fr>
4121
4122 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
4123 contents are now members of...
4124 (state_t): this structure.
4125 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
4126 Adjust.
4127
4128 2001-11-19 Akim Demaille <akim@epita.fr>
4129
4130 * src/lalr.h (state_t): New.
4131 (state_table): Be a state_t * instead of a core **.
4132 (accessing_symbol): Remove, part of state_t.
4133 * src/lalr.c: Adjust.
4134 (set_accessing_symbol): Merge into...
4135 (set_state_table): this.
4136 * src/print_graph.c, src/conflicts.c: Adjust.
4137
4138 2001-11-14 Akim Demaille <akim@epita.fr>
4139
4140 * tests/calc.at, tests/output.at, tests/regression.at,
4141 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
4142 now the tests are run in private dirs, therefore AC_CLEANUP and
4143 family can be simplified to 0-ary.
4144 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
4145 use abs. path to find config.h.
4146 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
4147 stderr, there can be way too much random noise.
4148 Instead pass -Werror to GCC and rely on the exit status.
4149 Reported by Wolfram Wagner.
4150
4151 2001-11-14 Akim Demaille <akim@epita.fr>
4152
4153 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
4154 defined only if yyoverflow is defined, to avoid `warning: unused
4155 variable `yyvs1''.
4156 Reported by The Test Suite.
4157
4158 2001-11-14 Akim Demaille <akim@epita.fr>
4159
4160 * src/print.c: Include reduce.h.
4161 Reported by Hans Aberg.
4162
4163 2001-11-14 Akim Demaille <akim@epita.fr>
4164
4165 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
4166 Revert a previous patch: these are really const.
4167 * src/conflicts.c (conflict_report): Additional useless pair of
4168 braces to pacify GCC's warnings for `if () if () {} else {}'.
4169 * src/lex.c (parse_percent_token): Replace equal_offset with
4170 arg_offset.
4171 arg is const.
4172 Be sure to strdup `arg' when used, since there is no reason for
4173 token_buffer not to change.
4174
4175 2001-11-14 Akim Demaille <akim@epita.fr>
4176
4177 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
4178 definition.
4179 * src/main.c (main): Use them.
4180 Suggested by Hans Aberg.
4181
4182 2001-11-12 Akim Demaille <akim@epita.fr>
4183
4184 * src/system.h (ngettext): Now that we use ngettext, be sure to
4185 provide a default definition when NLS are not used.
4186
4187 2001-11-12 Akim Demaille <akim@epita.fr>
4188
4189 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
4190 Use @kbd to denote user input.
4191 (Language and Grammar): ANSIfy the example.
4192 Adjust its layout for info/notinfo.
4193 (Location Tracking Calc): Output error messages to stderr.
4194 Output locations in a more GNUtically correct way.
4195 Fix a couple of Englishos.
4196 Adjust @group/@end group pairs.
4197
4198 2001-11-12 Akim Demaille <akim@epita.fr>
4199
4200 %expext was not functioning at all.
4201
4202 * src/conflicts.c (expected_conflicts): Set to -1.
4203 (conflict_report): Use ngettext.
4204 (conflicts_print): Check %expect and make its violation an error.
4205 * doc/bison.texinfo (Expect Decl): Adjust.
4206 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
4207 * tests/regression.at (%expect not enough, %expect right)
4208 (%expect too much): New.
4209
4210 2001-11-12 Akim Demaille <akim@epita.fr>
4211
4212 * tests/regression.at (Conflicts): Rename as...
4213 (Unresolved SR Conflicts): this.
4214 (Solved SR Conflicts): New.
4215
4216 2001-11-12 Akim Demaille <akim@epita.fr>
4217
4218 * src/reduce.c (print_results): Rename as...
4219 (reduce_output): This.
4220 Output to OUT, passed as argument, instead of output_obstack.
4221 (dump_grammar): Likewise.
4222 (reduce_free): New.
4223 Also free V1.
4224 (reduce_grammar): No longer call reduce_output, since...
4225 * src/print.c (print_results): do it.
4226 * src/main.c (main): Call reduce_free;
4227
4228 2001-11-12 Akim Demaille <akim@epita.fr>
4229
4230 * src/conflicts.c (print_reductions): Accept OUT as argument.
4231 Output to it, not to output_obstack.
4232 * src/print.c (print_actions): Adjust.
4233
4234 2001-11-12 Akim Demaille <akim@epita.fr>
4235
4236 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
4237 the result instead of using...
4238 (src_total, rrc_total, src_count, rrc_count): Remove.
4239 (any_conflicts): Remove.
4240 (print_conflicts): Split into...
4241 (conflicts_print, conflicts_output): New.
4242 * src/conflicts.h: Adjust.
4243 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
4244 * src/print.c (print_grammar): Issue `\n' between two rules.
4245 * tests/regression.at (Conflicts): New.
4246 Reported by Tom Lane.
4247
4248 2001-11-12 Akim Demaille <akim@epita.fr>
4249
4250 * tests/regression.at (Invalid input): Remove, duplicate with
4251 ``Invalid input: 1''.
4252
4253 2001-11-12 Akim Demaille <akim@epita.fr>
4254
4255 * tests/torture.at (AT_DATA_STACK_TORTURE)
4256 (Exploding the Stack Size with Alloca)
4257 (Exploding the Stack Size with Malloc): New.
4258
4259 2001-11-12 Akim Demaille <akim@epita.fr>
4260
4261 * src/bison.simple (YYSTACK_REALLOC): New.
4262 (yyparse) [!yyoverflow]: Use it and free the old stack.
4263 Reported by Per Allansson.
4264
4265 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
4266
4267 * src/bison.simple: Define type yystype instead of YYSTYPE, and
4268 define CPP macro, which substitute YYSTYPE by yystype.
4269 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
4270 with yyltype/YYLTYPE. This allows inclusion of the generated
4271 header within the parser if the compiler, such as GGC, accepts
4272 multiple equivalent #defines.
4273 From Akim.
4274
4275 2001-11-05 Akim Demaille <akim@epita.fr>
4276
4277 * src/reader.c (symbols_output): New, extracted from...
4278 (packsymbols): here.
4279 (reader): Adjust.
4280
4281 2001-11-05 Akim Demaille <akim@epita.fr>
4282
4283 * src/lex.c (parse_percent_token): s/quotearg/quote/.
4284
4285 2001-11-05 Akim Demaille <akim@epita.fr>
4286
4287 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
4288 pattern.
4289
4290 2001-11-05 Akim Demaille <akim@epita.fr>
4291
4292 * src/options.h (struct option_table_struct): set_flags is void*.
4293 * src/options.c (longopts): Support `--output' and `%output'.
4294 (usage): Adjust.
4295 * src/lex.h (tok_setopt): Remove, replaced with...
4296 (tok_intopt, tok_stropt): these new guys.
4297 * src/lex.c (getopt.h): Not needed.
4298 (token_buffer, unlexed_token_buffer): Not const.
4299 (percent_table): Promote `-' over `_' in directive names.
4300 Active `%name-prefix', `file-prefix', and `output'.
4301 (parse_percent_token): Accept possible arguments to directives.
4302 Promote `-' over `_' in directive names.
4303
4304 2001-11-04 Akim Demaille <akim@epita.fr>
4305
4306 * doc/bison.texinfo (Decl Summary): Split the list into
4307 `directives for grammars' and `directives for bison'.
4308 Sort'em.
4309 Add description of `%name-prefix', `file-prefix', and `output'.
4310 Promote `-' over `_' in directive names.
4311 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
4312 Simplify the description of `--name-prefix'.
4313 Promote `-' over `_' in directive names.
4314 Promote `--output' over `--output-file'.
4315 Fix the description of `--defines'.
4316 * tests/output.at: Exercise %file-prefix and %output.
4317
4318 2001-11-02 Akim Demaille <akim@epita.fr>
4319
4320 * doc/refcard.tex: Update.
4321
4322 2001-11-02 Akim Demaille <akim@epita.fr>
4323
4324 * src/symtab.h (SUNDEF): New.
4325 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
4326 stand for `uninitialized', instead of 0.
4327 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
4328 * src/lex.c (lex): Adjust.
4329
4330 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
4331 Number it 0.
4332 Let yylex return it instead of a plain 0.
4333 Reported by Dick Streefland.
4334
4335 2001-11-02 Akim Demaille <akim@epita.fr>
4336
4337 * tests/regression.at (Mixing %token styles): New test.
4338
4339 2001-11-02 Akim Demaille <akim@epita.fr>
4340
4341 * src/reader.c (parse_thong_decl): Formatting changes.
4342 (token_translations_init): New, extracted from...
4343 (packsymbols): Here.
4344 Adjust.
4345
4346 2001-11-01 Akim Demaille <akim@epita.fr>
4347
4348 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
4349 Check that `9foo.y' produces correct cpp guards.
4350 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
4351 guards.
4352 Reported by Wwp.
4353
4354 2001-11-01 Akim Demaille <akim@epita.fr>
4355
4356 * tests/regression.at (Invalid input: 2): New.
4357 * src/lex.c (unlexed_token_buffer): New.
4358 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
4359 too.
4360 Reported by Wwp.
4361
4362 2001-11-01 Akim Demaille <akim@epita.fr>
4363
4364 * tests/calc.at: Catch up with 1.30.
4365 * configure.in: Bump to 1.49a.
4366 Adjust to newer Autotest.
4367
4368 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
4369
4370 * src/conflicts.c: Move global variables rrc_total and src_total ...
4371 (print_conflicts): here.
4372 * src/output.c (output): Free global variable user_toknums.
4373 * src/lex.c (token_obstack): Become static.
4374
4375 2001-10-18 Akim Demaille <akim@epita.fr>
4376
4377 * tests/atlocal.in (GCC): Add.
4378 * tests/calc.at: s/m4_match/m4_bmatch/.
4379 s/m4_patsubst/m4_bpatsubst/.
4380 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
4381 * configure.in: AC_SUBST(GCC).
4382
4383 2001-10-14 Marc Autret <autret_m@epita.fr>
4384
4385 * src/options.c (create_long_option_table): Fix.
4386
4387 2001-10-10 Akim Demaille <akim@epita.fr>
4388
4389 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
4390
4391 2001-10-04 Akim Demaille <akim@epita.fr>
4392
4393 * src/reader.c (parse_union_decl): Push the caracters in
4394 union_obstack, not attrs_obstack.
4395
4396 2001-10-04 Akim Demaille <akim@epita.fr>
4397
4398 Merge in the branch 1.29.
4399
4400 * src/reader.c (packsymbols): Use a temporary obstack for
4401 `%%tokendef', since output_stack is already used elsewhere.
4402
4403 2001-10-02 Akim Demaille <akim@epita.fr>
4404
4405 Bump 1.29d.
4406
4407 2001-10-02 Akim Demaille <akim@epita.fr>
4408
4409 Version 1.29c.
4410
4411 2001-10-02 Akim Demaille <akim@epita.fr>
4412
4413 * tests/regression.at (Invalid CPP headers): New.
4414 From Alexander Belopolsky.
4415 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
4416
4417 2001-10-02 Akim Demaille <akim@epita.fr>
4418
4419 * tests/regression.at (Invalid input): New.
4420 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
4421 Reported by Shura.
4422
4423 2001-10-02 Akim Demaille <akim@epita.fr>
4424
4425 * tests/calc.at: Now that --debug works, the tests must be adjusted.
4426
4427 2001-10-02 Akim Demaille <akim@epita.fr>
4428
4429 * src/output.c (output_parser): Assert `skeleton'.
4430 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
4431 systems.
4432 From Shura.
4433
4434 2001-10-01 Marc Autret <autret_m@epita.fr>
4435
4436 * src/lex.h: Echo modifications.
4437 * src/lex.c (unlex): Parameter is now token_t.
4438 From Hans Aberg.
4439
4440 2001-10-01 Marc Autret <autret_m@epita.fr>
4441
4442 * src/main.c: Include lex.h.
4443 From Hans Aberg.
4444
4445 2001-09-29 Akim Demaille <akim@epita.fr>
4446
4447 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
4448
4449 2001-09-28 Akim Demaille <akim@epita.fr>
4450
4451 * tests/testsuite.at: Update to newer Autotest.
4452 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
4453
4454 2001-09-27 Akim Demaille <akim@epita.fr>
4455
4456 Position independent wrapper.
4457
4458 * tests/bison: Remove.
4459 * tests/bison.in: New.
4460 * configure.in: Adjust.
4461
4462 2001-09-27 Paul Eggert <eggert@twinsun.com>
4463
4464 Port quotearg fixes from tar 1.13.24.
4465
4466 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
4467 tm to be declared.
4468 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
4469 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
4470
4471 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
4472 * m4/mbrtowc.m4: New file.
4473 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
4474 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
4475
4476 2001-09-27 Akim Demaille <akim@epita.fr>
4477
4478 Bump to 1.29c.
4479
4480 2001-09-27 Akim Demaille <akim@epita.fr>
4481
4482 Version 1.29b.
4483
4484 2001-09-25 Akim Demaille <akim@epita.fr>
4485
4486 * src/system.h: Include `xalloc.h'.
4487 Remove it from the C files.
4488 * src/files.c (output_files): Free the obstacks.
4489 * src/lex.c (init_lex): Rename as...
4490 (lex_init): this.
4491 (lex_free): New.
4492 * src/main.c (main): Use it.
4493
4494 2001-09-24 Marc Autret <autret_m@epita.fr>
4495
4496 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
4497 to output informations in fout (FILE*).
4498 (open_graph, close_graph): Likewise.
4499 (output_graph, output_edge, output_node): Likewise.
4500 * src/vcg.h: Update function prototypes.
4501 * src/print_graph.c (print_graph): Open output graph file.
4502 (print_actions): Adjust.
4503 * src/files.h: Remove extern declaration.
4504 * src/files.c: Remove graph_obstack declaration.
4505 (open_files): Remove graph_obstack initialization.
4506 (output_files): Remove graph_obstack saving.
4507
4508 2001-09-24 Marc Autret <autret_m@epita.fr>
4509
4510 * src/files.c (compute_output_file_names): Fix.
4511
4512 2001-09-24 Marc Autret <autret_m@epita.fr>,
4513 Akim Demaille <akim@epita.fr>
4514
4515 * src/reader.c (reader): Remove call to free_symtab ().
4516 * src/main.c (main): Call it here.
4517 Include symtab.h.
4518 * src/conflicts.c (initialize_conflicts): Rename as...
4519 (solve_conflicts): this.
4520 * src/print.c (print_core, print_actions, print_state)
4521 (print_grammar): Dump to a file instead a `output_obstack'.
4522 (print_results): Dump `output_obstack', and then proceed with the
4523 FILE *.
4524 * src/files.c (compute_output_file_names, close_files): New.
4525 (output_files): Adjust.
4526 * src/main.c (main): Adjust.
4527
4528 2001-09-23 Marc Autret <autret_m@epita.fr>
4529
4530 * src/files.c (compute_header_macro): Computes header macro name
4531 from spec_defines_file when given.
4532
4533 2001-09-23 Marc Autret <autret_m@epita.fr>
4534
4535 * src/files.c (output_files): Add default extensions.
4536
4537 2001-09-22 Akim Demaille <akim@epita.fr>
4538
4539 * src/conflicts.c (finalize_conflicts): Rename as...
4540 (free_conflicts): this.
4541
4542 2001-09-22 Akim Demaille <akim@epita.fr>
4543
4544 * src/gram.c (gram_free): Rename back as...
4545 (dummy): this.
4546 (output_token_translations): Free `token_translations'.
4547 * src/symtab.c (free_symtab): Free the tag field.
4548
4549 2001-09-22 Akim Demaille <akim@epita.fr>
4550
4551 Remove `translations' as it is always set to true.
4552
4553 * src/gram.h: Adjust.
4554 * src/reader.c (packsymbols, parse_token_decl): Adjust
4555 * src/print.c (print_grammar): Adjust.
4556 * src/output.c (output_token_translations): Adjust.
4557 * src/lex.c (lex): Adjust.
4558 * src/gram.c: Be sure the set pointers to NULL.
4559 (dummy): Rename as...
4560 (gram_free): this.
4561
4562 2001-09-22 Akim Demaille <akim@epita.fr>
4563
4564 * configure.in: Invoke AM_LIB_DMALLOC.
4565 * src/system.h: Use dmalloc.
4566 * src/LR0.c: Be sure to have pointers initialized to NULL.
4567 (allocate_itemsets): Allocate kernel_items only if needed.
4568
4569 2001-09-22 Akim Demaille <akim@epita.fr>
4570
4571 * configure.in: Bump to 1.29b.
4572 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
4573 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
4574 need xmalloc.c in calc.y.
4575 From Pascal Bart.
4576
4577 2001-09-21 Akim Demaille <akim@epita.fr>
4578
4579 Version 1.29a.
4580 * Makefile.maint, config/config.guess, config/config.sub,
4581 * config/missing: Update from masters.
4582 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
4583 upon package.m4.
4584 * configure.in (ALL_LINGUAS): Add `tr'.
4585
4586 2001-09-21 Akim Demaille <akim@epita.fr>
4587
4588 * tests/Makefile.am (package.m4): Move to...
4589 ($(srcdir)/$(TESTSUITE)): here.
4590
4591 2001-09-20 Akim Demaille <akim@epita.fr>
4592
4593 * src/complain.c: No longer try to be standalone: use system.h.
4594 Don't assume __STDC__ is defined to 1. Just test if it is defined.
4595 * src/complain.h: Likewise.
4596 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
4597 Remove the unused variable `n'.
4598 From Albert Chin-A-Young.
4599
4600 2001-09-18 Marc Autret <autret_m@epita.fr>
4601
4602 * doc/bison.1: Update.
4603 * doc/bison.texinfo (Bison Options): Update --defines and --graph
4604 descriptions.
4605 (Option Cross Key): Update.
4606 Add --graph.
4607
4608 2001-09-18 Marc Autret <autret_m@epita.fr>
4609
4610 * tests/regression.at: New test (comment in %union).
4611
4612 2001-09-18 Marc Autret <autret_m@epita.fr>
4613
4614 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
4615 do that.
4616 Reported by Keith Browne.
4617
4618 2001-09-18 Marc Autret <autret_m@epita.fr>
4619
4620 * tests/output.at: Add tests for --defines and --graph.
4621
4622 2001-09-18 Marc Autret <autret_m@epita.fr>
4623
4624 * tests/output.at: Removes tests of %{header,src}_extension features.
4625
4626 2001-09-18 Akim Demaille <akim@epita.fr>
4627
4628 * tests/Makefile.am (package.m4): New.
4629 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
4630 (_AT_CHECK_CALC_ERROR): Likewise.
4631 Factor the `, ' part of verbose error messages.
4632
4633 2001-09-18 Marc Autret <autret_m@epita.fr>
4634
4635 * src/getargs.c (longopts): Declare --defines and --graph as options
4636 with optional arguments.
4637 * src/files.h: Add extern declarations.
4638 * src/files.c (spec_graph_file, spec_defines_file): New.
4639 (output_files): Update.
4640 Remove CPP-outed code.
4641
4642 2001-09-18 Marc Autret <autret_m@epita.fr>
4643
4644 Turn off %{source,header}_extension feature.
4645
4646 * src/files.c (compute_exts_from_gf): Update.
4647 (compute_exts_from_src): Update.
4648 (output_files): CPP-out useless code.
4649 * src/files.h: Remove {header,source}_extension extern declarations.
4650 * src/reader.c (parse_dquoted_param): CPP-out.
4651 (parse_header_extension_decl): Remove.
4652 (parse_source_extension_decl): Remove.
4653 (read_declarations): Remove cases tok_{hdrext,srcext}.
4654 * src/lex.c (percent_table): Remove {header,source}_extension entries.
4655 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
4656
4657 2001-09-10 Akim Demaille <akim@epita.fr>
4658
4659 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
4660 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
4661 (AT_CHECK_OUTPUT): this.
4662 Merely check ls' exit status, its output is useless.
4663
4664 2001-09-10 Akim Demaille <akim@epita.fr>
4665
4666 * tests/calc.at: Use m4_match.
4667 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
4668
4669 2001-09-10 Marc Autret <autret_m@epita.fr>,
4670 Akim Demaille <akim@epita.fr>
4671
4672 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
4673 enum color_e.
4674 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
4675 to `normal'.
4676 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
4677 * src/lex.h: Adjust prototype.
4678 (token_t): Add `tok_undef'.
4679 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
4680 (parse_percent_token): Now returns token_t.
4681 Add default statement in switch.
4682 (lex): Separate `c' as an input variable, from the token_t result
4683 part.
4684 (unlexed): Is a token_t.
4685
4686 2001-09-10 Akim Demaille <akim@epita.fr>
4687
4688 * configure.in: Bump to 1.29a.
4689
4690 2001-09-07 Akim Demaille <akim@epita.fr>
4691
4692 Version 1.29.
4693
4694 2001-08-30 Akim Demaille <akim@epita.fr>
4695
4696 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
4697 * m4/atconfig.m4: Remove.
4698 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
4699 * tests/bison: New.
4700 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
4701 m4_if, m4_patsubst, and m4_regexp.
4702 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
4703 `input' file instead of echo.
4704
4705 2001-08-29 Akim Demaille <akim@epita.fr>
4706
4707 Bump to 1.28e.
4708
4709 2001-08-29 Akim Demaille <akim@epita.fr>
4710
4711 Version 1.28d.
4712
4713 2001-08-29 Paul Eggert <eggert@twinsun.com>
4714
4715 * src/bison.simple (yyparse): Don't take the address of an
4716 item before the start of an array, as that doesn't conform to
4717 the C Standard.
4718
4719 2001-08-29 Robert Anisko <anisko_r@epita.fr>
4720
4721 * doc/bison.texinfo (Location Tracking Calc): New node.
4722
4723 2001-08-29 Paul Eggert <eggert@twinsun.com>
4724
4725 * src/output.c (output): Do not define const, as this now
4726 causes more problems than it cures.
4727
4728 2001-08-29 Akim Demaille <akim@epita.fr>
4729
4730 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
4731 the nodes.
4732 Be sure to tag the `detailmenu'.
4733
4734 2001-08-29 Akim Demaille <akim@epita.fr>
4735
4736 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
4737 download in a tmp dir.
4738
4739 2001-08-28 Marc Autret <autret_m@epita.fr>
4740
4741 * config/depcomp: New file.
4742
4743 2001-08-28 Marc Autret <autret_m@epita.fr>
4744
4745 * doc/bison.1 (mandoc): Adjust.
4746 From Juan Manuel Guerrero.
4747
4748 2001-08-28 Marc Autret <autret_m@epita.fr>
4749
4750 * src/print_graph.c (print_state): Fix.
4751
4752 2001-08-27 Marc Autret <autret_m@epita.fr>
4753
4754 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
4755 char * members.
4756 Echo modifications to the functions prototypes.
4757 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
4758
4759 2001-08-27 Marc Autret <autret_m@epita.fr>
4760
4761 * src/vcg.c: Include `xalloc.h'.
4762 (add_colorentry): New.
4763 (add_classname): New.
4764 (add_infoname): New.
4765 * src/vcg.h: Add new prototypes.
4766
4767 2001-08-27 Akim Demaille <akim@epita.fr>
4768
4769 * Makefile.maint: Sync. again with CVS Autoconf.
4770
4771 2001-08-27 Akim Demaille <akim@epita.fr>
4772
4773 * Makefile.maint: Formatting changes.
4774 (po-update, cvs-update, update): New targets.
4775 (AMTAR): Remove.
4776
4777 2001-08-27 Akim Demaille <akim@epita.fr>
4778
4779 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
4780 * Makefile.maint: Sync. with CVS Autoconf.
4781
4782 2001-08-27 Marc Autret <autret_m@epita.fr>
4783
4784 * src/vcg.h (struct infoname_s): New.
4785 (struct colorentry_s): New.
4786 (graph_s): New fields {vertical,horizontal}_order in structure.
4787 Add `infoname' field.
4788 Add `colorentry' field;
4789 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
4790 (G_HORIZONTAL_ORDER): New.
4791 (G_INFONAME): New.
4792 (G_COLORENTRY): New.
4793 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
4794 Add output of `infoname'.
4795 Add output of `colorentry'.
4796
4797 2001-08-27 Marc Autret <autret_m@epita.fr>
4798
4799 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
4800 This one shadowed a global parameter.
4801
4802 2001-08-24 Marc Autret <autret_m@epita.fr>
4803
4804 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
4805 instead of `unsigned'.
4806 (print_state): Do not call obstack_object_size () in obstack_grow ()
4807 to avoid macro variables shadowing.
4808
4809 2001-08-23 Marc Autret <autret_m@epita.fr>
4810
4811 * src/lex.c (percent_table): Typo: s/naem/name/.
4812 Add graph option.
4813 Normalize new options declarations.
4814
4815 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
4816
4817 * tests/suite.at: Exercise %header_extension and %source_extension.
4818
4819 2001-08-16 Marc Autret <autret_m@epita.fr>
4820
4821 * src/reader.c (parse_dquoted_param): New.
4822 (parse_header_extension_decl): Use it.
4823 (parse_source_extension_decl): Likewise.
4824
4825 2001-08-16 Marc Autret <autret_m@epita.fr>
4826
4827 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
4828 (get_xxxx_str): Use assert () instead of complain ().
4829 Remove return invokations in default cases.
4830 (get_decision_str): Modify default behaviour. Remove second argument.
4831 Echo modifications on calls.
4832 (output_graph): Fix.
4833
4834 2001-08-16 Marc Autret <autret_m@epita.fr>
4835
4836 * src/getargs.c (usage): Update with ``-g, --graph''.
4837
4838 2001-08-16 Marc Autret <autret_m@epita.fr>
4839
4840 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
4841 (Option Cross Key): Likewise.
4842 * doc/bison.1: Update.
4843
4844 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
4845
4846 * src/output.c (output_master_parser): Don't finish action_obstack.
4847 (output_parser): Don't care about the muscle action, here.
4848 (prepare): Copy the action_obstack in the action muscle.
4849 (output): Free action_obstack.
4850
4851 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
4852
4853 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
4854 will contain `%union' declaration.
4855 (parse_union_decl): Delete #line directive output.
4856 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
4857 informations about %union.
4858 (parse_union_decl): Copy the union_obstack in the muscle stype.
4859 * src/bison.simple: Add new #line directive.
4860 Add typdef %%stype YYSTYPE.
4861
4862 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
4863
4864 * src/bison.simple: Add new `#line' directive.
4865
4866 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
4867
4868 * src/bison.simple: New `#line' directive.
4869 * src/output.c (output_parser): Support new dynamic muscle input_line.
4870
4871 2001-09-22 Marc Autret <autret_m@epita.fr>
4872
4873 * src/output.c (output_master_parser): New.
4874 (output_parser): Be more re-entrant.
4875
4876 2001-09-21 Marc Autret <autret_m@epita.fr>
4877
4878 * src/reader.c (copy_definition, parse_union_decl): Update and use
4879 `linef' muscle.
4880 (copy_action): Likewise.
4881 Use obstack_1grow ().
4882 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
4883
4884 2001-09-21 Marc Autret <autret_m@epita.fr>
4885
4886 * src/options.c (option_table): Adjust.
4887 * src/lex.c (parse_percent_token): Fix.
4888
4889 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
4890
4891 * src/options.c (symtab.h): Include it, need by lex.h.
4892
4893 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
4894
4895 * src/lex.c (parse_percent_token): Change type of variable `tx', which
4896 is now an option_table_struct*.
4897 (option_strcmp): New function option_strcmp.
4898 (parse_percent_token): Call option_strcmp.
4899 * src/getargs.c (xalloc.h, options.h): Include it.
4900 (getargs): Call create_long_option_table.
4901 (getargs): Free longopts at the end of the function.
4902 (shortopts): Move in options.c.
4903 * src/options.c (create_long_option_table): New function. Convert
4904 information from option_table to option structure.
4905 * src/reader.c (options.h): Include it.
4906
4907 * src/Makefile.am: Adjust.
4908 * src/options.c (option_table): Create from longopts and percent_table.
4909 * src/getargs.c (longopts): Delete.
4910 * src/lex.c (struct percent_table_struct): Delete.
4911 (percent_table): Delete.
4912 (options.h): Include it.
4913 * src/options.c: Create.
4914 * src/options.h: Create.
4915 Declare enum opt_access_e.
4916 Define struct option_table_struct.
4917
4918 2001-09-20 Marc Autret <autret_m@epita.fr>
4919
4920 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
4921 sections of Bison.
4922
4923 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
4924
4925 * src/bison.simple: s/%%filename/%%skeleton.
4926 * src/muscle_tab.c (getargs.h): Include it.
4927 (muscle_init): Insert new muscle skeleton.
4928
4929 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
4930
4931 * src/output.c (output_parser): Delete unused variable actions_dumped.
4932
4933 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
4934
4935 * src/output.c (output): Delete call to reader_output_yylsp.
4936 * src/reader.c (reader): Likewise.
4937 * src/reader.h: Delete declaration of reader_output_yylsp.
4938
4939 2001-09-02 Marc Autret <autret_m@epita.fr>
4940
4941 * src/reader.c: Include muscle_tab.h.
4942 (parse_union_decl): Update.
4943 (parse_macro_decl): Rename parse_muscle_decl.
4944 Update to use renamed functions and variable.
4945 (read_declarations, copy_action, read_additionnal_code, : Updated
4946 with correct variables and functions names.
4947 (packsymbols, reader): Likewise.
4948
4949 * src/reader.h (muscle_obstack): Extern declaration update.
4950
4951 * src/output.c: Include muscle_tab.h
4952 In all functions using macro_insert, change by using muscle_insert ().
4953 (macro_obstack): Rename muscle_obstack.
4954 Echo modifications in the whole file.
4955 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
4956 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
4957 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
4958
4959 * src/muscle_tab.h: Update double inclusion macros.
4960 (macro_entry_s): Rename muscle_entry_s.
4961 Update prototypes.
4962
4963 * src/muscle_tab.c: Include muscle_tab.h.
4964 Rename macro_tabble to muscle_table.
4965 (mhash1, mhash2, mcmp): Use muscle_entry.
4966 (macro_init): Rename muscle_init. Update.
4967 (macro_insert): Rename muscle_insert. Update.
4968 (macro_find): Rename muscle_find. Update.
4969
4970 * src/main.c: Include muscle_tab.h.
4971 (main): Call muscle_init ().
4972 * src/Makefile.am (bison_SOURCES): Echo modifications.
4973
4974 2001-09-02 Marc Autret <autret_m@epita.fr>
4975
4976 Now the files macro_tab.[ch] are named muscle_tab.[ch].
4977
4978 * src/muscle_tab.c, src/muscle_tab.h: Add files.
4979
4980 2001-09-02 Marc Autret <autret_m@epita.fr>
4981
4982 * src/macrotab.c, src/macrotab.h: Remove.
4983
4984 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
4985
4986 * src/reader.c (copy_guard): Use muscle to specify the `#line'
4987 filename.
4988
4989 2001-09-01 Marc Autret <autret_m@epita.fr>
4990
4991 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
4992 to an explicit value to activate the feature. We do it here.
4993
4994 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
4995
4996 * src/output.c (prepare): Delete the `filename' muscule insertion.
4997 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
4998 (parse_union_decl): Likewise.
4999 * src/macrotab.c (macro_init): Initialize filename by infile.
5000
5001 2001-08-31 Marc Autret <autret_m@epita.fr>
5002
5003 * src/bison.simple (YYLSP_NEEDED): New definition.
5004 * src/output.c (prepare): Add macro insertion of `locations_flag'
5005
5006 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
5007
5008 * src/output.c (prepare): Delete insertion of previous muscles,
5009 and insert the `prefix' muscles.
5010 * src/macrotab.c (macro_init): Likewise.
5011 (macro_init): Initialization prefix directive by `yy'.
5012 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
5013 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
5014 yylval, yydebug, yyerror, yynerrs and yyparse.
5015 New directive `#define' to substitute yydebug, ... with option
5016 name_prefix.
5017
5018 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
5019
5020 * src/main.c (main): Standardize.
5021 * src/output.c (output_table_data, output_parser): Likewise.
5022 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
5023
5024 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
5025
5026 * src/reader.c (read_additionnal_code): Rename %%user_code to
5027 %%epilogue.
5028 * src/output.c (output): Rename %%declarations to %%prologue.
5029 * src/bison.simple: Echo modifications.
5030
5031 2001-08-31 Marc Autret <autret_m@epita.fr>
5032
5033 * src/reader.c (readgram): CleanUp.
5034 (output_token_defines): Likewise.
5035 (packsymbols): Likewise.
5036 (reader): Likewise.
5037 * src/output.c (output): CPP-out useless code.
5038
5039 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
5040
5041 * src/reader.c (reader): Delete obsolete call to function
5042 output_trailers and output_headers.
5043 * src/output.h: Remove obsolete functions prototypes of output_headers
5044 and output_trailers.
5045
5046 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
5047
5048 * src/main.c: Include macrotab.h.
5049 * src/macrotab.h (macro_entry_s): Constify fields.
5050 Adjust functions prototypes.
5051 * src/macrotab.c (macro_insert): Constify key and value.
5052 (macro_find): Constify key.
5053 (macro_insert): Include 'xalloc.h'
5054 (macro_insert): Use XMALLOC.
5055 (macro_find): Constify return value.
5056 * src/output.c (output_table_data): Rename table to table_data.
5057 (output_parser): Constify macro_key, macro_value.
5058
5059 2001-08-30 Marc Autret <autret_m@epita.fr>
5060
5061 * src/reader.c (parse_skel_decl): New.
5062 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
5063 * src/lex.h (token_t): New token `tok_skel'.
5064 * src/lex.c (percent_table): Add skeleton option entry.
5065 Standardize.
5066
5067 2001-08-29 Marc Autret <autret_m@epita.fr>
5068
5069 * src/bison.simple: Add %%user_code directive at the end.
5070 * src/reader.c (read_additionnal_code): New.
5071 (reader): Use it.
5072 * src/output.c (output_program): Remove.
5073 (output): Update.
5074
5075 2001-08-28 Marc Autret <autret_m@epita.fr>
5076
5077 * src/output.c (output_actions): Clean up.
5078 (output_gram): CPP-out useless code.
5079 * src/reader.c (reader): Clean up, CPP-out useless code.
5080
5081 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
5082
5083 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
5084 directive.
5085 * src/bison.simple: Add `%%definitions'.
5086
5087 2001-08-28 Marc Autret <autret_m@epita.fr>
5088
5089 * config/depcomp: New file.
5090
5091 2001-08-27 Paul Eggert <eggert@twinsun.com>
5092
5093 * src/bison.simple (yyparse): Don't take the address of an
5094 item before the start of an array, as that doesn't conform to
5095 the C Standard.
5096
5097 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
5098
5099 * src/output.c (output): Remove the initialization of the macro
5100 obstack. It was done too late here.
5101
5102 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
5103 completely wrong.
5104 (reader): Initialize the macro obstack here, since we need it to grow
5105 '%define' directives.
5106
5107 * src/reader.h: Declare the macro obstack as extern.
5108
5109 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
5110
5111 * src/output.c (output_parser): Fix. Store single '%' characters in
5112 the output obstack instead of throwing them away.
5113
5114 2001-08-27 Akim Demaille <akim@epita.fr>
5115
5116 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
5117
5118 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5119
5120 * lib/Makefile.am: Adjust.
5121
5122 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5123
5124 * src/bison.simple: Update and add '%%' directives.
5125
5126 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5127
5128 * src/reader.c (reader): Remove calls to 'output_headers' and
5129 'output_trailers'. Remove some C output.
5130 (readgram): Disable a piece of code that was writing a default
5131 definition for 'YYSTYPE'.
5132 (reader_output_yylsp): Remove.
5133 (packsymbols): Output token defintions to a macro.
5134 (copy_definition): Disable C output.
5135
5136 * src/reader.c (parse_macro_decl): New function used to parse macro
5137 declarations.
5138 (copy_string2): Put the body of copy_string into this new function.
5139 Add a parameter to let the caller choose whether he wants to copy the
5140 string delimiters or not.
5141 (copy_string): Be a simple call to copy_string2 with the last argument
5142 bound to true.
5143 (read_declarations): Add case for macro definition.
5144 (copy_identifier): New.
5145 (parse_macro_decl): Read macro identifiers using copy_identifier
5146 rather than lex.
5147
5148 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5149
5150 * src/output.c (prepare): Add prefixed names.
5151 (output_parser): Output semantic actions.
5152 (output_parser): Fix bug on '%%line' directives.
5153
5154 * src/output.c (output_headers): Remove. The C code printed by this
5155 function should now be in the skeletons.
5156 (output_trailers): Remove.
5157 (output): Disable call to 'reader_output_yylsp'.
5158 (output_rule_data): Do not output tables to the table obstack.
5159
5160 * src/output.c: Remove some C dedicated output.
5161 Improve the use of macro and output obstacks.
5162 (output_defines): Remove.
5163
5164 * src/output.c (output_token_translations): Associate 'translate'
5165 table with a macro. No output to the table obstack.
5166 (output_gram): Same for 'rhs' and 'prhs'.
5167 (output_stos): Same for 'stos'.
5168 (output_rule_data): Same for 'r1' and 'r2'.
5169 (token_actions): Same for 'defact'.
5170 (goto_actions): Same for 'defgoto'.
5171 (output_base): Same for 'pact' and 'pgoto'.
5172 (output_table): Same for 'table'.
5173 (output_check): Same for 'check'.
5174
5175 * src/output.c (output_table_data): New function.
5176 (output_short_table): Remove.
5177 (output_short_or_char_table): Remove.
5178
5179 * src/output.c (output_parser): Replace most of the skeleton copy code
5180 with something new. Skeletons are now processed character by character
5181 rather than line by line, and Bison looks for '%%' macros. This is the
5182 first step in making Bison's output process (a lot) more flexible.
5183 (output_parser): Use the macro table.
5184
5185 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5186
5187 * src/main.c (main): Initialize the macro table.
5188
5189 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5190
5191 * src/lex.c (percent_table): Add tok_define.
5192 * src/lex.h: Add tok_define.
5193
5194 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5195
5196 * src/macrotab.c: New file.
5197 * src/macrotab.h: New file.
5198 * src/Makefile.am: Update.
5199
5200 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5201
5202 * lib/hash.c: New file.
5203 * lib/hash.h: New file.
5204 * lib/Makefile.am: Update.
5205
5206 2001-08-15 Akim Demaille <akim@epita.fr>
5207
5208 Version 1.28c.
5209
5210 2001-08-15 Marc Autret <autret_m@epita.fr>
5211
5212 * src/reader.c (readgram): Indent output macro YYSTYPE.
5213 (packsymbols): Likewise.
5214 (output_token_defines): Likewise.
5215 * src/files.c: Standardize.
5216 (compute_header_macro): New.
5217 (defines_obstack_save): New. Use compute_header_macro.
5218 (output_files): Update. Use defines_obstack_save.
5219
5220 2001-08-15 Akim Demaille <akim@epita.fr>
5221
5222 * doc/bison.texinfo (Table of Symbols): Document
5223 YYSTACK_USE_ALLOCA.
5224
5225 2001-08-15 Akim Demaille <akim@epita.fr>
5226
5227 * missing: Update from CVS Automake.
5228 * config/config.guess, config/config.sub, config/texinfo.tex:
5229 Update from gnu.org.
5230
5231 2001-08-15 Akim Demaille <akim@epita.fr>
5232
5233 * Makefile.maint: Sync with CVS Autoconf.
5234
5235 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
5236
5237 * doc/bison.texinfo: Include GNU Free Documentation License from
5238 `fdl.texi'.
5239 * doc/fdl.texi: Add to package.
5240
5241 2001-08-14 Marc Autret <autret_m@epita.fr>
5242
5243 Turn on %{source,header}_extension features.
5244
5245 * src/lex.c (percent_table): Un-CPP out header_extension and
5246 source_extension.
5247 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
5248 (compute_exts_from_src): Remove conditions. It restores priorities
5249 between options.
5250
5251 2001-08-14 Marc Autret <autret_m@epita.fr>
5252
5253 * src/files.c (compute_base_names): Add extensions computing when
5254 `--file-prefix' used.
5255 Standardize function calls.
5256
5257 2001-08-13 Marc Autret <autret_m@epita.fr>
5258
5259 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
5260 defining it (defined but null disables alloca).
5261
5262 2001-08-13 Marc Autret <autret_m@epita.fr>
5263
5264 * src/bison.simple (_yy_memcpy): CPP reformat.
5265
5266 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
5267
5268 * tests/atconfig.in (CPPFLAGS): Fix.
5269
5270 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
5271
5272 * doc/bison.texinfo: Include GNU General Public License from
5273 `gpl.texi'.
5274 * doc/gpl.texi: Add to package.
5275
5276 2001-08-10 Marc Autret <autret_m@epita.fr>
5277
5278 * src/print_graph.h: Fix.
5279 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
5280
5281 2001-08-10 Akim Demaille <akim@epita.fr>
5282
5283 * src/system.h: Provide default declarations for stpcpy, strndup,
5284 and strnlen.
5285
5286 2001-08-10 Robert Anisko <anisko_r@epita.fr>
5287
5288 * doc/bison.texinfo (Locations): Update @$ stuff.
5289
5290 2001-08-09 Robert Anisko <anisko_r@epita.fr>
5291
5292 * src/bison.simple (YYLLOC_DEFAULT): Update.
5293 (yyparse): Adjust.
5294
5295 2001-08-08 Marc Autret <autret_m@epita.fr>
5296
5297 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
5298 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
5299 Reported by Fabrice Bauzac.
5300
5301 2001-08-08 Marc Autret <autret_m@epita.fr>
5302
5303 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
5304 * src/vcg.c (output_node): Fix.
5305 * src/vcg.h: Cleanup.
5306 * src/print_graph.c: Add comments.
5307 (node_output_size): New global variable. Simplify the formatting of
5308 the VCG graph output.
5309 (print_actions): Unused code is now used. It notifies the final state
5310 and no action states in the VCG graph. It also give the reduce actions.
5311 The `shift and goto' edges are red and the `go to state' edges are
5312 blue.
5313 Get the current node name and node_obstack by argument.
5314 (node_obstack): New variable.
5315 (print_state): Manage node_obstack.
5316 (print_core): Use node_obstack given by argument.
5317 A node is not only computed here but in print_actions also.
5318 (print_graph): CPP out useless code instead of commenting it.
5319
5320 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
5321
5322 * tests/atconfig.in (CPPFLAGS): Fix.
5323
5324 2001-08-07 Akim Demaille <akim@epita.fr>
5325
5326 * src/print_graph.c (quote): New.
5327 (print_core): Use it.
5328
5329 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
5330
5331 * src/vcg.c (complain.h): Include it.
5332 Unepitaize `return' invocations.
5333 [NDEBUG] (main): Remove.
5334 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
5335 * src/files.c (open_files): Initialize graph_obstack.
5336 * src/print_graph.c (print_actions): CPP out useless code.
5337 (print_core): Don't output the last `\n' in labels.
5338 Use `quote'.
5339 * src/files.c (output_files): Output the VCG file.
5340 * src/main.c (main): Invoke print_graph ();
5341
5342 2001-08-06 Marc Autret <autret_m@epita.fr>
5343
5344 Automaton VCG graph output.
5345 Using option ``-g'' or long option ``--graph'', you can generate
5346 a gram_filename.vcg file containing a VCG description of the LALR (1)
5347 automaton of your grammar.
5348
5349 * src/main.c: Call to print_graph() function.
5350 * src/getargs.h: Update.
5351 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
5352 (graph_flag): New flag.
5353 (longopts): Update.
5354 (getargs): Add case `g'.
5355 * src/files.c (graph_obstack): New obstack struct.
5356 (open_files): Initialize new obstack.
5357 (output_files): Saves graph_obstack if required.
5358 * src/files.h (graph_obstack): New extern declaration.
5359 * src/Makefile.am: Add new source files.
5360
5361 2001-08-06 Marc Autret <autret_m@epita.fr>
5362
5363 * src/print_graph.c, src/print_graph.h (graph): New.
5364 * src/vcg.h: New file.
5365 * src/vcg.c: New file, VCG graph handling.
5366
5367 2001-08-06 Marc Autret <autret_m@epita.fr>
5368
5369 Add of %source_extension and %header_extension which specify
5370 the source or/and the header output file extension.
5371
5372 * src/files.c (compute_base_names): Remove initialisation of
5373 src_extension and header_extension.
5374 (compute_exts_from_gf): Update.
5375 (compute_exts_from_src): Update.
5376 (output_files): Update.
5377 * src/reader.c (parse_header_extension_decl): New.
5378 (parse_source_extension_decl): New.
5379 (read_declarations): New case statements for the new tokens.
5380 * src/lex.c (percent_table): Add entries for %source_extension
5381 and %header_extension.
5382 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
5383
5384 2001-08-06 Marc Autret <autret_m@epita.fr>
5385
5386 * configure.in: Bump to 1.28c.
5387 * doc/bison.texinfo: Texinfo thingies.
5388
5389 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
5390
5391 * tests/atconfig.in (CPPFLAGS): Add.
5392 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
5393
5394 2001-08-03 Akim Demaille <akim@epita.fr>
5395
5396 Version 1.28b.
5397
5398 2001-08-03 Akim Demaille <akim@epita.fr>
5399
5400 * tests/Makefile.am (check-local): Ship testsuite.
5401 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
5402 Include `string.h'.
5403
5404 2001-08-03 Akim Demaille <akim@epita.fr>
5405
5406 * configure.in: Try using -Wformat when compiling.
5407
5408 2001-08-03 Akim Demaille <akim@epita.fr>
5409
5410 * configure.in: Bump to 1.28b.
5411
5412 2001-08-03 Akim Demaille <akim@epita.fr>
5413
5414 * src/complain.c: Adjust strerror_r portability issues.
5415
5416 2001-08-03 Akim Demaille <akim@epita.fr>
5417
5418 Version 1.28a.
5419
5420 2001-08-03 Akim Demaille <akim@epita.fr>
5421
5422 * src/getargs.c, src/getarg.h (skeleton)): Constify.
5423 * src/lex.c (literalchar): Avoid name clashes on `buf'.
5424 * src/getargs.c: Include complain.h.
5425 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
5426 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
5427
5428 2001-08-03 Akim Demaille <akim@epita.fr>
5429
5430 * src/reader.c (readgram): Display hidden chars in error messages.
5431
5432 2001-08-03 Akim Demaille <akim@epita.fr>
5433
5434 Update to gettext 0.10.39.
5435
5436 2001-08-03 Akim Demaille <akim@epita.fr>
5437
5438 * lib/strspn.c: New.
5439
5440 2001-08-01 Marc Autret <autret_m@epita.fr>
5441
5442 * doc/bison.texinfo: Update.
5443 * doc/bison.1 (mandoc): Update.
5444 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
5445 * src/files.c: Support output files extensions computing.
5446 (src_extension): New static variable.
5447 (header_extension): New static variable.
5448 (tr): New function.
5449 (get_extension_index): New function, gets the index of an extension
5450 filename in a string.
5451 (compute_exts_from_gf): New function, computes extensions from the
5452 grammar file extension.
5453 (compute_exts_from_src): New functions, computes extensions from the
5454 C source file extension, file given by ``-o'' option.
5455 (compute_base_names): Update.
5456 (output_files): Update.
5457
5458 2001-08-01 Robert Anisko <anisko_r@epita.fr>
5459
5460 * doc/bison.texi: Document @$.
5461 (Locations): New section.
5462
5463 2001-07-18 Akim Demaille <akim@epita.fr>
5464
5465 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
5466 * config/prev-version.txt, config/move-if-change: New.
5467 * Makefile.am: Adjust.
5468
5469 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
5470
5471 * src/bison.simple (yyparse): Suppress warning `comparaison
5472 between signed and unsigned'.
5473
5474 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
5475
5476 * src/getargs.h (raw_flag): Remove.
5477 * src/getargs.c: Die on `-r'/`--raw'.
5478 * src/lex.c (parse_percent_token): Die on `%raw'.
5479 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
5480 * tests/calc.at: Suppress test with option `--raw'.
5481
5482 2001-07-14 Akim Demaille <akim@epita.fr>
5483
5484 * config/: New.
5485 * configure.in: Require Autoconf 2.50.
5486 Update to gettext 0.10.38.
5487
5488 2001-03-16 Akim Demaille <akim@epita.fr>
5489
5490 * doc/bison.texinfo: ANSIfy the examples.
5491
5492 2001-03-16 Akim Demaille <akim@epita.fr>
5493
5494 * getargs.c (skeleton): New variable.
5495 (longopts): --skeleton is a new option.
5496 (shortopts, getargs): -S is a new option.
5497 * getargs.h: Declare skeleton.
5498 * output.c (output_parser): Use it.
5499
5500 2001-03-16 Akim Demaille <akim@epita.fr>
5501
5502 * m4/strerror_r.m4: New.
5503 * m4/error.m4: Run AC_FUNC_STRERROR_R.
5504 * lib/error.h, lib/error.c: Update.
5505
5506 2001-03-16 Akim Demaille <akim@epita.fr>
5507
5508 * src/getargs.c (longopts): Clean up.
5509
5510 2001-02-21 Akim Demaille <akim@epita.fr>
5511
5512 * src/reader.c (gensym): `gensym_count' is your own.
5513 Use a static buf to create the symbol name, as token_buffer is no
5514 longer a buffer.
5515
5516 2001-02-08 Akim Demaille <akim@epita.fr>
5517
5518 * src/conflicts.c (conflict_report): Be sure not to append to res
5519 between two calls, which could happen if both first sprintf were
5520 skipped, but not the first cp += strlen.
5521
5522 2001-02-08 Akim Demaille <akim@epita.fr>
5523
5524 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
5525 New, from fileutils 4.0.37.
5526 * configure.in: Require Autoconf 2.49c. I took some time before
5527 making this decision. This is the only way out for portability
5528 issues in Bison, it would mean way too much duplicate effort to
5529 import in Bison features implemented in 2.49c since 2.13.
5530 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
5531
5532 2001-02-02 Akim Demaille <akim@epita.fr>
5533
5534 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
5535 * lib/xalloc.h, lib/xmalloc.c: Update.
5536
5537 2001-01-19 Akim Demaille <akim@epita.fr>
5538
5539 Get rid of the ad hoc handling of token_buffer in the scanner: use
5540 the obstacks.
5541
5542 * src/lex.c (token_obstack): New.
5543 (init_lex): Initialize it. No longer call...
5544 (grow_token_buffer): this. Remove it.
5545 Adjust all the places which used it to use the obstack.
5546
5547 2001-01-19 Akim Demaille <akim@epita.fr>
5548
5549 * src/lex.h: Rename all the tokens:
5550 s/\bENDFILE\b/tok_eof/g;
5551 s/\bIDENTIFIER\b/tok_identifier/g;
5552 etc.
5553 Let them be enums, not #define, to ease debugging.
5554 Adjust all the code.
5555
5556 2001-01-18 Akim Demaille <akim@epita.fr>
5557
5558 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
5559 * src/lex.c (maxtoken, grow_token_buffer): Static.
5560
5561 2001-01-18 Akim Demaille <akim@epita.fr>
5562
5563 Since we now use obstacks, more % directives can be enabled.
5564
5565 * src/lex.c (percent_table): Also accept `%yacc',
5566 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
5567 `%debug'.
5568 Handle the actions for `%semantic_parser' and `%pure_parser' here,
5569 instead of returning a token.
5570 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
5571 * src/reader.c (read_declarations): Adjust.
5572 * src/files.c (open_files): Don't call `compute_base_names', don't
5573 compute `attrsfile' since they depend upon data which might be
5574 *in* the input file now.
5575 (output_files): Do it here.
5576 * src/output.c (output_headers): Document the fact that this patch
5577 introduces a guaranteed SEGV for semantic parsers.
5578 * doc/bison.texinfo: Document them.
5579 * tests/suite.at: Exercise these %options.
5580
5581 2000-12-20 Akim Demaille <akim@epita.fr>
5582
5583 Also handle the output file (--verbose) with obstacks.
5584
5585 * files.c (foutput): Remove.
5586 (output_obstack): New.
5587 Adjust all dependencies.
5588 * src/conflicts.c: Return a string.
5589 * src/system.h (obstack_grow_string): Rename as...
5590 (obstack_sgrow): this. Be ready to work with non literals.
5591 (obstack_fgrow4): New.
5592
5593 2000-12-20 Akim Demaille <akim@epita.fr>
5594
5595 * src/files.c (open_files): Fix the computation of short_base_name
5596 in the case of `-o foo.tab.c'.
5597
5598 2000-12-20 Akim Demaille <akim@epita.fr>
5599
5600 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
5601 (copy_dollar): Now that everything uses obstacks, get rid of the
5602 FILE * parameters.
5603
5604 2000-12-20 Akim Demaille <akim@epita.fr>
5605
5606 * src/files.c (open_files): Actually the `.output' file is based
5607 on the short_base_name, not base_name.
5608 * tests/suite.at (Checking output file names): Adjust.
5609
5610 2000-12-20 Akim Demaille <akim@epita.fr>
5611
5612 * src/bison.s1: Remove, we now use directly...
5613 * src/bison.simple: this.
5614 * src/Makefile.am: Use pkgdata instead of data.
5615
5616 2000-12-20 Akim Demaille <akim@epita.fr>
5617
5618 * src/files.c (guard_obstack): New.
5619 (open_files): Initialize it.
5620 (output_files): Dump it...
5621 * src/files.h: Export it.
5622 * src/reader.c (copy_guard): Use it.
5623
5624 2000-12-19 Akim Demaille <akim@epita.fr>
5625
5626 * src/files.c (outfile, defsfile, actfile): Removed as global
5627 vars.
5628 (open_files): Don't compute them.
5629 (output_files): Adjust.
5630 (base_name, short_base_name): Be global.
5631 Adjust dependencies.
5632
5633 2000-12-19 Akim Demaille <akim@epita.fr>
5634
5635 * src/files.c (strsuffix): New.
5636 (stringappend): Be just like strcat but allocate.
5637 (base_names): Eve out from open_files.
5638 Try to simplify the rather hairy computation of base_name and
5639 short_base_name.
5640 (open_files): Use it.
5641 * tests/suite.at (Checking output file names): New test.
5642
5643 2000-12-19 Akim Demaille <akim@epita.fr>
5644
5645 * src/system.h (obstack_grow_literal_string): Rename as...
5646 (obstack_grow_string): this.
5647 * src/output.c (output_parser): Recognize `%% actions' instead of
5648 `$'.
5649 * src/bison.s1: s/$/%% actions/.
5650 * src/bison.hairy: Likewise.
5651
5652 2000-12-19 Akim Demaille <akim@epita.fr>
5653
5654 * src/output.c (output_parser): Compute the `#line' lines when
5655 there are.
5656 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
5657 Suggested by Hans Aberg.
5658
5659 2000-12-19 Akim Demaille <akim@epita.fr>
5660
5661 Let the handling of the skeleton files be local to the procedures
5662 that use it.
5663
5664 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
5665 longer static.
5666 (fparser, open_extra_files): Remove.
5667 (open_files, output_files): Don't take care of fparser.
5668 * src/files.h: Adjust.
5669 * src/output.c (output_parser): Open and close the file to the
5670 skeleton.
5671 * src/reader.c (read_declarations): When %semantic_parser, open
5672 fguard.
5673
5674 2000-12-19 Akim Demaille <akim@epita.fr>
5675
5676 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
5677 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
5678
5679 2000-12-19 Akim Demaille <akim@epita.fr>
5680
5681 * src/files.c (open_files): Yipee! We no longer need all the code
5682 looking for `/tmp' since we have no tmp file.
5683
5684 2000-12-19 Akim Demaille <akim@epita.fr>
5685
5686 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
5687 New macros.
5688 * src/files.c (open_files): Less dependency on MSDOS etc.
5689
5690 2000-12-14 Akim Demaille <akim@epita.fr>
5691
5692 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
5693 Provide a default definition.
5694 Use it when executing the default @ action.
5695 * src/reader.c (reader_output_yylsp): No longer include
5696 `timestamp' and `text' in the default YYLTYPE.
5697
5698 2000-12-12 Akim Demaille <akim@epita.fr>
5699
5700 * src/reader.c (copy_definition, parse_union_decl, copy_action)
5701 (copy_guard): Quote the file names.
5702 Reported by Laurent Mascherpa.
5703
5704 2000-12-12 Akim Demaille <akim@epita.fr>
5705
5706 * src/output.c (output_headers, output_program, output): Be sure
5707 to escape special characters when outputting filenames.
5708 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
5709 (output_headers): Don't depend on them, Use ACTSTR.
5710
5711 2000-11-17 Akim Demaille <akim@epita.fr>
5712
5713 * lib/obstack.h: Formatting changes.
5714 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
5715 prevents type checking.
5716 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
5717 cast the value to (void *): assigning a `foo *' to a `void *'
5718 variable is valid.
5719 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
5720 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
5721 append characters.
5722
5723 2000-11-17 Akim Demaille <akim@epita.fr>
5724
5725 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
5726 as...
5727 (suite.m4, regression.m4, calc.m4): these.
5728 * tests/atgeneral.m4: Update from CVS Autoconf.
5729
5730 2000-11-17 Akim Demaille <akim@epita.fr>
5731
5732 * tests/regression.m4 (%union and --defines): New test,
5733 demonstrating a current bug in the obstack implementation.
5734
5735 2000-11-17 Akim Demaille <akim@epita.fr>
5736
5737 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
5738 macros.
5739 Use them to declare the variables which are global or local to
5740 `yyparse'.
5741
5742 2000-11-17 Akim Demaille <akim@epita.fr>
5743
5744 * acconfig.h: Remove, no longer used.
5745
5746 2000-11-07 Akim Demaille <akim@epita.fr>
5747
5748 * src: s/Copyright (C)/Copyright/g.
5749
5750 2000-11-07 Akim Demaille <akim@epita.fr>
5751
5752 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
5753 defining.
5754 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
5755
5756 2000-11-07 Akim Demaille <akim@epita.fr>
5757
5758 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
5759 Merge in a single CPP if/else.
5760
5761 2000-11-07 Akim Demaille <akim@epita.fr>
5762
5763 * src/output.c (output): Remove useless variables.
5764 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
5765 argument `data' for consistency with the prototypes.
5766 Qualify it `const'.
5767 (obstack_copy, obstack_copy0): Rename the second argument as
5768 `address' for consistency. Qualify it `const'.
5769 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
5770 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
5771 `const' their input argument (`data' or `address').
5772 Adjust the corresponding macros to include `const' in casts.
5773
5774 2000-11-03 Akim Demaille <akim@epita.fr>
5775
5776 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
5777 s/PFILE1/BISON_HAIRY/.
5778 Adjust dependencies.
5779
5780 2000-11-03 Akim Demaille <akim@epita.fr>
5781
5782 For some reason, this was not applied.
5783
5784 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
5785 `unlink': it's no longer used.
5786
5787 2000-11-03 Akim Demaille <akim@epita.fr>
5788
5789 * src/files.c (skeleton_find): New function, eved out of...
5790 (open_files, open_extra_files): here.
5791
5792 2000-11-03 Akim Demaille <akim@epita.fr>
5793
5794 Don't use `atexit'.
5795
5796 * src/files.c (obstack_save): New function.
5797 (done): Rename as...
5798 (output_files): this.
5799 Use `obstack_save'.
5800 * src/main.c (main): Don't use `atexit' to register `done', since
5801 it no longer has to remove tmp files, just call `output_files'
5802 when there are no errors.
5803
5804 2000-11-02 Akim Demaille <akim@epita.fr>
5805
5806 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
5807 `unlink': it's no longer used.
5808 * src/files.h: Formatting changes.
5809
5810 2000-11-02 Akim Demaille <akim@epita.fr>
5811
5812 Remove the last uses of mktemp and unlink/delete.
5813
5814 * src/files.c (fdefines, ftable): Removed.
5815 (defines_ostack, table_obstack): New.
5816 Adjust dependencies of the former into uses of the latter.
5817 * src/output.c (output_short_or_char_table, output_short_table):
5818 Convert to using obstacks.
5819 * src/reader.c (copy_comment2): Accept one FILE * and two
5820 obstacks.
5821 (output_token_defines, reader_output_yylsp): Use obstacks.
5822 * src/system.h (obstack_fgrow3): New.
5823
5824 2000-11-01 Akim Demaille <akim@epita.fr>
5825
5826 Change each use of `fattrs' into a use of `attrs_obstack'.
5827
5828 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
5829 * src/files.c (fattrs): Remove.
5830 (attrs_obstack): New.
5831 Adjust all dependencies.
5832 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
5833
5834 2000-11-01 Akim Demaille <akim@epita.fr>
5835
5836 Introduce obstacks.
5837 Change each use of `faction' into a use of `action_obstack'.
5838
5839 * lib/obstack.h, lib/obstack.c: New files.
5840 * src/files.c (faction): Remove.
5841 (action_obstack): New.
5842 Adjust all dependencies.
5843
5844 2000-10-20 Akim Demaille <akim@epita.fr>
5845
5846 * lib/quote.h (PARAMS): New macro. Use it.
5847
5848 2000-10-16 Akim Demaille <akim@epita.fr>
5849
5850 * src/output.c (output_short_or_char_table): New function.
5851 (output_short_table, output_token_translations): Use it.
5852 (goto_actions): Use output_short_table.
5853
5854 2000-10-16 Akim Demaille <akim@epita.fr>
5855
5856 * src/symtab.c (bucket_new): New function.
5857 (getsym): Use it.
5858
5859 * src/output.c (output_short_table): New argument to display the
5860 comment associated with the table.
5861 Adjust dependencies.
5862 (output_gram): Use it.
5863 (output_rule_data): Nicer output layout for YYTNAME.
5864
5865 2000-10-16 Akim Demaille <akim@epita.fr>
5866
5867 * src/lex.c (read_typename): New function.
5868 (lex): Use it.
5869 * src/reader.c (copy_dollar): Likewise.
5870
5871 2000-10-16 Akim Demaille <akim@epita.fr>
5872
5873 * src/reader.c (copy_comment2): Expect the input stream to be on
5874 the `/' which is suspected to open a comment, instead of being
5875 called after `//' or `/*' was read.
5876 (copy_comment, copy_definition, parse_union_decl, copy_action)
5877 (copy_guard): Adjust.
5878
5879 2000-10-16 Akim Demaille <akim@epita.fr>
5880
5881 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
5882 `read_signed_integer'.
5883
5884 2000-10-16 Akim Demaille <akim@epita.fr>
5885
5886 * src/reader.c (copy_dollar): New function.
5887 (copy_guard, copy_action): Use it.
5888
5889 2000-10-16 Akim Demaille <akim@epita.fr>
5890
5891 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
5892 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
5893 New files, from Fileutils 4.0.27.
5894 * src/main.c (printable_version): Remove.
5895 * src/lex.c, src/reader.c: Use `quote'.
5896
5897 2000-10-04 Akim Demaille <akim@epita.fr>
5898
5899 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
5900
5901 2000-10-04 Akim Demaille <akim@epita.fr>
5902
5903 * doc/bison.texinfo: Various typos spotted by Neil Booth.
5904
5905 2000-10-04 Akim Demaille <akim@epita.fr>
5906
5907 When a literal string is used to define two different tokens,
5908 `bison -v' segfaults.
5909 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
5910
5911 * tests/regression.m4: New file.
5912 Include the core of the sample provided by Piotr Gackiewicz.
5913 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
5914 properly.
5915
5916 2000-10-04 Akim Demaille <akim@epita.fr>
5917
5918 * src/reader.c (parse_expect_decl): Keep `count' within the size
5919 of `buffer'.
5920 From Neil Booth.
5921
5922 2000-10-02 Paul Eggert <eggert@twinsun.com>
5923
5924 * bison.s1 (yyparse): Assign the default value
5925 unconditionally, to avoid a GCC warning and make the parser a
5926 tad smaller.
5927
5928 2000-10-02 Akim Demaille <akim@epita.fr>
5929
5930 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
5931 options.
5932
5933 2000-10-02 Akim Demaille <akim@epita.fr>
5934
5935 * src/derives.c, src/print.c, src/reduce.c: To ease the
5936 translation, move some `\n' out of the translated strings.
5937
5938 2000-10-02 Akim Demaille <akim@epita.fr>
5939
5940 The location tracking mechanism is precious for parse error
5941 messages. Nevertheless, it is enabled only when `@n' is used in
5942 the grammar, which is a different issue (you can use it in error
5943 message, but not in the grammar per se). Therefore, there should
5944 be another means to enable it.
5945
5946 * src/getargs.c (getargs): Support `--locations'.
5947 (usage): Report it.
5948 * src/getargs.h (locationsflag): Export it.
5949 * src/lex.c (percent_table): Support `%locations'.
5950 * src/reader.c (yylsp_needed): Remove this variable, now replaced
5951 with `locationsflag'.
5952 * doc/bison.texinfo: Document `--locations' and `%locations'.
5953 Sort the options.
5954 * tests/calc.m4: Test it.
5955
5956 For regularity of the names, replace each
5957 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
5958 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
5959 In addition replace each `flag' with `_flag'.
5960
5961 2000-10-02 Akim Demaille <akim@epita.fr>
5962
5963 Also test parse error messages, including with YYERROR_VERBOSE.
5964
5965 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
5966 associative).
5967 Use it to check the computations.
5968 Use it to check `nonassoc' is honored.
5969 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
5970 `--yyerror-verbose'.
5971 (_AT_CHECK_CALC): Adjust to this option.
5972 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
5973
5974 2000-10-02 Akim Demaille <akim@epita.fr>
5975
5976 Test also `--verbose', `--defines' and `--name-prefix'. Testing
5977 the latter demonstrates a flaw in the handling of non debugging
5978 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
5979 was used in order to simplify:
5980
5981 #if YYDEBUG
5982 if (yydebug)
5983 {
5984 ...
5985 }
5986 #endif
5987
5988 into
5989
5990 if (yydebug)
5991 {
5992 ...
5993 }
5994
5995 unfortunately this leads to a CPP conflict when
5996 `--name-prefix=foo' is used since it produces `#define yydebug
5997 foodebug'.
5998
5999 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
6000 (YYDPRINTF): New macro.
6001 Spread its use.
6002 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
6003 the bison options.
6004 Also test `--verbose', `--defines' and `--name-prefix'.
6005
6006 2000-10-02 Akim Demaille <akim@epita.fr>
6007
6008 Improve the readability of the produced parsers.
6009
6010 * src/bison.s1: Formatting changes.
6011 Improve the comment related to the `$' mark.
6012 (yydefault): Don't fall through to `yyresume': `goto' there.
6013 * src/output.c (output_parser): When the `$' is met, skip the end
6014 of its line.
6015 New variable, `number_of_dollar_signs', to check there's exactly
6016 one `$' in the parser skeleton.
6017
6018 2000-10-02 Akim Demaille <akim@epita.fr>
6019
6020 * lib/xstrdup.c: New file, from the fileutils.
6021 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
6022 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
6023 instead of strlen + xmalloc + strcpy.
6024 * src/symtab.c (copys): Remove, use xstrdup instead.
6025
6026 2000-10-02 Akim Demaille <akim@epita.fr>
6027
6028 * src/gram.h (associativity): New enum type which replaces the
6029 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
6030 `right_assoc', `left_assoc' and `non_assoc'.
6031 Adjust all dependencies.
6032 * src/reader.c: Formatting changes.
6033 (LTYPESTR): Don't define it, use it as a literal in
6034 `reader_output_yylsp'.
6035 * src/symtab.h (symbol_class): New enum type which replaces the
6036 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
6037 `sunknown', `stoken and `snterm'.
6038
6039 2000-10-02 Akim Demaille <akim@epita.fr>
6040
6041 * src/getargs.c (fixed_outfiles): Rename as...
6042 (yaccflag): for consistency and accuracy.
6043 Adjust dependencies.
6044
6045 2000-10-02 Akim Demaille <akim@epita.fr>
6046
6047 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
6048 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
6049 difficult and introduced a lot of core dump. It turns out that
6050 Bison used an implementation of `xmalloc' based on `calloc', and
6051 at various places it does depend upon the initialization to 0. I
6052 have not tried to isolate the pertinent places, and all the former
6053 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
6054 someone should address this issue.
6055
6056 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
6057 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
6058 files.
6059 Adjust dependencies.
6060 * src/warshall.h: New file.
6061 Propagate.
6062
6063 2000-10-02 Akim Demaille <akim@epita.fr>
6064
6065 Various anti-`extern in *.c' changes.
6066
6067 * src/system.h: Include `assert.h'.
6068
6069 2000-10-02 Akim Demaille <akim@epita.fr>
6070
6071 * src/state.h (nstates, final_state, first_state, first_shift)
6072 (first_reduction): Move their exportation from here...
6073 * src/LR0.h: to here.
6074 Adjust dependencies.
6075 * src/getargs.c (statisticsflag): New variable.
6076 Add support for `--statistics'.
6077 Adjust dependencies.
6078
6079 Remove a lot of now useless `extern' statements in most files.
6080
6081 2000-10-02 Akim Demaille <akim@epita.fr>
6082
6083 * src/LR0.h: New file.
6084 Propagate its use.
6085
6086 2000-10-02 Akim Demaille <akim@epita.fr>
6087
6088 * src/print.h: New file.
6089 Propagate its use.
6090 * src/print.c: Formatting and ordering changes.
6091 (verbose, terse): Replace with...
6092 (print_results): this new function.
6093 Adjust dependencies.
6094
6095 2000-10-02 Akim Demaille <akim@epita.fr>
6096
6097 * src/conflicts.c (conflict_report): New function.
6098 (conflict_log, verbose_conflict_log): Replace with...
6099 (print_conflicts): this function.
6100 Adjust dependencies.
6101 * src/conflicts.h: New file.
6102 Propagate its inclusion.
6103
6104 2000-10-02 Akim Demaille <akim@epita.fr>
6105
6106 * src/nullable.h: New file.
6107 Propagate its inclusion.
6108 * src/nullable.c: Formatting changes.
6109
6110 2000-10-02 Akim Demaille <akim@epita.fr>
6111
6112 * src/reduce.h: New file.
6113 Propagate its inclusion.
6114 * src/reduce.c: Topological sort and other formatting changes.
6115 (bool, TRUE, FALSE): Move their definition to...
6116 * src/system.h: here.
6117
6118 2000-10-02 Akim Demaille <akim@epita.fr>
6119
6120 * src/files.c: Formatting changes.
6121 (tryopen, tryclose, openfiles): Rename as...
6122 (xfopen, xfclose, open_files): this.
6123 (stringappend): static.
6124 * src/files.h: Complete the list of exported symbols.
6125 Propagate its use.
6126
6127 2000-10-02 Akim Demaille <akim@epita.fr>
6128
6129 * src/reader.h: New file.
6130 Propagate its use instead of tedious list of `extern' and
6131 prototypes.
6132 * src/reader.c: Formatting changes, topological sort,
6133 s/register//.
6134
6135 2000-10-02 Akim Demaille <akim@epita.fr>
6136
6137 * src/lex.h: Prototype `lex.c' exported functions.
6138 * src/reader.c: Adjust.
6139 * src/lex.c: Formatting changes.
6140 (safegetc): Rename as...
6141 (xgetc): this.
6142
6143 2000-10-02 Akim Demaille <akim@epita.fr>
6144
6145 * src/lalr.h: New file.
6146 Propagate its inclusion instead of prototypes and `extern'.
6147 * src/lalr.c: Formatting changes, topological sorting etc.
6148
6149 2000-10-02 Akim Demaille <akim@epita.fr>
6150
6151 * src/output.c (token_actions): Introduce a temporary array,
6152 YYDEFACT, that makes it possible for this function to use
6153 output_short_table.
6154
6155 2000-10-02 Akim Demaille <akim@epita.fr>
6156
6157 `user_toknums' is output as a `short[]' in `output.c', while it is
6158 defined as a `int[]' in `reader.c'. For consistency with the
6159 other output tables, `user_toknums' is now defined as a table of
6160 shorts.
6161
6162 * src/reader.c (user_toknums): Be a short table instead of an int
6163 table.
6164 Adjust dependencies.
6165
6166 Factor the short table outputs.
6167
6168 * src/output.c (output_short_table): New function.
6169 * src/output.c (output_gram, output_stos, output_rule_data)
6170 (output_base, output_table, output_check): Use it.
6171
6172 2000-10-02 Akim Demaille <akim@epita.fr>
6173
6174 * src/output.c (output): Topological sort of the functions, in
6175 order to get rid of the `static' prototypes.
6176 No longer use `register'.
6177 * src/output.h: New file.
6178 Propagate its inclusion in files explicitly prototyping functions
6179 from output.c.
6180
6181 2000-09-21 Akim Demaille <akim@epita.fr>
6182
6183 * src/atgeneral.m4: Update from Autoconf.
6184
6185 2000-09-21 Akim Demaille <akim@epita.fr>
6186
6187 * src/closure.h: New file.
6188 * src/closure.c: Formatting changes, topological sort over the
6189 functions, use of closure.h.
6190 (initialize_closure, finalize_closure): Rename as...
6191 (new_closure, free_closure): these. Adjust dependencies.
6192 * src/LR0.c: Formatting changes, topological sort, use of
6193 cloture.h.
6194 (initialize_states): Rename as...
6195 (new_states): this.
6196 * src/Makefile.am (noinst_HEADERS): Adjust.
6197
6198 2000-09-20 Akim Demaille <akim@epita.fr>
6199
6200 * src/acconfig.h: Don't protect config.h against multiple
6201 inclusion.
6202 Don't define PARAMS.
6203 * src/system.h: Define PARAMS.
6204 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
6205 purpose of config.h. system.h must not try to fix wrong
6206 definitions in config.h.
6207
6208 2000-09-20 Akim Demaille <akim@epita.fr>
6209
6210 * src/derives.h: New file.
6211 * src/main.c, src/derives.h: Use it.
6212 Formatting changes.
6213 * src/Makefile.am (noinst_HEADERS): Adjust.
6214
6215 2000-09-20 Akim Demaille <akim@epita.fr>
6216
6217 * tests/atgeneral.m4: Update from Autoconf.
6218 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
6219 (AT_CHECK_CALC): New macros.
6220 Use these macros to test bison with options `', `--raw',
6221 `--debug', `--yacc', `--yacc --debug'.
6222
6223 2000-09-19 Akim Demaille <akim@epita.fr>
6224
6225 * src/output.c: Formatting changes.
6226 * src/machine.h: Remove, leaving its contents in...
6227 * src/system.h: here.
6228 Include stdio.h.
6229 Adjust all dependencies on stdio.h and machine.h.
6230 * src/getargs.h: New file.
6231 Let all `extern' declarations about getargs.c be replaced with
6232 inclusion of `getargs.h'.
6233 * src/Makefile.am (noinst_HEADERS): Adjust.
6234
6235 * tests/calc.m4 (yyin): Be initialized in main, not on the global
6236 scope.
6237 (yyerror): Returns void, not int.
6238 * doc/bison.texinfo: Formatting changes.
6239
6240 2000-09-19 Akim Demaille <akim@epita.fr>
6241
6242 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
6243 portable.
6244
6245 2000-09-18 Akim Demaille <akim@epita.fr>
6246
6247 * configure.in: Append WARNING_CFLAGS to CFLAGS.
6248 * src/Makefile.am (INCLUDES): Don't.
6249 Be ready to fetch headers in lib/.
6250
6251 2000-09-18 Akim Demaille <akim@epita.fr>
6252
6253 * doc/bison.texinfo: Update the copyright.
6254 ANSIfy and GNUify the examples.
6255 Remove the old menu.
6256
6257 2000-09-18 Akim Demaille <akim@epita.fr>
6258
6259 First set of tests: use the `calc' example from the documentation.
6260
6261 * src/bison.s1 (yyparse): Condition the code using `yytname' which
6262 is defined only when YYDEBUG is.
6263 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
6264 * src/files.c (tryopen, tryclose): Formatting changes.
6265 Move to the top and be static.
6266 * src/reader.c (read_signed_integer): Likewise.
6267 * tests/calc.m4: New file.
6268 * Makefile.am, suite.m4: Adjust.
6269 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
6270
6271 2000-09-18 Akim Demaille <akim@epita.fr>
6272
6273 Add support for an Autotest test suite for Bison.
6274
6275 * m4/m4.m4, m4/atconfig.m4: New files.
6276 * m4/Makefile.am (EXTRA_DIST): Adjust.
6277 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
6278 files.
6279 * src/getargs.c: Display a more standard --version message.
6280 * src/reader.c (reader): Formatting changes.
6281 No longer depend upon VERSION_STRING.
6282 * configure.in: No longer use `dnl'.
6283 Set up the test suite and the new directory `tests/.
6284 (VERSION_STRING): Remove.
6285
6286 2000-04-14 Akim Demaille <akim@epita.fr>
6287
6288 * src/reader.c (copy_comment2): New function, same as former
6289 `copy_comment', but outputs into two FILE *.
6290 (copy_comment): Use it.
6291 (parse_union_decl): Use it.
6292 (get_type, parse_start_decl): Use the same `invalid' message.
6293 (parse_start_decl, parse_union_decl): Use the same `multiple'
6294 message.
6295 (parse_union_decl, copy_guard, copy_action): Use the same
6296 `unmatched' message.
6297 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
6298
6299 2000-03-31 Akim Demaille <akim@epita.fr>
6300
6301 * src/files.c (tryopen, tryclose): Move to the top.
6302 Be static.
6303
6304 2000-03-31 Akim Demaille <akim@epita.fr>
6305
6306 * src/main.c (main): Don't call `done', exit does it.
6307
6308 2000-03-31 Akim Demaille <akim@epita.fr>
6309
6310 * allocate.c: s/return (foo)/return foo/.
6311 * lalr.c: Likewise.
6312 * LR0.c: Likewise.
6313 * output.c: Likewise.
6314 * reader.c: Likewise.
6315 * symtab.c: Likewise.
6316 * vmsgetargs.c: Likewise.
6317
6318 2000-03-31 Akim Demaille <akim@epita.fr>
6319
6320 Clean up the error reporting functions.
6321
6322 * src/report.c: New file.
6323 * src/report.h: Likewise.
6324 * src/Makefile.am: Adjust.
6325 * m4/error.m4: New file.
6326 * m4/Makefile.am: Adjust.
6327 * configure.in (jm_PREREQ_ERROR): Call it.
6328 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
6329 Remove.
6330 (fatal, fatals): Remove. All callers use complain.c::fatal.
6331 (warn, warni, warns, warnss, warnss): Remove. All callers use
6332 complain.c::complain.
6333 (toomany): Remove, use fatal instead.
6334 * src/files.c (done): No argument, use complain_message_count.
6335 * src/main.c (main): Register `done' to `atexit'.
6336
6337 * src/getargs.c (usage): More `fputs', less `fprintf'.
6338
6339 2000-03-28 Akim Demaille <akim@epita.fr>
6340
6341 * lib/: New directory.
6342 * Makefile.am (SUBDIRS): Adjust.
6343 * configure.in: Adjust.
6344 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
6345 useless.
6346 * src/alloca.c: Moved to lib/.
6347 * src/getopt.c: Likewise.
6348 * src/getopt1.c: Likewise.
6349 * src/getopt.h: Likewise.
6350 * src/ansi2knr.c: Likewise.
6351 * src/ansi2knr.1: Likewise.
6352 * src/Makefile.am: Adjust.
6353 * lib/Makefile.am: New file.
6354
6355 2000-03-28 Akim Demaille <akim@epita.fr>
6356
6357 * src/getargs.c (usage): Refresh the help message.
6358
6359 2000-03-17 Akim Demaille <akim@epita.fr>
6360
6361 * src/getopt1.c: Updated from textutils 2.0e
6362 * src/getopt.c: Likewise.
6363 * src/getopt.h: Likewise.
6364
6365 2000-03-17 Akim Demaille <akim@epita.fr>
6366
6367 * src/Makefile.am (bison.simple): Fix the awk program: quote only
6368 the file name, not the whole `#line LINE FILE'.
6369
6370 2000-03-17 Akim Demaille <akim@epita.fr>
6371
6372 On syntax errors, report the token on which we choked.
6373
6374 * src/bison.s1 (yyparse): In the label yyerrlab, when
6375 YYERROR_VERBOSE, add yychar in msg.
6376
6377 2000-03-17 Akim Demaille <akim@epita.fr>
6378
6379 * src/reader.c (copy_at): New function.
6380 (copy_guard): Use it.
6381 (copy_action): Use it.
6382
6383 2000-03-17 Akim Demaille <akim@epita.fr>
6384
6385 Be kind to translators, save some useless translations.
6386
6387 * src/main.c (banner): New function.
6388 (fatal_banner): Use it.
6389 (warn_banner): Use it.
6390
6391 2000-03-17 Akim Demaille <akim@epita.fr>
6392
6393 * src/reader.c (copy_definition): Use copy_string and
6394 copy_comment. Removed now unused `match', `ended',
6395 `cplus_comment'.
6396 (copy_comment, copy_string): Moved, to be visible from
6397 copy_definition.
6398
6399 2000-03-17 Akim Demaille <akim@epita.fr>
6400
6401 * src/reader.c (copy_string): Declare `static inline'. No
6402 problems with inline, since it is checked by configure.
6403 (copy_comment): Likewise.
6404
6405 2000-03-17 Akim Demaille <akim@epita.fr>
6406
6407 * src/reader.c (packsymbols): Formatting changes.
6408
6409 2000-03-17 Akim Demaille <akim@epita.fr>
6410
6411 * src/reader.c (copy_comment): New function, factored out from:
6412 (copy_action): Use it. Removed now unused `match', `ended',
6413 `cplus_comment'.
6414 (copy_guard): Likewise.
6415
6416 2000-03-17 Akim Demaille <akim@epita.fr>
6417
6418 * src/reader.c (copy_string): New function, factored out from:
6419 (copy_action): Use it.
6420 (copy_guard): Likewise.
6421
6422 2000-03-17 Akim Demaille <akim@epita.fr>
6423
6424 Change the handling of @s so that they behave exactly like $s.
6425 There is now a pseudo variable @$ (readble and writable), location
6426 of the lhs of the rule (by default ranging from the location of
6427 the first symbol of the rhs, to the location of the last symbol,
6428 or, if the rhs is empty, YYLLOC).
6429
6430 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
6431 yyval.
6432 (yyparse): When providing a default semantic action, provide a
6433 default location action.
6434 (after the $): No longer change `*YYLSP', just stack YYLOC the
6435 same way you stack YYVAL.
6436 * src/reader.c (read_declarations): Use warns.
6437 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
6438 (copy_action, case '@'): Likewise.
6439 Use a standard error message, to save useless work from
6440 translators.
6441
6442 2000-03-17 Akim Demaille <akim@epita.fr>
6443
6444 * src/bison.s1: Formatting and cosmetics changes.
6445 * src/reader.c: Likewise.
6446 Update the Copyright notice.
6447
6448 2000-03-17 Akim Demaille <akim@epita.fr>
6449
6450 * src/bison.s1 (#line): All set to `#line' only, since the
6451 Makefile now handles them.
6452
6453 2000-03-16 Akim Demaille <akim@epita.fr>
6454
6455 * src/output.c (output_rule_data): Output the documentation of
6456 some of the tables.
6457 (Copyright notice): Update.
6458 Formatting changes.
6459
6460 2000-03-16 Akim Demaille <akim@epita.fr>
6461
6462 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
6463 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
6464 One `#if YYDEBUG' remains, since it uses variables which are
6465 defined only if `YYDEBUG != 0'.
6466
6467 2000-03-16 Akim Demaille <akim@epita.fr>
6468
6469 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
6470 and related variables so that the similarities are highlighted.
6471
6472 2000-03-16 Akim Demaille <akim@epita.fr>
6473
6474 * src/bison.s1: Properly indent CPP directives.
6475
6476 2000-03-16 Akim Demaille <akim@epita.fr>
6477
6478 * src/bison.s1: Properly indent the `alloca' CPP section.
6479
6480 2000-03-16 Akim Demaille <akim@epita.fr>
6481
6482 Do not hard code values of directories in `configure.in'.
6483 Update the `configure' tool chain.
6484
6485 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
6486 src/makefile.am.
6487 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
6488 (AC_OUTPUT): Add m4/Makefile.
6489 Bump to bison 1.28a, 1.29 has never been released.
6490 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
6491 handled via src/Makefile.am.
6492 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
6493 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
6494 autoheader.
6495 * Makefile.am (SUBDIRS): Add m4.
6496 (ACLOCAL_AM_FLAGS): New variable.
6497 (AUTOMAKE_OPTIONS): Add check-news.
6498 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
6499 the proper line number and file name.
6500 (DEFS): Propagate the location of bison library files and of the
6501 locale files.
6502 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
6503 builddir.
6504 * acinclude.m4: Remove, replaced by the directory m4.
6505 * m4/Makefile.am (EXTRA_DIST): New variable.
6506 * m4/gettext.m4: New file, from the fileutils.
6507 * m4/lcmessage.m4: Likewise
6508 * m4/progtest.m4: Likewise.
6509 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
6510
6511 2000-03-10 Akim Demaille <akim@epita.fr>
6512
6513 * src/closure.c:
6514 Formatting changes of various comments.
6515 Respect the GNU coding standards at various places.
6516 Don't use `_()' when no translation is needed.
6517
6518 1999-12-13 Jesse Thilo <jthilo@gnu.org>
6519
6520 * src/files.c:
6521 OS/2 honors TMPDIR environment variable.
6522
6523 1999-12-13 Jesse Thilo <jthilo@gnu.org>
6524
6525 * doc/bison.texinfo: Tweaked spelling and grammar.
6526 Updated ISBN.
6527 Removed reference to price of printed copy.
6528 Mention BISON_SIMPLE and BISON_HAIRY.
6529
6530 1999-12-13 Jesse Thilo <jthilo@gnu.org>
6531
6532 * configure.in, NEWS:
6533 Bison 1.29 released.
6534
6535 1999-10-27 Jesse Thilo <jthilo@gnu.org>
6536
6537 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
6538 Added reference card.
6539
6540 1999-07-26 Jesse Thilo <jthilo@gnu.org>
6541
6542 * po/ru.po: Added Russian translation.
6543
6544 1999-07-26 Jesse Thilo <jthilo@gnu.org>
6545
6546 * configure.in: Added Russian translation.
6547
6548 1999-07-06 Jesse Thilo <jthilo@gnu.org>
6549
6550 * configure.in, NEWS, README:
6551 Released version 1.28.
6552
6553 1999-06-14 Jesse Thilo <jthilo@gnu.org>
6554
6555 * src/system.h:
6556 Squashed redefinition warning on some systems.
6557
6558 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
6559 Have configure build version string instead of relying on ANSI string
6560 concatentation.
6561
6562 1999-06-14 Jesse Thilo <jthilo@gnu.org>
6563
6564 * po/POTFILES.in: Got rid of version.c.
6565
6566 1999-06-14 Jesse Thilo <jthilo@gnu.org>
6567
6568 * acconfig.h, configure.in:
6569 Have configure build version string instead of relying on ANSI string
6570 concatentation.
6571
6572 1999-06-08 Jesse Thilo <jthilo@gnu.org>
6573
6574 * doc/bison.1:
6575 Dropped mention of `+' for long-named options.
6576
6577 1999-05-30 Jesse Thilo <jthilo@gnu.org>
6578
6579 * src/files.c: Added <unistd.h> for unlink().
6580
6581 * src/Makefile.am, src/system.h:
6582 I18n fixes.
6583
6584 1999-05-30 Jesse Thilo <jthilo@gnu.org>
6585
6586 * README: Added a FAQ list.
6587
6588 * configure.in, acconfig.h:
6589 I18n fixes.
6590
6591 1999-05-30 Jesse Thilo <jthilo@gnu.org>
6592
6593 * doc/FAQ, doc/Makefile.am:
6594 Added a FAQ list.
6595
6596 1999-05-19 Jesse Thilo <jthilo@gnu.org>
6597
6598 * src/alloc.h, src/symtab.h, src/version.c:
6599 Protected inclusion of "config.h" with HAVE_CONFIG_H.
6600
6601 1999-04-18 Jesse Thilo <jthilo@gnu.org>
6602
6603 * src/.cvsignore, src/Makefile.am:
6604 Reorganized: sources in `src', documentation in `doc'.
6605
6606 * src/lex.c (literalchar):
6607 fixed the code for escaping double quotes (thanks
6608 Jonathan Czisny.)
6609
6610 1999-04-18 Jesse Thilo <jthilo@gnu.org>
6611
6612 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
6613 Adjusted paths to reflect directory reorganization.
6614
6615 1999-04-18 Jesse Thilo <jthilo@gnu.org>
6616
6617 * doc/.cvsignore, doc/Makefile.am:
6618 Reorganized: sources in `src', documentation in `doc'.
6619
6620 1999-04-18 Jesse Thilo <jthilo@gnu.org>
6621
6622 * configure.in:
6623 Updated AC_INIT file to reflect directory reorganization.
6624
6625 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
6626 Reorganized: sources in `src', documentation in `doc'.
6627
6628 1999-04-13 Jesse Thilo <jthilo@gnu.org>
6629
6630 * src/allocate.c:
6631 Don't declare calloc() and realloc() if not necessary.
6632
6633 1999-04-13 Jesse Thilo <jthilo@gnu.org>
6634
6635 * configure.in, acconfig.h, acinclude.m4:
6636 Don't declare calloc() and realloc() if not necessary.
6637
6638 1999-03-23 Jesse Thilo <jthilo@gnu.org>
6639
6640 * po/.cvsignore: Added i18n support.
6641
6642 1999-03-23 Jesse Thilo <jthilo@gnu.org>
6643
6644 * acconfig.h, configure.in, Makefile.am:
6645 Added i18n support.
6646
6647 1999-03-22 Jesse Thilo <jthilo@gnu.org>
6648
6649 * src/bison.s1: Fixed #line numbers.
6650
6651 1999-03-15 Jesse Thilo <jthilo@gnu.org>
6652
6653 * po/es.po, po/fr.po, po/nl.po, po/de.po:
6654 Added PO files from Translation Project.
6655
6656 1999-03-03 Jesse Thilo <jthilo@gnu.org>
6657
6658 * Makefile.am:
6659 Added support for non-ANSI compilers (ansi2knr).
6660
6661 1999-02-16 Jesse Thilo <jthilo@gnu.org>
6662
6663 * configure.in: Bumped version number to 1.27.
6664
6665 * Makefile.am:
6666 Added `bison.simple' to list of files removed by `make distclean'.
6667
6668 1999-02-12 Jesse Thilo <jthilo@gnu.org>
6669
6670 * src/files.c, src/files.h:
6671 Defined locations of parser files in config.h instead of Makefile.
6672
6673 1999-02-12 Jesse Thilo <jthilo@gnu.org>
6674
6675 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
6676 Defined locations of parser files in config.h instead of Makefile.
6677
6678 1999-02-09 Jesse Thilo <jthilo@gnu.org>
6679
6680 * Makefile.am:
6681 Removed inappropriate use of $< macro.
6682
6683 1999-02-05 Jesse Thilo <jthilo@gnu.org>
6684
6685 * po/Makefile.in.in, po/POTFILES.in:
6686 Add `po' directory skeleton.
6687
6688 1999-01-27 Jesse Thilo <jthilo@gnu.org>
6689
6690 * README: Document help-bison list.
6691
6692 * configure.in: Add check for mkstemp().
6693
6694 1999-01-20 Jesse Thilo <jthilo@gnu.org>
6695
6696 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
6697 Hush a few compiler warnings.
6698
6699 * src/files.c:
6700 Add tryclose(), which verifies that fclose was successful.
6701 Hush a couple of compiler warnings.
6702
6703 1999-01-20 Jesse Thilo <jthilo@gnu.org>
6704
6705 * Makefile.am, OChangeLog:
6706 ChangeLog is now automatically generated. Include the old version as
6707 OChangeLog.
6708
6709 1999-01-14 Jesse Thilo <jthilo@gnu.org>
6710
6711 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
6712 Update FSF address.
6713
6714 1999-01-14 Jesse Thilo <jthilo@gnu.org>
6715
6716 * doc/bison.texinfo: Fix formatting glitch.
6717
6718 * doc/bison.texinfo: Update FSF address.
6719
6720 1999-01-14 Jesse Thilo <jthilo@gnu.org>
6721
6722 * acconfig.h: Update FSF address.
6723
6724 1999-01-08 Jesse Thilo <jthilo@gnu.org>
6725
6726 * src/system.h:
6727 Don't define PACKAGE here, since config.h defines it.
6728
6729 1998-12-30 Jesse Thilo <jthilo@gnu.org>
6730
6731 * src/reader.c: Update copyright date.
6732
6733 * src/main.c:
6734 Ditch sprintf to statically-sized buffers in fatal/warn functions in
6735 favor of output directly to stderr (avoids buffer overruns).
6736
6737 * src/reader.c: Some checks for premature EOF.
6738
6739 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
6740 Use prototypes if the compiler understands them.
6741
6742 * src/files.c: Honor TMPDIR on Unix hosts.
6743 Use prototypes if the compiler understands them.
6744
6745 * src/reader.c:
6746 Fix a couple of buffer overrun bugs.
6747 Use prototypes if the compiler understands them.
6748
6749 * src/system.h: Include unistd.h and ctype.h.
6750 Use #ifdef instead of #if for NLS symbols.
6751
6752 1998-12-30 Jesse Thilo <jthilo@gnu.org>
6753
6754 * doc/bison.texinfo:
6755 Delete comment "consider using @set for edition number, etc..." since
6756 we now are doing so.
6757
6758 1998-12-30 Jesse Thilo <jthilo@gnu.org>
6759
6760 * configure.in:
6761 Use prototypes if the compiler understands them.
6762
6763 * NEWS: Document 1.26 highlights.
6764
6765 * Makefile.am: Require Automake 1.3 or later.
6766
6767 * acconfig.h:
6768 Use prototypes if the compiler understands them.
6769
6770 1998-12-29 Jesse Thilo <jthilo@gnu.org>
6771
6772 * src/version.c:
6773 Use VERSION symbol from automake for version number.
6774
6775 1998-12-29 Jesse Thilo <jthilo@gnu.org>
6776
6777 * acconfig.h, configure.in, version.cin:
6778 Use VERSION symbol from automake for version number.
6779
6780 1998-11-28 Jesse Thilo <jthilo@gnu.org>
6781
6782 * Makefile.am:
6783 Distribute original version of simple parser (bison.s1), not built
6784 version (bison.simple).
6785
6786 1998-11-28 Jesse Thilo <jthilo@gnu.org>
6787
6788 * doc/bison.texinfo: Add info dir entry.
6789
6790 * doc/bison.texinfo:
6791 Let automake put version number into documentation.
6792
6793 1998-11-26 Jesse Thilo <jthilo@gnu.org>
6794
6795 * src/bison.cld, src/build.com, src/vmshlp.mar:
6796 Add non-RCS files from /gd/gnu/bison.
6797
6798 1998-11-26 Jesse Thilo <jthilo@gnu.org>
6799
6800 * doc/bison.1:
6801 Document the BISON_HAIRY and BISON_SIMPLE variables.
6802
6803 1998-11-25 Jesse Thilo <jthilo@gnu.org>
6804
6805 * src/version.c: Build version.c automatically.
6806
6807 * src/reader.c:
6808 Fix token numbering (used to start at 258, not 257).
6809
6810 * src/system.h: Include config.h.
6811
6812 * src/getargs.c: Update bug report address.
6813
6814 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
6815 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
6816
6817 1998-11-25 Jesse Thilo <jthilo@gnu.org>
6818
6819 * Makefile.am:
6820 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
6821
6822 * configure.in, version.cin:
6823 Build version.c automatically.
6824
6825 * AUTHORS: Add AUTHORS file.
6826
6827 * README: Update bug report address.
6828
6829 * bison.simple:
6830 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
6831
6832 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
6833 Add automake stuff.
6834
6835 1998-11-25 Jesse Thilo <jthilo@gnu.org>
6836
6837 * doc/bison.texinfo: Clean up some formatting.
6838
6839 1998-05-05 Richard Stallman <rms@gnu.org>
6840
6841 * doc/bison.texinfo:
6842 Explain better why to make a pure parser.
6843
6844 1998-01-05 Richard Stallman <rms@gnu.org>
6845
6846 * src/files.c (openfiles):
6847 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
6848 find a temporary directory, if possible. Do not unlink files while
6849 they are open.
6850
6851 1997-08-25 Richard Stallman <rms@gnu.org>
6852
6853 * src/reader.c (stack_offset;):
6854 Change some warni to warns.
6855
6856 * src/lex.c (literalchar): Use warns, not warni.
6857
6858 1997-06-28 Richard Stallman <rms@gnu.org>
6859
6860 * src/bison.s1: Add a Bison version comment.
6861
6862 * src/main.c (fatal, warn, berror):
6863 Use program_name.
6864
6865 1997-06-28 Richard Stallman <rms@gnu.org>
6866
6867 * Makefile.in (bison_version): New variable.
6868 (dist): Use that variable.
6869 (bison.s1): Substitute the Bison version into bison.simple.
6870
6871 * bison.simple: Add a Bison version comment.
6872
6873 1997-06-18 Richard Stallman <rms@gnu.org>
6874
6875 * src/main.c (fatal, warn, berror):
6876 Make error messages standard.
6877 (toomany): Improve error message text.
6878
6879 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
6880 new.h renamed to alloc.h.
6881
6882 1997-06-18 Richard Stallman <rms@gnu.org>
6883
6884 * Makefile.in: new.h renamed to alloc.h.
6885
6886 1997-05-24 Richard Stallman <rms@gnu.org>
6887
6888 * src/lex.c (literalchar):
6889 Fix the code for escaping \, " and '.
6890
6891 (lex): Avoid trouble when there are many chars
6892 to discard in a char literal with just several chars in it.
6893
6894 1997-05-17 Richard Stallman <rms@gnu.org>
6895
6896 * src/bison.s1:
6897 Use malloc, if using alloca is troublesome.
6898 (YYSTACK_USE_ALLOCA): New flag macro.
6899 Define it for some systems and compilers.
6900 (YYSTACK_ALLOC): New macro.
6901 (yyparse): Use YYSTACK_ALLOC to allocate stack.
6902 If it was malloc'd, free it.
6903
6904 1997-05-17 Richard Stallman <rms@gnu.org>
6905
6906 * bison.simple:
6907 Use malloc, if using alloca is troublesome.
6908 (YYSTACK_USE_ALLOCA): New flag macro.
6909 Define it for some systems and compilers.
6910 (YYSTACK_ALLOC): New macro.
6911 (yyparse): Use YYSTACK_ALLOC to allocate stack.
6912 If it was malloc'd, free it.
6913
6914 1997-04-23 Richard Stallman <rms@gnu.org>
6915
6916 * src/bison.s1:
6917 (alloca) [__hpux]: Always define as __builtin_alloca.
6918
6919 1997-04-23 Richard Stallman <rms@gnu.org>
6920
6921 * bison.simple:
6922 (alloca) [__hpux]: Always define as __builtin_alloca.
6923
6924 1997-04-22 Richard Stallman <rms@gnu.org>
6925
6926 * src/bison.s1:
6927 [__hpux]: Include alloca.h (right for HPUX 10)
6928 instead of declaring alloca (right for HPUX 9).
6929
6930 * src/bison.s1 (__yy_memcpy):
6931 Declare arg `count' as unsigned int.
6932 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
6933
6934 1997-04-22 Richard Stallman <rms@gnu.org>
6935
6936 * bison.simple:
6937 [__hpux]: Include alloca.h (right for HPUX 10)
6938 instead of declaring alloca (right for HPUX 9).
6939
6940 * bison.simple (__yy_memcpy):
6941 Declare arg `count' as unsigned int.
6942 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
6943
6944 1997-01-03 Richard Stallman <rms@gnu.org>
6945
6946 * src/allocate.c: [__STDC__ or _MSC_VER]:
6947 Declare calloc and realloc to return void *.
6948
6949 1997-01-02 Richard Stallman <rms@gnu.org>
6950
6951 * src/system.h:
6952 [_MSC_VER]: Include stdlib.h and process.h.
6953 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
6954
6955 * src/main.c (main): Return FAILURE as a value.
6956 (printable_version): Declare arg as int, not char.
6957
6958 1997-01-02 Richard Stallman <rms@gnu.org>
6959
6960 * Makefile.in (dist):
6961 Explicitly check for symlinks, and copy them.
6962
6963 1996-12-19 Richard Stallman <rms@gnu.org>
6964
6965 * src/files.c:
6966 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
6967
6968 1996-12-18 Paul Eggert <eggert@gnu.org>
6969
6970 * src/bison.s1 (yyparse):
6971 If __GNUC__ and YYPARSE_PARAM are both defined,
6972 declare yyparse to have a void * argument.
6973
6974 1996-12-18 Paul Eggert <eggert@gnu.org>
6975
6976 * bison.simple (yyparse):
6977 If __GNUC__ and YYPARSE_PARAM are both defined,
6978 declare yyparse to have a void * argument.
6979
6980 1996-12-17 Richard Stallman <rms@gnu.org>
6981
6982 * src/reduce.c (nbits): Add some casts.
6983
6984 1996-08-12 Richard Stallman <rms@gnu.org>
6985
6986 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
6987
6988 1996-08-12 Richard Stallman <rms@gnu.org>
6989
6990 * bison.simple: Test _MSDOS as well as _MSDOS_.
6991
6992 1996-07-31 Richard Stallman <rms@gnu.org>
6993
6994 * src/bison.s1:
6995 [__sun && __i386]: Include alloca.h.
6996
6997 1996-07-31 Richard Stallman <rms@gnu.org>
6998
6999 * bison.simple:
7000 [__sun && __i386]: Include alloca.h.
7001
7002 1996-07-30 Richard Stallman <rms@gnu.org>
7003
7004 * src/bison.s1: Comment change.
7005
7006 * src/bison.s1: Test _MSDOS_, not MSDOS.
7007
7008 1996-07-30 Richard Stallman <rms@gnu.org>
7009
7010 * bison.simple: Comment change.
7011
7012 * bison.simple: Test _MSDOS_, not MSDOS.
7013
7014 1996-06-01 Richard Stallman <rms@gnu.org>
7015
7016 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
7017 Insert `_' macro around many string constants.
7018
7019 * src/main.c:
7020 Insert `_' macro around many string constants.
7021
7022 (main): Call setlocale, bindtextdomain and textdomain.
7023
7024 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
7025 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
7026 [ENABLE_NLS]: Include libintl.h.
7027 [ENABLE_NLS] (gettext): Define.
7028 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
7029 (N_, PACKAGE, LOCALEDIR): New macros.
7030
7031 1996-06-01 Richard Stallman <rms@gnu.org>
7032
7033 * POTFILES.in: New file.
7034
7035 * Makefile.in (allocate.o):
7036 Define target explicitly.
7037
7038 * Makefile.in (CFLAGS): Set to @CFLAGS@.
7039 (LDFLAGS): Set to @LDFLAGS@.
7040 (configure): Run autoconf only if preceding `cd' succeeds.
7041 (bison.s1): Redirect output to temporary file then move the
7042 temporary to the target, rather than redirecting directly to bison.s1.
7043 (clean): Remove config.status and config.log.
7044 (distclean): Don't remove config.status here.
7045
7046 1996-05-12 Richard Stallman <rms@gnu.org>
7047
7048 * src/bison.s1:
7049 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
7050
7051 1996-05-12 Richard Stallman <rms@gnu.org>
7052
7053 * bison.simple:
7054 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
7055
7056 1996-05-11 Richard Stallman <rms@gnu.org>
7057
7058 * src/bison.s1 (__yy_memcpy):
7059 Really reorder the args, as was supposedly done on Feb 14 1995.
7060 (yyparse): Calls changed accordingly.
7061
7062 1996-05-11 Richard Stallman <rms@gnu.org>
7063
7064 * Makefile.in (dist): Don't use $(srcdir).
7065
7066 * bison.simple (__yy_memcpy):
7067 Really reorder the args, as was supposedly done on Feb 14 1995.
7068 (yyparse): Calls changed accordingly.
7069
7070 1996-01-27 Richard Stallman <rms@gnu.org>
7071
7072 * src/output.c (output_rule_data):
7073 Test YYERROR_VERBOSE in the conditional
7074 around the definition of ttyname.
7075
7076 1995-12-29 Richard Stallman <rms@gnu.org>
7077
7078 * src/bison.s1:
7079 Fix line numbers in #line commands.
7080
7081 1995-12-29 Richard Stallman <rms@gnu.org>
7082
7083 * bison.simple:
7084 Fix line numbers in #line commands.
7085
7086 1995-12-27 Richard Stallman <rms@gnu.org>
7087
7088 * src/bison.s1 (YYPARSE_PARAM_DECL):
7089 In C++, make it always null.
7090 (YYPARSE_PARAM_ARG): New macro.
7091 (yyparse): Use YYPARSE_PARAM_ARG.
7092
7093 1995-12-27 Richard Stallman <rms@gnu.org>
7094
7095 * bison.simple (YYPARSE_PARAM_DECL):
7096 In C++, make it always null.
7097 (YYPARSE_PARAM_ARG): New macro.
7098 (yyparse): Use YYPARSE_PARAM_ARG.
7099
7100 1995-11-29 Richard Stallman <rms@gnu.org>
7101
7102 * doc/bison.texinfo:
7103 Describe literal string tokens, %raw, %no_lines, %token_table.
7104
7105 1995-11-29 Daniel Hagerty <hag@gnu.org>
7106
7107 * doc/bison.texinfo: Fixed update date
7108
7109 1995-10-16 Richard Stallman <rms@gnu.org>
7110
7111 * src/version.c: Version 1.25.
7112
7113 1995-10-16 Richard Stallman <rms@gnu.org>
7114
7115 * NEWS: *** empty log message ***
7116
7117 1995-10-16 Richard Stallman <rms@gnu.org>
7118
7119 * doc/bison.1, doc/bison.rnh:
7120 Add new options.
7121
7122 1995-10-15 Richard Stallman <rms@gnu.org>
7123
7124 * src/vmsgetargs.c, src/getargs.c:
7125 Added -n, -k, and -raw switches.
7126 (noparserflag, toknumflag, rawtoknumflag): New variables.
7127
7128 * src/symtab.h (SALIAS):
7129 New #define for adding aliases to %token.
7130 (struct bucket): Added `alias' field.
7131
7132 * src/reduce.c (reduce_grammar):
7133 Revise error message.
7134 (print_notices): Remove final `.' from error message.
7135
7136 * src/reader.c (reader_output_yylsp):
7137 New function.
7138 (readgram): Use `#if 0' around code that accepted %command
7139 inside grammar rules: The documentation doesn't allow it,
7140 and it will fail since the %command processors scan for the next %.
7141 (parse_token_decl): Extended the %token
7142 declaration to allow a multi-character symbol as an alias.
7143 (parse_thong_decl): New function.
7144 (read_declarations): Added %thong declarations.
7145 (read_declarations): Handle NOOP to deal with allowing
7146 % declarations as another means to specify the flags.
7147 (readgram): Allow %prec prior to semantics embedded in a rule.
7148 (skip_to_char, read_declarations, copy_definition)
7149 (parse_token_decl, parse_start_decl, parse_type_decl)
7150 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
7151 (get_type_name, copy_guard, copy_action, readgram)
7152 (get_type, packsymbols): Revised most error messages.
7153 Changed `fatal' to `warnxxx' to avoid aborting for error.
7154 Revised and use multiple warnxxx functions to avoid using VARARGS1.
7155 (read_declarations): Improve the error message for
7156 an invalid character. Do not abort.
7157 (read_declarations, copy_guard, copy_action): Use
7158 printable_version to avoid unprintable characters in printed output.
7159 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
7160 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
7161 Allow the type of a non-terminal can be given
7162 more than once, as long as all specifications give the same type.
7163
7164 * src/output.c:
7165 (output_headers, output_trailers, output, output_gram)
7166 (output_rule_data): Implement noparserflag variable.
7167 Implement toknumflag variable.
7168 (output): Call reader_output_yylsp to output LTYPESTR.
7169
7170 * src/main.c (main):
7171 If reader sees an error, don't process the grammar.
7172 (fatals): Updated to not use VARARGS1.
7173 (printable_version, int_to_string, warn, warni, warns, warnss)
7174 (warnsss): New error reporting functions. Avoid abort for error.
7175
7176 * src/lex.h:
7177 Added THONG and NOOP for alias processing.
7178 Added SETOPT for the new code that allows setting options with %flags.
7179
7180 * src/lex.c:
7181 Include getopt.h. Add some extern decls.
7182 (safegetc): New function to deal with EOF gracefully.
7183 (literalchar); new function to deal with reading \ escapes.
7184 (lex): Use literalchar.
7185 (lex): Implemented "..." tokens.
7186 (literalchar, lex, parse_percent_token): Made tokenbuffer
7187 always contain the token. This includes growing the token
7188 buffer while reading an integer.
7189 (parse_percent_token): Replaced if-else statement with percent_table.
7190 (parse_percent_token): Added % declarations as another
7191 way to specify the flags -n, -l, and -r. Also added hooks for
7192 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
7193 major changes to files.c.
7194 (lex) Retain in the incoming stream a character following
7195 an incorrect '/'.
7196 (skip_white_space, lex): Revised most error messages
7197 and changed fatal to warn to avoid aborting.
7198 (percent_table): Added %thong declarations.
7199
7200 * src/gram.h: Comment changes.
7201
7202 * src/files.c (openfiles, open_extra_files, done):
7203 Add faction flag
7204 and actfile file. Handle noparserflag. Both for -n switch.
7205
7206 * src/conflicts.c (resolve_sr_conflict):
7207 Remove use of alloca.
7208
7209 1995-06-01 Jim Meyering <meyering@gnu.org>
7210
7211 * doc/bison.texinfo: *** empty log message ***
7212
7213 1995-05-06 Richard Stallman <rms@gnu.org>
7214
7215 * src/bison.s1: Comment change.
7216
7217 1995-05-06 Richard Stallman <rms@gnu.org>
7218
7219 * bison.simple: Comment change.
7220
7221 1995-05-03 Richard Stallman <rms@gnu.org>
7222
7223 * src/version.c: Version now 1.24.
7224
7225 * src/bison.s1: Change distribution terms.
7226
7227 * src/version.c: Version now 1.23.
7228
7229 1995-05-03 Richard Stallman <rms@gnu.org>
7230
7231 * doc/bison.texinfo:
7232 Rewrite "Conditions for Using Bison".
7233 Update version to 1.24.
7234
7235 1995-05-03 Richard Stallman <rms@gnu.org>
7236
7237 * bison.simple: Change distribution terms.
7238
7239 1995-02-23 Richard Stallman <rms@gnu.org>
7240
7241 * src/files.c: Test __VMS_POSIX as well as VMS.
7242
7243 1995-02-14 Jim Meyering <meyering@gnu.org>
7244
7245 * src/bison.s1 (__yy_memcpy):
7246 Renamed from __yy_bcopy to avoid
7247 confusion. Reverse FROM and TO arguments to be consistent with
7248 those of memcpy.
7249
7250 1995-02-14 Jim Meyering <meyering@gnu.org>
7251
7252 * bison.simple (__yy_memcpy):
7253 Renamed from __yy_bcopy to avoid
7254 confusion. Reverse FROM and TO arguments to be consistent with
7255 those of memcpy.
7256
7257 1994-11-10 David J. MacKenzie <djm@gnu.org>
7258
7259 * NEWS: reformat
7260
7261 * NEWS: New file.
7262
7263 * Makefile.in (DISTFILES): Include NEWS.
7264
7265 * Makefile.in (DISTFILES):
7266 Include install-sh, not install.sh.
7267
7268 * configure.in: Update to Autoconf v2 macro names.
7269
7270 1994-10-05 David J. MacKenzie <djm@gnu.org>
7271
7272 * Makefile.in: fix typo
7273
7274 * Makefile.in (prefix, exec_prefix):
7275 Let configure set them.
7276
7277 1994-09-28 David J. MacKenzie <djm@gnu.org>
7278
7279 * Makefile.in: Set datadir to $(prefix)/share.
7280
7281 1994-09-15 Richard Stallman <rms@gnu.org>
7282
7283 * src/bison.s1:
7284 Update copyright notice and GPL version.
7285
7286 1994-09-15 Richard Stallman <rms@gnu.org>
7287
7288 * bison.simple:
7289 Update copyright notice and GPL version.
7290
7291 1994-07-12 Richard Stallman <rms@gnu.org>
7292
7293 * src/reduce.c, src/reader.c:
7294 entered into RCS
7295
7296 1994-05-05 David J. MacKenzie <djm@gnu.org>
7297
7298 * Makefile.in: entered into RCS
7299
7300 1994-03-26 Richard Stallman <rms@gnu.org>
7301
7302 * src/bison.s1: entered into RCS
7303
7304 1994-03-26 Richard Stallman <rms@gnu.org>
7305
7306 * bison.simple: entered into RCS
7307
7308 1994-03-25 Richard Stallman <rms@gnu.org>
7309
7310 * src/main.c: entered into RCS
7311
7312 1994-03-24 Richard Stallman <rms@gnu.org>
7313
7314 * src/conflicts.c: entered into RCS
7315
7316 1994-01-02 Richard Stallman <rms@gnu.org>
7317
7318 * Makefile.in: *** empty log message ***
7319
7320 1993-11-21 Richard Stallman <rms@gnu.org>
7321
7322 * src/bison.s1: *** empty log message ***
7323
7324 1993-11-21 Richard Stallman <rms@gnu.org>
7325
7326 * doc/bison.texinfo: entered into RCS
7327
7328 * doc/bison.texinfo: *** empty log message ***
7329
7330 1993-11-21 Richard Stallman <rms@gnu.org>
7331
7332 * bison.simple: *** empty log message ***
7333
7334 1993-10-25 David J. MacKenzie <djm@gnu.org>
7335
7336 * doc/bison.texinfo: *** empty log message ***
7337
7338 1993-10-19 Richard Stallman <rms@gnu.org>
7339
7340 * src/bison.s1: *** empty log message ***
7341
7342 1993-10-19 Richard Stallman <rms@gnu.org>
7343
7344 * bison.simple: *** empty log message ***
7345
7346 1993-10-14 Richard Stallman <rms@gnu.org>
7347
7348 * src/bison.s1: *** empty log message ***
7349
7350 1993-10-14 Richard Stallman <rms@gnu.org>
7351
7352 * bison.simple: *** empty log message ***
7353
7354 1993-09-14 David J. MacKenzie <djm@gnu.org>
7355
7356 * doc/bison.texinfo: *** empty log message ***
7357
7358 1993-09-13 Noah Friedman <friedman@gnu.org>
7359
7360 * Makefile.in: *** empty log message ***
7361
7362 1993-09-10 Richard Stallman <rms@gnu.org>
7363
7364 * src/conflicts.c: *** empty log message ***
7365
7366 * src/system.h: entered into RCS
7367
7368 1993-09-10 Richard Stallman <rms@gnu.org>
7369
7370 * doc/bison.1: entered into RCS
7371
7372 1993-09-06 Noah Friedman <friedman@gnu.org>
7373
7374 * src/version.c: entered into RCS
7375
7376 1993-09-06 Noah Friedman <friedman@gnu.org>
7377
7378 * Makefile.in: *** empty log message ***
7379
7380 1993-07-30 David J. MacKenzie <djm@gnu.org>
7381
7382 * Makefile.in: *** empty log message ***
7383
7384 1993-07-24 Richard Stallman <rms@gnu.org>
7385
7386 * src/bison.s1: *** empty log message ***
7387
7388 1993-07-24 Richard Stallman <rms@gnu.org>
7389
7390 * bison.simple: *** empty log message ***
7391
7392 1993-07-08 David J. MacKenzie <djm@gnu.org>
7393
7394 * Makefile.in: *** empty log message ***
7395
7396 1993-07-04 Richard Stallman <rms@gnu.org>
7397
7398 * src/bison.s1: *** empty log message ***
7399
7400 1993-07-04 Richard Stallman <rms@gnu.org>
7401
7402 * bison.simple: *** empty log message ***
7403
7404 1993-06-26 David J. MacKenzie <djm@gnu.org>
7405
7406 * src/getargs.c: entered into RCS
7407
7408 1993-06-26 David J. MacKenzie <djm@gnu.org>
7409
7410 * doc/bison.texinfo: *** empty log message ***
7411
7412 * doc/bison.1: New file.
7413
7414 1993-06-25 Richard Stallman <rms@gnu.org>
7415
7416 * src/getargs.c: New file.
7417
7418 1993-06-16 Richard Stallman <rms@gnu.org>
7419
7420 * src/bison.s1: *** empty log message ***
7421
7422 1993-06-16 Richard Stallman <rms@gnu.org>
7423
7424 * bison.simple: *** empty log message ***
7425
7426 1993-06-03 Richard Stallman <rms@gnu.org>
7427
7428 * src/bison.s1: New file.
7429
7430 1993-06-03 Richard Stallman <rms@gnu.org>
7431
7432 * doc/bison.texinfo: *** empty log message ***
7433
7434 1993-06-03 Richard Stallman <rms@gnu.org>
7435
7436 * bison.simple: New file.
7437
7438 1993-05-19 Richard Stallman <rms@gnu.org>
7439
7440 * doc/bison.texinfo: New file.
7441
7442 1993-05-07 Noah Friedman <friedman@gnu.org>
7443
7444 * Makefile.in: *** empty log message ***
7445
7446 1993-04-28 Noah Friedman <friedman@gnu.org>
7447
7448 * src/reader.c: *** empty log message ***
7449
7450 1993-04-23 Noah Friedman <friedman@gnu.org>
7451
7452 * src/alloc.h: entered into RCS
7453
7454 1993-04-20 David J. MacKenzie <djm@gnu.org>
7455
7456 * src/version.c: *** empty log message ***
7457
7458 * src/files.c, src/allocate.c:
7459 entered into RCS
7460
7461 * src/reader.c: *** empty log message ***
7462
7463 * src/lex.c: entered into RCS
7464
7465 * src/conflicts.c: New file.
7466
7467 * src/symtab.c: entered into RCS
7468
7469 * src/alloc.h: New file.
7470
7471 * src/LR0.c: entered into RCS
7472
7473 1993-04-18 Noah Friedman <friedman@gnu.org>
7474
7475 * src/reader.c: New file.
7476
7477 * src/version.c: *** empty log message ***
7478
7479 1993-04-18 Noah Friedman <friedman@gnu.org>
7480
7481 * Makefile.in: *** empty log message ***
7482
7483 1993-04-17 Noah Friedman <friedman@gnu.org>
7484
7485 * Makefile.in: *** empty log message ***
7486
7487 1993-04-15 Richard Stallman <rms@gnu.org>
7488
7489 * src/main.c, src/files.c:
7490 New file.
7491
7492 1993-04-15 Noah Friedman <friedman@gnu.org>
7493
7494 * configure.in: entered into RCS
7495
7496 * configure.in: *** empty log message ***
7497
7498 * configure.in: New file.
7499
7500 1993-04-14 Richard Stallman <rms@gnu.org>
7501
7502 * Makefile.in: New file.
7503
7504 1993-04-13 Richard Stallman <rms@gnu.org>
7505
7506 * src/version.c: New file.
7507
7508 1993-03-25 Richard Stallman <rms@gnu.org>
7509
7510 * src/output.c: entered into RCS
7511
7512 1992-09-25 Richard Stallman <rms@gnu.org>
7513
7514 * configure.bat: entered into RCS
7515
7516 1992-06-22 Richard Stallman <rms@gnu.org>
7517
7518 * src/vmsgetargs.c: entered into RCS
7519
7520 1992-06-22 Richard Stallman <rms@gnu.org>
7521
7522 * doc/bison.rnh: entered into RCS
7523
7524 1992-04-20 David J. MacKenzie <djm@gnu.org>
7525
7526 * README: entered into RCS
7527
7528 1992-01-22 Richard Stallman <rms@gnu.org>
7529
7530 * src/machine.h: entered into RCS
7531
7532 1991-12-21 Richard Stallman <rms@gnu.org>
7533
7534 * src/lalr.c, src/closure.c:
7535 entered into RCS
7536
7537 1991-12-20 Richard Stallman <rms@gnu.org>
7538
7539 * src/state.h: entered into RCS
7540
7541 1991-12-18 Richard Stallman <rms@gnu.org>
7542
7543 * src/print.c, src/nullable.c, src/derives.c:
7544 entered into RCS
7545
7546 1991-11-03 David J. MacKenzie <djm@gnu.org>
7547
7548 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
7549 entered into RCS
7550
7551 1988-09-09 Richard Stallman <rms@gnu.org>
7552
7553 * src/bison.hairy: entered into RCS
7554
7555 1987-12-16 Richard Stallman <rms@gnu.org>
7556
7557 * REFERENCES: entered into RCS
7558 -----
7559
7560 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
7561
7562 This file is part of GNU Autoconf.
7563
7564 GNU Autoconf is free software; you can redistribute it and/or modify
7565 it under the terms of the GNU General Public License as published by
7566 the Free Software Foundation; either version 2, or (at your option)
7567 any later version.
7568
7569 GNU Autoconf is distributed in the hope that it will be useful,
7570 but WITHOUT ANY WARRANTY; without even the implied warranty of
7571 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7572 GNU General Public License for more details.
7573
7574 You should have received a copy of the GNU General Public License
7575 along with autoconf; see the file COPYING. If not, write to
7576 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
7577 Boston, MA 02111-1307, USA.