]>
Commit | Line | Data |
---|---|---|
1 | 2002-10-20 Akim Demaille <akim@epita.fr> | |
2 | ||
3 | * src/muscle_tab.c (muscle_grow): Remove trailing debugging code. | |
4 | * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New. | |
5 | (yyuserAction, yydoAction, yyglrReduce, yyresolveValue) | |
6 | (yyresolveStates, yyresolveAction, yyresolveStack) | |
7 | (yyprocessOneStack): Use them. | |
8 | (yy_reduce_print): New. | |
9 | * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param. | |
10 | ||
11 | 2002-10-20 Akim Demaille <akim@epita.fr> | |
12 | ||
13 | * data/c.m4 (b4_c_ansi_args): Recognize functions with no | |
14 | arguments and output `void'. | |
15 | (b4_c_function): Rename as... | |
16 | (b4_c_function_def): this. | |
17 | (b4_c_function_decl, b4_c_ansi_function_def) | |
18 | (b4_c_ansi_function_decl): New. | |
19 | Change the interpretation of the arguments: before `int, foo', now | |
20 | `int foo, foo'. | |
21 | * data/yacc.c (yyparse): Prototype and define thanks to these. | |
22 | Adjust b4_c_function_def uses. | |
23 | * data/glr.c (yyparse): Likewise, but ANSI only. | |
24 | ||
25 | 2002-10-20 Akim Demaille <akim@epita.fr> | |
26 | ||
27 | * src/output.c (prepare): Move the definition of `tokens_number', | |
28 | `nterms_number', `undef_token_number', `user_token_number_max' | |
29 | to... | |
30 | (prepare_tokens): Here. | |
31 | (prepare_tokens): Rename as... | |
32 | (prepare_symbols): this. | |
33 | (prepare): Move the definition of `rules_number' to... | |
34 | (prepare_rules): here. | |
35 | (prepare): Move the definition of `last', `final_state_number', | |
36 | `states_number' to... | |
37 | (prepare_states): here. | |
38 | * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'. | |
39 | ||
40 | 2002-10-20 Akim Demaille <akim@epita.fr> | |
41 | ||
42 | * src/tables.h, src/tables.c, src/output.c: Comment changes. | |
43 | ||
44 | 2002-10-20 Akim Demaille <akim@epita.fr> | |
45 | ||
46 | * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to... | |
47 | * data/c.m4: here. | |
48 | ||
49 | 2002-10-20 Akim Demaille <akim@epita.fr> | |
50 | ||
51 | * src/output.c (prepare): Use MUSCLE_INSERT_STRING. | |
52 | * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as | |
53 | `pair'. | |
54 | (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth', | |
55 | `name' to... | |
56 | * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type) | |
57 | (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name): | |
58 | These. | |
59 | ||
60 | 2002-10-19 Paul Eggert <eggert@twinsun.com> | |
61 | ||
62 | Do not create a temporary file, as that involves security and | |
63 | cleanup headaches. Instead, use a pair of pipes. | |
64 | Derived from a suggestion by Florian Krohm. | |
65 | * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files. | |
66 | * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove. | |
67 | * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove. | |
68 | (BISON_PREREQ_SUBPIPE): Add. | |
69 | * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c. | |
70 | Add subpipe.h, subpipe.c. | |
71 | * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4. | |
72 | * po/POTFILES.in: Add lib/subpipe.c. | |
73 | * src/output.c: Include "subpipe.h". | |
74 | (m4_invoke): Remove decl. | |
75 | (scan_skel): New decl. | |
76 | (output_skeleton): Use pipe rather than temporary file for m4 input. | |
77 | Check that m4sugar.m4 is readable, to avoid deadlock. | |
78 | Check for pipe I/O error. | |
79 | * src/scan-skel.l (readpipe): Remove decl. | |
80 | (scan_skel): New function, to be used in place of m4_invoke. | |
81 | Read from stream rather than file. | |
82 | ||
83 | * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to | |
84 | float, as this generates a warning on Solaris 8 + GCC 3.2 with | |
85 | --enable-gcc-warnings. Instead, divide into 1.0 rather than 1; | |
86 | this generates a more-accurate value anyway. | |
87 | ||
88 | * lib/timevar.c (timervar_accumulate): Rename locals to | |
89 | avoid confusion with similarly-named more-global. | |
90 | * src/muscle_tab.c (muscle_pair_list_grow): Likewise. | |
91 | ||
92 | * src/output.c (prepare): Use xstrdup to convert char const * | |
93 | to char *, to avoid GCC warning. | |
94 | ||
95 | 2002-10-19 Akim Demaille <akim@epita.fr> | |
96 | ||
97 | * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS, | |
98 | LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS. | |
99 | Use them to have `calc.y' ready for %pure-parser. | |
100 | * data/yacc.c (YYLEX): Pass a yylex return type to | |
101 | b4_c_function_call. | |
102 | ||
103 | 2002-10-19 Akim Demaille <akim@epita.fr> | |
104 | ||
105 | Prototype support of %lex-param and %parse-param. | |
106 | ||
107 | * src/parse-gram.y: Add the definition of the %lex-param and | |
108 | %parse-param tokens, plus their rules. | |
109 | Drop the `_' version of %glr-parser. | |
110 | Add the "," token. | |
111 | * src/scan-gram.l (INITIAL): Scan them. | |
112 | * src/muscle_tab.c: Comment changes. | |
113 | (muscle_insert, muscle_find): Rename `pair' as `probe'. | |
114 | * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused. | |
115 | (muscle_entry_s): The `value' member is no longer const. | |
116 | Adjust all dependencies. | |
117 | * src/muscle_tab.c (muscle_init): Adjust: use | |
118 | MUSCLE_INSERT_STRING. | |
119 | Initialize the obstack earlier. | |
120 | * src/muscle_tab.h, src/muscle_tab.c (muscle_grow) | |
121 | (muscle_pair_list_grow): New. | |
122 | * data/c.m4 (b4_c_function_call, b4_c_args): New. | |
123 | * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param. | |
124 | * tests/calc.at: Use %locations, not --locations. | |
125 | (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser. | |
126 | ||
127 | 2002-10-19 Akim Demaille <akim@epita.fr> | |
128 | ||
129 | * src/getargs.c (usage): Take status as argument and exit | |
130 | accordingly. | |
131 | Report the traditional `Try ... --help' message when status != 0. | |
132 | (usage, version): Don't take a FILE * as arg, it is pointless. | |
133 | (getargs): When there is an incorrect number of arguments, make it | |
134 | an error, and report it GNUlically thanks to `usage ()'. | |
135 | ||
136 | 2002-10-18 Paul Eggert <eggert@twinsun.com> | |
137 | ||
138 | * data/glr.c (yyreportParseError): Don't assume that sprintf | |
139 | yields the length of the printed string, as this is not true | |
140 | on SunOS 4.1.4. Reported by Peter Klein. | |
141 | ||
142 | * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc. | |
143 | * tests/conflicts.at (%nonassoc and eof): Likewise. | |
144 | Fixes SunOS 4.1.4 test failure reported by Peter Klein. | |
145 | ||
146 | 2002-10-17 Akim Demaille <akim@epita.fr> | |
147 | ||
148 | * src/getargs.h (trace_e): Add trace_scan, and trace_parse. | |
149 | * src/getargs.c (trace_types, trace_args): Adjust. | |
150 | * src/reader.c (grammar_current_rule_prec_set) | |
151 | (grammar_current_rule_dprec_set, grammar_current_rule_merge_set): | |
152 | Standardize error messages. | |
153 | And s/@prec/%prec/! | |
154 | (reader): Use trace_flag to enable scanner/parser debugging, | |
155 | instead of an adhoc scheme. | |
156 | * src/scan-gram.l: Remove trailing debugging code. | |
157 | ||
158 | 2002-10-16 Paul Eggert <eggert@twinsun.com> | |
159 | ||
160 | * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as | |
161 | MUSCLE_TAB_H. | |
162 | ||
163 | * NEWS: Officially drop support for building Bison with K&R C, | |
164 | since it didn't work anyway and it's not worth worrying about. | |
165 | * Makefile.maint (wget_files): Remove ansi2knr.c. | |
166 | (ansi2knr.c-url_prefix): Remove. | |
167 | * lib/.cvsignore: Remove ansi2knr, ansi2knr.*. | |
168 | * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
169 | * src/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
170 | ||
171 | 2002-10-15 Paul Eggert <eggert@twinsun.com> | |
172 | ||
173 | Stop using the "enum_" trick for K&R-style function definitions; | |
174 | it confused me, and I was the author! Instead, assume that people | |
175 | who want to use K&R C compilers (when using these modules in GCC, | |
176 | perhaps?) will run ansi2knr. | |
177 | ||
178 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove. | |
179 | All uses of "enum_" changed to "enum ". | |
180 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
181 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
182 | ||
183 | * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or, | |
184 | abitset_and_or_cmp, abitset_andn, abitset_andn_cmp, | |
185 | abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy, | |
186 | abitset_copy1, abitset_disjoint_p, abitset_empty_p, | |
187 | abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse, | |
188 | abitset_not, abitset_ones, abitset_or, abitset_or_and, | |
189 | abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set, | |
190 | abitset_size, abitset_small_list, abitset_subset_p, abitset_test, | |
191 | abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero): | |
192 | Use function prototypes; this removes the need for declaring | |
193 | static functions simply to provide their prototypes. | |
194 | * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_, | |
195 | bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_, | |
196 | bitset_count_, bitset_create, bitset_dump, bitset_first, | |
197 | bitset_free, bitset_init, bitset_last, bitset_next, | |
198 | bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p, | |
199 | bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev, | |
200 | bitset_print, bitset_release_memory, bitset_toggle_, | |
201 | bitset_type_choose, bitset_type_get, bitset_type_name_get, | |
202 | debug_bitset): Likewise. | |
203 | * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise. | |
204 | * lib/bitset_stats.c (bitset_log_histogram_print, | |
205 | bitset_percent_histogram_print, bitset_stats_and, | |
206 | bitset_stats_and_cmp, bitset_stats_and_or, | |
207 | bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp, | |
208 | bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy, | |
209 | bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p, | |
210 | bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable, | |
211 | bitset_stats_equal_p, bitset_stats_free, bitset_stats_init, | |
212 | bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not, | |
213 | bitset_stats_ones, bitset_stats_or, bitset_stats_or_and, | |
214 | bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print, | |
215 | bitset_stats_print_1, bitset_stats_read, bitset_stats_reset, | |
216 | bitset_stats_set, bitset_stats_size, bitset_stats_subset_p, | |
217 | bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get, | |
218 | bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp, | |
219 | bitset_stats_zero): Likewise. | |
220 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
221 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
222 | bitsetv_dump, debug_bitsetv): Likewise. | |
223 | * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn, | |
224 | ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_, | |
225 | ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add, | |
226 | ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find, | |
227 | ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove, | |
228 | ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p, | |
229 | ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list, | |
230 | ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp, | |
231 | ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset, | |
232 | ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test, | |
233 | ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero): | |
234 | Likewise. | |
235 | * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp, | |
236 | lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy, | |
237 | lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc, | |
238 | lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free, | |
239 | lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p, | |
240 | lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init, | |
241 | lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones, | |
242 | lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune, | |
243 | lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size, | |
244 | lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor, | |
245 | lbitset_xor_cmp, lbitset_zero): Likewise. | |
246 | ||
247 | 2002-10-14 Akim Demaille <akim@epita.fr> | |
248 | ||
249 | Version 1.75. | |
250 | ||
251 | 2002-10-14 Akim Demaille <akim@epita.fr> | |
252 | ||
253 | * tests/Makefile.am (maintainer-check-posix): New. | |
254 | ||
255 | 2002-10-14 Akim Demaille <akim@epita.fr> | |
256 | ||
257 | * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc | |
258 | member. | |
259 | ||
260 | 2002-10-14 Akim Demaille <akim@epita.fr> | |
261 | ||
262 | * src/tables.c (table_ninf_remap): base -> tab. | |
263 | Reported by Matt Rosing. | |
264 | ||
265 | 2002-10-14 Paul Eggert <eggert@twinsun.com> | |
266 | ||
267 | * tests/action.at, tests/calc.at, tests/conflicts.at, | |
268 | tests/cxx-type.at, tests/headers.at, tests/input.at, | |
269 | tests/regression.at, tests/synclines.at, tests/torture.at: | |
270 | Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c", | |
271 | so that the tests still work even if POSIXLY_CORRECT is set. | |
272 | * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise. | |
273 | ||
274 | * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char, | |
275 | for portability to K&R hosts. Fix typo: signed char is guaranteed | |
276 | only to 127, not to 128. | |
277 | * data/glr.c (yysigned_char): New type. | |
278 | * data/yacc.c (yysigned_char): Likewise. | |
279 | * tests/regression.at (Web2c Actions): signed char -> yysigned_char. | |
280 | ||
281 | 2002-10-13 Paul Eggert <eggert@twinsun.com> | |
282 | ||
283 | * data/yacc.c (yyparse): Rewrite to avoid "comparison is always | |
284 | true due to limited range of data type" warning from GCC. | |
285 | ||
286 | * data/c.m4 (b4_token_defines): Protect against double-inclusion | |
287 | by wrapping enum yytokentype's definition inside #ifndef | |
288 | YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12. | |
289 | ||
290 | 2002-10-13 Akim Demaille <akim@epita.fr> | |
291 | ||
292 | * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction): | |
293 | Un yy- yyrhs to avoid the name clash with the global YYRHS. | |
294 | ||
295 | 2002-10-13 Akim Demaille <akim@epita.fr> | |
296 | ||
297 | * Makefile.maint: Update from Autoconf 2.54. | |
298 | * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54. | |
299 | ||
300 | 2002-10-13 Akim Demaille <akim@epita.fr> | |
301 | ||
302 | * src/print.c (print_state): Separate the list of solved conflicts | |
303 | from the other items. | |
304 | * tests/conflicts.at (Resolved SR Conflicts): Adjust. | |
305 | ||
306 | 2002-10-13 Akim Demaille <akim@epita.fr> | |
307 | ||
308 | Let nondeterministic skeletons be usable with deterministic | |
309 | tables. | |
310 | ||
311 | With the patch, GAWK compiled by GCC without -O2 passes its test | |
312 | suite using a GLR parser driven by LALR tables. It fails with -O2 | |
313 | because `struct stat' gives two different answers on my machine: | |
314 | 88 (definition of an auto var) and later 96 (memset on this var). | |
315 | Hence the stack is badly corrumpted. The headers inclusion is to | |
316 | blame: if I move the awk.h inclusion before GLR's system header | |
317 | inclusion, the two struct stat have the same size. | |
318 | ||
319 | * src/tables.c (pack_table): Always create conflict_table. | |
320 | (token_actions): Always create conflict_list. | |
321 | * data/glr.c (YYFLAG): Remove, unused. | |
322 | ||
323 | 2002-10-13 Akim Demaille <akim@epita.fr> | |
324 | ||
325 | * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code. | |
326 | (O0FLAGS): New. | |
327 | (VALGRIND, GXX): New. | |
328 | * tests/atlocal.in (CFLAGS): Use O0FLAGS. | |
329 | * tests/bison.in: Run $PREBISON a pre-command. | |
330 | * tests/Makefile.am (maintainer-check, maintainer-check-valgrind) | |
331 | (maintainer-check-g++): New. | |
332 | * Makefile.am (maintainer-check): New. | |
333 | ||
334 | 2002-10-13 Akim Demaille <akim@epita.fr> | |
335 | ||
336 | * data/glr.c: Formatting changes. | |
337 | Tweak some trace messages to match yacc.c's. | |
338 | ||
339 | 2002-10-13 Akim Demaille <akim@epita.fr> | |
340 | ||
341 | GLR parsers sometimes raise parse errors instead of performing the | |
342 | default reduction. | |
343 | Reported by Charles-Henry de Boysson. | |
344 | ||
345 | * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't | |
346 | check the length of the traces when %glr. | |
347 | (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from | |
348 | GLR's traces. | |
349 | (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New. | |
350 | Test GLR parsers. | |
351 | * data/glr.c (YYLEFTMOST_STATE): Fix its value. | |
352 | (yyltype): Remove the yy prefix from the member names. | |
353 | (yytable): Complete its comment. | |
354 | (yygetLRActions): Map error action number from YYTABLE from | |
355 | YYTABLE_NINF to 0. | |
356 | (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF | |
357 | (which was a bug: it should have been YYTABEL_NINF, and yet it was | |
358 | not satisfying as we could compare an YYACTION computed from | |
359 | YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the | |
360 | only value for error actions. | |
361 | (yyreportParseError): In verbose parse error messages, don't issue | |
362 | `error' in the list of expected tokens. | |
363 | * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the | |
364 | next action to perform to match glr.c's decoding. | |
365 | (yytable): Complete its comment. | |
366 | ||
367 | 2002-10-13 Paul Eggert <eggert@twinsun.com> | |
368 | ||
369 | Fix problem reported by Henrik Grubbstroem in | |
370 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>: | |
371 | "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected, | |
372 | because the Bison parser reads the second action before reducing | |
373 | the first one. | |
374 | * src/scan-gram.l (rule_length): New static var. | |
375 | Use it to keep track of the rule length in the scanner, since | |
376 | we can't expect the parser to be in lock-step sync with the scanner. | |
377 | (handle_action_dollar, handle_action_at): Use this var. | |
378 | * tests/actions.at (Exotic Dollars): Test for the problem. | |
379 | ||
380 | 2002-10-12 Paul Eggert <eggert@twinsun.com> | |
381 | ||
382 | * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>. | |
383 | * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>. | |
384 | Include <sys/time.h> when checking for clock_t and struct tms. | |
385 | Use same include order as source. | |
386 | This is for the SunOS 4.1.4 porting bug reported by Peter Klein in | |
387 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>. | |
388 | ||
389 | * lib/timevar.c: Update copyright date and clarify comments. | |
390 | (get_time) [IN_GCC]: Keep the GCC version for reference. | |
391 | ||
392 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import | |
393 | GCC version as of today, then merge Bison's changes. | |
394 | Change "GCC" to "Bison" in copyright notice. timevar.def's | |
395 | author is Akim, so change that too. | |
396 | ||
397 | * src/reader.c (grammar_current_rule_check): | |
398 | Don't worry about the default action if $$ is untyped. | |
399 | Prevents bogus warnings reported by Jim Gifford in | |
400 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>. | |
401 | ||
402 | * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE. | |
403 | * data/glr.c, data/lalr1.cc, data/yacc.c: | |
404 | Output token definitions before the first part of user declarations. | |
405 | Fixes compatibility problem reported by Jim Gifford for kbd in | |
406 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>. | |
407 | ||
408 | 2002-10-11 Paul Eggert <eggert@twinsun.com> | |
409 | ||
410 | * data/yacc.c (yyreport_parse_error): Remove, putting its body into... | |
411 | (yyparse): here. This undoes some of the 2002-07-25 change. | |
412 | Compatibility problem reported by Ralf S. Engelschall with | |
413 | OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>. | |
414 | ||
415 | 2002-10-11 Akim Demaille <akim@epita.fr> | |
416 | ||
417 | * tests/regression.at Characters Escapes): New. | |
418 | * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and | |
419 | characters. | |
420 | Reported by Jan Nieuwenhuizen. | |
421 | ||
422 | 2002-10-11 Akim Demaille <akim@epita.fr> | |
423 | ||
424 | * po/id.po: New. | |
425 | ||
426 | 2002-10-10 Paul Eggert <eggert@twinsun.com> | |
427 | ||
428 | Portability fixes for bitsets; this also avoids several GCC | |
429 | warnings. | |
430 | ||
431 | * lib/abitset.c: Include <stddef.h>, for offsetof. | |
432 | * lib/lbitset.c: Likewise. | |
433 | ||
434 | * lib/abitset.c (abitset_bytes): Return a size that is aligned | |
435 | properly for vectors of objects. Do not assume that adding a | |
436 | header size to a multiple of a word size yields a value that is | |
437 | properly aligned for the whole union. | |
438 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
439 | ||
440 | * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new, | |
441 | unique names for structures. | |
442 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
443 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
444 | ||
445 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p, | |
446 | abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p, | |
447 | abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn, | |
448 | abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor, | |
449 | abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp, | |
450 | abitset_andn_or, abitset_andn_or_cmp, abitset_or_and, | |
451 | abitset_or_and_cmp, abitset_copy): Supply prototype decls, | |
452 | to improve the type-checking that GCC can do. | |
453 | * lib/bitset.c (bitset_op4_cmp): Likewise. | |
454 | * lib/bitset_stats.c (bitset_stats_count, | |
455 | bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero, | |
456 | bitset_stats_copy, bitset_stats_disjoint_p, | |
457 | bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p, | |
458 | bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn, | |
459 | bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp, | |
460 | bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or, | |
461 | bitset_stats_and_or_cmp, bitset_stats_andn_or, | |
462 | bitset_stats_andn_or_cmp, bitset_stats_or_and, | |
463 | bitset_stats_or_and_cmp): Likewise. | |
464 | * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn, | |
465 | lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor, | |
466 | lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not, | |
467 | lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise. | |
468 | ||
469 | * lib/abitset.h: Include bitset.h, not bbitset.h. | |
470 | * lib/ebitset.h: Likewise. | |
471 | * lib/lbitset.h: Likewise. | |
472 | ||
473 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types. | |
474 | All instances of parameters of type enum bitset_opts are now of | |
475 | type enum_bitset_opts, to conform to the C Standard, and similarly | |
476 | for enum_bitset_type. | |
477 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
478 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
479 | ||
480 | Do not use "struct bitset_struct" to mean different things in | |
481 | different modules. Not only is this confusing, it violates | |
482 | the C Standard, which requires that structure types in different | |
483 | modules must be compatible if one is to be passed to the other. | |
484 | * lib/bbitset.h (bitset): Now points to a union, not to a struct. | |
485 | All instances of "struct bitset_struct *" replaced with "bitset". | |
486 | * lib/bitset.h (struct bitset_struct): Remove, replacing with.... | |
487 | (union bitset_union, struct abitset_struct, struct ebitset_struct, | |
488 | struct lbitset_struct, struct bitset_stats_struct): New types. | |
489 | All uses of struct bitset_struct changed to union bitset_union, | |
490 | etc. | |
491 | * lib/abitset.c (struct abitset_struct, abitset, | |
492 | struct bitset_struct): Remove. | |
493 | * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats, | |
494 | struct bitset_struct): Remove. | |
495 | * lib/ebitset.c (struct ebitset_struct, ebitset, struct | |
496 | bitset_struct): Remove. | |
497 | * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct): | |
498 | Likewise. | |
499 | ||
500 | Do not call a function of type T using a call that assumes the | |
501 | function is of a different type U. Standard C requires that a | |
502 | function must be called with a type that is compatible with its | |
503 | definition. | |
504 | * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
505 | New decls. | |
506 | * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
507 | New functions. | |
508 | * lib/ebitset.c (PFV): Remove. | |
509 | * lib/lbitset.c (PFV): Likewise. | |
510 | * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or, | |
511 | ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New | |
512 | decls. | |
513 | (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions. | |
514 | (ebitset_vtable): Use them. | |
515 | * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or, | |
516 | lbitset_xor): New functions. | |
517 | (lbitset_vtable): Use them. | |
518 | ||
519 | * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p): | |
520 | Declare. | |
521 | ||
522 | * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a | |
523 | GCC warning. | |
524 | * lib/lbitset.c (LBITSET_CURRENT1): Likewise. | |
525 | Use offsetof, for simplicity. | |
526 | ||
527 | 2002-10-06 Paul Eggert <eggert@twinsun.com> | |
528 | ||
529 | * lib/bitset.h (bitset_reset): Do not assume that bitset_word is | |
530 | the same width as int. This reapplies a hunk of the 2002-08-12 patch | |
531 | <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>, | |
532 | which was inadvertently undone by the 2002-09-30 patch. | |
533 | * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is | |
534 | the same width as int. | |
535 | ||
536 | 2002-10-04 Paul Eggert <eggert@twinsun.com> | |
537 | ||
538 | Version 1.50. | |
539 | ||
540 | * configure.ac (AC_INIT), NEWS: Increment version number. | |
541 | ||
542 | * doc/bison.texinfo: Minor spelling, grammar, and white space | |
543 | fixes. | |
544 | (Symbols): Mention that any negative value returned from yylex | |
545 | signifies end-of-input. Warn about negative chars. Mention | |
546 | the portable Standard C character set. | |
547 | ||
548 | The GNU coding standard says CFLAGS and YFLAGS are reserved | |
549 | for the installer to set. | |
550 | * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS. | |
551 | * src/Makefile.am (AM_CFLAGS): Likewise. | |
552 | (AM_YFLAGS): Renamed from YFLAGS. | |
553 | ||
554 | Fix some MAX and MIN problems. | |
555 | * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN. | |
556 | * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX. | |
557 | * src/symtab.h (SYMBOL_NUMBER_MAX): New macro. | |
558 | * src/reader.c (reader): Use it. | |
559 | ||
560 | * tests/regression.at (Braces parsing): Use grep, not fgrep, as | |
561 | POSIX 1003.1-2001 has removed fgrep. | |
562 | ||
563 | 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz> | |
564 | ||
565 | * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be | |
566 | interpreted as signed. | |
567 | * lib/ebitset.c (ebitset_list): Fix bug. | |
568 | ||
569 | 2002-10-01 Paul Eggert <eggert@twinsun.com> | |
570 | ||
571 | More fixes for 64-bit hosts and large bitsets. | |
572 | ||
573 | * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list, | |
574 | abitset_size, abitset_list, abitset_list_reverse, abitset_list): | |
575 | Use bitset_bindex, not int or unsigned int or size_t, to count bits. | |
576 | * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count, | |
577 | struct bitset_vtable.list, struct bitset_vtable.list_reverse, | |
578 | bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last, | |
579 | bitset_count_): Likewise. | |
580 | * lib/bitset.h (bitset_iterator.num, bitset_iterator.i, | |
581 | bitset_first, bitset_last): Likewise. | |
582 | * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list, | |
583 | bitset_stats_list_reverse, bitset_stats_size, | |
584 | bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse): | |
585 | Likewise. | |
586 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
587 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
588 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
589 | bitsetv_reflexive_transitive_closure): Likewise. | |
590 | * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise. | |
591 | * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse): | |
592 | Likewise. | |
593 | * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge): | |
594 | Likewise. | |
595 | ||
596 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes): | |
597 | Use size_t, not unsigned int, to count bytes. | |
598 | * lib/abitset.h (abitset_bytes): Likewise. | |
599 | * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc): | |
600 | Likewise. | |
601 | * lib/bitset.h (bitset_bytes): Likewise. | |
602 | * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise. | |
603 | * lib/bitset_stats.h (bitset_stats_bytes): Likewise. | |
604 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
605 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
606 | * lib/ebitset.h (ebitset_bytes): Likewise. | |
607 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
608 | * lib/lbitset.h (lbitset_bytes): Likewise. | |
609 | ||
610 | * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p, | |
611 | abitset_subset_p, abitset_disjoint_p, abitset_and, | |
612 | abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or, | |
613 | abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or, | |
614 | abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp, | |
615 | abitset_or_and, abitset_or_and_cmp): | |
616 | Use bitset_windex instead of unsigned int. | |
617 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
618 | * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow, | |
619 | ebitset_elt_add, ebitset_elt_remove, ebitset_weed, | |
620 | ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init): | |
621 | Likewise. | |
622 | * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise. | |
623 | ||
624 | * lib/bitset.c (bitset_print): | |
625 | Use proper printf formats for widths of integer types. | |
626 | * lib/bitset_stats.c (bitset_percent_histogram_print, | |
627 | bitset_log_histogram_print, bitset_stats_print_1): Likewise. | |
628 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
629 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
630 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
631 | ||
632 | * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX, | |
633 | BITSET_SIZE_MAX): New macros. | |
634 | (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that | |
635 | sizeof (bitset_word) == sizeof (bitset_windex). All uses changed | |
636 | to BITSET_WINDEX_MAX. | |
637 | ||
638 | * lib/bitset.c (bitset_next, bitset_prev, bitset_first, | |
639 | bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value, | |
640 | since we now return the bitset_bindex type (not int). | |
641 | ||
642 | * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow | |
643 | when computing sizes. | |
644 | * lib/ebitset.c (ebitset_elts_grow): Likewise. | |
645 | ||
646 | * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation | |
647 | and avoid cast to unsigned. | |
648 | ||
649 | 2002-09-30 Akim Demaille <akim@epita.fr> | |
650 | ||
651 | * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h, | |
652 | * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c: | |
653 | Updates from Michael Hayes. | |
654 | ||
655 | 2002-09-30 Art Haas <ahaas@neosoft.com> | |
656 | ||
657 | * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER | |
658 | invocations. | |
659 | * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not | |
660 | defined. | |
661 | ||
662 | 2002-09-27 Akim Demaille <akim@epita.fr> | |
663 | ||
664 | Version 1.49c. | |
665 | ||
666 | 2002-09-27 Akim Demaille <akim@epita.fr> | |
667 | ||
668 | * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7. | |
669 | (Because of AC_LIBSOURCE). | |
670 | ||
671 | 2002-09-27 Akim Demaille <akim@epita.fr> | |
672 | ||
673 | Playing with Autoscan. | |
674 | ||
675 | * configure.ac: Remove the old LIBOBJ tweaks. | |
676 | (AC_REPLACE_FUNCS): Add strrchr and strtol. | |
677 | * lib/strrchr.c: New. | |
678 | * lib/strtol.c: New, from the Coreutils 4.5.1. | |
679 | ||
680 | 2002-09-27 Akim Demaille <akim@epita.fr> | |
681 | ||
682 | Playing with Autoscan. | |
683 | ||
684 | * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New. | |
685 | * lib/Makefile.am (libbison_a_SOURCES): No longer include | |
686 | argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd. | |
687 | * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the | |
688 | Coreutils 4.5.1. | |
689 | ||
690 | 2002-09-24 Akim Demaille <akim@epita.fr> | |
691 | ||
692 | * doc/bison.texinfo (Stack Overflow): xref to Recursion. | |
693 | (Frequently Asked Questions, Parser Stack Overflow): New. | |
694 | ||
695 | 2002-09-13 Akim Demaille <akim@epita.fr> | |
696 | ||
697 | Playing with autoscan. | |
698 | ||
699 | * src/reader.c (get_merge_function): Use xstrdup, not strdup. | |
700 | * src/files.c (skeleton_find): Remove, unused. | |
701 | * m4/memcmp.m4: New, from the Coreutils 4.5.1. | |
702 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP. | |
703 | ||
704 | 2002-09-13 Akim Demaille <akim@epita.fr> | |
705 | ||
706 | * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3. | |
707 | * Makefile.am (AUTOMAKE_OPTIONS): Don't. | |
708 | ||
709 | 2002-09-13 Akim Demaille <akim@epita.fr> | |
710 | ||
711 | * configure.ac: Require 2.54. | |
712 | s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/. | |
713 | s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/. | |
714 | * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4: | |
715 | Remove, provided by Autoconf macros. | |
716 | ||
717 | 2002-09-12 Akim Demaille <akim@epita.fr> | |
718 | ||
719 | * m4/prereq.m4: Update, from Coreutils 4.5.1. | |
720 | ||
721 | 2002-09-12 Akim Demaille <akim@epita.fr> | |
722 | ||
723 | * m4/prereq.m4: Update, from Fileutils 4.1.5. | |
724 | * configure.ac (jm_PREREQ_TEMPNAME): Invoke it. | |
725 | Reported by Martin Mokrejs. | |
726 | ||
727 | 2002-09-10 Akim Demaille <akim@epita.fr> | |
728 | ||
729 | * src/parse-gram.y: Associate a human readable string to each | |
730 | token type. | |
731 | * tests/regression.at (Invalid inputs): Adjust. | |
732 | ||
733 | 2002-09-10 Gary V. Vaughan <gary@gnu.org> | |
734 | ||
735 | * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships | |
736 | with an Autoconf-2.5x style configure.ac. | |
737 | ||
738 | 2002-09-06 Paul Eggert <eggert@twinsun.com> | |
739 | ||
740 | * doc/bison.texinfo (Conditions): Make explicit that the GPL | |
741 | exception applies only to yacc.c. This is a modification of a | |
742 | patch originally suggested by Akim Demaille. | |
743 | ||
744 | 2002-09-06 Akim Demaille <akim@epita.fr> | |
745 | ||
746 | * data/c.m4 (b4_copyright): Move the GPL exception comment from | |
747 | here to... | |
748 | * data/yacc.c: here. | |
749 | ||
750 | * data/lalr1.cc (struct yyltype): Don't define it, since we use | |
751 | LocationType. | |
752 | (b4_ltype): Default to yy::Location from location.hh. | |
753 | ||
754 | 2002-09-04 Jim Meyering <jim@meyering.net> | |
755 | ||
756 | * data/yacc.c: Guard the declaration of yytoknum also with | |
757 | `#ifdef YYPRINT', so it is declared only when used. | |
758 | ||
759 | 2002-09-04 Akim Demaille <akim@epita.fr> | |
760 | ||
761 | * configure.in: Rename as... | |
762 | * configure.ac: this. | |
763 | Bump to 1.49c. | |
764 | ||
765 | 2002-09-04 Akim Demaille <akim@epita.fr> | |
766 | ||
767 | * src/assoc.c, src/closure.c, src/gram.c, src/injections.c, | |
768 | * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't | |
769 | translate maintainer only messages. | |
770 | ||
771 | 2002-08-12 Paul Eggert <eggert@twinsun.com> | |
772 | ||
773 | Version 1.49b. | |
774 | ||
775 | * Makefile.am (SUBDIRS): Remove intl. | |
776 | (DISTCLEANFILES): Remove. | |
777 | * NEWS: Mention that GNU M4 is now required. Clarify what is | |
778 | meant by "larger grammars". Mention the pt_BR translation. | |
779 | * configure.in (AC_CHECK_DECLS): Add getenv, getopt. | |
780 | (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var. | |
781 | Bump version from 0.11.2 to 0.11.5. | |
782 | (BISON_PREREQ_STAGE): Remove. | |
783 | (AM_GNU_GETTEXT): Use external gettext. | |
784 | (AC_OUTPUT): Remove intl/Makefile. | |
785 | ||
786 | * config/depcomp, config/install-sh: Sync with Automake 1.6.3. | |
787 | ||
788 | * data/glr.c: Include string.h, for strlen. | |
789 | (yyreportParseError): Use size_t for yysize. | |
790 | (yy_yypstack): No longer nested inside yypstates, as nested | |
791 | functions are not portable. Do not assume size_t is the | |
792 | same width as int. | |
793 | (yypstates): Do not assume that ptrdiff_t is the same width | |
794 | as int, and similarly for yyposn and YYINDEX. | |
795 | ||
796 | * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage. | |
797 | ||
798 | * lib/Makefile.am (INCLUDES): Do not include from the intl | |
799 | directory, which has been removed. | |
800 | * src/Makefile.am (INCLUDES): Likewise. | |
801 | ||
802 | * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h. | |
803 | (bitsets_sources, additional_bitsets_sources, timevars_sources): | |
804 | New vars. | |
805 | ||
806 | * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension. | |
807 | * tests/Makefile.am (EXTRA_DIST): Likewise. | |
808 | ||
809 | * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list): | |
810 | Do not assume that bitset_windex is the same width as unsigned. | |
811 | ||
812 | * lib/abitset.c (abitset_unused_clear): Do not assume that | |
813 | bitset_word is the same width as int. | |
814 | * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise. | |
815 | * lib/bitset.h (bitset_set, bitset_reset): Likewise. | |
816 | * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise. | |
817 | * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise. | |
818 | * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise. | |
819 | ||
820 | * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for | |
821 | portability to one's complement hosts!). | |
822 | * lib/ebitset.c (ebitset_op1): Likewise. | |
823 | * lib/lbitset.c (lbitset_op1): Likewise. | |
824 | ||
825 | * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar. | |
826 | * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h, | |
827 | lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c: | |
828 | Sync with fileutils. | |
829 | * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c, | |
830 | lib/gettext.h: Sync with diffutils. | |
831 | ||
832 | * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c, | |
833 | lib/strspn.c, lib/tempname.c: Use GPL, not LGPL. | |
834 | ||
835 | * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use | |
836 | PROTOTYPES to check for prototypes, and "defined __STDC__" to | |
837 | check for void *. | |
838 | ||
839 | * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not | |
840 | size_t; the old version tried to do this but casted improperly. | |
841 | (bitset_bindex, bitset_windex): Now size_t, not unsigned long. | |
842 | (bitset_test): Now returns int, not unsigned long. | |
843 | ||
844 | * lib/bitset_stats.c: Include "gettext.h". | |
845 | (_): New macro. | |
846 | (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't | |
847 | name locals "index", as it generates unnecessary warnings on some | |
848 | hosts that have an "index" function. | |
849 | ||
850 | * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print, | |
851 | bitset_stats_read, bitset_stats_write): Wrap strings in _() if | |
852 | they need translation. | |
853 | * src/LR0.c (state_list_append, new_itemsets, get_state, | |
854 | append_states, generate_states): Likewise. | |
855 | * src/assoc.c (assoc_to_string): Likewise. | |
856 | * src/closure.c (print_closure, set_firsts, closure): Likewise. | |
857 | * src/gram.c (grammar_dump): Likewise. | |
858 | * src/injections.c (injections_compute): Likewise. | |
859 | * src/lalr.c (lookaheads_print): Likewise. | |
860 | * src/relation.c (relation_transpose): Likewise. | |
861 | * src/scan-gram.l: Likewise. | |
862 | * src/tables.c (table_grow, pack_vector): Likewise. | |
863 | ||
864 | * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4, | |
865 | glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4. | |
866 | * m4/malloc.m4, m4/realloc.m4: Sync with diffutils. | |
867 | * m4/mbstate_t.m4: Sync with fileutils. | |
868 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T. | |
869 | ||
870 | * po/LINGUAS: Add pt_BR. | |
871 | * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c, | |
872 | src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c, | |
873 | lib/timevar.c. | |
874 | Use src/parse-gram.y instead of src/parse-gram.c, as the gettext | |
875 | manual recommends. | |
876 | Similarly, use src/scan-gram.l instead of src/scan-gram.c. | |
877 | ||
878 | * src/complain.c (strerror_r): Remove decl; not needed. | |
879 | (strerror): Use same pattern as ../lib/error.c. | |
880 | ||
881 | * src/files.c, src/files.h (compute_header_macro): Remove; unused. | |
882 | ||
883 | * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int. | |
884 | ||
885 | * src/main.c (main): Cast result of bindtextdomain and textdomain | |
886 | to void, to avoid a GCC warning when --disable-nls is in effect. | |
887 | ||
888 | * src/scan-gram.l: Use strings rather than escapes when possible, | |
889 | to minimize the number of warnings from xgettext. | |
890 | (handle_action_dollar, handle_action_at): Don't use isdigit, | |
891 | as it mishandles negative chars and it may not work as expected | |
892 | outside the C locale. | |
893 | ||
894 | * src/symtab.c (symbol_get): Don't cast LHS of an assignment; | |
895 | this is a GCC extension and is not portable to other compilers. | |
896 | ||
897 | * src/system.h (alloca): Use same pattern as ../lib/error.c. | |
898 | Do not include <ctype.h>; no longer needed. | |
899 | Do not include <malloc.h>; no longer needed (and generates | |
900 | warnings on OpenBSD 3.0). | |
901 | ||
902 | * tests/cxx-type.at (yylex): Do not pass signed char to isupper; | |
903 | it's not portable. | |
904 | ||
905 | * tests/regression.at: Do not use 'cc -c input.c -o input'; | |
906 | Sun C rejects this. Instead, use 'cc -c input.c -o input.o'. | |
907 | ||
908 | * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero | |
909 | exit status as failure, not just exit status 1. Sun C exits | |
910 | with status 2 sometimes. | |
911 | ||
912 | * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro. | |
913 | Use it for the two large tests. | |
914 | ||
915 | 2002-08-02 Akim Demaille <akim@epita.fr> | |
916 | ||
917 | * src/conflicts.c (conflicts_output): Don't output rules never | |
918 | reduced here, since anyway that computation doesn't work. | |
919 | * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p) | |
920 | (rule_useless_p, rule_never_reduced_p): New. | |
921 | (grammar_rules_partial_print): Use a filter instead of a range. | |
922 | Display the title only if needed. | |
923 | (grammar_rules_print): Adjust. | |
924 | (grammar_rules_never_reduced_report): New. | |
925 | * src/tables.c (action_row): Move the computation of rules never | |
926 | reduced to... | |
927 | (token_actions): here. | |
928 | * src/main.c (main): Make the parser before making the report, so | |
929 | that rules never reduced are computed. | |
930 | Call grammar_rules_never_reduced_report. | |
931 | * src/print.c (print_results): Report rules never reduced. | |
932 | * tests/conflicts.at, tests/reduce.at: Adjust. | |
933 | ||
934 | 2002-08-01 Akim Demaille <akim@epita.fr> | |
935 | ||
936 | Instead of attaching lookaheads and duplicating the rules being | |
937 | reduced by a state, attach the lookaheads to the reductions. | |
938 | ||
939 | * src/state.h (state_t): Remove the `lookaheads', | |
940 | `lookaheads_rule' member. | |
941 | (reductions_t): Add a `lookaheads' member. | |
942 | Use a regular array for the `rules'. | |
943 | * src/state.c (reductions_new): Initialize the lookaheads member | |
944 | to 0. | |
945 | (state_rule_lookaheads_print): Adjust. | |
946 | * src/state.h, src/state.c (state_reductions_find): New. | |
947 | * src/conflicts.c (resolve_sr_conflict, set_conflicts) | |
948 | (count_rr_conflicts): Adjust. | |
949 | * src/lalr.c (LArule): Remove. | |
950 | (add_lookback_edge): Adjust. | |
951 | (state_lookaheads_count): New. | |
952 | (states_lookaheads_initialize): Merge into... | |
953 | (initialize_LA): this. | |
954 | (lalr_free): Adjust. | |
955 | * src/main.c (main): Don't free nullable and derives too early: it | |
956 | is used by --verbose. | |
957 | * src/print.c, src/print_graph.c, src/tables.c: Adjust. | |
958 | ||
959 | 2002-08-01 Akim Demaille <akim@epita.fr> | |
960 | ||
961 | * src/derives.h, src/derives.c (derives): A `rule_t***' instead of | |
962 | `rule_number_t**'. | |
963 | (set_derives, free_derives): Rename as... | |
964 | (derives_compute, derives_free): this. | |
965 | Adjust all dependencies. | |
966 | * src/nullable.c (set_nullable, free_nullable): Rename as... | |
967 | (nullable_compute, nullable_free): these. | |
968 | (rule_list_t): Store rule_t *, not rule_number_t. | |
969 | * src/state.c (state_rule_lookaheads_print): Directly compare rule | |
970 | pointers, instead of their numbers. | |
971 | * src/main.c (main): Call nullable_free, and derives_free earlier, | |
972 | as they were lo longer used. | |
973 | ||
974 | 2002-08-01 Akim Demaille <akim@epita.fr> | |
975 | ||
976 | * lib/timevar.c (get_time): Include children time. | |
977 | * src/lalr.h (LA, LArule): Don't export them: used with the | |
978 | state_t. | |
979 | * src/lalr.c (LA, LArule): Static. | |
980 | * src/lalr.h, src/lalr.c (lalr_free): New. | |
981 | * src/main.c (main): Call it. | |
982 | * src/tables.c (pack_vector): Check whether loc is >= to the | |
983 | table_size, not >. | |
984 | (pack_tables): Don't free froms, tos, conflict_tos, and pos... | |
985 | (tables_generate): do it, since that's also it which allocates | |
986 | them. | |
987 | Don't free LA and LArule, main does. | |
988 | ||
989 | 2002-07-31 Akim Demaille <akim@epita.fr> | |
990 | ||
991 | Separate parser tables computation and output. | |
992 | ||
993 | * src/output.c (nvectors, base_t, base, base_ninf, conflict_table) | |
994 | (conflict_list, conflict_list_cnt, table, check, table_ninf) | |
995 | (yydefgoto, yydefact, high): Move to... | |
996 | * src/tables.h, src/tables.c: here. | |
997 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
998 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
999 | (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN) | |
1000 | (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX) | |
1001 | (ACTION_MIN, actrow, order, nentries, pos, conflrow) | |
1002 | (conflict_list_free, table_size, lowzero, table_grow, conflict_row) | |
1003 | (action_row, save_row, token_actions, save_column, default_goto) | |
1004 | (goto_actions, sort_actions, matching_state, pack_vector) | |
1005 | (table_ninf_remap, pack_table, prepare_actions): Move to... | |
1006 | * src/tables.c: here. | |
1007 | * src/tables.h, src/tables.c(tables_generate, tables_free): New. | |
1008 | * src/output.c (token_actions, output_base, output_conflicts) | |
1009 | (output_check): Merge into... | |
1010 | (prepare_actions): this. | |
1011 | (actions_output): Rename as... | |
1012 | (user_actions_output): this. | |
1013 | * src/main.c (main): Call tables_generate and tables_free. | |
1014 | ||
1015 | 2002-07-31 Akim Demaille <akim@epita.fr> | |
1016 | ||
1017 | Steal GCC's --time-report support. | |
1018 | ||
1019 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: New, | |
1020 | stolen/adjusted from GCC. | |
1021 | * m4/stage.m4: Remove time related checks. | |
1022 | * m4/timevar.m4: New. | |
1023 | * configure.in: Adjust. | |
1024 | * src/system.h: Adjust to using timevar.h. | |
1025 | * src/getargs.h, src/getargs.c: Support trace_time for | |
1026 | --trace=time. | |
1027 | * src/main.c (stage): Remove. | |
1028 | (main): Replace `stage' invocations with timevar calls. | |
1029 | * src/output.c: Insert pertinent timevar calls. | |
1030 | ||
1031 | 2002-07-31 Akim Demaille <akim@epita.fr> | |
1032 | ||
1033 | Let --trace have arguments. | |
1034 | ||
1035 | * src/getargs.h (enum trace_e): New. | |
1036 | * src/getargs.c (trace_args, trace_types, trace_argmatch): New. | |
1037 | (long_options, short_options): --trace/-T takes an optional | |
1038 | argument. | |
1039 | Change all the uses of trace_flag to reflect the new flags. | |
1040 | * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets. | |
1041 | ||
1042 | Strengthen `stage' portability. | |
1043 | ||
1044 | * m4/stage.m4 (BISON_PREREQ_STAGE): New. | |
1045 | * configure.in: Use it. | |
1046 | Don't check for malloc.h and sys/times.h. | |
1047 | * src/system.h: Include them when appropriate. | |
1048 | * src/main.c (stage): Compile only when mallinfo, struct mallinfo, | |
1049 | times and struct tms are available. | |
1050 | ||
1051 | 2002-07-30 Akim Demaille <akim@epita.fr> | |
1052 | ||
1053 | In verbose parse error message, don't report `error' as an | |
1054 | expected token. | |
1055 | * tests/actions.at (Printers and Destructors): Adjust. | |
1056 | * tests/calc.at (Calculator $1): Adjust. | |
1057 | * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose | |
1058 | error message, do not report the parser accepts the error token in | |
1059 | that state. | |
1060 | ||
1061 | 2002-07-30 Akim Demaille <akim@epita.fr> | |
1062 | ||
1063 | Normalize conflict related messages. | |
1064 | ||
1065 | * src/complain.h, src/complain.c (warn, complain): New. | |
1066 | * src/conflicts.c (conflicts_print): Use them. | |
1067 | (conflict_report_yacc): New, extracted from... | |
1068 | (conflicts_print): here. | |
1069 | * tests/conflicts.at, tests/existing.at: Adjust. | |
1070 | ||
1071 | 2002-07-30 Akim Demaille <akim@epita.fr> | |
1072 | ||
1073 | Report rules which are never reduced by the parser: those hidden | |
1074 | by conflicts. | |
1075 | ||
1076 | * src/LR0.c (save_reductions): Don't make the final state too | |
1077 | different: save its reduction (accept) instead of having a state | |
1078 | without any action (no shift or goto, no reduce). | |
1079 | Note: the final state is now a ``regular'' state, i.e., the | |
1080 | parsers now contain `reduce 0' as default reduction. | |
1081 | Nevertheless, since they decide to `accept' when yystate = | |
1082 | final_state, they still will not reduce rule 0. | |
1083 | * src/print.c (print_actions, print_reduction): Adjust. | |
1084 | * src/output.c (action_row): Track reduced rules. | |
1085 | (token_actions): Report rules never reduced. | |
1086 | * tests/conflicts.at, tests/regression.at: Adjust. | |
1087 | ||
1088 | 2002-07-30 Akim Demaille <akim@epita.fr> | |
1089 | ||
1090 | `stage' was accidently included in a previous patch. | |
1091 | Initiate its autoconfiscation. | |
1092 | ||
1093 | * configure.in: Look for malloc.h and sys/times.h. | |
1094 | * src/main.c (stage): Adjust. | |
1095 | Report only when trace_flag. | |
1096 | ||
1097 | 2002-07-29 Akim Demaille <akim@epita.fr> | |
1098 | ||
1099 | * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not | |
1100 | state_number_t. | |
1101 | (errs_t): symbol_t*, not symbol_number_t. | |
1102 | (reductions_t): rule_t*, not rule_number_t. | |
1103 | (FOR_EACH_SHIFT): New. | |
1104 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c | |
1105 | * src/print.c, src/print_graph.c: Adjust. | |
1106 | ||
1107 | 2002-07-29 Akim Demaille <akim@epita.fr> | |
1108 | ||
1109 | Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $. | |
1110 | ||
1111 | * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as... | |
1112 | (endtoken, accept): these. | |
1113 | * src/reader.c (reader): Set endtoken's default tag to "$end". | |
1114 | Set undeftoken's tag to "$undefined" instead of "$undefined.". | |
1115 | * doc/bison.texinfo (Table of Symbols): Mention $accept and $end. | |
1116 | Adjust. | |
1117 | ||
1118 | 2002-07-29 Akim Demaille <akim@epita.fr> | |
1119 | ||
1120 | * src/reduce.c (reduce_grammar): When the language is empty, | |
1121 | complain about the start symbol, not the axiom. | |
1122 | Use its location. | |
1123 | * tests/reduce.at (Empty Language): New. | |
1124 | ||
1125 | 2002-07-26 Akim Demaille <akim@epita.fr> | |
1126 | ||
1127 | * src/reader.h, src/reader.c (gram_error): ... can't get | |
1128 | yycontrol without making too strong assumptions on the parser | |
1129 | itself. | |
1130 | * src/output.c (prepare_tokens): Use the real 0th value of | |
1131 | token_translations instead of `0'. | |
1132 | * src/parse-gram.y (yyerror): Don't rely on yycontrol being | |
1133 | visible here. | |
1134 | * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc | |
1135 | for the time being: %locations ought to provide it to yyerror. | |
1136 | ||
1137 | 2002-07-25 Akim Demaille <akim@epita.fr> | |
1138 | ||
1139 | * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1. | |
1140 | * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./. | |
1141 | * tests/regression.at (Web2c Actions): Adjust. | |
1142 | ||
1143 | 2002-07-25 Akim Demaille <akim@epita.fr> | |
1144 | ||
1145 | Stop storing rules from 1 to nrules + 1. | |
1146 | ||
1147 | * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c | |
1148 | * src/nullable.c, src/output.c, src/print.c, src/reader.c | |
1149 | * src/reduce.c: Allocate and free from &rules[0], not &rules[1]. | |
1150 | Iterate from 0 to nrules. | |
1151 | Use rule_number_as_item_number and item_number_as_rule_number. | |
1152 | Adjust to `derive' now containing possibly 0. | |
1153 | * src/gram.h (rule_number_as_item_number, item_number_as_rule_number): | |
1154 | Handle the `- 1' part in rule numbers from/to item numbers. | |
1155 | * src/conflicts.c (log_resolution): Fix the message which reversed | |
1156 | shift and reduce. | |
1157 | * src/output.c (action_row): Initialize default_rule to -1. | |
1158 | (token_actions): Adjust. | |
1159 | * tests/sets.at (Nullable, Firsts): Fix the previously bogus | |
1160 | expected output. | |
1161 | * tests/conflicts.at (Resolved SR Conflicts): Likewise. | |
1162 | ||
1163 | 2002-07-25 Akim Demaille <akim@epita.fr> | |
1164 | ||
1165 | * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg) | |
1166 | (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls) | |
1167 | (b4_c_knr_arg_decl): New. | |
1168 | * data/yacc.c: Use it to define yysymprint, yydestruct, and | |
1169 | yyreport_parse_error. | |
1170 | ||
1171 | 2002-07-25 Akim Demaille <akim@epita.fr> | |
1172 | ||
1173 | * data/yacc.c (yyreport_parse_error): New, extracted from... | |
1174 | (yyparse): here. | |
1175 | (yydestruct, yysymprint): Move above yyparse. | |
1176 | Be K&R compliant. | |
1177 | ||
1178 | 2002-07-25 Akim Demaille <akim@epita.fr> | |
1179 | ||
1180 | * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New, | |
1181 | replace... | |
1182 | (b4_sint_type, b4_uint_type): these. | |
1183 | * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for. | |
1184 | * tests/regression.at (Web2c Actions): Adjust. | |
1185 | ||
1186 | 2002-07-25 Akim Demaille <akim@epita.fr> | |
1187 | ||
1188 | * src/gram.h (TIEM_NUMBER_MAX): New. | |
1189 | (item_number_of_rule_number, rule_number_of_item_number): Rename | |
1190 | as... | |
1191 | (rule_number_as_item_number, item_number_as_rule_number): these. | |
1192 | Adjust dependencies. | |
1193 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
1194 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
1195 | (symbol_number_to_vector_number): New. | |
1196 | (order): Of vector_number_t* type. | |
1197 | (base_t, BASE_MAX, BASE_MIN): New. | |
1198 | (froms, tos, width, pos, check): Of base_t type. | |
1199 | (action_number_t, ACTION_MIN, ACTION_MAX): New. | |
1200 | (actrow): Of action_number_t type. | |
1201 | (conflrow): Of unsigned int type. | |
1202 | (table_ninf, base_ninf): New. | |
1203 | (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value. | |
1204 | (muscle_insert_int_table, muscle_insert_base_table) | |
1205 | (muscle_insert_rule_number_table): New. | |
1206 | (prepare_tokens): Output `toknum' as int_table. | |
1207 | (action_row): Returns a rule_number_t. | |
1208 | Use ACTION_MIN, not SHRT_MIN. | |
1209 | (token_actions): yydefact is rule_number_t*. | |
1210 | (table_ninf_remap): New. | |
1211 | (pack_table): Use it for `base' and `table'. | |
1212 | * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove, | |
1213 | replaced with... | |
1214 | (YYPACT_NINF, YYTABLE_NINF): these. | |
1215 | (yypact, yytable): Compute their types instead of hard-coded | |
1216 | `short'. | |
1217 | * tests/regression.at (Web2c Actions): Adjust. | |
1218 | ||
1219 | 2002-07-19 Akim Demaille <akim@epita.fr> | |
1220 | ||
1221 | * src/scan-gram.l (id): Can start with an underscore. | |
1222 | ||
1223 | 2002-07-16 Akim Demaille <akim@epita.fr> | |
1224 | ||
1225 | * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New. | |
1226 | Adjust all former `associativity' dependencies. | |
1227 | * src/symtab.c (symbol_new): Default associativity is `undef', not | |
1228 | `right'. | |
1229 | (symbol_check_alias_consistence): Adjust. | |
1230 | ||
1231 | 2002-07-09 Akim Demaille <akim@epita.fr> | |
1232 | ||
1233 | * doc/bison.texinfo: Properly set the ``header'' part. | |
1234 | Use @dircategory ``GNU programming tools'' as per Texinfo's | |
1235 | documentation. | |
1236 | Use @copying. | |
1237 | ||
1238 | 2002-07-09 Akim Demaille <akim@epita.fr> | |
1239 | ||
1240 | * lib/quotearg.h: Protect against multiple inclusions. | |
1241 | * src/location.h (location_t): Add a `file' member. | |
1242 | (LOCATION_RESET, LOCATION_PRINT): Adjust. | |
1243 | * src/complain.c (warn_at, complain_at, fatal_at): Drop | |
1244 | `error_one_per_line' support. | |
1245 | ||
1246 | 2002-07-09 Akim Demaille <akim@epita.fr> | |
1247 | ||
1248 | * src/complain.h, src/complain.c (warn, complain): Remove, unused. | |
1249 | * src/reader.c (lineno): Remove. | |
1250 | Adjust all dependencies. | |
1251 | (get_merge_function): Take a location and use complain_at. | |
1252 | * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise. | |
1253 | * tests/regression.at (Invalid inputs, Mixing %token styles): | |
1254 | Adjust. | |
1255 | ||
1256 | 2002-07-09 Akim Demaille <akim@epita.fr> | |
1257 | ||
1258 | * src/parse-gram.y (rules_or_grammar_declaration): Add an error | |
1259 | recovery rule, and forbid extensions when --yacc. | |
1260 | (gram_error): Use complain_at. | |
1261 | * src/reader.c (reader): Exit if there were parse errors. | |
1262 | ||
1263 | 2002-07-09 Akim Demaille <akim@epita.fr> | |
1264 | ||
1265 | * tests/synclines.at (AT_SYNCLINES_COMPILE): New. | |
1266 | (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs. | |
1267 | Reported by R Blake <blakers@mac.com>. | |
1268 | ||
1269 | 2002-07-09 Akim Demaille <akim@epita.fr> | |
1270 | ||
1271 | * data/yacc.c: Output the copyright notive in the header. | |
1272 | ||
1273 | 2002-07-03 Akim Demaille <akim@epita.fr> | |
1274 | ||
1275 | * src/output.c (froms, tos): Are state_number_t. | |
1276 | (save_column): sp, sp1, and sp2 are state_number_t. | |
1277 | (prepare): Rename `final' as `final_state_number', `nnts' as | |
1278 | `nterms_number', `nrules' as `rules_number', `nstates' as | |
1279 | `states_number', and `ntokens' as `tokens_number'. Remove `nsym', | |
1280 | unused. | |
1281 | * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust. | |
1282 | * data/lalr1.cc (nsym_): Remove, unused. | |
1283 | ||
1284 | 2002-07-03 Akim Demaille <akim@epita.fr> | |
1285 | ||
1286 | * src/lalr.h, src/lalr.c (goto_number_t): New. | |
1287 | * src/lalr.c (goto_list_t): New. | |
1288 | Propagate them. | |
1289 | * src/nullable.c (rule_list_t): New. | |
1290 | Propagate. | |
1291 | * src/types.h: Remove. | |
1292 | ||
1293 | 2002-07-03 Akim Demaille <akim@epita.fr> | |
1294 | ||
1295 | * src/closure.c (print_fderives): Use rule_rhs_print. | |
1296 | * src/derives.c (print_derives): Use rule_rhs_print. | |
1297 | (rule_list_t): New, replaces `shorts'. | |
1298 | (set_derives): Add comments. | |
1299 | * tests/sets.at (Nullable, Firsts): Adjust. | |
1300 | ||
1301 | 2002-07-03 Akim Demaille <akim@epita.fr> | |
1302 | ||
1303 | * src/output.c (prepare_actions): Free `tally' and `width'. | |
1304 | (prepare_actions): Allocate and free `order'. | |
1305 | * src/symtab.c (symbols_free): Free `symbols'. | |
1306 | * src/scan-gram.l (scanner_free): Clear Flex's scanners memory. | |
1307 | * src/output.c (m4_invoke): Move to... | |
1308 | * src/scan-skel.l: here. | |
1309 | (<<EOF>>): Close yyout, and free its name. | |
1310 | ||
1311 | 2002-07-03 Akim Demaille <akim@epita.fr> | |
1312 | ||
1313 | Fix some memory leaks, and fix a bug: state 0 was examined twice. | |
1314 | ||
1315 | * src/LR0.c (new_state): Merge into... | |
1316 | (state_list_append): this. | |
1317 | (new_states): Merge into... | |
1318 | (generate_states): here. | |
1319 | (set_states): Don't ensure a proper `errs' state member here, do it... | |
1320 | * src/conflicts.c (conflicts_solve): here. | |
1321 | * src/state.h, src/state.c: Comment changes. | |
1322 | (state_t): Rename member `shifts' as `transitions'. | |
1323 | Adjust all dependencies. | |
1324 | (errs_new): For consistency, also take the values as argument. | |
1325 | (errs_dup): Remove. | |
1326 | (state_errs_set): New. | |
1327 | (state_reductions_set, state_transitions_set): Assert that no | |
1328 | previous value was assigned. | |
1329 | (state_free): New. | |
1330 | (states_free): Use it. | |
1331 | * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as | |
1332 | temporary storage: use `errs' and `nerrs' as elsewhere. | |
1333 | (set_conflicts): Allocate and free this `errs'. | |
1334 | ||
1335 | 2002-07-02 Akim Demaille <akim@epita.fr> | |
1336 | ||
1337 | * lib/libiberty.h: New. | |
1338 | * lib: Update the bitset implementation from upstream. | |
1339 | * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c, | |
1340 | * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE. | |
1341 | * src/main.c: Adjust bitset stats calls. | |
1342 | ||
1343 | 2002-07-01 Paul Eggert <eggert@twinsun.com> | |
1344 | ||
1345 | * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned | |
1346 | char, so that negative chars don't collide with $. | |
1347 | ||
1348 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1349 | ||
1350 | Have the GLR tests be `warning' checked, and fix the warnings. | |
1351 | ||
1352 | * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG | |
1353 | (yyuserAction, yyreportAmbiguity): `Use' all the arguments. | |
1354 | (yyremoveDeletes): `yyi' and `yyj' are size_t. | |
1355 | Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies. | |
1356 | (yyaddDeferredAction): static. | |
1357 | (yyglrReduce): yyi, yyk, amd yyposn are size_t. | |
1358 | (yyreportParseError): yyprefix is const. | |
1359 | yytokenp is used only when verbose. | |
1360 | (yy__GNUC__): Replace with __GNUC__. | |
1361 | (yypdumpstack): yyi is size_t. | |
1362 | (yypreference): Un-yy local variables and arguments, to avoid | |
1363 | clashes with `yyr1'. Anyway, we are not in the user name space. | |
1364 | (yytname_size): be an int, as is compared with ints. | |
1365 | * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New. | |
1366 | Use them. | |
1367 | * tests/cxx-gram.at: Use quotation to protect $1. | |
1368 | Use AT_COMPILE to enable warnings hunts. | |
1369 | Prototype yylex and yyerror. | |
1370 | `Use' argc. | |
1371 | Include `string.h', not `strings.h'. | |
1372 | Produce and prototype stmtMerge only when used. | |
1373 | yylex takes a location. | |
1374 | ||
1375 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1376 | ||
1377 | We spend a lot of time in quotearg, in particular when --verbose. | |
1378 | ||
1379 | * src/symtab.c (symbol_get): Store a quoted version of the key. | |
1380 | (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove. | |
1381 | Adjust all callers. | |
1382 | ||
1383 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1384 | ||
1385 | * src/state.h (reductions_t): Rename member `nreds' as num. | |
1386 | (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'. | |
1387 | * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types. | |
1388 | ||
1389 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1390 | ||
1391 | * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT) | |
1392 | (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED) | |
1393 | (shifts_to): Rename as... | |
1394 | (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION) | |
1395 | (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE) | |
1396 | (TRANSITION_IS_DISABLED, transitions_to): these. | |
1397 | ||
1398 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1399 | ||
1400 | * src/print.c (print_shifts, print_gotos): Merge into... | |
1401 | (print_transitions): this. | |
1402 | (print_transitions, print_errs, print_reductions): Align the | |
1403 | lookaheads columns. | |
1404 | (print_core, print_transitions, print_errs, print_state, | |
1405 | print_grammar): Output empty lines separator before, not after. | |
1406 | (state_default_rule_compute): Rename as... | |
1407 | (state_default_rule): this. | |
1408 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
1409 | (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust. | |
1410 | * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust. | |
1411 | ||
1412 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1413 | ||
1414 | Display items as we display rules. | |
1415 | ||
1416 | * src/gram.h, src/gram.c (rule_lhs_print): New. | |
1417 | * src/gram.c (grammar_rules_partial_print): Use it. | |
1418 | * src/print.c (print_core): Likewise. | |
1419 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
1420 | (Unresolved SR Conflicts): Adjust. | |
1421 | (Unresolved SR Conflicts): Adjust and rename as... | |
1422 | (Resolved SR Conflicts): this, as was meant. | |
1423 | * tests/regression.at (Web2c Report): Adjust. | |
1424 | ||
1425 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1426 | ||
1427 | * src/print.c (state_default_rule_compute): New, extracted from... | |
1428 | (print_reductions): here. | |
1429 | Pessimize, but clarify the code. | |
1430 | * tests/conflicts.at (Defaulted Conflicted Reduction): New. | |
1431 | ||
1432 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1433 | ||
1434 | * src/output.c (action_row): Let default_rule be always a rule | |
1435 | number. | |
1436 | ||
1437 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1438 | ||
1439 | * src/closure.c (print_firsts, print_fderives, closure): | |
1440 | Use BITSET_EXECUTE. | |
1441 | * src/lalr.c (lookaheads_print): Likewise. | |
1442 | * src/state.c (state_rule_lookaheads_print): Likewise. | |
1443 | * src/print_graph.c (print_core): Likewise. | |
1444 | * src/print.c (print_reductions): Likewise. | |
1445 | * src/output.c (action_row): Likewise. | |
1446 | Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL. | |
1447 | ||
1448 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1449 | ||
1450 | * src/print_graph.c: Use report_flag. | |
1451 | ||
1452 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1453 | ||
1454 | * src/lalr.c (traverse, digraph, matrix_print, transpose): Move | |
1455 | to... | |
1456 | * src/relation.h, src/relation.c (traverse, relation_digraph) | |
1457 | (relation_print, relation_transpose): New. | |
1458 | ||
1459 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1460 | ||
1461 | * src/state.h, src/state.c (shifts_to): New. | |
1462 | * src/lalr.c (build_relations): Use it. | |
1463 | ||
1464 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1465 | ||
1466 | * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number) | |
1467 | (item_number_of_rule_number, rule_number_of_item_number): New. | |
1468 | * src/LR0.c, src/closure.c, src/derives.c, src/derives.h, | |
1469 | * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c, | |
1470 | * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h: | |
1471 | Propagate their use. | |
1472 | Much remains to be done, in particular wrt `shorts' from types.h. | |
1473 | ||
1474 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1475 | ||
1476 | * src/symtab.c (symbol_new): Initialize the `printer' member. | |
1477 | ||
1478 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1479 | ||
1480 | * src/LR0.c (save_reductions): Remove, replaced by... | |
1481 | * src/state.h, src/state.c (state_reductions_set): New. | |
1482 | (reductions, errs): Rename as... | |
1483 | (reductions_t, errs_t): these. | |
1484 | Adjust all dependencies. | |
1485 | ||
1486 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1487 | ||
1488 | * src/LR0.c (state_list_t, state_list_append): New. | |
1489 | (first_state, last_state): Now symbol_list_t. | |
1490 | (this_state): Remove. | |
1491 | (new_itemsets, append_states, save_reductions): Take a state_t as | |
1492 | argument. | |
1493 | (set_states, generate_states): Adjust. | |
1494 | (save_shifts): Remove, replaced by... | |
1495 | * src/state.h, src/state.c (state_shifts_set): New. | |
1496 | (shifts): Rename as... | |
1497 | (shifts_t): this. | |
1498 | Adjust all dependencies. | |
1499 | * src/state.h (state_t): Remove the `next' member. | |
1500 | ||
1501 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1502 | ||
1503 | * src/vcg.c (quote): Use slot 2, since we often pass symbol tag | |
1504 | escaped in slot 0. | |
1505 | ||
1506 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1507 | ||
1508 | Use hash.h for the state hash table. | |
1509 | ||
1510 | * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove. | |
1511 | (allocate_storage): Use state_hash_new. | |
1512 | (free_storage): Use state_hash_free. | |
1513 | (new_state, get_state): Adjust. | |
1514 | * src/lalr.h, src/lalr.c (states): Move to... | |
1515 | * src/states.h (state_t): Remove the `link' member, no longer | |
1516 | used. | |
1517 | * src/states.h, src/states.c: here. | |
1518 | (state_hash_new, state_hash_free, state_hash_lookup) | |
1519 | (state_hash_insert, states_free): New. | |
1520 | * src/states.c (state_table, state_compare, state_hash): New. | |
1521 | * src/output.c (output_actions): Do not free states now, since we | |
1522 | still need to know the final_state number in `prepare', called | |
1523 | afterwards. Do it... | |
1524 | * src/main.c (main): here: call states_free after `output'. | |
1525 | ||
1526 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1527 | ||
1528 | * src/state.h, src/state.c (state_new): New, extracted from... | |
1529 | * src/LR0.c (new_state): here. | |
1530 | * src/state.h (STATE_ALLOC): Move to... | |
1531 | * src/state.c: here. | |
1532 | * src/LR0.h, src/LR0.c (nstates, final_state): Move to... | |
1533 | * src/state.h, src/state.c: here. | |
1534 | ||
1535 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1536 | ||
1537 | * src/reader.c (gensym): Rename as... | |
1538 | * src/symtab.h, src/symtab.c (dummy_symbol_get): this. | |
1539 | (getsym): Rename as... | |
1540 | (symbol_get): this. | |
1541 | ||
1542 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1543 | ||
1544 | * src/state.h (state_number_t, STATE_NUMBER_MAX): New. | |
1545 | * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h, | |
1546 | * src/output.c, src/print.c, src/print_graph.c: Propagate. | |
1547 | * src/LR0.h, src/LR0.h (final_state): Is a state_t*. | |
1548 | ||
1549 | 2002-06-30 Akim Demaille <akim@epita.fr> | |
1550 | ||
1551 | Make the test suite pass with warnings checked. | |
1552 | ||
1553 | * tests/actions.at (Printers and Destructors): Improve. | |
1554 | Avoid unsigned vs. signed issues. | |
1555 | * tests/calc.at: Don't exercise the scanner here, do it... | |
1556 | * tests/input.at (Torturing the Scanner): here. | |
1557 | ||
1558 | 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
1559 | ||
1560 | * data/glr.c: Correct typo in Emacs-mode directive. Slightly | |
1561 | reorganize first lines parallel to yacc.c. | |
1562 | ||
1563 | 2002-06-28 Akim Demaille <akim@epita.fr> | |
1564 | ||
1565 | * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define) | |
1566 | (b4_token_enum, b4_token_defines): New, factored from... | |
1567 | * data/lalr1.cc, data/yacc.c, glr.c: here. | |
1568 | ||
1569 | 2002-06-28 Akim Demaille <akim@epita.fr> | |
1570 | ||
1571 | * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for | |
1572 | unused variables. | |
1573 | * src/output.c (merger_output): static. | |
1574 | ||
1575 | 2002-06-28 Akim Demaille <akim@epita.fr> | |
1576 | ||
1577 | * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../. | |
1578 | * src/conflicts.c (conflicts_total_count): `i' is unsigned, to | |
1579 | pacify GCC. | |
1580 | * src/output.c (save_row): Initialize all the variables to pacify GCC. | |
1581 | ||
1582 | 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
1583 | ||
1584 | Accumulated changelog for new GLR parsing features. | |
1585 | ||
1586 | * src/conflicts.c (count_total_conflicts): Change name to | |
1587 | conflicts_total_count. | |
1588 | * src/conflicts.h: Ditto. | |
1589 | * src/output.c (token_actions): Use the new name. | |
1590 | (output_conflicts): Change conflp => conflict_list_heads, and | |
1591 | confl => conflict_list for better readability. | |
1592 | * data/glr.c: Use the new names. | |
1593 | * NEWS: Add self to GLR announcement. | |
1594 | ||
1595 | * src/reader.c (free_merger_functions): Cleanup: XFREE->free. | |
1596 | ||
1597 | * doc/bison.texinfo (GLR Parsers): Make corrections suggested by | |
1598 | Akim Demaille. | |
1599 | ||
1600 | * data/bison.glr: Change name to glr.c | |
1601 | * data/glr.c: Renamed from bison.glr. | |
1602 | * data/Makefile.am: Add glr.c | |
1603 | ||
1604 | * src/getargs.c: | |
1605 | ||
1606 | * src/symlist.h: Add dprec and merger fields to symbol_list_s. | |
1607 | * src/symlist.c (symbol_list_new): Initialize dprec and merger fields. | |
1608 | ||
1609 | Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
1610 | ||
1611 | * data/bison.glr: Be sure to restore the | |
1612 | current #line when returning to the skeleton contents after having | |
1613 | exposed the input file's #line. | |
1614 | ||
1615 | Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
1616 | ||
1617 | * data/bison.glr: Bring up to date with changes to bison.simple. | |
1618 | ||
1619 | Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
1620 | ||
1621 | * data/bison.glr: Correct definitions that use b4_prefix. | |
1622 | Various reformatting. | |
1623 | (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack. | |
1624 | (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove | |
1625 | yytokenp argument; now part of stack. | |
1626 | (yychar): Define to behave as documented. | |
1627 | (yyclearin): Ditto. | |
1628 | ||
1629 | Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
1630 | ||
1631 | * src/reader.h: Add declaration for free_merger_functions. | |
1632 | ||
1633 | * src/reader.c (merge_functions): New variable. | |
1634 | (get_merge_function): New function. | |
1635 | (free_merger_functions): New function. | |
1636 | (readgram): Check for %prec that is not followed by a symbol. | |
1637 | Handle %dprec and %merge declarations. | |
1638 | (packgram): Initialize dprec and merger fields in rules array. | |
1639 | ||
1640 | * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list, | |
1641 | conflict_list_cnt, conflict_list_free): New variables. | |
1642 | (table_grow): Also grow conflict_table. | |
1643 | (prepare_rules): Output dprec and merger tables. | |
1644 | (conflict_row): New function. | |
1645 | (action_row): Output conflict lists for GLR parser. Don't use | |
1646 | default reduction in conflicted states for GLR parser so that there | |
1647 | are spaces for the conflict lists. | |
1648 | (save_row): Also save conflict information. | |
1649 | (token_actions): Allocate conflict list. | |
1650 | (merger_output): New function. | |
1651 | (pack_vector): Pack conflict table, too. | |
1652 | (output_conflicts): New function to output yyconflp and yyconfl. | |
1653 | (output_check): Allocate conflict_tos. | |
1654 | (output_actions): Output conflict tables, also. | |
1655 | (output_skeleton): Output b4_mergers definition. | |
1656 | (prepare): Output b4_max_rhs_length definition. | |
1657 | Use 'bison.glr' as default skeleton for GLR parsers. | |
1658 | ||
1659 | * src/gram.c (glr_parser): New flag. | |
1660 | (grammar_free): Call free_merger_functions. | |
1661 | ||
1662 | * src/conflicts.c (count_rr_conflicts): Augment to optionally count | |
1663 | all pairs of conflicting reductions, rather than just all tokens | |
1664 | causing conflicts. Needed to size conflict tables. | |
1665 | (conflicts_output): Modify call to count_rr_conflicts for new | |
1666 | interface. | |
1667 | (conflicts_print): Ditto. | |
1668 | (count_total_conflicts): New function. | |
1669 | ||
1670 | * src/reader.h (merger_list): New type. | |
1671 | (merge_functions): New variable. | |
1672 | ||
1673 | * src/lex.h (tok_dprec, tok_merge): New token types. | |
1674 | ||
1675 | * src/gram.h (rule_s): Add dprec and merger fields. | |
1676 | (glr_parser): New flag. | |
1677 | ||
1678 | * src/conflicts.h (count_total_conflicts): New function. | |
1679 | ||
1680 | * src/options.c (option_table): Add %dprec, %merge, and %glr-parser. | |
1681 | ||
1682 | * doc/bison.texinfo (Generalized LR Parsing): New section. | |
1683 | (GLR Parsers): New section. | |
1684 | (Language and Grammar): Mention GLR parsing. | |
1685 | (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR | |
1686 | Correct typo ("tge" -> "the"). | |
1687 | ||
1688 | * data/bison.glr: New skeleton for GLR parsing. | |
1689 | ||
1690 | * tests/cxx-gram.at: New tests for GLR parsing. | |
1691 | ||
1692 | * tests/testsuite.at: Include cxx-gram.at. | |
1693 | ||
1694 | * tests/Makefile.am: Add cxx-gram.at. | |
1695 | ||
1696 | * src/parse-gram.y: | |
1697 | ||
1698 | * src/scan-gram.l: Add %dprec, %glr-parser, %merge. | |
1699 | ||
1700 | * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser. | |
1701 | ||
1702 | 2002-06-27 Akim Demaille <akim@epita.fr> | |
1703 | ||
1704 | * src/options.h, src/options.c: Remove. | |
1705 | * src/getargs.c (short_options, long_options): New. | |
1706 | ||
1707 | 2002-06-27 Akim Demaille <akim@epita.fr> | |
1708 | ||
1709 | * data/bison.simple, data/bison.c++: Rename as... | |
1710 | * data/yacc.c, data/lalr1.cc: these. | |
1711 | * doc/bison.texinfo (Environment Variables): Remove. | |
1712 | ||
1713 | 2002-06-25 Raja R Harinath <harinath@cs.umn.edu> | |
1714 | ||
1715 | * src/getargs.c (report_argmatch): Initialize strtok(). | |
1716 | ||
1717 | 2002-06-20 Akim Demaille <akim@epita.fr> | |
1718 | ||
1719 | * data/bison.simple (b4_symbol_actions): New, replaces... | |
1720 | (b4_symbol_destructor, b4_symbol_printer): these. | |
1721 | (yysymprint): Be sure to call YYPRINT only for tokens, and using | |
1722 | user token numbers. | |
1723 | ||
1724 | 2002-06-20 Akim Demaille <akim@epita.fr> | |
1725 | ||
1726 | * data/bison.simple (yydestructor): Rename as... | |
1727 | (yydestruct): this. | |
1728 | ||
1729 | 2002-06-20 Akim Demaille <akim@epita.fr> | |
1730 | ||
1731 | * src/symtab.h, src/symtab.c (symbol_type_set) | |
1732 | (symbol_destructor_set, symbol_precedence_set): The location is | |
1733 | the last argument. | |
1734 | Adjust all callers. | |
1735 | ||
1736 | 2002-06-20 Akim Demaille <akim@epita.fr> | |
1737 | ||
1738 | * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser | |
1739 | internals. | |
1740 | * src/reader.h, src/reader.c (grammar_current_rule_prec_set): | |
1741 | Takes a location. | |
1742 | * src/symtab.h, src/symtab.c (symbol_class_set) | |
1743 | (symbol_user_token_number_set): Likewise. | |
1744 | Adjust all callers. | |
1745 | Promote complain_at. | |
1746 | * tests/input.at (Type Clashes): Adjust. | |
1747 | ||
1748 | 2002-06-20 Akim Demaille <akim@epita.fr> | |
1749 | ||
1750 | * data/bison.simple (YYLEX): Fix the declaration when | |
1751 | %pure-parser. | |
1752 | ||
1753 | 2002-06-20 Akim Demaille <akim@epita.fr> | |
1754 | ||
1755 | * data/bison.simple (yysymprint): Don't print the token number, | |
1756 | just its name. | |
1757 | * tests/actions.at (Destructors): Rename as... | |
1758 | (Printers and Destructors): this. | |
1759 | Also exercise %printer. | |
1760 | ||
1761 | 2002-06-20 Akim Demaille <akim@epita.fr> | |
1762 | ||
1763 | * data/bison.simple (YYDSYMPRINT): New. | |
1764 | Use it to remove many of the #if YYDEBUG/if (yydebug). | |
1765 | ||
1766 | 2002-06-20 Akim Demaille <akim@epita.fr> | |
1767 | ||
1768 | * src/symtab.h, src/symtab.c (symbol_t): printer and | |
1769 | printer_location are new members. | |
1770 | (symbol_printer_set): New. | |
1771 | * src/parse-gram.y (PERCENT_PRINTER): New token. | |
1772 | Handle its associated rule. | |
1773 | * src/scan-gram.l: Adjust. | |
1774 | (handle_destructor_at, handle_destructor_dollar): Rename as... | |
1775 | (handle_symbol_code_at, handle_symbol_code_dollar): these. | |
1776 | * src/output.c (symbol_printers_output): New. | |
1777 | (output_skeleton): Call it. | |
1778 | * data/bison.simple (yysymprint): New. Cannot be named yyprint | |
1779 | since there are already many grammar files with a user `yyprint'. | |
1780 | Replace the calls to YYPRINT to calls to yysymprint. | |
1781 | * tests/calc.at: Adjust. | |
1782 | * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was | |
1783 | taking advantage of parser very internal details (stack size!). | |
1784 | ||
1785 | 2002-06-20 Akim Demaille <akim@epita.fr> | |
1786 | ||
1787 | * src/scan-gram.l: Complete the scanner with the missing patterns | |
1788 | to pacify Flex. | |
1789 | Use `quote' and `symbol_tag_get' where appropriate. | |
1790 | ||
1791 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
1792 | ||
1793 | * tests/actions.at (Destructors): Augment to test locations. | |
1794 | * data/bison.simple (yydestructor): Pass it the current location | |
1795 | if locations are enabled. | |
1796 | Prototype only when __STDC__ or C++. | |
1797 | Change the argument names to move into the yy name space: there is | |
1798 | user code here. | |
1799 | ||
1800 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
1801 | ||
1802 | * data/bison.simple (b4_pure_if): New. | |
1803 | Use it instead of #ifdef YYPURE. | |
1804 | ||
1805 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
1806 | ||
1807 | * data/bison.simple (b4_location_if): New. | |
1808 | Use it instead of #ifdef YYLSP_NEEDED. | |
1809 | ||
1810 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
1811 | ||
1812 | Prepare @$ in %destructor, but currently don't bind it in the | |
1813 | skeleton, as %location use is not cleaned up yet. | |
1814 | ||
1815 | * src/scan-gram.l (handle_dollar, handle_destructor_at) | |
1816 | (handle_action_at): New. | |
1817 | (handle_at, handle_action_dollar, handle_destructor_dollar): Take | |
1818 | a braced_code_t and a location as additional arguments. | |
1819 | (handle_destructor_dollar): Instead of requiring `b4_eval', just | |
1820 | unquote one when outputting `b4_dollar_dollar'. | |
1821 | Adjust callers. | |
1822 | * data/bison.simple (b4_eval): Remove. | |
1823 | (b4_symbol_destructor): Adjust. | |
1824 | * tests/input.at (Invalid @n): Adjust. | |
1825 | ||
1826 | 2002-06-19 Zack Weinberg <zack@codesourcery.com> | |
1827 | ||
1828 | * doc/bison.texinfo: Document ability to have multiple | |
1829 | prologue sections. | |
1830 | ||
1831 | 2002-06-18 Akim Demaille <akim@epita.fr> | |
1832 | ||
1833 | * src/files.c (compute_base_names): When computing the output file | |
1834 | names from the input file name, strip the directory part. | |
1835 | ||
1836 | 2002-06-18 Akim Demaille <akim@epita.fr> | |
1837 | ||
1838 | * data/bison.simple.new: Comment changes. | |
1839 | Reported by Andreas Schwab. | |
1840 | ||
1841 | 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu> | |
1842 | ||
1843 | * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that | |
1844 | there are no `label `yyoverflowlab' defined but not used' warnings | |
1845 | when yyoverflow is defined. | |
1846 | ||
1847 | 2002-06-18 Akim Demaille <akim@epita.fr> | |
1848 | ||
1849 | * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a | |
1850 | new member. | |
1851 | (symbol_destructor_set): Adjust. | |
1852 | * src/output.c (symbol_destructors_output): Output the destructor | |
1853 | locations. | |
1854 | Output the symbol name. | |
1855 | * data/bison.simple (b4_symbol_destructor): Adjust. | |
1856 | ||
1857 | 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com> | |
1858 | and Akim Demaille <akim@epita.fr> | |
1859 | ||
1860 | * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy | |
1861 | what's left on the stack when the error recovery hits EOF. | |
1862 | * tests/actions.at (Destructors): Complete to exercise this case. | |
1863 | ||
1864 | 2002-06-17 Akim Demaille <akim@epita.fr> | |
1865 | ||
1866 | * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of | |
1867 | arguments is really empty, not only equal to `[]'. | |
1868 | * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new | |
1869 | member. | |
1870 | (symbol_destructor_set): New. | |
1871 | * src/output.c (symbol_destructors_output): New. | |
1872 | * src/reader.h (brace_code_t, current_braced_code): New. | |
1873 | * src/scan-gram.l (BRACED_CODE): Use it to branch on... | |
1874 | (handle_dollar): Rename as... | |
1875 | (handle_action_dollar): this. | |
1876 | (handle_destructor_dollar): New. | |
1877 | * src/parse-gram.y (PERCENT_DESTRUCTOR): New. | |
1878 | (grammar_declaration): Use it. | |
1879 | * data/bison.simple (yystos): Is always defined. | |
1880 | (yydestructor): New. | |
1881 | * tests/actions.at (Destructors): New. | |
1882 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep. | |
1883 | ||
1884 | 2002-06-17 Akim Demaille <akim@epita.fr> | |
1885 | ||
1886 | * src/symlist.h, src/symlist.c (symbol_list_length): New. | |
1887 | * src/scan-gram.l (handle_dollar, handle_at): Compute the | |
1888 | rule_length only when needed. | |
1889 | * src/output.c (actions_output, token_definitions_output): Output | |
1890 | the full M4 block. | |
1891 | * src/symtab.c: Don't access directly to the symbol tag, use | |
1892 | symbol_tag_get. | |
1893 | * src/parse-gram.y: Use symbol_list_free. | |
1894 | ||
1895 | 2002-06-17 Akim Demaille <akim@epita.fr> | |
1896 | ||
1897 | * src/reader.h, src/reader.c (symbol_list, symbol_list_new) | |
1898 | (symbol_list_prepend, get_type_name): Move to... | |
1899 | * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new) | |
1900 | (symbol_list_prepend, symbol_list_n_type_name_get): here. | |
1901 | Adjust all callers. | |
1902 | (symbol_list_free): New. | |
1903 | * src/scan-gram.l (handle_dollar): Takes a location. | |
1904 | * tests/input.at (Invalid $n): Adjust. | |
1905 | ||
1906 | 2002-06-17 Akim Demaille <akim@epita.fr> | |
1907 | ||
1908 | * src/reader.h, src/reader.c (symbol_list_new): Export it. | |
1909 | (symbol_list_prepend): New. | |
1910 | * src/parse-gram.y (%union): `list' is a new member. | |
1911 | (symbols.1): New, replaces... | |
1912 | (terms_to_prec.1, nterms_to_type.1): these. | |
1913 | * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set) | |
1914 | Take a location as additional argument. | |
1915 | Adjust all callers. | |
1916 | ||
1917 | 2002-06-15 Akim Demaille <akim@epita.fr> | |
1918 | ||
1919 | * src/parse-gram.y: Move %token in the declaration section so that | |
1920 | we don't depend upon CVS Bison. | |
1921 | ||
1922 | 2002-06-15 Akim Demaille <akim@epita.fr> | |
1923 | ||
1924 | * src/state.h, src/state.c (state_rule_lookaheads_print): New. | |
1925 | * src/print.c (print_core): Use it. | |
1926 | ||
1927 | 2002-06-15 Akim Demaille <akim@epita.fr> | |
1928 | ||
1929 | * src/conflicts.c (log_resolution): Accept the rule involved in | |
1930 | the sr conflicts instead of the lookahead number that points to | |
1931 | that rule. | |
1932 | (flush_reduce): Accept the current lookahead vector as argument, | |
1933 | instead of the index in LA. | |
1934 | (resolve_sr_conflict): Accept the current number of lookahead | |
1935 | bitset to consider for the STATE, instead of the index in LA. | |
1936 | (set_conflicts): Adjust. | |
1937 | * src/lalr.c, src/lalr.h, src/state.h: Comment changes. | |
1938 | ||
1939 | 2002-06-15 Akim Demaille <akim@epita.fr> | |
1940 | ||
1941 | * src/state.h (state_t): Replace the `lookaheadsp' member, a | |
1942 | short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**). | |
1943 | Adjust all dependencies. | |
1944 | * src/lalr.c (initialize_lookaheads): Split into... | |
1945 | (states_lookaheads_count, states_lookaheads_initialize): these. | |
1946 | (lalr): Adjust. | |
1947 | ||
1948 | 2002-06-15 Akim Demaille <akim@epita.fr> | |
1949 | ||
1950 | * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved | |
1951 | out of... | |
1952 | (grammar_rules_print): here. | |
1953 | * src/reduce.c (reduce_output): Use it. | |
1954 | * tests/reduce.at (Useless Rules, Reduced Automaton) | |
1955 | (Underivable Rules): Adjust. | |
1956 | ||
1957 | 2002-06-15 Akim Demaille <akim@epita.fr> | |
1958 | ||
1959 | Copy BYacc's nice way to report the grammar. | |
1960 | ||
1961 | * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print): | |
1962 | New. | |
1963 | Don't print the rules' location, it is confusing and useless. | |
1964 | (rule_print): Use grammar_rhs_print. | |
1965 | * src/print.c (print_grammar): Use grammar_rules_print. | |
1966 | ||
1967 | 2002-06-15 Akim Demaille <akim@epita.fr> | |
1968 | ||
1969 | Complete and rationalize `useless thing' warnings. | |
1970 | ||
1971 | * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n) | |
1972 | (symbol_tag_print): New. | |
1973 | Use them everywhere in place of accessing directly the tag member. | |
1974 | * src/gram.h, src/gram.c (rule_print): New. | |
1975 | Use it where a rule used to be printed `by hand'. | |
1976 | * src/reduce.c (nonterminals_reduce): Report the use nonterminals. | |
1977 | (reduce_grammar_tables): Report the useless rules. | |
1978 | (reduce_print): Useless things are a warning, not an error. | |
1979 | Report it as such. | |
1980 | * tests/reduce.at (Useless Nonterminals, Useless Rules): | |
1981 | (Reduced Automaton, Underivable Rules): Adjust. | |
1982 | * tests/regression.at (Web2c Report, Web2c Report): Adjust. | |
1983 | * tests/conflicts.at (Unresolved SR Conflicts) | |
1984 | (Solved SR Conflicts): Adjust. | |
1985 | ||
1986 | 2002-06-15 Akim Demaille <akim@epita.fr> | |
1987 | ||
1988 | Let symbols have a location. | |
1989 | ||
1990 | * src/symtab.h, src/symtab.c (symbol_t): Location is a new member. | |
1991 | (getsym): Adjust. | |
1992 | Adjust all callers. | |
1993 | * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at): | |
1994 | Use location_t, not int. | |
1995 | * src/symtab.c (symbol_check_defined): Take advantage of the | |
1996 | location. | |
1997 | * tests/regression.at (Invalid inputs): Adjust. | |
1998 | ||
1999 | 2002-06-15 Akim Demaille <akim@epita.fr> | |
2000 | ||
2001 | * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New. | |
2002 | (input): Don't try to initialize yylloc here, do it in the | |
2003 | scanner. | |
2004 | * src/scan-gram.l (YY_USER_INIT): Initialize yylloc. | |
2005 | * src/gram.h (rule_t): Change line and action_line into location | |
2006 | and action_location, of location_t type. | |
2007 | Adjust all dependencies. | |
2008 | * src/location.h, src/location.c (empty_location): New. | |
2009 | * src/reader.h, src/reader.c (grammar_start_symbol_set) | |
2010 | (grammar_symbol_append, grammar_rule_begin, grammar_rule_end) | |
2011 | (grammar_current_rule_symbol_append) | |
2012 | (grammar_current_rule_action_append): Expect a location as argument. | |
2013 | * src/reader.c (grammar_midrule_action): Adjust to attach an | |
2014 | action's location as dummy symbol location. | |
2015 | * src/symtab.h, src/symtab.c (startsymbol_location): New. | |
2016 | * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust | |
2017 | the line numbers. | |
2018 | ||
2019 | 2002-06-14 Akim Demaille <akim@epita.fr> | |
2020 | ||
2021 | Grammar declarations may be found in the grammar section. | |
2022 | ||
2023 | * src/parse-gram.y (rules_or_grammar_declaration): New. | |
2024 | (declarations): Each declaration may end with a semicolon, not | |
2025 | just... | |
2026 | (grammar_declaration): `"%union"'. | |
2027 | (grammar): Branch to rules_or_grammar_declaration. | |
2028 | ||
2029 | 2002-06-14 Akim Demaille <akim@epita.fr> | |
2030 | ||
2031 | * src/main.c (main): Invoke scanner_free. | |
2032 | ||
2033 | 2002-06-14 Akim Demaille <akim@epita.fr> | |
2034 | ||
2035 | * src/output.c (m4_invoke): Extracted from... | |
2036 | (output_skeleton): here. | |
2037 | Free tempfile. | |
2038 | ||
2039 | 2002-06-14 Akim Demaille <akim@epita.fr> | |
2040 | ||
2041 | * src/parse-gram.y (directives, directive, gram) | |
2042 | (grammar_directives, precedence_directives, precedence_directive): | |
2043 | Rename as... | |
2044 | (declarations, declaration, grammar, grammar_declaration) | |
2045 | (precedence_declaration, precedence_declarator): these. | |
2046 | (symbol_declaration): New. | |
2047 | ||
2048 | 2002-06-14 Akim Demaille <akim@epita.fr> | |
2049 | ||
2050 | * src/files.c (action_obstack): Remove, unused. | |
2051 | (output_obstack): Remove it, and all its dependencies, as it is no | |
2052 | longer needed. | |
2053 | * src/reader.c (epilogue_set): Build the epilogue in the | |
2054 | muscle_obstack. | |
2055 | * src/output.h, src/output.c (muscle_obstack): Move to... | |
2056 | * src/muscle_tab.h, src/muscle_tab.h: here. | |
2057 | (muscle_init): Initialize muscle_obstack. | |
2058 | (muscle_free): New. | |
2059 | * src/main.c (main): Call it. | |
2060 | ||
2061 | 2002-06-14 Akim Demaille <akim@epita.fr> | |
2062 | ||
2063 | * src/location.h: New, extracted from... | |
2064 | * src/reader.h: here. | |
2065 | * src/Makefile.am (noinst_HEADERS): Merge into | |
2066 | (bison_SOURCES): this. | |
2067 | Add location.h. | |
2068 | * src/parse-gram.y: Use location_t instead of Bison's. | |
2069 | * src/reader.h, src/reader.c (prologue_augment, epilogue_set): | |
2070 | Use location_t instead of ints. | |
2071 | ||
2072 | 2002-06-14 Akim Demaille <akim@epita.fr> | |
2073 | ||
2074 | * data/bison.simple, data/bison.c++: Be sure to restore the | |
2075 | current #line when returning to the skeleton contents after having | |
2076 | exposed the input file's #line. | |
2077 | ||
2078 | 2002-06-12 Akim Demaille <akim@epita.fr> | |
2079 | ||
2080 | * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too | |
2081 | eager. | |
2082 | * tests/actions.at (Exotic Dollars): New. | |
2083 | ||
2084 | 2002-06-12 Akim Demaille <akim@epita.fr> | |
2085 | ||
2086 | * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst | |
2087 | ['"/] too eagerly. | |
2088 | * tests/input.at (Torturing the Scanner): New. | |
2089 | ||
2090 | 2002-06-11 Akim Demaille <akim@epita.fr> | |
2091 | ||
2092 | * src/scan-gram.l (YY_OBS_INIT): Remove, replace with... | |
2093 | [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE] | |
2094 | [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment. | |
2095 | * src/reader.h, src/scan-gram.l (scanner_initialize): this. | |
2096 | * src/reader.c (reader): Use it. | |
2097 | ||
2098 | 2002-06-11 Akim Demaille <akim@epita.fr> | |
2099 | ||
2100 | * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval. | |
2101 | Adjust all callers. | |
2102 | (scanner_last_string_free): New. | |
2103 | ||
2104 | 2002-06-11 Akim Demaille <akim@epita.fr> | |
2105 | ||
2106 | * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as... | |
2107 | (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these. | |
2108 | (last_string, YY_OBS_FREE): New. | |
2109 | Use them when returning an ID. | |
2110 | ||
2111 | 2002-06-11 Akim Demaille <akim@epita.fr> | |
2112 | ||
2113 | Have Bison grammars parsed by a Bison grammar. | |
2114 | ||
2115 | * src/reader.c, src/reader.h (prologue_augment): New. | |
2116 | * src/reader.c (copy_definition): Remove. | |
2117 | ||
2118 | * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment) | |
2119 | (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action) | |
2120 | (grammar_current_rule_prec_set, grammar_current_rule_check) | |
2121 | (grammar_current_rule_symbol_append) | |
2122 | (grammar_current_rule_action_append): Export. | |
2123 | * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_ | |
2124 | (symbol_list_action_append): Remove. | |
2125 | Hook the routines from reader. | |
2126 | * src/scan-gram.l: In INITIAL, characters and strings are tokens. | |
2127 | * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now. | |
2128 | ||
2129 | * src/reader.c (read_declarations): Remove, unused. | |
2130 | ||
2131 | * src/parse-gram.y: Handle the epilogue. | |
2132 | * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as... | |
2133 | (grammar_start_symbol_set): this. | |
2134 | * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet. | |
2135 | * src/reader.c (readgram): Remove, unused. | |
2136 | (reader): Adjust to insert eoftoken and axiom where appropriate. | |
2137 | ||
2138 | * src/reader.c (copy_dollar): Replace with... | |
2139 | * src/scan-gram.h (handle_dollar): this. | |
2140 | * src/parse-gram.y: Remove `%thong'. | |
2141 | ||
2142 | * src/reader.c (copy_at): Replace with... | |
2143 | * src/scan-gram.h (handle_at): this. | |
2144 | ||
2145 | * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at): | |
2146 | New. | |
2147 | ||
2148 | * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the | |
2149 | time being. | |
2150 | ||
2151 | * src/reader.h, src/reader.c (grammar_rule_end): New. | |
2152 | ||
2153 | * src/parse.y (current_type, current_class): New. | |
2154 | Implement `%nterm', `%token' support. | |
2155 | Merge `%term' into `%token'. | |
2156 | (string_as_id): New. | |
2157 | * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the | |
2158 | type name. | |
2159 | ||
2160 | * src/parse-gram.y: Be sure to handle properly the beginning of | |
2161 | rules. | |
2162 | ||
2163 | * src/parse-gram.y: Handle %type. | |
2164 | * src/reader.c (grammar_rule_end): Call grammar_current_rule_check. | |
2165 | ||
2166 | * src/parse-gram.y: More directives support. | |
2167 | * src/options.c: No longer handle source directives. | |
2168 | ||
2169 | * src/parse-gram.y: Fix %output. | |
2170 | ||
2171 | * src/parse-gram.y: Handle %union. | |
2172 | Use the prologue locations. | |
2173 | * src/reader.c (parse_union_decl): Remove. | |
2174 | ||
2175 | * src/reader.h, src/reader.c (epilogue_set): New. | |
2176 | * src/parse-gram.y: Use it. | |
2177 | ||
2178 | * data/bison.simple, data/bison.c++: b4_stype is now either not | |
2179 | defined, then default to int, or to the contents of %union, | |
2180 | without `union' itself. | |
2181 | Adjust. | |
2182 | * src/muscle_tab.c (muscle_init): Don't predefine `stype'. | |
2183 | ||
2184 | * src/output.c (actions_output): Don't output braces, as they are | |
2185 | already handled by the scanner. | |
2186 | ||
2187 | * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of | |
2188 | characters to themselves. | |
2189 | ||
2190 | * tests/reduce.at (Reduced Automaton): End the grammars with %% so | |
2191 | that the epilogue has a proper #line. | |
2192 | ||
2193 | * src/parse-gram.y: Handle precedence/associativity. | |
2194 | ||
2195 | * src/symtab.c (symbol_precedence_set): Requires the symbol to be | |
2196 | a terminal. | |
2197 | * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters. | |
2198 | * tests/calc.at: Do not use `%token "foo"' as it makes not sense | |
2199 | at all to define terminals that cannot be emitted. | |
2200 | ||
2201 | * src/scan-gram.l: Escape M4 characters. | |
2202 | ||
2203 | * src/scan-gram.l: Working properly with escapes in user | |
2204 | strings/characters. | |
2205 | ||
2206 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR) | |
2207 | (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING' | |
2208 | grammar. | |
2209 | Use more modest sizes, as for the time being the parser does not | |
2210 | release memory, and therefore the process swallows a huge amount | |
2211 | of memory. | |
2212 | ||
2213 | * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the | |
2214 | stricter %token grammar. | |
2215 | ||
2216 | * src/symtab.h (associativity): Add `undef_assoc'. | |
2217 | (symbol_precedence_set): Do nothing when passed an undef_assoc. | |
2218 | * src/symtab.c (symbol_check_alias_consistence): Adjust. | |
2219 | ||
2220 | * tests/regression.at (Invalid %directive): Remove, as it is now | |
2221 | meaningless. | |
2222 | (Invalid inputs): Adjust to the new error messages. | |
2223 | (Token definitions): The new grammar doesn't allow too many | |
2224 | eccentricities. | |
2225 | ||
2226 | * src/lex.h, src/lex.c: Remove. | |
2227 | * src/reader.c (lastprec, skip_to_char, read_signed_integer) | |
2228 | (copy_character, copy_string2, copy_string, copy_identifier) | |
2229 | (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl) | |
2230 | (parse_muscle_decl, parse_dquoted_param, parse_skel_decl) | |
2231 | (parse_action): Remove. | |
2232 | * po/POTFILES.in: Adjust. | |
2233 | ||
2234 | 2002-06-11 Akim Demaille <akim@epita.fr> | |
2235 | ||
2236 | * src/reader.c (parse_action): Don't store directly into the | |
2237 | rule's action member: return the action as a string. | |
2238 | Don't require `rule_length' as an argument: compute it. | |
2239 | (grammar_current_rule_symbol_append) | |
2240 | (grammar_current_rule_action_append): New, eved out from | |
2241 | (readgram): here. | |
2242 | Remove `action_flag', `rulelength', unused now. | |
2243 | ||
2244 | 2002-06-11 Akim Demaille <akim@epita.fr> | |
2245 | ||
2246 | * src/reader.c (grammar_current_rule_prec_set). | |
2247 | (grammar_current_rule_check): New, eved out from... | |
2248 | (readgram): here. | |
2249 | Remove `xaction', `first_rhs': useless. | |
2250 | * tests/input.at (Type clashes): New. | |
2251 | * tests/existing.at (GNU Cim Grammar): Adjust. | |
2252 | ||
2253 | 2002-06-11 Akim Demaille <akim@epita.fr> | |
2254 | ||
2255 | * src/reader.c (grammar_midrule_action): New, Eved out from | |
2256 | (readgram): here. | |
2257 | ||
2258 | 2002-06-11 Akim Demaille <akim@epita.fr> | |
2259 | ||
2260 | * src/reader.c (grammar_rule_begin, previous_rule, current_rule): | |
2261 | New. | |
2262 | (readgram): Use them as replacement of inlined code, crule and | |
2263 | crule1. | |
2264 | ||
2265 | 2002-06-11 Akim Demaille <akim@epita.fr> | |
2266 | ||
2267 | * src/reader.c (grammar_end, grammar_symbol_append): New. | |
2268 | (readgram): Use them. | |
2269 | Make the use of `p' as local as possible. | |
2270 | ||
2271 | 2002-06-10 Akim Demaille <akim@epita.fr> | |
2272 | ||
2273 | GCJ's parser requires the tokens to be defined before the prologue. | |
2274 | ||
2275 | * data/bison.simple: Output the token definition before the user's | |
2276 | prologue. | |
2277 | * tests/regression.at (Braces parsing, Duplicate string) | |
2278 | (Mixing %token styles): Check the output from bison. | |
2279 | (Early token definitions): New. | |
2280 | ||
2281 | 2002-06-10 Akim Demaille <akim@epita.fr> | |
2282 | ||
2283 | * src/symtab.c (symbol_user_token_number_set): Don't complain when | |
2284 | assigning twice the same user number to a token, so that we can | |
2285 | use it in... | |
2286 | * src/lex.c (lex): here. | |
2287 | Also use `symbol_class_set' instead of hand written code. | |
2288 | * src/reader.c (parse_assoc_decl): Likewise. | |
2289 | ||
2290 | 2002-06-10 Akim Demaille <akim@epita.fr> | |
2291 | ||
2292 | * src/symtab.c, src/symtab.c (symbol_class_set) | |
2293 | (symbol_user_token_number_set): New. | |
2294 | * src/reader.c (parse_token_decl): Use them. | |
2295 | Use a switch instead of ifs. | |
2296 | Use a single argument. | |
2297 | ||
2298 | 2002-06-10 Akim Demaille <akim@epita.fr> | |
2299 | ||
2300 | Remove `%thong' support as it is undocumented, unused, duplicates | |
2301 | `%token's job, and creates useless e-mail traffic with people who | |
2302 | want to know what it is, why it is undocumented, unused, and | |
2303 | duplicates `%token's job. | |
2304 | ||
2305 | * src/reader.c (parse_thong_decl): Remove. | |
2306 | * src/options.c (option_table): Remove "thong". | |
2307 | * src/lex.h (tok_thong): Remove. | |
2308 | ||
2309 | 2002-06-10 Akim Demaille <akim@epita.fr> | |
2310 | ||
2311 | * src/symtab.c, src/symtab.c (symbol_type_set) | |
2312 | (symbol_precedence_set): New. | |
2313 | * src/reader.c (parse_type_decl, parse_assoc_decl): Use them. | |
2314 | (value_components_used): Remove, unused. | |
2315 | ||
2316 | 2002-06-09 Akim Demaille <akim@epita.fr> | |
2317 | ||
2318 | Move symbols handling code out of the reader. | |
2319 | ||
2320 | * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken) | |
2321 | (axiom): Move to... | |
2322 | * src/symtab.h, src/symtab.c: here. | |
2323 | ||
2324 | * src/gram.c (start_symbol): Remove: use startsymbol->number. | |
2325 | * src/reader.c (startval): Rename as... | |
2326 | * src/symtab.h, src/symtab.c (startsymbol): this. | |
2327 | * src/reader.c: Adjust. | |
2328 | ||
2329 | * src/reader.c (symbol_check_defined, symbol_make_alias) | |
2330 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
2331 | (token_translations_init) | |
2332 | Move to... | |
2333 | * src/symtab.c: here. | |
2334 | * src/reader.c (packsymbols): Move to... | |
2335 | * src/symtab.h, src/symtab.c (symbols_pack): here. | |
2336 | * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as | |
2337 | argument. | |
2338 | ||
2339 | 2002-06-03 Akim Demaille <akim@epita.fr> | |
2340 | ||
2341 | * src/muscle_tab.c (muscle_insert, muscle_find): Declarations, | |
2342 | then statements. | |
2343 | ||
2344 | 2002-06-03 Akim Demaille <akim@epita.fr> | |
2345 | ||
2346 | * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize | |
2347 | structs with non literals. | |
2348 | * src/scan-skel.l: never-interactive. | |
2349 | * src/conflicts.c (enum conflict_resolution_e): No trailing | |
2350 | comma. | |
2351 | * src/getargs.c (usage): Split long literal strings. | |
2352 | Reported by Hans Aberg. | |
2353 | ||
2354 | 2002-05-28 Akim Demaille <akim@epita.fr> | |
2355 | ||
2356 | * data/bison.c++: Use C++ ostreams. | |
2357 | (cdebug_): New member. | |
2358 | ||
2359 | 2002-05-28 Akim Demaille <akim@epita.fr> | |
2360 | ||
2361 | * src/output.c (output_skeleton): Be sure to allocate enough room | |
2362 | for `/' _and_ for `\0' in full_skeleton. | |
2363 | ||
2364 | 2002-05-28 Akim Demaille <akim@epita.fr> | |
2365 | ||
2366 | * data/bison.c++: Catch up with bison.simple: | |
2367 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2368 | and Paul Eggert <eggert@twinsun.com>: `error' handing. | |
2369 | 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_, | |
2370 | and popping traces. | |
2371 | ||
2372 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2373 | ||
2374 | * src/output.c (output_skeleton): Put an explicit path in front of | |
2375 | the skeleton file name, rather than relying on the -I directory, | |
2376 | to partially alleviate effects of having a skeleton file lying around | |
2377 | in the current directory. | |
2378 | ||
2379 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2380 | ||
2381 | * src/conflicts.c (log_resolution): Correct typo: | |
2382 | obstack_printf should be obstack_fgrow1. | |
2383 | ||
2384 | 2002-05-26 Akim Demaille <akim@epita.fr> | |
2385 | ||
2386 | * src/state.h (state_t): `solved_conflicts' is a new member. | |
2387 | * src/LR0.c (new_state): Set it to 0. | |
2388 | * src/conflicts.h, src/conflicts.c (print_conflicts) | |
2389 | (free_conflicts, solve_conflicts): Rename as... | |
2390 | (conflicts_print, conflicts_free, conflicts_solve): these. | |
2391 | Adjust callers. | |
2392 | * src/conflicts.c (enum conflict_resolution_e) | |
2393 | (solved_conflicts_obstack): New, used by... | |
2394 | (log_resolution): this. | |
2395 | Adjust to attach the conflict resolution to each state. | |
2396 | Complete the description with the precedence/associativity | |
2397 | information. | |
2398 | (resolve_sr_conflict): Adjust. | |
2399 | * src/print.c (print_state): Output its solved_conflicts. | |
2400 | * tests/conflicts.at (Unresolved SR Conflicts) | |
2401 | (Solved SR Conflicts): Exercise --report=all. | |
2402 | ||
2403 | 2002-05-26 Akim Demaille <akim@epita.fr> | |
2404 | ||
2405 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
2406 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
2407 | * src/reader.c, src/reduce.c, src/state.h, src/symtab.h | |
2408 | (token_number_t, item_number_as_token_number) | |
2409 | (token_number_as_item_number, muscle_insert_token_number_table): | |
2410 | Rename as... | |
2411 | (symbol_number_t, item_number_as_symbol_number) | |
2412 | (symbol_number_as_item_number, muscle_insert_symbol_number_table): | |
2413 | these, since it is more appropriate. | |
2414 | ||
2415 | 2002-05-26 Akim Demaille <akim@epita.fr> | |
2416 | ||
2417 | * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional | |
2418 | `Error:' lines. | |
2419 | * data/bison.simple (yystos) [YYDEBUG]: New. | |
2420 | (yyparse) [YYDEBUG]: Display the symbols which are popped during | |
2421 | error recovery. | |
2422 | * tests/regression.at (Web2c Actions): Adjust: yystos is output now. | |
2423 | ||
2424 | 2002-05-25 Akim Demaille <akim@epita.fr> | |
2425 | ||
2426 | * doc/bison.texinfo (Debugging): Split into... | |
2427 | (Tracing): this new section, its former contents, and... | |
2428 | (Understanding): this new section. | |
2429 | * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced | |
2430 | by... | |
2431 | (report_flag): this. | |
2432 | Adjust all dependencies. | |
2433 | (report_args, report_types, report_argmatch): New. | |
2434 | (usage, getargs): Report/support -r, --report. | |
2435 | * src/options.h | |
2436 | (struct option_table_struct): Rename as.., | |
2437 | (struct option_table_s): this. | |
2438 | Rename the `set_flag' member to `flag' to match with getopt_long's | |
2439 | struct. | |
2440 | * src/options.c (option_table): Split verbose into an entry for | |
2441 | %verbose, and another for --verbose. | |
2442 | Support --report/-r, so remove -r from the obsolete --raw. | |
2443 | * src/print.c: Attach full item sets and lookaheads reports to | |
2444 | report_flag instead of trace_flag. | |
2445 | * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1. | |
2446 | ||
2447 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2448 | and Paul Eggert <eggert@twinsun.com> | |
2449 | ||
2450 | * data/bison.simple (yyparse): Correct error handling to conform to | |
2451 | POSIX and yacc. Specifically, after syntax error is discovered, | |
2452 | do not reduce further before shifting the error token. | |
2453 | Clean up the code a bit by removing the labels yyerrdefault, | |
2454 | yyerrhandle, yyerrpop. | |
2455 | * NEWS: Document the above. | |
2456 | ||
2457 | 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2458 | ||
2459 | * data/bison.simple (yyr1): Don't use yy_token_number_type as element | |
2460 | type; it isn't always big enough, since it doesn't necessarily | |
2461 | include non-terminals. | |
2462 | (yytranslate): Expand definition of yy_token_number_type, so that | |
2463 | the latter can be removed. | |
2464 | (yy_token_number_type): Remove, only one use. | |
2465 | * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple--- | |
2466 | don't use TokenNumberType as element type. | |
2467 | ||
2468 | * tests/regression.at: Modify expected output to agree with change | |
2469 | to yyr1 and yytranslate. | |
2470 | ||
2471 | 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com> | |
2472 | ||
2473 | * src/reader.c (parse_action): Use copy_character instead of | |
2474 | obstack_1grow. | |
2475 | ||
2476 | 2002-05-13 Akim Demaille <akim@epita.fr> | |
2477 | ||
2478 | * tests/regression.at (Token definitions): Prototype yylex and | |
2479 | yyerror. | |
2480 | ||
2481 | 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2482 | ||
2483 | * src/scan-skel.l: Correct off-by-one error in handling of __oline__. | |
2484 | * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect | |
2485 | 32-bit arithmetic. | |
2486 | * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto. | |
2487 | ||
2488 | 2002-05-07 Akim Demaille <akim@epita.fr> | |
2489 | ||
2490 | * tests/synclines.at: Be sure to prototype yylex and yyerror to | |
2491 | avoid GCC warnings. | |
2492 | ||
2493 | 2002-05-07 Akim Demaille <akim@epita.fr> | |
2494 | ||
2495 | Kill GCC warnings. | |
2496 | ||
2497 | * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop | |
2498 | over the RHS of each rule. | |
2499 | * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int. | |
2500 | * src/state.h (state_t): Member `nitems' is unsigned short. | |
2501 | * src/LR0.c (get_state): Adjust. | |
2502 | * src/reader.c (packgram): Likewise. | |
2503 | * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type | |
2504 | `Type'. | |
2505 | (muscle_insert_int_table): Remove, unused. | |
2506 | (prepare_rules): Remove `max'. | |
2507 | ||
2508 | 2002-05-06 Akim Demaille <akim@epita.fr> | |
2509 | ||
2510 | * src/closure.c (print_firsts): Display of the symbol tags. | |
2511 | (bitmatrix_print): Move to... | |
2512 | * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump): | |
2513 | here. | |
2514 | * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust. | |
2515 | ||
2516 | 2002-05-06 Akim Demaille <akim@epita.fr> | |
2517 | ||
2518 | * src/muscle_tab.c (muscle_m4_output): Must return TRUE for | |
2519 | hash_do_for_each. | |
2520 | ||
2521 | 2002-05-06 Akim Demaille <akim@epita.fr> | |
2522 | ||
2523 | * src/LR0.c (new_state, get_state): Instead of using the global | |
2524 | `kernel_size' and `kernel_base', have two new arguments: | |
2525 | `core_size' and `core'. | |
2526 | Adjust callers. | |
2527 | ||
2528 | 2002-05-06 Akim Demaille <akim@epita.fr> | |
2529 | ||
2530 | * src/reader.c (packgram): No longer end `ritem' with a 0 | |
2531 | sentinel: it is not used. | |
2532 | ||
2533 | 2002-05-05 Akim Demaille <akim@epita.fr> | |
2534 | ||
2535 | New experimental feature: display the lookaheads in the report and | |
2536 | graph. | |
2537 | ||
2538 | * src/print (print_core): When --trace-flag, display the rules | |
2539 | lookaheads. | |
2540 | * src/print_graph.c (print_core): Likewise. | |
2541 | Swap the arguments. | |
2542 | Adjust caller. | |
2543 | ||
2544 | 2002-05-05 Akim Demaille <akim@epita.fr> | |
2545 | ||
2546 | * tests/torture.at (Many lookaheads): New test. | |
2547 | ||
2548 | 2002-05-05 Akim Demaille <akim@epita.fr> | |
2549 | ||
2550 | * src/output.c (GENERATE_OUTPUT_TABLE): Replace with... | |
2551 | (GENERATE_MUSCLE_INSERT_TABLE): this. | |
2552 | (output_int_table, output_unsigned_int_table, output_short_table) | |
2553 | (output_token_number_table, output_item_number_table): Replace with... | |
2554 | (muscle_insert_int_table, muscle_insert_unsigned_int_table) | |
2555 | (muscle_insert_short_table, muscle_insert_token_number_table) | |
2556 | (muscle_insert_item_number_table): these. | |
2557 | Adjust all callers. | |
2558 | (prepare_tokens): Don't free `translations', since... | |
2559 | * src/reader.h, src/reader.c (grammar_free): do it. | |
2560 | Move to... | |
2561 | * src/gram.h, src/gram.c (grammar_free): here. | |
2562 | * data/bison.simple, data/bison.c++: b4_token_number_max is now | |
2563 | b4_translate_max. | |
2564 | ||
2565 | 2002-05-05 Akim Demaille <akim@epita.fr> | |
2566 | ||
2567 | * src/output.c (output_unsigned_int_table): New. | |
2568 | (prepare_rules): `i' is unsigned. | |
2569 | `prhs', `rline', `r2' are unsigned int. | |
2570 | Rename muscle `rhs_number_max' as `rhs_max'. | |
2571 | Output muscles `prhs_max', `rline_max', and `r2_max'. | |
2572 | Free rline and r1. | |
2573 | * data/bison.simple, data/bison.c++: Adjust to use these muscles | |
2574 | to compute types instead of constant types. | |
2575 | * tests/regression.at (Web2c Actions): Adjust. | |
2576 | ||
2577 | 2002-05-04 Akim Demaille <akim@epita.fr> | |
2578 | ||
2579 | * src/symtab.h (SALIAS, SUNDEF): Rename as... | |
2580 | (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these. | |
2581 | Adjust dependencies. | |
2582 | * src/output.c (token_definitions_output): Be sure not to output a | |
2583 | `#define 'a'' when fed with `%token 'a' "a"'. | |
2584 | * tests/regression.at (Token definitions): New. | |
2585 | ||
2586 | 2002-05-03 Paul Eggert <eggert@twinsun.com> | |
2587 | ||
2588 | * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE | |
2589 | for K&R C. | |
2590 | ||
2591 | 2002-05-03 gettextize <bug-gnu-gettext@gnu.org> | |
2592 | ||
2593 | * Makefile.am (SUBDIRS): Remove intl. | |
2594 | (EXTRA_DIST): Add config/config.rpath. | |
2595 | ||
2596 | 2002-05-03 Akim Demaille <akim@epita.fr> | |
2597 | ||
2598 | * data/bison.simple (m4_if): Don't output empty enums. | |
2599 | And actually, output valid enum definitions :(. | |
2600 | ||
2601 | 2002-05-03 Akim Demaille <akim@epita.fr> | |
2602 | ||
2603 | * configure.bat: Remove, completely obsolete. | |
2604 | * Makefile.am (EXTRA_DIST): Adjust. | |
2605 | Don't distribute config.rpath... | |
2606 | * config/Makefile.am (EXTRA_DIST): Do it. | |
2607 | ||
2608 | 2002-05-03 Akim Demaille <akim@epita.fr> | |
2609 | ||
2610 | * configure.in (GETTEXT_VERSION): New. | |
2611 | Suggested by Bruno Haible for the forthcoming Gettext 0.10.3. | |
2612 | ||
2613 | 2002-05-03 Akim Demaille <akim@epita.fr> | |
2614 | ||
2615 | * data/bison.simple (b4_token_enum): New. | |
2616 | (b4_token_defines): Use it to output tokens both as #define and | |
2617 | enums. | |
2618 | Suggested by Paul Eggert. | |
2619 | * src/output.c (token_definitions_output): Don't output spurious | |
2620 | white spaces. | |
2621 | ||
2622 | 2002-05-03 Akim Demaille <akim@epita.fr> | |
2623 | ||
2624 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
2625 | ||
2626 | 2002-05-02 Robert Anisko <robert@lrde.epita.fr> | |
2627 | ||
2628 | * data/bison.c++: Adapt expansion of $s and @s to the C++ parser. | |
2629 | Update the stack class, give a try to deque as the default container. | |
2630 | ||
2631 | 2002-05-02 Akim Demaille <akim@epita.fr> | |
2632 | ||
2633 | * data/bison.simple (yyparse): Do not implement @$ = @1. | |
2634 | (YYLLOC_DEFAULT): Adjust to do it. | |
2635 | * doc/bison.texinfo (Location Default Action): Fix. | |
2636 | ||
2637 | 2002-05-02 Akim Demaille <akim@epita.fr> | |
2638 | ||
2639 | * src/reader.c (parse_braces): Merge into... | |
2640 | (parse_action): this. | |
2641 | ||
2642 | 2002-05-02 Akim Demaille <akim@epita.fr> | |
2643 | ||
2644 | * configure.in (ALL_LINGUAS): Remove. | |
2645 | * po/LINGUAS, hr.po: New. | |
2646 | ||
2647 | 2002-05-02 Akim Demaille <akim@epita.fr> | |
2648 | ||
2649 | Remove the so called hairy (semantic) parsers. | |
2650 | ||
2651 | * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove. | |
2652 | * src/gram.h, src/gram.c (semantic_parser): Remove. | |
2653 | (rule_t): Remove the guard and guard_line members. | |
2654 | * src/lex.h (token_t): remove tok_guard. | |
2655 | * src/options.c (option_table): Remove %guard and %semantic_parser | |
2656 | support. | |
2657 | * src/output.c, src/output.h (guards_output): Remove. | |
2658 | (prepare): Adjust. | |
2659 | (token_definitions_output): Don't output the `T' | |
2660 | tokens (???). | |
2661 | (output_skeleton): Don't output the guards. | |
2662 | * src/files.c, src/files.c (attrsfile): Remove. | |
2663 | * src/reader.c (symbol_list): Remove the guard and guard_line | |
2664 | members. | |
2665 | Adjust dependencies. | |
2666 | (parse_guard): Remove. | |
2667 | * data/bison.hairy: Remove. | |
2668 | * doc/bison.texinfo (Environment Variables): Remove occurrences of | |
2669 | BISON_HAIRY. | |
2670 | ||
2671 | 2002-05-02 Akim Demaille <akim@epita.fr> | |
2672 | ||
2673 | * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action) | |
2674 | (parse_guard): Rename the formal argument `stack_offset' as | |
2675 | `rule_length', which is more readable. | |
2676 | Adjust callers. | |
2677 | (copy_at, copy_dollar): Instead of outputting the hard coded | |
2678 | values of $$, $n and so forth, output invocation to b4_lhs_value, | |
2679 | b4_lhs_location, b4_rhs_value, and b4_rhs_location. | |
2680 | Note: this patch partially drops `semantic-parser' support: it | |
2681 | always does `rule_length - n', where semantic parsers ought to | |
2682 | always use `-n'. | |
2683 | * data/bison.simple, data/bison.c++ (b4_lhs_value) | |
2684 | (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New. | |
2685 | ||
2686 | 2002-05-02 Akim Demaille <akim@epita.fr> | |
2687 | ||
2688 | * configure.in (AC_INIT): Bump to 1.49b. | |
2689 | (AM_INIT_AUTOMAKE): Short invocation. | |
2690 | ||
2691 | 2002-05-02 Akim Demaille <akim@epita.fr> | |
2692 | ||
2693 | Version 1.49a. | |
2694 | ||
2695 | 2002-05-01 Akim Demaille <akim@epita.fr> | |
2696 | ||
2697 | * src/skeleton.h: Remove. | |
2698 | ||
2699 | 2002-05-01 Akim Demaille <akim@epita.fr> | |
2700 | ||
2701 | * src/skeleton.h: Fix the #endif. | |
2702 | Reported by Magnus Fromreide. | |
2703 | ||
2704 | 2002-04-26 Paul Eggert <eggert@twinsun.com> | |
2705 | ||
2706 | * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL): | |
2707 | Define if we define YYSTYPE and YYLTYPE, respectively. | |
2708 | (YYCOPY): Fix [] quoting problem in the non-GCC case. | |
2709 | ||
2710 | 2002-04-25 Robert Anisko <robert@lrde.epita.fr> | |
2711 | ||
2712 | * src/scan-skel.l: Postprocess quadrigraphs. | |
2713 | ||
2714 | * src/reader.c (copy_character): New function, used to output | |
2715 | single characters while replacing `[' and `]' with quadrigraphs, to | |
2716 | avoid troubles with M4 quotes. | |
2717 | (copy_comment): Output characters with copy_character. | |
2718 | (read_additionnal_code): Likewise. | |
2719 | (copy_string2): Likewise. | |
2720 | (copy_definition): Likewise. | |
2721 | ||
2722 | * tests/calc.at: Exercise M4 quoting. | |
2723 | ||
2724 | 2002-04-25 Akim Demaille <akim@epita.fr> | |
2725 | ||
2726 | * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space | |
2727 | between `!' and the command. | |
2728 | Reported by Paul Eggert. | |
2729 | ||
2730 | 2002-04-24 Robert Anisko <robert@lrde.epita.fr> | |
2731 | ||
2732 | * tests/calc.at: Exercise prologue splitting. | |
2733 | ||
2734 | * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and | |
2735 | `b4_post_prologue' instead of `b4_prologue'. | |
2736 | ||
2737 | * src/output.c (prepare): Add the `pre_prologue' and `post_prologue' | |
2738 | muscles. | |
2739 | (output): Free pre_prologue_obstack and post_prologue_obstack. | |
2740 | * src/files.h, src/files.c (attrs_obstack): Remove. | |
2741 | (pre_prologue_obstack, post_prologue_obstack): New. | |
2742 | * src/reader.c (copy_definition): Add a parameter to specify the | |
2743 | obstack to fill, instead of using attrs_obstack unconditionally. | |
2744 | (read_declarations): Pass pre_prologue_obstack to copy_definition if | |
2745 | `%union' has not yet been seen, pass post_prologue_obstack otherwise. | |
2746 | ||
2747 | 2002-04-23 Paul Eggert <eggert@twinsun.com> | |
2748 | ||
2749 | * data/bison.simple: Remove unnecessary commentary and white | |
2750 | space differences from 1_29-branch. | |
2751 | Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE). | |
2752 | ||
2753 | (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY, | |
2754 | YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or | |
2755 | if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial | |
2756 | constructors or destructors. | |
2757 | ||
2758 | (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack. | |
2759 | ||
2760 | 2002-04-23 Akim Demaille <akim@epita.fr> | |
2761 | ||
2762 | * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels. | |
2763 | * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's | |
2764 | location with columns. | |
2765 | * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'. | |
2766 | All reported by Paul Eggert. | |
2767 | ||
2768 | 2002-04-22 Akim Demaille <akim@epita.fr> | |
2769 | ||
2770 | * src/reduce.c (dump_grammar): Move to... | |
2771 | * src/gram.h, src/gram.c (grammar_dump): here. | |
2772 | Be sure to separate long item numbers. | |
2773 | Don't read the members of a rule's prec if its nil. | |
2774 | ||
2775 | 2002-04-22 Akim Demaille <akim@epita.fr> | |
2776 | ||
2777 | * src/output.c (table_size, table_grow): New. | |
2778 | (MAXTABLE): Remove, replace uses with table_size. | |
2779 | (pack_vector): Instead of dying when the table is too big, grow it. | |
2780 | ||
2781 | 2002-04-22 Akim Demaille <akim@epita.fr> | |
2782 | ||
2783 | * data/bison.simple (yyr1): Its type is that of a token number. | |
2784 | * data/bison.c++ (r1_): Likewise. | |
2785 | * tests/regression.at (Web2c Actions): Adjust. | |
2786 | ||
2787 | 2002-04-22 Akim Demaille <akim@epita.fr> | |
2788 | ||
2789 | * src/reader.c (token_translations_init): 256 is now the default | |
2790 | value for the error token, i.e., it will be assigned another | |
2791 | number if the user assigned 256 to one of her tokens. | |
2792 | (reader): Don't force 256 to error. | |
2793 | * doc/bison.texinfo (Symbols): Adjust. | |
2794 | * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR) | |
2795 | (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3 | |
2796 | etc. instead of 10, 20, 30 (which was used to `jump' over error | |
2797 | (256) and undefined (2)). | |
2798 | ||
2799 | 2002-04-22 Akim Demaille <akim@epita.fr> | |
2800 | ||
2801 | Propagate more token_number_t. | |
2802 | ||
2803 | * src/gram.h (token_number_as_item_number) | |
2804 | (item_number_as_token_number): New. | |
2805 | * src/output.c (GENERATE_OUTPUT_TABLE): New. | |
2806 | Use it to create output_item_number_table and | |
2807 | output_token_number_table. | |
2808 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
2809 | * src/lex.c, src/nullable.c, src/output.c, src/print.c, | |
2810 | * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h, | |
2811 | * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts. | |
2812 | ||
2813 | 2002-04-22 Akim Demaille <akim@epita.fr> | |
2814 | ||
2815 | * src/output.h, src/output.c (get_lines_number): Remove. | |
2816 | ||
2817 | 2002-04-19 Akim Demaille <akim@epita.fr> | |
2818 | ||
2819 | * doc/bison.texinfo (Actions): Make clear that `|' is not the same | |
2820 | as Lex/Flex'. | |
2821 | (Debugging): More details about enabling the debugging features. | |
2822 | (Table of Symbols): Describe $$, $n, @$, and @n. | |
2823 | Suggested by Tim Josling. | |
2824 | ||
2825 | 2002-04-19 Akim Demaille <akim@epita.fr> | |
2826 | ||
2827 | * doc/bison.texinfo: Remove the uses of the obsolete @refill. | |
2828 | ||
2829 | 2002-04-10 Akim Demaille <akim@epita.fr> | |
2830 | ||
2831 | * src/system.h: Rely on HAVE_LIMITS_H. | |
2832 | Suggested by Paul Eggert. | |
2833 | ||
2834 | 2002-04-09 Akim Demaille <akim@epita.fr> | |
2835 | ||
2836 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the | |
2837 | full stderr, and strip it according to the bison options, instead | |
2838 | of composing the error message from different bits. | |
2839 | This makes it easier to check for several error messages. | |
2840 | Adjust all the invocations. | |
2841 | Add an invocation exercising the error token. | |
2842 | Add an invocation demonstrating a stupid error message. | |
2843 | (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0. | |
2844 | Adjust the tests. | |
2845 | Error message are for stderr, not stdout. | |
2846 | ||
2847 | 2002-04-09 Akim Demaille <akim@epita.fr> | |
2848 | ||
2849 | * src/gram.h, src/gram.c (error_token_number): Remove, use | |
2850 | errtoken->number. | |
2851 | * src/reader.c (reader): Don't specify the user token number (2) | |
2852 | for $undefined, as it uselessly prevents using it. | |
2853 | * src/gram.h (token_number_t): Move to... | |
2854 | * src/symtab.h: here. | |
2855 | (state_t.number): Is a token_number_t. | |
2856 | * src/print.c, src/reader.c: Use undeftoken->number instead of | |
2857 | hard coded 2. | |
2858 | (Even though this 2 is not the same as above: the number of the | |
2859 | undeftoken remains being 2, it is its user token number which | |
2860 | might not be 2). | |
2861 | * src/output.c (prepare_tokens): Rename the `maxtok' muscle with | |
2862 | `user_token_number_max'. | |
2863 | Output `undef_token_number'. | |
2864 | * data/bison.simple, data/bison.c++: Use them. | |
2865 | Be sure to map invalid yylex return values to | |
2866 | `undef_token_number'. This saves us from gratuitous SEGV. | |
2867 | ||
2868 | * tests/conflicts.at (Solved SR Conflicts) | |
2869 | (Unresolved SR Conflicts): Adjust. | |
2870 | * tests/regression.at (Web2c Actions): Adjust. | |
2871 | ||
2872 | 2002-04-08 Akim Demaille <akim@epita.fr> | |
2873 | ||
2874 | * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/. | |
2875 | Adding #line. | |
2876 | Remove the duplicate `typedefs'. | |
2877 | (RhsNumberType): Fix the declaration and various other typos. | |
2878 | Use __ofile__. | |
2879 | * data/bison.simple: Use __ofile__. | |
2880 | * src/scan-skel.l: Handle __ofile__. | |
2881 | ||
2882 | 2002-04-08 Akim Demaille <akim@epita.fr> | |
2883 | ||
2884 | * src/gram.h (item_number_t): New, the type of item numbers in | |
2885 | RITEM. Note that it must be able to code symbol numbers as | |
2886 | positive number, and the negation of rule numbers as negative | |
2887 | numbers. | |
2888 | Adjust all dependencies (pretty many). | |
2889 | * src/reduce.c (rule): Remove this `short *' pointer: use | |
2890 | item_number_t. | |
2891 | * src/system.h (MINSHORT, MAXSHORT): Remove. | |
2892 | Include `limits.h'. | |
2893 | Adjust dependencies to using SHRT_MAX and SHRT_MIN. | |
2894 | (shortcpy): Remove. | |
2895 | (MAXTABLE): Move to... | |
2896 | * src/output.c (MAXTABLE): here. | |
2897 | (prepare_rules): Use output_int_table to output rhs. | |
2898 | * data/bison.simple, data/bison.c++: Adjust. | |
2899 | * tests/torture.at (Big triangle): Move the limit from 254 to | |
2900 | 500. | |
2901 | * tests/regression.at (Web2c Actions): Ajust. | |
2902 | ||
2903 | Trying with bigger grammars shows various phenomena: at 3000 (28Mb | |
2904 | of grammar file) bison is killed by my system, at 2000 (12Mb) bison | |
2905 | passes, but produces negative #line number, once fixed, GCC is | |
2906 | killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of | |
2907 | C), it passes. | |
2908 | * src/state.h (state_h): Code input lines on ints, not shorts. | |
2909 | ||
2910 | 2002-04-08 Akim Demaille <akim@epita.fr> | |
2911 | ||
2912 | * src/reduce.c (reduce_grammar): First reduce the nonterminals, | |
2913 | and then the grammar. | |
2914 | ||
2915 | 2002-04-08 Akim Demaille <akim@epita.fr> | |
2916 | ||
2917 | * src/system.h: No longer using strndup. | |
2918 | ||
2919 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
2920 | ||
2921 | * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New. | |
2922 | * src/output.c (output_table_data): Return the longest number. | |
2923 | (prepare_tokens): Output `token_number_max'). | |
2924 | * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type): | |
2925 | New. | |
2926 | Use them to define yy_token_number_type/TokenNumberType. | |
2927 | Use this type for yytranslate. | |
2928 | * tests/torture.at (Big triangle): Push the limit from 124 to | |
2929 | 253. | |
2930 | * tests/regression.at (Web2c Actions): Adjust. | |
2931 | ||
2932 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
2933 | ||
2934 | * tests/torture.at (Big triangle): New. | |
2935 | (GNU AWK Grammar, GNU Cim Grammar): Move to... | |
2936 | * tests/existing.at: here. | |
2937 | ||
2938 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
2939 | ||
2940 | * src/gram.h, src/gram.c (nitems): Remove, it is an alias of | |
2941 | nritems. | |
2942 | Adjust dependencies. | |
2943 | ||
2944 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
2945 | ||
2946 | * src/reader.c: Normalize increments to prefix form. | |
2947 | ||
2948 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
2949 | ||
2950 | * src/reader.c, symtab.c: Remove debugging code. | |
2951 | ||
2952 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
2953 | ||
2954 | Rename all the `bucket's as `symbol_t'. | |
2955 | ||
2956 | * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c, | |
2957 | * src/reader.c, src/reader.h, src/reduce.c, src/state.h, | |
2958 | * src/symtab.c, src/symtab.h (bucket): Rename as... | |
2959 | (symbol_t): this. | |
2960 | (symbol_list_new, bucket_check_defined, bucket_make_alias) | |
2961 | (bucket_check_alias_consistence, bucket_pack, bucket_translation) | |
2962 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
2963 | (buckets_new, buckets_free, buckets_do): Rename as... | |
2964 | (symbol_list_new, symbol_check_defined, symbol_make_alias) | |
2965 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
2966 | (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t) | |
2967 | (symbols_new, symbols_free, symbols_do): these. | |
2968 | ||
2969 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
2970 | ||
2971 | Use lib/hash for the symbol table. | |
2972 | ||
2973 | * src/gram.c (ntokens): Initialize to 1, to reserve a slot for | |
2974 | EOF. | |
2975 | * src/lex.c (lex): Set the `number' member of new terminals. | |
2976 | * src/reader.c (bucket_check_defined, bucket_make_alias) | |
2977 | (bucket_check_alias_consistence, bucket_translation): New. | |
2978 | (reader, grammar_free, readgram, token_translations_init) | |
2979 | (packsymbols): Adjust. | |
2980 | (reader): Number the predefined tokens. | |
2981 | * src/reduce.c (inaccessable_symbols): Just use hard coded numbers | |
2982 | for predefined tokens. | |
2983 | * src/symtab.h (bucket): Remove all the hash table related | |
2984 | members. | |
2985 | * src/symtab.c (symtab): Replace by... | |
2986 | (bucket_table): this. | |
2987 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
2988 | (buckets_new, buckets_do): New. | |
2989 | ||
2990 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
2991 | ||
2992 | * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems) | |
2993 | (start_symbol, max_user_token_number, semantic_parser) | |
2994 | (error_token_number): Initialize. | |
2995 | * src/reader.c (grammar, start_flag, startval, typed, lastprec): | |
2996 | Initialize. | |
2997 | (reader): Don't. | |
2998 | (errtoken, eoftoken, undeftoken, axiom): Extern. | |
2999 | ||
3000 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3001 | ||
3002 | * src/gram.h (rule_s): prec and precsym are now pointers | |
3003 | to the bucket giving the priority/associativity. | |
3004 | Member `associativity' removed: useless. | |
3005 | * src/reduce.c, src/conflicts.c: Adjust. | |
3006 | ||
3007 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3008 | ||
3009 | * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c: | |
3010 | Properly escape the symbols' TAG when outputting them. | |
3011 | ||
3012 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3013 | ||
3014 | * src/lalr.h (LA): Is a bitsetv, not bitset*. | |
3015 | ||
3016 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3017 | ||
3018 | * src/lalr.h, src/lalr.c (LAruleno): Replace with... | |
3019 | (LArule): this, which is an array to rule_t*. | |
3020 | * src/print.c, src/conflicts.c: Adjust. | |
3021 | ||
3022 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3023 | ||
3024 | * src/gram.h (rule_t): Rename `number' as `user_number'. | |
3025 | `number' is a new member. | |
3026 | Adjust dependencies. | |
3027 | * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number. | |
3028 | ||
3029 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3030 | ||
3031 | As a result of the previous patch, it is no longer needed | |
3032 | to reorder ritem itself. | |
3033 | ||
3034 | * src/reduce.c (reduce_grammar_tables): Don't sort RITEM. | |
3035 | ||
3036 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3037 | ||
3038 | Be sure never to walk through RITEMS, but use only data related to | |
3039 | the rules themselves. RITEMS should be banished. | |
3040 | ||
3041 | * src/output.c (output_token_translations): Rename as... | |
3042 | (prepare_tokens): this. | |
3043 | In addition to `translate', prepare the muscles `tname' and | |
3044 | `toknum', which were handled by... | |
3045 | (output_rule_data): this. | |
3046 | Remove, and move the remainder of its outputs into... | |
3047 | (prepare_rules): this new routines, which also merges content from | |
3048 | (output_gram): this. | |
3049 | (prepare_rules): Be sure never to walk through RITEMS. | |
3050 | (output_stos): Rename as... | |
3051 | (prepare_stos): this. | |
3052 | (output): Always invoke prepare_states, after all, just don't use it | |
3053 | in the output if you don't need it. | |
3054 | ||
3055 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3056 | ||
3057 | * src/LR0.c (new_state): Display `nstates' as the name of the | |
3058 | newly created state. | |
3059 | Adjust to initialize first_state and last_state if needed. | |
3060 | Be sure to distinguish the initial from the final state. | |
3061 | (new_states): Create the itemset of the initial state, and use | |
3062 | new_state. | |
3063 | * src/closure.c (closure): Now that the initial state has its | |
3064 | items properly set, there is no need for a special case when | |
3065 | creating `ruleset'. | |
3066 | ||
3067 | As a result, now the rule 0, reducing to $axiom, is visible in the | |
3068 | outputs. Adjust the test suite. | |
3069 | ||
3070 | * tests/conflicts.at (Solved SR Conflicts) | |
3071 | (Unresolved SR Conflicts): Adjust. | |
3072 | * tests/regression.at (Web2c Report, Rule Line Numbers): Idem. | |
3073 | * tests/conflicts.at (S/R in initial): New. | |
3074 | ||
3075 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3076 | ||
3077 | * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over | |
3078 | the RHS of the rules. | |
3079 | * src/output.c (output_gram): Likewise. | |
3080 | ||
3081 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3082 | ||
3083 | * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's | |
3084 | bucket. | |
3085 | Adjust all dependencies. | |
3086 | * src/reduce.c (nonterminals_reduce): Don't forget to renumber the | |
3087 | `number' of the buckets too. | |
3088 | * src/gram.h: Include `symtab.h'. | |
3089 | (associativity): Move to... | |
3090 | * src/symtab.h: here. | |
3091 | No longer include `gram.h'. | |
3092 | ||
3093 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3094 | ||
3095 | * src/gram.h, src/gram.c (rules_rhs_length): New. | |
3096 | (ritem_longest_rhs): Use it. | |
3097 | * src/gram.h (rule_t): `number' is a new member. | |
3098 | * src/reader.c (packgram): Set it. | |
3099 | * src/reduce.c (reduce_grammar_tables): Move the useless rules at | |
3100 | the end of `rules', and count them out of `nrules'. | |
3101 | (reduce_output, dump_grammar): Adjust. | |
3102 | * src/print.c (print_grammar): It is no longer needed to check for | |
3103 | the usefulness of a rule, as useless rules are beyond `nrules + 1'. | |
3104 | * tests/reduce.at (Reduced Automaton): New test. | |
3105 | ||
3106 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3107 | ||
3108 | * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a | |
3109 | lacking `+ 1' to nrules, Bison reported as useless a token if it | |
3110 | was used solely to set the precedence of the last rule... | |
3111 | ||
3112 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3113 | ||
3114 | * data/bison.c++, data/bison.simple: Don't output the current file | |
3115 | name in #line, to avoid useless diffs between two identical | |
3116 | outputs under different names. | |
3117 | ||
3118 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3119 | ||
3120 | * src/closure.c, src/print.c, src/reader.c, src/reduce.c: | |
3121 | Normalize loops to using `< nrules + 1', not `<= nrules'. | |
3122 | ||
3123 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3124 | ||
3125 | * TODO: Update. | |
3126 | ||
3127 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3128 | ||
3129 | * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename | |
3130 | bucket.value as bucket.number. | |
3131 | ||
3132 | 2002-04-07 Akim Demaille <akim@epita.fr> | |
3133 | ||
3134 | * src/closure.c, src/derives.c, src/gram.h, src/lalr.c, | |
3135 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
3136 | * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the | |
3137 | RHS, instead of being an index in RITEMS. | |
3138 | ||
3139 | 2002-04-04 Paul Eggert <eggert@twinsun.com> | |
3140 | ||
3141 | * doc/bison.texinfo: Update copyright date. | |
3142 | (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII. | |
3143 | (Symbols): Warn about running Bison in one character set, | |
3144 | but compiling and/or running in an incompatible one. | |
3145 | Warn about character code 256, too. | |
3146 | ||
3147 | 2002-04-03 Paul Eggert <eggert@twinsun.com> | |
3148 | ||
3149 | * src/bison.data (YYSTACK_ALLOC): Depend on whether | |
3150 | YYERROR_VERBOSE is nonzero, not whether it is defined. | |
3151 | ||
3152 | Merge changes from bison-1_29-branch. | |
3153 | ||
3154 | 2002-03-20 Paul Eggert <eggert@twinsun.com> | |
3155 | ||
3156 | Merge fixes from Debian bison_1.34-1.diff. | |
3157 | ||
3158 | * configure.in (AC_PREREQ): 2.53. | |
3159 | ||
3160 | 2002-03-20 Akim Demaille <akim@epita.fr> | |
3161 | ||
3162 | * src/conflicts.c (log_resolution): Argument `resolution' is const. | |
3163 | ||
3164 | 2002-03-19 Paul Eggert <eggert@twinsun.com> | |
3165 | ||
3166 | * src/bison.simple (YYCOPY): New macro. | |
3167 | (YYSTACK_RELOCATE): Use it. | |
3168 | Remove Type arg; no longer needed. All callers changed. | |
3169 | (yymemcpy): Remove; no longer needed. | |
3170 | ||
3171 | * Makefile.am (AUTOMAKE_OPTIONS): 1.6. | |
3172 | * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
3173 | ||
3174 | 2002-03-19 Akim Demaille <akim@epita.fr> | |
3175 | ||
3176 | Test and fix the #line outputs. | |
3177 | ||
3178 | * tests/atlocal.at (GCC): New. | |
3179 | * tests/synclines.at (AT_TEST_SYNCLINE): New macro. | |
3180 | (Prologue synch line, ,%union synch line, Postprologue synch line) | |
3181 | (Action synch line, Epilogue synch line): New tests. | |
3182 | * src/reader.c (parse_union_decl): Define the muscle stype_line. | |
3183 | * data/bison.simple, data/bison.c++: Use it. | |
3184 | ||
3185 | 2002-03-19 Akim Demaille <akim@epita.fr> | |
3186 | ||
3187 | * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts) | |
3188 | (Solved SR Conflicts, %expect not enough, %expect right) | |
3189 | (%expect too much): Move to... | |
3190 | * tests/conflicts.at: this new file. | |
3191 | ||
3192 | 2002-03-19 Akim Demaille <akim@epita.fr> | |
3193 | ||
3194 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
3195 | * data/bison.simple, data/bison.c++: Handle the `#define' part, so | |
3196 | that we can move to enums for instance. | |
3197 | * src/output.c (token_definitions_output): Output a list of | |
3198 | `token-name, token-number' instead of the #define. | |
3199 | (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'. | |
3200 | ||
3201 | 2002-03-14 Akim Demaille <akim@epita.fr> | |
3202 | ||
3203 | Use Gettext 0.11.1. | |
3204 | ||
3205 | 2002-03-09 Robert Anisko <robert@lrde.epita.fr> | |
3206 | ||
3207 | * data/bison.c++: Make the user able to add members to the generated | |
3208 | parser by subclassing. | |
3209 | ||
3210 | 2002-03-05 Robert Anisko <robert@lrde.epita.fr> | |
3211 | ||
3212 | * src/reader.c (read_additionnal_code): `c' should be an integer, not | |
3213 | a character. | |
3214 | Reported by Nicolas Tisserand and Nicolas Burrus. | |
3215 | ||
3216 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> | |
3217 | ||
3218 | * src/reader.c: Warn about lacking semi-colons, do not complain. | |
3219 | ||
3220 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> | |
3221 | ||
3222 | * data/bison.c++: Remove a debug line. | |
3223 | ||
3224 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> | |
3225 | ||
3226 | * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge | |
3227 | location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and | |
3228 | provide a default implementation. | |
3229 | ||
3230 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3231 | ||
3232 | * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'. | |
3233 | * tests/output.at (AT_CHECK_OUTPUT): Likewise. | |
3234 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto. | |
3235 | * tests/semantic.at (Parsing Guards): Similarly. | |
3236 | * src/reader.at (readgram): Complain if the last rule is not ended | |
3237 | with a semi-colon. | |
3238 | ||
3239 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3240 | ||
3241 | * src/warshall.h, src/warshall.c (bitmatrix_print): Move to... | |
3242 | * src/closure.c: here. | |
3243 | (set_firsts): Use bitsetv_reflexive_transitive_closure instead of | |
3244 | RTC. | |
3245 | * src/warshall.h, src/warshall.c: Remove. | |
3246 | * tests/sets.at (Broken Closure): Adjust. | |
3247 | ||
3248 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3249 | ||
3250 | * src/output.c (output_skeleton): tempdir is const. | |
3251 | bytes_read is unused. | |
3252 | ||
3253 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3254 | ||
3255 | * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
3256 | * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c: | |
3257 | Update. | |
3258 | From Michael Hayes. | |
3259 | ||
3260 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3261 | ||
3262 | * src/closure.c (closure): `r' is unused. | |
3263 | ||
3264 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3265 | ||
3266 | * tests/sets.at (Broken Closure): Add the ending `;'. | |
3267 | * src/reader.at (readgram): Complain if a rule is not ended with a | |
3268 | semi-colon. | |
3269 | ||
3270 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3271 | ||
3272 | * src/conflicts.c (set_conflicts): Use bitset_disjoint_p. | |
3273 | (count_sr_conflicts): Use bitset_count. | |
3274 | * src/reduce.c (inaccessable_symbols): Ditto. | |
3275 | (bits_size): Remove. | |
3276 | * src/warshall.h, src/warshall.c: Convert to bitsetv. | |
3277 | ||
3278 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3279 | ||
3280 | * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c, | |
3281 | * src/reduce.c: Remove the `bitset_zero's following the | |
3282 | `bitset_create's, as now it is performed by the latter. | |
3283 | ||
3284 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3285 | ||
3286 | * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h, | |
3287 | * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h, | |
3288 | * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the | |
3289 | latest sources from Michael. | |
3290 | ||
3291 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3292 | ||
3293 | * src/output.c (output): Don't free the grammar. | |
3294 | * src/reader.c (grammar_free): New. | |
3295 | * src/main.c (main): Call it and don't free symtab here. | |
3296 | ||
3297 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3298 | ||
3299 | * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer | |
3300 | before returning. | |
3301 | Reported by Benoit Perrot. | |
3302 | ||
3303 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3304 | ||
3305 | Use bitset operations when possible, not loops over bits. | |
3306 | ||
3307 | * src/conflicts.c (set_conflicts, count_sr_conflicts): Use | |
3308 | bitset_or. | |
3309 | * src/print.c (print_reductions): Use bitset_and, bitset_andn. | |
3310 | * src/reduce.c (useless_nonterminals): Formatting changes. | |
3311 | * src/warshall.c (TC): Use bitset_or. | |
3312 | ||
3313 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3314 | ||
3315 | * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused. | |
3316 | * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET): | |
3317 | Ditto. | |
3318 | ||
3319 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3320 | ||
3321 | * src/lalr.c (F): Now a bitset*. | |
3322 | Adjust all dependencies. | |
3323 | ||
3324 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3325 | ||
3326 | * src/conflicts.c (shiftset, lookaheadset): Now bitset. | |
3327 | Adjust all dependencies. | |
3328 | ||
3329 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3330 | ||
3331 | * src/L0.c, src/LR0.h (nstates): Be size_t. | |
3332 | Adjust comparisons (signed vs unsigned). | |
3333 | * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a | |
3334 | bitset*. | |
3335 | Adjust all dependencies. | |
3336 | ||
3337 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3338 | ||
3339 | * src/closure.c (firsts): Now, also a bitset. | |
3340 | Adjust all dependencies. | |
3341 | (varsetsize): Remove, now unused. | |
3342 | * src/warshall.h, src/warshall.c: Now work on arrays of bitsets. | |
3343 | ||
3344 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3345 | ||
3346 | * src/print.c: Convert to use bitset.h, not hand coded iterations | |
3347 | over ints. | |
3348 | ||
3349 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3350 | ||
3351 | * src/reduce.c: Convert to use bitset.h, not hand coded BSet. | |
3352 | ||
3353 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3354 | ||
3355 | * src/closure.c (ruleset): Be a bitset. | |
3356 | (rulesetsize): Remove. | |
3357 | ||
3358 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
3359 | ||
3360 | * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
3361 | * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, | |
3362 | * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New. | |
3363 | * src/closure.c (fderives): Be an array of bitsets. | |
3364 | ||
3365 | 2002-02-28 Robert Anisko <robert@lrde.epita.fr> | |
3366 | ||
3367 | * data/bison.c++: Merge the two generated headers. Insert a copyright | |
3368 | notice in each output file. | |
3369 | ||
3370 | 2002-02-28 Akim Demaille <akim@epita.fr> | |
3371 | ||
3372 | * data/bison.c++: Copy the prologue of bison.simple to fetch | |
3373 | useful M4 definitions, such as b4_header_guard. | |
3374 | ||
3375 | 2002-02-25 Akim Demaille <akim@epita.fr> | |
3376 | ||
3377 | * src/getargs.c (version): Give the name of the authors, and use a | |
3378 | translator friendly scheme for the bgr | |
3379 | copyright notice. | |
3380 | ||
3381 | 2002-02-25 Akim Demaille <akim@epita.fr> | |
3382 | ||
3383 | * src/output.c (header_output): Remove, now handled completely via | |
3384 | M4. | |
3385 | ||
3386 | 2002-02-25 Akim Demaille <akim@epita.fr> | |
3387 | ||
3388 | * m4/m4.m4: New, from CVS Autoconf. | |
3389 | * configure.in: Invoke it. | |
3390 | * src/output.c (output_skeleton): Use its result instead of the | |
3391 | hard coded name. | |
3392 | ||
3393 | 2002-02-25 Akim Demaille <akim@epita.fr> | |
3394 | ||
3395 | * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from | |
3396 | Fileutils 4.1.5. | |
3397 | * configure.in: Invoke UTILS_FUNC_MKSTEMP. | |
3398 | * src/output.c (output_skeleton): Use mkstemp to create a real | |
3399 | temporary file. | |
3400 | Move the filling of `skeleton' and its muscle to... | |
3401 | (prepare): here. | |
3402 | (output): Move the definition of the prologue muscle to... | |
3403 | (prepare): here. | |
3404 | * src/system.h (DEFAULT_TMPDIR): New. | |
3405 | ||
3406 | 2002-02-14 Paul Eggert <eggert@twinsun.com> | |
3407 | ||
3408 | Remove the support for C++ namespace cleanliness; it was | |
3409 | causing more problems than it was curing, since it didn't work | |
3410 | properly on some nonstandard C++ compilers. This can wait | |
3411 | for a proper C++ parser. | |
3412 | ||
3413 | * NEWS: Document this. | |
3414 | * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention | |
3415 | of C++, as it's treated like C now. | |
3416 | * src/bison.simple (YYSTD): Remove. | |
3417 | (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL): | |
3418 | Treat C++ just like Standard C instead of trying to support | |
3419 | namespace cleanliness. | |
3420 | ||
3421 | 2002-02-14 Akim Demaille <akim@epita.fr> | |
3422 | ||
3423 | * tests/regression.at (else): Adjust to Andreas' change. | |
3424 | ||
3425 | 2002-02-14 Akim Demaille <akim@epita.fr> | |
3426 | ||
3427 | * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. | |
3428 | ||
3429 | 2002-02-13 Andreas Schwab <schwab@suse.de> | |
3430 | ||
3431 | * src/output.c (output_rule_data): Don't output NULL, it might | |
3432 | not be defined yet. | |
3433 | ||
3434 | 2002-02-11 Robert Anisko <robert@lrde.epita.fr> | |
3435 | ||
3436 | * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue. | |
3437 | (Copyright notice): Update. | |
3438 | ||
3439 | 2002-02-11 Akim Demaille <akim@epita.fr> | |
3440 | ||
3441 | * tests/regression.at (%nonassoc and eof): Don't include | |
3442 | nonportable headers. | |
3443 | ||
3444 | 2002-02-08 Robert Anisko <robert@lrde.epita.fr> | |
3445 | ||
3446 | * data/bison.c++: Correct error recovery. Make the user able to | |
3447 | initialize the starting location. | |
3448 | ||
3449 | 2002-02-07 Akim Demaille <akim@epita.fr> | |
3450 | ||
3451 | * tests/input.at: New. | |
3452 | ||
3453 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> | |
3454 | ||
3455 | * data/bison.c++: Replace some direct m4 expansions by constants. Be | |
3456 | more consistent when naming methods and variables. Put preprocessor | |
3457 | directives around tables only needed for debugging. | |
3458 | ||
3459 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> | |
3460 | ||
3461 | * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in | |
3462 | C++ parsers. | |
3463 | (yy::b4_name::parse): Use print_. | |
3464 | ||
3465 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> | |
3466 | ||
3467 | * data/bison.c++ (yy::b4_name::parse): Error recovery is back. | |
3468 | ||
3469 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> | |
3470 | ||
3471 | * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in | |
3472 | C++ parsers. | |
3473 | (yy::b4_name::parse): Build verbose error messages, and use error_. | |
3474 | ||
3475 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> | |
3476 | ||
3477 | * data/bison.c++: Fix m4 quoting in comments. | |
3478 | ||
3479 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> | |
3480 | ||
3481 | * data/bison.c++: Adjust the parser code. Fix some muscles that were | |
3482 | not expanded by m4. | |
3483 | ||
3484 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
3485 | ||
3486 | * data/bison.c++: Adjust to the M4 back end. | |
3487 | More is certainly needed. | |
3488 | ||
3489 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
3490 | ||
3491 | Give a try to M4 as a back end. | |
3492 | ||
3493 | * lib/readpipe.c: New, from wdiff. | |
3494 | * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and | |
3495 | BISON_HAIRY. | |
3496 | * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS | |
3497 | specific values. Now it is m4 that performs the lookup. | |
3498 | * src/parse-skel.y: Remove. | |
3499 | * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New. | |
3500 | * src/output.c (actions_output, guards_output) | |
3501 | (token_definitions_output): No longer keeps track of the output | |
3502 | line number, hence remove the second argument. | |
3503 | (guards_output): Check against the guard member of a rule, not the | |
3504 | action member. | |
3505 | Adjust callers. | |
3506 | (output_skeleton): Don't look for the skeleton location, let m4 do | |
3507 | that. | |
3508 | Create `/tmp/muscles.m4'. This is temporary, a proper temporary | |
3509 | file will be used. | |
3510 | Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton. | |
3511 | (prepare): Given that for the time being changesyntax is not | |
3512 | usable in M4, rename the muscles using `-' to `_'. | |
3513 | Define `defines_flag', `output_parser_name' and `output_header_name'. | |
3514 | * src/output.h (actions_output, guards_output) | |
3515 | (token_definitions_output): Adjust prototypes. | |
3516 | * src/scan-skel.l: Instead of scanning the skeletons, it now | |
3517 | processes the output of m4: `__oline__' and `#output'. | |
3518 | * data/bison.simple: Adjust to be used by M4(sugar). | |
3519 | * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up | |
3520 | to date. | |
3521 | * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR' | |
3522 | instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'. | |
3523 | * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New, | |
3524 | shamelessly stolen from CVS Autoconf. | |
3525 | ||
3526 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
3527 | ||
3528 | * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version. | |
3529 | * configure.in: Check for the declarations of free and malloc. | |
3530 | * src/muscle_tab.c: Adjust. | |
3531 | ||
3532 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
3533 | ||
3534 | * src/muscle_tab.c (muscle_init): Don't default to NULL muscle | |
3535 | which have no values. | |
3536 | ||
3537 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
3538 | ||
3539 | * src/bison.simple, src/bison.hairy, src/bison.c++: Move to... | |
3540 | * data/: here. | |
3541 | ||
3542 | 2002-01-29 Paul Eggert <eggert@twinsun.com> | |
3543 | ||
3544 | * src/bison.simple (YYSIZE_T): Do not define merely because | |
3545 | YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined. | |
3546 | On some platforms, <alloca.h> does not declare YYSTD (size_t). | |
3547 | ||
3548 | 2002-01-27 Akim Demaille <akim@epita.fr> | |
3549 | ||
3550 | Fix `%nonassoc and eof'. | |
3551 | ||
3552 | * src/state.c (errs_dup): Aaaah! The failure was due to bytes | |
3553 | which were not properly copied! Replace | |
3554 | memcpy (res->errs, src->errs, src->nerrs); | |
3555 | with | |
3556 | memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); | |
3557 | !!! | |
3558 | * tests/regression.at (%nonassoc and eof): Adjust to newest | |
3559 | Autotest: `.' is not in the PATH. | |
3560 | ||
3561 | 2002-01-27 Akim Demaille <akim@epita.fr> | |
3562 | ||
3563 | * tests/sets.at (AT_EXTRACT_SETS): New. | |
3564 | (Nullable): Use it. | |
3565 | (Firsts): New. | |
3566 | ||
3567 | 2002-01-26 Akim Demaille <akim@epita.fr> | |
3568 | ||
3569 | * tests/actions.at, tests/calc.at, tests/headers.at, | |
3570 | * tests/torture.at: Adjust to the newest Autotest which no longer | |
3571 | forces `.' in the PATH. | |
3572 | ||
3573 | 2002-01-25 Akim Demaille <akim@epita.fr> | |
3574 | ||
3575 | * tests/regression.at (%nonassoc and eof): New. | |
3576 | Suggested by Robert Anisko. | |
3577 | ||
3578 | 2002-01-24 Akim Demaille <akim@epita.fr> | |
3579 | ||
3580 | Bison dumps core when trying to complain about broken input files. | |
3581 | Reported by Cris van Pelt. | |
3582 | ||
3583 | * src/lex.c (parse_percent_token): Be sure to set token_buffer. | |
3584 | * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge | |
3585 | into... | |
3586 | (Invalid inputs): Strengthen: exercise parse_percent_token. | |
3587 | ||
3588 | 2002-01-24 Robert Anisko <robert.anisko@epita.fr> | |
3589 | ||
3590 | * src/Makefile.am: Add bison.c++. | |
3591 | * src/bison.c++: New skeleton. | |
3592 | ||
3593 | 2002-01-21 Paolo Bonzini <bonzini@gnu.org> | |
3594 | ||
3595 | * po/it.po: New. | |
3596 | ||
3597 | 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net> | |
3598 | ||
3599 | * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. | |
3600 | ||
3601 | 2002-01-20 Marc Autret <marc@gnu.org> | |
3602 | ||
3603 | * src/files.c (compute_output_file_names): Fix | |
3604 | ||
3605 | 2002-01-20 Marc Autret <marc@gnu.org> | |
3606 | ||
3607 | * tests/output.at: New test. | |
3608 | * src/files.c (compute_base_names): Don't map extensions when | |
3609 | the YACC flag is set, use defaults. | |
3610 | Reported by Evgeny Stambulchik. | |
3611 | ||
3612 | 2002-01-20 Marc Autret <marc@gnu.org> | |
3613 | ||
3614 | * src/system.h: Need to define __attribute__ away for non-GCC | |
3615 | compilers as well (i.e. the vendor C compiler). | |
3616 | Suggested by Albert Chin-A-Young. | |
3617 | ||
3618 | 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be> | |
3619 | ||
3620 | * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the | |
3621 | canonical definition. | |
3622 | * src/system.h: Use the canonical definition for PARAMS (avoids | |
3623 | a conflict with the macro from lib/hash.h). | |
3624 | ||
3625 | 2002-01-11 Akim Demaille <akim@epita.fr> | |
3626 | ||
3627 | * configure.in: Use AC_FUNC_STRNLEN. | |
3628 | Fixes the failures observed on AIX 4.3 by H.Merijn Brand. | |
3629 | ||
3630 | 2002-01-09 Akim Demaille <akim@epita.fr> | |
3631 | ||
3632 | * src/files.c, src/files.h (output_infix): New. | |
3633 | (tab_extension): Remove. | |
3634 | (compute_base_names): Compute the former, drop the latter. | |
3635 | * src/output.c (prepare): Insert the muscles `output-infix', and | |
3636 | `output-suffix'. | |
3637 | * src/parse-skel.y (string, string.1): New. | |
3638 | (section.header): Use it. | |
3639 | (section.yacc): Remove. | |
3640 | (prefix): Remove too. | |
3641 | * src/scan-skel.l: Adjust. | |
3642 | * src/bison.simple, src/bison.hairy: Adjust. | |
3643 | ||
3644 | 2002-01-09 Akim Demaille <akim@epita.fr> | |
3645 | ||
3646 | * configure.in (WERROR_CFLAGS): Compute it. | |
3647 | * src/Makefile.am (CFLAGS): Pass it. | |
3648 | * tests/atlocal.in (CFLAGS): Idem. | |
3649 | * src/files.c: Fix a few warnings. | |
3650 | (get_extension_index): Remove, unused. | |
3651 | ||
3652 | 2002-01-08 Akim Demaille <akim@epita.fr> | |
3653 | ||
3654 | * src/getargs.c (AS_FILE_NAME): New. | |
3655 | (getargs): Use it to convert DOSish file names. | |
3656 | * src/files.c (base_name): Rename as full_base_name to avoid | |
3657 | clashes with `base_name ()'. | |
3658 | (filename_split): New. | |
3659 | (compute_base_names): N-th rewrite, using filename_split. | |
3660 | ||
3661 | 2002-01-08 Akim Demaille <akim@epita.fr> | |
3662 | ||
3663 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
3664 | New, stolen from the Fileutils 4.1. | |
3665 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
3666 | * configure.in: Check for the presence of memrchr, and of its | |
3667 | prototype. | |
3668 | ||
3669 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> | |
3670 | ||
3671 | * lib/hash.h (__P): Added definition for this macro. | |
3672 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
3673 | BUILT_SOURCES, to ensure they are generated first. | |
3674 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
3675 | %error-verbose to allow bootstrapping with bison 1.30x. | |
3676 | ||
3677 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
3678 | ||
3679 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
3680 | convention is to fetch on entry. | |
3681 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
3682 | 'switch' without a following semicolon. | |
3683 | * tests/regression.at (braces parsing): New. | |
3684 | ||
3685 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
3686 | ||
3687 | Bison is dead wrong in its RR conflict reports. | |
3688 | ||
3689 | * tests/torture.at (GNU Cim Grammar): New. | |
3690 | * src/conflicts.c (count_rr_conflicts): Fix. | |
3691 | ||
3692 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
3693 | ||
3694 | Creating package.m4 from configure.ac causes too many problems. | |
3695 | ||
3696 | * tests/Makefile.am (package.m4): Create it by hand, | |
3697 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
3698 | ||
3699 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
3700 | ||
3701 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
3702 | skeleton.h. | |
3703 | ||
3704 | 2002-01-04 Paul Eggert <eggert@twinsun.com> | |
3705 | ||
3706 | * doc/bison.texinfo (Debugging): | |
3707 | Remove YYSTDERR; it's no longer defined or used. | |
3708 | Also, s/cstdio.h/cstdio/. | |
3709 | ||
3710 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
3711 | ||
3712 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
3713 | ||
3714 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
3715 | ||
3716 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
3717 | tracing code to --trace, wait for a better --trace option, with | |
3718 | args. | |
3719 | ||
3720 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
3721 | ||
3722 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
3723 | The ISO C++ standard is extremely clear about it: stderr is | |
3724 | considered a macro, not a regular symbol (see table 94 `Header | |
3725 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
3726 | Therefore std:: does not apply to it. It still does with fprintf. | |
3727 | Also, s/cstdio.h/cstdio/. | |
3728 | ||
3729 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
3730 | ||
3731 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
3732 | for non system headers. | |
3733 | ||
3734 | 2002-01-02 Akim Demaille <akim@epita.fr> | |
3735 | ||
3736 | Equip the skeleton chain with location tracking, runtime trace, | |
3737 | pure parser and scanner. | |
3738 | ||
3739 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
3740 | renaming. | |
3741 | (%union): Having several members with the same type does not help | |
3742 | type mismatches, simplify. | |
3743 | (YYPRINT, yyprint): New. | |
3744 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
3745 | (skel_error): this. | |
3746 | Handle locations. | |
3747 | * src/scan-skel.l: Adjust to these changes. | |
3748 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
3749 | (LOCATION_PRINT, skel_control_t): New. | |
3750 | ||
3751 | 2001-12-30 Akim Demaille <akim@epita.fr> | |
3752 | ||
3753 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
3754 | replace `gb' with BLANKS. | |
3755 | * src/scan-skel.l: Adjust. | |
3756 | ||
3757 | 2001-12-30 Akim Demaille <akim@epita.fr> | |
3758 | ||
3759 | * src/system.h: We don't need nor want bcopy. | |
3760 | Throw away MS-DOS crap: we don't need getpid. | |
3761 | * configure.in: We don't need strndup. It was even causing | |
3762 | problems: because Flex includes the headers *before* us, | |
3763 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
3764 | not visible. | |
3765 | * lib/xstrndup.c: New. | |
3766 | * src/scan-skel.l: Use it. | |
3767 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
3768 | * src/parse-skel.y: Use %directives instead of #defines. | |
3769 | ||
3770 | 2001-12-30 Akim Demaille <akim@epita.fr> | |
3771 | ||
3772 | * src/skeleton.h: New. | |
3773 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
3774 | code. | |
3775 | * src/output.h (get_lines_number, actions_output, guards_output) | |
3776 | (token_definitions_output): Prototype them. | |
3777 | * src/parse-skel.y: Add the license notice. | |
3778 | Include output.h and skeleton.h. | |
3779 | (process_skeleton): Returns void, and takes a single parameter. | |
3780 | * src/scan-skel.l: Add the license notice. | |
3781 | Include skeleton.h. | |
3782 | Don't use %option yylineno: it seems that then Flex imagines | |
3783 | REJECT has been used, and therefore it won't reallocate its | |
3784 | buffers (which makes no other sense to me than a bug). It results | |
3785 | in warnings for `unused: yy_flex_realloc'. | |
3786 | ||
3787 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> | |
3788 | ||
3789 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
3790 | (MUSCLE_INSERT_PREFIX): ...to there. | |
3791 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
3792 | (MUSCLE_INSERT_PREFIX): Move from here... | |
3793 | ||
3794 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
3795 | names. This parser skeleton is still broken, but Bison should not | |
3796 | choke on a bad muscle 'syntax'. | |
3797 | * src/bison.simple: Add a section directive. Put braces around muscle | |
3798 | names. | |
3799 | ||
3800 | * src/files.h (strsuffix, stringappend): Add declarations. | |
3801 | (tab_extension): Add declaration. | |
3802 | (short_base_name): Add declaration. | |
3803 | ||
3804 | * src/files.c (strsuffix, stringappend): No longer static. These | |
3805 | functions are used in the skeleton parser. | |
3806 | (tab_extension): New. | |
3807 | (compute_base_names): Use the computations done in this function | |
3808 | to guess if the generated parsers should have '.tab' in their | |
3809 | names. | |
3810 | (short_base_name): No longer static. | |
3811 | ||
3812 | * src/output.c (output_skeleton): New. | |
3813 | (output): Disable call to output_master_parser, and give a try to | |
3814 | a new skeleton handling system. | |
3815 | (guards_output, actions_output): No longer static. | |
3816 | (token_definitions_output, get_lines_number): No longer static. | |
3817 | ||
3818 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
3819 | ||
3820 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and | |
3821 | parse-skel.y. | |
3822 | ||
3823 | * src/parse-skel.y: New file. | |
3824 | * src/scan-skel.l: New file. | |
3825 | ||
3826 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3827 | ||
3828 | %name-prefix is broken. | |
3829 | ||
3830 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
3831 | Adjust all dependencies. | |
3832 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
3833 | %name-prefix. | |
3834 | ||
3835 | Renaming yylval but not yylloc is not consistent. Now we do. | |
3836 | ||
3837 | * src/bison.simple: Prefix yylloc if used. | |
3838 | * doc/bison.texinfo (Decl Summary): Document that. | |
3839 | ||
3840 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3841 | ||
3842 | * doc/bison.texinfo: Promote `%long-directive' over | |
3843 | `%long_directive'. | |
3844 | Remove all references to fixed-output-files, yacc is enough. | |
3845 | ||
3846 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3847 | ||
3848 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
3849 | user prologue. These are defaults. | |
3850 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
3851 | define YYDEBUG and YYERROR_VERBOSE. | |
3852 | ||
3853 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3854 | ||
3855 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
3856 | yylloc. | |
3857 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
3858 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
3859 | Move to... | |
3860 | * tests/headers.at: here. | |
3861 | ||
3862 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3863 | ||
3864 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
3865 | ||
3866 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3867 | ||
3868 | * tests/actions.at (Mid-rule actions): Output on a single line | |
3869 | instead of several. | |
3870 | ||
3871 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3872 | ||
3873 | * doc/bison.texinfo: Formatting changes. | |
3874 | ||
3875 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3876 | ||
3877 | Don't store the token defs in a muscle, just be ready to output it | |
3878 | on command. Now possible via `symbols'. Fixes a memory leak. | |
3879 | ||
3880 | * src/output.c (token_definitions_output): New. | |
3881 | (output_parser, header_output): Use it. | |
3882 | * src/reader.c (symbols_save): Remove. | |
3883 | ||
3884 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3885 | ||
3886 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
3887 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
3888 | default. | |
3889 | ||
3890 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3891 | ||
3892 | Mid-rule actions are simply... ignored! | |
3893 | ||
3894 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
3895 | the empty-rule associated to the dummy symbol, not to the host | |
3896 | rule. | |
3897 | * tests/actions.at (Mid-rule actions): New. | |
3898 | ||
3899 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3900 | ||
3901 | Memory leak. | |
3902 | ||
3903 | * src/reader.c (reader): Free grammar. | |
3904 | ||
3905 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3906 | ||
3907 | Memory leak. | |
3908 | ||
3909 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
3910 | since it allocates it for each state, although only one is needed. | |
3911 | (allocate_storage): Do it here. | |
3912 | ||
3913 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3914 | ||
3915 | * src/options.h, src/options.c (create_long_option_table): Rename | |
3916 | as... | |
3917 | (long_option_table_new): this, with a clearer prototype. | |
3918 | (percent_table): Remove, unused, | |
3919 | * src/getargs.c (getargs): Adjust. | |
3920 | ||
3921 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3922 | ||
3923 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
3924 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
3925 | as states. | |
3926 | ||
3927 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3928 | ||
3929 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
3930 | Sorry, I don't understand exactly what it is, no better name... | |
3931 | ||
3932 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3933 | ||
3934 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
3935 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
3936 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
3937 | as rules. | |
3938 | ||
3939 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3940 | ||
3941 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
3942 | ago. | |
3943 | ||
3944 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3945 | ||
3946 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
3947 | Adjust all users to use symbols[i]->user_token_number. | |
3948 | ||
3949 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3950 | ||
3951 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
3952 | Adjust all users to use symbols[i]->prec or ->assoc. | |
3953 | ||
3954 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3955 | ||
3956 | * src/reader.c, src/reader.h (tags): Remove. | |
3957 | Adjust all users to use symbols[i]->tag. | |
3958 | ||
3959 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3960 | ||
3961 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
3962 | and rule_table. | |
3963 | * src/reader.c (packsymbols): Fill this table. | |
3964 | Drop sprec. | |
3965 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
3966 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
3967 | single table. | |
3968 | Use symbols[i]->tag instead of tags[i]. | |
3969 | ||
3970 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3971 | ||
3972 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
3973 | In addition, put a comment in there, to replace... | |
3974 | * tests/regression.at (%union and C comments): Remove. | |
3975 | ||
3976 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3977 | ||
3978 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
3979 | output as expected output. The contents *seem* right to me, but I | |
3980 | can't pretend reading perfectly parser tables... Nonetheless, all | |
3981 | the other tests pass correctly, the table look OK, even though the | |
3982 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
3983 | harmless). | |
3984 | ||
3985 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3986 | ||
3987 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
3988 | rules read. In other words, add it _after_ having performed | |
3989 | grammar sanity checks. | |
3990 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
3991 | ||
3992 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3993 | ||
3994 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
3995 | visible, and some states have now a different number. | |
3996 | ||
3997 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
3998 | ||
3999 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
4000 | of the first rule. | |
4001 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
4002 | (Solved SR Conflicts): Adjust rule 0's line number. | |
4003 | ||
4004 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
4005 | ||
4006 | Fix the `GAWK Grammar' failure. | |
4007 | ||
4008 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
4009 | the reductions of the first state which was mistakenly confused | |
4010 | with the final state because precisely final_state was initialized | |
4011 | to 0. | |
4012 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
4013 | now noticed by Bison. | |
4014 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
4015 | have a reduction on $default. | |
4016 | ||
4017 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
4018 | ||
4019 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
4020 | rule line numbers. | |
4021 | * src/closure.c (print_closure): Likewise. | |
4022 | * src/derives.c (print_derives): Likewise. | |
4023 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
4024 | now. | |
4025 | ||
4026 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
4027 | ||
4028 | * src/lalr.c (lookaheads_print): New. | |
4029 | (lalr): Call it when --trace-flag. | |
4030 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
4031 | are dumped. | |
4032 | ||
4033 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
4034 | ||
4035 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
4036 | when walking through ritem, even via rule->rhs. | |
4037 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
4038 | (useful_production, useless_nonterminals): Likewise. | |
4039 | (reduce_grammar_tables): Likewise, plus update nritems. | |
4040 | * src/nullable.c (set_nullable): Likewise. | |
4041 | * src/lalr.c (build_relations): Likewise. | |
4042 | * tests/sets.at (Nullable): Adjust. | |
4043 | Fortunately, now, the $axiom is no longer nullable. | |
4044 | ||
4045 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
4046 | ||
4047 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
4048 | the 0-sentinel. | |
4049 | * src/gram.c (ritem_longest_rhs): Likewise. | |
4050 | * src/reduce.c (nonterminals_reduce): Likewise. | |
4051 | * src/print_graph.c (print_graph): Likewise. | |
4052 | * src/output.c (output_rule_data): Likewise. | |
4053 | * src/nullable.c (set_nullable): Likewise. | |
4054 | ||
4055 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
4056 | ||
4057 | * src/output.c: Comment changes. | |
4058 | ||
4059 | 2001-12-27 Paul Eggert <eggert@twinsun.com> | |
4060 | ||
4061 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
4062 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
4063 | Sparc, as they were causing more porting problems than the | |
4064 | (minor) performance improvement was worth. | |
4065 | ||
4066 | Also, catch up with 1.31's YYSTD. | |
4067 | ||
4068 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4069 | ||
4070 | * src/output.c (output_gram): Rely on nritems, not the | |
4071 | 0-sentinel. See below. | |
4072 | Use -1 as separator, not 0. | |
4073 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
4074 | Rely on -1 as separator in yyrhs, instead of 0. | |
4075 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
4076 | twice `Now at end of input', therefore there are two lines less to | |
4077 | expect. | |
4078 | ||
4079 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4080 | ||
4081 | * tests/regression.at (Unresolved SR Conflicts): | |
4082 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
4083 | below. | |
4084 | ||
4085 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4086 | ||
4087 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
4088 | is reached by eoftoken. | |
4089 | (insert_start_shifting_state, insert_eof_shifting_state) | |
4090 | (insert_accepting_state, augment_automaton): Remove, since now | |
4091 | these states are automatically computed from the initial state. | |
4092 | (generate_states): Adjust. | |
4093 | * src/print.c: When reporting a rule number to the user, substract | |
4094 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
4095 | * src/reduce.c: Likewise. | |
4096 | * src/print_graph.c (print_core): For the time being, just as for | |
4097 | the report, depend upon --trace-flags to dump the full set of | |
4098 | items. | |
4099 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
4100 | 0: `$axiom: START-SYMBOL $'. | |
4101 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
4102 | number of the states has changed (the final state is no longer | |
4103 | necessarily the last), catch up. | |
4104 | ||
4105 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4106 | ||
4107 | Try to make the use of the eoftoken valid. Given that its value | |
4108 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
4109 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
4110 | instead of the 0-sentinel. | |
4111 | ||
4112 | * src/gram.h, src/gram.c (nritems): New. | |
4113 | Expected to be duplication of nitems, but for the time being... | |
4114 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
4115 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
4116 | * src/closure.c (print_closure, print_fderives): Likewise. | |
4117 | * src/gram.c (ritem_print): Likewise. | |
4118 | * src/print.c (print_core, print_grammar): Likewise. | |
4119 | * src/print_graph.c: Likewise. | |
4120 | ||
4121 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4122 | ||
4123 | * src/main.c (main): If there are complains after grammar | |
4124 | reductions, then output the report anyway if requested, then die. | |
4125 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
4126 | * src/reader.c (eoftoken): New. | |
4127 | (parse_token_decl): If the token being defined has value `0', it | |
4128 | is the eoftoken. | |
4129 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
4130 | Be sure to preserve the value of the eoftoken. | |
4131 | (reader): Make sure eoftoken is defined. | |
4132 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
4133 | * src/print.c (print_grammar): Don't special case the eof token. | |
4134 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
4135 | lie anyway, albeit pleasant. | |
4136 | * tests/calc.at: Exercise error messages with eoftoken. | |
4137 | Change the grammar so that empty input is invalid. | |
4138 | Adjust expectations. | |
4139 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
4140 | ||
4141 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4142 | ||
4143 | * configure.in: Check the protos of strchr ans strspn. | |
4144 | Replace strchr if needed. | |
4145 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
4146 | missing. | |
4147 | * lib/strchr.c: New. | |
4148 | * src/reader.c (symbols_save): Use strchr. | |
4149 | ||
4150 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4151 | ||
4152 | * src/print.c, src/print_graph.c (escape): New. | |
4153 | Use it to quote the TAGS outputs. | |
4154 | * src/print_graph.c (print_state): Now errors are in red, and | |
4155 | reductions in green. | |
4156 | Prefer high to wide: output the state number on a line of its own. | |
4157 | ||
4158 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4159 | ||
4160 | * src/state.h, src/state.c (reductions_new): New. | |
4161 | * src/LR0.c (set_state_table): Let all the states have a | |
4162 | `reductions', even if reduced to 0. | |
4163 | (save_reductions): Adjust. | |
4164 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
4165 | * src/print.c (print_reductions, print_actions): Adjust. | |
4166 | * src/output.c (action_row): Adjust. | |
4167 | ||
4168 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4169 | ||
4170 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
4171 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
4172 | even if reduced to 0. | |
4173 | * src/print.c (print_errs, print_reductions): Adjust. | |
4174 | * src/output.c (output_actions, action_row): Adjust. | |
4175 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
4176 | ||
4177 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4178 | ||
4179 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
4180 | ||
4181 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4182 | ||
4183 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
4184 | * src/print.c: here. | |
4185 | (lookaheadset, shiftset): New, used as additional storage by | |
4186 | print_reductions. | |
4187 | (print_results): Adjust. | |
4188 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
4189 | (print_actions): here. | |
4190 | * src/print_graph.c (print_actions): Remove dead code. | |
4191 | ||
4192 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4193 | ||
4194 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
4195 | `$n' and `@n'. | |
4196 | ||
4197 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4198 | ||
4199 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
4200 | (build_relations): Adjust. | |
4201 | ||
4202 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4203 | ||
4204 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
4205 | duplication. | |
4206 | ||
4207 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4208 | ||
4209 | * src/reader.c (packgram): Catch nitems overflows. | |
4210 | ||
4211 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4212 | ||
4213 | * src/files.c, src/files.h (guard_obstack): Remove. | |
4214 | * src/output.c (output): Adjust. | |
4215 | * src/reader.c (parse_braces): New, factoring... | |
4216 | (copy_action, copy_guard): these two which are renamed as... | |
4217 | (parse_action, parse_guard): these. | |
4218 | As a voluntary consequence, using braces around guards is now | |
4219 | mandatory. | |
4220 | ||
4221 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4222 | ||
4223 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
4224 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
4225 | members. | |
4226 | (symbol_list_new): Adjust. | |
4227 | (copy_action): action_line is the first line, not the last. | |
4228 | (copy_guard): Just as for actions, store the `action' only, not | |
4229 | the switch/case/break flesh. | |
4230 | Don't parse the user action that might follow the guard, let... | |
4231 | (readgram): do it, i.e., now, there can be an action after a | |
4232 | guard. | |
4233 | In other words the guard is just explicitly optional. | |
4234 | (packgram): Adjust. | |
4235 | * src/output.c (guards_output): New. | |
4236 | (output_parser): Call it when needed. | |
4237 | (output): Also free the guard and attrs obstacks. | |
4238 | * src/files.c, src/files.h (obstack_save): Remove. | |
4239 | (output_files): Remove. | |
4240 | As a result, if one needs the former `.act' file, using an | |
4241 | appropriate skeleton which requires actions and guards is now | |
4242 | required. | |
4243 | * src/main.c (main): Adjust. | |
4244 | * tests/semantic.at: New. | |
4245 | * tests/regression.at: Use `input.y' as input file name. | |
4246 | Avoid 8+3 problems by requiring input.c when the test needs the | |
4247 | parser. | |
4248 | ||
4249 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4250 | ||
4251 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
4252 | fields. | |
4253 | ||
4254 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4255 | ||
4256 | All the hacks using a final pseudo state are now useless. | |
4257 | ||
4258 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
4259 | * src/lalr.c (nLA): New. | |
4260 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
4261 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
4262 | ||
4263 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4264 | ||
4265 | * src/output.c (action_row, token_actions): Use a state_t instead | |
4266 | of a integer, and nlookaheads instead of the following state's | |
4267 | lookaheadsp. | |
4268 | ||
4269 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4270 | ||
4271 | * src/conflicts.c (log_resolution, flush_shift) | |
4272 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
4273 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
4274 | (conflicts_print, print_reductions): Use a state_t instead of an | |
4275 | integer when referring to a state. | |
4276 | As much as possible, depend upon nlookaheads, instead of the | |
4277 | `lookaheadsp' member of the following state (since lookaheads of | |
4278 | successive states are successive, the difference between state n + 1 | |
4279 | and n served as the number of lookaheads for state n). | |
4280 | * src/lalr.c (add_lookback_edge): Likewise. | |
4281 | * src/print.c (print_core, print_actions, print_state) | |
4282 | (print_results): Likewise. | |
4283 | * src/print_graph.c (print_core, print_actions, print_state) | |
4284 | (print_graph): Likewise. | |
4285 | * src/conflicts.h: Adjust. | |
4286 | ||
4287 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4288 | ||
4289 | * src/bison.hairy: Formatting/comment changes. | |
4290 | ANSIfy. | |
4291 | Remove `register' indications. | |
4292 | Add plenty of `static'. | |
4293 | ||
4294 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
4295 | ||
4296 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
4297 | duplicates ntokens. | |
4298 | * src/bison.simple: Formatting/comment changes. | |
4299 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
4300 | is an undocumented synonym. | |
4301 | ||
4302 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
4303 | ||
4304 | * src/output.c (output_table_data): Change the prototype to use | |
4305 | `int' for array ranges: some invocations do pass an int, not a | |
4306 | short. | |
4307 | Reported by Wayne Green. | |
4308 | ||
4309 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
4310 | ||
4311 | Some actions of web2c.y are improperly triggered. | |
4312 | Reported by Mike Castle. | |
4313 | ||
4314 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
4315 | * tests/regression.at (Web2c): Rename as... | |
4316 | (Web2c Report): this. | |
4317 | (Web2c Actions): New. | |
4318 | ||
4319 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
4320 | ||
4321 | Reductions in web2c.y are improperly reported. | |
4322 | Reported by Mike Castle. | |
4323 | ||
4324 | * src/conflicts.c (print_reductions): Fix. | |
4325 | * tests/regression.at (Web2c): New. | |
4326 | ||
4327 | 2001-12-18 Akim Demaille <akim@epita.fr> | |
4328 | ||
4329 | Some host fail on `assert (!"foo")', which expands to | |
4330 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
4331 | Reported by Nelson Beebee. | |
4332 | ||
4333 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
4334 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
4335 | ||
4336 | 2001-12-17 Marc Autret <autret_m@epita.fr> | |
4337 | ||
4338 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
4339 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
4340 | New line counter 'skeleton_line' (skeleton-line muscle). | |
4341 | ||
4342 | 2001-12-17 Paul Eggert <eggert@twinsun.com> | |
4343 | ||
4344 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
4345 | YYDEBUG must be defined to a nonzero value. | |
4346 | ||
4347 | * src/bison.simple (yytname): Do not assume that the user defines | |
4348 | YYDEBUG to a properly parenthesized expression. | |
4349 | ||
4350 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
4351 | ||
4352 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
4353 | nlookaheads is a new member. | |
4354 | Adjust all users. | |
4355 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
4356 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
4357 | state. | |
4358 | ||
4359 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
4360 | ||
4361 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
4362 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
4363 | let... | |
4364 | * src/reader.c (reader): Do it. | |
4365 | ||
4366 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
4367 | ||
4368 | * src/conflicts.c (print_reductions): Formatting changes. | |
4369 | ||
4370 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
4371 | ||
4372 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
4373 | (flush_reduce): New. | |
4374 | (resolve_sr_conflict): Adjust. | |
4375 | ||
4376 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
4377 | ||
4378 | * src/output.c (output_obstack): Be static and rename as... | |
4379 | (format_obstack): this, to avoid any confusion with files.c's | |
4380 | output_obstack. | |
4381 | * src/reader.h (muscle_obstack): Move to... | |
4382 | * src/output.h: here, since it's defined in output.c. | |
4383 | ||
4384 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
4385 | ||
4386 | * src/output.c (action_row, save_column, default_goto) | |
4387 | (sort_actions, matching_state, pack_vector): Better variable | |
4388 | locality. | |
4389 | ||
4390 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
4391 | ||
4392 | * src/output.c: Various formatting changes. | |
4393 | ||
4394 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
4395 | ||
4396 | * src/files.c (output_files): Free the output_obstack. | |
4397 | * src/main.c (main): Call print and print_graph conditionally. | |
4398 | * src/print.c (print): Work unconditionally. | |
4399 | * src/print_graph.c (print_graph): Work unconditionally. | |
4400 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
4401 | ||
4402 | 2001-12-16 Marc Autret <autret_m@epita.fr> | |
4403 | ||
4404 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
4405 | there is one less line per action. | |
4406 | ||
4407 | 2001-12-16 Marc Autret <autret_m@epita.fr> | |
4408 | ||
4409 | * src/bison.simple: Remove a useless #line directive. | |
4410 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
4411 | * src/output.c (get_lines_number): New. | |
4412 | (output_parser): Adjust, now takes care about the lines of a | |
4413 | output muscles. | |
4414 | Fix line numbering. | |
4415 | (actions_output): Computes the number of lines taken by actions. | |
4416 | (output_master_parser): Insert new skeleton which is the name of | |
4417 | the output parser file name. | |
4418 | ||
4419 | 2001-12-15 Marc Autret <autret_m@epita.fr> | |
4420 | ||
4421 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
4422 | ||
4423 | 2001-12-15 Marc Autret <autret_m@epita.fr> | |
4424 | ||
4425 | * src/output.c (output_gram): Keep track of the hairy one. | |
4426 | ||
4427 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
4428 | ||
4429 | Make `make distcheck' work. | |
4430 | ||
4431 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
4432 | system.h which uses libgettext.h. | |
4433 | ||
4434 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
4435 | ||
4436 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
4437 | otherwise, since we range over their symbols, we might look at a | |
4438 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
4439 | `nvars', hence we overflow our arrays. | |
4440 | ||
4441 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
4442 | ||
4443 | The header can also be produced directly, without any obstack! | |
4444 | Yahoo! | |
4445 | ||
4446 | * src/files.c, src/files.h (defines_obstack): Remove. | |
4447 | (compute_header_macro): Global. | |
4448 | (defines_obstack_save): Remove. | |
4449 | * src/reader.c (parse_union_decl): No longer output to | |
4450 | defines_obstack: its content can be found in the `stype' muscle | |
4451 | anyway. | |
4452 | (output_token_translations): Merge into... | |
4453 | (symbols_output): this. | |
4454 | Rename as... | |
4455 | (symbols_save): this. | |
4456 | (reader): Adjust. | |
4457 | * src/output.c (header_output): New. | |
4458 | (output): Call it. | |
4459 | ||
4460 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
4461 | ||
4462 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
4463 | simultaneously, use one to define the `stype' muscle, and use the | |
4464 | value of the latter to fill defines_obstack. | |
4465 | (copy_comment): Remove. | |
4466 | (copy_comment2): Work for a single obstack. | |
4467 | Rename as... | |
4468 | (copy_comment): this. | |
4469 | ||
4470 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
4471 | ||
4472 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
4473 | * src/reader.c (parse_union_decl): Revamp. | |
4474 | ||
4475 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
4476 | ||
4477 | Still making progress in separating Bison into (i) input, (ii) | |
4478 | process, (iii) output: now we can directly output the parser file | |
4479 | without using table_obstack at all. | |
4480 | ||
4481 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
4482 | (parser_file_name): New. | |
4483 | * src/files.c (compute_output_file_names): Compute it. | |
4484 | * src/output.c (actions_output, output_parser) | |
4485 | (output_master_parser): To a file instead of an obstack. | |
4486 | ||
4487 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
4488 | ||
4489 | Attach actions to rules, instead of pre-outputting them to | |
4490 | actions_obstack. | |
4491 | ||
4492 | * src/gram.h (rule_t): action and action_line are new members. | |
4493 | * src/reader.c (symbol_list): Likewise. | |
4494 | (copy_action): Save the actions within the rule. | |
4495 | (packgram): Save them in rule_table. | |
4496 | * src/output.c (actions_output): New. | |
4497 | (output_parser): Use it on `%%actions'. | |
4498 | (output_rule_data): Don't free rule_table. | |
4499 | (output): Do it. | |
4500 | (prepare): Don't save the `action' muscle. | |
4501 | * src/bison.simple: s/%%action/%%actions/. | |
4502 | ||
4503 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
4504 | ||
4505 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
4506 | to the user action: let it fail if lacking. | |
4507 | Suggested by Arnold Robbins and Tom Tromey. | |
4508 | ||
4509 | 2001-12-14 Akim Demaille <akim@epita.fr> | |
4510 | ||
4511 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
4512 | longer mess around with obstacks and int pointers. | |
4513 | Adjust all callers. | |
4514 | ||
4515 | 2001-12-14 Akim Demaille <akim@epita.fr> | |
4516 | ||
4517 | * src/lex.c (literalchar): Don't escape the special characters, | |
4518 | just decode them, and keep them as char (before, eol was output as | |
4519 | the 2 char string `\n' etc.). | |
4520 | * src/output.c (output_rule_data): Use quotearg to output the | |
4521 | token strings. | |
4522 | ||
4523 | 2001-12-13 Paul Eggert <eggert@twinsun.com> | |
4524 | ||
4525 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
4526 | Do not infringe on the global user namespace when using C++. | |
4527 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
4528 | All uses of `fprintf' and `stderr' changed. | |
4529 | ||
4530 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
4531 | ||
4532 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
4533 | ||
4534 | The computation of nullable is broken: it doesn't handle empty | |
4535 | RHS's properly. | |
4536 | ||
4537 | * tests/torture.at (GNU AWK Grammar): New. | |
4538 | * tests/sets.at (Nullable): New. | |
4539 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
4540 | `ritems', loop over the rules, and then over their rhs's. | |
4541 | ||
4542 | Work around Autotest bugs. | |
4543 | ||
4544 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
4545 | frame, because Autotest understand lines starting with a `+' as | |
4546 | traces from the shell. Then, they are not processed properly. | |
4547 | Admittedly an Autotest bug, but we don't have time to wait for | |
4548 | Autotest to catch up. | |
4549 | * tests/regression.at (Broken Closure): Adjust to the new table | |
4550 | frames. | |
4551 | Move to... | |
4552 | * tests/sets.at: here. | |
4553 | ||
4554 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
4555 | ||
4556 | * src/closure.c (closure): Use nrules instead of playing tricks | |
4557 | with BITS_PER_WORD. | |
4558 | ||
4559 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
4560 | ||
4561 | * src/print.c (print_actions): Output the handling of `$' as the | |
4562 | traces do: shifting the token EOF. Before EOF was treated as a | |
4563 | nonterminal. | |
4564 | * tests/regression.at: Adjust some tests. | |
4565 | * src/print_graph.c (print_core): Complete the set of items via | |
4566 | closure. The next-to-final and final states are still unsatisfying, | |
4567 | but that's to be addressed elsewhere. | |
4568 | No longer output the rule numbers, but do output the state number. | |
4569 | A single loop for the shifts + gotos is enough, but picked a | |
4570 | distinct color for each. | |
4571 | (print_graph): Initialize and finalize closure. | |
4572 | ||
4573 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
4574 | ||
4575 | * src/reader.c (readgram): Remove dead code, an strip useless | |
4576 | braces. | |
4577 | (get_type): Remove, unused. | |
4578 | ||
4579 | 2001-12-12 Akim Demaille <akim@epita.fr> | |
4580 | ||
4581 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
4582 | on that of lib/error.c. | |
4583 | ||
4584 | 2001-12-12 Akim Demaille <akim@epita.fr> | |
4585 | ||
4586 | Some hosts don't like `/' in includes. | |
4587 | ||
4588 | * src/system.h: Include libgettext.h without qualifying the path. | |
4589 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
4590 | $(top_srcdir). | |
4591 | ||
4592 | 2001-12-11 Marc Autret <autret_m@epita.fr> | |
4593 | ||
4594 | * src/output.c (output_parser): Remove useless muscle. | |
4595 | ||
4596 | 2001-12-11 Marc Autret <autret_m@epita.fr> | |
4597 | ||
4598 | * src/bison.simple: Remove #line just before %%epilogue. It | |
4599 | is now handled in ... | |
4600 | * src/reader.c (read_additionnal_code): Add the output of a | |
4601 | #line for the epilogue. | |
4602 | ||
4603 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
4604 | ||
4605 | * src/reader.c (copy_definition): Re-use CPP-outed code which | |
4606 | replace precedent remove. | |
4607 | * src/bison.simple: Remove #line before %%prologue because | |
4608 | %%input-line is wrong at this time. | |
4609 | ||
4610 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
4611 | ||
4612 | * src/reader.c (symbols_output): Clean up. | |
4613 | * src/output.c (output_gram, output): Clean up. | |
4614 | ||
4615 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4616 | ||
4617 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
4618 | * src/LR0.c (set_state_table): here. | |
4619 | * src/lalr.c (lalr): Call it. | |
4620 | ||
4621 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4622 | ||
4623 | * src/state.h (shifts): Remove the `number' member: shifts are | |
4624 | attached to state, hence no longer need to be labelled with a | |
4625 | state number. | |
4626 | ||
4627 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4628 | ||
4629 | Now that states have a complete set of members, the linked list of | |
4630 | shifts is useless: just fill directly the state's shifts member. | |
4631 | ||
4632 | * src/state.h (shifts): Remove the `next' member. | |
4633 | * src/LR0.c (first_state, last_state): Remove. | |
4634 | Adjust the callers. | |
4635 | (augment_automaton): Don't look for the shifts that must be added | |
4636 | a shift on EOF: it is those of the state we looked for! But now, | |
4637 | since shifts are attached, it is no longer needed to looking | |
4638 | merely by its id: its number. | |
4639 | ||
4640 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4641 | ||
4642 | * src/LR0.c (augment_automaton): Better variable locality. | |
4643 | Remove an impossible branch: if there is a state corresponding to | |
4644 | the start symbol being shifted, then there is shift for the start | |
4645 | symbol from the initial state. | |
4646 | ||
4647 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4648 | ||
4649 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
4650 | only when appropriate: when insert_start_shifting_state' is not | |
4651 | invoked. | |
4652 | * tests/regression.at (Rule Line Numbers): Adjust. | |
4653 | ||
4654 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4655 | ||
4656 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
4657 | merge the two cases addition shifts to the initial state. | |
4658 | ||
4659 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4660 | ||
4661 | * src/lalr.c (set_state_table): Move to... | |
4662 | * src/LR0.c: here. | |
4663 | * src/lalr.c (lalr): Don't call it... | |
4664 | * src/LR0.c (generate_states): do it. | |
4665 | * src/LR0.h (first_state): Remove, only the table is used. | |
4666 | ||
4667 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4668 | ||
4669 | * src/LR0.h (first_shift, first_reduction): Remove. | |
4670 | * src/lalr.c: Don't use first_shift: find shifts through the | |
4671 | states. | |
4672 | ||
4673 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4674 | ||
4675 | * src/LR0.c: Attach shifts to states as soon as they are | |
4676 | computed. | |
4677 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
4678 | state, just assert that the mapping was properly done. | |
4679 | ||
4680 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4681 | ||
4682 | * src/LR0.c (insert_start_shift): Rename as... | |
4683 | (insert_start_shifting_state): this. | |
4684 | (insert_eof_shifting_state, insert_accepting_state): New. | |
4685 | (augment_automaton): Adjust. | |
4686 | Better locality of the variables. | |
4687 | When looking if the start_symbol is shifted from the initial | |
4688 | state, using `while (... symbol != start_symbol ...)' sounds | |
4689 | better than `while (... symbol < start_symbol ...)': If fail | |
4690 | to see how the order between symbols could be relevant! | |
4691 | ||
4692 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4693 | ||
4694 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
4695 | `spec_file_prefix', declared by src/files.h. | |
4696 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
4697 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
4698 | * src/output.c (prepare): Adjust. | |
4699 | * src/reader.c (symbols_output): Likewise. | |
4700 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
4701 | ||
4702 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4703 | ||
4704 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
4705 | `"0"'. | |
4706 | ||
4707 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4708 | ||
4709 | * src/reader.c (reader): Calling symbols_output once is enough. | |
4710 | ||
4711 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4712 | ||
4713 | Now that states have a complete set of members, the linked list of | |
4714 | reductions is useless: just fill directly the state's reductions | |
4715 | member. | |
4716 | ||
4717 | * src/state.h (struct reductions): Remove member `number' and | |
4718 | `next'. | |
4719 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
4720 | (save_reductions): Don't link the new reductions, store them in | |
4721 | this_state. | |
4722 | * src/lalr.c (set_state_table): No need to attach reductions to | |
4723 | states, it's already done. | |
4724 | * src/output.c (output_actions): No longer free the shifts, then | |
4725 | the reductions, then the states: free all the states and their | |
4726 | members. | |
4727 | ||
4728 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4729 | ||
4730 | * src/options.c (OPTN, DRTV, BOTH): New. | |
4731 | (option_table): Use them. | |
4732 | ||
4733 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's | |
4734 | the job of system.h. | |
4735 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
4736 | reasons. | |
4737 | ||
4738 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4739 | ||
4740 | * src/output.c (output, prepare): Make sure the values of the | |
4741 | muscles `action' and `prologue' are 0-terminated. | |
4742 | ||
4743 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4744 | ||
4745 | Clean up GCC warnings. | |
4746 | ||
4747 | * src/reader.c (copy_action): `buf' is not used. | |
4748 | (parse_skel_decl): Be static. | |
4749 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
4750 | * src/options.h (create_long_option_table): Have a real prototype. | |
4751 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
4752 | (hash_delete_at): Return const void *. | |
4753 | Adjust casts to preserve the const. | |
4754 | ||
4755 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4756 | ||
4757 | * configure.in: Require 2.52g. | |
4758 | M4 is not needed, but AUTOM4TE is. | |
4759 | * m4/m4.m4: Remove. | |
4760 | * tests/Makefile.am: Adjust. | |
4761 | ||
4762 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4763 | ||
4764 | One structure for states is enough, even though theoretically | |
4765 | there are LR(0) states and LALR(1) states. | |
4766 | ||
4767 | * src/lalr.h (state_t): Remove. | |
4768 | (state_table): Be state_t **, not state_t *. | |
4769 | * src/state.h (core, CORE_ALLOC): Rename as... | |
4770 | (state_t, STATE_ALLOC): this. | |
4771 | Add the LALR(1) members: shifts, reductions, errs. | |
4772 | * src/LR0.c (state_table): Rename as... | |
4773 | (state_hash): this, to avoid name clashes with the global | |
4774 | `state_table'. | |
4775 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
4776 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
4777 | ||
4778 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
4779 | ||
4780 | Bison dumps core on bash.y. | |
4781 | Reported by Pascal Bart. | |
4782 | ||
4783 | * src/warshall.c (bitmatrix_print): New. | |
4784 | (TC): Use it. | |
4785 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
4786 | j must be the outer loop. | |
4787 | * tests/regression.at (Broken Closure): New. | |
4788 | ||
4789 | 2001-12-05 Akim Demaille <akim@epita.fr> | |
4790 | ||
4791 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
4792 | its argument. | |
4793 |