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