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