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