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