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