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