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