]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
[bison.git] / ChangeLog
... / ...
CommitLineData
12001-12-29 Akim Demaille <akim@epita.fr>
2
3 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
4 ago.
5
6
72001-12-29 Akim Demaille <akim@epita.fr>
8
9 * src/reader.c, src/reader.h (user_toknums): Remove.
10 Adjust all users to use symbols[i]->user_token_number.
11
12
132001-12-29 Akim Demaille <akim@epita.fr>
14
15 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
16 Adjust all users to use symbols[i]->prec or ->assoc.
17
18
192001-12-29 Akim Demaille <akim@epita.fr>
20
21 * src/reader.c, src/reader.h (tags): Remove.
22 Adjust all users to use symbols[i]->tag.
23
24
252001-12-29 Akim Demaille <akim@epita.fr>
26
27 * src/gram.h, src/gram.c (symbols): New, similar to state_table
28 and rule_table.
29 * src/reader.c (packsymbols): Fill this table.
30 Drop sprec.
31 * src/conflicts.c (resolve_sr_conflict): Adjust.
32 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
33 single table.
34 Use symbols[i]->tag instead of tags[i].
35
36
372001-12-29 Akim Demaille <akim@epita.fr>
38
39 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
40 In addition, put a comment in there, to replace...
41 * tests/regression.at (%union and C comments): Remove.
42
43
442001-12-29 Akim Demaille <akim@epita.fr>
45
46 * tests/regression.at (Web2c Actions): Blindly move the actual
47 output as expected output. The contents *seem* right to me, but I
48 can't pretend reading perfectly parser tables... Nonetheless, all
49 the other tests pass correctly, the table look OK, even though the
50 presence of `$axiom' is to be noted: AFAICS it is useless (but
51 harmless).
52
53
542001-12-29 Akim Demaille <akim@epita.fr>
55
56 * src/reader.c (readgram): Don't add the rule 0 if there were no
57 rules read. In other words, add it _after_ having performed
58 grammar sanity checks.
59 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
60
61
622001-12-29 Akim Demaille <akim@epita.fr>
63
64 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
65 visible, and some states have now a different number.
66
67
682001-12-29 Akim Demaille <akim@epita.fr>
69
70 * src/reader.c (readgram): Bind the initial rule's lineno to that
71 of the first rule.
72 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
73 (Solved SR Conflicts): Adjust rule 0's line number.
74
75
762001-12-29 Akim Demaille <akim@epita.fr>
77
78 Fix the `GAWK Grammar' failure.
79
80 * src/LR0.c (final_state): Initialize to -1 so that we do compute
81 the reductions of the first state which was mistakenly confused
82 with the final state because precisely final_state was initialized
83 to 0.
84 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
85 now noticed by Bison.
86 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
87 have a reduction on $default.
88
89
902001-12-29 Akim Demaille <akim@epita.fr>
91
92 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
93 rule line numbers.
94 * src/closure.c (print_closure): Likewise.
95 * src/derives.c (print_derives): Likewise.
96 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
97 now.
98
992001-12-29 Akim Demaille <akim@epita.fr>
100
101 * src/lalr.c (lookaheads_print): New.
102 (lalr): Call it when --trace-flag.
103 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
104 are dumped.
105
106
1072001-12-29 Akim Demaille <akim@epita.fr>
108
109 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
110 when walking through ritem, even via rule->rhs.
111 * src/reduce.c (dump_grammar, useful_production, reduce_output)
112 (useful_production, useless_nonterminals): Likewise.
113 (reduce_grammar_tables): Likewise, plus update nritems.
114 * src/nullable.c (set_nullable): Likewise.
115 * src/lalr.c (build_relations): Likewise.
116 * tests/sets.at (Nullable): Adjust.
117 Fortunately, now, the $axiom is no longer nullable.
118
119
1202001-12-29 Akim Demaille <akim@epita.fr>
121
122 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
123 the 0-sentinel.
124 * src/gram.c (ritem_longest_rhs): Likewise.
125 * src/reduce.c (nonterminals_reduce): Likewise.
126 * src/print_graph.c (print_graph): Likewise.
127 * src/output.c (output_rule_data): Likewise.
128 * src/nullable.c (set_nullable): Likewise.
129
1302001-12-29 Akim Demaille <akim@epita.fr>
131
132 * src/output.c: Comment changes.
133
1342001-12-27 Paul Eggert <eggert@twinsun.com>
135
136 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
137 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
138 Sparc, as they were causing more porting problems than the
139 (minor) performance improvement was worth.
140
141 Also, catch up with 1.31's YYSTD.
142
1432001-12-27 Akim Demaille <akim@epita.fr>
144
145 * src/output.c (output_gram): Rely on nritems, not the
146 0-sentinel. See below.
147 Use -1 as separator, not 0.
148 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
149 Rely on -1 as separator in yyrhs, instead of 0.
150 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
151 twice `Now at end of input', therefore there are two lines less to
152 expect.
153
1542001-12-27 Akim Demaille <akim@epita.fr>
155
156 * tests/regression.at (Unresolved SR Conflicts):
157 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
158 below.
159
1602001-12-27 Akim Demaille <akim@epita.fr>
161
162 * src/LR0.c (new_state): Recognize the final state by the fact it
163 is reached by eoftoken.
164 (insert_start_shifting_state, insert_eof_shifting_state)
165 (insert_accepting_state, augment_automaton): Remove, since now
166 these states are automatically computed from the initial state.
167 (generate_states): Adjust.
168 * src/print.c: When reporting a rule number to the user, substract
169 1, so that the axiom rule is rule 0, and the first user rule is 1.
170 * src/reduce.c: Likewise.
171 * src/print_graph.c (print_core): For the time being, just as for
172 the report, depend upon --trace-flags to dump the full set of
173 items.
174 * src/reader.c (readgram): Once the grammar read, insert the rule
175 0: `$axiom: START-SYMBOL $'.
176 * tests/set.at: Adjust: rule 0 is now displayed, and since the
177 number of the states has changed (the final state is no longer
178 necessarily the last), catch up.
179
1802001-12-27 Akim Demaille <akim@epita.fr>
181
182 Try to make the use of the eoftoken valid. Given that its value
183 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
184 is used instead of > 0 where appropriate, (ii), depend upon nritems
185 instead of the 0-sentinel.
186
187 * src/gram.h, src/gram.c (nritems): New.
188 Expected to be duplication of nitems, but for the time being...
189 * src/reader.c (packgram): Assert nritems and nitems are equal.
190 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
191 * src/closure.c (print_closure, print_fderives): Likewise.
192 * src/gram.c (ritem_print): Likewise.
193 * src/print.c (print_core, print_grammar): Likewise.
194 * src/print_graph.c: Likewise.
195
1962001-12-27 Akim Demaille <akim@epita.fr>
197
198 * src/main.c (main): If there are complains after grammar
199 reductions, then output the report anyway if requested, then die.
200 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
201 * src/reader.c (eoftoken): New.
202 (parse_token_decl): If the token being defined has value `0', it
203 is the eoftoken.
204 (packsymbols): No longer hack `tags' to insert `$' by hand.
205 Be sure to preserve the value of the eoftoken.
206 (reader): Make sure eoftoken is defined.
207 Initialize nsyms to 0: now eoftoken is created just like the others.
208 * src/print.c (print_grammar): Don't special case the eof token.
209 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
210 lie anyway, albeit pleasant.
211 * tests/calc.at: Exercise error messages with eoftoken.
212 Change the grammar so that empty input is invalid.
213 Adjust expectations.
214 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
215
2162001-12-27 Akim Demaille <akim@epita.fr>
217
218 * configure.in: Check the protos of strchr ans strspn.
219 Replace strchr if needed.
220 * src/system.h: Provide the protos of strchr, strspn and memchr if
221 missing.
222 * lib/strchr.c: New.
223 * src/reader.c (symbols_save): Use strchr.
224
2252001-12-27 Akim Demaille <akim@epita.fr>
226
227 * src/print.c, src/print_graph.c (escape): New.
228 Use it to quote the TAGS outputs.
229 * src/print_graph.c (print_state): Now errors are in red, and
230 reductions in green.
231 Prefer high to wide: output the state number on a line of its own.
232
2332001-12-27 Akim Demaille <akim@epita.fr>
234
235 * src/state.h, src/state.c (reductions_new): New.
236 * src/LR0.c (set_state_table): Let all the states have a
237 `reductions', even if reduced to 0.
238 (save_reductions): Adjust.
239 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
240 * src/print.c (print_reductions, print_actions): Adjust.
241 * src/output.c (action_row): Adjust.
242
2432001-12-27 Akim Demaille <akim@epita.fr>
244
245 * src/state.h, src/state.c (errs_new, errs_dup): New.
246 * src/LR0.c (set_state_table): Let all the states have an errs,
247 even if reduced to 0.
248 * src/print.c (print_errs, print_reductions): Adjust.
249 * src/output.c (output_actions, action_row): Adjust.
250 * src/conflicts.c (resolve_sr_conflict): Adjust.
251
2522001-12-27 Akim Demaille <akim@epita.fr>
253
254 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
255
2562001-12-27 Akim Demaille <akim@epita.fr>
257
258 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
259 * src/print.c: here.
260 (lookaheadset, shiftset): New, used as additional storage by
261 print_reductions.
262 (print_results): Adjust.
263 (print_shifts, print_gotos, print_errs): New, extracted from...
264 (print_actions): here.
265 * src/print_graph.c (print_actions): Remove dead code.
266
2672001-12-27 Akim Demaille <akim@epita.fr>
268
269 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
270 `$n' and `@n'.
271
2722001-12-27 Akim Demaille <akim@epita.fr>
273
274 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
275 (build_relations): Adjust.
276
2772001-12-27 Akim Demaille <akim@epita.fr>
278
279 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
280 duplication.
281
2822001-12-27 Akim Demaille <akim@epita.fr>
283
284 * src/reader.c (packgram): Catch nitems overflows.
285
2862001-12-27 Akim Demaille <akim@epita.fr>
287
288 * src/files.c, src/files.h (guard_obstack): Remove.
289 * src/output.c (output): Adjust.
290 * src/reader.c (parse_braces): New, factoring...
291 (copy_action, copy_guard): these two which are renamed as...
292 (parse_action, parse_guard): these.
293 As a voluntary consequence, using braces around guards is now
294 mandatory.
295
2962001-12-27 Akim Demaille <akim@epita.fr>
297
298 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
299 * src/reader.c (symbol_list): `guard' and `guard_line' are new
300 members.
301 (symbol_list_new): Adjust.
302 (copy_action): action_line is the first line, not the last.
303 (copy_guard): Just as for actions, store the `action' only, not
304 the switch/case/break flesh.
305 Don't parse the user action that might follow the guard, let...
306 (readgram): do it, i.e., now, there can be an action after a
307 guard.
308 In other words the guard is just explicitly optional.
309 (packgram): Adjust.
310 * src/output.c (guards_output): New.
311 (output_parser): Call it when needed.
312 (output): Also free the guard and attrs obstacks.
313 * src/files.c, src/files.h (obstack_save): Remove.
314 (output_files): Remove.
315 As a result, if one needs the former `.act' file, using an
316 appropriate skeleton which requires actions and guards is now
317 required.
318 * src/main.c (main): Adjust.
319 * tests/semantic.at: New.
320 * tests/regression.at: Use `input.y' as input file name.
321 Avoid 8+3 problems by requiring input.c when the test needs the
322 parser.
323
3242001-12-27 Akim Demaille <akim@epita.fr>
325
326 * src/reader.c (symbol_list_new): Be sure to initialize all the
327 fields.
328
3292001-12-27 Akim Demaille <akim@epita.fr>
330
331 All the hacks using a final pseudo state are now useless.
332
333 * src/LR0.c (set_state_table): state_table holds exactly nstates.
334 * src/lalr.c (nLA): New.
335 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
336 instead of lookaheadsp from the pseudo state (nstate + 1).
337
3382001-12-27 Akim Demaille <akim@epita.fr>
339
340 * src/output.c (action_row, token_actions): Use a state_t instead
341 of a integer, and nlookaheads instead of the following state's
342 lookaheadsp.
343
3442001-12-27 Akim Demaille <akim@epita.fr>
345
346 * src/conflicts.c (log_resolution, flush_shift)
347 (resolve_sr_conflict, set_conflicts, solve_conflicts)
348 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
349 (conflicts_print, print_reductions): Use a state_t instead of an
350 integer when referring to a state.
351 As much as possible, depend upon nlookaheads, instead of the
352 `lookaheadsp' member of the following state (since lookaheads of
353 successive states are successive, the difference between state n + 1
354 and n served as the number of lookaheads for state n).
355 * src/lalr.c (add_lookback_edge): Likewise.
356 * src/print.c (print_core, print_actions, print_state)
357 (print_results): Likewise.
358 * src/print_graph.c (print_core, print_actions, print_state)
359 (print_graph): Likewise.
360 * src/conflicts.h: Adjust.
361
3622001-12-27 Akim Demaille <akim@epita.fr>
363
364 * src/bison.hairy: Formatting/comment changes.
365 ANSIfy.
366 Remove `register' indications.
367 Add plenty of `static'.
368
3692001-12-27 Akim Demaille <akim@epita.fr>
370
371 * src/output.c (prepare): Drop the muscle `ntbase' which
372 duplicates ntokens.
373 * src/bison.simple: Formatting/comment changes.
374 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
375 is an undocumented synonym.
376
3772001-12-22 Akim Demaille <akim@epita.fr>
378
379 * src/output.c (output_table_data): Change the prototype to use
380 `int' for array ranges: some invocations do pass an int, not a
381 short.
382 Reported by Wayne Green.
383
3842001-12-22 Akim Demaille <akim@epita.fr>
385
386 Some actions of web2c.y are improperly triggered.
387 Reported by Mike Castle.
388
389 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
390 * tests/regression.at (Web2c): Rename as...
391 (Web2c Report): this.
392 (Web2c Actions): New.
393
3942001-12-22 Akim Demaille <akim@epita.fr>
395
396 Reductions in web2c.y are improperly reported.
397 Reported by Mike Castle.
398
399 * src/conflicts.c (print_reductions): Fix.
400 * tests/regression.at (Web2c): New.
401
4022001-12-18 Akim Demaille <akim@epita.fr>
403
404 Some host fail on `assert (!"foo")', which expands to
405 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
406 Reported by Nelson Beebee.
407
408 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
409 `#define it_succeeded 0' and `assert (it_succeeded)'.
410
4112001-12-17 Marc Autret <autret_m@epita.fr>
412
413 * src/bison.simple: Don't hard code the skeleton line and filename.
414 * src/output.c (output_parser): Rename 'line' as 'output_line'.
415 New line counter 'skeleton_line' (skeleton-line muscle).
416
4172001-12-17 Paul Eggert <eggert@twinsun.com>
418
419 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
420 YYDEBUG must be defined to a nonzero value.
421
422 * src/bison.simple (yytname): Do not assume that the user defines
423 YYDEBUG to a properly parenthesized expression.
424
4252001-12-17 Akim Demaille <akim@epita.fr>
426
427 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
428 nlookaheads is a new member.
429 Adjust all users.
430 * src/lalr.h (nlookaheads): Remove this orphan declaration.
431 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
432 state.
433
4342001-12-17 Akim Demaille <akim@epita.fr>
435
436 * src/files.h, src/files.c (open_files, close_files): Remove.
437 * src/main.c (main): Don't open/close files, nor invoke lex_free,
438 let...
439 * src/reader.c (reader): Do it.
440
4412001-12-17 Akim Demaille <akim@epita.fr>
442
443 * src/conflicts.c (print_reductions): Formatting changes.
444
4452001-12-17 Akim Demaille <akim@epita.fr>
446
447 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
448 (flush_reduce): New.
449 (resolve_sr_conflict): Adjust.
450
4512001-12-17 Akim Demaille <akim@epita.fr>
452
453 * src/output.c (output_obstack): Be static and rename as...
454 (format_obstack): this, to avoid any confusion with files.c's
455 output_obstack.
456 * src/reader.h (muscle_obstack): Move to...
457 * src/output.h: here, since it's defined in output.c.
458
4592001-12-17 Akim Demaille <akim@epita.fr>
460
461 * src/output.c (action_row, save_column, default_goto)
462 (sort_actions, matching_state, pack_vector): Better variable
463 locality.
464
4652001-12-17 Akim Demaille <akim@epita.fr>
466
467 * src/output.c: Various formatting changes.
468
4692001-12-17 Akim Demaille <akim@epita.fr>
470
471 * src/files.c (output_files): Free the output_obstack.
472 * src/main.c (main): Call print and print_graph conditionally.
473 * src/print.c (print): Work unconditionally.
474 * src/print_graph.c (print_graph): Work unconditionally.
475 * src/conflicts.c (log_resolution): Output only if verbose_flag.
476
4772001-12-16 Marc Autret <autret_m@epita.fr>
478
479 * src/output.c (actions_output): Fix. When we use %no-lines,
480 there is one less line per action.
481
4822001-12-16 Marc Autret <autret_m@epita.fr>
483
484 * src/bison.simple: Remove a useless #line directive.
485 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
486 * src/output.c (get_lines_number): New.
487 (output_parser): Adjust, now takes care about the lines of a
488 output muscles.
489 Fix line numbering.
490 (actions_output): Computes the number of lines taken by actions.
491 (output_master_parser): Insert new skeleton which is the name of
492 the output parser file name.
493
4942001-12-15 Marc Autret <autret_m@epita.fr>
495
496 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
497
4982001-12-15 Marc Autret <autret_m@epita.fr>
499
500 * src/output.c (output_gram): Keep track of the hairy one.
501
5022001-12-15 Akim Demaille <akim@epita.fr>
503
504 Make `make distcheck' work.
505
506 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
507 system.h which uses libgettext.h.
508
5092001-12-15 Akim Demaille <akim@epita.fr>
510
511 * src/nullable.c (set_nullable): Useless rules must be skipped,
512 otherwise, since we range over their symbols, we might look at a
513 nonterminal which no longer ``exists'', i.e., it is not counted in
514 `nvars', hence we overflow our arrays.
515
5162001-12-15 Akim Demaille <akim@epita.fr>
517
518 The header can also be produced directly, without any obstack!
519 Yahoo!
520
521 * src/files.c, src/files.h (defines_obstack): Remove.
522 (compute_header_macro): Global.
523 (defines_obstack_save): Remove.
524 * src/reader.c (parse_union_decl): No longer output to
525 defines_obstack: its content can be found in the `stype' muscle
526 anyway.
527 (output_token_translations): Merge into...
528 (symbols_output): this.
529 Rename as...
530 (symbols_save): this.
531 (reader): Adjust.
532 * src/output.c (header_output): New.
533 (output): Call it.
534
5352001-12-15 Akim Demaille <akim@epita.fr>
536
537 * src/reader.c (parse_union_decl): Instead of handling two obstack
538 simultaneously, use one to define the `stype' muscle, and use the
539 value of the latter to fill defines_obstack.
540 (copy_comment): Remove.
541 (copy_comment2): Work for a single obstack.
542 Rename as...
543 (copy_comment): this.
544
5452001-12-15 Akim Demaille <akim@epita.fr>
546
547 * src/lex.c, src/lex.h (xgetc): No longer static.
548 * src/reader.c (parse_union_decl): Revamp.
549
5502001-12-15 Akim Demaille <akim@epita.fr>
551
552 Still making progress in separating Bison into (i) input, (ii)
553 process, (iii) output: now we can directly output the parser file
554 without using table_obstack at all.
555
556 * src/files.c, src/files.h (table_obstack): Bye bye.
557 (parser_file_name): New.
558 * src/files.c (compute_output_file_names): Compute it.
559 * src/output.c (actions_output, output_parser)
560 (output_master_parser): To a file instead of an obstack.
561
5622001-12-15 Akim Demaille <akim@epita.fr>
563
564 Attach actions to rules, instead of pre-outputting them to
565 actions_obstack.
566
567 * src/gram.h (rule_t): action and action_line are new members.
568 * src/reader.c (symbol_list): Likewise.
569 (copy_action): Save the actions within the rule.
570 (packgram): Save them in rule_table.
571 * src/output.c (actions_output): New.
572 (output_parser): Use it on `%%actions'.
573 (output_rule_data): Don't free rule_table.
574 (output): Do it.
575 (prepare): Don't save the `action' muscle.
576 * src/bison.simple: s/%%action/%%actions/.
577
5782001-12-15 Akim Demaille <akim@epita.fr>
579
580 * src/reader.c (copy_action): When --yacc, don't append a `;'
581 to the user action: let it fail if lacking.
582 Suggested by Arnold Robbins and Tom Tromey.
583
5842001-12-14 Akim Demaille <akim@epita.fr>
585
586 * src/lex.c (literalchar): Simply return the char you decoded, non
587 longer mess around with obstacks and int pointers.
588 Adjust all callers.
589
5902001-12-14 Akim Demaille <akim@epita.fr>
591
592 * src/lex.c (literalchar): Don't escape the special characters,
593 just decode them, and keep them as char (before, eol was output as
594 the 2 char string `\n' etc.).
595 * src/output.c (output_rule_data): Use quotearg to output the
596 token strings.
597
5982001-12-13 Paul Eggert <eggert@twinsun.com>
599
600 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
601 Do not infringe on the global user namespace when using C++.
602 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
603 All uses of `fprintf' and `stderr' changed.
604
605 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
606
6072001-12-13 Akim Demaille <akim@epita.fr>
608
609 The computation of nullable is broken: it doesn't handle empty
610 RHS's properly.
611
612 * tests/torture.at (GNU AWK Grammar): New.
613 * tests/sets.at (Nullable): New.
614 * src/nullable.c (set_nullable): Instead of blindly looping over
615 `ritems', loop over the rules, and then over their rhs's.
616
617 Work around Autotest bugs.
618
619 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
620 frame, because Autotest understand lines starting with a `+' as
621 traces from the shell. Then, they are not processed properly.
622 Admittedly an Autotest bug, but we don't have time to wait for
623 Autotest to catch up.
624 * tests/regression.at (Broken Closure): Adjust to the new table
625 frames.
626 Move to...
627 * tests/sets.at: here.
628
6292001-12-13 Akim Demaille <akim@epita.fr>
630
631 * src/closure.c (closure): Use nrules instead of playing tricks
632 with BITS_PER_WORD.
633
6342001-12-13 Akim Demaille <akim@epita.fr>
635
636 * src/print.c (print_actions): Output the handling of `$' as the
637 traces do: shifting the token EOF. Before EOF was treated as a
638 nonterminal.
639 * tests/regression.at: Adjust some tests.
640 * src/print_graph.c (print_core): Complete the set of items via
641 closure. The next-to-final and final states are still unsatisfying,
642 but that's to be addressed elsewhere.
643 No longer output the rule numbers, but do output the state number.
644 A single loop for the shifts + gotos is enough, but picked a
645 distinct color for each.
646 (print_graph): Initialize and finalize closure.
647
6482001-12-13 Akim Demaille <akim@epita.fr>
649
650 * src/reader.c (readgram): Remove dead code, an strip useless
651 braces.
652 (get_type): Remove, unused.
653
6542001-12-12 Akim Demaille <akim@epita.fr>
655
656 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
657 on that of lib/error.c.
658
6592001-12-12 Akim Demaille <akim@epita.fr>
660
661 Some hosts don't like `/' in includes.
662
663 * src/system.h: Include libgettext.h without qualifying the path.
664 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
665 $(top_srcdir).
666
6672001-12-11 Marc Autret <autret_m@epita.fr>
668
669 * src/output.c (output_parser): Remove useless muscle.
670
6712001-12-11 Marc Autret <autret_m@epita.fr>
672
673 * src/bison.simple: Remove #line just before %%epilogue. It
674 is now handled in ...
675 * src/reader.c (read_additionnal_code): Add the output of a
676 #line for the epilogue.
677
6782001-12-10 Marc Autret <autret_m@epita.fr>
679
680 * src/reader.c (copy_definition): Re-use CPP-outed code which
681 replace precedent remove.
682 * src/bison.simple: Remove #line before %%prologue because
683 %%input-line is wrong at this time.
684
6852001-12-10 Marc Autret <autret_m@epita.fr>
686
687 * src/reader.c (symbols_output): Clean up.
688 * src/output.c (output_gram, output): Clean up.
689
6902001-12-10 Akim Demaille <akim@epita.fr>
691
692 * src/lalr.c (initialize_lookaheads): New. Extracted from...
693 * src/LR0.c (set_state_table): here.
694 * src/lalr.c (lalr): Call it.
695
6962001-12-10 Akim Demaille <akim@epita.fr>
697
698 * src/state.h (shifts): Remove the `number' member: shifts are
699 attached to state, hence no longer need to be labelled with a
700 state number.
701
7022001-12-10 Akim Demaille <akim@epita.fr>
703
704 Now that states have a complete set of members, the linked list of
705 shifts is useless: just fill directly the state's shifts member.
706
707 * src/state.h (shifts): Remove the `next' member.
708 * src/LR0.c (first_state, last_state): Remove.
709 Adjust the callers.
710 (augment_automaton): Don't look for the shifts that must be added
711 a shift on EOF: it is those of the state we looked for! But now,
712 since shifts are attached, it is no longer needed to looking
713 merely by its id: its number.
714
7152001-12-10 Akim Demaille <akim@epita.fr>
716
717 * src/LR0.c (augment_automaton): Better variable locality.
718 Remove an impossible branch: if there is a state corresponding to
719 the start symbol being shifted, then there is shift for the start
720 symbol from the initial state.
721
7222001-12-10 Akim Demaille <akim@epita.fr>
723
724 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
725 only when appropriate: when insert_start_shifting_state' is not
726 invoked.
727 * tests/regression.at (Rule Line Numbers): Adjust.
728
7292001-12-10 Akim Demaille <akim@epita.fr>
730
731 * src/LR0.c (augment_automaton): Now that all states have shifts,
732 merge the two cases addition shifts to the initial state.
733
7342001-12-10 Akim Demaille <akim@epita.fr>
735
736 * src/lalr.c (set_state_table): Move to...
737 * src/LR0.c: here.
738 * src/lalr.c (lalr): Don't call it...
739 * src/LR0.c (generate_states): do it.
740 * src/LR0.h (first_state): Remove, only the table is used.
741
7422001-12-10 Akim Demaille <akim@epita.fr>
743
744 * src/LR0.h (first_shift, first_reduction): Remove.
745 * src/lalr.c: Don't use first_shift: find shifts through the
746 states.
747
7482001-12-10 Akim Demaille <akim@epita.fr>
749
750 * src/LR0.c: Attach shifts to states as soon as they are
751 computed.
752 * src/lalr.c (set_state_table): Instead of assigning shifts to
753 state, just assert that the mapping was properly done.
754
7552001-12-10 Akim Demaille <akim@epita.fr>
756
757 * src/LR0.c (insert_start_shift): Rename as...
758 (insert_start_shifting_state): this.
759 (insert_eof_shifting_state, insert_accepting_state): New.
760 (augment_automaton): Adjust.
761 Better locality of the variables.
762 When looking if the start_symbol is shifted from the initial
763 state, using `while (... symbol != start_symbol ...)' sounds
764 better than `while (... symbol < start_symbol ...)': If fail
765 to see how the order between symbols could be relevant!
766
7672001-12-10 Akim Demaille <akim@epita.fr>
768
769 * src/getargs.h: Don't declare `spec_name_prefix' and
770 `spec_file_prefix', declared by src/files.h.
771 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
772 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
773 * src/output.c (prepare): Adjust.
774 * src/reader.c (symbols_output): Likewise.
775 * src/vmsgetargs.c: Vaguely adjust, but who cares?
776
7772001-12-10 Akim Demaille <akim@epita.fr>
778
779 * src/muscle_tab.c (muscle_init): NULL is a better default than
780 `"0"'.
781
7822001-12-10 Akim Demaille <akim@epita.fr>
783
784 * src/reader.c (reader): Calling symbols_output once is enough.
785
7862001-12-10 Akim Demaille <akim@epita.fr>
787
788 Now that states have a complete set of members, the linked list of
789 reductions is useless: just fill directly the state's reductions
790 member.
791
792 * src/state.h (struct reductions): Remove member `number' and
793 `next'.
794 * src/LR0.c (first_reduction, last_reduction): Remove.
795 (save_reductions): Don't link the new reductions, store them in
796 this_state.
797 * src/lalr.c (set_state_table): No need to attach reductions to
798 states, it's already done.
799 * src/output.c (output_actions): No longer free the shifts, then
800 the reductions, then the states: free all the states and their
801 members.
802
8032001-12-10 Akim Demaille <akim@epita.fr>
804
805 * src/options.c (OPTN, DRTV, BOTH): New.
806 (option_table): Use them.
807
808 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
809 the job of system.h.
810 * src/options.c: Don't include stdio.h and xalloc.h for the same
811 reasons.
812
8132001-12-10 Akim Demaille <akim@epita.fr>
814
815 * src/output.c (output, prepare): Make sure the values of the
816 muscles `action' and `prologue' are 0-terminated.
817
8182001-12-10 Akim Demaille <akim@epita.fr>
819
820 Clean up GCC warnings.
821
822 * src/reader.c (copy_action): `buf' is not used.
823 (parse_skel_decl): Be static.
824 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
825 * src/options.h (create_long_option_table): Have a real prototype.
826 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
827 (hash_delete_at): Return const void *.
828 Adjust casts to preserve the const.
829
8302001-12-10 Akim Demaille <akim@epita.fr>
831
832 * configure.in: Require 2.52g.
833 M4 is not needed, but AUTOM4TE is.
834 * m4/m4.m4: Remove.
835 * tests/Makefile.am: Adjust.
836
8372001-12-10 Akim Demaille <akim@epita.fr>
838
839 One structure for states is enough, even though theoretically
840 there are LR(0) states and LALR(1) states.
841
842 * src/lalr.h (state_t): Remove.
843 (state_table): Be state_t **, not state_t *.
844 * src/state.h (core, CORE_ALLOC): Rename as...
845 (state_t, STATE_ALLOC): this.
846 Add the LALR(1) members: shifts, reductions, errs.
847 * src/LR0.c (state_table): Rename as...
848 (state_hash): this, to avoid name clashes with the global
849 `state_table'.
850 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
851 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
852
8532001-12-10 Akim Demaille <akim@epita.fr>
854
855 Bison dumps core on bash.y.
856 Reported by Pascal Bart.
857
858 * src/warshall.c (bitmatrix_print): New.
859 (TC): Use it.
860 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
861 j must be the outer loop.
862 * tests/regression.at (Broken Closure): New.
863
8642001-12-05 Akim Demaille <akim@epita.fr>
865
866 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
867 its argument.
868