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