]>
Commit | Line | Data |
---|---|---|
1 | 2002-01-08 Akim Demaille <akim@epita.fr> | |
2 | ||
3 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
4 | New, stolen from the Fileutils 4.1. | |
5 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
6 | * configure.in: Check for the presence of memrchr, and of its | |
7 | prototype. | |
8 | ||
9 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> | |
10 | ||
11 | * lib/hash.h (__P): Added definition for this macro. | |
12 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
13 | BUILT_SOURCES, to ensure they are generated first. | |
14 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
15 | %error-verbose to allow bootstrapping with bison 1.30x. | |
16 | ||
17 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
18 | ||
19 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
20 | convention is to fetch on entry. | |
21 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
22 | 'switch' without a following semicolon. | |
23 | * tests/regression.at (braces parsing): New. | |
24 | ||
25 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
26 | ||
27 | Bison is dead wrong in its RR conflict reports. | |
28 | ||
29 | * tests/torture.at (GNU Cim Grammar): New. | |
30 | * src/conflicts.c (count_rr_conflicts): Fix. | |
31 | ||
32 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
33 | ||
34 | Creating package.m4 from configure.ac causes too many problems. | |
35 | ||
36 | * tests/Makefile.am (package.m4): Create it by hand, | |
37 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
38 | ||
39 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
40 | ||
41 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
42 | skeleton.h. | |
43 | ||
44 | 2002-01-04 Paul Eggert <eggert@twinsun.com> | |
45 | ||
46 | * doc/bison.texinfo (Debugging): | |
47 | Remove YYSTDERR; it's no longer defined or used. | |
48 | Also, s/cstdio.h/cstdio/. | |
49 | ||
50 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
51 | ||
52 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
53 | ||
54 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
55 | ||
56 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
57 | tracing code to --trace, wait for a better --trace option, with | |
58 | args. | |
59 | ||
60 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
61 | ||
62 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
63 | The ISO C++ standard is extremely clear about it: stderr is | |
64 | considered a macro, not a regular symbol (see table 94 `Header | |
65 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
66 | Therefore std:: does not apply to it. It still does with fprintf. | |
67 | Also, s/cstdio.h/cstdio/. | |
68 | ||
69 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
70 | ||
71 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
72 | for non system headers. | |
73 | ||
74 | 2002-01-02 Akim Demaille <akim@epita.fr> | |
75 | ||
76 | Equip the skeleton chain with location tracking, runtime trace, | |
77 | pure parser and scanner. | |
78 | ||
79 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
80 | renaming. | |
81 | (%union): Having several members with the same type does not help | |
82 | type mismatches, simplify. | |
83 | (YYPRINT, yyprint): New. | |
84 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
85 | (skel_error): this. | |
86 | Handle locations. | |
87 | * src/scan-skel.l: Adjust to these changes. | |
88 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
89 | (LOCATION_PRINT, skel_control_t): New. | |
90 | ||
91 | 2001-12-30 Akim Demaille <akim@epita.fr> | |
92 | ||
93 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
94 | replace `gb' with BLANKS. | |
95 | * src/scan-skel.l: Adjust. | |
96 | ||
97 | 2001-12-30 Akim Demaille <akim@epita.fr> | |
98 | ||
99 | * src/system.h: We don't need nor want bcopy. | |
100 | Throw away MS-DOS crap: we don't need getpid. | |
101 | * configure.in: We don't need strndup. It was even causing | |
102 | problems: because Flex includes the headers *before* us, | |
103 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
104 | not visible. | |
105 | * lib/xstrndup.c: New. | |
106 | * src/scan-skel.l: Use it. | |
107 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
108 | * src/parse-skel.y: Use %directives instead of #defines. | |
109 | ||
110 | 2001-12-30 Akim Demaille <akim@epita.fr> | |
111 | ||
112 | * src/skeleton.h: New. | |
113 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
114 | code. | |
115 | * src/output.h (get_lines_number, actions_output, guards_output) | |
116 | (token_definitions_output): Prototype them. | |
117 | * src/parse-skel.y: Add the license notice. | |
118 | Include output.h and skeleton.h. | |
119 | (process_skeleton): Returns void, and takes a single parameter. | |
120 | * src/scan-skel.l: Add the license notice. | |
121 | Include skeleton.h. | |
122 | Don't use %option yylineno: it seems that then Flex imagines | |
123 | REJECT has been used, and therefore it won't reallocate its | |
124 | buffers (which makes no other sense to me than a bug). It results | |
125 | in warnings for `unused: yy_flex_realloc'. | |
126 | ||
127 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> | |
128 | ||
129 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
130 | (MUSCLE_INSERT_PREFIX): ...to there. | |
131 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
132 | (MUSCLE_INSERT_PREFIX): Move from here... | |
133 | ||
134 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
135 | names. This parser skeleton is still broken, but Bison should not | |
136 | choke on a bad muscle 'syntax'. | |
137 | * src/bison.simple: Add a section directive. Put braces around muscle | |
138 | names. | |
139 | ||
140 | * src/files.h (strsuffix, stringappend): Add declarations. | |
141 | (tab_extension): Add declaration. | |
142 | (short_base_name): Add declaration. | |
143 | ||
144 | * src/files.c (strsuffix, stringappend): No longer static. These | |
145 | functions are used in the skeleton parser. | |
146 | (tab_extension): New. | |
147 | (compute_base_names): Use the computations done in this function | |
148 | to guess if the generated parsers should have '.tab' in their | |
149 | names. | |
150 | (short_base_name): No longer static. | |
151 | ||
152 | * src/output.c (output_skeleton): New. | |
153 | (output): Disable call to output_master_parser, and give a try to | |
154 | a new skeleton handling system. | |
155 | (guards_output, actions_output): No longer static. | |
156 | (token_definitions_output, get_lines_number): No longer static. | |
157 | ||
158 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
159 | ||
160 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and | |
161 | parse-skel.y. | |
162 | ||
163 | * src/parse-skel.y: New file. | |
164 | * src/scan-skel.l: New file. | |
165 | ||
166 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
167 | ||
168 | %name-prefix is broken. | |
169 | ||
170 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
171 | Adjust all dependencies. | |
172 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
173 | %name-prefix. | |
174 | ||
175 | Renaming yylval but not yylloc is not consistent. Now we do. | |
176 | ||
177 | * src/bison.simple: Prefix yylloc if used. | |
178 | * doc/bison.texinfo (Decl Summary): Document that. | |
179 | ||
180 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
181 | ||
182 | * doc/bison.texinfo: Promote `%long-directive' over | |
183 | `%long_directive'. | |
184 | Remove all references to fixed-output-files, yacc is enough. | |
185 | ||
186 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
187 | ||
188 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
189 | user prologue. These are defaults. | |
190 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
191 | define YYDEBUG and YYERROR_VERBOSE. | |
192 | ||
193 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
194 | ||
195 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
196 | yylloc. | |
197 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
198 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
199 | Move to... | |
200 | * tests/headers.at: here. | |
201 | ||
202 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
203 | ||
204 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
205 | ||
206 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
207 | ||
208 | * tests/actions.at (Mid-rule actions): Output on a single line | |
209 | instead of several. | |
210 | ||
211 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
212 | ||
213 | * doc/bison.texinfo: Formatting changes. | |
214 | ||
215 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
216 | ||
217 | Don't store the token defs in a muscle, just be ready to output it | |
218 | on command. Now possible via `symbols'. Fixes a memory leak. | |
219 | ||
220 | * src/output.c (token_definitions_output): New. | |
221 | (output_parser, header_output): Use it. | |
222 | * src/reader.c (symbols_save): Remove. | |
223 | ||
224 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
225 | ||
226 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
227 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
228 | default. | |
229 | ||
230 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
231 | ||
232 | Mid-rule actions are simply... ignored! | |
233 | ||
234 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
235 | the empty-rule associated to the dummy symbol, not to the host | |
236 | rule. | |
237 | * tests/actions.at (Mid-rule actions): New. | |
238 | ||
239 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
240 | ||
241 | Memory leak. | |
242 | ||
243 | * src/reader.c (reader): Free grammar. | |
244 | ||
245 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
246 | ||
247 | Memory leak. | |
248 | ||
249 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
250 | since it allocates it for each state, although only one is needed. | |
251 | (allocate_storage): Do it here. | |
252 | ||
253 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
254 | ||
255 | * src/options.h, src/options.c (create_long_option_table): Rename | |
256 | as... | |
257 | (long_option_table_new): this, with a clearer prototype. | |
258 | (percent_table): Remove, unused, | |
259 | * src/getargs.c (getargs): Adjust. | |
260 | ||
261 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
262 | ||
263 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
264 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
265 | as states. | |
266 | ||
267 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
268 | ||
269 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
270 | Sorry, I don't understand exactly what it is, no better name... | |
271 | ||
272 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
273 | ||
274 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
275 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
276 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
277 | as rules. | |
278 | ||
279 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
280 | ||
281 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
282 | ago. | |
283 | ||
284 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
285 | ||
286 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
287 | Adjust all users to use symbols[i]->user_token_number. | |
288 | ||
289 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
290 | ||
291 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
292 | Adjust all users to use symbols[i]->prec or ->assoc. | |
293 | ||
294 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
295 | ||
296 | * src/reader.c, src/reader.h (tags): Remove. | |
297 | Adjust all users to use symbols[i]->tag. | |
298 | ||
299 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
300 | ||
301 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
302 | and rule_table. | |
303 | * src/reader.c (packsymbols): Fill this table. | |
304 | Drop sprec. | |
305 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
306 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
307 | single table. | |
308 | Use symbols[i]->tag instead of tags[i]. | |
309 | ||
310 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
311 | ||
312 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
313 | In addition, put a comment in there, to replace... | |
314 | * tests/regression.at (%union and C comments): Remove. | |
315 | ||
316 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
317 | ||
318 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
319 | output as expected output. The contents *seem* right to me, but I | |
320 | can't pretend reading perfectly parser tables... Nonetheless, all | |
321 | the other tests pass correctly, the table look OK, even though the | |
322 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
323 | harmless). | |
324 | ||
325 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
326 | ||
327 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
328 | rules read. In other words, add it _after_ having performed | |
329 | grammar sanity checks. | |
330 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
331 | ||
332 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
333 | ||
334 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
335 | visible, and some states have now a different number. | |
336 | ||
337 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
338 | ||
339 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
340 | of the first rule. | |
341 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
342 | (Solved SR Conflicts): Adjust rule 0's line number. | |
343 | ||
344 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
345 | ||
346 | Fix the `GAWK Grammar' failure. | |
347 | ||
348 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
349 | the reductions of the first state which was mistakenly confused | |
350 | with the final state because precisely final_state was initialized | |
351 | to 0. | |
352 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
353 | now noticed by Bison. | |
354 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
355 | have a reduction on $default. | |
356 | ||
357 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
358 | ||
359 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
360 | rule line numbers. | |
361 | * src/closure.c (print_closure): Likewise. | |
362 | * src/derives.c (print_derives): Likewise. | |
363 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
364 | now. | |
365 | ||
366 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
367 | ||
368 | * src/lalr.c (lookaheads_print): New. | |
369 | (lalr): Call it when --trace-flag. | |
370 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
371 | are dumped. | |
372 | ||
373 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
374 | ||
375 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
376 | when walking through ritem, even via rule->rhs. | |
377 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
378 | (useful_production, useless_nonterminals): Likewise. | |
379 | (reduce_grammar_tables): Likewise, plus update nritems. | |
380 | * src/nullable.c (set_nullable): Likewise. | |
381 | * src/lalr.c (build_relations): Likewise. | |
382 | * tests/sets.at (Nullable): Adjust. | |
383 | Fortunately, now, the $axiom is no longer nullable. | |
384 | ||
385 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
386 | ||
387 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
388 | the 0-sentinel. | |
389 | * src/gram.c (ritem_longest_rhs): Likewise. | |
390 | * src/reduce.c (nonterminals_reduce): Likewise. | |
391 | * src/print_graph.c (print_graph): Likewise. | |
392 | * src/output.c (output_rule_data): Likewise. | |
393 | * src/nullable.c (set_nullable): Likewise. | |
394 | ||
395 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
396 | ||
397 | * src/output.c: Comment changes. | |
398 | ||
399 | 2001-12-27 Paul Eggert <eggert@twinsun.com> | |
400 | ||
401 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
402 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
403 | Sparc, as they were causing more porting problems than the | |
404 | (minor) performance improvement was worth. | |
405 | ||
406 | Also, catch up with 1.31's YYSTD. | |
407 | ||
408 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
409 | ||
410 | * src/output.c (output_gram): Rely on nritems, not the | |
411 | 0-sentinel. See below. | |
412 | Use -1 as separator, not 0. | |
413 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
414 | Rely on -1 as separator in yyrhs, instead of 0. | |
415 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
416 | twice `Now at end of input', therefore there are two lines less to | |
417 | expect. | |
418 | ||
419 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
420 | ||
421 | * tests/regression.at (Unresolved SR Conflicts): | |
422 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
423 | below. | |
424 | ||
425 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
426 | ||
427 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
428 | is reached by eoftoken. | |
429 | (insert_start_shifting_state, insert_eof_shifting_state) | |
430 | (insert_accepting_state, augment_automaton): Remove, since now | |
431 | these states are automatically computed from the initial state. | |
432 | (generate_states): Adjust. | |
433 | * src/print.c: When reporting a rule number to the user, substract | |
434 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
435 | * src/reduce.c: Likewise. | |
436 | * src/print_graph.c (print_core): For the time being, just as for | |
437 | the report, depend upon --trace-flags to dump the full set of | |
438 | items. | |
439 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
440 | 0: `$axiom: START-SYMBOL $'. | |
441 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
442 | number of the states has changed (the final state is no longer | |
443 | necessarily the last), catch up. | |
444 | ||
445 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
446 | ||
447 | Try to make the use of the eoftoken valid. Given that its value | |
448 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
449 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
450 | instead of the 0-sentinel. | |
451 | ||
452 | * src/gram.h, src/gram.c (nritems): New. | |
453 | Expected to be duplication of nitems, but for the time being... | |
454 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
455 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
456 | * src/closure.c (print_closure, print_fderives): Likewise. | |
457 | * src/gram.c (ritem_print): Likewise. | |
458 | * src/print.c (print_core, print_grammar): Likewise. | |
459 | * src/print_graph.c: Likewise. | |
460 | ||
461 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
462 | ||
463 | * src/main.c (main): If there are complains after grammar | |
464 | reductions, then output the report anyway if requested, then die. | |
465 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
466 | * src/reader.c (eoftoken): New. | |
467 | (parse_token_decl): If the token being defined has value `0', it | |
468 | is the eoftoken. | |
469 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
470 | Be sure to preserve the value of the eoftoken. | |
471 | (reader): Make sure eoftoken is defined. | |
472 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
473 | * src/print.c (print_grammar): Don't special case the eof token. | |
474 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
475 | lie anyway, albeit pleasant. | |
476 | * tests/calc.at: Exercise error messages with eoftoken. | |
477 | Change the grammar so that empty input is invalid. | |
478 | Adjust expectations. | |
479 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
480 | ||
481 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
482 | ||
483 | * configure.in: Check the protos of strchr ans strspn. | |
484 | Replace strchr if needed. | |
485 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
486 | missing. | |
487 | * lib/strchr.c: New. | |
488 | * src/reader.c (symbols_save): Use strchr. | |
489 | ||
490 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
491 | ||
492 | * src/print.c, src/print_graph.c (escape): New. | |
493 | Use it to quote the TAGS outputs. | |
494 | * src/print_graph.c (print_state): Now errors are in red, and | |
495 | reductions in green. | |
496 | Prefer high to wide: output the state number on a line of its own. | |
497 | ||
498 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
499 | ||
500 | * src/state.h, src/state.c (reductions_new): New. | |
501 | * src/LR0.c (set_state_table): Let all the states have a | |
502 | `reductions', even if reduced to 0. | |
503 | (save_reductions): Adjust. | |
504 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
505 | * src/print.c (print_reductions, print_actions): Adjust. | |
506 | * src/output.c (action_row): Adjust. | |
507 | ||
508 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
509 | ||
510 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
511 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
512 | even if reduced to 0. | |
513 | * src/print.c (print_errs, print_reductions): Adjust. | |
514 | * src/output.c (output_actions, action_row): Adjust. | |
515 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
516 | ||
517 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
518 | ||
519 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
520 | ||
521 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
522 | ||
523 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
524 | * src/print.c: here. | |
525 | (lookaheadset, shiftset): New, used as additional storage by | |
526 | print_reductions. | |
527 | (print_results): Adjust. | |
528 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
529 | (print_actions): here. | |
530 | * src/print_graph.c (print_actions): Remove dead code. | |
531 | ||
532 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
533 | ||
534 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
535 | `$n' and `@n'. | |
536 | ||
537 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
538 | ||
539 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
540 | (build_relations): Adjust. | |
541 | ||
542 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
543 | ||
544 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
545 | duplication. | |
546 | ||
547 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
548 | ||
549 | * src/reader.c (packgram): Catch nitems overflows. | |
550 | ||
551 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
552 | ||
553 | * src/files.c, src/files.h (guard_obstack): Remove. | |
554 | * src/output.c (output): Adjust. | |
555 | * src/reader.c (parse_braces): New, factoring... | |
556 | (copy_action, copy_guard): these two which are renamed as... | |
557 | (parse_action, parse_guard): these. | |
558 | As a voluntary consequence, using braces around guards is now | |
559 | mandatory. | |
560 | ||
561 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
562 | ||
563 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
564 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
565 | members. | |
566 | (symbol_list_new): Adjust. | |
567 | (copy_action): action_line is the first line, not the last. | |
568 | (copy_guard): Just as for actions, store the `action' only, not | |
569 | the switch/case/break flesh. | |
570 | Don't parse the user action that might follow the guard, let... | |
571 | (readgram): do it, i.e., now, there can be an action after a | |
572 | guard. | |
573 | In other words the guard is just explicitly optional. | |
574 | (packgram): Adjust. | |
575 | * src/output.c (guards_output): New. | |
576 | (output_parser): Call it when needed. | |
577 | (output): Also free the guard and attrs obstacks. | |
578 | * src/files.c, src/files.h (obstack_save): Remove. | |
579 | (output_files): Remove. | |
580 | As a result, if one needs the former `.act' file, using an | |
581 | appropriate skeleton which requires actions and guards is now | |
582 | required. | |
583 | * src/main.c (main): Adjust. | |
584 | * tests/semantic.at: New. | |
585 | * tests/regression.at: Use `input.y' as input file name. | |
586 | Avoid 8+3 problems by requiring input.c when the test needs the | |
587 | parser. | |
588 | ||
589 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
590 | ||
591 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
592 | fields. | |
593 | ||
594 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
595 | ||
596 | All the hacks using a final pseudo state are now useless. | |
597 | ||
598 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
599 | * src/lalr.c (nLA): New. | |
600 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
601 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
602 | ||
603 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
604 | ||
605 | * src/output.c (action_row, token_actions): Use a state_t instead | |
606 | of a integer, and nlookaheads instead of the following state's | |
607 | lookaheadsp. | |
608 | ||
609 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
610 | ||
611 | * src/conflicts.c (log_resolution, flush_shift) | |
612 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
613 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
614 | (conflicts_print, print_reductions): Use a state_t instead of an | |
615 | integer when referring to a state. | |
616 | As much as possible, depend upon nlookaheads, instead of the | |
617 | `lookaheadsp' member of the following state (since lookaheads of | |
618 | successive states are successive, the difference between state n + 1 | |
619 | and n served as the number of lookaheads for state n). | |
620 | * src/lalr.c (add_lookback_edge): Likewise. | |
621 | * src/print.c (print_core, print_actions, print_state) | |
622 | (print_results): Likewise. | |
623 | * src/print_graph.c (print_core, print_actions, print_state) | |
624 | (print_graph): Likewise. | |
625 | * src/conflicts.h: Adjust. | |
626 | ||
627 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
628 | ||
629 | * src/bison.hairy: Formatting/comment changes. | |
630 | ANSIfy. | |
631 | Remove `register' indications. | |
632 | Add plenty of `static'. | |
633 | ||
634 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
635 | ||
636 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
637 | duplicates ntokens. | |
638 | * src/bison.simple: Formatting/comment changes. | |
639 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
640 | is an undocumented synonym. | |
641 | ||
642 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
643 | ||
644 | * src/output.c (output_table_data): Change the prototype to use | |
645 | `int' for array ranges: some invocations do pass an int, not a | |
646 | short. | |
647 | Reported by Wayne Green. | |
648 | ||
649 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
650 | ||
651 | Some actions of web2c.y are improperly triggered. | |
652 | Reported by Mike Castle. | |
653 | ||
654 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
655 | * tests/regression.at (Web2c): Rename as... | |
656 | (Web2c Report): this. | |
657 | (Web2c Actions): New. | |
658 | ||
659 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
660 | ||
661 | Reductions in web2c.y are improperly reported. | |
662 | Reported by Mike Castle. | |
663 | ||
664 | * src/conflicts.c (print_reductions): Fix. | |
665 | * tests/regression.at (Web2c): New. | |
666 | ||
667 | 2001-12-18 Akim Demaille <akim@epita.fr> | |
668 | ||
669 | Some host fail on `assert (!"foo")', which expands to | |
670 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
671 | Reported by Nelson Beebee. | |
672 | ||
673 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
674 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
675 | ||
676 | 2001-12-17 Marc Autret <autret_m@epita.fr> | |
677 | ||
678 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
679 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
680 | New line counter 'skeleton_line' (skeleton-line muscle). | |
681 | ||
682 | 2001-12-17 Paul Eggert <eggert@twinsun.com> | |
683 | ||
684 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
685 | YYDEBUG must be defined to a nonzero value. | |
686 | ||
687 | * src/bison.simple (yytname): Do not assume that the user defines | |
688 | YYDEBUG to a properly parenthesized expression. | |
689 | ||
690 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
691 | ||
692 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
693 | nlookaheads is a new member. | |
694 | Adjust all users. | |
695 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
696 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
697 | state. | |
698 | ||
699 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
700 | ||
701 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
702 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
703 | let... | |
704 | * src/reader.c (reader): Do it. | |
705 | ||
706 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
707 | ||
708 | * src/conflicts.c (print_reductions): Formatting changes. | |
709 | ||
710 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
711 | ||
712 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
713 | (flush_reduce): New. | |
714 | (resolve_sr_conflict): Adjust. | |
715 | ||
716 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
717 | ||
718 | * src/output.c (output_obstack): Be static and rename as... | |
719 | (format_obstack): this, to avoid any confusion with files.c's | |
720 | output_obstack. | |
721 | * src/reader.h (muscle_obstack): Move to... | |
722 | * src/output.h: here, since it's defined in output.c. | |
723 | ||
724 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
725 | ||
726 | * src/output.c (action_row, save_column, default_goto) | |
727 | (sort_actions, matching_state, pack_vector): Better variable | |
728 | locality. | |
729 | ||
730 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
731 | ||
732 | * src/output.c: Various formatting changes. | |
733 | ||
734 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
735 | ||
736 | * src/files.c (output_files): Free the output_obstack. | |
737 | * src/main.c (main): Call print and print_graph conditionally. | |
738 | * src/print.c (print): Work unconditionally. | |
739 | * src/print_graph.c (print_graph): Work unconditionally. | |
740 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
741 | ||
742 | 2001-12-16 Marc Autret <autret_m@epita.fr> | |
743 | ||
744 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
745 | there is one less line per action. | |
746 | ||
747 | 2001-12-16 Marc Autret <autret_m@epita.fr> | |
748 | ||
749 | * src/bison.simple: Remove a useless #line directive. | |
750 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
751 | * src/output.c (get_lines_number): New. | |
752 | (output_parser): Adjust, now takes care about the lines of a | |
753 | output muscles. | |
754 | Fix line numbering. | |
755 | (actions_output): Computes the number of lines taken by actions. | |
756 | (output_master_parser): Insert new skeleton which is the name of | |
757 | the output parser file name. | |
758 | ||
759 | 2001-12-15 Marc Autret <autret_m@epita.fr> | |
760 | ||
761 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
762 | ||
763 | 2001-12-15 Marc Autret <autret_m@epita.fr> | |
764 | ||
765 | * src/output.c (output_gram): Keep track of the hairy one. | |
766 | ||
767 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
768 | ||
769 | Make `make distcheck' work. | |
770 | ||
771 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
772 | system.h which uses libgettext.h. | |
773 | ||
774 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
775 | ||
776 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
777 | otherwise, since we range over their symbols, we might look at a | |
778 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
779 | `nvars', hence we overflow our arrays. | |
780 | ||
781 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
782 | ||
783 | The header can also be produced directly, without any obstack! | |
784 | Yahoo! | |
785 | ||
786 | * src/files.c, src/files.h (defines_obstack): Remove. | |
787 | (compute_header_macro): Global. | |
788 | (defines_obstack_save): Remove. | |
789 | * src/reader.c (parse_union_decl): No longer output to | |
790 | defines_obstack: its content can be found in the `stype' muscle | |
791 | anyway. | |
792 | (output_token_translations): Merge into... | |
793 | (symbols_output): this. | |
794 | Rename as... | |
795 | (symbols_save): this. | |
796 | (reader): Adjust. | |
797 | * src/output.c (header_output): New. | |
798 | (output): Call it. | |
799 | ||
800 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
801 | ||
802 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
803 | simultaneously, use one to define the `stype' muscle, and use the | |
804 | value of the latter to fill defines_obstack. | |
805 | (copy_comment): Remove. | |
806 | (copy_comment2): Work for a single obstack. | |
807 | Rename as... | |
808 | (copy_comment): this. | |
809 | ||
810 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
811 | ||
812 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
813 | * src/reader.c (parse_union_decl): Revamp. | |
814 | ||
815 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
816 | ||
817 | Still making progress in separating Bison into (i) input, (ii) | |
818 | process, (iii) output: now we can directly output the parser file | |
819 | without using table_obstack at all. | |
820 | ||
821 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
822 | (parser_file_name): New. | |
823 | * src/files.c (compute_output_file_names): Compute it. | |
824 | * src/output.c (actions_output, output_parser) | |
825 | (output_master_parser): To a file instead of an obstack. | |
826 | ||
827 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
828 | ||
829 | Attach actions to rules, instead of pre-outputting them to | |
830 | actions_obstack. | |
831 | ||
832 | * src/gram.h (rule_t): action and action_line are new members. | |
833 | * src/reader.c (symbol_list): Likewise. | |
834 | (copy_action): Save the actions within the rule. | |
835 | (packgram): Save them in rule_table. | |
836 | * src/output.c (actions_output): New. | |
837 | (output_parser): Use it on `%%actions'. | |
838 | (output_rule_data): Don't free rule_table. | |
839 | (output): Do it. | |
840 | (prepare): Don't save the `action' muscle. | |
841 | * src/bison.simple: s/%%action/%%actions/. | |
842 | ||
843 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
844 | ||
845 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
846 | to the user action: let it fail if lacking. | |
847 | Suggested by Arnold Robbins and Tom Tromey. | |
848 | ||
849 | 2001-12-14 Akim Demaille <akim@epita.fr> | |
850 | ||
851 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
852 | longer mess around with obstacks and int pointers. | |
853 | Adjust all callers. | |
854 | ||
855 | 2001-12-14 Akim Demaille <akim@epita.fr> | |
856 | ||
857 | * src/lex.c (literalchar): Don't escape the special characters, | |
858 | just decode them, and keep them as char (before, eol was output as | |
859 | the 2 char string `\n' etc.). | |
860 | * src/output.c (output_rule_data): Use quotearg to output the | |
861 | token strings. | |
862 | ||
863 | 2001-12-13 Paul Eggert <eggert@twinsun.com> | |
864 | ||
865 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
866 | Do not infringe on the global user namespace when using C++. | |
867 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
868 | All uses of `fprintf' and `stderr' changed. | |
869 | ||
870 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
871 | ||
872 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
873 | ||
874 | The computation of nullable is broken: it doesn't handle empty | |
875 | RHS's properly. | |
876 | ||
877 | * tests/torture.at (GNU AWK Grammar): New. | |
878 | * tests/sets.at (Nullable): New. | |
879 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
880 | `ritems', loop over the rules, and then over their rhs's. | |
881 | ||
882 | Work around Autotest bugs. | |
883 | ||
884 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
885 | frame, because Autotest understand lines starting with a `+' as | |
886 | traces from the shell. Then, they are not processed properly. | |
887 | Admittedly an Autotest bug, but we don't have time to wait for | |
888 | Autotest to catch up. | |
889 | * tests/regression.at (Broken Closure): Adjust to the new table | |
890 | frames. | |
891 | Move to... | |
892 | * tests/sets.at: here. | |
893 | ||
894 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
895 | ||
896 | * src/closure.c (closure): Use nrules instead of playing tricks | |
897 | with BITS_PER_WORD. | |
898 | ||
899 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
900 | ||
901 | * src/print.c (print_actions): Output the handling of `$' as the | |
902 | traces do: shifting the token EOF. Before EOF was treated as a | |
903 | nonterminal. | |
904 | * tests/regression.at: Adjust some tests. | |
905 | * src/print_graph.c (print_core): Complete the set of items via | |
906 | closure. The next-to-final and final states are still unsatisfying, | |
907 | but that's to be addressed elsewhere. | |
908 | No longer output the rule numbers, but do output the state number. | |
909 | A single loop for the shifts + gotos is enough, but picked a | |
910 | distinct color for each. | |
911 | (print_graph): Initialize and finalize closure. | |
912 | ||
913 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
914 | ||
915 | * src/reader.c (readgram): Remove dead code, an strip useless | |
916 | braces. | |
917 | (get_type): Remove, unused. | |
918 | ||
919 | 2001-12-12 Akim Demaille <akim@epita.fr> | |
920 | ||
921 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
922 | on that of lib/error.c. | |
923 | ||
924 | 2001-12-12 Akim Demaille <akim@epita.fr> | |
925 | ||
926 | Some hosts don't like `/' in includes. | |
927 | ||
928 | * src/system.h: Include libgettext.h without qualifying the path. | |
929 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
930 | $(top_srcdir). | |
931 | ||
932 | 2001-12-11 Marc Autret <autret_m@epita.fr> | |
933 | ||
934 | * src/output.c (output_parser): Remove useless muscle. | |
935 | ||
936 | 2001-12-11 Marc Autret <autret_m@epita.fr> | |
937 | ||
938 | * src/bison.simple: Remove #line just before %%epilogue. It | |
939 | is now handled in ... | |
940 | * src/reader.c (read_additionnal_code): Add the output of a | |
941 | #line for the epilogue. | |
942 | ||
943 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
944 | ||
945 | * src/reader.c (copy_definition): Re-use CPP-outed code which | |
946 | replace precedent remove. | |
947 | * src/bison.simple: Remove #line before %%prologue because | |
948 | %%input-line is wrong at this time. | |
949 | ||
950 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
951 | ||
952 | * src/reader.c (symbols_output): Clean up. | |
953 | * src/output.c (output_gram, output): Clean up. | |
954 | ||
955 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
956 | ||
957 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
958 | * src/LR0.c (set_state_table): here. | |
959 | * src/lalr.c (lalr): Call it. | |
960 | ||
961 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
962 | ||
963 | * src/state.h (shifts): Remove the `number' member: shifts are | |
964 | attached to state, hence no longer need to be labelled with a | |
965 | state number. | |
966 | ||
967 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
968 | ||
969 | Now that states have a complete set of members, the linked list of | |
970 | shifts is useless: just fill directly the state's shifts member. | |
971 | ||
972 | * src/state.h (shifts): Remove the `next' member. | |
973 | * src/LR0.c (first_state, last_state): Remove. | |
974 | Adjust the callers. | |
975 | (augment_automaton): Don't look for the shifts that must be added | |
976 | a shift on EOF: it is those of the state we looked for! But now, | |
977 | since shifts are attached, it is no longer needed to looking | |
978 | merely by its id: its number. | |
979 | ||
980 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
981 | ||
982 | * src/LR0.c (augment_automaton): Better variable locality. | |
983 | Remove an impossible branch: if there is a state corresponding to | |
984 | the start symbol being shifted, then there is shift for the start | |
985 | symbol from the initial state. | |
986 | ||
987 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
988 | ||
989 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
990 | only when appropriate: when insert_start_shifting_state' is not | |
991 | invoked. | |
992 | * tests/regression.at (Rule Line Numbers): Adjust. | |
993 | ||
994 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
995 | ||
996 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
997 | merge the two cases addition shifts to the initial state. | |
998 | ||
999 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1000 | ||
1001 | * src/lalr.c (set_state_table): Move to... | |
1002 | * src/LR0.c: here. | |
1003 | * src/lalr.c (lalr): Don't call it... | |
1004 | * src/LR0.c (generate_states): do it. | |
1005 | * src/LR0.h (first_state): Remove, only the table is used. | |
1006 | ||
1007 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1008 | ||
1009 | * src/LR0.h (first_shift, first_reduction): Remove. | |
1010 | * src/lalr.c: Don't use first_shift: find shifts through the | |
1011 | states. | |
1012 | ||
1013 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1014 | ||
1015 | * src/LR0.c: Attach shifts to states as soon as they are | |
1016 | computed. | |
1017 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
1018 | state, just assert that the mapping was properly done. | |
1019 | ||
1020 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1021 | ||
1022 | * src/LR0.c (insert_start_shift): Rename as... | |
1023 | (insert_start_shifting_state): this. | |
1024 | (insert_eof_shifting_state, insert_accepting_state): New. | |
1025 | (augment_automaton): Adjust. | |
1026 | Better locality of the variables. | |
1027 | When looking if the start_symbol is shifted from the initial | |
1028 | state, using `while (... symbol != start_symbol ...)' sounds | |
1029 | better than `while (... symbol < start_symbol ...)': If fail | |
1030 | to see how the order between symbols could be relevant! | |
1031 | ||
1032 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1033 | ||
1034 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
1035 | `spec_file_prefix', declared by src/files.h. | |
1036 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
1037 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
1038 | * src/output.c (prepare): Adjust. | |
1039 | * src/reader.c (symbols_output): Likewise. | |
1040 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
1041 | ||
1042 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1043 | ||
1044 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
1045 | `"0"'. | |
1046 | ||
1047 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1048 | ||
1049 | * src/reader.c (reader): Calling symbols_output once is enough. | |
1050 | ||
1051 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1052 | ||
1053 | Now that states have a complete set of members, the linked list of | |
1054 | reductions is useless: just fill directly the state's reductions | |
1055 | member. | |
1056 | ||
1057 | * src/state.h (struct reductions): Remove member `number' and | |
1058 | `next'. | |
1059 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
1060 | (save_reductions): Don't link the new reductions, store them in | |
1061 | this_state. | |
1062 | * src/lalr.c (set_state_table): No need to attach reductions to | |
1063 | states, it's already done. | |
1064 | * src/output.c (output_actions): No longer free the shifts, then | |
1065 | the reductions, then the states: free all the states and their | |
1066 | members. | |
1067 | ||
1068 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1069 | ||
1070 | * src/options.c (OPTN, DRTV, BOTH): New. | |
1071 | (option_table): Use them. | |
1072 | ||
1073 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's | |
1074 | the job of system.h. | |
1075 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
1076 | reasons. | |
1077 | ||
1078 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1079 | ||
1080 | * src/output.c (output, prepare): Make sure the values of the | |
1081 | muscles `action' and `prologue' are 0-terminated. | |
1082 | ||
1083 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1084 | ||
1085 | Clean up GCC warnings. | |
1086 | ||
1087 | * src/reader.c (copy_action): `buf' is not used. | |
1088 | (parse_skel_decl): Be static. | |
1089 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
1090 | * src/options.h (create_long_option_table): Have a real prototype. | |
1091 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
1092 | (hash_delete_at): Return const void *. | |
1093 | Adjust casts to preserve the const. | |
1094 | ||
1095 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1096 | ||
1097 | * configure.in: Require 2.52g. | |
1098 | M4 is not needed, but AUTOM4TE is. | |
1099 | * m4/m4.m4: Remove. | |
1100 | * tests/Makefile.am: Adjust. | |
1101 | ||
1102 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1103 | ||
1104 | One structure for states is enough, even though theoretically | |
1105 | there are LR(0) states and LALR(1) states. | |
1106 | ||
1107 | * src/lalr.h (state_t): Remove. | |
1108 | (state_table): Be state_t **, not state_t *. | |
1109 | * src/state.h (core, CORE_ALLOC): Rename as... | |
1110 | (state_t, STATE_ALLOC): this. | |
1111 | Add the LALR(1) members: shifts, reductions, errs. | |
1112 | * src/LR0.c (state_table): Rename as... | |
1113 | (state_hash): this, to avoid name clashes with the global | |
1114 | `state_table'. | |
1115 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
1116 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
1117 | ||
1118 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1119 | ||
1120 | Bison dumps core on bash.y. | |
1121 | Reported by Pascal Bart. | |
1122 | ||
1123 | * src/warshall.c (bitmatrix_print): New. | |
1124 | (TC): Use it. | |
1125 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
1126 | j must be the outer loop. | |
1127 | * tests/regression.at (Broken Closure): New. | |
1128 | ||
1129 | 2001-12-05 Akim Demaille <akim@epita.fr> | |
1130 | ||
1131 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
1132 | its argument. | |
1133 |