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