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