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