1 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3 Accumulated changelog for new GLR parsing features.
5 * src/conflicts.c (count_total_conflicts): Change name to
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.
14 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
19 * data/bison.glr: Change name to glr.c
20 * data/glr.c: Renamed from bison.glr.
21 * data/Makefile.am: Add glr.c
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.
28 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
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.
34 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
36 * data/bison.glr: Bring up to date with changes to bison.simple.
38 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
40 * data/bison.glr: Correct definitions that use b4_prefix.
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.
48 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
50 * src/reader.h: Add declaration for free_merger_functions.
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.
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.
78 * src/gram.c (glr_parser): New flag.
79 (grammar_free): Call free_merger_functions.
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
86 (conflicts_print): Ditto.
87 (count_total_conflicts): New function.
89 * src/reader.h (merger_list): New type.
90 (merge_functions): New variable.
92 * src/lex.h (tok_dprec, tok_merge): New token types.
94 * src/gram.h (rule_s): Add dprec and merger fields.
95 (glr_parser): New flag.
97 * src/conflicts.h (count_total_conflicts): New function.
99 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
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").
107 * data/bison.glr: New skeleton for GLR parsing.
109 * tests/cxx-gram.at: New tests for GLR parsing.
111 * tests/testsuite.at: Include cxx-gram.at.
113 * tests/Makefile.am: Add cxx-gram.at.
117 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
119 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
121 2002-06-27 Akim Demaille <akim@epita.fr>
123 * src/options.h, src/options.c: Remove.
124 * src/getargs.c (short_options, long_options): New.
126 2002-06-27 Akim Demaille <akim@epita.fr>
128 * data/bison.simple, data/bison.c++: Rename as...
129 * data/yacc.c, data/lalr1.cc: these.
130 * doc/bison.texinfo (Environment Variables): Remove.
132 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
134 * src/getargs.c (report_argmatch): Initialize strtok().
136 2002-06-20 Akim Demaille <akim@epita.fr>
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
143 2002-06-20 Akim Demaille <akim@epita.fr>
145 * data/bison.simple (yydestructor): Rename as...
148 2002-06-20 Akim Demaille <akim@epita.fr>
150 * src/symtab.h, src/symtab.c (symbol_type_set)
151 (symbol_destructor_set, symbol_precedence_set): The location is
155 2002-06-20 Akim Demaille <akim@epita.fr>
157 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
159 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
161 * src/symtab.h, src/symtab.c (symbol_class_set)
162 (symbol_user_token_number_set): Likewise.
165 * tests/input.at (Type Clashes): Adjust.
167 2002-06-20 Akim Demaille <akim@epita.fr>
169 * data/bison.simple (YYLEX): Fix the declaration when
172 2002-06-20 Akim Demaille <akim@epita.fr>
174 * data/bison.simple (yysymprint): Don't print the token number,
176 * tests/actions.at (Destructors): Rename as...
177 (Printers and Destructors): this.
178 Also exercise %printer.
180 2002-06-20 Akim Demaille <akim@epita.fr>
182 * data/bison.simple (YYDSYMPRINT): New.
183 Use it to remove many of the #if YYDEBUG/if (yydebug).
185 2002-06-20 Akim Demaille <akim@epita.fr>
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!).
204 2002-06-20 Akim Demaille <akim@epita.fr>
206 * src/scan-gram.l: Complete the scanner with the missing patterns
208 Use `quote' and `symbol_tag_get' where appropriate.
210 2002-06-19 Akim Demaille <akim@epita.fr>
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
219 2002-06-19 Akim Demaille <akim@epita.fr>
221 * data/bison.simple (b4_pure_if): New.
222 Use it instead of #ifdef YYPURE.
224 2002-06-19 Akim Demaille <akim@epita.fr>
226 * data/bison.simple (b4_location_if): New.
227 Use it instead of #ifdef YYLSP_NEEDED.
229 2002-06-19 Akim Demaille <akim@epita.fr>
231 Prepare @$ in %destructor, but currently don't bind it in the
232 skeleton, as %location use is not cleaned up yet.
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'.
241 * data/bison.simple (b4_eval): Remove.
242 (b4_symbol_destructor): Adjust.
243 * tests/input.at (Invalid @n): Adjust.
245 2002-06-19 Zack Weinberg <zack@codesourcery.com>
247 * doc/bison.texinfo: Document ability to have multiple
250 2002-06-18 Akim Demaille <akim@epita.fr>
252 * src/files.c (compute_base_names): When computing the output file
253 names from the input file name, strip the directory part.
255 2002-06-18 Akim Demaille <akim@epita.fr>
257 * data/bison.simple.new: Comment changes.
258 Reported by Andreas Schwab.
260 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
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.
266 2002-06-18 Akim Demaille <akim@epita.fr>
268 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
270 (symbol_destructor_set): Adjust.
271 * src/output.c (symbol_destructors_output): Output the destructor
273 Output the symbol name.
274 * data/bison.simple (b4_symbol_destructor): Adjust.
276 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
277 and Akim Demaille <akim@epita.fr>
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.
283 2002-06-17 Akim Demaille <akim@epita.fr>
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
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.
300 * tests/actions.at (Destructors): New.
301 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
303 2002-06-17 Akim Demaille <akim@epita.fr>
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
310 * src/symtab.c: Don't access directly to the symbol tag, use
312 * src/parse-gram.y: Use symbol_list_free.
314 2002-06-17 Akim Demaille <akim@epita.fr>
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.
321 (symbol_list_free): New.
322 * src/scan-gram.l (handle_dollar): Takes a location.
323 * tests/input.at (Invalid $n): Adjust.
325 2002-06-17 Akim Demaille <akim@epita.fr>
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.
336 2002-06-15 Akim Demaille <akim@epita.fr>
338 * src/parse-gram.y: Move %token in the declaration section so that
339 we don't depend upon CVS Bison.
341 2002-06-15 Akim Demaille <akim@epita.fr>
343 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
344 * src/print.c (print_core): Use it.
346 2002-06-15 Akim Demaille <akim@epita.fr>
348 * src/conflicts.c (log_resolution): Accept the rule involved in
349 the sr conflicts instead of the lookahead number that points to
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.
358 2002-06-15 Akim Demaille <akim@epita.fr>
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.
367 2002-06-15 Akim Demaille <akim@epita.fr>
369 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
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.
376 2002-06-15 Akim Demaille <akim@epita.fr>
378 Copy BYacc's nice way to report the grammar.
380 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
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.
386 2002-06-15 Akim Demaille <akim@epita.fr>
388 Complete and rationalize `useless thing' warnings.
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.
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.
405 2002-06-15 Akim Demaille <akim@epita.fr>
407 Let symbols have a location.
409 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
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
416 * tests/regression.at (Invalid inputs): Adjust.
418 2002-06-15 Akim Demaille <akim@epita.fr>
420 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
421 (input): Don't try to initialize yylloc here, do it in the
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
438 2002-06-14 Akim Demaille <akim@epita.fr>
440 Grammar declarations may be found in the grammar section.
442 * src/parse-gram.y (rules_or_grammar_declaration): New.
443 (declarations): Each declaration may end with a semicolon, not
445 (grammar_declaration): `"%union"'.
446 (grammar): Branch to rules_or_grammar_declaration.
448 2002-06-14 Akim Demaille <akim@epita.fr>
450 * src/main.c (main): Invoke scanner_free.
452 2002-06-14 Akim Demaille <akim@epita.fr>
454 * src/output.c (m4_invoke): Extracted from...
455 (output_skeleton): here.
458 2002-06-14 Akim Demaille <akim@epita.fr>
460 * src/parse-gram.y (directives, directive, gram)
461 (grammar_directives, precedence_directives, precedence_directive):
463 (declarations, declaration, grammar, grammar_declaration)
464 (precedence_declaration, precedence_declarator): these.
465 (symbol_declaration): New.
467 2002-06-14 Akim Demaille <akim@epita.fr>
469 * src/files.c (action_obstack): Remove, unused.
470 (output_obstack): Remove it, and all its dependencies, as it is no
472 * src/reader.c (epilogue_set): Build the epilogue in the
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.
478 * src/main.c (main): Call it.
480 2002-06-14 Akim Demaille <akim@epita.fr>
482 * src/location.h: New, extracted from...
483 * src/reader.h: here.
484 * src/Makefile.am (noinst_HEADERS): Merge into
485 (bison_SOURCES): this.
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.
491 2002-06-14 Akim Demaille <akim@epita.fr>
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.
497 2002-06-12 Akim Demaille <akim@epita.fr>
499 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
501 * tests/actions.at (Exotic Dollars): New.
503 2002-06-12 Akim Demaille <akim@epita.fr>
505 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
507 * tests/input.at (Torturing the Scanner): New.
509 2002-06-11 Akim Demaille <akim@epita.fr>
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.
517 2002-06-11 Akim Demaille <akim@epita.fr>
519 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
521 (scanner_last_string_free): New.
523 2002-06-11 Akim Demaille <akim@epita.fr>
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.
530 2002-06-11 Akim Demaille <akim@epita.fr>
532 Have Bison grammars parsed by a Bison grammar.
534 * src/reader.c, src/reader.h (prologue_augment): New.
535 * src/reader.c (copy_definition): Remove.
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.
548 * src/reader.c (read_declarations): Remove, unused.
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.
557 * src/reader.c (copy_dollar): Replace with...
558 * src/scan-gram.h (handle_dollar): this.
559 * src/parse-gram.y: Remove `%thong'.
561 * src/reader.c (copy_at): Replace with...
562 * src/scan-gram.h (handle_at): this.
564 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
567 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
570 * src/reader.h, src/reader.c (grammar_rule_end): New.
572 * src/parse.y (current_type, current_class): New.
573 Implement `%nterm', `%token' support.
574 Merge `%term' into `%token'.
576 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
579 * src/parse-gram.y: Be sure to handle properly the beginning of
582 * src/parse-gram.y: Handle %type.
583 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
585 * src/parse-gram.y: More directives support.
586 * src/options.c: No longer handle source directives.
588 * src/parse-gram.y: Fix %output.
590 * src/parse-gram.y: Handle %union.
591 Use the prologue locations.
592 * src/reader.c (parse_union_decl): Remove.
594 * src/reader.h, src/reader.c (epilogue_set): New.
595 * src/parse-gram.y: Use it.
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.
601 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
603 * src/output.c (actions_output): Don't output braces, as they are
604 already handled by the scanner.
606 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
607 characters to themselves.
609 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
610 that the epilogue has a proper #line.
612 * src/parse-gram.y: Handle precedence/associativity.
614 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
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.
620 * src/scan-gram.l: Escape M4 characters.
622 * src/scan-gram.l: Working properly with escapes in user
625 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
626 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
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
632 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
633 stricter %token grammar.
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.
639 * tests/regression.at (Invalid %directive): Remove, as it is now
641 (Invalid inputs): Adjust to the new error messages.
642 (Token definitions): The new grammar doesn't allow too many
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.
653 2002-06-11 Akim Demaille <akim@epita.fr>
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
661 Remove `action_flag', `rulelength', unused now.
663 2002-06-11 Akim Demaille <akim@epita.fr>
665 * src/reader.c (grammar_current_rule_prec_set).
666 (grammar_current_rule_check): New, eved out from...
668 Remove `xaction', `first_rhs': useless.
669 * tests/input.at (Type clashes): New.
670 * tests/existing.at (GNU Cim Grammar): Adjust.
672 2002-06-11 Akim Demaille <akim@epita.fr>
674 * src/reader.c (grammar_midrule_action): New, Eved out from
677 2002-06-11 Akim Demaille <akim@epita.fr>
679 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
681 (readgram): Use them as replacement of inlined code, crule and
684 2002-06-11 Akim Demaille <akim@epita.fr>
686 * src/reader.c (grammar_end, grammar_symbol_append): New.
687 (readgram): Use them.
688 Make the use of `p' as local as possible.
690 2002-06-10 Akim Demaille <akim@epita.fr>
692 GCJ's parser requires the tokens to be defined before the prologue.
694 * data/bison.simple: Output the token definition before the user's
696 * tests/regression.at (Braces parsing, Duplicate string)
697 (Mixing %token styles): Check the output from bison.
698 (Early token definitions): New.
700 2002-06-10 Akim Demaille <akim@epita.fr>
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
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.
709 2002-06-10 Akim Demaille <akim@epita.fr>
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.
717 2002-06-10 Akim Demaille <akim@epita.fr>
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.
724 * src/reader.c (parse_thong_decl): Remove.
725 * src/options.c (option_table): Remove "thong".
726 * src/lex.h (tok_thong): Remove.
728 2002-06-10 Akim Demaille <akim@epita.fr>
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.
735 2002-06-09 Akim Demaille <akim@epita.fr>
737 Move symbols handling code out of the reader.
739 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
741 * src/symtab.h, src/symtab.c: here.
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.
748 * src/reader.c (symbol_check_defined, symbol_make_alias)
749 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
750 (token_translations_init)
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
758 2002-06-03 Akim Demaille <akim@epita.fr>
760 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
763 2002-06-03 Akim Demaille <akim@epita.fr>
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
770 * src/getargs.c (usage): Split long literal strings.
771 Reported by Hans Aberg.
773 2002-05-28 Akim Demaille <akim@epita.fr>
775 * data/bison.c++: Use C++ ostreams.
776 (cdebug_): New member.
778 2002-05-28 Akim Demaille <akim@epita.fr>
780 * src/output.c (output_skeleton): Be sure to allocate enough room
781 for `/' _and_ for `\0' in full_skeleton.
783 2002-05-28 Akim Demaille <akim@epita.fr>
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_,
791 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
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.
798 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
800 * src/conflicts.c (log_resolution): Correct typo:
801 obstack_printf should be obstack_fgrow1.
803 2002-05-26 Akim Demaille <akim@epita.fr>
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.
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
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.
822 2002-05-26 Akim Demaille <akim@epita.fr>
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):
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.
834 2002-05-26 Akim Demaille <akim@epita.fr>
836 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
838 * data/bison.simple (yystos) [YYDEBUG]: New.
839 (yyparse) [YYDEBUG]: Display the symbols which are popped during
841 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
843 2002-05-25 Akim Demaille <akim@epita.fr>
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
851 Adjust all dependencies.
852 (report_args, report_types, report_argmatch): New.
853 (usage, getargs): Report/support -r, --report.
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
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.
866 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
867 and Paul Eggert <eggert@twinsun.com>
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.
876 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
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.
887 * tests/regression.at: Modify expected output to agree with change
888 to yyr1 and yytranslate.
890 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
892 * src/reader.c (parse_action): Use copy_character instead of
895 2002-05-13 Akim Demaille <akim@epita.fr>
897 * tests/regression.at (Token definitions): Prototype yylex and
900 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
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
905 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
907 2002-05-07 Akim Demaille <akim@epita.fr>
909 * tests/synclines.at: Be sure to prototype yylex and yyerror to
912 2002-05-07 Akim Demaille <akim@epita.fr>
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
924 (muscle_insert_int_table): Remove, unused.
925 (prepare_rules): Remove `max'.
927 2002-05-06 Akim Demaille <akim@epita.fr>
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):
933 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
935 2002-05-06 Akim Demaille <akim@epita.fr>
937 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
940 2002-05-06 Akim Demaille <akim@epita.fr>
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'.
947 2002-05-06 Akim Demaille <akim@epita.fr>
949 * src/reader.c (packgram): No longer end `ritem' with a 0
950 sentinel: it is not used.
952 2002-05-05 Akim Demaille <akim@epita.fr>
954 New experimental feature: display the lookaheads in the report and
957 * src/print (print_core): When --trace-flag, display the rules
959 * src/print_graph.c (print_core): Likewise.
963 2002-05-05 Akim Demaille <akim@epita.fr>
965 * tests/torture.at (Many lookaheads): New test.
967 2002-05-05 Akim Demaille <akim@epita.fr>
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.
977 (prepare_tokens): Don't free `translations', since...
978 * src/reader.h, src/reader.c (grammar_free): do it.
980 * src/gram.h, src/gram.c (grammar_free): here.
981 * data/bison.simple, data/bison.c++: b4_token_number_max is now
984 2002-05-05 Akim Demaille <akim@epita.fr>
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'.
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.
996 2002-05-04 Akim Demaille <akim@epita.fr>
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.
1005 2002-05-03 Paul Eggert <eggert@twinsun.com>
1007 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
1010 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
1012 * Makefile.am (SUBDIRS): Remove intl.
1013 (EXTRA_DIST): Add config/config.rpath.
1015 2002-05-03 Akim Demaille <akim@epita.fr>
1017 * data/bison.simple (m4_if): Don't output empty enums.
1018 And actually, output valid enum definitions :(.
1020 2002-05-03 Akim Demaille <akim@epita.fr>
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.
1027 2002-05-03 Akim Demaille <akim@epita.fr>
1029 * configure.in (GETTEXT_VERSION): New.
1030 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
1032 2002-05-03 Akim Demaille <akim@epita.fr>
1034 * data/bison.simple (b4_token_enum): New.
1035 (b4_token_defines): Use it to output tokens both as #define and
1037 Suggested by Paul Eggert.
1038 * src/output.c (token_definitions_output): Don't output spurious
1041 2002-05-03 Akim Demaille <akim@epita.fr>
1043 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
1045 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
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.
1050 2002-05-02 Akim Demaille <akim@epita.fr>
1052 * data/bison.simple (yyparse): Do not implement @$ = @1.
1053 (YYLLOC_DEFAULT): Adjust to do it.
1054 * doc/bison.texinfo (Location Default Action): Fix.
1056 2002-05-02 Akim Demaille <akim@epita.fr>
1058 * src/reader.c (parse_braces): Merge into...
1059 (parse_action): this.
1061 2002-05-02 Akim Demaille <akim@epita.fr>
1063 * configure.in (ALL_LINGUAS): Remove.
1064 * po/LINGUAS, hr.po: New.
1066 2002-05-02 Akim Demaille <akim@epita.fr>
1068 Remove the so called hairy (semantic) parsers.
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
1076 * src/output.c, src/output.h (guards_output): Remove.
1078 (token_definitions_output): Don't output the `T'
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
1084 Adjust dependencies.
1085 (parse_guard): Remove.
1086 * data/bison.hairy: Remove.
1087 * doc/bison.texinfo (Environment Variables): Remove occurrences of
1090 2002-05-02 Akim Demaille <akim@epita.fr>
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.
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
1102 * data/bison.simple, data/bison.c++ (b4_lhs_value)
1103 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
1105 2002-05-02 Akim Demaille <akim@epita.fr>
1107 * configure.in (AC_INIT): Bump to 1.49b.
1108 (AM_INIT_AUTOMAKE): Short invocation.
1110 2002-05-02 Akim Demaille <akim@epita.fr>
1114 2002-05-01 Akim Demaille <akim@epita.fr>
1116 * src/skeleton.h: Remove.
1118 2002-05-01 Akim Demaille <akim@epita.fr>
1120 * src/skeleton.h: Fix the #endif.
1121 Reported by Magnus Fromreide.
1123 2002-04-26 Paul Eggert <eggert@twinsun.com>
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.
1129 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
1131 * src/scan-skel.l: Postprocess quadrigraphs.
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.
1141 * tests/calc.at: Exercise M4 quoting.
1143 2002-04-25 Akim Demaille <akim@epita.fr>
1145 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
1146 between `!' and the command.
1147 Reported by Paul Eggert.
1149 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
1151 * tests/calc.at: Exercise prologue splitting.
1153 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
1154 `b4_post_prologue' instead of `b4_prologue'.
1156 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
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.
1166 2002-04-23 Paul Eggert <eggert@twinsun.com>
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).
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.
1177 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
1179 2002-04-23 Akim Demaille <akim@epita.fr>
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.
1187 2002-04-22 Akim Demaille <akim@epita.fr>
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.
1194 2002-04-22 Akim Demaille <akim@epita.fr>
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.
1200 2002-04-22 Akim Demaille <akim@epita.fr>
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.
1206 2002-04-22 Akim Demaille <akim@epita.fr>
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)).
1218 2002-04-22 Akim Demaille <akim@epita.fr>
1220 Propagate more token_number_t.
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.
1232 2002-04-22 Akim Demaille <akim@epita.fr>
1234 * src/output.h, src/output.c (get_lines_number): Remove.
1236 2002-04-19 Akim Demaille <akim@epita.fr>
1238 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
1240 (Debugging): More details about enabling the debugging features.
1241 (Table of Symbols): Describe $$, $n, @$, and @n.
1242 Suggested by Tim Josling.
1244 2002-04-19 Akim Demaille <akim@epita.fr>
1246 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
1248 2002-04-10 Akim Demaille <akim@epita.fr>
1250 * src/system.h: Rely on HAVE_LIMITS_H.
1251 Suggested by Paul Eggert.
1253 2002-04-09 Akim Demaille <akim@epita.fr>
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.
1264 Error message are for stderr, not stdout.
1266 2002-04-09 Akim Demaille <akim@epita.fr>
1268 * src/gram.h, src/gram.c (error_token_number): Remove, use
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
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
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.
1287 * tests/conflicts.at (Solved SR Conflicts)
1288 (Unresolved SR Conflicts): Adjust.
1289 * tests/regression.at (Web2c Actions): Adjust.
1291 2002-04-08 Akim Demaille <akim@epita.fr>
1293 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
1295 Remove the duplicate `typedefs'.
1296 (RhsNumberType): Fix the declaration and various other typos.
1298 * data/bison.simple: Use __ofile__.
1299 * src/scan-skel.l: Handle __ofile__.
1301 2002-04-08 Akim Demaille <akim@epita.fr>
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
1307 Adjust all dependencies (pretty many).
1308 * src/reduce.c (rule): Remove this `short *' pointer: use
1310 * src/system.h (MINSHORT, MAXSHORT): Remove.
1312 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
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
1320 * tests/regression.at (Web2c Actions): Ajust.
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
1327 * src/state.h (state_h): Code input lines on ints, not shorts.
1329 2002-04-08 Akim Demaille <akim@epita.fr>
1331 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
1332 and then the grammar.
1334 2002-04-08 Akim Demaille <akim@epita.fr>
1336 * src/system.h: No longer using strndup.
1338 2002-04-07 Akim Demaille <akim@epita.fr>
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):
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
1349 * tests/regression.at (Web2c Actions): Adjust.
1351 2002-04-07 Akim Demaille <akim@epita.fr>
1353 * tests/torture.at (Big triangle): New.
1354 (GNU AWK Grammar, GNU Cim Grammar): Move to...
1355 * tests/existing.at: here.
1357 2002-04-07 Akim Demaille <akim@epita.fr>
1359 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
1361 Adjust dependencies.
1363 2002-04-07 Akim Demaille <akim@epita.fr>
1365 * src/reader.c: Normalize increments to prefix form.
1367 2002-04-07 Akim Demaille <akim@epita.fr>
1369 * src/reader.c, symtab.c: Remove debugging code.
1371 2002-04-07 Akim Demaille <akim@epita.fr>
1373 Rename all the `bucket's as `symbol_t'.
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...
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.
1388 2002-04-07 Akim Demaille <akim@epita.fr>
1390 Use lib/hash for the symbol table.
1392 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
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
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.
1409 2002-04-07 Akim Demaille <akim@epita.fr>
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):
1417 (errtoken, eoftoken, undeftoken, axiom): Extern.
1419 2002-04-07 Akim Demaille <akim@epita.fr>
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.
1426 2002-04-07 Akim Demaille <akim@epita.fr>
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.
1431 2002-04-07 Akim Demaille <akim@epita.fr>
1433 * src/lalr.h (LA): Is a bitsetv, not bitset*.
1435 2002-04-07 Akim Demaille <akim@epita.fr>
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.
1441 2002-04-07 Akim Demaille <akim@epita.fr>
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.
1448 2002-04-07 Akim Demaille <akim@epita.fr>
1450 As a result of the previous patch, it is no longer needed
1451 to reorder ritem itself.
1453 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
1455 2002-04-07 Akim Demaille <akim@epita.fr>
1457 Be sure never to walk through RITEMS, but use only data related to
1458 the rules themselves. RITEMS should be banished.
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.
1474 2002-04-07 Akim Demaille <akim@epita.fr>
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
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
1486 As a result, now the rule 0, reducing to $axiom, is visible in the
1487 outputs. Adjust the test suite.
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.
1494 2002-04-07 Akim Demaille <akim@epita.fr>
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.
1500 2002-04-07 Akim Demaille <akim@epita.fr>
1502 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
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'.
1512 2002-04-07 Akim Demaille <akim@epita.fr>
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.
1525 2002-04-07 Akim Demaille <akim@epita.fr>
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...
1531 2002-04-07 Akim Demaille <akim@epita.fr>
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.
1537 2002-04-07 Akim Demaille <akim@epita.fr>
1539 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
1540 Normalize loops to using `< nrules + 1', not `<= nrules'.
1542 2002-04-07 Akim Demaille <akim@epita.fr>
1546 2002-04-07 Akim Demaille <akim@epita.fr>
1548 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
1549 bucket.value as bucket.number.
1551 2002-04-07 Akim Demaille <akim@epita.fr>
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.
1558 2002-04-04 Paul Eggert <eggert@twinsun.com>
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.
1566 2002-04-03 Paul Eggert <eggert@twinsun.com>
1568 * src/bison.data (YYSTACK_ALLOC): Depend on whether
1569 YYERROR_VERBOSE is nonzero, not whether it is defined.
1571 Merge changes from bison-1_29-branch.
1573 2002-03-20 Paul Eggert <eggert@twinsun.com>
1575 Merge fixes from Debian bison_1.34-1.diff.
1577 * configure.in (AC_PREREQ): 2.53.
1579 2002-03-20 Akim Demaille <akim@epita.fr>
1581 * src/conflicts.c (log_resolution): Argument `resolution' is const.
1583 2002-03-19 Paul Eggert <eggert@twinsun.com>
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.
1590 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
1591 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1593 2002-03-19 Akim Demaille <akim@epita.fr>
1595 Test and fix the #line outputs.
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.
1604 2002-03-19 Akim Demaille <akim@epita.fr>
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.
1611 2002-03-19 Akim Demaille <akim@epita.fr>
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'.
1620 2002-03-14 Akim Demaille <akim@epita.fr>
1624 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
1626 * data/bison.c++: Make the user able to add members to the generated
1627 parser by subclassing.
1629 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
1631 * src/reader.c (read_additionnal_code): `c' should be an integer, not
1633 Reported by Nicolas Tisserand and Nicolas Burrus.
1635 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
1637 * src/reader.c: Warn about lacking semi-colons, do not complain.
1639 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
1641 * data/bison.c++: Remove a debug line.
1643 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
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.
1649 2002-03-04 Akim Demaille <akim@epita.fr>
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
1658 2002-03-04 Akim Demaille <akim@epita.fr>
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
1664 * src/warshall.h, src/warshall.c: Remove.
1665 * tests/sets.at (Broken Closure): Adjust.
1667 2002-03-04 Akim Demaille <akim@epita.fr>
1669 * src/output.c (output_skeleton): tempdir is const.
1670 bytes_read is unused.
1672 2002-03-04 Akim Demaille <akim@epita.fr>
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:
1679 2002-03-04 Akim Demaille <akim@epita.fr>
1681 * src/closure.c (closure): `r' is unused.
1683 2002-03-04 Akim Demaille <akim@epita.fr>
1685 * tests/sets.at (Broken Closure): Add the ending `;'.
1686 * src/reader.at (readgram): Complain if a rule is not ended with a
1689 2002-03-04 Akim Demaille <akim@epita.fr>
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.
1697 2002-03-04 Akim Demaille <akim@epita.fr>
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.
1703 2002-03-04 Akim Demaille <akim@epita.fr>
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.
1710 2002-03-04 Akim Demaille <akim@epita.fr>
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.
1716 2002-03-04 Akim Demaille <akim@epita.fr>
1718 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
1720 Reported by Benoit Perrot.
1722 2002-03-04 Akim Demaille <akim@epita.fr>
1724 Use bitset operations when possible, not loops over bits.
1726 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
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.
1732 2002-03-04 Akim Demaille <akim@epita.fr>
1734 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
1735 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
1738 2002-03-04 Akim Demaille <akim@epita.fr>
1740 * src/lalr.c (F): Now a bitset*.
1741 Adjust all dependencies.
1743 2002-03-04 Akim Demaille <akim@epita.fr>
1745 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
1746 Adjust all dependencies.
1748 2002-03-04 Akim Demaille <akim@epita.fr>
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
1754 Adjust all dependencies.
1756 2002-03-04 Akim Demaille <akim@epita.fr>
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.
1763 2002-03-04 Akim Demaille <akim@epita.fr>
1765 * src/print.c: Convert to use bitset.h, not hand coded iterations
1768 2002-03-04 Akim Demaille <akim@epita.fr>
1770 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1772 2002-03-04 Akim Demaille <akim@epita.fr>
1774 * src/closure.c (ruleset): Be a bitset.
1775 (rulesetsize): Remove.
1777 2002-03-04 Akim Demaille <akim@epita.fr>
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.
1784 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
1786 * data/bison.c++: Merge the two generated headers. Insert a copyright
1787 notice in each output file.
1789 2002-02-28 Akim Demaille <akim@epita.fr>
1791 * data/bison.c++: Copy the prologue of bison.simple to fetch
1792 useful M4 definitions, such as b4_header_guard.
1794 2002-02-25 Akim Demaille <akim@epita.fr>
1796 * src/getargs.c (version): Give the name of the authors, and use a
1797 translator friendly scheme for the bgr
1800 2002-02-25 Akim Demaille <akim@epita.fr>
1802 * src/output.c (header_output): Remove, now handled completely via
1805 2002-02-25 Akim Demaille <akim@epita.fr>
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
1812 2002-02-25 Akim Demaille <akim@epita.fr>
1814 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1816 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1817 * src/output.c (output_skeleton): Use mkstemp to create a real
1819 Move the filling of `skeleton' and its muscle to...
1821 (output): Move the definition of the prologue muscle to...
1823 * src/system.h (DEFAULT_TMPDIR): New.
1825 2002-02-14 Paul Eggert <eggert@twinsun.com>
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.
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.
1840 2002-02-14 Akim Demaille <akim@epita.fr>
1842 * tests/regression.at (else): Adjust to Andreas' change.
1844 2002-02-14 Akim Demaille <akim@epita.fr>
1846 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1848 2002-02-13 Andreas Schwab <schwab@suse.de>
1850 * src/output.c (output_rule_data): Don't output NULL, it might
1853 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
1855 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1856 (Copyright notice): Update.
1858 2002-02-11 Akim Demaille <akim@epita.fr>
1860 * tests/regression.at (%nonassoc and eof): Don't include
1861 nonportable headers.
1863 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
1865 * data/bison.c++: Correct error recovery. Make the user able to
1866 initialize the starting location.
1868 2002-02-07 Akim Demaille <akim@epita.fr>
1870 * tests/input.at: New.
1872 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
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.
1878 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
1880 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1882 (yy::b4_name::parse): Use print_.
1884 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
1886 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1888 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
1890 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1892 (yy::b4_name::parse): Build verbose error messages, and use error_.
1894 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
1896 * data/bison.c++: Fix m4 quoting in comments.
1898 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
1900 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1903 2002-02-05 Akim Demaille <akim@epita.fr>
1905 * data/bison.c++: Adjust to the M4 back end.
1906 More is certainly needed.
1908 2002-02-05 Akim Demaille <akim@epita.fr>
1910 Give a try to M4 as a back end.
1912 * lib/readpipe.c: New, from wdiff.
1913 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
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
1925 (output_skeleton): Don't look for the skeleton location, let m4 do
1927 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
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
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.
1945 2002-02-05 Akim Demaille <akim@epita.fr>
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.
1951 2002-02-05 Akim Demaille <akim@epita.fr>
1953 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1954 which have no values.
1956 2002-02-05 Akim Demaille <akim@epita.fr>
1958 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1961 2002-01-29 Paul Eggert <eggert@twinsun.com>
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).
1967 2002-01-27 Akim Demaille <akim@epita.fr>
1969 Fix `%nonassoc and eof'.
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);
1975 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1977 * tests/regression.at (%nonassoc and eof): Adjust to newest
1978 Autotest: `.' is not in the PATH.
1980 2002-01-27 Akim Demaille <akim@epita.fr>
1982 * tests/sets.at (AT_EXTRACT_SETS): New.
1986 2002-01-26 Akim Demaille <akim@epita.fr>
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.
1992 2002-01-25 Akim Demaille <akim@epita.fr>
1994 * tests/regression.at (%nonassoc and eof): New.
1995 Suggested by Robert Anisko.
1997 2002-01-24 Akim Demaille <akim@epita.fr>
1999 Bison dumps core when trying to complain about broken input files.
2000 Reported by Cris van Pelt.
2002 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
2003 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
2005 (Invalid inputs): Strengthen: exercise parse_percent_token.
2007 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
2009 * src/Makefile.am: Add bison.c++.
2010 * src/bison.c++: New skeleton.
2012 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
2016 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
2018 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
2020 2002-01-20 Marc Autret <marc@gnu.org>
2022 * src/files.c (compute_output_file_names): Fix
2024 2002-01-20 Marc Autret <marc@gnu.org>
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.
2031 2002-01-20 Marc Autret <marc@gnu.org>
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.
2037 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
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).
2044 2002-01-11 Akim Demaille <akim@epita.fr>
2046 * configure.in: Use AC_FUNC_STRNLEN.
2047 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
2049 2002-01-09 Akim Demaille <akim@epita.fr>
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
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.
2063 2002-01-09 Akim Demaille <akim@epita.fr>
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.
2071 2002-01-08 Akim Demaille <akim@epita.fr>
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.
2080 2002-01-08 Akim Demaille <akim@epita.fr>
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
2088 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
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.
2096 2002-01-06 Akim Demaille <akim@epita.fr>
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.
2104 2002-01-06 Akim Demaille <akim@epita.fr>
2106 Bison is dead wrong in its RR conflict reports.
2108 * tests/torture.at (GNU Cim Grammar): New.
2109 * src/conflicts.c (count_rr_conflicts): Fix.
2111 2002-01-06 Akim Demaille <akim@epita.fr>
2113 Creating package.m4 from configure.ac causes too many problems.
2115 * tests/Makefile.am (package.m4): Create it by hand,
2116 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
2118 2002-01-06 Akim Demaille <akim@epita.fr>
2120 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
2123 2002-01-04 Paul Eggert <eggert@twinsun.com>
2125 * doc/bison.texinfo (Debugging):
2126 Remove YYSTDERR; it's no longer defined or used.
2127 Also, s/cstdio.h/cstdio/.
2129 2002-01-03 Akim Demaille <akim@epita.fr>
2131 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
2133 2002-01-03 Akim Demaille <akim@epita.fr>
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
2139 2002-01-03 Akim Demaille <akim@epita.fr>
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/.
2148 2002-01-03 Akim Demaille <akim@epita.fr>
2150 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
2151 for non system headers.
2153 2002-01-02 Akim Demaille <akim@epita.fr>
2155 Equip the skeleton chain with location tracking, runtime trace,
2156 pure parser and scanner.
2158 * src/parse-skel.y: Request a pure parser, locations, and prefix
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...
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.
2170 2001-12-30 Akim Demaille <akim@epita.fr>
2172 * src/parse-skel.y: Get rid of the shift/reduce conflict:
2173 replace `gb' with BLANKS.
2174 * src/scan-skel.l: Adjust.
2176 2001-12-30 Akim Demaille <akim@epita.fr>
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
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.
2189 2001-12-30 Akim Demaille <akim@epita.fr>
2191 * src/skeleton.h: New.
2192 * src/output.c (output_parser, output_master_parser): Remove, dead
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.
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'.
2206 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
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...
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
2219 * src/files.h (strsuffix, stringappend): Add declarations.
2220 (tab_extension): Add declaration.
2221 (short_base_name): Add declaration.
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
2229 (short_base_name): No longer static.
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.
2237 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
2239 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
2242 * src/parse-skel.y: New file.
2243 * src/scan-skel.l: New file.
2245 2001-12-29 Akim Demaille <akim@epita.fr>
2247 %name-prefix is broken.
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
2254 Renaming yylval but not yylloc is not consistent. Now we do.
2256 * src/bison.simple: Prefix yylloc if used.
2257 * doc/bison.texinfo (Decl Summary): Document that.
2259 2001-12-29 Akim Demaille <akim@epita.fr>
2261 * doc/bison.texinfo: Promote `%long-directive' over
2263 Remove all references to fixed-output-files, yacc is enough.
2265 2001-12-29 Akim Demaille <akim@epita.fr>
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.
2272 2001-12-29 Akim Demaille <akim@epita.fr>
2274 * src/output.c (header_output): Don't forget to export YYLTYPE and
2276 * tests/headers.at (export YYLTYPE): New, make sure it does.
2277 * tests/regression.at (%union and --defines, Invalid CPP headers):
2279 * tests/headers.at: here.
2281 2001-12-29 Akim Demaille <akim@epita.fr>
2283 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
2285 2001-12-29 Akim Demaille <akim@epita.fr>
2287 * tests/actions.at (Mid-rule actions): Output on a single line
2290 2001-12-29 Akim Demaille <akim@epita.fr>
2292 * doc/bison.texinfo: Formatting changes.
2294 2001-12-29 Akim Demaille <akim@epita.fr>
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.
2299 * src/output.c (token_definitions_output): New.
2300 (output_parser, header_output): Use it.
2301 * src/reader.c (symbols_save): Remove.
2303 2001-12-29 Akim Demaille <akim@epita.fr>
2305 * src/bison.simple: Do not provide a default for YYSTYPE and
2306 YYLTYPE before the user's prologue. Otherwise it's hardly... a
2309 2001-12-29 Akim Demaille <akim@epita.fr>
2311 Mid-rule actions are simply... ignored!
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
2316 * tests/actions.at (Mid-rule actions): New.
2318 2001-12-29 Akim Demaille <akim@epita.fr>
2322 * src/reader.c (reader): Free grammar.
2324 2001-12-29 Akim Demaille <akim@epita.fr>
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.
2332 2001-12-29 Akim Demaille <akim@epita.fr>
2334 * src/options.h, src/options.c (create_long_option_table): Rename
2336 (long_option_table_new): this, with a clearer prototype.
2337 (percent_table): Remove, unused,
2338 * src/getargs.c (getargs): Adjust.
2340 2001-12-29 Akim Demaille <akim@epita.fr>
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
2346 2001-12-29 Akim Demaille <akim@epita.fr>
2348 * src/lalr.c (build_relations): Rename `states' as `states1'.
2349 Sorry, I don't understand exactly what it is, no better name...
2351 2001-12-29 Akim Demaille <akim@epita.fr>
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
2358 2001-12-29 Akim Demaille <akim@epita.fr>
2360 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
2363 2001-12-29 Akim Demaille <akim@epita.fr>
2365 * src/reader.c, src/reader.h (user_toknums): Remove.
2366 Adjust all users to use symbols[i]->user_token_number.
2368 2001-12-29 Akim Demaille <akim@epita.fr>
2370 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
2371 Adjust all users to use symbols[i]->prec or ->assoc.
2373 2001-12-29 Akim Demaille <akim@epita.fr>
2375 * src/reader.c, src/reader.h (tags): Remove.
2376 Adjust all users to use symbols[i]->tag.
2378 2001-12-29 Akim Demaille <akim@epita.fr>
2380 * src/gram.h, src/gram.c (symbols): New, similar to state_table
2382 * src/reader.c (packsymbols): Fill this table.
2384 * src/conflicts.c (resolve_sr_conflict): Adjust.
2385 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
2387 Use symbols[i]->tag instead of tags[i].
2389 2001-12-29 Akim Demaille <akim@epita.fr>
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.
2395 2001-12-29 Akim Demaille <akim@epita.fr>
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
2404 2001-12-29 Akim Demaille <akim@epita.fr>
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.
2411 2001-12-29 Akim Demaille <akim@epita.fr>
2413 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
2414 visible, and some states have now a different number.
2416 2001-12-29 Akim Demaille <akim@epita.fr>
2418 * src/reader.c (readgram): Bind the initial rule's lineno to that
2420 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
2421 (Solved SR Conflicts): Adjust rule 0's line number.
2423 2001-12-29 Akim Demaille <akim@epita.fr>
2425 Fix the `GAWK Grammar' failure.
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
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.
2436 2001-12-29 Akim Demaille <akim@epita.fr>
2438 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
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
2445 2001-12-29 Akim Demaille <akim@epita.fr>
2447 * src/lalr.c (lookaheads_print): New.
2448 (lalr): Call it when --trace-flag.
2449 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
2452 2001-12-29 Akim Demaille <akim@epita.fr>
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.
2464 2001-12-29 Akim Demaille <akim@epita.fr>
2466 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
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.
2474 2001-12-29 Akim Demaille <akim@epita.fr>
2476 * src/output.c: Comment changes.
2478 2001-12-27 Paul Eggert <eggert@twinsun.com>
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.
2485 Also, catch up with 1.31's YYSTD.
2487 2001-12-27 Akim Demaille <akim@epita.fr>
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
2498 2001-12-27 Akim Demaille <akim@epita.fr>
2500 * tests/regression.at (Unresolved SR Conflicts):
2501 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
2504 2001-12-27 Akim Demaille <akim@epita.fr>
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
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.
2524 2001-12-27 Akim Demaille <akim@epita.fr>
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.
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.
2540 2001-12-27 Akim Demaille <akim@epita.fr>
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
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.
2560 2001-12-27 Akim Demaille <akim@epita.fr>
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
2566 * lib/strchr.c: New.
2567 * src/reader.c (symbols_save): Use strchr.
2569 2001-12-27 Akim Demaille <akim@epita.fr>
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.
2577 2001-12-27 Akim Demaille <akim@epita.fr>
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.
2587 2001-12-27 Akim Demaille <akim@epita.fr>
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.
2596 2001-12-27 Akim Demaille <akim@epita.fr>
2598 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
2600 2001-12-27 Akim Demaille <akim@epita.fr>
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
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.
2611 2001-12-27 Akim Demaille <akim@epita.fr>
2613 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
2616 2001-12-27 Akim Demaille <akim@epita.fr>
2618 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
2619 (build_relations): Adjust.
2621 2001-12-27 Akim Demaille <akim@epita.fr>
2623 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
2626 2001-12-27 Akim Demaille <akim@epita.fr>
2628 * src/reader.c (packgram): Catch nitems overflows.
2630 2001-12-27 Akim Demaille <akim@epita.fr>
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
2640 2001-12-27 Akim Demaille <akim@epita.fr>
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
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
2652 In other words the guard is just explicitly optional.
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
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
2668 2001-12-27 Akim Demaille <akim@epita.fr>
2670 * src/reader.c (symbol_list_new): Be sure to initialize all the
2673 2001-12-27 Akim Demaille <akim@epita.fr>
2675 All the hacks using a final pseudo state are now useless.
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).
2682 2001-12-27 Akim Demaille <akim@epita.fr>
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
2688 2001-12-27 Akim Demaille <akim@epita.fr>
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.
2706 2001-12-27 Akim Demaille <akim@epita.fr>
2708 * src/bison.hairy: Formatting/comment changes.
2710 Remove `register' indications.
2711 Add plenty of `static'.
2713 2001-12-27 Akim Demaille <akim@epita.fr>
2715 * src/output.c (prepare): Drop the muscle `ntbase' which
2717 * src/bison.simple: Formatting/comment changes.
2718 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
2719 is an undocumented synonym.
2721 2001-12-22 Akim Demaille <akim@epita.fr>
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
2726 Reported by Wayne Green.
2728 2001-12-22 Akim Demaille <akim@epita.fr>
2730 Some actions of web2c.y are improperly triggered.
2731 Reported by Mike Castle.
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.
2738 2001-12-22 Akim Demaille <akim@epita.fr>
2740 Reductions in web2c.y are improperly reported.
2741 Reported by Mike Castle.
2743 * src/conflicts.c (print_reductions): Fix.
2744 * tests/regression.at (Web2c): New.
2746 2001-12-18 Akim Demaille <akim@epita.fr>
2748 Some host fail on `assert (!"foo")', which expands to
2749 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
2750 Reported by Nelson Beebee.
2752 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
2753 `#define it_succeeded 0' and `assert (it_succeeded)'.
2755 2001-12-17 Marc Autret <autret_m@epita.fr>
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).
2761 2001-12-17 Paul Eggert <eggert@twinsun.com>
2763 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2764 YYDEBUG must be defined to a nonzero value.
2766 * src/bison.simple (yytname): Do not assume that the user defines
2767 YYDEBUG to a properly parenthesized expression.
2769 2001-12-17 Akim Demaille <akim@epita.fr>
2771 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2772 nlookaheads is a new member.
2774 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2775 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2778 2001-12-17 Akim Demaille <akim@epita.fr>
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,
2783 * src/reader.c (reader): Do it.
2785 2001-12-17 Akim Demaille <akim@epita.fr>
2787 * src/conflicts.c (print_reductions): Formatting changes.
2789 2001-12-17 Akim Demaille <akim@epita.fr>
2791 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2792 (flush_reduce): New.
2793 (resolve_sr_conflict): Adjust.
2795 2001-12-17 Akim Demaille <akim@epita.fr>
2797 * src/output.c (output_obstack): Be static and rename as...
2798 (format_obstack): this, to avoid any confusion with files.c's
2800 * src/reader.h (muscle_obstack): Move to...
2801 * src/output.h: here, since it's defined in output.c.
2803 2001-12-17 Akim Demaille <akim@epita.fr>
2805 * src/output.c (action_row, save_column, default_goto)
2806 (sort_actions, matching_state, pack_vector): Better variable
2809 2001-12-17 Akim Demaille <akim@epita.fr>
2811 * src/output.c: Various formatting changes.
2813 2001-12-17 Akim Demaille <akim@epita.fr>
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.
2821 2001-12-16 Marc Autret <autret_m@epita.fr>
2823 * src/output.c (actions_output): Fix. When we use %no-lines,
2824 there is one less line per action.
2826 2001-12-16 Marc Autret <autret_m@epita.fr>
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
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.
2838 2001-12-15 Marc Autret <autret_m@epita.fr>
2840 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2842 2001-12-15 Marc Autret <autret_m@epita.fr>
2844 * src/output.c (output_gram): Keep track of the hairy one.
2846 2001-12-15 Akim Demaille <akim@epita.fr>
2848 Make `make distcheck' work.
2850 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2851 system.h which uses libgettext.h.
2853 2001-12-15 Akim Demaille <akim@epita.fr>
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.
2860 2001-12-15 Akim Demaille <akim@epita.fr>
2862 The header can also be produced directly, without any obstack!
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
2871 (output_token_translations): Merge into...
2872 (symbols_output): this.
2874 (symbols_save): this.
2876 * src/output.c (header_output): New.
2879 2001-12-15 Akim Demaille <akim@epita.fr>
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.
2887 (copy_comment): this.
2889 2001-12-15 Akim Demaille <akim@epita.fr>
2891 * src/lex.c, src/lex.h (xgetc): No longer static.
2892 * src/reader.c (parse_union_decl): Revamp.
2894 2001-12-15 Akim Demaille <akim@epita.fr>
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.
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.
2906 2001-12-15 Akim Demaille <akim@epita.fr>
2908 Attach actions to rules, instead of pre-outputting them to
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.
2919 (prepare): Don't save the `action' muscle.
2920 * src/bison.simple: s/%%action/%%actions/.
2922 2001-12-15 Akim Demaille <akim@epita.fr>
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.
2928 2001-12-14 Akim Demaille <akim@epita.fr>
2930 * src/lex.c (literalchar): Simply return the char you decoded, non
2931 longer mess around with obstacks and int pointers.
2934 2001-12-14 Akim Demaille <akim@epita.fr>
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
2942 2001-12-13 Paul Eggert <eggert@twinsun.com>
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.
2949 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2951 2001-12-13 Akim Demaille <akim@epita.fr>
2953 The computation of nullable is broken: it doesn't handle empty
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.
2961 Work around Autotest bugs.
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
2971 * tests/sets.at: here.
2973 2001-12-13 Akim Demaille <akim@epita.fr>
2975 * src/closure.c (closure): Use nrules instead of playing tricks
2978 2001-12-13 Akim Demaille <akim@epita.fr>
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
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.
2992 2001-12-13 Akim Demaille <akim@epita.fr>
2994 * src/reader.c (readgram): Remove dead code, an strip useless
2996 (get_type): Remove, unused.
2998 2001-12-12 Akim Demaille <akim@epita.fr>
3000 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
3001 on that of lib/error.c.
3003 2001-12-12 Akim Demaille <akim@epita.fr>
3005 Some hosts don't like `/' in includes.
3007 * src/system.h: Include libgettext.h without qualifying the path.
3008 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
3011 2001-12-11 Marc Autret <autret_m@epita.fr>
3013 * src/output.c (output_parser): Remove useless muscle.
3015 2001-12-11 Marc Autret <autret_m@epita.fr>
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.
3022 2001-12-10 Marc Autret <autret_m@epita.fr>
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.
3029 2001-12-10 Marc Autret <autret_m@epita.fr>
3031 * src/reader.c (symbols_output): Clean up.
3032 * src/output.c (output_gram, output): Clean up.
3034 2001-12-10 Akim Demaille <akim@epita.fr>
3036 * src/lalr.c (initialize_lookaheads): New. Extracted from...
3037 * src/LR0.c (set_state_table): here.
3038 * src/lalr.c (lalr): Call it.
3040 2001-12-10 Akim Demaille <akim@epita.fr>
3042 * src/state.h (shifts): Remove the `number' member: shifts are
3043 attached to state, hence no longer need to be labelled with a
3046 2001-12-10 Akim Demaille <akim@epita.fr>
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.
3051 * src/state.h (shifts): Remove the `next' member.
3052 * src/LR0.c (first_state, last_state): Remove.
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.
3059 2001-12-10 Akim Demaille <akim@epita.fr>
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.
3066 2001-12-10 Akim Demaille <akim@epita.fr>
3068 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
3069 only when appropriate: when insert_start_shifting_state' is not
3071 * tests/regression.at (Rule Line Numbers): Adjust.
3073 2001-12-10 Akim Demaille <akim@epita.fr>
3075 * src/LR0.c (augment_automaton): Now that all states have shifts,
3076 merge the two cases addition shifts to the initial state.
3078 2001-12-10 Akim Demaille <akim@epita.fr>
3080 * src/lalr.c (set_state_table): Move to...
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.
3086 2001-12-10 Akim Demaille <akim@epita.fr>
3088 * src/LR0.h (first_shift, first_reduction): Remove.
3089 * src/lalr.c: Don't use first_shift: find shifts through the
3092 2001-12-10 Akim Demaille <akim@epita.fr>
3094 * src/LR0.c: Attach shifts to states as soon as they are
3096 * src/lalr.c (set_state_table): Instead of assigning shifts to
3097 state, just assert that the mapping was properly done.
3099 2001-12-10 Akim Demaille <akim@epita.fr>
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!
3111 2001-12-10 Akim Demaille <akim@epita.fr>
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?
3121 2001-12-10 Akim Demaille <akim@epita.fr>
3123 * src/muscle_tab.c (muscle_init): NULL is a better default than
3126 2001-12-10 Akim Demaille <akim@epita.fr>
3128 * src/reader.c (reader): Calling symbols_output once is enough.
3130 2001-12-10 Akim Demaille <akim@epita.fr>
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
3136 * src/state.h (struct reductions): Remove member `number' and
3138 * src/LR0.c (first_reduction, last_reduction): Remove.
3139 (save_reductions): Don't link the new reductions, store them in
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
3147 2001-12-10 Akim Demaille <akim@epita.fr>
3149 * src/options.c (OPTN, DRTV, BOTH): New.
3150 (option_table): Use them.
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
3157 2001-12-10 Akim Demaille <akim@epita.fr>
3159 * src/output.c (output, prepare): Make sure the values of the
3160 muscles `action' and `prologue' are 0-terminated.
3162 2001-12-10 Akim Demaille <akim@epita.fr>
3164 Clean up GCC warnings.
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.
3174 2001-12-10 Akim Demaille <akim@epita.fr>
3176 * configure.in: Require 2.52g.
3177 M4 is not needed, but AUTOM4TE is.
3179 * tests/Makefile.am: Adjust.
3181 2001-12-10 Akim Demaille <akim@epita.fr>
3183 One structure for states is enough, even though theoretically
3184 there are LR(0) states and LALR(1) states.
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
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.
3197 2001-12-10 Akim Demaille <akim@epita.fr>
3199 Bison dumps core on bash.y.
3200 Reported by Pascal Bart.
3202 * src/warshall.c (bitmatrix_print): New.
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.
3208 2001-12-05 Akim Demaille <akim@epita.fr>
3210 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
3212 Reported by Peter Hámorský.
3214 2001-12-05 Akim Demaille <akim@epita.fr>
3216 * src/conflicts.c (err_table): Remove.
3217 (resolve_sr_conflict): Adjust.
3218 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
3220 (state_t.reductions, state_t.shifts): this.
3222 2001-12-05 Akim Demaille <akim@epita.fr>
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.
3231 2001-12-05 Akim Demaille <akim@epita.fr>
3233 * src/output.c (pack_vector): Use assert, not berror.
3234 * src/main.c (berror): Remove, unused.
3236 2001-12-05 Akim Demaille <akim@epita.fr>
3238 New experimental feature: if --verbose --trace output all the
3239 items of a state, not only its kernel.
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.
3246 2001-12-05 Akim Demaille <akim@epita.fr>
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.
3252 2001-12-05 Akim Demaille <akim@epita.fr>
3254 * src/closure.c (print_closure): Improve.
3255 (closure): Use it for printing input and output.
3257 2001-12-05 Akim Demaille <akim@epita.fr>
3259 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
3260 indexed by nonterminals.
3262 2001-12-05 Akim Demaille <akim@epita.fr>
3264 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
3266 * src/warshall.h: Remove accidental duplication of the content.
3268 2001-12-05 Akim Demaille <akim@epita.fr>
3270 * src/closure.c (set_fderives): De-obfuscate.
3272 2001-12-05 Akim Demaille <akim@epita.fr>
3274 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
3276 2001-12-05 Akim Demaille <akim@epita.fr>
3278 * src/closure.c (set_firsts): De-obfuscate.
3280 2001-12-05 Akim Demaille <akim@epita.fr>
3282 * src/output.c (action_row): De-obfuscate
3283 using the good o' techniques: arrays not pointers, variable
3284 locality, BITISSET, RESETBIT etc.
3286 2001-12-05 Akim Demaille <akim@epita.fr>
3288 Pessimize the code to simplify it: from now on, all the states
3289 have a valid SHIFTS, which NSHIFTS is possibly 0.
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.
3296 2001-12-05 Akim Demaille <akim@epita.fr>
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''.
3303 2001-12-05 Akim Demaille <akim@epita.fr>
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.
3309 2001-12-05 Akim Demaille <akim@epita.fr>
3311 * src/state.h (SHIFT_SYMBOL): New.
3312 * src/conflicts.c: Use it to deobfuscate.
3314 2001-12-05 Akim Demaille <akim@epita.fr>
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.
3320 2001-12-05 Akim Demaille <akim@epita.fr>
3322 * src/conflicts.c (print_reductions): Arrays, not pointers.
3325 2001-12-05 Akim Demaille <akim@epita.fr>
3327 * src/conflicts.c (print_reductions): Pessimize, but clarify.
3329 2001-12-05 Akim Demaille <akim@epita.fr>
3331 * src/conflicts.c (print_reductions): Improve variable locality.
3333 2001-12-05 Akim Demaille <akim@epita.fr>
3335 * src/conflicts.c (print_reductions): Pessimize, but clarify.
3337 2001-12-05 Akim Demaille <akim@epita.fr>
3339 * src/conflicts.c (print_reductions): Improve variable locality.
3341 2001-12-05 Akim Demaille <akim@epita.fr>
3343 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
3344 * src/lalr.c: Use them.
3346 2001-12-05 Akim Demaille <akim@epita.fr>
3348 * src/LR0.c (augment_automaton): Formatting changes.
3349 Better variable locality.
3351 2001-12-05 Akim Demaille <akim@epita.fr>
3353 * src/lalr.c (matrix_print): New.
3354 (transpose): Use it.
3355 Use arrays instead of pointers.
3357 2001-12-05 Akim Demaille <akim@epita.fr>
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.
3363 2001-12-05 Akim Demaille <akim@epita.fr>
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
3369 Improve variable locality.
3370 Avoid variables used as mere abbreviations.
3371 (compute_lookaheads): Use arrays instead of pointers.
3373 2001-12-05 Akim Demaille <akim@epita.fr>
3375 * src/lalr.c (initialize_F): Improve variable locality.
3376 Avoid variables used as mere abbreviations.
3378 2001-12-05 Akim Demaille <akim@epita.fr>
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.
3385 2001-12-05 Akim Demaille <akim@epita.fr>
3387 * src/lalr.c (traverse): Use arrays instead of pointers.
3389 2001-12-05 Akim Demaille <akim@epita.fr>
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'.
3395 2001-12-05 Akim Demaille <akim@epita.fr>
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
3402 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
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
3409 Deobfuscate, i.e., allocate, use and free `symbol_count' here
3411 (new_itemsets): Allocate `shift_symbol' here.
3412 (allocate_itemsets): symbol_count includes useless nonterminals.
3414 (free_storage): Use `free', not `XFREE', for pointers that cannot
3417 2001-12-05 Akim Demaille <akim@epita.fr>
3419 * src/nullable.c (set_nullable): Deobfuscate the handling of
3421 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
3423 2001-12-05 Akim Demaille <akim@epita.fr>
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
3432 2001-12-04 Paul Eggert <eggert@twinsun.com>
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.
3442 2001-11-30 Akim Demaille <akim@epita.fr>
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.
3452 2001-11-27 Paul Eggert <eggert@twinsun.com>
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.
3463 2001-11-29 Paul Eggert <eggert@twinsun.com>
3465 Name space cleanup in generated parser.
3467 * doc/bison.texinfo (Bison Parser): Discuss system headers
3468 and their effect on the user name space.
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).
3475 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
3476 on user names when possible.
3478 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
3479 Simplify test for whather <alloca.h> exists.
3481 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
3483 (<stdio.h>): Include if YYDEBUG.
3485 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
3486 ! defined (yyoverflow) && ! defined (yymemcpy).
3488 (yymemcpy, yyparse): Rename local variables as needed so that
3489 they all begin with 'yy'.
3491 (yystrlen, yystpcpy): New functions.
3493 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
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.
3500 2001-11-30 Akim Demaille <akim@epita.fr>
3502 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
3503 before their first uses.
3504 (YYBISON, YYPURE): Move to the top of the output.
3506 2001-11-30 Akim Demaille <akim@epita.fr>
3508 * tests/reduce.at (Useless Nonterminals): Fix.
3510 2001-11-30 Akim Demaille <akim@epita.fr>
3512 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
3513 if body instead of `;' to pacify GCC's warnings.
3515 2001-11-30 Akim Demaille <akim@epita.fr>
3517 Instead of mapping the LHS of unused rules to -1, keep the LHS
3518 valid, but flag the rules as invalid.
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.
3527 2001-11-30 Akim Demaille <akim@epita.fr>
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.
3534 2001-11-30 Akim Demaille <akim@epita.fr>
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.
3541 2001-11-30 Akim Demaille <akim@epita.fr>
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.
3548 2001-11-29 Paul Eggert <eggert@twinsun.com>
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):
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.
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.
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.
3567 2001-11-29 Marc Autret <autret_m@epita.fr>
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.
3573 2001-11-28 Marc Autret <autret_m@epita.fr>
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.
3580 2001-11-28 Marc Autret <autret_m@epita.fr>
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
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
3598 2001-11-28 Marc Autret <autret_m@epita.fr>
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 '_'.
3605 2001-11-28 Marc Autret <autret_m@epita.fr>
3607 * src/bison.simple: Fix debug.
3608 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
3610 2001-11-28 Akim Demaille <akim@epita.fr>
3612 * src/LR0.c (shifts_new): New.
3613 (save_shifts, insert_start_shift, augment_automaton): Use it.
3615 2001-11-28 Akim Demaille <akim@epita.fr>
3617 * src/closure.c (closure): `b' and `ruleno' denote the same value:
3620 2001-11-28 Akim Demaille <akim@epita.fr>
3622 * src/closure.c (closure): Instead of looping over word in array
3623 then bits in words, loop over bits in array.
3625 2001-11-28 Akim Demaille <akim@epita.fr>
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
3631 2001-11-28 Akim Demaille <akim@epita.fr>
3633 * src/closure.c (closure): `r' and `c' are new variables, used to
3634 de-obfuscate accesses to RULESET and CORE.
3636 2001-11-28 Akim Demaille <akim@epita.fr>
3638 * src/reduce.c (reduce_print): Use ngettext.
3639 (dump_grammar): Improve the trace accuracy.
3641 2001-11-28 Akim Demaille <akim@epita.fr>
3643 * src/reduce.c (dump_grammar): Don't translate trace messages.
3645 2001-11-28 Akim Demaille <akim@epita.fr>
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.
3652 2001-11-27 Paul Eggert <eggert@twinsun.com>
3654 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
3655 use alloca when we didn't want to, and vice versa.
3657 2001-11-27 Marc Autret <autret_m@epita.fr>
3659 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
3661 * src/output.c (prepare): Remove its update.
3663 2001-11-27 Marc Autret <autret_m@epita.fr>
3665 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
3668 2001-11-27 Marc Autret <autret_m@epita.fr>
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.
3681 2001-11-27 Akim Demaille <akim@epita.fr>
3683 * src/system.h: Use intl/libgettext.h.
3684 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
3686 2001-11-27 Akim Demaille <akim@epita.fr>
3688 * tests/torture.at (Exploding the Stack Size with Malloc):
3689 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
3691 2001-11-27 Akim Demaille <akim@epita.fr>
3693 * src/files.c: Include error.h.
3694 Reported by Hans Aberg.
3696 2001-11-26 Marc Autret <autret_m@epita.fr>
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
3705 * src/lex.h (token_t): Add tok_include.
3707 2001-11-26 Akim Demaille <akim@epita.fr>
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.
3714 2001-11-26 Akim Demaille <akim@epita.fr>
3716 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
3719 2001-11-26 Akim Demaille <akim@epita.fr>
3721 * src/complain.c, src/complain.h (error): Remove, provided by
3724 2001-11-26 Akim Demaille <akim@epita.fr>
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.
3731 2001-11-26 Akim Demaille <akim@epita.fr>
3733 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
3734 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
3736 2001-11-26 Akim Demaille <akim@epita.fr>
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.
3743 2001-11-23 Akim Demaille <akim@epita.fr>
3745 * lib/alloca.c: Update, from fileutils.
3747 2001-11-23 Akim Demaille <akim@epita.fr>
3749 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
3751 2001-11-23 Akim Demaille <akim@epita.fr>
3753 * src/system.h: Include alloca.h.
3754 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
3756 2001-11-23 Akim Demaille <akim@epita.fr>
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.
3764 2001-11-23 Akim Demaille <akim@epita.fr>
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.
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.
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.
3779 2001-11-22 Marc Autret <autret_m@epita.fr>
3781 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
3783 2001-11-22 Marc Autret <autret_m@epita.fr>
3785 * src/muscle_tab.c (muscle_init): Remove initialization of
3787 * src/output.c (output_master_parser): Do it here.
3789 2001-11-20 Akim Demaille <akim@epita.fr>
3792 * configure.in (ALL_LINGUAS): Adjust.
3793 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
3794 longer contains strings to translate.
3796 2001-11-19 Akim Demaille <akim@epita.fr>
3798 * src/conflicts.c (conflicts_print): Add a missing \n.
3800 2001-11-19 Akim Demaille <akim@epita.fr>
3802 * src/nullable.c (nullable_print): New.
3803 (set_nullable): Call it when tracing.
3804 Better locality of variables.
3806 2001-11-19 Akim Demaille <akim@epita.fr>
3808 * src/print.c (print_actions): Better locality of variables.
3810 2001-11-19 Akim Demaille <akim@epita.fr>
3812 * src/derives.c (print_derives): Fix and enrich.
3813 * src/closure.c (print_fderives): Likewise.
3815 2001-11-19 Akim Demaille <akim@epita.fr>
3817 * src/closure.c (itemsetend): Remove, replaced with...
3820 2001-11-19 Akim Demaille <akim@epita.fr>
3822 * src/LR0.c (kernel_end): Remove, replaced with...
3825 2001-11-19 Akim Demaille <akim@epita.fr>
3827 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
3830 2001-11-19 Akim Demaille <akim@epita.fr>
3832 * src/closure.c (closure): Use arrays instead of pointers to clarify.
3834 2001-11-19 Akim Demaille <akim@epita.fr>
3836 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
3838 * src/LR0.c: Likewise.
3839 (allocate_itemsets): Use arrays instead of pointers to clarify.
3841 2001-11-19 Akim Demaille <akim@epita.fr>
3843 * src/getargs.c (statistics_flag): Replace with...
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.
3850 2001-11-19 Akim Demaille <akim@epita.fr>
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.
3856 2001-11-19 Akim Demaille <akim@epita.fr>
3858 * src/LR0.c (new_state, get_state): Complete TRACE code.
3859 * src/closure.c: Include `reader.h' to get `tags', needed by the
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
3866 Use `#if TRACE' instead of `#if 0' for tracing code.
3868 2001-11-19 Akim Demaille <akim@epita.fr>
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.
3875 2001-11-19 Akim Demaille <akim@epita.fr>
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
3882 2001-11-19 Akim Demaille <akim@epita.fr>
3884 * src/LR0.c (new_state): Complete trace code.
3885 * src/nullable.c (set_nullable): Don't translate traces.
3887 2001-11-19 Akim Demaille <akim@epita.fr>
3889 * src/print_graph.c (print_core): Better locality of variables.
3890 * src/print.c (print_core): Likewise.
3892 2001-11-19 Akim Demaille <akim@epita.fr>
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.
3902 2001-11-19 Akim Demaille <akim@epita.fr>
3904 * src/bison.simple (yyparse): When verbosely reporting an error,
3905 no longer put additional quotes around token names.
3906 * tests/calc.at: Adjust.
3908 2001-11-19 Akim Demaille <akim@epita.fr>
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.
3914 2001-11-19 Akim Demaille <akim@epita.fr>
3916 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
3918 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
3920 2001-11-19 Akim Demaille <akim@epita.fr>
3922 * src/gram.h (rule_t): 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.
3929 2001-11-19 Akim Demaille <akim@epita.fr>
3931 * src/reader.c (symbols_output): New, extracted from...
3932 (packsymbols): Here.
3935 2001-11-19 Akim Demaille <akim@epita.fr>
3937 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
3938 (maxrhs): this new function.
3940 2001-11-19 Akim Demaille <akim@epita.fr>
3942 * src/lalr.c (F): New macro to access the variable F.
3945 2001-11-19 Akim Demaille <akim@epita.fr>
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.
3951 2001-11-19 Akim Demaille <akim@epita.fr>
3953 * src/lalr.c (initialize_LA): Only initialize LA. Let...
3954 (set_state_table): handle the `lookaheads' members.
3956 2001-11-19 Akim Demaille <akim@epita.fr>
3958 * src/lalr.h (lookaheads): Removed array, whose contents is now
3960 (state_t): this structure.
3961 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
3964 2001-11-19 Akim Demaille <akim@epita.fr>
3966 * src/lalr.h (consistent): Removed array, whose contents is now
3968 (state_t): this structure.
3969 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
3972 2001-11-19 Akim Demaille <akim@epita.fr>
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:
3980 2001-11-19 Akim Demaille <akim@epita.fr>
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.
3990 2001-11-14 Akim Demaille <akim@epita.fr>
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.
4003 2001-11-14 Akim Demaille <akim@epita.fr>
4005 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
4006 defined only if yyoverflow is defined, to avoid `warning: unused
4008 Reported by The Test Suite.
4010 2001-11-14 Akim Demaille <akim@epita.fr>
4012 * src/print.c: Include reduce.h.
4013 Reported by Hans Aberg.
4015 2001-11-14 Akim Demaille <akim@epita.fr>
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
4024 Be sure to strdup `arg' when used, since there is no reason for
4025 token_buffer not to change.
4027 2001-11-14 Akim Demaille <akim@epita.fr>
4029 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
4031 * src/main.c (main): Use them.
4032 Suggested by Hans Aberg.
4034 2001-11-12 Akim Demaille <akim@epita.fr>
4036 * src/system.h (ngettext): Now that we use ngettext, be sure to
4037 provide a default definition when NLS are not used.
4039 2001-11-12 Akim Demaille <akim@epita.fr>
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.
4050 2001-11-12 Akim Demaille <akim@epita.fr>
4052 %expext was not functioning at all.
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.
4062 2001-11-12 Akim Demaille <akim@epita.fr>
4064 * tests/regression.at (Conflicts): Rename as...
4065 (Unresolved SR Conflicts): this.
4066 (Solved SR Conflicts): New.
4068 2001-11-12 Akim Demaille <akim@epita.fr>
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.
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;
4080 2001-11-12 Akim Demaille <akim@epita.fr>
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.
4086 2001-11-12 Akim Demaille <akim@epita.fr>
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.
4100 2001-11-12 Akim Demaille <akim@epita.fr>
4102 * tests/regression.at (Invalid input): Remove, duplicate with
4103 ``Invalid input: 1''.
4105 2001-11-12 Akim Demaille <akim@epita.fr>
4107 * tests/torture.at (AT_DATA_STACK_TORTURE)
4108 (Exploding the Stack Size with Alloca)
4109 (Exploding the Stack Size with Malloc): New.
4111 2001-11-12 Akim Demaille <akim@epita.fr>
4113 * src/bison.simple (YYSTACK_REALLOC): New.
4114 (yyparse) [!yyoverflow]: Use it and free the old stack.
4115 Reported by Per Allansson.
4117 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
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.
4127 2001-11-05 Akim Demaille <akim@epita.fr>
4129 * src/reader.c (symbols_output): New, extracted from...
4130 (packsymbols): here.
4133 2001-11-05 Akim Demaille <akim@epita.fr>
4135 * src/lex.c (parse_percent_token): s/quotearg/quote/.
4137 2001-11-05 Akim Demaille <akim@epita.fr>
4139 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
4142 2001-11-05 Akim Demaille <akim@epita.fr>
4144 * src/options.h (struct option_table_struct): set_flags is void*.
4145 * src/options.c (longopts): Support `--output' and `%output'.
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.
4156 2001-11-04 Akim Demaille <akim@epita.fr>
4158 * doc/bison.texinfo (Decl Summary): Split the list into
4159 `directives for grammars' and `directives for bison'.
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.
4170 2001-11-02 Akim Demaille <akim@epita.fr>
4172 * doc/refcard.tex: Update.
4174 2001-11-02 Akim Demaille <akim@epita.fr>
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.
4182 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
4184 Let yylex return it instead of a plain 0.
4185 Reported by Dick Streefland.
4187 2001-11-02 Akim Demaille <akim@epita.fr>
4189 * tests/regression.at (Mixing %token styles): New test.
4191 2001-11-02 Akim Demaille <akim@epita.fr>
4193 * src/reader.c (parse_thong_decl): Formatting changes.
4194 (token_translations_init): New, extracted from...
4195 (packsymbols): Here.
4198 2001-11-01 Akim Demaille <akim@epita.fr>
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
4206 2001-11-01 Akim Demaille <akim@epita.fr>
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
4214 2001-11-01 Akim Demaille <akim@epita.fr>
4216 * tests/calc.at: Catch up with 1.30.
4217 * configure.in: Bump to 1.49a.
4218 Adjust to newer Autotest.
4220 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
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.
4227 2001-10-18 Akim Demaille <akim@epita.fr>
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).
4235 2001-10-14 Marc Autret <autret_m@epita.fr>
4237 * src/options.c (create_long_option_table): Fix.
4239 2001-10-10 Akim Demaille <akim@epita.fr>
4241 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
4243 2001-10-04 Akim Demaille <akim@epita.fr>
4245 * src/reader.c (parse_union_decl): Push the caracters in
4246 union_obstack, not attrs_obstack.
4248 2001-10-04 Akim Demaille <akim@epita.fr>
4250 Merge in the branch 1.29.
4252 * src/reader.c (packsymbols): Use a temporary obstack for
4253 `%%tokendef', since output_stack is already used elsewhere.
4255 2001-10-02 Akim Demaille <akim@epita.fr>
4259 2001-10-02 Akim Demaille <akim@epita.fr>
4263 2001-10-02 Akim Demaille <akim@epita.fr>
4265 * tests/regression.at (Invalid CPP headers): New.
4266 From Alexander Belopolsky.
4267 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
4269 2001-10-02 Akim Demaille <akim@epita.fr>
4271 * tests/regression.at (Invalid input): New.
4272 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
4275 2001-10-02 Akim Demaille <akim@epita.fr>
4277 * tests/calc.at: Now that --debug works, the tests must be adjusted.
4279 2001-10-02 Akim Demaille <akim@epita.fr>
4281 * src/output.c (output_parser): Assert `skeleton'.
4282 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
4286 2001-10-01 Marc Autret <autret_m@epita.fr>
4288 * src/lex.h: Echo modifications.
4289 * src/lex.c (unlex): Parameter is now token_t.
4292 2001-10-01 Marc Autret <autret_m@epita.fr>
4294 * src/main.c: Include lex.h.
4297 2001-09-29 Akim Demaille <akim@epita.fr>
4299 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
4301 2001-09-28 Akim Demaille <akim@epita.fr>
4303 * tests/testsuite.at: Update to newer Autotest.
4304 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
4306 2001-09-27 Akim Demaille <akim@epita.fr>
4308 Position independent wrapper.
4310 * tests/bison: Remove.
4311 * tests/bison.in: New.
4312 * configure.in: Adjust.
4314 2001-09-27 Paul Eggert <eggert@twinsun.com>
4316 Port quotearg fixes from tar 1.13.24.
4318 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
4320 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
4321 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
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).
4328 2001-09-27 Akim Demaille <akim@epita.fr>
4332 2001-09-27 Akim Demaille <akim@epita.fr>
4336 2001-09-25 Akim Demaille <akim@epita.fr>
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...
4344 * src/main.c (main): Use it.
4346 2001-09-24 Marc Autret <autret_m@epita.fr>
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.
4360 2001-09-24 Marc Autret <autret_m@epita.fr>
4362 * src/files.c (compute_output_file_names): Fix.
4364 2001-09-24 Marc Autret <autret_m@epita.fr>,
4365 Akim Demaille <akim@epita.fr>
4367 * src/reader.c (reader): Remove call to free_symtab ().
4368 * src/main.c (main): Call it here.
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
4376 * src/files.c (compute_output_file_names, close_files): New.
4377 (output_files): Adjust.
4378 * src/main.c (main): Adjust.
4380 2001-09-23 Marc Autret <autret_m@epita.fr>
4382 * src/files.c (compute_header_macro): Computes header macro name
4383 from spec_defines_file when given.
4385 2001-09-23 Marc Autret <autret_m@epita.fr>
4387 * src/files.c (output_files): Add default extensions.
4389 2001-09-22 Akim Demaille <akim@epita.fr>
4391 * src/conflicts.c (finalize_conflicts): Rename as...
4392 (free_conflicts): this.
4394 2001-09-22 Akim Demaille <akim@epita.fr>
4396 * src/gram.c (gram_free): Rename back as...
4398 (output_token_translations): Free `token_translations'.
4399 * src/symtab.c (free_symtab): Free the tag field.
4401 2001-09-22 Akim Demaille <akim@epita.fr>
4403 Remove `translations' as it is always set to true.
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...
4414 2001-09-22 Akim Demaille <akim@epita.fr>
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.
4421 2001-09-22 Akim Demaille <akim@epita.fr>
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.
4429 2001-09-21 Akim Demaille <akim@epita.fr>
4432 * Makefile.maint, config/config.guess, config/config.sub,
4433 * config/missing: Update from masters.
4434 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
4436 * configure.in (ALL_LINGUAS): Add `tr'.
4438 2001-09-21 Akim Demaille <akim@epita.fr>
4440 * tests/Makefile.am (package.m4): Move to...
4441 ($(srcdir)/$(TESTSUITE)): here.
4443 2001-09-20 Akim Demaille <akim@epita.fr>
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.
4452 2001-09-18 Marc Autret <autret_m@epita.fr>
4454 * doc/bison.1: Update.
4455 * doc/bison.texinfo (Bison Options): Update --defines and --graph
4457 (Option Cross Key): Update.
4460 2001-09-18 Marc Autret <autret_m@epita.fr>
4462 * tests/regression.at: New test (comment in %union).
4464 2001-09-18 Marc Autret <autret_m@epita.fr>
4466 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
4468 Reported by Keith Browne.
4470 2001-09-18 Marc Autret <autret_m@epita.fr>
4472 * tests/output.at: Add tests for --defines and --graph.
4474 2001-09-18 Marc Autret <autret_m@epita.fr>
4476 * tests/output.at: Removes tests of %{header,src}_extension features.
4478 2001-09-18 Akim Demaille <akim@epita.fr>
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.
4485 2001-09-18 Marc Autret <autret_m@epita.fr>
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.
4494 2001-09-18 Marc Autret <autret_m@epita.fr>
4496 Turn off %{source,header}_extension feature.
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.
4509 2001-09-10 Akim Demaille <akim@epita.fr>
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.
4516 2001-09-10 Akim Demaille <akim@epita.fr>
4518 * tests/calc.at: Use m4_match.
4519 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
4521 2001-09-10 Marc Autret <autret_m@epita.fr>,
4522 Akim Demaille <akim@epita.fr>
4524 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
4526 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
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
4536 (unlexed): Is a token_t.
4538 2001-09-10 Akim Demaille <akim@epita.fr>
4540 * configure.in: Bump to 1.29a.
4542 2001-09-07 Akim Demaille <akim@epita.fr>
4546 2001-08-30 Akim Demaille <akim@epita.fr>
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,
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.
4557 2001-08-29 Akim Demaille <akim@epita.fr>
4561 2001-08-29 Akim Demaille <akim@epita.fr>
4565 2001-08-29 Paul Eggert <eggert@twinsun.com>
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
4571 2001-08-29 Robert Anisko <anisko_r@epita.fr>
4573 * doc/bison.texinfo (Location Tracking Calc): New node.
4575 2001-08-29 Paul Eggert <eggert@twinsun.com>
4577 * src/output.c (output): Do not define const, as this now
4578 causes more problems than it cures.
4580 2001-08-29 Akim Demaille <akim@epita.fr>
4582 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
4584 Be sure to tag the `detailmenu'.
4586 2001-08-29 Akim Demaille <akim@epita.fr>
4588 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
4589 download in a tmp dir.
4591 2001-08-28 Marc Autret <autret_m@epita.fr>
4593 * config/depcomp: New file.
4595 2001-08-28 Marc Autret <autret_m@epita.fr>
4597 * doc/bison.1 (mandoc): Adjust.
4598 From Juan Manuel Guerrero.
4600 2001-08-28 Marc Autret <autret_m@epita.fr>
4602 * src/print_graph.c (print_state): Fix.
4604 2001-08-27 Marc Autret <autret_m@epita.fr>
4606 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
4608 Echo modifications to the functions prototypes.
4609 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
4611 2001-08-27 Marc Autret <autret_m@epita.fr>
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.
4619 2001-08-27 Akim Demaille <akim@epita.fr>
4621 * Makefile.maint: Sync. again with CVS Autoconf.
4623 2001-08-27 Akim Demaille <akim@epita.fr>
4625 * Makefile.maint: Formatting changes.
4626 (po-update, cvs-update, update): New targets.
4629 2001-08-27 Akim Demaille <akim@epita.fr>
4631 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
4632 * Makefile.maint: Sync. with CVS Autoconf.
4634 2001-08-27 Marc Autret <autret_m@epita.fr>
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.
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'.
4649 2001-08-27 Marc Autret <autret_m@epita.fr>
4651 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
4652 This one shadowed a global parameter.
4654 2001-08-24 Marc Autret <autret_m@epita.fr>
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.
4661 2001-08-23 Marc Autret <autret_m@epita.fr>
4663 * src/lex.c (percent_table): Typo: s/naem/name/.
4665 Normalize new options declarations.
4667 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
4669 * tests/suite.at: Exercise %header_extension and %source_extension.
4671 2001-08-16 Marc Autret <autret_m@epita.fr>
4673 * src/reader.c (parse_dquoted_param): New.
4674 (parse_header_extension_decl): Use it.
4675 (parse_source_extension_decl): Likewise.
4677 2001-08-16 Marc Autret <autret_m@epita.fr>
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.
4686 2001-08-16 Marc Autret <autret_m@epita.fr>
4688 * src/getargs.c (usage): Update with ``-g, --graph''.
4690 2001-08-16 Marc Autret <autret_m@epita.fr>
4692 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
4693 (Option Cross Key): Likewise.
4694 * doc/bison.1: Update.
4696 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
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.
4703 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
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.
4714 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
4716 * src/bison.simple: Add new `#line' directive.
4718 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
4720 * src/bison.simple: New `#line' directive.
4721 * src/output.c (output_parser): Support new dynamic muscle input_line.
4723 2001-09-22 Marc Autret <autret_m@epita.fr>
4725 * src/output.c (output_master_parser): New.
4726 (output_parser): Be more re-entrant.
4728 2001-09-21 Marc Autret <autret_m@epita.fr>
4730 * src/reader.c (copy_definition, parse_union_decl): Update and use
4732 (copy_action): Likewise.
4733 Use obstack_1grow ().
4734 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
4736 2001-09-21 Marc Autret <autret_m@epita.fr>
4738 * src/options.c (option_table): Adjust.
4739 * src/lex.c (parse_percent_token): Fix.
4741 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
4743 * src/options.c (symtab.h): Include it, need by lex.h.
4745 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
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.
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.
4770 2001-09-20 Marc Autret <autret_m@epita.fr>
4772 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
4775 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
4777 * src/bison.simple: s/%%filename/%%skeleton.
4778 * src/muscle_tab.c (getargs.h): Include it.
4779 (muscle_init): Insert new muscle skeleton.
4781 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
4783 * src/output.c (output_parser): Delete unused variable actions_dumped.
4785 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
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.
4791 2001-09-02 Marc Autret <autret_m@epita.fr>
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.
4801 * src/reader.h (muscle_obstack): Extern declaration update.
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.
4811 * src/muscle_tab.h: Update double inclusion macros.
4812 (macro_entry_s): Rename muscle_entry_s.
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.
4822 * src/main.c: Include muscle_tab.h.
4823 (main): Call muscle_init ().
4824 * src/Makefile.am (bison_SOURCES): Echo modifications.
4826 2001-09-02 Marc Autret <autret_m@epita.fr>
4828 Now the files macro_tab.[ch] are named muscle_tab.[ch].
4830 * src/muscle_tab.c, src/muscle_tab.h: Add files.
4832 2001-09-02 Marc Autret <autret_m@epita.fr>
4834 * src/macrotab.c, src/macrotab.h: Remove.
4836 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
4838 * src/reader.c (copy_guard): Use muscle to specify the `#line'
4841 2001-09-01 Marc Autret <autret_m@epita.fr>
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.
4846 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
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.
4853 2001-08-31 Marc Autret <autret_m@epita.fr>
4855 * src/bison.simple (YYLSP_NEEDED): New definition.
4856 * src/output.c (prepare): Add macro insertion of `locations_flag'
4858 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
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
4870 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
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.
4876 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
4878 * src/reader.c (read_additionnal_code): Rename %%user_code to
4880 * src/output.c (output): Rename %%declarations to %%prologue.
4881 * src/bison.simple: Echo modifications.
4883 2001-08-31 Marc Autret <autret_m@epita.fr>
4885 * src/reader.c (readgram): CleanUp.
4886 (output_token_defines): Likewise.
4887 (packsymbols): Likewise.
4889 * src/output.c (output): CPP-out useless code.
4891 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
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.
4898 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
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.
4911 2001-08-30 Marc Autret <autret_m@epita.fr>
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.
4919 2001-08-29 Marc Autret <autret_m@epita.fr>
4921 * src/bison.simple: Add %%user_code directive at the end.
4922 * src/reader.c (read_additionnal_code): New.
4924 * src/output.c (output_program): Remove.
4927 2001-08-28 Marc Autret <autret_m@epita.fr>
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.
4933 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
4935 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
4937 * src/bison.simple: Add `%%definitions'.
4939 2001-08-28 Marc Autret <autret_m@epita.fr>
4941 * config/depcomp: New file.
4943 2001-08-27 Paul Eggert <eggert@twinsun.com>
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
4949 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
4951 * src/output.c (output): Remove the initialization of the macro
4952 obstack. It was done too late here.
4954 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
4956 (reader): Initialize the macro obstack here, since we need it to grow
4957 '%define' directives.
4959 * src/reader.h: Declare the macro obstack as extern.
4961 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
4963 * src/output.c (output_parser): Fix. Store single '%' characters in
4964 the output obstack instead of throwing them away.
4966 2001-08-27 Akim Demaille <akim@epita.fr>
4968 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
4970 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4972 * lib/Makefile.am: Adjust.
4974 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4976 * src/bison.simple: Update and add '%%' directives.
4978 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
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.
4988 * src/reader.c (parse_macro_decl): New function used to parse macro
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
4995 (read_declarations): Add case for macro definition.
4996 (copy_identifier): New.
4997 (parse_macro_decl): Read macro identifiers using copy_identifier
5000 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5002 * src/output.c (prepare): Add prefixed names.
5003 (output_parser): Output semantic actions.
5004 (output_parser): Fix bug on '%%line' directives.
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.
5012 * src/output.c: Remove some C dedicated output.
5013 Improve the use of macro and output obstacks.
5014 (output_defines): Remove.
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'.
5027 * src/output.c (output_table_data): New function.
5028 (output_short_table): Remove.
5029 (output_short_or_char_table): Remove.
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.
5037 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5039 * src/main.c (main): Initialize the macro table.
5041 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5043 * src/lex.c (percent_table): Add tok_define.
5044 * src/lex.h: Add tok_define.
5046 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5048 * src/macrotab.c: New file.
5049 * src/macrotab.h: New file.
5050 * src/Makefile.am: Update.
5052 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
5054 * lib/hash.c: New file.
5055 * lib/hash.h: New file.
5056 * lib/Makefile.am: Update.
5058 2001-08-15 Akim Demaille <akim@epita.fr>
5062 2001-08-15 Marc Autret <autret_m@epita.fr>
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.
5072 2001-08-15 Akim Demaille <akim@epita.fr>
5074 * doc/bison.texinfo (Table of Symbols): Document
5077 2001-08-15 Akim Demaille <akim@epita.fr>
5079 * missing: Update from CVS Automake.
5080 * config/config.guess, config/config.sub, config/texinfo.tex:
5081 Update from gnu.org.
5083 2001-08-15 Akim Demaille <akim@epita.fr>
5085 * Makefile.maint: Sync with CVS Autoconf.
5087 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
5089 * doc/bison.texinfo: Include GNU Free Documentation License from
5091 * doc/fdl.texi: Add to package.
5093 2001-08-14 Marc Autret <autret_m@epita.fr>
5095 Turn on %{source,header}_extension features.
5097 * src/lex.c (percent_table): Un-CPP out header_extension and
5099 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
5100 (compute_exts_from_src): Remove conditions. It restores priorities
5103 2001-08-14 Marc Autret <autret_m@epita.fr>
5105 * src/files.c (compute_base_names): Add extensions computing when
5106 `--file-prefix' used.
5107 Standardize function calls.
5109 2001-08-13 Marc Autret <autret_m@epita.fr>
5111 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
5112 defining it (defined but null disables alloca).
5114 2001-08-13 Marc Autret <autret_m@epita.fr>
5116 * src/bison.simple (_yy_memcpy): CPP reformat.
5118 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
5120 * tests/atconfig.in (CPPFLAGS): Fix.
5122 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
5124 * doc/bison.texinfo: Include GNU General Public License from
5126 * doc/gpl.texi: Add to package.
5128 2001-08-10 Marc Autret <autret_m@epita.fr>
5130 * src/print_graph.h: Fix.
5131 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
5133 2001-08-10 Akim Demaille <akim@epita.fr>
5135 * src/system.h: Provide default declarations for stpcpy, strndup,
5138 2001-08-10 Robert Anisko <anisko_r@epita.fr>
5140 * doc/bison.texinfo (Locations): Update @$ stuff.
5142 2001-08-09 Robert Anisko <anisko_r@epita.fr>
5144 * src/bison.simple (YYLLOC_DEFAULT): Update.
5147 2001-08-08 Marc Autret <autret_m@epita.fr>
5149 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
5150 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
5151 Reported by Fabrice Bauzac.
5153 2001-08-08 Marc Autret <autret_m@epita.fr>
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
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.
5172 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
5174 * tests/atconfig.in (CPPFLAGS): Fix.
5176 2001-08-07 Akim Demaille <akim@epita.fr>
5178 * src/print_graph.c (quote): New.
5179 (print_core): Use it.
5181 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
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.
5191 * src/files.c (output_files): Output the VCG file.
5192 * src/main.c (main): Invoke print_graph ();
5194 2001-08-06 Marc Autret <autret_m@epita.fr>
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.
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.
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.
5213 2001-08-06 Marc Autret <autret_m@epita.fr>
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.
5219 2001-08-06 Marc Autret <autret_m@epita.fr>
5221 Add of %source_extension and %header_extension which specify
5222 the source or/and the header output file extension.
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.
5236 2001-08-06 Marc Autret <autret_m@epita.fr>
5238 * configure.in: Bump to 1.28c.
5239 * doc/bison.texinfo: Texinfo thingies.
5241 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
5243 * tests/atconfig.in (CPPFLAGS): Add.
5244 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
5246 2001-08-03 Akim Demaille <akim@epita.fr>
5250 2001-08-03 Akim Demaille <akim@epita.fr>
5252 * tests/Makefile.am (check-local): Ship testsuite.
5253 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
5256 2001-08-03 Akim Demaille <akim@epita.fr>
5258 * configure.in: Try using -Wformat when compiling.
5260 2001-08-03 Akim Demaille <akim@epita.fr>
5262 * configure.in: Bump to 1.28b.
5264 2001-08-03 Akim Demaille <akim@epita.fr>
5266 * src/complain.c: Adjust strerror_r portability issues.
5268 2001-08-03 Akim Demaille <akim@epita.fr>
5272 2001-08-03 Akim Demaille <akim@epita.fr>
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.
5280 2001-08-03 Akim Demaille <akim@epita.fr>
5282 * src/reader.c (readgram): Display hidden chars in error messages.
5284 2001-08-03 Akim Demaille <akim@epita.fr>
5286 Update to gettext 0.10.39.
5288 2001-08-03 Akim Demaille <akim@epita.fr>
5290 * lib/strspn.c: New.
5292 2001-08-01 Marc Autret <autret_m@epita.fr>
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.
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.
5310 2001-08-01 Robert Anisko <anisko_r@epita.fr>
5312 * doc/bison.texi: Document @$.
5313 (Locations): New section.
5315 2001-07-18 Akim Demaille <akim@epita.fr>
5317 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
5318 * config/prev-version.txt, config/move-if-change: New.
5319 * Makefile.am: Adjust.
5321 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
5323 * src/bison.simple (yyparse): Suppress warning `comparaison
5324 between signed and unsigned'.
5326 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
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'.
5334 2001-07-14 Akim Demaille <akim@epita.fr>
5337 * configure.in: Require Autoconf 2.50.
5338 Update to gettext 0.10.38.
5340 2001-03-16 Akim Demaille <akim@epita.fr>
5342 * doc/bison.texinfo: ANSIfy the examples.
5344 2001-03-16 Akim Demaille <akim@epita.fr>
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.
5352 2001-03-16 Akim Demaille <akim@epita.fr>
5354 * m4/strerror_r.m4: New.
5355 * m4/error.m4: Run AC_FUNC_STRERROR_R.
5356 * lib/error.h, lib/error.c: Update.
5358 2001-03-16 Akim Demaille <akim@epita.fr>
5360 * src/getargs.c (longopts): Clean up.
5362 2001-02-21 Akim Demaille <akim@epita.fr>
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
5368 2001-02-08 Akim Demaille <akim@epita.fr>
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.
5374 2001-02-08 Akim Demaille <akim@epita.fr>
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.
5384 2001-02-02 Akim Demaille <akim@epita.fr>
5386 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
5387 * lib/xalloc.h, lib/xmalloc.c: Update.
5389 2001-01-19 Akim Demaille <akim@epita.fr>
5391 Get rid of the ad hoc handling of token_buffer in the scanner: use
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.
5399 2001-01-19 Akim Demaille <akim@epita.fr>
5401 * src/lex.h: Rename all the tokens:
5402 s/\bENDFILE\b/tok_eof/g;
5403 s/\bIDENTIFIER\b/tok_identifier/g;
5405 Let them be enums, not #define, to ease debugging.
5406 Adjust all the code.
5408 2001-01-18 Akim Demaille <akim@epita.fr>
5410 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
5411 * src/lex.c (maxtoken, grow_token_buffer): Static.
5413 2001-01-18 Akim Demaille <akim@epita.fr>
5415 Since we now use obstacks, more % directives can be enabled.
5417 * src/lex.c (percent_table): Also accept `%yacc',
5418 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
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.
5433 2000-12-20 Akim Demaille <akim@epita.fr>
5435 Also handle the output file (--verbose) with obstacks.
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.
5445 2000-12-20 Akim Demaille <akim@epita.fr>
5447 * src/files.c (open_files): Fix the computation of short_base_name
5448 in the case of `-o foo.tab.c'.
5450 2000-12-20 Akim Demaille <akim@epita.fr>
5452 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
5453 (copy_dollar): Now that everything uses obstacks, get rid of the
5456 2000-12-20 Akim Demaille <akim@epita.fr>
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.
5462 2000-12-20 Akim Demaille <akim@epita.fr>
5464 * src/bison.s1: Remove, we now use directly...
5465 * src/bison.simple: this.
5466 * src/Makefile.am: Use pkgdata instead of data.
5468 2000-12-20 Akim Demaille <akim@epita.fr>
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.
5476 2000-12-19 Akim Demaille <akim@epita.fr>
5478 * src/files.c (outfile, defsfile, actfile): Removed as global
5480 (open_files): Don't compute them.
5481 (output_files): Adjust.
5482 (base_name, short_base_name): Be global.
5483 Adjust dependencies.
5485 2000-12-19 Akim Demaille <akim@epita.fr>
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
5492 (open_files): Use it.
5493 * tests/suite.at (Checking output file names): New test.
5495 2000-12-19 Akim Demaille <akim@epita.fr>
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
5501 * src/bison.s1: s/$/%% actions/.
5502 * src/bison.hairy: Likewise.
5504 2000-12-19 Akim Demaille <akim@epita.fr>
5506 * src/output.c (output_parser): Compute the `#line' lines when
5508 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
5509 Suggested by Hans Aberg.
5511 2000-12-19 Akim Demaille <akim@epita.fr>
5513 Let the handling of the skeleton files be local to the procedures
5516 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
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
5523 * src/reader.c (read_declarations): When %semantic_parser, open
5526 2000-12-19 Akim Demaille <akim@epita.fr>
5528 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
5529 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
5531 2000-12-19 Akim Demaille <akim@epita.fr>
5533 * src/files.c (open_files): Yipee! We no longer need all the code
5534 looking for `/tmp' since we have no tmp file.
5536 2000-12-19 Akim Demaille <akim@epita.fr>
5538 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
5540 * src/files.c (open_files): Less dependency on MSDOS etc.
5542 2000-12-14 Akim Demaille <akim@epita.fr>
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.
5550 2000-12-12 Akim Demaille <akim@epita.fr>
5552 * src/reader.c (copy_definition, parse_union_decl, copy_action)
5553 (copy_guard): Quote the file names.
5554 Reported by Laurent Mascherpa.
5556 2000-12-12 Akim Demaille <akim@epita.fr>
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.
5563 2000-11-17 Akim Demaille <akim@epita.fr>
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 *'
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
5575 2000-11-17 Akim Demaille <akim@epita.fr>
5577 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
5579 (suite.m4, regression.m4, calc.m4): these.
5580 * tests/atgeneral.m4: Update from CVS Autoconf.
5582 2000-11-17 Akim Demaille <akim@epita.fr>
5584 * tests/regression.m4 (%union and --defines): New test,
5585 demonstrating a current bug in the obstack implementation.
5587 2000-11-17 Akim Demaille <akim@epita.fr>
5589 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
5591 Use them to declare the variables which are global or local to
5594 2000-11-17 Akim Demaille <akim@epita.fr>
5596 * acconfig.h: Remove, no longer used.
5598 2000-11-07 Akim Demaille <akim@epita.fr>
5600 * src: s/Copyright (C)/Copyright/g.
5602 2000-11-07 Akim Demaille <akim@epita.fr>
5604 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
5606 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
5608 2000-11-07 Akim Demaille <akim@epita.fr>
5610 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
5611 Merge in a single CPP if/else.
5613 2000-11-07 Akim Demaille <akim@epita.fr>
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.
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.
5626 2000-11-03 Akim Demaille <akim@epita.fr>
5628 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
5629 s/PFILE1/BISON_HAIRY/.
5630 Adjust dependencies.
5632 2000-11-03 Akim Demaille <akim@epita.fr>
5634 For some reason, this was not applied.
5636 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
5637 `unlink': it's no longer used.
5639 2000-11-03 Akim Demaille <akim@epita.fr>
5641 * src/files.c (skeleton_find): New function, eved out of...
5642 (open_files, open_extra_files): here.
5644 2000-11-03 Akim Demaille <akim@epita.fr>
5648 * src/files.c (obstack_save): New function.
5649 (done): Rename as...
5650 (output_files): this.
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.
5656 2000-11-02 Akim Demaille <akim@epita.fr>
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.
5662 2000-11-02 Akim Demaille <akim@epita.fr>
5664 Remove the last uses of mktemp and unlink/delete.
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
5673 (output_token_defines, reader_output_yylsp): Use obstacks.
5674 * src/system.h (obstack_fgrow3): New.
5676 2000-11-01 Akim Demaille <akim@epita.fr>
5678 Change each use of `fattrs' into a use of `attrs_obstack'.
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.
5686 2000-11-01 Akim Demaille <akim@epita.fr>
5689 Change each use of `faction' into a use of `action_obstack'.
5691 * lib/obstack.h, lib/obstack.c: New files.
5692 * src/files.c (faction): Remove.
5693 (action_obstack): New.
5694 Adjust all dependencies.
5696 2000-10-20 Akim Demaille <akim@epita.fr>
5698 * lib/quote.h (PARAMS): New macro. Use it.
5700 2000-10-16 Akim Demaille <akim@epita.fr>
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.
5706 2000-10-16 Akim Demaille <akim@epita.fr>
5708 * src/symtab.c (bucket_new): New function.
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.
5717 2000-10-16 Akim Demaille <akim@epita.fr>
5719 * src/lex.c (read_typename): New function.
5721 * src/reader.c (copy_dollar): Likewise.
5723 2000-10-16 Akim Demaille <akim@epita.fr>
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.
5731 2000-10-16 Akim Demaille <akim@epita.fr>
5733 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
5734 `read_signed_integer'.
5736 2000-10-16 Akim Demaille <akim@epita.fr>
5738 * src/reader.c (copy_dollar): New function.
5739 (copy_guard, copy_action): Use it.
5741 2000-10-16 Akim Demaille <akim@epita.fr>
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'.
5749 2000-10-04 Akim Demaille <akim@epita.fr>
5751 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
5753 2000-10-04 Akim Demaille <akim@epita.fr>
5755 * doc/bison.texinfo: Various typos spotted by Neil Booth.
5757 2000-10-04 Akim Demaille <akim@epita.fr>
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.
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
5768 2000-10-04 Akim Demaille <akim@epita.fr>
5770 * src/reader.c (parse_expect_decl): Keep `count' within the size
5774 2000-10-02 Paul Eggert <eggert@twinsun.com>
5776 * bison.s1 (yyparse): Assign the default value
5777 unconditionally, to avoid a GCC warning and make the parser a
5780 2000-10-02 Akim Demaille <akim@epita.fr>
5782 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
5785 2000-10-02 Akim Demaille <akim@epita.fr>
5787 * src/derives.c, src/print.c, src/reduce.c: To ease the
5788 translation, move some `\n' out of the translated strings.
5790 2000-10-02 Akim Demaille <akim@epita.fr>
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.
5798 * src/getargs.c (getargs): Support `--locations'.
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'.
5806 * tests/calc.m4: Test it.
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'.
5813 2000-10-02 Akim Demaille <akim@epita.fr>
5815 Also test parse error messages, including with YYERROR_VERBOSE.
5817 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
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.
5826 2000-10-02 Akim Demaille <akim@epita.fr>
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:
5847 unfortunately this leads to a CPP conflict when
5848 `--name-prefix=foo' is used since it produces `#define yydebug
5851 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
5852 (YYDPRINTF): New macro.
5854 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
5856 Also test `--verbose', `--defines' and `--name-prefix'.
5858 2000-10-02 Akim Demaille <akim@epita.fr>
5860 Improve the readability of the produced parsers.
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
5867 New variable, `number_of_dollar_signs', to check there's exactly
5868 one `$' in the parser skeleton.
5870 2000-10-02 Akim Demaille <akim@epita.fr>
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.
5878 2000-10-02 Akim Demaille <akim@epita.fr>
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'.
5891 2000-10-02 Akim Demaille <akim@epita.fr>
5893 * src/getargs.c (fixed_outfiles): Rename as...
5894 (yaccflag): for consistency and accuracy.
5895 Adjust dependencies.
5897 2000-10-02 Akim Demaille <akim@epita.fr>
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.
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
5911 Adjust dependencies.
5912 * src/warshall.h: New file.
5915 2000-10-02 Akim Demaille <akim@epita.fr>
5917 Various anti-`extern in *.c' changes.
5919 * src/system.h: Include `assert.h'.
5921 2000-10-02 Akim Demaille <akim@epita.fr>
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.
5931 Remove a lot of now useless `extern' statements in most files.
5933 2000-10-02 Akim Demaille <akim@epita.fr>
5935 * src/LR0.h: New file.
5938 2000-10-02 Akim Demaille <akim@epita.fr>
5940 * src/print.h: New file.
5942 * src/print.c: Formatting and ordering changes.
5943 (verbose, terse): Replace with...
5944 (print_results): this new function.
5945 Adjust dependencies.
5947 2000-10-02 Akim Demaille <akim@epita.fr>
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.
5956 2000-10-02 Akim Demaille <akim@epita.fr>
5958 * src/nullable.h: New file.
5959 Propagate its inclusion.
5960 * src/nullable.c: Formatting changes.
5962 2000-10-02 Akim Demaille <akim@epita.fr>
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.
5970 2000-10-02 Akim Demaille <akim@epita.fr>
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.
5979 2000-10-02 Akim Demaille <akim@epita.fr>
5981 * src/reader.h: New file.
5982 Propagate its use instead of tedious list of `extern' and
5984 * src/reader.c: Formatting changes, topological sort,
5987 2000-10-02 Akim Demaille <akim@epita.fr>
5989 * src/lex.h: Prototype `lex.c' exported functions.
5990 * src/reader.c: Adjust.
5991 * src/lex.c: Formatting changes.
5992 (safegetc): Rename as...
5995 2000-10-02 Akim Demaille <akim@epita.fr>
5997 * src/lalr.h: New file.
5998 Propagate its inclusion instead of prototypes and `extern'.
5999 * src/lalr.c: Formatting changes, topological sorting etc.
6001 2000-10-02 Akim Demaille <akim@epita.fr>
6003 * src/output.c (token_actions): Introduce a temporary array,
6004 YYDEFACT, that makes it possible for this function to use
6007 2000-10-02 Akim Demaille <akim@epita.fr>
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
6014 * src/reader.c (user_toknums): Be a short table instead of an int
6016 Adjust dependencies.
6018 Factor the short table outputs.
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.
6024 2000-10-02 Akim Demaille <akim@epita.fr>
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
6033 2000-09-21 Akim Demaille <akim@epita.fr>
6035 * src/atgeneral.m4: Update from Autoconf.
6037 2000-09-21 Akim Demaille <akim@epita.fr>
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
6046 (initialize_states): Rename as...
6048 * src/Makefile.am (noinst_HEADERS): Adjust.
6050 2000-09-20 Akim Demaille <akim@epita.fr>
6052 * src/acconfig.h: Don't protect config.h against multiple
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.
6060 2000-09-20 Akim Demaille <akim@epita.fr>
6062 * src/derives.h: New file.
6063 * src/main.c, src/derives.h: Use it.
6065 * src/Makefile.am (noinst_HEADERS): Adjust.
6067 2000-09-20 Akim Demaille <akim@epita.fr>
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'.
6075 2000-09-19 Akim Demaille <akim@epita.fr>
6077 * src/output.c: Formatting changes.
6078 * src/machine.h: Remove, leaving its contents in...
6079 * src/system.h: here.
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.
6087 * tests/calc.m4 (yyin): Be initialized in main, not on the global
6089 (yyerror): Returns void, not int.
6090 * doc/bison.texinfo: Formatting changes.
6092 2000-09-19 Akim Demaille <akim@epita.fr>
6094 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
6097 2000-09-18 Akim Demaille <akim@epita.fr>
6099 * configure.in: Append WARNING_CFLAGS to CFLAGS.
6100 * src/Makefile.am (INCLUDES): Don't.
6101 Be ready to fetch headers in lib/.
6103 2000-09-18 Akim Demaille <akim@epita.fr>
6105 * doc/bison.texinfo: Update the copyright.
6106 ANSIfy and GNUify the examples.
6107 Remove the old menu.
6109 2000-09-18 Akim Demaille <akim@epita.fr>
6111 First set of tests: use the `calc' example from the documentation.
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.
6123 2000-09-18 Akim Demaille <akim@epita.fr>
6125 Add support for an Autotest test suite for Bison.
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
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.
6138 2000-04-14 Akim Demaille <akim@epita.fr>
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'
6147 (parse_union_decl, copy_guard, copy_action): Use the same
6148 `unmatched' message.
6149 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
6151 2000-03-31 Akim Demaille <akim@epita.fr>
6153 * src/files.c (tryopen, tryclose): Move to the top.
6156 2000-03-31 Akim Demaille <akim@epita.fr>
6158 * src/main.c (main): Don't call `done', exit does it.
6160 2000-03-31 Akim Demaille <akim@epita.fr>
6162 * allocate.c: s/return (foo)/return foo/.
6165 * output.c: Likewise.
6166 * reader.c: Likewise.
6167 * symtab.c: Likewise.
6168 * vmsgetargs.c: Likewise.
6170 2000-03-31 Akim Demaille <akim@epita.fr>
6172 Clean up the error reporting functions.
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):
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'.
6189 * src/getargs.c (usage): More `fputs', less `fprintf'.
6191 2000-03-28 Akim Demaille <akim@epita.fr>
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
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.
6207 2000-03-28 Akim Demaille <akim@epita.fr>
6209 * src/getargs.c (usage): Refresh the help message.
6211 2000-03-17 Akim Demaille <akim@epita.fr>
6213 * src/getopt1.c: Updated from textutils 2.0e
6214 * src/getopt.c: Likewise.
6215 * src/getopt.h: Likewise.
6217 2000-03-17 Akim Demaille <akim@epita.fr>
6219 * src/Makefile.am (bison.simple): Fix the awk program: quote only
6220 the file name, not the whole `#line LINE FILE'.
6222 2000-03-17 Akim Demaille <akim@epita.fr>
6224 On syntax errors, report the token on which we choked.
6226 * src/bison.s1 (yyparse): In the label yyerrlab, when
6227 YYERROR_VERBOSE, add yychar in msg.
6229 2000-03-17 Akim Demaille <akim@epita.fr>
6231 * src/reader.c (copy_at): New function.
6232 (copy_guard): Use it.
6233 (copy_action): Use it.
6235 2000-03-17 Akim Demaille <akim@epita.fr>
6237 Be kind to translators, save some useless translations.
6239 * src/main.c (banner): New function.
6240 (fatal_banner): Use it.
6241 (warn_banner): Use it.
6243 2000-03-17 Akim Demaille <akim@epita.fr>
6245 * src/reader.c (copy_definition): Use copy_string and
6246 copy_comment. Removed now unused `match', `ended',
6248 (copy_comment, copy_string): Moved, to be visible from
6251 2000-03-17 Akim Demaille <akim@epita.fr>
6253 * src/reader.c (copy_string): Declare `static inline'. No
6254 problems with inline, since it is checked by configure.
6255 (copy_comment): Likewise.
6257 2000-03-17 Akim Demaille <akim@epita.fr>
6259 * src/reader.c (packsymbols): Formatting changes.
6261 2000-03-17 Akim Demaille <akim@epita.fr>
6263 * src/reader.c (copy_comment): New function, factored out from:
6264 (copy_action): Use it. Removed now unused `match', `ended',
6266 (copy_guard): Likewise.
6268 2000-03-17 Akim Demaille <akim@epita.fr>
6270 * src/reader.c (copy_string): New function, factored out from:
6271 (copy_action): Use it.
6272 (copy_guard): Likewise.
6274 2000-03-17 Akim Demaille <akim@epita.fr>
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).
6282 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
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
6294 2000-03-17 Akim Demaille <akim@epita.fr>
6296 * src/bison.s1: Formatting and cosmetics changes.
6297 * src/reader.c: Likewise.
6298 Update the Copyright notice.
6300 2000-03-17 Akim Demaille <akim@epita.fr>
6302 * src/bison.s1 (#line): All set to `#line' only, since the
6303 Makefile now handles them.
6305 2000-03-16 Akim Demaille <akim@epita.fr>
6307 * src/output.c (output_rule_data): Output the documentation of
6309 (Copyright notice): Update.
6312 2000-03-16 Akim Demaille <akim@epita.fr>
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'.
6319 2000-03-16 Akim Demaille <akim@epita.fr>
6321 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
6322 and related variables so that the similarities are highlighted.
6324 2000-03-16 Akim Demaille <akim@epita.fr>
6326 * src/bison.s1: Properly indent CPP directives.
6328 2000-03-16 Akim Demaille <akim@epita.fr>
6330 * src/bison.s1: Properly indent the `alloca' CPP section.
6332 2000-03-16 Akim Demaille <akim@epita.fr>
6334 Do not hard code values of directories in `configure.in'.
6335 Update the `configure' tool chain.
6337 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
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
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
6354 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
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.
6363 2000-03-10 Akim Demaille <akim@epita.fr>
6366 Formatting changes of various comments.
6367 Respect the GNU coding standards at various places.
6368 Don't use `_()' when no translation is needed.
6370 1999-12-13 Jesse Thilo <jthilo@gnu.org>
6373 OS/2 honors TMPDIR environment variable.
6375 1999-12-13 Jesse Thilo <jthilo@gnu.org>
6377 * doc/bison.texinfo: Tweaked spelling and grammar.
6379 Removed reference to price of printed copy.
6380 Mention BISON_SIMPLE and BISON_HAIRY.
6382 1999-12-13 Jesse Thilo <jthilo@gnu.org>
6384 * configure.in, NEWS:
6385 Bison 1.29 released.
6387 1999-10-27 Jesse Thilo <jthilo@gnu.org>
6389 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
6390 Added reference card.
6392 1999-07-26 Jesse Thilo <jthilo@gnu.org>
6394 * po/ru.po: Added Russian translation.
6396 1999-07-26 Jesse Thilo <jthilo@gnu.org>
6398 * configure.in: Added Russian translation.
6400 1999-07-06 Jesse Thilo <jthilo@gnu.org>
6402 * configure.in, NEWS, README:
6403 Released version 1.28.
6405 1999-06-14 Jesse Thilo <jthilo@gnu.org>
6408 Squashed redefinition warning on some systems.
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
6414 1999-06-14 Jesse Thilo <jthilo@gnu.org>
6416 * po/POTFILES.in: Got rid of version.c.
6418 1999-06-14 Jesse Thilo <jthilo@gnu.org>
6420 * acconfig.h, configure.in:
6421 Have configure build version string instead of relying on ANSI string
6424 1999-06-08 Jesse Thilo <jthilo@gnu.org>
6427 Dropped mention of `+' for long-named options.
6429 1999-05-30 Jesse Thilo <jthilo@gnu.org>
6431 * src/files.c: Added <unistd.h> for unlink().
6433 * src/Makefile.am, src/system.h:
6436 1999-05-30 Jesse Thilo <jthilo@gnu.org>
6438 * README: Added a FAQ list.
6440 * configure.in, acconfig.h:
6443 1999-05-30 Jesse Thilo <jthilo@gnu.org>
6445 * doc/FAQ, doc/Makefile.am:
6448 1999-05-19 Jesse Thilo <jthilo@gnu.org>
6450 * src/alloc.h, src/symtab.h, src/version.c:
6451 Protected inclusion of "config.h" with HAVE_CONFIG_H.
6453 1999-04-18 Jesse Thilo <jthilo@gnu.org>
6455 * src/.cvsignore, src/Makefile.am:
6456 Reorganized: sources in `src', documentation in `doc'.
6458 * src/lex.c (literalchar):
6459 fixed the code for escaping double quotes (thanks
6462 1999-04-18 Jesse Thilo <jthilo@gnu.org>
6464 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
6465 Adjusted paths to reflect directory reorganization.
6467 1999-04-18 Jesse Thilo <jthilo@gnu.org>
6469 * doc/.cvsignore, doc/Makefile.am:
6470 Reorganized: sources in `src', documentation in `doc'.
6472 1999-04-18 Jesse Thilo <jthilo@gnu.org>
6475 Updated AC_INIT file to reflect directory reorganization.
6477 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
6478 Reorganized: sources in `src', documentation in `doc'.
6480 1999-04-13 Jesse Thilo <jthilo@gnu.org>
6483 Don't declare calloc() and realloc() if not necessary.
6485 1999-04-13 Jesse Thilo <jthilo@gnu.org>
6487 * configure.in, acconfig.h, acinclude.m4:
6488 Don't declare calloc() and realloc() if not necessary.
6490 1999-03-23 Jesse Thilo <jthilo@gnu.org>
6492 * po/.cvsignore: Added i18n support.
6494 1999-03-23 Jesse Thilo <jthilo@gnu.org>
6496 * acconfig.h, configure.in, Makefile.am:
6499 1999-03-22 Jesse Thilo <jthilo@gnu.org>
6501 * src/bison.s1: Fixed #line numbers.
6503 1999-03-15 Jesse Thilo <jthilo@gnu.org>
6505 * po/es.po, po/fr.po, po/nl.po, po/de.po:
6506 Added PO files from Translation Project.
6508 1999-03-03 Jesse Thilo <jthilo@gnu.org>
6511 Added support for non-ANSI compilers (ansi2knr).
6513 1999-02-16 Jesse Thilo <jthilo@gnu.org>
6515 * configure.in: Bumped version number to 1.27.
6518 Added `bison.simple' to list of files removed by `make distclean'.
6520 1999-02-12 Jesse Thilo <jthilo@gnu.org>
6522 * src/files.c, src/files.h:
6523 Defined locations of parser files in config.h instead of Makefile.
6525 1999-02-12 Jesse Thilo <jthilo@gnu.org>
6527 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
6528 Defined locations of parser files in config.h instead of Makefile.
6530 1999-02-09 Jesse Thilo <jthilo@gnu.org>
6533 Removed inappropriate use of $< macro.
6535 1999-02-05 Jesse Thilo <jthilo@gnu.org>
6537 * po/Makefile.in.in, po/POTFILES.in:
6538 Add `po' directory skeleton.
6540 1999-01-27 Jesse Thilo <jthilo@gnu.org>
6542 * README: Document help-bison list.
6544 * configure.in: Add check for mkstemp().
6546 1999-01-20 Jesse Thilo <jthilo@gnu.org>
6548 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
6549 Hush a few compiler warnings.
6552 Add tryclose(), which verifies that fclose was successful.
6553 Hush a couple of compiler warnings.
6555 1999-01-20 Jesse Thilo <jthilo@gnu.org>
6557 * Makefile.am, OChangeLog:
6558 ChangeLog is now automatically generated. Include the old version as
6561 1999-01-14 Jesse Thilo <jthilo@gnu.org>
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:
6566 1999-01-14 Jesse Thilo <jthilo@gnu.org>
6568 * doc/bison.texinfo: Fix formatting glitch.
6570 * doc/bison.texinfo: Update FSF address.
6572 1999-01-14 Jesse Thilo <jthilo@gnu.org>
6574 * acconfig.h: Update FSF address.
6576 1999-01-08 Jesse Thilo <jthilo@gnu.org>
6579 Don't define PACKAGE here, since config.h defines it.
6581 1998-12-30 Jesse Thilo <jthilo@gnu.org>
6583 * src/reader.c: Update copyright date.
6586 Ditch sprintf to statically-sized buffers in fatal/warn functions in
6587 favor of output directly to stderr (avoids buffer overruns).
6589 * src/reader.c: Some checks for premature EOF.
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.
6594 * src/files.c: Honor TMPDIR on Unix hosts.
6595 Use prototypes if the compiler understands them.
6598 Fix a couple of buffer overrun bugs.
6599 Use prototypes if the compiler understands them.
6601 * src/system.h: Include unistd.h and ctype.h.
6602 Use #ifdef instead of #if for NLS symbols.
6604 1998-12-30 Jesse Thilo <jthilo@gnu.org>
6606 * doc/bison.texinfo:
6607 Delete comment "consider using @set for edition number, etc..." since
6608 we now are doing so.
6610 1998-12-30 Jesse Thilo <jthilo@gnu.org>
6613 Use prototypes if the compiler understands them.
6615 * NEWS: Document 1.26 highlights.
6617 * Makefile.am: Require Automake 1.3 or later.
6620 Use prototypes if the compiler understands them.
6622 1998-12-29 Jesse Thilo <jthilo@gnu.org>
6625 Use VERSION symbol from automake for version number.
6627 1998-12-29 Jesse Thilo <jthilo@gnu.org>
6629 * acconfig.h, configure.in, version.cin:
6630 Use VERSION symbol from automake for version number.
6632 1998-11-28 Jesse Thilo <jthilo@gnu.org>
6635 Distribute original version of simple parser (bison.s1), not built
6636 version (bison.simple).
6638 1998-11-28 Jesse Thilo <jthilo@gnu.org>
6640 * doc/bison.texinfo: Add info dir entry.
6642 * doc/bison.texinfo:
6643 Let automake put version number into documentation.
6645 1998-11-26 Jesse Thilo <jthilo@gnu.org>
6647 * src/bison.cld, src/build.com, src/vmshlp.mar:
6648 Add non-RCS files from /gd/gnu/bison.
6650 1998-11-26 Jesse Thilo <jthilo@gnu.org>
6653 Document the BISON_HAIRY and BISON_SIMPLE variables.
6655 1998-11-25 Jesse Thilo <jthilo@gnu.org>
6657 * src/version.c: Build version.c automatically.
6660 Fix token numbering (used to start at 258, not 257).
6662 * src/system.h: Include config.h.
6664 * src/getargs.c: Update bug report address.
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.
6669 1998-11-25 Jesse Thilo <jthilo@gnu.org>
6672 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
6674 * configure.in, version.cin:
6675 Build version.c automatically.
6677 * AUTHORS: Add AUTHORS file.
6679 * README: Update bug report address.
6682 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
6684 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
6687 1998-11-25 Jesse Thilo <jthilo@gnu.org>
6689 * doc/bison.texinfo: Clean up some formatting.
6691 1998-05-05 Richard Stallman <rms@gnu.org>
6693 * doc/bison.texinfo:
6694 Explain better why to make a pure parser.
6696 1998-01-05 Richard Stallman <rms@gnu.org>
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
6703 1997-08-25 Richard Stallman <rms@gnu.org>
6705 * src/reader.c (stack_offset;):
6706 Change some warni to warns.
6708 * src/lex.c (literalchar): Use warns, not warni.
6710 1997-06-28 Richard Stallman <rms@gnu.org>
6712 * src/bison.s1: Add a Bison version comment.
6714 * src/main.c (fatal, warn, berror):
6717 1997-06-28 Richard Stallman <rms@gnu.org>
6719 * Makefile.in (bison_version): New variable.
6720 (dist): Use that variable.
6721 (bison.s1): Substitute the Bison version into bison.simple.
6723 * bison.simple: Add a Bison version comment.
6725 1997-06-18 Richard Stallman <rms@gnu.org>
6727 * src/main.c (fatal, warn, berror):
6728 Make error messages standard.
6729 (toomany): Improve error message text.
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.
6734 1997-06-18 Richard Stallman <rms@gnu.org>
6736 * Makefile.in: new.h renamed to alloc.h.
6738 1997-05-24 Richard Stallman <rms@gnu.org>
6740 * src/lex.c (literalchar):
6741 Fix the code for escaping \, " and '.
6743 (lex): Avoid trouble when there are many chars
6744 to discard in a char literal with just several chars in it.
6746 1997-05-17 Richard Stallman <rms@gnu.org>
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.
6756 1997-05-17 Richard Stallman <rms@gnu.org>
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.
6766 1997-04-23 Richard Stallman <rms@gnu.org>
6769 (alloca) [__hpux]: Always define as __builtin_alloca.
6771 1997-04-23 Richard Stallman <rms@gnu.org>
6774 (alloca) [__hpux]: Always define as __builtin_alloca.
6776 1997-04-22 Richard Stallman <rms@gnu.org>
6779 [__hpux]: Include alloca.h (right for HPUX 10)
6780 instead of declaring alloca (right for HPUX 9).
6782 * src/bison.s1 (__yy_memcpy):
6783 Declare arg `count' as unsigned int.
6784 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
6786 1997-04-22 Richard Stallman <rms@gnu.org>
6789 [__hpux]: Include alloca.h (right for HPUX 10)
6790 instead of declaring alloca (right for HPUX 9).
6792 * bison.simple (__yy_memcpy):
6793 Declare arg `count' as unsigned int.
6794 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
6796 1997-01-03 Richard Stallman <rms@gnu.org>
6798 * src/allocate.c: [__STDC__ or _MSC_VER]:
6799 Declare calloc and realloc to return void *.
6801 1997-01-02 Richard Stallman <rms@gnu.org>
6804 [_MSC_VER]: Include stdlib.h and process.h.
6805 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
6807 * src/main.c (main): Return FAILURE as a value.
6808 (printable_version): Declare arg as int, not char.
6810 1997-01-02 Richard Stallman <rms@gnu.org>
6812 * Makefile.in (dist):
6813 Explicitly check for symlinks, and copy them.
6815 1996-12-19 Richard Stallman <rms@gnu.org>
6818 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
6820 1996-12-18 Paul Eggert <eggert@gnu.org>
6822 * src/bison.s1 (yyparse):
6823 If __GNUC__ and YYPARSE_PARAM are both defined,
6824 declare yyparse to have a void * argument.
6826 1996-12-18 Paul Eggert <eggert@gnu.org>
6828 * bison.simple (yyparse):
6829 If __GNUC__ and YYPARSE_PARAM are both defined,
6830 declare yyparse to have a void * argument.
6832 1996-12-17 Richard Stallman <rms@gnu.org>
6834 * src/reduce.c (nbits): Add some casts.
6836 1996-08-12 Richard Stallman <rms@gnu.org>
6838 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
6840 1996-08-12 Richard Stallman <rms@gnu.org>
6842 * bison.simple: Test _MSDOS as well as _MSDOS_.
6844 1996-07-31 Richard Stallman <rms@gnu.org>
6847 [__sun && __i386]: Include alloca.h.
6849 1996-07-31 Richard Stallman <rms@gnu.org>
6852 [__sun && __i386]: Include alloca.h.
6854 1996-07-30 Richard Stallman <rms@gnu.org>
6856 * src/bison.s1: Comment change.
6858 * src/bison.s1: Test _MSDOS_, not MSDOS.
6860 1996-07-30 Richard Stallman <rms@gnu.org>
6862 * bison.simple: Comment change.
6864 * bison.simple: Test _MSDOS_, not MSDOS.
6866 1996-06-01 Richard Stallman <rms@gnu.org>
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.
6872 Insert `_' macro around many string constants.
6874 (main): Call setlocale, bindtextdomain and textdomain.
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.
6883 1996-06-01 Richard Stallman <rms@gnu.org>
6885 * POTFILES.in: New file.
6887 * Makefile.in (allocate.o):
6888 Define target explicitly.
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.
6898 1996-05-12 Richard Stallman <rms@gnu.org>
6901 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
6903 1996-05-12 Richard Stallman <rms@gnu.org>
6906 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
6908 1996-05-11 Richard Stallman <rms@gnu.org>
6910 * src/bison.s1 (__yy_memcpy):
6911 Really reorder the args, as was supposedly done on Feb 14 1995.
6912 (yyparse): Calls changed accordingly.
6914 1996-05-11 Richard Stallman <rms@gnu.org>
6916 * Makefile.in (dist): Don't use $(srcdir).
6918 * bison.simple (__yy_memcpy):
6919 Really reorder the args, as was supposedly done on Feb 14 1995.
6920 (yyparse): Calls changed accordingly.
6922 1996-01-27 Richard Stallman <rms@gnu.org>
6924 * src/output.c (output_rule_data):
6925 Test YYERROR_VERBOSE in the conditional
6926 around the definition of ttyname.
6928 1995-12-29 Richard Stallman <rms@gnu.org>
6931 Fix line numbers in #line commands.
6933 1995-12-29 Richard Stallman <rms@gnu.org>
6936 Fix line numbers in #line commands.
6938 1995-12-27 Richard Stallman <rms@gnu.org>
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.
6945 1995-12-27 Richard Stallman <rms@gnu.org>
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.
6952 1995-11-29 Richard Stallman <rms@gnu.org>
6954 * doc/bison.texinfo:
6955 Describe literal string tokens, %raw, %no_lines, %token_table.
6957 1995-11-29 Daniel Hagerty <hag@gnu.org>
6959 * doc/bison.texinfo: Fixed update date
6961 1995-10-16 Richard Stallman <rms@gnu.org>
6963 * src/version.c: Version 1.25.
6965 1995-10-16 Richard Stallman <rms@gnu.org>
6967 * NEWS: *** empty log message ***
6969 1995-10-16 Richard Stallman <rms@gnu.org>
6971 * doc/bison.1, doc/bison.rnh:
6974 1995-10-15 Richard Stallman <rms@gnu.org>
6976 * src/vmsgetargs.c, src/getargs.c:
6977 Added -n, -k, and -raw switches.
6978 (noparserflag, toknumflag, rawtoknumflag): New variables.
6980 * src/symtab.h (SALIAS):
6981 New #define for adding aliases to %token.
6982 (struct bucket): Added `alias' field.
6984 * src/reduce.c (reduce_grammar):
6985 Revise error message.
6986 (print_notices): Remove final `.' from error message.
6988 * src/reader.c (reader_output_yylsp):
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.
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.
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.
7029 Added THONG and NOOP for alias processing.
7030 Added SETOPT for the new code that allows setting options with %flags.
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
7048 (skip_white_space, lex): Revised most error messages
7049 and changed fatal to warn to avoid aborting.
7050 (percent_table): Added %thong declarations.
7052 * src/gram.h: Comment changes.
7054 * src/files.c (openfiles, open_extra_files, done):
7056 and actfile file. Handle noparserflag. Both for -n switch.
7058 * src/conflicts.c (resolve_sr_conflict):
7059 Remove use of alloca.
7061 1995-06-01 Jim Meyering <meyering@gnu.org>
7063 * doc/bison.texinfo: *** empty log message ***
7065 1995-05-06 Richard Stallman <rms@gnu.org>
7067 * src/bison.s1: Comment change.
7069 1995-05-06 Richard Stallman <rms@gnu.org>
7071 * bison.simple: Comment change.
7073 1995-05-03 Richard Stallman <rms@gnu.org>
7075 * src/version.c: Version now 1.24.
7077 * src/bison.s1: Change distribution terms.
7079 * src/version.c: Version now 1.23.
7081 1995-05-03 Richard Stallman <rms@gnu.org>
7083 * doc/bison.texinfo:
7084 Rewrite "Conditions for Using Bison".
7085 Update version to 1.24.
7087 1995-05-03 Richard Stallman <rms@gnu.org>
7089 * bison.simple: Change distribution terms.
7091 1995-02-23 Richard Stallman <rms@gnu.org>
7093 * src/files.c: Test __VMS_POSIX as well as VMS.
7095 1995-02-14 Jim Meyering <meyering@gnu.org>
7097 * src/bison.s1 (__yy_memcpy):
7098 Renamed from __yy_bcopy to avoid
7099 confusion. Reverse FROM and TO arguments to be consistent with
7102 1995-02-14 Jim Meyering <meyering@gnu.org>
7104 * bison.simple (__yy_memcpy):
7105 Renamed from __yy_bcopy to avoid
7106 confusion. Reverse FROM and TO arguments to be consistent with
7109 1994-11-10 David J. MacKenzie <djm@gnu.org>
7115 * Makefile.in (DISTFILES): Include NEWS.
7117 * Makefile.in (DISTFILES):
7118 Include install-sh, not install.sh.
7120 * configure.in: Update to Autoconf v2 macro names.
7122 1994-10-05 David J. MacKenzie <djm@gnu.org>
7124 * Makefile.in: fix typo
7126 * Makefile.in (prefix, exec_prefix):
7127 Let configure set them.
7129 1994-09-28 David J. MacKenzie <djm@gnu.org>
7131 * Makefile.in: Set datadir to $(prefix)/share.
7133 1994-09-15 Richard Stallman <rms@gnu.org>
7136 Update copyright notice and GPL version.
7138 1994-09-15 Richard Stallman <rms@gnu.org>
7141 Update copyright notice and GPL version.
7143 1994-07-12 Richard Stallman <rms@gnu.org>
7145 * src/reduce.c, src/reader.c:
7148 1994-05-05 David J. MacKenzie <djm@gnu.org>
7150 * Makefile.in: entered into RCS
7152 1994-03-26 Richard Stallman <rms@gnu.org>
7154 * src/bison.s1: entered into RCS
7156 1994-03-26 Richard Stallman <rms@gnu.org>
7158 * bison.simple: entered into RCS
7160 1994-03-25 Richard Stallman <rms@gnu.org>
7162 * src/main.c: entered into RCS
7164 1994-03-24 Richard Stallman <rms@gnu.org>
7166 * src/conflicts.c: entered into RCS
7168 1994-01-02 Richard Stallman <rms@gnu.org>
7170 * Makefile.in: *** empty log message ***
7172 1993-11-21 Richard Stallman <rms@gnu.org>
7174 * src/bison.s1: *** empty log message ***
7176 1993-11-21 Richard Stallman <rms@gnu.org>
7178 * doc/bison.texinfo: entered into RCS
7180 * doc/bison.texinfo: *** empty log message ***
7182 1993-11-21 Richard Stallman <rms@gnu.org>
7184 * bison.simple: *** empty log message ***
7186 1993-10-25 David J. MacKenzie <djm@gnu.org>
7188 * doc/bison.texinfo: *** empty log message ***
7190 1993-10-19 Richard Stallman <rms@gnu.org>
7192 * src/bison.s1: *** empty log message ***
7194 1993-10-19 Richard Stallman <rms@gnu.org>
7196 * bison.simple: *** empty log message ***
7198 1993-10-14 Richard Stallman <rms@gnu.org>
7200 * src/bison.s1: *** empty log message ***
7202 1993-10-14 Richard Stallman <rms@gnu.org>
7204 * bison.simple: *** empty log message ***
7206 1993-09-14 David J. MacKenzie <djm@gnu.org>
7208 * doc/bison.texinfo: *** empty log message ***
7210 1993-09-13 Noah Friedman <friedman@gnu.org>
7212 * Makefile.in: *** empty log message ***
7214 1993-09-10 Richard Stallman <rms@gnu.org>
7216 * src/conflicts.c: *** empty log message ***
7218 * src/system.h: entered into RCS
7220 1993-09-10 Richard Stallman <rms@gnu.org>
7222 * doc/bison.1: entered into RCS
7224 1993-09-06 Noah Friedman <friedman@gnu.org>
7226 * src/version.c: entered into RCS
7228 1993-09-06 Noah Friedman <friedman@gnu.org>
7230 * Makefile.in: *** empty log message ***
7232 1993-07-30 David J. MacKenzie <djm@gnu.org>
7234 * Makefile.in: *** empty log message ***
7236 1993-07-24 Richard Stallman <rms@gnu.org>
7238 * src/bison.s1: *** empty log message ***
7240 1993-07-24 Richard Stallman <rms@gnu.org>
7242 * bison.simple: *** empty log message ***
7244 1993-07-08 David J. MacKenzie <djm@gnu.org>
7246 * Makefile.in: *** empty log message ***
7248 1993-07-04 Richard Stallman <rms@gnu.org>
7250 * src/bison.s1: *** empty log message ***
7252 1993-07-04 Richard Stallman <rms@gnu.org>
7254 * bison.simple: *** empty log message ***
7256 1993-06-26 David J. MacKenzie <djm@gnu.org>
7258 * src/getargs.c: entered into RCS
7260 1993-06-26 David J. MacKenzie <djm@gnu.org>
7262 * doc/bison.texinfo: *** empty log message ***
7264 * doc/bison.1: New file.
7266 1993-06-25 Richard Stallman <rms@gnu.org>
7268 * src/getargs.c: New file.
7270 1993-06-16 Richard Stallman <rms@gnu.org>
7272 * src/bison.s1: *** empty log message ***
7274 1993-06-16 Richard Stallman <rms@gnu.org>
7276 * bison.simple: *** empty log message ***
7278 1993-06-03 Richard Stallman <rms@gnu.org>
7280 * src/bison.s1: New file.
7282 1993-06-03 Richard Stallman <rms@gnu.org>
7284 * doc/bison.texinfo: *** empty log message ***
7286 1993-06-03 Richard Stallman <rms@gnu.org>
7288 * bison.simple: New file.
7290 1993-05-19 Richard Stallman <rms@gnu.org>
7292 * doc/bison.texinfo: New file.
7294 1993-05-07 Noah Friedman <friedman@gnu.org>
7296 * Makefile.in: *** empty log message ***
7298 1993-04-28 Noah Friedman <friedman@gnu.org>
7300 * src/reader.c: *** empty log message ***
7302 1993-04-23 Noah Friedman <friedman@gnu.org>
7304 * src/alloc.h: entered into RCS
7306 1993-04-20 David J. MacKenzie <djm@gnu.org>
7308 * src/version.c: *** empty log message ***
7310 * src/files.c, src/allocate.c:
7313 * src/reader.c: *** empty log message ***
7315 * src/lex.c: entered into RCS
7317 * src/conflicts.c: New file.
7319 * src/symtab.c: entered into RCS
7321 * src/alloc.h: New file.
7323 * src/LR0.c: entered into RCS
7325 1993-04-18 Noah Friedman <friedman@gnu.org>
7327 * src/reader.c: New file.
7329 * src/version.c: *** empty log message ***
7331 1993-04-18 Noah Friedman <friedman@gnu.org>
7333 * Makefile.in: *** empty log message ***
7335 1993-04-17 Noah Friedman <friedman@gnu.org>
7337 * Makefile.in: *** empty log message ***
7339 1993-04-15 Richard Stallman <rms@gnu.org>
7341 * src/main.c, src/files.c:
7344 1993-04-15 Noah Friedman <friedman@gnu.org>
7346 * configure.in: entered into RCS
7348 * configure.in: *** empty log message ***
7350 * configure.in: New file.
7352 1993-04-14 Richard Stallman <rms@gnu.org>
7354 * Makefile.in: New file.
7356 1993-04-13 Richard Stallman <rms@gnu.org>
7358 * src/version.c: New file.
7360 1993-03-25 Richard Stallman <rms@gnu.org>
7362 * src/output.c: entered into RCS
7364 1992-09-25 Richard Stallman <rms@gnu.org>
7366 * configure.bat: entered into RCS
7368 1992-06-22 Richard Stallman <rms@gnu.org>
7370 * src/vmsgetargs.c: entered into RCS
7372 1992-06-22 Richard Stallman <rms@gnu.org>
7374 * doc/bison.rnh: entered into RCS
7376 1992-04-20 David J. MacKenzie <djm@gnu.org>
7378 * README: entered into RCS
7380 1992-01-22 Richard Stallman <rms@gnu.org>
7382 * src/machine.h: entered into RCS
7384 1991-12-21 Richard Stallman <rms@gnu.org>
7386 * src/lalr.c, src/closure.c:
7389 1991-12-20 Richard Stallman <rms@gnu.org>
7391 * src/state.h: entered into RCS
7393 1991-12-18 Richard Stallman <rms@gnu.org>
7395 * src/print.c, src/nullable.c, src/derives.c:
7398 1991-11-03 David J. MacKenzie <djm@gnu.org>
7400 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
7403 1988-09-09 Richard Stallman <rms@gnu.org>
7405 * src/bison.hairy: entered into RCS
7407 1987-12-16 Richard Stallman <rms@gnu.org>
7409 * REFERENCES: entered into RCS
7412 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
7414 This file is part of GNU Autoconf.
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)
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.
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.