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