This page contains the following errors:

error on line 2793 at column 129: Premature end of data in tag tr line 2792

Below is a rendering of the page up to the first error.

git.saurik.com Git - bison.git/blame - ChangeLog
* src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
[bison.git] / ChangeLog
CommitLineData
1a2b5d37
AD
12001-12-29 Akim Demaille <akim@epita.fr>
2
3 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
4 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6 as rules.
7
8
1cca533e
AD
92001-12-29 Akim Demaille <akim@epita.fr>
10
11 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12 ago.
13
14
c03ae966
AD
152001-12-29 Akim Demaille <akim@epita.fr>
16
17 * src/reader.c, src/reader.h (user_toknums): Remove.
18 Adjust all users to use symbols[i]->user_token_number.
19
20
5a670b1e
AD
212001-12-29 Akim Demaille <akim@epita.fr>
22
23 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
24 Adjust all users to use symbols[i]->prec or ->assoc.
25
26
ad949da9
AD
272001-12-29 Akim Demaille <akim@epita.fr>
28
29 * src/reader.c, src/reader.h (tags): Remove.
30 Adjust all users to use symbols[i]->tag.
31
32
0e78e603
AD
332001-12-29 Akim Demaille <akim@epita.fr>
34
35 * src/gram.h, src/gram.c (symbols): New, similar to state_table
36 and rule_table.
37 * src/reader.c (packsymbols): Fill this table.
38 Drop sprec.
39 * src/conflicts.c (resolve_sr_conflict): Adjust.
40 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
41 single table.
42 Use symbols[i]->tag instead of tags[i].
43
44
213e640e
AD
452001-12-29 Akim Demaille <akim@epita.fr>
46
47 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
48 In addition, put a comment in there, to replace...
49 * tests/regression.at (%union and C comments): Remove.
50
51
e7b8bef1
AD
522001-12-29 Akim Demaille <akim@epita.fr>
53
54 * tests/regression.at (Web2c Actions): Blindly move the actual
55 output as expected output. The contents *seem* right to me, but I
56 can't pretend reading perfectly parser tables... Nonetheless, all
57 the other tests pass correctly, the table look OK, even though the
58 presence of `$axiom' is to be noted: AFAICS it is useless (but
59 harmless).
60
61
b68e7744
AD
622001-12-29 Akim Demaille <akim@epita.fr>
63
64 * src/reader.c (readgram): Don't add the rule 0 if there were no
65 rules read. In other words, add it _after_ having performed
66 grammar sanity checks.
67 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
68
69
78d5bae9
AD
702001-12-29 Akim Demaille <akim@epita.fr>
71
72 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
73 visible, and some states have now a different number.
74
75
ff442794
AD
762001-12-29 Akim Demaille <akim@epita.fr>
77
78 * src/reader.c (readgram): Bind the initial rule's lineno to that
79 of the first rule.
80 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
81 (Solved SR Conflicts): Adjust rule 0's line number.
82
83
610ab194
AD
842001-12-29 Akim Demaille <akim@epita.fr>
85
86 Fix the `GAWK Grammar' failure.
87
88 * src/LR0.c (final_state): Initialize to -1 so that we do compute
89 the reductions of the first state which was mistakenly confused
90 with the final state because precisely final_state was initialized
91 to 0.
92 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
93 now noticed by Bison.
94 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
95 have a reduction on $default.
96
97
29d29c8f
AD
982001-12-29 Akim Demaille <akim@epita.fr>
99
100 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
101 rule line numbers.
102 * src/closure.c (print_closure): Likewise.
103 * src/derives.c (print_derives): Likewise.
104 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
105 now.
106
7c6b64d0
AD
1072001-12-29 Akim Demaille <akim@epita.fr>
108
109 * src/lalr.c (lookaheads_print): New.
110 (lalr): Call it when --trace-flag.
111 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
112 are dumped.
113
114
3d4daee3
AD
1152001-12-29 Akim Demaille <akim@epita.fr>
116
117 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
118 when walking through ritem, even via rule->rhs.
119 * src/reduce.c (dump_grammar, useful_production, reduce_output)
120 (useful_production, useless_nonterminals): Likewise.
121 (reduce_grammar_tables): Likewise, plus update nritems.
122 * src/nullable.c (set_nullable): Likewise.
123 * src/lalr.c (build_relations): Likewise.
124 * tests/sets.at (Nullable): Adjust.
125 Fortunately, now, the $axiom is no longer nullable.
126
127
9e7f6bbd
AD
1282001-12-29 Akim Demaille <akim@epita.fr>
129
130 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
131 the 0-sentinel.
132 * src/gram.c (ritem_longest_rhs): Likewise.
133 * src/reduce.c (nonterminals_reduce): Likewise.
134 * src/print_graph.c (print_graph): Likewise.
135 * src/output.c (output_rule_data): Likewise.
136 * src/nullable.c (set_nullable): Likewise.
137
255ef638
AD
1382001-12-29 Akim Demaille <akim@epita.fr>
139
140 * src/output.c: Comment changes.
141
0d8a7363
AD
1422001-12-27 Paul Eggert <eggert@twinsun.com>
143
144 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
145 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
146 Sparc, as they were causing more porting problems than the
147 (minor) performance improvement was worth.
148
149 Also, catch up with 1.31's YYSTD.
150
3db472b9
AD
1512001-12-27 Akim Demaille <akim@epita.fr>
152
153 * src/output.c (output_gram): Rely on nritems, not the
154 0-sentinel. See below.
155 Use -1 as separator, not 0.
156 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
157 Rely on -1 as separator in yyrhs, instead of 0.
158 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
159 twice `Now at end of input', therefore there are two lines less to
160 expect.
161
b365aa05
AD
1622001-12-27 Akim Demaille <akim@epita.fr>
163
164 * tests/regression.at (Unresolved SR Conflicts):
165 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
166 below.
167
30171f79
AD
1682001-12-27 Akim Demaille <akim@epita.fr>
169
170 * src/LR0.c (new_state): Recognize the final state by the fact it
171 is reached by eoftoken.
172 (insert_start_shifting_state, insert_eof_shifting_state)
173 (insert_accepting_state, augment_automaton): Remove, since now
174 these states are automatically computed from the initial state.
175 (generate_states): Adjust.
176 * src/print.c: When reporting a rule number to the user, substract
177 1, so that the axiom rule is rule 0, and the first user rule is 1.
178 * src/reduce.c: Likewise.
179 * src/print_graph.c (print_core): For the time being, just as for
180 the report, depend upon --trace-flags to dump the full set of
181 items.
182 * src/reader.c (readgram): Once the grammar read, insert the rule
183 0: `$axiom: START-SYMBOL $'.
184 * tests/set.at: Adjust: rule 0 is now displayed, and since the
185 number of the states has changed (the final state is no longer
186 necessarily the last), catch up.
187
75142d45
AD
1882001-12-27 Akim Demaille <akim@epita.fr>
189
190 Try to make the use of the eoftoken valid. Given that its value
191 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
192 is used instead of > 0 where appropriate, (ii), depend upon nritems
193 instead of the 0-sentinel.
194
195 * src/gram.h, src/gram.c (nritems): New.
196 Expected to be duplication of nitems, but for the time being...
197 * src/reader.c (packgram): Assert nritems and nitems are equal.
198 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
199 * src/closure.c (print_closure, print_fderives): Likewise.
200 * src/gram.c (ritem_print): Likewise.
201 * src/print.c (print_core, print_grammar): Likewise.
202 * src/print_graph.c: Likewise.
203
b7c49edf
AD
2042001-12-27 Akim Demaille <akim@epita.fr>
205
206 * src/main.c (main): If there are complains after grammar
207 reductions, then output the report anyway if requested, then die.
208 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
209 * src/reader.c (eoftoken): New.
210 (parse_token_decl): If the token being defined has value `0', it
211 is the eoftoken.
212 (packsymbols): No longer hack `tags' to insert `$' by hand.
213 Be sure to preserve the value of the eoftoken.
214 (reader): Make sure eoftoken is defined.
215 Initialize nsyms to 0: now eoftoken is created just like the others.
216 * src/print.c (print_grammar): Don't special case the eof token.
217 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
218 lie anyway, albeit pleasant.
219 * tests/calc.at: Exercise error messages with eoftoken.
220 Change the grammar so that empty input is invalid.
221 Adjust expectations.
222 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
223
ec2da99f
AD
2242001-12-27 Akim Demaille <akim@epita.fr>
225
226 * configure.in: Check the protos of strchr ans strspn.
227 Replace strchr if needed.
228 * src/system.h: Provide the protos of strchr, strspn and memchr if
229 missing.
230 * lib/strchr.c: New.
231 * src/reader.c (symbols_save): Use strchr.
232
8adfa272
AD
2332001-12-27 Akim Demaille <akim@epita.fr>
234
235 * src/print.c, src/print_graph.c (escape): New.
236 Use it to quote the TAGS outputs.
237 * src/print_graph.c (print_state): Now errors are in red, and
238 reductions in green.
239 Prefer high to wide: output the state number on a line of its own.
240
80dac38c
AD
2412001-12-27 Akim Demaille <akim@epita.fr>
242
243 * src/state.h, src/state.c (reductions_new): New.
244 * src/LR0.c (set_state_table): Let all the states have a
245 `reductions', even if reduced to 0.
246 (save_reductions): Adjust.
247 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
248 * src/print.c (print_reductions, print_actions): Adjust.
249 * src/output.c (action_row): Adjust.
250
2cec70b9
AD
2512001-12-27 Akim Demaille <akim@epita.fr>
252
253 * src/state.h, src/state.c (errs_new, errs_dup): New.
254 * src/LR0.c (set_state_table): Let all the states have an errs,
255 even if reduced to 0.
256 * src/print.c (print_errs, print_reductions): Adjust.
257 * src/output.c (output_actions, action_row): Adjust.
258 * src/conflicts.c (resolve_sr_conflict): Adjust.
259
13ca549a
AD
2602001-12-27 Akim Demaille <akim@epita.fr>
261
262 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
263
5092aba5
AD
2642001-12-27 Akim Demaille <akim@epita.fr>
265
266 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
267 * src/print.c: here.
268 (lookaheadset, shiftset): New, used as additional storage by
269 print_reductions.
270 (print_results): Adjust.
271 (print_shifts, print_gotos, print_errs): New, extracted from...
272 (print_actions): here.
273 * src/print_graph.c (print_actions): Remove dead code.
274
11e2beca
AD
2752001-12-27 Akim Demaille <akim@epita.fr>
276
277 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
278 `$n' and `@n'.
279
dac3c910
AD
2802001-12-27 Akim Demaille <akim@epita.fr>
281
282 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
283 (build_relations): Adjust.
284
d0b0fefa
AD
2852001-12-27 Akim Demaille <akim@epita.fr>
286
287 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
288 duplication.
289
adc8c848
AD
2902001-12-27 Akim Demaille <akim@epita.fr>
291
292 * src/reader.c (packgram): Catch nitems overflows.
293
14d293ac
AD
2942001-12-27 Akim Demaille <akim@epita.fr>
295
296 * src/files.c, src/files.h (guard_obstack): Remove.
297 * src/output.c (output): Adjust.
298 * src/reader.c (parse_braces): New, factoring...
299 (copy_action, copy_guard): these two which are renamed as...
300 (parse_action, parse_guard): these.
301 As a voluntary consequence, using braces around guards is now
302 mandatory.
303
f499b062
AD
3042001-12-27 Akim Demaille <akim@epita.fr>
305
306 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
307 * src/reader.c (symbol_list): `guard' and `guard_line' are new
308 members.
309 (symbol_list_new): Adjust.
310 (copy_action): action_line is the first line, not the last.
311 (copy_guard): Just as for actions, store the `action' only, not
312 the switch/case/break flesh.
313 Don't parse the user action that might follow the guard, let...
314 (readgram): do it, i.e., now, there can be an action after a
315 guard.
316 In other words the guard is just explicitly optional.
317 (packgram): Adjust.
318 * src/output.c (guards_output): New.
319 (output_parser): Call it when needed.
320 (output): Also free the guard and attrs obstacks.
321 * src/files.c, src/files.h (obstack_save): Remove.
322 (output_files): Remove.
323 As a result, if one needs the former `.act' file, using an
324 appropriate skeleton which requires actions and guards is now
325 required.
326 * src/main.c (main): Adjust.
327 * tests/semantic.at: New.
328 * tests/regression.at: Use `input.y' as input file name.
329 Avoid 8+3 problems by requiring input.c when the test needs the
330 parser.
331
d945f5cd
AD
3322001-12-27 Akim Demaille <akim@epita.fr>
333
334 * src/reader.c (symbol_list_new): Be sure to initialize all the
335 fields.
336
d200e455
AD
3372001-12-27 Akim Demaille <akim@epita.fr>
338
339 All the hacks using a final pseudo state are now useless.
340
341 * src/LR0.c (set_state_table): state_table holds exactly nstates.
342 * src/lalr.c (nLA): New.
343 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
344 instead of lookaheadsp from the pseudo state (nstate + 1).
345
f9507c28
AD
3462001-12-27 Akim Demaille <akim@epita.fr>
347
348 * src/output.c (action_row, token_actions): Use a state_t instead
349 of a integer, and nlookaheads instead of the following state's
350 lookaheadsp.
351
065fbd27
AD
3522001-12-27 Akim Demaille <akim@epita.fr>
353
354 * src/conflicts.c (log_resolution, flush_shift)
355 (resolve_sr_conflict, set_conflicts, solve_conflicts)
356 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
357 (conflicts_print, print_reductions): Use a state_t instead of an
358 integer when referring to a state.
359 As much as possible, depend upon nlookaheads, instead of the
360 `lookaheadsp' member of the following state (since lookaheads of
361 successive states are successive, the difference between state n + 1
362 and n served as the number of lookaheads for state n).
363 * src/lalr.c (add_lookback_edge): Likewise.
364 * src/print.c (print_core, print_actions, print_state)
365 (print_results): Likewise.
366 * src/print_graph.c (print_core, print_actions, print_state)
367 (print_graph): Likewise.
368 * src/conflicts.h: Adjust.
369
1b177bd7
AD
3702001-12-27 Akim Demaille <akim@epita.fr>
371
372 * src/bison.hairy: Formatting/comment changes.
373 ANSIfy.
374 Remove `register' indications.
375 Add plenty of `static'.
376
7742ddeb
AD
3772001-12-27 Akim Demaille <akim@epita.fr>
378
379 * src/output.c (prepare): Drop the muscle `ntbase' which
380 duplicates ntokens.
381 * src/bison.simple: Formatting/comment changes.
382 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
383 is an undocumented synonym.
384
1fa14068
AD
3852001-12-22 Akim Demaille <akim@epita.fr>
386
387 * src/output.c (output_table_data): Change the prototype to use
388 `int' for array ranges: some invocations do pass an int, not a
389 short.
390 Reported by Wayne Green.
391
b9752825
AD
3922001-12-22 Akim Demaille <akim@epita.fr>
393
394 Some actions of web2c.y are improperly triggered.
395 Reported by Mike Castle.
396
397 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
398 * tests/regression.at (Web2c): Rename as...
399 (Web2c Report): this.
400 (Web2c Actions): New.
401
776209d6
AD
4022001-12-22 Akim Demaille <akim@epita.fr>
403
404 Reductions in web2c.y are improperly reported.
405 Reported by Mike Castle.
406
407 * src/conflicts.c (print_reductions): Fix.
408 * tests/regression.at (Web2c): New.
409
275fc3ad
AD
4102001-12-18 Akim Demaille <akim@epita.fr>
411
412 Some host fail on `assert (!"foo")', which expands to
413 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
414 Reported by Nelson Beebee.
415
416 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
417 `#define it_succeeded 0' and `assert (it_succeeded)'.
418
897668ee
MA
4192001-12-17 Marc Autret <autret_m@epita.fr>
420
421 * src/bison.simple: Don't hard code the skeleton line and filename.
422 * src/output.c (output_parser): Rename 'line' as 'output_line'.
423 New line counter 'skeleton_line' (skeleton-line muscle).
424
ab3399e0
PE
4252001-12-17 Paul Eggert <eggert@twinsun.com>
426
427 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
428 YYDEBUG must be defined to a nonzero value.
429
430 * src/bison.simple (yytname): Do not assume that the user defines
431 YYDEBUG to a properly parenthesized expression.
432
3877f72b
AD
4332001-12-17 Akim Demaille <akim@epita.fr>
434
435 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
436 nlookaheads is a new member.
437 Adjust all users.
438 * src/lalr.h (nlookaheads): Remove this orphan declaration.
439 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
440 state.
776209d6 441
331dbc1b
AD
4422001-12-17 Akim Demaille <akim@epita.fr>
443
444 * src/files.h, src/files.c (open_files, close_files): Remove.
445 * src/main.c (main): Don't open/close files, nor invoke lex_free,
446 let...
447 * src/reader.c (reader): Do it.
776209d6 448
be750e4c
AD
4492001-12-17 Akim Demaille <akim@epita.fr>
450
451 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 452
709ae8c6
AD
4532001-12-17 Akim Demaille <akim@epita.fr>
454
455 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
456 (flush_reduce): New.
457 (resolve_sr_conflict): Adjust.
776209d6 458
f87685c3
AD
4592001-12-17 Akim Demaille <akim@epita.fr>
460
461 * src/output.c (output_obstack): Be static and rename as...
462 (format_obstack): this, to avoid any confusion with files.c's
463 output_obstack.
464 * src/reader.h (muscle_obstack): Move to...
465 * src/output.h: here, since it's defined in output.c.
466
837491d8
AD
4672001-12-17 Akim Demaille <akim@epita.fr>
468
469 * src/output.c (action_row, save_column, default_goto)
470 (sort_actions, matching_state, pack_vector): Better variable
471 locality.
472
796d61fb
AD
4732001-12-17 Akim Demaille <akim@epita.fr>
474
475 * src/output.c: Various formatting changes.
776209d6 476
64d15509
AD
4772001-12-17 Akim Demaille <akim@epita.fr>
478
479 * src/files.c (output_files): Free the output_obstack.
480 * src/main.c (main): Call print and print_graph conditionally.
481 * src/print.c (print): Work unconditionally.
482 * src/print_graph.c (print_graph): Work unconditionally.
483 * src/conflicts.c (log_resolution): Output only if verbose_flag.
484
fbc8ecb7
MA
4852001-12-16 Marc Autret <autret_m@epita.fr>
486
487 * src/output.c (actions_output): Fix. When we use %no-lines,
488 there is one less line per action.
489
f0440388
MA
4902001-12-16 Marc Autret <autret_m@epita.fr>
491
492 * src/bison.simple: Remove a useless #line directive.
493 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
494 * src/output.c (get_lines_number): New.
776209d6 495 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
496 output muscles.
497 Fix line numbering.
498 (actions_output): Computes the number of lines taken by actions.
499 (output_master_parser): Insert new skeleton which is the name of
500 the output parser file name.
501
a79986b8
MA
5022001-12-15 Marc Autret <autret_m@epita.fr>
503
504 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
505
4ec8e00f
MA
5062001-12-15 Marc Autret <autret_m@epita.fr>
507
508 * src/output.c (output_gram): Keep track of the hairy one.
509
1a4648ff
AD
5102001-12-15 Akim Demaille <akim@epita.fr>
511
512 Make `make distcheck' work.
513
514 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
515 system.h which uses libgettext.h.
516
9c2c67e6
AD
5172001-12-15 Akim Demaille <akim@epita.fr>
518
519 * src/nullable.c (set_nullable): Useless rules must be skipped,
520 otherwise, since we range over their symbols, we might look at a
521 nonterminal which no longer ``exists'', i.e., it is not counted in
522 `nvars', hence we overflow our arrays.
523
93ede233
AD
5242001-12-15 Akim Demaille <akim@epita.fr>
525
526 The header can also be produced directly, without any obstack!
527 Yahoo!
528
529 * src/files.c, src/files.h (defines_obstack): Remove.
530 (compute_header_macro): Global.
531 (defines_obstack_save): Remove.
532 * src/reader.c (parse_union_decl): No longer output to
533 defines_obstack: its content can be found in the `stype' muscle
534 anyway.
535 (output_token_translations): Merge into...
536 (symbols_output): this.
537 Rename as...
538 (symbols_save): this.
539 (reader): Adjust.
540 * src/output.c (header_output): New.
541 (output): Call it.
542
2666f928
AD
5432001-12-15 Akim Demaille <akim@epita.fr>
544
545 * src/reader.c (parse_union_decl): Instead of handling two obstack
546 simultaneously, use one to define the `stype' muscle, and use the
547 value of the latter to fill defines_obstack.
548 (copy_comment): Remove.
549 (copy_comment2): Work for a single obstack.
550 Rename as...
551 (copy_comment): this.
552
428046f8
AD
5532001-12-15 Akim Demaille <akim@epita.fr>
554
555 * src/lex.c, src/lex.h (xgetc): No longer static.
556 * src/reader.c (parse_union_decl): Revamp.
557
ea52d706
AD
5582001-12-15 Akim Demaille <akim@epita.fr>
559
560 Still making progress in separating Bison into (i) input, (ii)
561 process, (iii) output: now we can directly output the parser file
562 without using table_obstack at all.
563
564 * src/files.c, src/files.h (table_obstack): Bye bye.
565 (parser_file_name): New.
566 * src/files.c (compute_output_file_names): Compute it.
567 * src/output.c (actions_output, output_parser)
568 (output_master_parser): To a file instead of an obstack.
569
3f96f4dc
AD
5702001-12-15 Akim Demaille <akim@epita.fr>
571
572 Attach actions to rules, instead of pre-outputting them to
573 actions_obstack.
574
575 * src/gram.h (rule_t): action and action_line are new members.
576 * src/reader.c (symbol_list): Likewise.
577 (copy_action): Save the actions within the rule.
578 (packgram): Save them in rule_table.
579 * src/output.c (actions_output): New.
580 (output_parser): Use it on `%%actions'.
581 (output_rule_data): Don't free rule_table.
582 (output): Do it.
583 (prepare): Don't save the `action' muscle.
584 * src/bison.simple: s/%%action/%%actions/.
585
51576fb3
AD
5862001-12-15 Akim Demaille <akim@epita.fr>
587
588 * src/reader.c (copy_action): When --yacc, don't append a `;'
589 to the user action: let it fail if lacking.
dee049eb 590 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 591
2648a72d
AD
5922001-12-14 Akim Demaille <akim@epita.fr>
593
594 * src/lex.c (literalchar): Simply return the char you decoded, non
595 longer mess around with obstacks and int pointers.
596 Adjust all callers.
597
92790e5b
AD
5982001-12-14 Akim Demaille <akim@epita.fr>
599
600 * src/lex.c (literalchar): Don't escape the special characters,
601 just decode them, and keep them as char (before, eol was output as
602 the 2 char string `\n' etc.).
603 * src/output.c (output_rule_data): Use quotearg to output the
604 token strings.
605
927c1557
PE
6062001-12-13 Paul Eggert <eggert@twinsun.com>
607
608 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
609 Do not infringe on the global user namespace when using C++.
610 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
611 All uses of `fprintf' and `stderr' changed.
612
613 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
614
ed8e1f68
AD
6152001-12-13 Akim Demaille <akim@epita.fr>
616
617 The computation of nullable is broken: it doesn't handle empty
618 RHS's properly.
619
620 * tests/torture.at (GNU AWK Grammar): New.
621 * tests/sets.at (Nullable): New.
622 * src/nullable.c (set_nullable): Instead of blindly looping over
623 `ritems', loop over the rules, and then over their rhs's.
624
625 Work around Autotest bugs.
626
627 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
628 frame, because Autotest understand lines starting with a `+' as
629 traces from the shell. Then, they are not processed properly.
630 Admittedly an Autotest bug, but we don't have time to wait for
631 Autotest to catch up.
632 * tests/regression.at (Broken Closure): Adjust to the new table
633 frames.
634 Move to...
635 * tests/sets.at: here.
636
cb581495
AD
6372001-12-13 Akim Demaille <akim@epita.fr>
638
639 * src/closure.c (closure): Use nrules instead of playing tricks
640 with BITS_PER_WORD.
641
2e729273
AD
6422001-12-13 Akim Demaille <akim@epita.fr>
643
644 * src/print.c (print_actions): Output the handling of `$' as the
645 traces do: shifting the token EOF. Before EOF was treated as a
646 nonterminal.
647 * tests/regression.at: Adjust some tests.
648 * src/print_graph.c (print_core): Complete the set of items via
649 closure. The next-to-final and final states are still unsatisfying,
650 but that's to be addressed elsewhere.
651 No longer output the rule numbers, but do output the state number.
652 A single loop for the shifts + gotos is enough, but picked a
653 distinct color for each.
654 (print_graph): Initialize and finalize closure.
655
107f7dfb
AD
6562001-12-13 Akim Demaille <akim@epita.fr>
657
658 * src/reader.c (readgram): Remove dead code, an strip useless
659 braces.
660 (get_type): Remove, unused.
661
9b53a24f
AD
6622001-12-12 Akim Demaille <akim@epita.fr>
663
664 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
665 on that of lib/error.c.
666
dbfb6dcd
AD
6672001-12-12 Akim Demaille <akim@epita.fr>
668
669 Some hosts don't like `/' in includes.
670
671 * src/system.h: Include libgettext.h without qualifying the path.
672 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
673 $(top_srcdir).
674
c25fb648
MA
6752001-12-11 Marc Autret <autret_m@epita.fr>
676
677 * src/output.c (output_parser): Remove useless muscle.
678
710ddc4f
MA
6792001-12-11 Marc Autret <autret_m@epita.fr>
680
681 * src/bison.simple: Remove #line just before %%epilogue. It
682 is now handled in ...
683 * src/reader.c (read_additionnal_code): Add the output of a
684 #line for the epilogue.
685
e83d80b8
MA
6862001-12-10 Marc Autret <autret_m@epita.fr>
687
927c1557 688 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
689 replace precedent remove.
690 * src/bison.simple: Remove #line before %%prologue because
691 %%input-line is wrong at this time.
692
971d5158
MA
6932001-12-10 Marc Autret <autret_m@epita.fr>
694
695 * src/reader.c (symbols_output): Clean up.
927c1557 696 * src/output.c (output_gram, output): Clean up.
971d5158 697
5edafffd
AD
6982001-12-10 Akim Demaille <akim@epita.fr>
699
700 * src/lalr.c (initialize_lookaheads): New. Extracted from...
701 * src/LR0.c (set_state_table): here.
702 * src/lalr.c (lalr): Call it.
703
0279f8e9
AD
7042001-12-10 Akim Demaille <akim@epita.fr>
705
706 * src/state.h (shifts): Remove the `number' member: shifts are
707 attached to state, hence no longer need to be labelled with a
708 state number.
709
190c4f5f
AD
7102001-12-10 Akim Demaille <akim@epita.fr>
711
712 Now that states have a complete set of members, the linked list of
713 shifts is useless: just fill directly the state's shifts member.
714
715 * src/state.h (shifts): Remove the `next' member.
716 * src/LR0.c (first_state, last_state): Remove.
717 Adjust the callers.
718 (augment_automaton): Don't look for the shifts that must be added
719 a shift on EOF: it is those of the state we looked for! But now,
720 since shifts are attached, it is no longer needed to looking
721 merely by its id: its number.
722
2a73b93d
AD
7232001-12-10 Akim Demaille <akim@epita.fr>
724
725 * src/LR0.c (augment_automaton): Better variable locality.
726 Remove an impossible branch: if there is a state corresponding to
727 the start symbol being shifted, then there is shift for the start
728 symbol from the initial state.
729
74392f6a
AD
7302001-12-10 Akim Demaille <akim@epita.fr>
731
732 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
733 only when appropriate: when insert_start_shifting_state' is not
734 invoked.
735 * tests/regression.at (Rule Line Numbers): Adjust.
736
37c82725
AD
7372001-12-10 Akim Demaille <akim@epita.fr>
738
739 * src/LR0.c (augment_automaton): Now that all states have shifts,
740 merge the two cases addition shifts to the initial state.
741
6a164e0c
AD
7422001-12-10 Akim Demaille <akim@epita.fr>
743
744 * src/lalr.c (set_state_table): Move to...
745 * src/LR0.c: here.
746 * src/lalr.c (lalr): Don't call it...
747 * src/LR0.c (generate_states): do it.
748 * src/LR0.h (first_state): Remove, only the table is used.
749
7215de24
AD
7502001-12-10 Akim Demaille <akim@epita.fr>
751
752 * src/LR0.h (first_shift, first_reduction): Remove.
753 * src/lalr.c: Don't use first_shift: find shifts through the
754 states.
755
80e25d4d
AD
7562001-12-10 Akim Demaille <akim@epita.fr>
757
758 * src/LR0.c: Attach shifts to states as soon as they are
759 computed.
760 * src/lalr.c (set_state_table): Instead of assigning shifts to
761 state, just assert that the mapping was properly done.
762
0ab3728b
AD
7632001-12-10 Akim Demaille <akim@epita.fr>
764
765 * src/LR0.c (insert_start_shift): Rename as...
766 (insert_start_shifting_state): this.
767 (insert_eof_shifting_state, insert_accepting_state): New.
768 (augment_automaton): Adjust.
769 Better locality of the variables.
770 When looking if the start_symbol is shifted from the initial
771 state, using `while (... symbol != start_symbol ...)' sounds
772 better than `while (... symbol < start_symbol ...)': If fail
773 to see how the order between symbols could be relevant!
774
78af9bbc
AD
7752001-12-10 Akim Demaille <akim@epita.fr>
776
777 * src/getargs.h: Don't declare `spec_name_prefix' and
778 `spec_file_prefix', declared by src/files.h.
779 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
780 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
781 * src/output.c (prepare): Adjust.
782 * src/reader.c (symbols_output): Likewise.
783 * src/vmsgetargs.c: Vaguely adjust, but who cares?
784
bdef2a41
AD
7852001-12-10 Akim Demaille <akim@epita.fr>
786
787 * src/muscle_tab.c (muscle_init): NULL is a better default than
788 `"0"'.
789
3735969c
AD
7902001-12-10 Akim Demaille <akim@epita.fr>
791
792 * src/reader.c (reader): Calling symbols_output once is enough.
793
49701457
AD
7942001-12-10 Akim Demaille <akim@epita.fr>
795
796 Now that states have a complete set of members, the linked list of
797 reductions is useless: just fill directly the state's reductions
798 member.
799
800 * src/state.h (struct reductions): Remove member `number' and
801 `next'.
802 * src/LR0.c (first_reduction, last_reduction): Remove.
803 (save_reductions): Don't link the new reductions, store them in
804 this_state.
805 * src/lalr.c (set_state_table): No need to attach reductions to
806 states, it's already done.
807 * src/output.c (output_actions): No longer free the shifts, then
808 the reductions, then the states: free all the states and their
809 members.
810
0edad749
AD
8112001-12-10 Akim Demaille <akim@epita.fr>
812
813 * src/options.c (OPTN, DRTV, BOTH): New.
814 (option_table): Use them.
815
0edad749
AD
816 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
817 the job of system.h.
818 * src/options.c: Don't include stdio.h and xalloc.h for the same
819 reasons.
820
5449dd0f
AD
8212001-12-10 Akim Demaille <akim@epita.fr>
822
823 * src/output.c (output, prepare): Make sure the values of the
824 muscles `action' and `prologue' are 0-terminated.
825
a870c567
AD
8262001-12-10 Akim Demaille <akim@epita.fr>
827
828 Clean up GCC warnings.
829
830 * src/reader.c (copy_action): `buf' is not used.
831 (parse_skel_decl): Be static.
832 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
833 * src/options.h (create_long_option_table): Have a real prototype.
834 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
835 (hash_delete_at): Return const void *.
836 Adjust casts to preserve the const.
837
80df8768
AD
8382001-12-10 Akim Demaille <akim@epita.fr>
839
840 * configure.in: Require 2.52g.
841 M4 is not needed, but AUTOM4TE is.
842 * m4/m4.m4: Remove.
843 * tests/Makefile.am: Adjust.
844
f693ad14
AD
8452001-12-10 Akim Demaille <akim@epita.fr>
846
847 One structure for states is enough, even though theoretically
848 there are LR(0) states and LALR(1) states.
849
850 * src/lalr.h (state_t): Remove.
851 (state_table): Be state_t **, not state_t *.
852 * src/state.h (core, CORE_ALLOC): Rename as...
853 (state_t, STATE_ALLOC): this.
854 Add the LALR(1) members: shifts, reductions, errs.
855 * src/LR0.c (state_table): Rename as...
856 (state_hash): this, to avoid name clashes with the global
857 `state_table'.
858 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
859 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
860
74ffbcb6
AD
8612001-12-10 Akim Demaille <akim@epita.fr>
862
863 Bison dumps core on bash.y.
864 Reported by Pascal Bart.
865
866 * src/warshall.c (bitmatrix_print): New.
867 (TC): Use it.
868 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
869 j must be the outer loop.
870 * tests/regression.at (Broken Closure): New.
871
07708e19
AD
8722001-12-05 Akim Demaille <akim@epita.fr>
873
874 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
875 its argument.
876