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