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