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