]>
Commit | Line | Data |
---|---|---|
65ccf9fc AD |
1 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2 | ||
3 | * src/warshall.h, src/warshall.c (bitmatrix_print): Move to... | |
4 | * src/closure.c: here. | |
5 | (set_firsts): Use bitsetv_reflexive_transitive_closure instead of | |
6 | RTC. | |
7 | * src/warshall.h, src/warshall.c: Remove. | |
8 | * tests/sets.at (Broken Closure): Adjust. | |
9 | ||
d0039cbc AD |
10 | 2002-03-04 Akim Demaille <akim@epita.fr> |
11 | ||
12 | * src/output.c (output_skeleton): tempdir is const. | |
13 | bytes_read is unused. | |
14 | ||
345cea78 AD |
15 | 2002-03-04 Akim Demaille <akim@epita.fr> |
16 | ||
17 | * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
18 | * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c: | |
19 | Update. | |
20 | From Michael Hayes. | |
21 | ||
564801f7 AD |
22 | 2002-03-04 Akim Demaille <akim@epita.fr> |
23 | ||
24 | * src/closure.c (closure): `r' is unused. | |
25 | ||
e5352bc7 AD |
26 | 2002-03-04 Akim Demaille <akim@epita.fr> |
27 | ||
28 | * tests/sets.at (Broken Closure): Add the ending `;'. | |
29 | * src/reader.at (readgram): Complain if a rule is not ended with a | |
30 | semi-colon. | |
31 | ||
914feea9 AD |
32 | 2002-03-04 Akim Demaille <akim@epita.fr> |
33 | ||
34 | * src/conflicts.c (set_conflicts): Use bitset_disjoint_p. | |
35 | (count_sr_conflicts): Use bitset_count. | |
36 | * src/reduce.c (inaccessable_symbols): Ditto. | |
37 | (bits_size): Remove. | |
38 | * src/warshall.h, src/warshall.c: Convert to bitsetv. | |
39 | ||
f0250de6 AD |
40 | 2002-03-04 Akim Demaille <akim@epita.fr> |
41 | ||
42 | * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c, | |
43 | * src/reduce.c: Remove the `bitset_zero's following the | |
44 | `bitset_create's, as now it is performed by the latter. | |
45 | ||
ef017502 AD |
46 | 2002-03-04 Akim Demaille <akim@epita.fr> |
47 | ||
48 | * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h, | |
49 | * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h, | |
50 | * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the | |
51 | latest sources from Michael. | |
52 | ||
76514394 AD |
53 | 2002-03-04 Akim Demaille <akim@epita.fr> |
54 | ||
55 | * src/output.c (output): Don't free the grammar. | |
56 | * src/reader.c (grammar_free): New. | |
57 | * src/main.c (main): Call it and don't free symtab here. | |
58 | ||
55024580 AD |
59 | 2002-03-04 Akim Demaille <akim@epita.fr> |
60 | ||
61 | * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer | |
62 | before returning. | |
63 | Reported by Benoit Perrot. | |
64 | ||
f9abaa2c AD |
65 | 2002-03-04 Akim Demaille <akim@epita.fr> |
66 | ||
67 | Use bitset operations when possible, not loops over bits. | |
68 | ||
69 | * src/conflicts.c (set_conflicts, count_sr_conflicts): Use | |
70 | bitset_or. | |
71 | * src/print.c (print_reductions): Use bitset_and, bitset_andn. | |
72 | * src/reduce.c (useless_nonterminals): Formatting changes. | |
73 | * src/warshall.c (TC): Use bitset_or. | |
74 | ||
0e721e75 AD |
75 | 2002-03-04 Akim Demaille <akim@epita.fr> |
76 | ||
77 | * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused. | |
78 | * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET): | |
79 | Ditto. | |
80 | ||
0fb1ffb1 AD |
81 | 2002-03-04 Akim Demaille <akim@epita.fr> |
82 | ||
83 | * src/lalr.c (F): Now a bitset*. | |
84 | Adjust all dependencies. | |
85 | ||
b86796bf AD |
86 | 2002-03-04 Akim Demaille <akim@epita.fr> |
87 | ||
88 | * src/conflicts.c (shiftset, lookaheadset): Now bitset. | |
89 | Adjust all dependencies. | |
90 | ||
602bbf31 AD |
91 | 2002-03-04 Akim Demaille <akim@epita.fr> |
92 | ||
93 | * src/L0.c, src/LR0.h (nstates): Be size_t. | |
94 | Adjust comparisons (signed vs unsigned). | |
95 | * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a | |
96 | bitset*. | |
97 | Adjust all dependencies. | |
98 | ||
d8a0245c AD |
99 | 2002-03-04 Akim Demaille <akim@epita.fr> |
100 | ||
101 | * src/closure.c (firsts): Now, also a bitset. | |
102 | Adjust all dependencies. | |
103 | (varsetsize): Remove, now unused. | |
104 | * src/warshall.h, src/warshall.c: Now work on arrays of bitsets. | |
105 | ||
34ba9743 AD |
106 | 2002-03-04 Akim Demaille <akim@epita.fr> |
107 | ||
108 | * src/print.c: Convert to use bitset.h, not hand coded iterations | |
109 | over ints. | |
110 | ||
ed86e78c AD |
111 | 2002-03-04 Akim Demaille <akim@epita.fr> |
112 | ||
113 | * src/reduce.c: Convert to use bitset.h, not hand coded BSet. | |
114 | ||
dfdb1797 AD |
115 | 2002-03-04 Akim Demaille <akim@epita.fr> |
116 | ||
117 | * src/closure.c (ruleset): Be a bitset. | |
118 | (rulesetsize): Remove. | |
119 | ||
7086e707 AD |
120 | 2002-03-04 Akim Demaille <akim@epita.fr> |
121 | ||
122 | * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
123 | * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, | |
124 | * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New. | |
125 | * src/closure.c (fderives): Be an array of bitsets. | |
126 | ||
98254360 RA |
127 | 2002-02-28 Robert Anisko <robert@lrde.epita.fr> |
128 | ||
129 | * data/bison.c++: Merge the two generated headers. Insert a copyright | |
130 | notice in each output file. | |
131 | ||
a75c057f AD |
132 | 2002-02-28 Akim Demaille <akim@epita.fr> |
133 | ||
134 | * data/bison.c++: Copy the prologue of bison.simple to fetch | |
135 | useful M4 definitions, such as b4_header_guard. | |
136 | ||
06b00abc AD |
137 | 2002-02-25 Akim Demaille <akim@epita.fr> |
138 | ||
139 | * src/getargs.c (version): Give the name of the authors, and use a | |
a75c057f AD |
140 | translator friendly scheme for the bgr |
141 | copyright notice. | |
06b00abc | 142 | |
70e7d534 AD |
143 | 2002-02-25 Akim Demaille <akim@epita.fr> |
144 | ||
145 | * src/output.c (header_output): Remove, now handled completely via | |
146 | M4. | |
147 | ||
abe017f6 AD |
148 | 2002-02-25 Akim Demaille <akim@epita.fr> |
149 | ||
150 | * m4/m4.m4: New, from CVS Autoconf. | |
151 | * configure.in: Invoke it. | |
152 | * src/output.c (output_skeleton): Use its result instead of the | |
153 | hard coded name. | |
154 | ||
381fb12e AD |
155 | 2002-02-25 Akim Demaille <akim@epita.fr> |
156 | ||
157 | * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from | |
158 | Fileutils 4.1.5. | |
159 | * configure.in: Invoke UTILS_FUNC_MKSTEMP. | |
160 | * src/output.c (output_skeleton): Use mkstemp to create a real | |
161 | temporary file. | |
162 | Move the filling of `skeleton' and its muscle to... | |
163 | (prepare): here. | |
164 | (output): Move the definition of the prologue muscle to... | |
165 | (prepare): here. | |
166 | * src/system.h (DEFAULT_TMPDIR): New. | |
167 | ||
6f38107f PE |
168 | 2002-02-14 Paul Eggert <eggert@twinsun.com> |
169 | ||
170 | Remove the support for C++ namespace cleanliness; it was | |
171 | causing more problems than it was curing, since it didn't work | |
172 | properly on some nonstandard C++ compilers. This can wait | |
173 | for a proper C++ parser. | |
174 | ||
175 | * NEWS: Document this. | |
176 | * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention | |
177 | of C++, as it's treated like C now. | |
178 | * src/bison.simple (YYSTD): Remove. | |
179 | (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL): | |
180 | Treat C++ just like Standard C instead of trying to support | |
181 | namespace cleanliness. | |
182 | ||
80cce3da AD |
183 | 2002-02-14 Akim Demaille <akim@epita.fr> |
184 | ||
185 | * tests/regression.at (else): Adjust to Andreas' change. | |
186 | ||
842e8679 AD |
187 | 2002-02-14 Akim Demaille <akim@epita.fr> |
188 | ||
189 | * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. | |
190 | ||
4bda3f10 AD |
191 | 2002-02-13 Andreas Schwab <schwab@suse.de> |
192 | ||
193 | * src/output.c (output_rule_data): Don't output NULL, it might | |
194 | not be defined yet. | |
195 | ||
4162fa07 | 196 | 2002-02-11 Robert Anisko <robert@lrde.epita.fr> |
b418ecd8 | 197 | |
4162fa07 RA |
198 | * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue. |
199 | (Copyright notice): Update. | |
b418ecd8 | 200 | |
bd16a5dc AD |
201 | 2002-02-11 Akim Demaille <akim@epita.fr> |
202 | ||
203 | * tests/regression.at (%nonassoc and eof): Don't include | |
204 | nonportable headers. | |
205 | ||
8d69a1a3 RA |
206 | 2002-02-08 Robert Anisko <robert@lrde.epita.fr> |
207 | ||
208 | * data/bison.c++: Correct error recovery. Make the user able to | |
209 | initialize the starting location. | |
210 | ||
9b2d0677 AD |
211 | 2002-02-07 Akim Demaille <akim@epita.fr> |
212 | ||
213 | * tests/input.at: New. | |
214 | ||
69e2658b RA |
215 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
216 | ||
217 | * data/bison.c++: Replace some direct m4 expansions by constants. Be | |
9b2d0677 | 218 | more consistent when naming methods and variables. Put preprocessor |
69e2658b RA |
219 | directives around tables only needed for debugging. |
220 | ||
4aacc3a7 RA |
221 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
222 | ||
223 | * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in | |
224 | C++ parsers. | |
225 | (yy::b4_name::parse): Use print_. | |
226 | ||
762a801e RA |
227 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
228 | ||
229 | * data/bison.c++ (yy::b4_name::parse): Error recovery is back. | |
230 | ||
4bb2bc3f RA |
231 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
232 | ||
233 | * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in | |
234 | C++ parsers. | |
235 | (yy::b4_name::parse): Build verbose error messages, and use error_. | |
236 | ||
6b45a3ca RA |
237 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
238 | ||
239 | * data/bison.c++: Fix m4 quoting in comments. | |
240 | ||
50997c6e RA |
241 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
242 | ||
243 | * data/bison.c++: Adjust the parser code. Fix some muscles that were | |
244 | not expanded by m4. | |
245 | ||
3f3eed27 AD |
246 | 2002-02-05 Akim Demaille <akim@epita.fr> |
247 | ||
248 | * data/bison.c++: Adjust to the M4 back end. | |
249 | More is certainly needed. | |
250 | ||
be2a1a68 AD |
251 | 2002-02-05 Akim Demaille <akim@epita.fr> |
252 | ||
253 | Give a try to M4 as a back end. | |
254 | ||
255 | * lib/readpipe.c: New, from wdiff. | |
256 | * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and | |
257 | BISON_HAIRY. | |
258 | * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS | |
259 | specific values. Now it is m4 that performs the lookup. | |
260 | * src/parse-skel.y: Remove. | |
261 | * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New. | |
262 | * src/output.c (actions_output, guards_output) | |
263 | (token_definitions_output): No longer keeps track of the output | |
264 | line number, hence remove the second argument. | |
265 | (guards_output): Check against the guard member of a rule, not the | |
266 | action member. | |
267 | Adjust callers. | |
268 | (output_skeleton): Don't look for the skeleton location, let m4 do | |
269 | that. | |
270 | Create `/tmp/muscles.m4'. This is temporary, a proper temporary | |
271 | file will be used. | |
272 | Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton. | |
273 | (prepare): Given that for the time being changesyntax is not | |
274 | usable in M4, rename the muscles using `-' to `_'. | |
275 | Define `defines_flag', `output_parser_name' and `output_header_name'. | |
276 | * src/output.h (actions_output, guards_output) | |
277 | (token_definitions_output): Adjust prototypes. | |
278 | * src/scan-skel.l: Instead of scanning the skeletons, it now | |
279 | processes the output of m4: `__oline__' and `#output'. | |
280 | * data/bison.simple: Adjust to be used by M4(sugar). | |
281 | * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up | |
282 | to date. | |
283 | * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR' | |
284 | instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'. | |
285 | * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New, | |
286 | shamelessly stolen from CVS Autoconf. | |
287 | ||
beda758b AD |
288 | 2002-02-05 Akim Demaille <akim@epita.fr> |
289 | ||
290 | * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version. | |
291 | * configure.in: Check for the declarations of free and malloc. | |
292 | * src/muscle_tab.c: Adjust. | |
293 | ||
5ece6d43 AD |
294 | 2002-02-05 Akim Demaille <akim@epita.fr> |
295 | ||
296 | * src/muscle_tab.c (muscle_init): Don't default to NULL muscle | |
297 | which have no values. | |
298 | ||
5bb18f9a AD |
299 | 2002-02-05 Akim Demaille <akim@epita.fr> |
300 | ||
301 | * src/bison.simple, src/bison.hairy, src/bison.c++: Move to... | |
302 | * data/: here. | |
303 | ||
894dd62e PE |
304 | 2002-01-29 Paul Eggert <eggert@twinsun.com> |
305 | ||
306 | * src/bison.simple (YYSIZE_T): Do not define merely because | |
307 | YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined. | |
308 | On some platforms, <alloca.h> does not declare YYSTD (size_t). | |
309 | ||
82841af7 AD |
310 | 2002-01-27 Akim Demaille <akim@epita.fr> |
311 | ||
312 | Fix `%nonassoc and eof'. | |
313 | ||
314 | * src/state.c (errs_dup): Aaaah! The failure was due to bytes | |
315 | which were not properly copied! Replace | |
316 | memcpy (res->errs, src->errs, src->nerrs); | |
317 | with | |
318 | memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); | |
319 | !!! | |
320 | * tests/regression.at (%nonassoc and eof): Adjust to newest | |
321 | Autotest: `.' is not in the PATH. | |
322 | ||
318b76e9 AD |
323 | 2002-01-27 Akim Demaille <akim@epita.fr> |
324 | ||
325 | * tests/sets.at (AT_EXTRACT_SETS): New. | |
326 | (Nullable): Use it. | |
327 | (Firsts): New. | |
328 | ||
30d2f3d5 AD |
329 | 2002-01-26 Akim Demaille <akim@epita.fr> |
330 | ||
331 | * tests/actions.at, tests/calc.at, tests/headers.at, | |
332 | * tests/torture.at: Adjust to the newest Autotest which no longer | |
333 | forces `.' in the PATH. | |
334 | ||
30f8c395 AD |
335 | 2002-01-25 Akim Demaille <akim@epita.fr> |
336 | ||
337 | * tests/regression.at (%nonassoc and eof): New. | |
338 | Suggested by Robert Anisko. | |
339 | ||
29ae55f1 AD |
340 | 2002-01-24 Akim Demaille <akim@epita.fr> |
341 | ||
342 | Bison dumps core when trying to complain about broken input files. | |
343 | Reported by Cris van Pelt. | |
344 | ||
345 | * src/lex.c (parse_percent_token): Be sure to set token_buffer. | |
346 | * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge | |
347 | into... | |
348 | (Invalid inputs): Strengthen: exercise parse_percent_token. | |
349 | ||
2b548aa6 RA |
350 | 2002-01-24 Robert Anisko <robert.anisko@epita.fr> |
351 | ||
352 | * src/Makefile.am: Add bison.c++. | |
353 | * src/bison.c++: New skeleton. | |
354 | ||
bb0146c2 AD |
355 | 2002-01-21 Paolo Bonzini <bonzini@gnu.org> |
356 | ||
357 | * po/it.po: New. | |
358 | ||
bec30531 AD |
359 | 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net> |
360 | ||
361 | * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. | |
362 | ||
fc6edc45 MA |
363 | 2002-01-20 Marc Autret <marc@gnu.org> |
364 | ||
365 | * src/files.c (compute_output_file_names): Fix | |
366 | ||
5e5d5415 MA |
367 | 2002-01-20 Marc Autret <marc@gnu.org> |
368 | ||
369 | * tests/output.at: New test. | |
370 | * src/files.c (compute_base_names): Don't map extensions when | |
371 | the YACC flag is set, use defaults. | |
372 | Reported by Evgeny Stambulchik. | |
373 | ||
44ea3fbd MA |
374 | 2002-01-20 Marc Autret <marc@gnu.org> |
375 | ||
bb0146c2 | 376 | * src/system.h: Need to define __attribute__ away for non-GCC |
44ea3fbd MA |
377 | compilers as well (i.e. the vendor C compiler). |
378 | Suggested by Albert Chin-A-Young. | |
379 | ||
338963d1 TVH |
380 | 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be> |
381 | ||
382 | * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the | |
383 | canonical definition. | |
384 | * src/system.h: Use the canonical definition for PARAMS (avoids | |
385 | a conflict with the macro from lib/hash.h). | |
386 | ||
c57b2479 AD |
387 | 2002-01-11 Akim Demaille <akim@epita.fr> |
388 | ||
389 | * configure.in: Use AC_FUNC_STRNLEN. | |
d9e9746c | 390 | Fixes the failures observed on AIX 4.3 by H.Merijn Brand. |
c57b2479 | 391 | |
b85810ae AD |
392 | 2002-01-09 Akim Demaille <akim@epita.fr> |
393 | ||
394 | * src/files.c, src/files.h (output_infix): New. | |
395 | (tab_extension): Remove. | |
396 | (compute_base_names): Compute the former, drop the latter. | |
397 | * src/output.c (prepare): Insert the muscles `output-infix', and | |
398 | `output-suffix'. | |
399 | * src/parse-skel.y (string, string.1): New. | |
400 | (section.header): Use it. | |
401 | (section.yacc): Remove. | |
402 | (prefix): Remove too. | |
403 | * src/scan-skel.l: Adjust. | |
404 | * src/bison.simple, src/bison.hairy: Adjust. | |
405 | ||
cae60122 AD |
406 | 2002-01-09 Akim Demaille <akim@epita.fr> |
407 | ||
408 | * configure.in (WERROR_CFLAGS): Compute it. | |
409 | * src/Makefile.am (CFLAGS): Pass it. | |
410 | * tests/atlocal.in (CFLAGS): Idem. | |
411 | * src/files.c: Fix a few warnings. | |
412 | (get_extension_index): Remove, unused. | |
413 | ||
ae404801 AD |
414 | 2002-01-08 Akim Demaille <akim@epita.fr> |
415 | ||
416 | * src/getargs.c (AS_FILE_NAME): New. | |
417 | (getargs): Use it to convert DOSish file names. | |
418 | * src/files.c (base_name): Rename as full_base_name to avoid | |
419 | clashes with `base_name ()'. | |
420 | (filename_split): New. | |
421 | (compute_base_names): N-th rewrite, using filename_split. | |
422 | ||
22312b71 AD |
423 | 2002-01-08 Akim Demaille <akim@epita.fr> |
424 | ||
425 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
426 | New, stolen from the Fileutils 4.1. | |
427 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
428 | * configure.in: Check for the presence of memrchr, and of its | |
429 | prototype. | |
430 | ||
a67cef01 TVH |
431 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> |
432 | ||
433 | * lib/hash.h (__P): Added definition for this macro. | |
434 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
435 | BUILT_SOURCES, to ensure they are generated first. | |
436 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
437 | %error-verbose to allow bootstrapping with bison 1.30x. | |
438 | ||
2b25d624 AD |
439 | 2002-01-06 Akim Demaille <akim@epita.fr> |
440 | ||
441 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
442 | convention is to fetch on entry. | |
443 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
444 | 'switch' without a following semicolon. | |
445 | * tests/regression.at (braces parsing): New. | |
446 | ||
3460813b AD |
447 | 2002-01-06 Akim Demaille <akim@epita.fr> |
448 | ||
449 | Bison is dead wrong in its RR conflict reports. | |
450 | ||
451 | * tests/torture.at (GNU Cim Grammar): New. | |
452 | * src/conflicts.c (count_rr_conflicts): Fix. | |
453 | ||
73784c64 AD |
454 | 2002-01-06 Akim Demaille <akim@epita.fr> |
455 | ||
456 | Creating package.m4 from configure.ac causes too many problems. | |
457 | ||
458 | * tests/Makefile.am (package.m4): Create it by hand, | |
459 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
460 | ||
25d81090 AD |
461 | 2002-01-06 Akim Demaille <akim@epita.fr> |
462 | ||
463 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
464 | skeleton.h. | |
465 | ||
a9b8959e PE |
466 | 2002-01-04 Paul Eggert <eggert@twinsun.com> |
467 | ||
468 | * doc/bison.texinfo (Debugging): | |
469 | Remove YYSTDERR; it's no longer defined or used. | |
470 | Also, s/cstdio.h/cstdio/. | |
471 | ||
25d81090 AD |
472 | 2002-01-03 Akim Demaille <akim@epita.fr> |
473 | ||
474 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
475 | ||
1109455c AD |
476 | 2002-01-03 Akim Demaille <akim@epita.fr> |
477 | ||
478 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
479 | tracing code to --trace, wait for a better --trace option, with | |
480 | args. | |
481 | ||
7ea5e977 AD |
482 | 2002-01-03 Akim Demaille <akim@epita.fr> |
483 | ||
484 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
485 | The ISO C++ standard is extremely clear about it: stderr is | |
486 | considered a macro, not a regular symbol (see table 94 `Header | |
487 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
488 | Therefore std:: does not apply to it. It still does with fprintf. | |
489 | Also, s/cstdio.h/cstdio/. | |
490 | ||
fab5b110 AD |
491 | 2002-01-03 Akim Demaille <akim@epita.fr> |
492 | ||
493 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
494 | for non system headers. | |
495 | ||
aed7fd9b AD |
496 | 2002-01-02 Akim Demaille <akim@epita.fr> |
497 | ||
498 | Equip the skeleton chain with location tracking, runtime trace, | |
499 | pure parser and scanner. | |
500 | ||
501 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
502 | renaming. | |
503 | (%union): Having several members with the same type does not help | |
504 | type mismatches, simplify. | |
505 | (YYPRINT, yyprint): New. | |
506 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
507 | (skel_error): this. | |
508 | Handle locations. | |
509 | * src/scan-skel.l: Adjust to these changes. | |
510 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
511 | (LOCATION_PRINT, skel_control_t): New. | |
512 | ||
24fad99e AD |
513 | 2001-12-30 Akim Demaille <akim@epita.fr> |
514 | ||
515 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
516 | replace `gb' with BLANKS. | |
517 | * src/scan-skel.l: Adjust. | |
518 | ||
a4b36db4 AD |
519 | 2001-12-30 Akim Demaille <akim@epita.fr> |
520 | ||
521 | * src/system.h: We don't need nor want bcopy. | |
522 | Throw away MS-DOS crap: we don't need getpid. | |
523 | * configure.in: We don't need strndup. It was even causing | |
524 | problems: because Flex includes the headers *before* us, | |
525 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
526 | not visible. | |
527 | * lib/xstrndup.c: New. | |
528 | * src/scan-skel.l: Use it. | |
529 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
530 | * src/parse-skel.y: Use %directives instead of #defines. | |
531 | ||
1239777d AD |
532 | 2001-12-30 Akim Demaille <akim@epita.fr> |
533 | ||
534 | * src/skeleton.h: New. | |
535 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
536 | code. | |
537 | * src/output.h (get_lines_number, actions_output, guards_output) | |
538 | (token_definitions_output): Prototype them. | |
539 | * src/parse-skel.y: Add the license notice. | |
540 | Include output.h and skeleton.h. | |
541 | (process_skeleton): Returns void, and takes a single parameter. | |
542 | * src/scan-skel.l: Add the license notice. | |
543 | Include skeleton.h. | |
544 | Don't use %option yylineno: it seems that then Flex imagines | |
545 | REJECT has been used, and therefore it won't reallocate its | |
546 | buffers (which makes no other sense to me than a bug). It results | |
547 | in warnings for `unused: yy_flex_realloc'. | |
548 | ||
9b3add5b RA |
549 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> |
550 | ||
551 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
552 | (MUSCLE_INSERT_PREFIX): ...to there. | |
553 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
554 | (MUSCLE_INSERT_PREFIX): Move from here... | |
555 | ||
556 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
557 | names. This parser skeleton is still broken, but Bison should not | |
558 | choke on a bad muscle 'syntax'. | |
559 | * src/bison.simple: Add a section directive. Put braces around muscle | |
560 | names. | |
561 | ||
562 | * src/files.h (strsuffix, stringappend): Add declarations. | |
563 | (tab_extension): Add declaration. | |
564 | (short_base_name): Add declaration. | |
565 | ||
566 | * src/files.c (strsuffix, stringappend): No longer static. These | |
567 | functions are used in the skeleton parser. | |
568 | (tab_extension): New. | |
569 | (compute_base_names): Use the computations done in this function | |
fab5b110 | 570 | to guess if the generated parsers should have '.tab' in their |
9b3add5b RA |
571 | names. |
572 | (short_base_name): No longer static. | |
573 | ||
574 | * src/output.c (output_skeleton): New. | |
575 | (output): Disable call to output_master_parser, and give a try to | |
576 | a new skeleton handling system. | |
577 | (guards_output, actions_output): No longer static. | |
578 | (token_definitions_output, get_lines_number): No longer static. | |
579 | ||
580 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
581 | ||
fab5b110 | 582 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and |
9b3add5b RA |
583 | parse-skel.y. |
584 | ||
585 | * src/parse-skel.y: New file. | |
586 | * src/scan-skel.l: New file. | |
587 | ||
b5b61c61 AD |
588 | 2001-12-29 Akim Demaille <akim@epita.fr> |
589 | ||
590 | %name-prefix is broken. | |
591 | ||
592 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
593 | Adjust all dependencies. | |
594 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
595 | %name-prefix. | |
596 | ||
597 | Renaming yylval but not yylloc is not consistent. Now we do. | |
598 | ||
599 | * src/bison.simple: Prefix yylloc if used. | |
600 | * doc/bison.texinfo (Decl Summary): Document that. | |
601 | ||
8c9a50be AD |
602 | 2001-12-29 Akim Demaille <akim@epita.fr> |
603 | ||
604 | * doc/bison.texinfo: Promote `%long-directive' over | |
605 | `%long_directive'. | |
606 | Remove all references to fixed-output-files, yacc is enough. | |
607 | ||
d99361e6 AD |
608 | 2001-12-29 Akim Demaille <akim@epita.fr> |
609 | ||
610 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
611 | user prologue. These are defaults. | |
612 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
613 | define YYDEBUG and YYERROR_VERBOSE. | |
614 | ||
b9cecb91 AD |
615 | 2001-12-29 Akim Demaille <akim@epita.fr> |
616 | ||
617 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
618 | yylloc. | |
619 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
620 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
621 | Move to... | |
622 | * tests/headers.at: here. | |
623 | ||
aea13e97 AD |
624 | 2001-12-29 Akim Demaille <akim@epita.fr> |
625 | ||
626 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
627 | ||
931394cb AD |
628 | 2001-12-29 Akim Demaille <akim@epita.fr> |
629 | ||
630 | * tests/actions.at (Mid-rule actions): Output on a single line | |
631 | instead of several. | |
632 | ||
704a47c4 AD |
633 | 2001-12-29 Akim Demaille <akim@epita.fr> |
634 | ||
635 | * doc/bison.texinfo: Formatting changes. | |
636 | ||
091e20bb AD |
637 | 2001-12-29 Akim Demaille <akim@epita.fr> |
638 | ||
639 | Don't store the token defs in a muscle, just be ready to output it | |
640 | on command. Now possible via `symbols'. Fixes a memory leak. | |
641 | ||
642 | * src/output.c (token_definitions_output): New. | |
643 | (output_parser, header_output): Use it. | |
644 | * src/reader.c (symbols_save): Remove. | |
645 | ||
cce71710 AD |
646 | 2001-12-29 Akim Demaille <akim@epita.fr> |
647 | ||
648 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
649 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
650 | default. | |
651 | ||
82c035a8 AD |
652 | 2001-12-29 Akim Demaille <akim@epita.fr> |
653 | ||
654 | Mid-rule actions are simply... ignored! | |
655 | ||
656 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
657 | the empty-rule associated to the dummy symbol, not to the host | |
658 | rule. | |
659 | * tests/actions.at (Mid-rule actions): New. | |
660 | ||
8419d367 AD |
661 | 2001-12-29 Akim Demaille <akim@epita.fr> |
662 | ||
663 | Memory leak. | |
664 | ||
665 | * src/reader.c (reader): Free grammar. | |
666 | ||
375d5806 AD |
667 | 2001-12-29 Akim Demaille <akim@epita.fr> |
668 | ||
669 | Memory leak. | |
670 | ||
671 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
672 | since it allocates it for each state, although only one is needed. | |
673 | (allocate_storage): Do it here. | |
674 | ||
f51cb8ff AD |
675 | 2001-12-29 Akim Demaille <akim@epita.fr> |
676 | ||
677 | * src/options.h, src/options.c (create_long_option_table): Rename | |
678 | as... | |
679 | (long_option_table_new): this, with a clearer prototype. | |
680 | (percent_table): Remove, unused, | |
681 | * src/getargs.c (getargs): Adjust. | |
682 | ||
29e88316 AD |
683 | 2001-12-29 Akim Demaille <akim@epita.fr> |
684 | ||
685 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
686 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
687 | as states. | |
688 | ||
b9f71f19 AD |
689 | 2001-12-29 Akim Demaille <akim@epita.fr> |
690 | ||
691 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
692 | Sorry, I don't understand exactly what it is, no better name... | |
693 | ||
1a2b5d37 AD |
694 | 2001-12-29 Akim Demaille <akim@epita.fr> |
695 | ||
696 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
697 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
698 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
699 | as rules. | |
700 | ||
1cca533e AD |
701 | 2001-12-29 Akim Demaille <akim@epita.fr> |
702 | ||
703 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
704 | ago. | |
705 | ||
c03ae966 AD |
706 | 2001-12-29 Akim Demaille <akim@epita.fr> |
707 | ||
708 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
709 | Adjust all users to use symbols[i]->user_token_number. | |
710 | ||
5a670b1e AD |
711 | 2001-12-29 Akim Demaille <akim@epita.fr> |
712 | ||
713 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
714 | Adjust all users to use symbols[i]->prec or ->assoc. | |
715 | ||
ad949da9 AD |
716 | 2001-12-29 Akim Demaille <akim@epita.fr> |
717 | ||
718 | * src/reader.c, src/reader.h (tags): Remove. | |
719 | Adjust all users to use symbols[i]->tag. | |
720 | ||
0e78e603 AD |
721 | 2001-12-29 Akim Demaille <akim@epita.fr> |
722 | ||
723 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
724 | and rule_table. | |
725 | * src/reader.c (packsymbols): Fill this table. | |
726 | Drop sprec. | |
727 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
728 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
729 | single table. | |
730 | Use symbols[i]->tag instead of tags[i]. | |
731 | ||
213e640e AD |
732 | 2001-12-29 Akim Demaille <akim@epita.fr> |
733 | ||
734 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
735 | In addition, put a comment in there, to replace... | |
736 | * tests/regression.at (%union and C comments): Remove. | |
737 | ||
e7b8bef1 AD |
738 | 2001-12-29 Akim Demaille <akim@epita.fr> |
739 | ||
740 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
741 | output as expected output. The contents *seem* right to me, but I | |
742 | can't pretend reading perfectly parser tables... Nonetheless, all | |
743 | the other tests pass correctly, the table look OK, even though the | |
744 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
745 | harmless). | |
746 | ||
b68e7744 AD |
747 | 2001-12-29 Akim Demaille <akim@epita.fr> |
748 | ||
749 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
750 | rules read. In other words, add it _after_ having performed | |
751 | grammar sanity checks. | |
752 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
753 | ||
78d5bae9 AD |
754 | 2001-12-29 Akim Demaille <akim@epita.fr> |
755 | ||
756 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
757 | visible, and some states have now a different number. | |
758 | ||
ff442794 AD |
759 | 2001-12-29 Akim Demaille <akim@epita.fr> |
760 | ||
761 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
762 | of the first rule. | |
763 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
764 | (Solved SR Conflicts): Adjust rule 0's line number. | |
765 | ||
610ab194 AD |
766 | 2001-12-29 Akim Demaille <akim@epita.fr> |
767 | ||
768 | Fix the `GAWK Grammar' failure. | |
769 | ||
770 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
771 | the reductions of the first state which was mistakenly confused | |
772 | with the final state because precisely final_state was initialized | |
773 | to 0. | |
774 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
775 | now noticed by Bison. | |
776 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
777 | have a reduction on $default. | |
778 | ||
29d29c8f AD |
779 | 2001-12-29 Akim Demaille <akim@epita.fr> |
780 | ||
781 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
782 | rule line numbers. | |
783 | * src/closure.c (print_closure): Likewise. | |
784 | * src/derives.c (print_derives): Likewise. | |
785 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
786 | now. | |
787 | ||
7c6b64d0 AD |
788 | 2001-12-29 Akim Demaille <akim@epita.fr> |
789 | ||
790 | * src/lalr.c (lookaheads_print): New. | |
791 | (lalr): Call it when --trace-flag. | |
792 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
793 | are dumped. | |
794 | ||
3d4daee3 AD |
795 | 2001-12-29 Akim Demaille <akim@epita.fr> |
796 | ||
797 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
798 | when walking through ritem, even via rule->rhs. | |
799 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
800 | (useful_production, useless_nonterminals): Likewise. | |
801 | (reduce_grammar_tables): Likewise, plus update nritems. | |
802 | * src/nullable.c (set_nullable): Likewise. | |
803 | * src/lalr.c (build_relations): Likewise. | |
804 | * tests/sets.at (Nullable): Adjust. | |
805 | Fortunately, now, the $axiom is no longer nullable. | |
806 | ||
9e7f6bbd AD |
807 | 2001-12-29 Akim Demaille <akim@epita.fr> |
808 | ||
809 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
810 | the 0-sentinel. | |
811 | * src/gram.c (ritem_longest_rhs): Likewise. | |
812 | * src/reduce.c (nonterminals_reduce): Likewise. | |
813 | * src/print_graph.c (print_graph): Likewise. | |
814 | * src/output.c (output_rule_data): Likewise. | |
815 | * src/nullable.c (set_nullable): Likewise. | |
816 | ||
255ef638 AD |
817 | 2001-12-29 Akim Demaille <akim@epita.fr> |
818 | ||
819 | * src/output.c: Comment changes. | |
820 | ||
0d8a7363 AD |
821 | 2001-12-27 Paul Eggert <eggert@twinsun.com> |
822 | ||
823 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
824 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
825 | Sparc, as they were causing more porting problems than the | |
826 | (minor) performance improvement was worth. | |
827 | ||
828 | Also, catch up with 1.31's YYSTD. | |
829 | ||
3db472b9 AD |
830 | 2001-12-27 Akim Demaille <akim@epita.fr> |
831 | ||
832 | * src/output.c (output_gram): Rely on nritems, not the | |
833 | 0-sentinel. See below. | |
834 | Use -1 as separator, not 0. | |
835 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
836 | Rely on -1 as separator in yyrhs, instead of 0. | |
837 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
838 | twice `Now at end of input', therefore there are two lines less to | |
839 | expect. | |
840 | ||
b365aa05 AD |
841 | 2001-12-27 Akim Demaille <akim@epita.fr> |
842 | ||
843 | * tests/regression.at (Unresolved SR Conflicts): | |
844 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
845 | below. | |
846 | ||
30171f79 AD |
847 | 2001-12-27 Akim Demaille <akim@epita.fr> |
848 | ||
849 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
850 | is reached by eoftoken. | |
851 | (insert_start_shifting_state, insert_eof_shifting_state) | |
852 | (insert_accepting_state, augment_automaton): Remove, since now | |
853 | these states are automatically computed from the initial state. | |
854 | (generate_states): Adjust. | |
855 | * src/print.c: When reporting a rule number to the user, substract | |
856 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
857 | * src/reduce.c: Likewise. | |
858 | * src/print_graph.c (print_core): For the time being, just as for | |
859 | the report, depend upon --trace-flags to dump the full set of | |
860 | items. | |
861 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
862 | 0: `$axiom: START-SYMBOL $'. | |
863 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
864 | number of the states has changed (the final state is no longer | |
865 | necessarily the last), catch up. | |
866 | ||
75142d45 AD |
867 | 2001-12-27 Akim Demaille <akim@epita.fr> |
868 | ||
869 | Try to make the use of the eoftoken valid. Given that its value | |
870 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
871 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
872 | instead of the 0-sentinel. | |
873 | ||
874 | * src/gram.h, src/gram.c (nritems): New. | |
875 | Expected to be duplication of nitems, but for the time being... | |
876 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
877 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
878 | * src/closure.c (print_closure, print_fderives): Likewise. | |
879 | * src/gram.c (ritem_print): Likewise. | |
880 | * src/print.c (print_core, print_grammar): Likewise. | |
881 | * src/print_graph.c: Likewise. | |
882 | ||
b7c49edf AD |
883 | 2001-12-27 Akim Demaille <akim@epita.fr> |
884 | ||
885 | * src/main.c (main): If there are complains after grammar | |
886 | reductions, then output the report anyway if requested, then die. | |
887 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
888 | * src/reader.c (eoftoken): New. | |
889 | (parse_token_decl): If the token being defined has value `0', it | |
890 | is the eoftoken. | |
891 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
892 | Be sure to preserve the value of the eoftoken. | |
893 | (reader): Make sure eoftoken is defined. | |
894 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
895 | * src/print.c (print_grammar): Don't special case the eof token. | |
896 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
897 | lie anyway, albeit pleasant. | |
898 | * tests/calc.at: Exercise error messages with eoftoken. | |
899 | Change the grammar so that empty input is invalid. | |
900 | Adjust expectations. | |
901 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
902 | ||
ec2da99f AD |
903 | 2001-12-27 Akim Demaille <akim@epita.fr> |
904 | ||
905 | * configure.in: Check the protos of strchr ans strspn. | |
906 | Replace strchr if needed. | |
907 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
908 | missing. | |
909 | * lib/strchr.c: New. | |
910 | * src/reader.c (symbols_save): Use strchr. | |
911 | ||
8adfa272 AD |
912 | 2001-12-27 Akim Demaille <akim@epita.fr> |
913 | ||
914 | * src/print.c, src/print_graph.c (escape): New. | |
915 | Use it to quote the TAGS outputs. | |
916 | * src/print_graph.c (print_state): Now errors are in red, and | |
917 | reductions in green. | |
918 | Prefer high to wide: output the state number on a line of its own. | |
919 | ||
80dac38c AD |
920 | 2001-12-27 Akim Demaille <akim@epita.fr> |
921 | ||
922 | * src/state.h, src/state.c (reductions_new): New. | |
923 | * src/LR0.c (set_state_table): Let all the states have a | |
924 | `reductions', even if reduced to 0. | |
925 | (save_reductions): Adjust. | |
926 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
927 | * src/print.c (print_reductions, print_actions): Adjust. | |
928 | * src/output.c (action_row): Adjust. | |
929 | ||
2cec70b9 AD |
930 | 2001-12-27 Akim Demaille <akim@epita.fr> |
931 | ||
932 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
933 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
934 | even if reduced to 0. | |
935 | * src/print.c (print_errs, print_reductions): Adjust. | |
936 | * src/output.c (output_actions, action_row): Adjust. | |
937 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
938 | ||
13ca549a AD |
939 | 2001-12-27 Akim Demaille <akim@epita.fr> |
940 | ||
941 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
942 | ||
5092aba5 AD |
943 | 2001-12-27 Akim Demaille <akim@epita.fr> |
944 | ||
945 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
946 | * src/print.c: here. | |
947 | (lookaheadset, shiftset): New, used as additional storage by | |
948 | print_reductions. | |
949 | (print_results): Adjust. | |
950 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
951 | (print_actions): here. | |
952 | * src/print_graph.c (print_actions): Remove dead code. | |
953 | ||
11e2beca AD |
954 | 2001-12-27 Akim Demaille <akim@epita.fr> |
955 | ||
956 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
957 | `$n' and `@n'. | |
958 | ||
dac3c910 AD |
959 | 2001-12-27 Akim Demaille <akim@epita.fr> |
960 | ||
961 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
962 | (build_relations): Adjust. | |
963 | ||
d0b0fefa AD |
964 | 2001-12-27 Akim Demaille <akim@epita.fr> |
965 | ||
966 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
967 | duplication. | |
968 | ||
adc8c848 AD |
969 | 2001-12-27 Akim Demaille <akim@epita.fr> |
970 | ||
971 | * src/reader.c (packgram): Catch nitems overflows. | |
972 | ||
14d293ac AD |
973 | 2001-12-27 Akim Demaille <akim@epita.fr> |
974 | ||
975 | * src/files.c, src/files.h (guard_obstack): Remove. | |
976 | * src/output.c (output): Adjust. | |
977 | * src/reader.c (parse_braces): New, factoring... | |
978 | (copy_action, copy_guard): these two which are renamed as... | |
979 | (parse_action, parse_guard): these. | |
980 | As a voluntary consequence, using braces around guards is now | |
981 | mandatory. | |
982 | ||
f499b062 AD |
983 | 2001-12-27 Akim Demaille <akim@epita.fr> |
984 | ||
985 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
986 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
987 | members. | |
988 | (symbol_list_new): Adjust. | |
989 | (copy_action): action_line is the first line, not the last. | |
990 | (copy_guard): Just as for actions, store the `action' only, not | |
991 | the switch/case/break flesh. | |
992 | Don't parse the user action that might follow the guard, let... | |
993 | (readgram): do it, i.e., now, there can be an action after a | |
994 | guard. | |
995 | In other words the guard is just explicitly optional. | |
996 | (packgram): Adjust. | |
997 | * src/output.c (guards_output): New. | |
998 | (output_parser): Call it when needed. | |
999 | (output): Also free the guard and attrs obstacks. | |
1000 | * src/files.c, src/files.h (obstack_save): Remove. | |
1001 | (output_files): Remove. | |
1002 | As a result, if one needs the former `.act' file, using an | |
1003 | appropriate skeleton which requires actions and guards is now | |
1004 | required. | |
1005 | * src/main.c (main): Adjust. | |
1006 | * tests/semantic.at: New. | |
1007 | * tests/regression.at: Use `input.y' as input file name. | |
1008 | Avoid 8+3 problems by requiring input.c when the test needs the | |
1009 | parser. | |
1010 | ||
d945f5cd AD |
1011 | 2001-12-27 Akim Demaille <akim@epita.fr> |
1012 | ||
1013 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
1014 | fields. | |
1015 | ||
d200e455 AD |
1016 | 2001-12-27 Akim Demaille <akim@epita.fr> |
1017 | ||
1018 | All the hacks using a final pseudo state are now useless. | |
1019 | ||
1020 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
1021 | * src/lalr.c (nLA): New. | |
1022 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
1023 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
1024 | ||
f9507c28 AD |
1025 | 2001-12-27 Akim Demaille <akim@epita.fr> |
1026 | ||
1027 | * src/output.c (action_row, token_actions): Use a state_t instead | |
1028 | of a integer, and nlookaheads instead of the following state's | |
1029 | lookaheadsp. | |
1030 | ||
065fbd27 AD |
1031 | 2001-12-27 Akim Demaille <akim@epita.fr> |
1032 | ||
1033 | * src/conflicts.c (log_resolution, flush_shift) | |
1034 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
1035 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
1036 | (conflicts_print, print_reductions): Use a state_t instead of an | |
1037 | integer when referring to a state. | |
1038 | As much as possible, depend upon nlookaheads, instead of the | |
1039 | `lookaheadsp' member of the following state (since lookaheads of | |
1040 | successive states are successive, the difference between state n + 1 | |
1041 | and n served as the number of lookaheads for state n). | |
1042 | * src/lalr.c (add_lookback_edge): Likewise. | |
1043 | * src/print.c (print_core, print_actions, print_state) | |
1044 | (print_results): Likewise. | |
1045 | * src/print_graph.c (print_core, print_actions, print_state) | |
1046 | (print_graph): Likewise. | |
1047 | * src/conflicts.h: Adjust. | |
1048 | ||
1b177bd7 AD |
1049 | 2001-12-27 Akim Demaille <akim@epita.fr> |
1050 | ||
1051 | * src/bison.hairy: Formatting/comment changes. | |
1052 | ANSIfy. | |
1053 | Remove `register' indications. | |
1054 | Add plenty of `static'. | |
1055 | ||
7742ddeb AD |
1056 | 2001-12-27 Akim Demaille <akim@epita.fr> |
1057 | ||
1058 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
1059 | duplicates ntokens. | |
1060 | * src/bison.simple: Formatting/comment changes. | |
1061 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
1062 | is an undocumented synonym. | |
1063 | ||
1fa14068 AD |
1064 | 2001-12-22 Akim Demaille <akim@epita.fr> |
1065 | ||
1066 | * src/output.c (output_table_data): Change the prototype to use | |
1067 | `int' for array ranges: some invocations do pass an int, not a | |
1068 | short. | |
1069 | Reported by Wayne Green. | |
1070 | ||
b9752825 AD |
1071 | 2001-12-22 Akim Demaille <akim@epita.fr> |
1072 | ||
1073 | Some actions of web2c.y are improperly triggered. | |
1074 | Reported by Mike Castle. | |
1075 | ||
1076 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
1077 | * tests/regression.at (Web2c): Rename as... | |
1078 | (Web2c Report): this. | |
1079 | (Web2c Actions): New. | |
1080 | ||
776209d6 AD |
1081 | 2001-12-22 Akim Demaille <akim@epita.fr> |
1082 | ||
1083 | Reductions in web2c.y are improperly reported. | |
1084 | Reported by Mike Castle. | |
1085 | ||
1086 | * src/conflicts.c (print_reductions): Fix. | |
1087 | * tests/regression.at (Web2c): New. | |
1088 | ||
275fc3ad AD |
1089 | 2001-12-18 Akim Demaille <akim@epita.fr> |
1090 | ||
1091 | Some host fail on `assert (!"foo")', which expands to | |
1092 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
1093 | Reported by Nelson Beebee. | |
1094 | ||
1095 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
1096 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
1097 | ||
897668ee MA |
1098 | 2001-12-17 Marc Autret <autret_m@epita.fr> |
1099 | ||
1100 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
1101 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
1102 | New line counter 'skeleton_line' (skeleton-line muscle). | |
1103 | ||
ab3399e0 PE |
1104 | 2001-12-17 Paul Eggert <eggert@twinsun.com> |
1105 | ||
1106 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
1107 | YYDEBUG must be defined to a nonzero value. | |
1108 | ||
1109 | * src/bison.simple (yytname): Do not assume that the user defines | |
1110 | YYDEBUG to a properly parenthesized expression. | |
1111 | ||
3877f72b AD |
1112 | 2001-12-17 Akim Demaille <akim@epita.fr> |
1113 | ||
1114 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
1115 | nlookaheads is a new member. | |
1116 | Adjust all users. | |
1117 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
1118 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
1119 | state. | |
776209d6 | 1120 | |
331dbc1b AD |
1121 | 2001-12-17 Akim Demaille <akim@epita.fr> |
1122 | ||
1123 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
1124 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
1125 | let... | |
1126 | * src/reader.c (reader): Do it. | |
776209d6 | 1127 | |
be750e4c AD |
1128 | 2001-12-17 Akim Demaille <akim@epita.fr> |
1129 | ||
1130 | * src/conflicts.c (print_reductions): Formatting changes. | |
776209d6 | 1131 | |
709ae8c6 AD |
1132 | 2001-12-17 Akim Demaille <akim@epita.fr> |
1133 | ||
1134 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
1135 | (flush_reduce): New. | |
1136 | (resolve_sr_conflict): Adjust. | |
776209d6 | 1137 | |
f87685c3 AD |
1138 | 2001-12-17 Akim Demaille <akim@epita.fr> |
1139 | ||
1140 | * src/output.c (output_obstack): Be static and rename as... | |
1141 | (format_obstack): this, to avoid any confusion with files.c's | |
1142 | output_obstack. | |
1143 | * src/reader.h (muscle_obstack): Move to... | |
1144 | * src/output.h: here, since it's defined in output.c. | |
1145 | ||
837491d8 AD |
1146 | 2001-12-17 Akim Demaille <akim@epita.fr> |
1147 | ||
1148 | * src/output.c (action_row, save_column, default_goto) | |
1149 | (sort_actions, matching_state, pack_vector): Better variable | |
1150 | locality. | |
1151 | ||
796d61fb AD |
1152 | 2001-12-17 Akim Demaille <akim@epita.fr> |
1153 | ||
1154 | * src/output.c: Various formatting changes. | |
776209d6 | 1155 | |
64d15509 AD |
1156 | 2001-12-17 Akim Demaille <akim@epita.fr> |
1157 | ||
1158 | * src/files.c (output_files): Free the output_obstack. | |
1159 | * src/main.c (main): Call print and print_graph conditionally. | |
1160 | * src/print.c (print): Work unconditionally. | |
1161 | * src/print_graph.c (print_graph): Work unconditionally. | |
1162 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
1163 | ||
fbc8ecb7 MA |
1164 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
1165 | ||
1166 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
1167 | there is one less line per action. | |
1168 | ||
f0440388 MA |
1169 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
1170 | ||
1171 | * src/bison.simple: Remove a useless #line directive. | |
1172 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
1173 | * src/output.c (get_lines_number): New. | |
776209d6 | 1174 | (output_parser): Adjust, now takes care about the lines of a |
f0440388 MA |
1175 | output muscles. |
1176 | Fix line numbering. | |
1177 | (actions_output): Computes the number of lines taken by actions. | |
1178 | (output_master_parser): Insert new skeleton which is the name of | |
1179 | the output parser file name. | |
1180 | ||
a79986b8 MA |
1181 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
1182 | ||
1183 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
1184 | ||
4ec8e00f MA |
1185 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
1186 | ||
1187 | * src/output.c (output_gram): Keep track of the hairy one. | |
1188 | ||
1a4648ff AD |
1189 | 2001-12-15 Akim Demaille <akim@epita.fr> |
1190 | ||
1191 | Make `make distcheck' work. | |
1192 | ||
1193 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
1194 | system.h which uses libgettext.h. | |
1195 | ||
9c2c67e6 AD |
1196 | 2001-12-15 Akim Demaille <akim@epita.fr> |
1197 | ||
1198 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
1199 | otherwise, since we range over their symbols, we might look at a | |
1200 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
1201 | `nvars', hence we overflow our arrays. | |
1202 | ||
93ede233 AD |
1203 | 2001-12-15 Akim Demaille <akim@epita.fr> |
1204 | ||
1205 | The header can also be produced directly, without any obstack! | |
1206 | Yahoo! | |
1207 | ||
1208 | * src/files.c, src/files.h (defines_obstack): Remove. | |
1209 | (compute_header_macro): Global. | |
1210 | (defines_obstack_save): Remove. | |
1211 | * src/reader.c (parse_union_decl): No longer output to | |
1212 | defines_obstack: its content can be found in the `stype' muscle | |
1213 | anyway. | |
1214 | (output_token_translations): Merge into... | |
1215 | (symbols_output): this. | |
1216 | Rename as... | |
1217 | (symbols_save): this. | |
1218 | (reader): Adjust. | |
1219 | * src/output.c (header_output): New. | |
1220 | (output): Call it. | |
1221 | ||
2666f928 AD |
1222 | 2001-12-15 Akim Demaille <akim@epita.fr> |
1223 | ||
1224 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
1225 | simultaneously, use one to define the `stype' muscle, and use the | |
1226 | value of the latter to fill defines_obstack. | |
1227 | (copy_comment): Remove. | |
1228 | (copy_comment2): Work for a single obstack. | |
1229 | Rename as... | |
1230 | (copy_comment): this. | |
1231 | ||
428046f8 AD |
1232 | 2001-12-15 Akim Demaille <akim@epita.fr> |
1233 | ||
1234 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
1235 | * src/reader.c (parse_union_decl): Revamp. | |
1236 | ||
ea52d706 AD |
1237 | 2001-12-15 Akim Demaille <akim@epita.fr> |
1238 | ||
1239 | Still making progress in separating Bison into (i) input, (ii) | |
1240 | process, (iii) output: now we can directly output the parser file | |
1241 | without using table_obstack at all. | |
1242 | ||
1243 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
1244 | (parser_file_name): New. | |
1245 | * src/files.c (compute_output_file_names): Compute it. | |
1246 | * src/output.c (actions_output, output_parser) | |
1247 | (output_master_parser): To a file instead of an obstack. | |
1248 | ||
3f96f4dc AD |
1249 | 2001-12-15 Akim Demaille <akim@epita.fr> |
1250 | ||
1251 | Attach actions to rules, instead of pre-outputting them to | |
1252 | actions_obstack. | |
1253 | ||
1254 | * src/gram.h (rule_t): action and action_line are new members. | |
1255 | * src/reader.c (symbol_list): Likewise. | |
1256 | (copy_action): Save the actions within the rule. | |
1257 | (packgram): Save them in rule_table. | |
1258 | * src/output.c (actions_output): New. | |
1259 | (output_parser): Use it on `%%actions'. | |
1260 | (output_rule_data): Don't free rule_table. | |
1261 | (output): Do it. | |
1262 | (prepare): Don't save the `action' muscle. | |
1263 | * src/bison.simple: s/%%action/%%actions/. | |
1264 | ||
51576fb3 AD |
1265 | 2001-12-15 Akim Demaille <akim@epita.fr> |
1266 | ||
1267 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
1268 | to the user action: let it fail if lacking. | |
dee049eb | 1269 | Suggested by Arnold Robbins and Tom Tromey. |
51576fb3 | 1270 | |
2648a72d AD |
1271 | 2001-12-14 Akim Demaille <akim@epita.fr> |
1272 | ||
1273 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
1274 | longer mess around with obstacks and int pointers. | |
1275 | Adjust all callers. | |
1276 | ||
92790e5b AD |
1277 | 2001-12-14 Akim Demaille <akim@epita.fr> |
1278 | ||
1279 | * src/lex.c (literalchar): Don't escape the special characters, | |
1280 | just decode them, and keep them as char (before, eol was output as | |
1281 | the 2 char string `\n' etc.). | |
1282 | * src/output.c (output_rule_data): Use quotearg to output the | |
1283 | token strings. | |
1284 | ||
927c1557 PE |
1285 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
1286 | ||
1287 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
1288 | Do not infringe on the global user namespace when using C++. | |
1289 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
1290 | All uses of `fprintf' and `stderr' changed. | |
1291 | ||
1292 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
1293 | ||
ed8e1f68 AD |
1294 | 2001-12-13 Akim Demaille <akim@epita.fr> |
1295 | ||
1296 | The computation of nullable is broken: it doesn't handle empty | |
1297 | RHS's properly. | |
1298 | ||
1299 | * tests/torture.at (GNU AWK Grammar): New. | |
1300 | * tests/sets.at (Nullable): New. | |
1301 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
1302 | `ritems', loop over the rules, and then over their rhs's. | |
1303 | ||
1304 | Work around Autotest bugs. | |
1305 | ||
1306 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
1307 | frame, because Autotest understand lines starting with a `+' as | |
1308 | traces from the shell. Then, they are not processed properly. | |
1309 | Admittedly an Autotest bug, but we don't have time to wait for | |
1310 | Autotest to catch up. | |
1311 | * tests/regression.at (Broken Closure): Adjust to the new table | |
1312 | frames. | |
1313 | Move to... | |
1314 | * tests/sets.at: here. | |
1315 | ||
cb581495 AD |
1316 | 2001-12-13 Akim Demaille <akim@epita.fr> |
1317 | ||
1318 | * src/closure.c (closure): Use nrules instead of playing tricks | |
1319 | with BITS_PER_WORD. | |
1320 | ||
2e729273 AD |
1321 | 2001-12-13 Akim Demaille <akim@epita.fr> |
1322 | ||
1323 | * src/print.c (print_actions): Output the handling of `$' as the | |
1324 | traces do: shifting the token EOF. Before EOF was treated as a | |
1325 | nonterminal. | |
1326 | * tests/regression.at: Adjust some tests. | |
1327 | * src/print_graph.c (print_core): Complete the set of items via | |
1328 | closure. The next-to-final and final states are still unsatisfying, | |
1329 | but that's to be addressed elsewhere. | |
1330 | No longer output the rule numbers, but do output the state number. | |
1331 | A single loop for the shifts + gotos is enough, but picked a | |
1332 | distinct color for each. | |
1333 | (print_graph): Initialize and finalize closure. | |
1334 | ||
107f7dfb AD |
1335 | 2001-12-13 Akim Demaille <akim@epita.fr> |
1336 | ||
1337 | * src/reader.c (readgram): Remove dead code, an strip useless | |
1338 | braces. | |
1339 | (get_type): Remove, unused. | |
1340 | ||
9b53a24f AD |
1341 | 2001-12-12 Akim Demaille <akim@epita.fr> |
1342 | ||
1343 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
1344 | on that of lib/error.c. | |
1345 | ||
dbfb6dcd AD |
1346 | 2001-12-12 Akim Demaille <akim@epita.fr> |
1347 | ||
1348 | Some hosts don't like `/' in includes. | |
1349 | ||
1350 | * src/system.h: Include libgettext.h without qualifying the path. | |
1351 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
1352 | $(top_srcdir). | |
1353 | ||
c25fb648 MA |
1354 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
1355 | ||
1356 | * src/output.c (output_parser): Remove useless muscle. | |
1357 | ||
710ddc4f MA |
1358 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
1359 | ||
1360 | * src/bison.simple: Remove #line just before %%epilogue. It | |
1361 | is now handled in ... | |
1362 | * src/reader.c (read_additionnal_code): Add the output of a | |
1363 | #line for the epilogue. | |
1364 | ||
e83d80b8 MA |
1365 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
1366 | ||
927c1557 | 1367 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
1368 | replace precedent remove. |
1369 | * src/bison.simple: Remove #line before %%prologue because | |
1370 | %%input-line is wrong at this time. | |
1371 | ||
971d5158 MA |
1372 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
1373 | ||
1374 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 1375 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 1376 | |
5edafffd AD |
1377 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1378 | ||
1379 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
1380 | * src/LR0.c (set_state_table): here. | |
1381 | * src/lalr.c (lalr): Call it. | |
1382 | ||
0279f8e9 AD |
1383 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1384 | ||
1385 | * src/state.h (shifts): Remove the `number' member: shifts are | |
1386 | attached to state, hence no longer need to be labelled with a | |
1387 | state number. | |
1388 | ||
190c4f5f AD |
1389 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1390 | ||
1391 | Now that states have a complete set of members, the linked list of | |
1392 | shifts is useless: just fill directly the state's shifts member. | |
1393 | ||
1394 | * src/state.h (shifts): Remove the `next' member. | |
1395 | * src/LR0.c (first_state, last_state): Remove. | |
1396 | Adjust the callers. | |
1397 | (augment_automaton): Don't look for the shifts that must be added | |
1398 | a shift on EOF: it is those of the state we looked for! But now, | |
1399 | since shifts are attached, it is no longer needed to looking | |
1400 | merely by its id: its number. | |
1401 | ||
2a73b93d AD |
1402 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1403 | ||
1404 | * src/LR0.c (augment_automaton): Better variable locality. | |
1405 | Remove an impossible branch: if there is a state corresponding to | |
1406 | the start symbol being shifted, then there is shift for the start | |
1407 | symbol from the initial state. | |
1408 | ||
74392f6a AD |
1409 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1410 | ||
1411 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
1412 | only when appropriate: when insert_start_shifting_state' is not | |
1413 | invoked. | |
1414 | * tests/regression.at (Rule Line Numbers): Adjust. | |
1415 | ||
37c82725 AD |
1416 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1417 | ||
1418 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
1419 | merge the two cases addition shifts to the initial state. | |
1420 | ||
6a164e0c AD |
1421 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1422 | ||
1423 | * src/lalr.c (set_state_table): Move to... | |
1424 | * src/LR0.c: here. | |
1425 | * src/lalr.c (lalr): Don't call it... | |
1426 | * src/LR0.c (generate_states): do it. | |
1427 | * src/LR0.h (first_state): Remove, only the table is used. | |
1428 | ||
7215de24 AD |
1429 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1430 | ||
1431 | * src/LR0.h (first_shift, first_reduction): Remove. | |
1432 | * src/lalr.c: Don't use first_shift: find shifts through the | |
1433 | states. | |
1434 | ||
80e25d4d AD |
1435 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1436 | ||
1437 | * src/LR0.c: Attach shifts to states as soon as they are | |
1438 | computed. | |
1439 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
1440 | state, just assert that the mapping was properly done. | |
1441 | ||
0ab3728b AD |
1442 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1443 | ||
1444 | * src/LR0.c (insert_start_shift): Rename as... | |
1445 | (insert_start_shifting_state): this. | |
1446 | (insert_eof_shifting_state, insert_accepting_state): New. | |
1447 | (augment_automaton): Adjust. | |
1448 | Better locality of the variables. | |
1449 | When looking if the start_symbol is shifted from the initial | |
1450 | state, using `while (... symbol != start_symbol ...)' sounds | |
1451 | better than `while (... symbol < start_symbol ...)': If fail | |
1452 | to see how the order between symbols could be relevant! | |
1453 | ||
78af9bbc AD |
1454 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1455 | ||
1456 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
1457 | `spec_file_prefix', declared by src/files.h. | |
1458 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
1459 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
1460 | * src/output.c (prepare): Adjust. | |
1461 | * src/reader.c (symbols_output): Likewise. | |
1462 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
1463 | ||
bdef2a41 AD |
1464 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1465 | ||
1466 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
1467 | `"0"'. | |
1468 | ||
3735969c AD |
1469 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1470 | ||
1471 | * src/reader.c (reader): Calling symbols_output once is enough. | |
1472 | ||
49701457 AD |
1473 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1474 | ||
1475 | Now that states have a complete set of members, the linked list of | |
1476 | reductions is useless: just fill directly the state's reductions | |
1477 | member. | |
1478 | ||
1479 | * src/state.h (struct reductions): Remove member `number' and | |
1480 | `next'. | |
1481 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
1482 | (save_reductions): Don't link the new reductions, store them in | |
1483 | this_state. | |
1484 | * src/lalr.c (set_state_table): No need to attach reductions to | |
1485 | states, it's already done. | |
1486 | * src/output.c (output_actions): No longer free the shifts, then | |
1487 | the reductions, then the states: free all the states and their | |
1488 | members. | |
1489 | ||
0edad749 AD |
1490 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1491 | ||
1492 | * src/options.c (OPTN, DRTV, BOTH): New. | |
1493 | (option_table): Use them. | |
1494 | ||
0edad749 AD |
1495 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
1496 | the job of system.h. | |
1497 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
1498 | reasons. | |
1499 | ||
5449dd0f AD |
1500 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1501 | ||
1502 | * src/output.c (output, prepare): Make sure the values of the | |
1503 | muscles `action' and `prologue' are 0-terminated. | |
1504 | ||
a870c567 AD |
1505 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1506 | ||
1507 | Clean up GCC warnings. | |
1508 | ||
1509 | * src/reader.c (copy_action): `buf' is not used. | |
1510 | (parse_skel_decl): Be static. | |
1511 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
1512 | * src/options.h (create_long_option_table): Have a real prototype. | |
1513 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
1514 | (hash_delete_at): Return const void *. | |
1515 | Adjust casts to preserve the const. | |
1516 | ||
80df8768 AD |
1517 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1518 | ||
1519 | * configure.in: Require 2.52g. | |
1520 | M4 is not needed, but AUTOM4TE is. | |
1521 | * m4/m4.m4: Remove. | |
1522 | * tests/Makefile.am: Adjust. | |
1523 | ||
f693ad14 AD |
1524 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1525 | ||
1526 | One structure for states is enough, even though theoretically | |
1527 | there are LR(0) states and LALR(1) states. | |
1528 | ||
1529 | * src/lalr.h (state_t): Remove. | |
1530 | (state_table): Be state_t **, not state_t *. | |
1531 | * src/state.h (core, CORE_ALLOC): Rename as... | |
1532 | (state_t, STATE_ALLOC): this. | |
1533 | Add the LALR(1) members: shifts, reductions, errs. | |
1534 | * src/LR0.c (state_table): Rename as... | |
1535 | (state_hash): this, to avoid name clashes with the global | |
1536 | `state_table'. | |
1537 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
1538 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
1539 | ||
74ffbcb6 AD |
1540 | 2001-12-10 Akim Demaille <akim@epita.fr> |
1541 | ||
1542 | Bison dumps core on bash.y. | |
1543 | Reported by Pascal Bart. | |
1544 | ||
1545 | * src/warshall.c (bitmatrix_print): New. | |
1546 | (TC): Use it. | |
1547 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
1548 | j must be the outer loop. | |
1549 | * tests/regression.at (Broken Closure): New. | |
1550 | ||
07708e19 AD |
1551 | 2001-12-05 Akim Demaille <akim@epita.fr> |
1552 | ||
1553 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
1554 | its argument. | |
1555 |