]>
Commit | Line | Data |
---|---|---|
1 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
2 | ||
3 | * src/print.c, src/print_graph.c (escape): New. | |
4 | Use it to quote the TAGS outputs. | |
5 | * src/print_graph.c (print_state): Now errors are in red, and | |
6 | reductions in green. | |
7 | Prefer high to wide: output the state number on a line of its own. | |
8 | ||
9 | ||
10 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
11 | ||
12 | * src/state.h, src/state.c (reductions_new): New. | |
13 | * src/LR0.c (set_state_table): Let all the states have a | |
14 | `reductions', even if reduced to 0. | |
15 | (save_reductions): Adjust. | |
16 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
17 | * src/print.c (print_reductions, print_actions): Adjust. | |
18 | * src/output.c (action_row): Adjust. | |
19 | ||
20 | ||
21 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
22 | ||
23 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
24 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
25 | even if reduced to 0. | |
26 | * src/print.c (print_errs, print_reductions): Adjust. | |
27 | * src/output.c (output_actions, action_row): Adjust. | |
28 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
29 | ||
30 | ||
31 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
32 | ||
33 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
34 | ||
35 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
36 | ||
37 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
38 | * src/print.c: here. | |
39 | (lookaheadset, shiftset): New, used as additional storage by | |
40 | print_reductions. | |
41 | (print_results): Adjust. | |
42 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
43 | (print_actions): here. | |
44 | * src/print_graph.c (print_actions): Remove dead code. | |
45 | ||
46 | ||
47 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
48 | ||
49 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
50 | `$n' and `@n'. | |
51 | ||
52 | ||
53 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
54 | ||
55 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
56 | (build_relations): Adjust. | |
57 | ||
58 | ||
59 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
60 | ||
61 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
62 | duplication. | |
63 | ||
64 | ||
65 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
66 | ||
67 | * src/reader.c (packgram): Catch nitems overflows. | |
68 | ||
69 | ||
70 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
71 | ||
72 | * src/files.c, src/files.h (guard_obstack): Remove. | |
73 | * src/output.c (output): Adjust. | |
74 | * src/reader.c (parse_braces): New, factoring... | |
75 | (copy_action, copy_guard): these two which are renamed as... | |
76 | (parse_action, parse_guard): these. | |
77 | As a voluntary consequence, using braces around guards is now | |
78 | mandatory. | |
79 | ||
80 | ||
81 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
82 | ||
83 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
84 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
85 | members. | |
86 | (symbol_list_new): Adjust. | |
87 | (copy_action): action_line is the first line, not the last. | |
88 | (copy_guard): Just as for actions, store the `action' only, not | |
89 | the switch/case/break flesh. | |
90 | Don't parse the user action that might follow the guard, let... | |
91 | (readgram): do it, i.e., now, there can be an action after a | |
92 | guard. | |
93 | In other words the guard is just explicitly optional. | |
94 | (packgram): Adjust. | |
95 | * src/output.c (guards_output): New. | |
96 | (output_parser): Call it when needed. | |
97 | (output): Also free the guard and attrs obstacks. | |
98 | * src/files.c, src/files.h (obstack_save): Remove. | |
99 | (output_files): Remove. | |
100 | As a result, if one needs the former `.act' file, using an | |
101 | appropriate skeleton which requires actions and guards is now | |
102 | required. | |
103 | * src/main.c (main): Adjust. | |
104 | * tests/semantic.at: New. | |
105 | * tests/regression.at: Use `input.y' as input file name. | |
106 | Avoid 8+3 problems by requiring input.c when the test needs the | |
107 | parser. | |
108 | ||
109 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
110 | ||
111 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
112 | fields. | |
113 | ||
114 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
115 | ||
116 | All the hacks using a final pseudo state are now useless. | |
117 | ||
118 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
119 | * src/lalr.c (nLA): New. | |
120 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
121 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
122 | ||
123 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
124 | ||
125 | * src/output.c (action_row, token_actions): Use a state_t instead | |
126 | of a integer, and nlookaheads instead of the following state's | |
127 | lookaheadsp. | |
128 | ||
129 | ||
130 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
131 | ||
132 | * src/conflicts.c (log_resolution, flush_shift) | |
133 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
134 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
135 | (conflicts_print, print_reductions): Use a state_t instead of an | |
136 | integer when referring to a state. | |
137 | As much as possible, depend upon nlookaheads, instead of the | |
138 | `lookaheadsp' member of the following state (since lookaheads of | |
139 | successive states are successive, the difference between state n + 1 | |
140 | and n served as the number of lookaheads for state n). | |
141 | * src/lalr.c (add_lookback_edge): Likewise. | |
142 | * src/print.c (print_core, print_actions, print_state) | |
143 | (print_results): Likewise. | |
144 | * src/print_graph.c (print_core, print_actions, print_state) | |
145 | (print_graph): Likewise. | |
146 | * src/conflicts.h: Adjust. | |
147 | ||
148 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
149 | ||
150 | * src/bison.hairy: Formatting/comment changes. | |
151 | ANSIfy. | |
152 | Remove `register' indications. | |
153 | Add plenty of `static'. | |
154 | ||
155 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
156 | ||
157 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
158 | duplicates ntokens. | |
159 | * src/bison.simple: Formatting/comment changes. | |
160 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
161 | is an undocumented synonym. | |
162 | ||
163 | ||
164 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
165 | ||
166 | * src/output.c (output_table_data): Change the prototype to use | |
167 | `int' for array ranges: some invocations do pass an int, not a | |
168 | short. | |
169 | Reported by Wayne Green. | |
170 | ||
171 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
172 | ||
173 | Some actions of web2c.y are improperly triggered. | |
174 | Reported by Mike Castle. | |
175 | ||
176 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
177 | * tests/regression.at (Web2c): Rename as... | |
178 | (Web2c Report): this. | |
179 | (Web2c Actions): New. | |
180 | ||
181 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
182 | ||
183 | Reductions in web2c.y are improperly reported. | |
184 | Reported by Mike Castle. | |
185 | ||
186 | * src/conflicts.c (print_reductions): Fix. | |
187 | * tests/regression.at (Web2c): New. | |
188 | ||
189 | 2001-12-18 Akim Demaille <akim@epita.fr> | |
190 | ||
191 | Some host fail on `assert (!"foo")', which expands to | |
192 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
193 | Reported by Nelson Beebee. | |
194 | ||
195 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
196 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
197 | ||
198 | 2001-12-17 Marc Autret <autret_m@epita.fr> | |
199 | ||
200 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
201 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
202 | New line counter 'skeleton_line' (skeleton-line muscle). | |
203 | ||
204 | 2001-12-17 Paul Eggert <eggert@twinsun.com> | |
205 | ||
206 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
207 | YYDEBUG must be defined to a nonzero value. | |
208 | ||
209 | * src/bison.simple (yytname): Do not assume that the user defines | |
210 | YYDEBUG to a properly parenthesized expression. | |
211 | ||
212 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
213 | ||
214 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
215 | nlookaheads is a new member. | |
216 | Adjust all users. | |
217 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
218 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
219 | state. | |
220 | ||
221 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
222 | ||
223 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
224 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
225 | let... | |
226 | * src/reader.c (reader): Do it. | |
227 | ||
228 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
229 | ||
230 | * src/conflicts.c (print_reductions): Formatting changes. | |
231 | ||
232 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
233 | ||
234 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
235 | (flush_reduce): New. | |
236 | (resolve_sr_conflict): Adjust. | |
237 | ||
238 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
239 | ||
240 | * src/output.c (output_obstack): Be static and rename as... | |
241 | (format_obstack): this, to avoid any confusion with files.c's | |
242 | output_obstack. | |
243 | * src/reader.h (muscle_obstack): Move to... | |
244 | * src/output.h: here, since it's defined in output.c. | |
245 | ||
246 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
247 | ||
248 | * src/output.c (action_row, save_column, default_goto) | |
249 | (sort_actions, matching_state, pack_vector): Better variable | |
250 | locality. | |
251 | ||
252 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
253 | ||
254 | * src/output.c: Various formatting changes. | |
255 | ||
256 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
257 | ||
258 | * src/files.c (output_files): Free the output_obstack. | |
259 | * src/main.c (main): Call print and print_graph conditionally. | |
260 | * src/print.c (print): Work unconditionally. | |
261 | * src/print_graph.c (print_graph): Work unconditionally. | |
262 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
263 | ||
264 | 2001-12-16 Marc Autret <autret_m@epita.fr> | |
265 | ||
266 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
267 | there is one less line per action. | |
268 | ||
269 | 2001-12-16 Marc Autret <autret_m@epita.fr> | |
270 | ||
271 | * src/bison.simple: Remove a useless #line directive. | |
272 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
273 | * src/output.c (get_lines_number): New. | |
274 | (output_parser): Adjust, now takes care about the lines of a | |
275 | output muscles. | |
276 | Fix line numbering. | |
277 | (actions_output): Computes the number of lines taken by actions. | |
278 | (output_master_parser): Insert new skeleton which is the name of | |
279 | the output parser file name. | |
280 | ||
281 | 2001-12-15 Marc Autret <autret_m@epita.fr> | |
282 | ||
283 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
284 | ||
285 | 2001-12-15 Marc Autret <autret_m@epita.fr> | |
286 | ||
287 | * src/output.c (output_gram): Keep track of the hairy one. | |
288 | ||
289 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
290 | ||
291 | Make `make distcheck' work. | |
292 | ||
293 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
294 | system.h which uses libgettext.h. | |
295 | ||
296 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
297 | ||
298 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
299 | otherwise, since we range over their symbols, we might look at a | |
300 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
301 | `nvars', hence we overflow our arrays. | |
302 | ||
303 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
304 | ||
305 | The header can also be produced directly, without any obstack! | |
306 | Yahoo! | |
307 | ||
308 | * src/files.c, src/files.h (defines_obstack): Remove. | |
309 | (compute_header_macro): Global. | |
310 | (defines_obstack_save): Remove. | |
311 | * src/reader.c (parse_union_decl): No longer output to | |
312 | defines_obstack: its content can be found in the `stype' muscle | |
313 | anyway. | |
314 | (output_token_translations): Merge into... | |
315 | (symbols_output): this. | |
316 | Rename as... | |
317 | (symbols_save): this. | |
318 | (reader): Adjust. | |
319 | * src/output.c (header_output): New. | |
320 | (output): Call it. | |
321 | ||
322 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
323 | ||
324 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
325 | simultaneously, use one to define the `stype' muscle, and use the | |
326 | value of the latter to fill defines_obstack. | |
327 | (copy_comment): Remove. | |
328 | (copy_comment2): Work for a single obstack. | |
329 | Rename as... | |
330 | (copy_comment): this. | |
331 | ||
332 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
333 | ||
334 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
335 | * src/reader.c (parse_union_decl): Revamp. | |
336 | ||
337 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
338 | ||
339 | Still making progress in separating Bison into (i) input, (ii) | |
340 | process, (iii) output: now we can directly output the parser file | |
341 | without using table_obstack at all. | |
342 | ||
343 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
344 | (parser_file_name): New. | |
345 | * src/files.c (compute_output_file_names): Compute it. | |
346 | * src/output.c (actions_output, output_parser) | |
347 | (output_master_parser): To a file instead of an obstack. | |
348 | ||
349 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
350 | ||
351 | Attach actions to rules, instead of pre-outputting them to | |
352 | actions_obstack. | |
353 | ||
354 | * src/gram.h (rule_t): action and action_line are new members. | |
355 | * src/reader.c (symbol_list): Likewise. | |
356 | (copy_action): Save the actions within the rule. | |
357 | (packgram): Save them in rule_table. | |
358 | * src/output.c (actions_output): New. | |
359 | (output_parser): Use it on `%%actions'. | |
360 | (output_rule_data): Don't free rule_table. | |
361 | (output): Do it. | |
362 | (prepare): Don't save the `action' muscle. | |
363 | * src/bison.simple: s/%%action/%%actions/. | |
364 | ||
365 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
366 | ||
367 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
368 | to the user action: let it fail if lacking. | |
369 | Suggested by Arnold Robbins and Tom Tromey. | |
370 | ||
371 | 2001-12-14 Akim Demaille <akim@epita.fr> | |
372 | ||
373 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
374 | longer mess around with obstacks and int pointers. | |
375 | Adjust all callers. | |
376 | ||
377 | 2001-12-14 Akim Demaille <akim@epita.fr> | |
378 | ||
379 | * src/lex.c (literalchar): Don't escape the special characters, | |
380 | just decode them, and keep them as char (before, eol was output as | |
381 | the 2 char string `\n' etc.). | |
382 | * src/output.c (output_rule_data): Use quotearg to output the | |
383 | token strings. | |
384 | ||
385 | 2001-12-13 Paul Eggert <eggert@twinsun.com> | |
386 | ||
387 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
388 | Do not infringe on the global user namespace when using C++. | |
389 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
390 | All uses of `fprintf' and `stderr' changed. | |
391 | ||
392 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
393 | ||
394 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
395 | ||
396 | The computation of nullable is broken: it doesn't handle empty | |
397 | RHS's properly. | |
398 | ||
399 | * tests/torture.at (GNU AWK Grammar): New. | |
400 | * tests/sets.at (Nullable): New. | |
401 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
402 | `ritems', loop over the rules, and then over their rhs's. | |
403 | ||
404 | Work around Autotest bugs. | |
405 | ||
406 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
407 | frame, because Autotest understand lines starting with a `+' as | |
408 | traces from the shell. Then, they are not processed properly. | |
409 | Admittedly an Autotest bug, but we don't have time to wait for | |
410 | Autotest to catch up. | |
411 | * tests/regression.at (Broken Closure): Adjust to the new table | |
412 | frames. | |
413 | Move to... | |
414 | * tests/sets.at: here. | |
415 | ||
416 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
417 | ||
418 | * src/closure.c (closure): Use nrules instead of playing tricks | |
419 | with BITS_PER_WORD. | |
420 | ||
421 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
422 | ||
423 | * src/print.c (print_actions): Output the handling of `$' as the | |
424 | traces do: shifting the token EOF. Before EOF was treated as a | |
425 | nonterminal. | |
426 | * tests/regression.at: Adjust some tests. | |
427 | * src/print_graph.c (print_core): Complete the set of items via | |
428 | closure. The next-to-final and final states are still unsatisfying, | |
429 | but that's to be addressed elsewhere. | |
430 | No longer output the rule numbers, but do output the state number. | |
431 | A single loop for the shifts + gotos is enough, but picked a | |
432 | distinct color for each. | |
433 | (print_graph): Initialize and finalize closure. | |
434 | ||
435 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
436 | ||
437 | * src/reader.c (readgram): Remove dead code, an strip useless | |
438 | braces. | |
439 | (get_type): Remove, unused. | |
440 | ||
441 | 2001-12-12 Akim Demaille <akim@epita.fr> | |
442 | ||
443 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
444 | on that of lib/error.c. | |
445 | ||
446 | 2001-12-12 Akim Demaille <akim@epita.fr> | |
447 | ||
448 | Some hosts don't like `/' in includes. | |
449 | ||
450 | * src/system.h: Include libgettext.h without qualifying the path. | |
451 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
452 | $(top_srcdir). | |
453 | ||
454 | 2001-12-11 Marc Autret <autret_m@epita.fr> | |
455 | ||
456 | * src/output.c (output_parser): Remove useless muscle. | |
457 | ||
458 | 2001-12-11 Marc Autret <autret_m@epita.fr> | |
459 | ||
460 | * src/bison.simple: Remove #line just before %%epilogue. It | |
461 | is now handled in ... | |
462 | * src/reader.c (read_additionnal_code): Add the output of a | |
463 | #line for the epilogue. | |
464 | ||
465 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
466 | ||
467 | * src/reader.c (copy_definition): Re-use CPP-outed code which | |
468 | replace precedent remove. | |
469 | * src/bison.simple: Remove #line before %%prologue because | |
470 | %%input-line is wrong at this time. | |
471 | ||
472 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
473 | ||
474 | * src/reader.c (symbols_output): Clean up. | |
475 | * src/output.c (output_gram, output): Clean up. | |
476 | ||
477 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
478 | ||
479 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
480 | * src/LR0.c (set_state_table): here. | |
481 | * src/lalr.c (lalr): Call it. | |
482 | ||
483 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
484 | ||
485 | * src/state.h (shifts): Remove the `number' member: shifts are | |
486 | attached to state, hence no longer need to be labelled with a | |
487 | state number. | |
488 | ||
489 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
490 | ||
491 | Now that states have a complete set of members, the linked list of | |
492 | shifts is useless: just fill directly the state's shifts member. | |
493 | ||
494 | * src/state.h (shifts): Remove the `next' member. | |
495 | * src/LR0.c (first_state, last_state): Remove. | |
496 | Adjust the callers. | |
497 | (augment_automaton): Don't look for the shifts that must be added | |
498 | a shift on EOF: it is those of the state we looked for! But now, | |
499 | since shifts are attached, it is no longer needed to looking | |
500 | merely by its id: its number. | |
501 | ||
502 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
503 | ||
504 | * src/LR0.c (augment_automaton): Better variable locality. | |
505 | Remove an impossible branch: if there is a state corresponding to | |
506 | the start symbol being shifted, then there is shift for the start | |
507 | symbol from the initial state. | |
508 | ||
509 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
510 | ||
511 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
512 | only when appropriate: when insert_start_shifting_state' is not | |
513 | invoked. | |
514 | * tests/regression.at (Rule Line Numbers): Adjust. | |
515 | ||
516 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
517 | ||
518 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
519 | merge the two cases addition shifts to the initial state. | |
520 | ||
521 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
522 | ||
523 | * src/lalr.c (set_state_table): Move to... | |
524 | * src/LR0.c: here. | |
525 | * src/lalr.c (lalr): Don't call it... | |
526 | * src/LR0.c (generate_states): do it. | |
527 | * src/LR0.h (first_state): Remove, only the table is used. | |
528 | ||
529 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
530 | ||
531 | * src/LR0.h (first_shift, first_reduction): Remove. | |
532 | * src/lalr.c: Don't use first_shift: find shifts through the | |
533 | states. | |
534 | ||
535 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
536 | ||
537 | * src/LR0.c: Attach shifts to states as soon as they are | |
538 | computed. | |
539 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
540 | state, just assert that the mapping was properly done. | |
541 | ||
542 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
543 | ||
544 | * src/LR0.c (insert_start_shift): Rename as... | |
545 | (insert_start_shifting_state): this. | |
546 | (insert_eof_shifting_state, insert_accepting_state): New. | |
547 | (augment_automaton): Adjust. | |
548 | Better locality of the variables. | |
549 | When looking if the start_symbol is shifted from the initial | |
550 | state, using `while (... symbol != start_symbol ...)' sounds | |
551 | better than `while (... symbol < start_symbol ...)': If fail | |
552 | to see how the order between symbols could be relevant! | |
553 | ||
554 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
555 | ||
556 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
557 | `spec_file_prefix', declared by src/files.h. | |
558 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
559 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
560 | * src/output.c (prepare): Adjust. | |
561 | * src/reader.c (symbols_output): Likewise. | |
562 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
563 | ||
564 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
565 | ||
566 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
567 | `"0"'. | |
568 | ||
569 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
570 | ||
571 | * src/reader.c (reader): Calling symbols_output once is enough. | |
572 | ||
573 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
574 | ||
575 | Now that states have a complete set of members, the linked list of | |
576 | reductions is useless: just fill directly the state's reductions | |
577 | member. | |
578 | ||
579 | * src/state.h (struct reductions): Remove member `number' and | |
580 | `next'. | |
581 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
582 | (save_reductions): Don't link the new reductions, store them in | |
583 | this_state. | |
584 | * src/lalr.c (set_state_table): No need to attach reductions to | |
585 | states, it's already done. | |
586 | * src/output.c (output_actions): No longer free the shifts, then | |
587 | the reductions, then the states: free all the states and their | |
588 | members. | |
589 | ||
590 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
591 | ||
592 | * src/options.c (OPTN, DRTV, BOTH): New. | |
593 | (option_table): Use them. | |
594 | ||
595 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's | |
596 | the job of system.h. | |
597 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
598 | reasons. | |
599 | ||
600 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
601 | ||
602 | * src/output.c (output, prepare): Make sure the values of the | |
603 | muscles `action' and `prologue' are 0-terminated. | |
604 | ||
605 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
606 | ||
607 | Clean up GCC warnings. | |
608 | ||
609 | * src/reader.c (copy_action): `buf' is not used. | |
610 | (parse_skel_decl): Be static. | |
611 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
612 | * src/options.h (create_long_option_table): Have a real prototype. | |
613 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
614 | (hash_delete_at): Return const void *. | |
615 | Adjust casts to preserve the const. | |
616 | ||
617 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
618 | ||
619 | * configure.in: Require 2.52g. | |
620 | M4 is not needed, but AUTOM4TE is. | |
621 | * m4/m4.m4: Remove. | |
622 | * tests/Makefile.am: Adjust. | |
623 | ||
624 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
625 | ||
626 | One structure for states is enough, even though theoretically | |
627 | there are LR(0) states and LALR(1) states. | |
628 | ||
629 | * src/lalr.h (state_t): Remove. | |
630 | (state_table): Be state_t **, not state_t *. | |
631 | * src/state.h (core, CORE_ALLOC): Rename as... | |
632 | (state_t, STATE_ALLOC): this. | |
633 | Add the LALR(1) members: shifts, reductions, errs. | |
634 | * src/LR0.c (state_table): Rename as... | |
635 | (state_hash): this, to avoid name clashes with the global | |
636 | `state_table'. | |
637 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
638 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
639 | ||
640 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
641 | ||
642 | Bison dumps core on bash.y. | |
643 | Reported by Pascal Bart. | |
644 | ||
645 | * src/warshall.c (bitmatrix_print): New. | |
646 | (TC): Use it. | |
647 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
648 | j must be the outer loop. | |
649 | * tests/regression.at (Broken Closure): New. | |
650 | ||
651 | 2001-12-05 Akim Demaille <akim@epita.fr> | |
652 | ||
653 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
654 | its argument. | |
655 |