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