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