]>
Commit | Line | Data |
---|---|---|
be750e4c AD |
1 | 2001-12-17 Akim Demaille <akim@epita.fr> |
2 | ||
3 | * src/conflicts.c (print_reductions): Formatting changes. | |
4 | ||
5 | ||
709ae8c6 AD |
6 | 2001-12-17 Akim Demaille <akim@epita.fr> |
7 | ||
8 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
9 | (flush_reduce): New. | |
10 | (resolve_sr_conflict): Adjust. | |
11 | ||
12 | ||
f87685c3 AD |
13 | 2001-12-17 Akim Demaille <akim@epita.fr> |
14 | ||
15 | * src/output.c (output_obstack): Be static and rename as... | |
16 | (format_obstack): this, to avoid any confusion with files.c's | |
17 | output_obstack. | |
18 | * src/reader.h (muscle_obstack): Move to... | |
19 | * src/output.h: here, since it's defined in output.c. | |
20 | ||
21 | ||
837491d8 AD |
22 | 2001-12-17 Akim Demaille <akim@epita.fr> |
23 | ||
24 | * src/output.c (action_row, save_column, default_goto) | |
25 | (sort_actions, matching_state, pack_vector): Better variable | |
26 | locality. | |
27 | ||
28 | ||
796d61fb AD |
29 | 2001-12-17 Akim Demaille <akim@epita.fr> |
30 | ||
31 | * src/output.c: Various formatting changes. | |
32 | ||
33 | ||
64d15509 AD |
34 | 2001-12-17 Akim Demaille <akim@epita.fr> |
35 | ||
36 | * src/files.c (output_files): Free the output_obstack. | |
37 | * src/main.c (main): Call print and print_graph conditionally. | |
38 | * src/print.c (print): Work unconditionally. | |
39 | * src/print_graph.c (print_graph): Work unconditionally. | |
40 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
41 | ||
fbc8ecb7 MA |
42 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
43 | ||
44 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
45 | there is one less line per action. | |
46 | ||
f0440388 MA |
47 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
48 | ||
49 | * src/bison.simple: Remove a useless #line directive. | |
50 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
51 | * src/output.c (get_lines_number): New. | |
52 | (output_parser): Adjust, now takes care about the lines of a | |
53 | output muscles. | |
54 | Fix line numbering. | |
55 | (actions_output): Computes the number of lines taken by actions. | |
56 | (output_master_parser): Insert new skeleton which is the name of | |
57 | the output parser file name. | |
58 | ||
a79986b8 MA |
59 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
60 | ||
61 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
62 | ||
4ec8e00f MA |
63 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
64 | ||
65 | * src/output.c (output_gram): Keep track of the hairy one. | |
66 | ||
1a4648ff AD |
67 | 2001-12-15 Akim Demaille <akim@epita.fr> |
68 | ||
69 | Make `make distcheck' work. | |
70 | ||
71 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
72 | system.h which uses libgettext.h. | |
73 | ||
9c2c67e6 AD |
74 | 2001-12-15 Akim Demaille <akim@epita.fr> |
75 | ||
76 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
77 | otherwise, since we range over their symbols, we might look at a | |
78 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
79 | `nvars', hence we overflow our arrays. | |
80 | ||
93ede233 AD |
81 | 2001-12-15 Akim Demaille <akim@epita.fr> |
82 | ||
83 | The header can also be produced directly, without any obstack! | |
84 | Yahoo! | |
85 | ||
86 | * src/files.c, src/files.h (defines_obstack): Remove. | |
87 | (compute_header_macro): Global. | |
88 | (defines_obstack_save): Remove. | |
89 | * src/reader.c (parse_union_decl): No longer output to | |
90 | defines_obstack: its content can be found in the `stype' muscle | |
91 | anyway. | |
92 | (output_token_translations): Merge into... | |
93 | (symbols_output): this. | |
94 | Rename as... | |
95 | (symbols_save): this. | |
96 | (reader): Adjust. | |
97 | * src/output.c (header_output): New. | |
98 | (output): Call it. | |
99 | ||
2666f928 AD |
100 | 2001-12-15 Akim Demaille <akim@epita.fr> |
101 | ||
102 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
103 | simultaneously, use one to define the `stype' muscle, and use the | |
104 | value of the latter to fill defines_obstack. | |
105 | (copy_comment): Remove. | |
106 | (copy_comment2): Work for a single obstack. | |
107 | Rename as... | |
108 | (copy_comment): this. | |
109 | ||
428046f8 AD |
110 | 2001-12-15 Akim Demaille <akim@epita.fr> |
111 | ||
112 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
113 | * src/reader.c (parse_union_decl): Revamp. | |
114 | ||
ea52d706 AD |
115 | 2001-12-15 Akim Demaille <akim@epita.fr> |
116 | ||
117 | Still making progress in separating Bison into (i) input, (ii) | |
118 | process, (iii) output: now we can directly output the parser file | |
119 | without using table_obstack at all. | |
120 | ||
121 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
122 | (parser_file_name): New. | |
123 | * src/files.c (compute_output_file_names): Compute it. | |
124 | * src/output.c (actions_output, output_parser) | |
125 | (output_master_parser): To a file instead of an obstack. | |
126 | ||
3f96f4dc AD |
127 | 2001-12-15 Akim Demaille <akim@epita.fr> |
128 | ||
129 | Attach actions to rules, instead of pre-outputting them to | |
130 | actions_obstack. | |
131 | ||
132 | * src/gram.h (rule_t): action and action_line are new members. | |
133 | * src/reader.c (symbol_list): Likewise. | |
134 | (copy_action): Save the actions within the rule. | |
135 | (packgram): Save them in rule_table. | |
136 | * src/output.c (actions_output): New. | |
137 | (output_parser): Use it on `%%actions'. | |
138 | (output_rule_data): Don't free rule_table. | |
139 | (output): Do it. | |
140 | (prepare): Don't save the `action' muscle. | |
141 | * src/bison.simple: s/%%action/%%actions/. | |
142 | ||
51576fb3 AD |
143 | 2001-12-15 Akim Demaille <akim@epita.fr> |
144 | ||
145 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
146 | to the user action: let it fail if lacking. | |
147 | Suggested by Aharon Robbins and Tom Tromey. | |
148 | ||
2648a72d AD |
149 | 2001-12-14 Akim Demaille <akim@epita.fr> |
150 | ||
151 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
152 | longer mess around with obstacks and int pointers. | |
153 | Adjust all callers. | |
154 | ||
92790e5b AD |
155 | 2001-12-14 Akim Demaille <akim@epita.fr> |
156 | ||
157 | * src/lex.c (literalchar): Don't escape the special characters, | |
158 | just decode them, and keep them as char (before, eol was output as | |
159 | the 2 char string `\n' etc.). | |
160 | * src/output.c (output_rule_data): Use quotearg to output the | |
161 | token strings. | |
162 | ||
927c1557 PE |
163 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
164 | ||
165 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
166 | Do not infringe on the global user namespace when using C++. | |
167 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
168 | All uses of `fprintf' and `stderr' changed. | |
169 | ||
170 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
171 | ||
ed8e1f68 AD |
172 | 2001-12-13 Akim Demaille <akim@epita.fr> |
173 | ||
174 | The computation of nullable is broken: it doesn't handle empty | |
175 | RHS's properly. | |
176 | ||
177 | * tests/torture.at (GNU AWK Grammar): New. | |
178 | * tests/sets.at (Nullable): New. | |
179 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
180 | `ritems', loop over the rules, and then over their rhs's. | |
181 | ||
182 | Work around Autotest bugs. | |
183 | ||
184 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
185 | frame, because Autotest understand lines starting with a `+' as | |
186 | traces from the shell. Then, they are not processed properly. | |
187 | Admittedly an Autotest bug, but we don't have time to wait for | |
188 | Autotest to catch up. | |
189 | * tests/regression.at (Broken Closure): Adjust to the new table | |
190 | frames. | |
191 | Move to... | |
192 | * tests/sets.at: here. | |
193 | ||
cb581495 AD |
194 | 2001-12-13 Akim Demaille <akim@epita.fr> |
195 | ||
196 | * src/closure.c (closure): Use nrules instead of playing tricks | |
197 | with BITS_PER_WORD. | |
198 | ||
2e729273 AD |
199 | 2001-12-13 Akim Demaille <akim@epita.fr> |
200 | ||
201 | * src/print.c (print_actions): Output the handling of `$' as the | |
202 | traces do: shifting the token EOF. Before EOF was treated as a | |
203 | nonterminal. | |
204 | * tests/regression.at: Adjust some tests. | |
205 | * src/print_graph.c (print_core): Complete the set of items via | |
206 | closure. The next-to-final and final states are still unsatisfying, | |
207 | but that's to be addressed elsewhere. | |
208 | No longer output the rule numbers, but do output the state number. | |
209 | A single loop for the shifts + gotos is enough, but picked a | |
210 | distinct color for each. | |
211 | (print_graph): Initialize and finalize closure. | |
212 | ||
107f7dfb AD |
213 | 2001-12-13 Akim Demaille <akim@epita.fr> |
214 | ||
215 | * src/reader.c (readgram): Remove dead code, an strip useless | |
216 | braces. | |
217 | (get_type): Remove, unused. | |
218 | ||
9b53a24f AD |
219 | 2001-12-12 Akim Demaille <akim@epita.fr> |
220 | ||
221 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
222 | on that of lib/error.c. | |
223 | ||
dbfb6dcd AD |
224 | 2001-12-12 Akim Demaille <akim@epita.fr> |
225 | ||
226 | Some hosts don't like `/' in includes. | |
227 | ||
228 | * src/system.h: Include libgettext.h without qualifying the path. | |
229 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
230 | $(top_srcdir). | |
231 | ||
c25fb648 MA |
232 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
233 | ||
234 | * src/output.c (output_parser): Remove useless muscle. | |
235 | ||
710ddc4f MA |
236 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
237 | ||
238 | * src/bison.simple: Remove #line just before %%epilogue. It | |
239 | is now handled in ... | |
240 | * src/reader.c (read_additionnal_code): Add the output of a | |
241 | #line for the epilogue. | |
242 | ||
e83d80b8 MA |
243 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
244 | ||
927c1557 | 245 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
246 | replace precedent remove. |
247 | * src/bison.simple: Remove #line before %%prologue because | |
248 | %%input-line is wrong at this time. | |
249 | ||
971d5158 MA |
250 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
251 | ||
252 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 253 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 254 | |
5edafffd AD |
255 | 2001-12-10 Akim Demaille <akim@epita.fr> |
256 | ||
257 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
258 | * src/LR0.c (set_state_table): here. | |
259 | * src/lalr.c (lalr): Call it. | |
260 | ||
0279f8e9 AD |
261 | 2001-12-10 Akim Demaille <akim@epita.fr> |
262 | ||
263 | * src/state.h (shifts): Remove the `number' member: shifts are | |
264 | attached to state, hence no longer need to be labelled with a | |
265 | state number. | |
266 | ||
190c4f5f AD |
267 | 2001-12-10 Akim Demaille <akim@epita.fr> |
268 | ||
269 | Now that states have a complete set of members, the linked list of | |
270 | shifts is useless: just fill directly the state's shifts member. | |
271 | ||
272 | * src/state.h (shifts): Remove the `next' member. | |
273 | * src/LR0.c (first_state, last_state): Remove. | |
274 | Adjust the callers. | |
275 | (augment_automaton): Don't look for the shifts that must be added | |
276 | a shift on EOF: it is those of the state we looked for! But now, | |
277 | since shifts are attached, it is no longer needed to looking | |
278 | merely by its id: its number. | |
279 | ||
2a73b93d AD |
280 | 2001-12-10 Akim Demaille <akim@epita.fr> |
281 | ||
282 | * src/LR0.c (augment_automaton): Better variable locality. | |
283 | Remove an impossible branch: if there is a state corresponding to | |
284 | the start symbol being shifted, then there is shift for the start | |
285 | symbol from the initial state. | |
286 | ||
74392f6a AD |
287 | 2001-12-10 Akim Demaille <akim@epita.fr> |
288 | ||
289 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
290 | only when appropriate: when insert_start_shifting_state' is not | |
291 | invoked. | |
292 | * tests/regression.at (Rule Line Numbers): Adjust. | |
293 | ||
37c82725 AD |
294 | 2001-12-10 Akim Demaille <akim@epita.fr> |
295 | ||
296 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
297 | merge the two cases addition shifts to the initial state. | |
298 | ||
6a164e0c AD |
299 | 2001-12-10 Akim Demaille <akim@epita.fr> |
300 | ||
301 | * src/lalr.c (set_state_table): Move to... | |
302 | * src/LR0.c: here. | |
303 | * src/lalr.c (lalr): Don't call it... | |
304 | * src/LR0.c (generate_states): do it. | |
305 | * src/LR0.h (first_state): Remove, only the table is used. | |
306 | ||
7215de24 AD |
307 | 2001-12-10 Akim Demaille <akim@epita.fr> |
308 | ||
309 | * src/LR0.h (first_shift, first_reduction): Remove. | |
310 | * src/lalr.c: Don't use first_shift: find shifts through the | |
311 | states. | |
312 | ||
80e25d4d AD |
313 | 2001-12-10 Akim Demaille <akim@epita.fr> |
314 | ||
315 | * src/LR0.c: Attach shifts to states as soon as they are | |
316 | computed. | |
317 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
318 | state, just assert that the mapping was properly done. | |
319 | ||
0ab3728b AD |
320 | 2001-12-10 Akim Demaille <akim@epita.fr> |
321 | ||
322 | * src/LR0.c (insert_start_shift): Rename as... | |
323 | (insert_start_shifting_state): this. | |
324 | (insert_eof_shifting_state, insert_accepting_state): New. | |
325 | (augment_automaton): Adjust. | |
326 | Better locality of the variables. | |
327 | When looking if the start_symbol is shifted from the initial | |
328 | state, using `while (... symbol != start_symbol ...)' sounds | |
329 | better than `while (... symbol < start_symbol ...)': If fail | |
330 | to see how the order between symbols could be relevant! | |
331 | ||
78af9bbc AD |
332 | 2001-12-10 Akim Demaille <akim@epita.fr> |
333 | ||
334 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
335 | `spec_file_prefix', declared by src/files.h. | |
336 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
337 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
338 | * src/output.c (prepare): Adjust. | |
339 | * src/reader.c (symbols_output): Likewise. | |
340 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
341 | ||
bdef2a41 AD |
342 | 2001-12-10 Akim Demaille <akim@epita.fr> |
343 | ||
344 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
345 | `"0"'. | |
346 | ||
3735969c AD |
347 | 2001-12-10 Akim Demaille <akim@epita.fr> |
348 | ||
349 | * src/reader.c (reader): Calling symbols_output once is enough. | |
350 | ||
49701457 AD |
351 | 2001-12-10 Akim Demaille <akim@epita.fr> |
352 | ||
353 | Now that states have a complete set of members, the linked list of | |
354 | reductions is useless: just fill directly the state's reductions | |
355 | member. | |
356 | ||
357 | * src/state.h (struct reductions): Remove member `number' and | |
358 | `next'. | |
359 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
360 | (save_reductions): Don't link the new reductions, store them in | |
361 | this_state. | |
362 | * src/lalr.c (set_state_table): No need to attach reductions to | |
363 | states, it's already done. | |
364 | * src/output.c (output_actions): No longer free the shifts, then | |
365 | the reductions, then the states: free all the states and their | |
366 | members. | |
367 | ||
0edad749 AD |
368 | 2001-12-10 Akim Demaille <akim@epita.fr> |
369 | ||
370 | * src/options.c (OPTN, DRTV, BOTH): New. | |
371 | (option_table): Use them. | |
372 | ||
0edad749 AD |
373 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
374 | the job of system.h. | |
375 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
376 | reasons. | |
377 | ||
5449dd0f AD |
378 | 2001-12-10 Akim Demaille <akim@epita.fr> |
379 | ||
380 | * src/output.c (output, prepare): Make sure the values of the | |
381 | muscles `action' and `prologue' are 0-terminated. | |
382 | ||
a870c567 AD |
383 | 2001-12-10 Akim Demaille <akim@epita.fr> |
384 | ||
385 | Clean up GCC warnings. | |
386 | ||
387 | * src/reader.c (copy_action): `buf' is not used. | |
388 | (parse_skel_decl): Be static. | |
389 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
390 | * src/options.h (create_long_option_table): Have a real prototype. | |
391 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
392 | (hash_delete_at): Return const void *. | |
393 | Adjust casts to preserve the const. | |
394 | ||
80df8768 AD |
395 | 2001-12-10 Akim Demaille <akim@epita.fr> |
396 | ||
397 | * configure.in: Require 2.52g. | |
398 | M4 is not needed, but AUTOM4TE is. | |
399 | * m4/m4.m4: Remove. | |
400 | * tests/Makefile.am: Adjust. | |
401 | ||
f693ad14 AD |
402 | 2001-12-10 Akim Demaille <akim@epita.fr> |
403 | ||
404 | One structure for states is enough, even though theoretically | |
405 | there are LR(0) states and LALR(1) states. | |
406 | ||
407 | * src/lalr.h (state_t): Remove. | |
408 | (state_table): Be state_t **, not state_t *. | |
409 | * src/state.h (core, CORE_ALLOC): Rename as... | |
410 | (state_t, STATE_ALLOC): this. | |
411 | Add the LALR(1) members: shifts, reductions, errs. | |
412 | * src/LR0.c (state_table): Rename as... | |
413 | (state_hash): this, to avoid name clashes with the global | |
414 | `state_table'. | |
415 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
416 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
417 | ||
74ffbcb6 AD |
418 | 2001-12-10 Akim Demaille <akim@epita.fr> |
419 | ||
420 | Bison dumps core on bash.y. | |
421 | Reported by Pascal Bart. | |
422 | ||
423 | * src/warshall.c (bitmatrix_print): New. | |
424 | (TC): Use it. | |
425 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
426 | j must be the outer loop. | |
427 | * tests/regression.at (Broken Closure): New. | |
428 | ||
07708e19 AD |
429 | 2001-12-05 Akim Demaille <akim@epita.fr> |
430 | ||
431 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
432 | its argument. | |
433 |