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