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