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