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