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