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