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