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