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