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