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