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