Akim Demaille
cb4956ee99
* tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
...
* src/reduce.c (reduce_grammar_tables): Do not free useless tags,
as all tags are free'ed afterwards.
From Enrico Scholz.
2001-11-28 11:43:24 +00:00
Paul Eggert
648185ab4a
* src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
...
use alloca when we didn't want to, and vice versa.
2001-11-27 23:19:14 +00:00
Marc Autret
b3324f97a8
Update.
2001-11-27 20:56:41 +00:00
Marc Autret
68254a0303
* src/muscle_tab.c (muscle_init): Remove 'verbose' muscle initialization.
...
* src/output.c (prepare): Remove its update.
2001-11-27 20:55:16 +00:00
Marc Autret
d2079671fb
Adjust typo.
2001-11-27 20:47:25 +00:00
Marc Autret
04d843a2a8
* tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
...
Use %error-verbose.
2001-11-27 20:46:12 +00:00
Marc Autret
eeeb962b2f
* src/bison.simple: Remove YYERROR_VERBOSE using.
...
Use %%error_verbose.
(yyparse): Likewise.
* src/output.c (prepare): Give its final value.
* src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
* src/getargs.h: Add its extern declaration.
* src/getargs.c (error_verbose_flag): New int.
(getargs): Update to catch new case.
* src/options.c (option_table): 'error-verbose' is a new option.
(shortopts): Update.
2001-11-27 20:30:13 +00:00
Akim Demaille
e0327bc8b4
* src/system.h: Use intl/libgettext.h.
...
* src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2001-11-27 19:22:10 +00:00
Akim Demaille
000f1a3cb2
* tests/torture.at (Exploding the Stack Size with Malloc):
...
s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2001-11-27 18:57:51 +00:00
Akim Demaille
26cfe0be87
* src/files.c: Include error.h.
...
Reported by Hans Aberg.
2001-11-27 18:43:20 +00:00
Marc Autret
a12f5cabb2
Update TODO.
2001-11-26 23:23:40 +00:00
Marc Autret
f6bd542788
* src/reader.c (parse_include_decl): New, Not yet implemented.
...
(read_declarations): Add case tok_include.
* src/getargs.h (include): Add its extern definition.
* src/getargs.c (include): New const char *.
(getargs): Add case '-I'.
* src/options.c (option_table): Add include as command line and
percent option.
* src/lex.h (token_t): Add tok_include.
2001-11-26 21:06:22 +00:00
Marc Autret
a220f55509
Revert doc patch.
2001-11-26 19:13:40 +00:00
Akim Demaille
2ca209c11d
* src/reader.c (readgram): Make sure rules for mid-rule actions
...
have a lineno equal to that of their host rule.
Reported by Hans Aberg.
* tests/regression.at (Rule Line Numbers): New.
2001-11-26 15:27:58 +00:00
Akim Demaille
0e41b407b9
* src/LR0.c (allocate_itemsets): kernel_size contains ints, not
...
size_ts.
2001-11-26 13:01:17 +00:00
Akim Demaille
e0c40012bd
* src/reader.c (read_declarations): Don't abort on tok_illegal,
...
issue an error message.
* tests/regression.at (Invalid %directive): New.
Reported by Hans Aberg.
2001-11-26 09:50:29 +00:00
Akim Demaille
5e147124b5
* configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
...
* lib/Makefile.am (libbison_a_SOURCES): Adjust.
2001-11-26 09:35:38 +00:00
Akim Demaille
a034c8b849
* src/conflicts.c (conflicts_print): Don't complain at all when
...
there are no reduce/reduce conflicts, and as many shift/reduce
conflicts as expected.
* tests/regression.at (%expect right): Adjust.
2001-11-26 09:32:32 +00:00
Marc Autret
b83f0407c6
* doc/bison.texinfo (Mystery Conflicts): Hint '-v' use.
...
From Golubev I. N.
2001-11-25 13:02:55 +00:00
Akim Demaille
c64a20f3dc
* lib/alloca.c: Update, from fileutils.
2001-11-23 14:56:30 +00:00
Akim Demaille
5b0d29bb52
* lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
2001-11-23 14:19:09 +00:00
Akim Demaille
722c4bfec2
* src/system.h: Include alloca.h.
...
* src/main.c (main) [C_ALLOCA]: Call alloca (0).
2001-11-23 14:16:34 +00:00
Akim Demaille
6255b43511
* src/print_graph.c (print_actions): Remove `rule', unused.
...
* src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
pacify GCC's signed < unsigned warnings.
* src/closure.c (itemsetsize): Likewise.
* src/reader.c (symbol_list_new): Static.
2001-11-23 14:13:20 +00:00
Akim Demaille
b29b2ed560
Attaching lineno to buckets is stupid, since only one copy of each
...
symbol is kept, only the line of the first occurrence is kept too.
* src/symtab.h, src/symtab.c (bucket): Remove the line member.
* src/reader.c (rline_allocated): Remove, unused.
(symbol_list): Have a `line' member.
(symbol_list_new): New.
(readgram): Use it.
* src/print.c (print_grammar): Output the rule line numbers.
* tests/regression.at (Solved SR Conflicts)
(Unresolved SR Conflicts): Adjust.
Reported by Hans Aberg.
2001-11-23 14:13:02 +00:00
Marc Autret
b497173564
Update.
2001-11-22 22:00:43 +00:00
Marc Autret
a81b1d4ad4
* src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
2001-11-22 22:00:21 +00:00
Marc Autret
c1ecb3c1f5
* src/muscle_tab.c (muscle_init): Remove initialization of
...
skeleton muscle.
* src/output.c (output_master_parser): Do it here.
2001-11-22 21:45:14 +00:00
Akim Demaille
cc72668cfb
Englishoes reported by Jim.
2001-11-21 11:50:48 +00:00
Akim Demaille
fbe01355c8
* po/sv.po: New.
...
* configure.in (ALL_LINGUAS): Adjust.
* po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
longer contains strings to translate.
2001-11-20 13:16:10 +00:00
Akim Demaille
81e895c01e
* src/conflicts.c (conflicts_print): Add a missing n.
2001-11-19 11:08:22 +00:00
Akim Demaille
d38d6e7c76
Formatting changes.
2001-11-19 10:43:20 +00:00
Akim Demaille
6bb1878b51
* src/nullable.c (nullable_print): New.
...
(set_nullable): Call it when tracing.
Better locality of variables.
2001-11-19 10:39:49 +00:00
Akim Demaille
d9ec2d0749
* src/print.c (print_actions): Better locality of variables.
2001-11-19 10:39:35 +00:00
Akim Demaille
720e5c1bc3
* src/derives.c (print_derives): Fix and enrich.
...
* src/closure.c (print_fderives): Likewise.
2001-11-19 10:39:21 +00:00
Akim Demaille
fb9087861f
* src/closure.c (itemsetend): Remove, replaced with...
...
(itemsetsize): new.
2001-11-19 10:39:07 +00:00
Akim Demaille
125ecb5684
* src/LR0.c (kernel_end): Remove, replaced with...
...
(kernel_size): new.
2001-11-19 10:38:53 +00:00
Akim Demaille
d8cf039f97
* src/conflicts.c (set_conflicts): Use arrays instead of pointers
...
to clarify.
2001-11-19 10:38:39 +00:00
Akim Demaille
7bec0760a8
* src/closure.c (closure): Use arrays instead of pointers to clarify.
2001-11-19 10:38:25 +00:00
Akim Demaille
c87d4863f6
* src/closure.c, src/derives.c, src/nullable.c: Adjust various
...
trace messages.
* src/LR0.c: Likewise.
(allocate_itemsets): Use arrays instead of pointers to clarify.
2001-11-19 10:38:12 +00:00
Akim Demaille
9bfe901c33
* src/getargs.c (statistics_flag): Replace with...
...
(trace_flag): New.
(longopts): Accept --trace instead of --statistics.
* src/getargs.h, src/options.c: Adjust.
* src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
* src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2001-11-19 10:37:58 +00:00
Akim Demaille
97db7bd4a1
* src/LR0.c (new_itemsets, get_state): Use more arrays and less
...
pointers to clarify the code.
(save_reductions, save_shifts): Factor common parts of alternatives.
2001-11-19 10:33:54 +00:00
Akim Demaille
2c5f66eda7
* src/LR0.c (new_state, get_state): Complete TRACE code.
...
* src/closure.c: Include `reader.h' to get `tags', needed by the
trace code.
Rename the conditional DEBUG as TRACE.
Output consistently TRACEs to stderr, not stdout.
* src/derives.c: Likewise.
* src/reduce.c: (inaccessable_symbols): Using if is better style
than goto.
Use `#if TRACE' instead of `#if 0' for tracing code.
2001-11-19 10:33:40 +00:00
Akim Demaille
300f275f23
* src/system.h (LIST_FREE, shortcpy): New.
...
* src/LR0.c: Use them.
* src/output.c (free_itemsets, free_reductions, free_shifts):
Remove, replaced by LIST_FREE.
2001-11-19 10:31:49 +00:00
Akim Demaille
f59c437a25
* src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
...
(REDUCTIONS_ALLOC): New.
* src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
allocation.
2001-11-19 10:29:17 +00:00
Akim Demaille
6986fd9e3b
* src/LR0.c (new_state): Complete trace code.
...
* src/nullable.c (set_nullable): Don't translate traces.
2001-11-19 10:28:57 +00:00
Akim Demaille
4bc30f78dc
* src/print_graph.c (print_core): Better locality of variables.
...
* src/print.c (print_core): Likewise.
2001-11-19 10:28:43 +00:00
Akim Demaille
08a946e008
* src/vcg.c: You do the output, so you are responsible of the
...
handling of VCG syntax, in particular: use quotearg.
* src/print_graph.c: Don't.
(print_actions): Don't output the actions as part of the nodes,
since that's the job of the edges.
(print_state): Don't output by hand: fill the node description,
and ask for its output.
2001-11-19 10:28:29 +00:00
Akim Demaille
f047348491
* src/bison.simple (yyparse): When reporting verbosely an error,
...
no longer issue additional quotes around token names.
* tests/calc.at: Adjust.
2001-11-19 10:27:52 +00:00
Akim Demaille
e41dc70020
* src/symtab.h, src/symtab.c: line' is a new member of bucket'.
...
* src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
* src/output.c: Adjust.
2001-11-19 10:26:16 +00:00
Akim Demaille
652a871c29
* src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
...
(rule_t): this.
* src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2001-11-19 10:19:56 +00:00