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