]> git.saurik.com Git - bison.git/blame - ChangeLog
Use lib/hash for the symbol table.
[bison.git] / ChangeLog
CommitLineData
72a23c97
AD
12002-04-07 Akim Demaille <akim@epita.fr>
2
3 Use lib/hash for the symbol table.
4
5 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6 EOF.
7 * src/lex.c (lex): Set the `number' member of new terminals.
8 * src/reader.c (bucket_check_defined, bucket_make_alias)
9 (bucket_check_alias_consistence, bucket_translation): New.
10 (reader, grammar_free, readgram, token_translations_init)
11 (packsymbols): Adjust.
12 (reader): Number the predefined tokens.
13 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14 for predefined tokens.
15 * src/symtab.h (bucket): Remove all the hash table related
16 members.
17 * src/symtab.c (symtab): Replace by...
18 (bucket_table): this.
19 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20 (buckets_new, buckets_do): New.
21
280a38c3
AD
222002-04-07 Akim Demaille <akim@epita.fr>
23
24 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
25 (start_symbol, max_user_token_number, semantic_parser)
26 (error_token_number): Initialize.
27 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
28 Initialize.
29 (reader): Don't.
30 (errtoken, eoftoken, undeftoken, axiom): Extern.
31
03b31c0c
AD
322002-04-07 Akim Demaille <akim@epita.fr>
33
34 * src/gram.h (rule_s): prec and precsym are now pointers
35 to the bucket giving the priority/associativity.
36 Member `associativity' removed: useless.
37 * src/reduce.c, src/conflicts.c: Adjust.
38
8b3df748
AD
392002-04-07 Akim Demaille <akim@epita.fr>
40
41 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
42 Properly escape the symbols' TAG when outputting them.
43
e601aa1d
AD
442002-04-07 Akim Demaille <akim@epita.fr>
45
46 * src/lalr.h (LA): Is a bitsetv, not bitset*.
47
48
b0299a2e
AD
492002-04-07 Akim Demaille <akim@epita.fr>
50
51 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
52 (LArule): this, which is an array to rule_t*.
53 * src/print.c, src/conflicts.c: Adjust.
54
55
d7e1f00c
AD
562002-04-07 Akim Demaille <akim@epita.fr>
57
58 * src/gram.h (rule_t): Rename `number' as `user_number'.
59 `number' is a new member.
60 Adjust dependencies.
61 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
62
cc9305dd
AD
632002-04-07 Akim Demaille <akim@epita.fr>
64
65 As a result of the previous patch, it is no longer needed
66 to reorder ritem itself.
67
68 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
69
b0940840
AD
702002-04-07 Akim Demaille <akim@epita.fr>
71
72 Be sure never to walk through RITEMS, but use only data related to
73 the rules themselves. RITEMS should be banished.
74
75 * src/output.c (output_token_translations): Rename as...
76 (prepare_tokens): this.
77 In addition to `translate', prepare the muscles `tname' and
78 `toknum', which were handled by...
79 (output_rule_data): this.
80 Remove, and move the remainder of its outputs into...
81 (prepare_rules): this new routines, which also merges content from
82 (output_gram): this.
83 (prepare_rules): Be sure never to walk through RITEMS.
84 (output_stos): Rename as...
85 (prepare_stos): this.
86 (output): Always invoke prepare_states, after all, just don't use it
87 in the output if you don't need it.
88
643a5994
AD
892002-04-07 Akim Demaille <akim@epita.fr>
90
91 * src/LR0.c (new_state): Display `nstates' as the name of the
92 newly created state.
93 Adjust to initialize first_state and last_state if needed.
94 Be sure to distinguish the initial from the final state.
95 (new_states): Create the itemset of the initial state, and use
96 new_state.
97 * src/closure.c (closure): Now that the initial state has its
98 items properly set, there is no need for a special case when
99 creating `ruleset'.
100
101 As a result, now the rule 0, reducing to $axiom, is visible in the
102 outputs. Adjust the test suite.
103
104 * tests/conflicts.at (Solved SR Conflicts)
105 (Unresolved SR Conflicts): Adjust.
106 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
107 * tests/conflicts.at (S/R in initial): New.
108
b4c4ccc2
AD
1092002-04-07 Akim Demaille <akim@epita.fr>
110
111 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
112 the RHS of the rules.
113 * src/output.c (output_gram): Likewise.
114
bba97eb2
AD
1152002-04-07 Akim Demaille <akim@epita.fr>
116
117 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
118 bucket.
119 Adjust all dependencies.
120 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
121 `number' of the buckets too.
122 * src/gram.h: Include `symtab.h'.
123 (associativity): Move to...
124 * src/symtab.h: here.
125 No longer include `gram.h'.
126
127
c3b407f4
AD
1282002-04-07 Akim Demaille <akim@epita.fr>
129
130 * src/gram.h, src/gram.c (rules_rhs_length): New.
131 (ritem_longest_rhs): Use it.
132 * src/gram.h (rule_t): `number' is a new member.
133 * src/reader.c (packgram): Set it.
134 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
135 the end of `rules', and count them out of `nrules'.
136 (reduce_output, dump_grammar): Adjust.
137 * src/print.c (print_grammar): It is no longer needed to check for
138 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
139 * tests/reduce.at (Reduced Automaton): New test.
140
11652ab3
AD
1412002-04-07 Akim Demaille <akim@epita.fr>
142
143 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
144 lacking `+ 1' to nrules, Bison reported as useless a token if it
145 was used solely to set the precedence of the last rule...
146
26b23c1a
AD
1472002-04-07 Akim Demaille <akim@epita.fr>
148
149 * data/bison.c++, data/bison.simple: Don't output the current file
150 name in #line, to avoid useless diffs between two identical
151 outputs under different names.
152
18bcecb0
AD
1532002-04-07 Akim Demaille <akim@epita.fr>
154
155 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
156 Normalize loops to using `< nrules + 1', not `<= nrules'.
157
fa770c86
AD
1582002-04-07 Akim Demaille <akim@epita.fr>
159
160 * TODO: Update.
161
d9b739c3
AD
1622002-04-07 Akim Demaille <akim@epita.fr>
163
164 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
165 bucket.value as bucket.number.
166
99013900
AD
1672002-04-07 Akim Demaille <akim@epita.fr>
168
169 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
170 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
171 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
172 RHS, instead of being an index in RITEMS.
173
e966383b
PE
1742002-04-04 Paul Eggert <eggert@twinsun.com>
175
176 * doc/bison.texinfo: Update copyright date.
177 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
178 (Symbols): Warn about running Bison in one character set,
179 but compiling and/or running in an incompatible one.
180 Warn about character code 256, too.
181
1822002-04-03 Paul Eggert <eggert@twinsun.com>
183
184 * src/bison.data (YYSTACK_ALLOC): Depend on whether
185 YYERROR_VERBOSE is nonzero, not whether it is defined.
186
187 Merge changes from bison-1_29-branch.
c307773e 188
8d6c48b9
PE
1892002-03-20 Paul Eggert <eggert@twinsun.com>
190
191 Merge fixes from Debian bison_1.34-1.diff.
192
193 * configure.in (AC_PREREQ): 2.53.
194
e53c6322
AD
1952002-03-20 Akim Demaille <akim@epita.fr>
196
197 * src/conflicts.c (log_resolution): Argument `resolution' is const.
198
9ffbeca7
PE
1992002-03-19 Paul Eggert <eggert@twinsun.com>
200
21db0b2a
PE
201 * src/bison.simple (YYCOPY): New macro.
202 (YYSTACK_RELOCATE): Use it.
203 Remove Type arg; no longer needed. All callers changed.
204 (yymemcpy): Remove; no longer needed.
205
9ffbeca7
PE
206 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
207 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
208
642cb8f8
AD
2092002-03-19 Akim Demaille <akim@epita.fr>
210
211 Test and fix the #line outputs.
212
213 * tests/atlocal.at (GCC): New.
214 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
215 (Prologue synch line, ,%union synch line, Postprologue synch line)
216 (Action synch line, Epilogue synch line): New tests.
217 * src/reader.c (parse_union_decl): Define the muscle stype_line.
218 * data/bison.simple, data/bison.c++: Use it.
219
3c31a486
AD
2202002-03-19 Akim Demaille <akim@epita.fr>
221
222 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
223 (Solved SR Conflicts, %expect not enough, %expect right)
224 (%expect too much): Move to...
225 * tests/conflicts.at: this new file.
226
0d8bed56
AD
2272002-03-19 Akim Demaille <akim@epita.fr>
228
229 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
230 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
231 that we can move to enums for instance.
232 * src/output.c (token_definitions_output): Output a list of
233 `token-name, token-number' instead of the #define.
234 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
235
9208d17f
AD
2362002-03-14 Akim Demaille <akim@epita.fr>
237
238 Use Gettext 0.11.1.
239
af27eacb
RA
2402002-03-09 Robert Anisko <robert@lrde.epita.fr>
241
242 * data/bison.c++: Make the user able to add members to the generated
243 parser by subclassing.
244
9101a310
RA
2452002-03-05 Robert Anisko <robert@lrde.epita.fr>
246
247 * src/reader.c (read_additionnal_code): `c' should be an integer, not
248 a character.
249 Reported by Nicolas Tisserand and Nicolas Burrus.
250
fff9bf0b
RA
2512002-03-04 Robert Anisko <robert@lrde.epita.fr>
252
253 * src/reader.c: Warn about lacking semi-colons, do not complain.
254
64dba31e
RA
2552002-03-04 Robert Anisko <robert@lrde.epita.fr>
256
257 * data/bison.c++: Remove a debug line.
258
374f5a14
RA
2592002-03-04 Robert Anisko <robert@lrde.epita.fr>
260
261 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
262 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
263 provide a default implementation.
264
bfcf1f3a
AD
2652002-03-04 Akim Demaille <akim@epita.fr>
266
267 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
268 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
269 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
270 * tests/semantic.at (Parsing Guards): Similarly.
271 * src/reader.at (readgram): Complain if the last rule is not ended
272 with a semi-colon.
273
65ccf9fc
AD
2742002-03-04 Akim Demaille <akim@epita.fr>
275
276 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
277 * src/closure.c: here.
278 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
279 RTC.
280 * src/warshall.h, src/warshall.c: Remove.
281 * tests/sets.at (Broken Closure): Adjust.
282
d0039cbc
AD
2832002-03-04 Akim Demaille <akim@epita.fr>
284
285 * src/output.c (output_skeleton): tempdir is const.
286 bytes_read is unused.
287
345cea78
AD
2882002-03-04 Akim Demaille <akim@epita.fr>
289
290 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
291 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
292 Update.
293 From Michael Hayes.
294
564801f7
AD
2952002-03-04 Akim Demaille <akim@epita.fr>
296
297 * src/closure.c (closure): `r' is unused.
298
e5352bc7
AD
2992002-03-04 Akim Demaille <akim@epita.fr>
300
301 * tests/sets.at (Broken Closure): Add the ending `;'.
302 * src/reader.at (readgram): Complain if a rule is not ended with a
303 semi-colon.
304
914feea9
AD
3052002-03-04 Akim Demaille <akim@epita.fr>
306
307 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
308 (count_sr_conflicts): Use bitset_count.
309 * src/reduce.c (inaccessable_symbols): Ditto.
310 (bits_size): Remove.
311 * src/warshall.h, src/warshall.c: Convert to bitsetv.
312
f0250de6
AD
3132002-03-04 Akim Demaille <akim@epita.fr>
314
315 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
316 * src/reduce.c: Remove the `bitset_zero's following the
317 `bitset_create's, as now it is performed by the latter.
318
ef017502
AD
3192002-03-04 Akim Demaille <akim@epita.fr>
320
321 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
322 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
323 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
324 latest sources from Michael.
325
76514394
AD
3262002-03-04 Akim Demaille <akim@epita.fr>
327
328 * src/output.c (output): Don't free the grammar.
329 * src/reader.c (grammar_free): New.
330 * src/main.c (main): Call it and don't free symtab here.
331
55024580
AD
3322002-03-04 Akim Demaille <akim@epita.fr>
333
334 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
335 before returning.
336 Reported by Benoit Perrot.
337
f9abaa2c
AD
3382002-03-04 Akim Demaille <akim@epita.fr>
339
340 Use bitset operations when possible, not loops over bits.
341
342 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
343 bitset_or.
344 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
345 * src/reduce.c (useless_nonterminals): Formatting changes.
346 * src/warshall.c (TC): Use bitset_or.
347
0e721e75
AD
3482002-03-04 Akim Demaille <akim@epita.fr>
349
350 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
351 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
352 Ditto.
353
0fb1ffb1
AD
3542002-03-04 Akim Demaille <akim@epita.fr>
355
356 * src/lalr.c (F): Now a bitset*.
357 Adjust all dependencies.
358
b86796bf
AD
3592002-03-04 Akim Demaille <akim@epita.fr>
360
361 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
362 Adjust all dependencies.
363
602bbf31
AD
3642002-03-04 Akim Demaille <akim@epita.fr>
365
366 * src/L0.c, src/LR0.h (nstates): Be size_t.
367 Adjust comparisons (signed vs unsigned).
368 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
369 bitset*.
370 Adjust all dependencies.
371
d8a0245c
AD
3722002-03-04 Akim Demaille <akim@epita.fr>
373
374 * src/closure.c (firsts): Now, also a bitset.
375 Adjust all dependencies.
376 (varsetsize): Remove, now unused.
377 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
378
34ba9743
AD
3792002-03-04 Akim Demaille <akim@epita.fr>
380
381 * src/print.c: Convert to use bitset.h, not hand coded iterations
382 over ints.
383
ed86e78c
AD
3842002-03-04 Akim Demaille <akim@epita.fr>
385
386 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
387
dfdb1797
AD
3882002-03-04 Akim Demaille <akim@epita.fr>
389
390 * src/closure.c (ruleset): Be a bitset.
391 (rulesetsize): Remove.
392
7086e707
AD
3932002-03-04 Akim Demaille <akim@epita.fr>
394
395 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
396 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
397 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
398 * src/closure.c (fderives): Be an array of bitsets.
399
98254360
RA
4002002-02-28 Robert Anisko <robert@lrde.epita.fr>
401
402 * data/bison.c++: Merge the two generated headers. Insert a copyright
403 notice in each output file.
404
a75c057f
AD
4052002-02-28 Akim Demaille <akim@epita.fr>
406
407 * data/bison.c++: Copy the prologue of bison.simple to fetch
408 useful M4 definitions, such as b4_header_guard.
409
06b00abc
AD
4102002-02-25 Akim Demaille <akim@epita.fr>
411
412 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
413 translator friendly scheme for the bgr
414 copyright notice.
06b00abc 415
70e7d534
AD
4162002-02-25 Akim Demaille <akim@epita.fr>
417
418 * src/output.c (header_output): Remove, now handled completely via
419 M4.
420
abe017f6
AD
4212002-02-25 Akim Demaille <akim@epita.fr>
422
423 * m4/m4.m4: New, from CVS Autoconf.
424 * configure.in: Invoke it.
425 * src/output.c (output_skeleton): Use its result instead of the
426 hard coded name.
427
381fb12e
AD
4282002-02-25 Akim Demaille <akim@epita.fr>
429
430 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
431 Fileutils 4.1.5.
432 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
433 * src/output.c (output_skeleton): Use mkstemp to create a real
434 temporary file.
435 Move the filling of `skeleton' and its muscle to...
436 (prepare): here.
437 (output): Move the definition of the prologue muscle to...
438 (prepare): here.
439 * src/system.h (DEFAULT_TMPDIR): New.
440
6f38107f
PE
4412002-02-14 Paul Eggert <eggert@twinsun.com>
442
443 Remove the support for C++ namespace cleanliness; it was
444 causing more problems than it was curing, since it didn't work
445 properly on some nonstandard C++ compilers. This can wait
446 for a proper C++ parser.
447
448 * NEWS: Document this.
449 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
450 of C++, as it's treated like C now.
451 * src/bison.simple (YYSTD): Remove.
452 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
453 Treat C++ just like Standard C instead of trying to support
454 namespace cleanliness.
455
80cce3da
AD
4562002-02-14 Akim Demaille <akim@epita.fr>
457
458 * tests/regression.at (else): Adjust to Andreas' change.
459
842e8679
AD
4602002-02-14 Akim Demaille <akim@epita.fr>
461
462 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
463
4bda3f10
AD
4642002-02-13 Andreas Schwab <schwab@suse.de>
465
466 * src/output.c (output_rule_data): Don't output NULL, it might
467 not be defined yet.
468
4162fa07 4692002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 470
4162fa07
RA
471 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
472 (Copyright notice): Update.
b418ecd8 473
bd16a5dc
AD
4742002-02-11 Akim Demaille <akim@epita.fr>
475
476 * tests/regression.at (%nonassoc and eof): Don't include
477 nonportable headers.
478
8d69a1a3
RA
4792002-02-08 Robert Anisko <robert@lrde.epita.fr>
480
481 * data/bison.c++: Correct error recovery. Make the user able to
482 initialize the starting location.
483
9b2d0677
AD
4842002-02-07 Akim Demaille <akim@epita.fr>
485
486 * tests/input.at: New.
487
69e2658b
RA
4882002-02-07 Robert Anisko <robert@lrde.epita.fr>
489
490 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 491 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
492 directives around tables only needed for debugging.
493
4aacc3a7
RA
4942002-02-07 Robert Anisko <robert@lrde.epita.fr>
495
496 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
497 C++ parsers.
498 (yy::b4_name::parse): Use print_.
499
762a801e
RA
5002002-02-07 Robert Anisko <robert@lrde.epita.fr>
501
502 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
503
4bb2bc3f
RA
5042002-02-07 Robert Anisko <robert@lrde.epita.fr>
505
506 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
507 C++ parsers.
508 (yy::b4_name::parse): Build verbose error messages, and use error_.
509
6b45a3ca
RA
5102002-02-06 Robert Anisko <robert@lrde.epita.fr>
511
512 * data/bison.c++: Fix m4 quoting in comments.
513
50997c6e
RA
5142002-02-06 Robert Anisko <robert@lrde.epita.fr>
515
516 * data/bison.c++: Adjust the parser code. Fix some muscles that were
517 not expanded by m4.
518
3f3eed27
AD
5192002-02-05 Akim Demaille <akim@epita.fr>
520
521 * data/bison.c++: Adjust to the M4 back end.
522 More is certainly needed.
523
be2a1a68
AD
5242002-02-05 Akim Demaille <akim@epita.fr>
525
526 Give a try to M4 as a back end.
527
528 * lib/readpipe.c: New, from wdiff.
529 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
530 BISON_HAIRY.
531 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
532 specific values. Now it is m4 that performs the lookup.
533 * src/parse-skel.y: Remove.
534 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
535 * src/output.c (actions_output, guards_output)
536 (token_definitions_output): No longer keeps track of the output
537 line number, hence remove the second argument.
538 (guards_output): Check against the guard member of a rule, not the
539 action member.
540 Adjust callers.
541 (output_skeleton): Don't look for the skeleton location, let m4 do
542 that.
543 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
544 file will be used.
545 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
546 (prepare): Given that for the time being changesyntax is not
547 usable in M4, rename the muscles using `-' to `_'.
548 Define `defines_flag', `output_parser_name' and `output_header_name'.
549 * src/output.h (actions_output, guards_output)
550 (token_definitions_output): Adjust prototypes.
551 * src/scan-skel.l: Instead of scanning the skeletons, it now
552 processes the output of m4: `__oline__' and `#output'.
553 * data/bison.simple: Adjust to be used by M4(sugar).
554 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
555 to date.
556 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
557 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
558 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
559 shamelessly stolen from CVS Autoconf.
560
beda758b
AD
5612002-02-05 Akim Demaille <akim@epita.fr>
562
563 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
564 * configure.in: Check for the declarations of free and malloc.
565 * src/muscle_tab.c: Adjust.
566
5ece6d43
AD
5672002-02-05 Akim Demaille <akim@epita.fr>
568
569 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
570 which have no values.
571
5bb18f9a
AD
5722002-02-05 Akim Demaille <akim@epita.fr>
573
574 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
575 * data/: here.
576
894dd62e
PE
5772002-01-29 Paul Eggert <eggert@twinsun.com>
578
579 * src/bison.simple (YYSIZE_T): Do not define merely because
580 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
581 On some platforms, <alloca.h> does not declare YYSTD (size_t).
582
82841af7
AD
5832002-01-27 Akim Demaille <akim@epita.fr>
584
585 Fix `%nonassoc and eof'.
586
587 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
588 which were not properly copied! Replace
589 memcpy (res->errs, src->errs, src->nerrs);
590 with
591 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
592 !!!
593 * tests/regression.at (%nonassoc and eof): Adjust to newest
594 Autotest: `.' is not in the PATH.
595
318b76e9
AD
5962002-01-27 Akim Demaille <akim@epita.fr>
597
598 * tests/sets.at (AT_EXTRACT_SETS): New.
599 (Nullable): Use it.
600 (Firsts): New.
601
30d2f3d5
AD
6022002-01-26 Akim Demaille <akim@epita.fr>
603
604 * tests/actions.at, tests/calc.at, tests/headers.at,
605 * tests/torture.at: Adjust to the newest Autotest which no longer
606 forces `.' in the PATH.
607
30f8c395
AD
6082002-01-25 Akim Demaille <akim@epita.fr>
609
610 * tests/regression.at (%nonassoc and eof): New.
611 Suggested by Robert Anisko.
612
29ae55f1
AD
6132002-01-24 Akim Demaille <akim@epita.fr>
614
615 Bison dumps core when trying to complain about broken input files.
616 Reported by Cris van Pelt.
617
618 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
619 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
620 into...
621 (Invalid inputs): Strengthen: exercise parse_percent_token.
622
2b548aa6
RA
6232002-01-24 Robert Anisko <robert.anisko@epita.fr>
624
625 * src/Makefile.am: Add bison.c++.
626 * src/bison.c++: New skeleton.
627
bb0146c2
AD
6282002-01-21 Paolo Bonzini <bonzini@gnu.org>
629
630 * po/it.po: New.
631
bec30531
AD
6322002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
633
634 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
635
fc6edc45
MA
6362002-01-20 Marc Autret <marc@gnu.org>
637
638 * src/files.c (compute_output_file_names): Fix
639
5e5d5415
MA
6402002-01-20 Marc Autret <marc@gnu.org>
641
642 * tests/output.at: New test.
643 * src/files.c (compute_base_names): Don't map extensions when
644 the YACC flag is set, use defaults.
645 Reported by Evgeny Stambulchik.
646
44ea3fbd
MA
6472002-01-20 Marc Autret <marc@gnu.org>
648
bb0146c2 649 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
650 compilers as well (i.e. the vendor C compiler).
651 Suggested by Albert Chin-A-Young.
652
338963d1
TVH
6532002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
654
655 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
656 canonical definition.
657 * src/system.h: Use the canonical definition for PARAMS (avoids
658 a conflict with the macro from lib/hash.h).
659
c57b2479
AD
6602002-01-11 Akim Demaille <akim@epita.fr>
661
662 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 663 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 664
b85810ae
AD
6652002-01-09 Akim Demaille <akim@epita.fr>
666
667 * src/files.c, src/files.h (output_infix): New.
668 (tab_extension): Remove.
669 (compute_base_names): Compute the former, drop the latter.
670 * src/output.c (prepare): Insert the muscles `output-infix', and
671 `output-suffix'.
672 * src/parse-skel.y (string, string.1): New.
673 (section.header): Use it.
674 (section.yacc): Remove.
675 (prefix): Remove too.
676 * src/scan-skel.l: Adjust.
677 * src/bison.simple, src/bison.hairy: Adjust.
678
cae60122
AD
6792002-01-09 Akim Demaille <akim@epita.fr>
680
681 * configure.in (WERROR_CFLAGS): Compute it.
682 * src/Makefile.am (CFLAGS): Pass it.
683 * tests/atlocal.in (CFLAGS): Idem.
684 * src/files.c: Fix a few warnings.
685 (get_extension_index): Remove, unused.
686
ae404801
AD
6872002-01-08 Akim Demaille <akim@epita.fr>
688
689 * src/getargs.c (AS_FILE_NAME): New.
690 (getargs): Use it to convert DOSish file names.
691 * src/files.c (base_name): Rename as full_base_name to avoid
692 clashes with `base_name ()'.
693 (filename_split): New.
694 (compute_base_names): N-th rewrite, using filename_split.
695
22312b71
AD
6962002-01-08 Akim Demaille <akim@epita.fr>
697
698 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
699 New, stolen from the Fileutils 4.1.
700 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
701 * configure.in: Check for the presence of memrchr, and of its
702 prototype.
703
a67cef01
TVH
7042002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
705
706 * lib/hash.h (__P): Added definition for this macro.
707 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
708 BUILT_SOURCES, to ensure they are generated first.
709 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
710 %error-verbose to allow bootstrapping with bison 1.30x.
711
2b25d624
AD
7122002-01-06 Akim Demaille <akim@epita.fr>
713
714 * src/reader.c (parse_braces): Don't fetch the next char, the
715 convention is to fetch on entry.
716 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
717 'switch' without a following semicolon.
718 * tests/regression.at (braces parsing): New.
719
3460813b
AD
7202002-01-06 Akim Demaille <akim@epita.fr>
721
722 Bison is dead wrong in its RR conflict reports.
723
724 * tests/torture.at (GNU Cim Grammar): New.
725 * src/conflicts.c (count_rr_conflicts): Fix.
726
73784c64
AD
7272002-01-06 Akim Demaille <akim@epita.fr>
728
729 Creating package.m4 from configure.ac causes too many problems.
730
731 * tests/Makefile.am (package.m4): Create it by hand,
732 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
733
25d81090
AD
7342002-01-06 Akim Demaille <akim@epita.fr>
735
736 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
737 skeleton.h.
738
a9b8959e
PE
7392002-01-04 Paul Eggert <eggert@twinsun.com>
740
741 * doc/bison.texinfo (Debugging):
742 Remove YYSTDERR; it's no longer defined or used.
743 Also, s/cstdio.h/cstdio/.
744
25d81090
AD
7452002-01-03 Akim Demaille <akim@epita.fr>
746
747 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
748
1109455c
AD
7492002-01-03 Akim Demaille <akim@epita.fr>
750
751 * src/parse-skel.y (process_skeleton): Don't bind the parser's
752 tracing code to --trace, wait for a better --trace option, with
753 args.
754
7ea5e977
AD
7552002-01-03 Akim Demaille <akim@epita.fr>
756
757 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
758 The ISO C++ standard is extremely clear about it: stderr is
759 considered a macro, not a regular symbol (see table 94 `Header
760 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
761 Therefore std:: does not apply to it. It still does with fprintf.
762 Also, s/cstdio.h/cstdio/.
763
fab5b110
AD
7642002-01-03 Akim Demaille <akim@epita.fr>
765
766 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
767 for non system headers.
768
aed7fd9b
AD
7692002-01-02 Akim Demaille <akim@epita.fr>
770
771 Equip the skeleton chain with location tracking, runtime trace,
772 pure parser and scanner.
773
774 * src/parse-skel.y: Request a pure parser, locations, and prefix
775 renaming.
776 (%union): Having several members with the same type does not help
777 type mismatches, simplify.
778 (YYPRINT, yyprint): New.
779 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
780 (skel_error): this.
781 Handle locations.
782 * src/scan-skel.l: Adjust to these changes.
783 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
784 (LOCATION_PRINT, skel_control_t): New.
785
24fad99e
AD
7862001-12-30 Akim Demaille <akim@epita.fr>
787
788 * src/parse-skel.y: Get rid of the shift/reduce conflict:
789 replace `gb' with BLANKS.
790 * src/scan-skel.l: Adjust.
791
a4b36db4
AD
7922001-12-30 Akim Demaille <akim@epita.fr>
793
794 * src/system.h: We don't need nor want bcopy.
795 Throw away MS-DOS crap: we don't need getpid.
796 * configure.in: We don't need strndup. It was even causing
797 problems: because Flex includes the headers *before* us,
798 _GNU_SOURCE is not defined by config.h, and therefore strndup was
799 not visible.
800 * lib/xstrndup.c: New.
801 * src/scan-skel.l: Use it.
802 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
803 * src/parse-skel.y: Use %directives instead of #defines.
804
1239777d
AD
8052001-12-30 Akim Demaille <akim@epita.fr>
806
807 * src/skeleton.h: New.
808 * src/output.c (output_parser, output_master_parser): Remove, dead
809 code.
810 * src/output.h (get_lines_number, actions_output, guards_output)
811 (token_definitions_output): Prototype them.
812 * src/parse-skel.y: Add the license notice.
813 Include output.h and skeleton.h.
814 (process_skeleton): Returns void, and takes a single parameter.
815 * src/scan-skel.l: Add the license notice.
816 Include skeleton.h.
817 Don't use %option yylineno: it seems that then Flex imagines
818 REJECT has been used, and therefore it won't reallocate its
819 buffers (which makes no other sense to me than a bug). It results
820 in warnings for `unused: yy_flex_realloc'.
821
9b3add5b
RA
8222001-12-30 Robert Anisko <robert.anisko@epita.fr>
823
824 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
825 (MUSCLE_INSERT_PREFIX): ...to there.
826 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
827 (MUSCLE_INSERT_PREFIX): Move from here...
828
829 * src/bison.hairy: Add a section directive. Put braces around muscle
830 names. This parser skeleton is still broken, but Bison should not
831 choke on a bad muscle 'syntax'.
832 * src/bison.simple: Add a section directive. Put braces around muscle
833 names.
834
835 * src/files.h (strsuffix, stringappend): Add declarations.
836 (tab_extension): Add declaration.
837 (short_base_name): Add declaration.
838
839 * src/files.c (strsuffix, stringappend): No longer static. These
840 functions are used in the skeleton parser.
841 (tab_extension): New.
842 (compute_base_names): Use the computations done in this function
fab5b110 843 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
844 names.
845 (short_base_name): No longer static.
846
847 * src/output.c (output_skeleton): New.
848 (output): Disable call to output_master_parser, and give a try to
849 a new skeleton handling system.
850 (guards_output, actions_output): No longer static.
851 (token_definitions_output, get_lines_number): No longer static.
852
853 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
854
fab5b110 855 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
856 parse-skel.y.
857
858 * src/parse-skel.y: New file.
859 * src/scan-skel.l: New file.
860
b5b61c61
AD
8612001-12-29 Akim Demaille <akim@epita.fr>
862
863 %name-prefix is broken.
864
865 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
866 Adjust all dependencies.
867 * tests/headers.at (export YYLTYPE): Strengthen this test: use
868 %name-prefix.
869
870 Renaming yylval but not yylloc is not consistent. Now we do.
871
872 * src/bison.simple: Prefix yylloc if used.
873 * doc/bison.texinfo (Decl Summary): Document that.
874
8c9a50be
AD
8752001-12-29 Akim Demaille <akim@epita.fr>
876
877 * doc/bison.texinfo: Promote `%long-directive' over
878 `%long_directive'.
879 Remove all references to fixed-output-files, yacc is enough.
880
d99361e6
AD
8812001-12-29 Akim Demaille <akim@epita.fr>
882
883 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
884 user prologue. These are defaults.
885 * tests/actions.at (Mid-rule actions): Make sure the user can
886 define YYDEBUG and YYERROR_VERBOSE.
887
b9cecb91
AD
8882001-12-29 Akim Demaille <akim@epita.fr>
889
890 * src/output.c (header_output): Don't forget to export YYLTYPE and
891 yylloc.
892 * tests/headers.at (export YYLTYPE): New, make sure it does.
893 * tests/regression.at (%union and --defines, Invalid CPP headers):
894 Move to...
895 * tests/headers.at: here.
896
aea13e97
AD
8972001-12-29 Akim Demaille <akim@epita.fr>
898
899 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
900
931394cb
AD
9012001-12-29 Akim Demaille <akim@epita.fr>
902
903 * tests/actions.at (Mid-rule actions): Output on a single line
904 instead of several.
905
704a47c4
AD
9062001-12-29 Akim Demaille <akim@epita.fr>
907
908 * doc/bison.texinfo: Formatting changes.
909
091e20bb
AD
9102001-12-29 Akim Demaille <akim@epita.fr>
911
912 Don't store the token defs in a muscle, just be ready to output it
913 on command. Now possible via `symbols'. Fixes a memory leak.
914
915 * src/output.c (token_definitions_output): New.
916 (output_parser, header_output): Use it.
917 * src/reader.c (symbols_save): Remove.
918
cce71710
AD
9192001-12-29 Akim Demaille <akim@epita.fr>
920
921 * src/bison.simple: Do not provide a default for YYSTYPE and
922 YYLTYPE before the user's prologue. Otherwise it's hardly... a
923 default.
924
82c035a8
AD
9252001-12-29 Akim Demaille <akim@epita.fr>
926
927 Mid-rule actions are simply... ignored!
928
929 * src/reader.c (readgram): Be sure to attach mid-rule actions to
930 the empty-rule associated to the dummy symbol, not to the host
931 rule.
932 * tests/actions.at (Mid-rule actions): New.
933
8419d367
AD
9342001-12-29 Akim Demaille <akim@epita.fr>
935
936 Memory leak.
937
938 * src/reader.c (reader): Free grammar.
939
375d5806
AD
9402001-12-29 Akim Demaille <akim@epita.fr>
941
942 Memory leak.
943
944 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
945 since it allocates it for each state, although only one is needed.
946 (allocate_storage): Do it here.
947
f51cb8ff
AD
9482001-12-29 Akim Demaille <akim@epita.fr>
949
950 * src/options.h, src/options.c (create_long_option_table): Rename
951 as...
952 (long_option_table_new): this, with a clearer prototype.
953 (percent_table): Remove, unused,
954 * src/getargs.c (getargs): Adjust.
955
29e88316
AD
9562001-12-29 Akim Demaille <akim@epita.fr>
957
958 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
959 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
960 as states.
961
b9f71f19
AD
9622001-12-29 Akim Demaille <akim@epita.fr>
963
964 * src/lalr.c (build_relations): Rename `states' as `states1'.
965 Sorry, I don't understand exactly what it is, no better name...
966
1a2b5d37
AD
9672001-12-29 Akim Demaille <akim@epita.fr>
968
969 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
970 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
971 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
972 as rules.
973
1cca533e
AD
9742001-12-29 Akim Demaille <akim@epita.fr>
975
976 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
977 ago.
978
c03ae966
AD
9792001-12-29 Akim Demaille <akim@epita.fr>
980
981 * src/reader.c, src/reader.h (user_toknums): Remove.
982 Adjust all users to use symbols[i]->user_token_number.
983
5a670b1e
AD
9842001-12-29 Akim Demaille <akim@epita.fr>
985
986 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
987 Adjust all users to use symbols[i]->prec or ->assoc.
988
ad949da9
AD
9892001-12-29 Akim Demaille <akim@epita.fr>
990
991 * src/reader.c, src/reader.h (tags): Remove.
992 Adjust all users to use symbols[i]->tag.
993
0e78e603
AD
9942001-12-29 Akim Demaille <akim@epita.fr>
995
996 * src/gram.h, src/gram.c (symbols): New, similar to state_table
997 and rule_table.
998 * src/reader.c (packsymbols): Fill this table.
999 Drop sprec.
1000 * src/conflicts.c (resolve_sr_conflict): Adjust.
1001 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1002 single table.
1003 Use symbols[i]->tag instead of tags[i].
1004
213e640e
AD
10052001-12-29 Akim Demaille <akim@epita.fr>
1006
1007 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1008 In addition, put a comment in there, to replace...
1009 * tests/regression.at (%union and C comments): Remove.
1010
e7b8bef1
AD
10112001-12-29 Akim Demaille <akim@epita.fr>
1012
1013 * tests/regression.at (Web2c Actions): Blindly move the actual
1014 output as expected output. The contents *seem* right to me, but I
1015 can't pretend reading perfectly parser tables... Nonetheless, all
1016 the other tests pass correctly, the table look OK, even though the
1017 presence of `$axiom' is to be noted: AFAICS it is useless (but
1018 harmless).
1019
b68e7744
AD
10202001-12-29 Akim Demaille <akim@epita.fr>
1021
1022 * src/reader.c (readgram): Don't add the rule 0 if there were no
1023 rules read. In other words, add it _after_ having performed
1024 grammar sanity checks.
1025 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1026
78d5bae9
AD
10272001-12-29 Akim Demaille <akim@epita.fr>
1028
1029 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1030 visible, and some states have now a different number.
1031
ff442794
AD
10322001-12-29 Akim Demaille <akim@epita.fr>
1033
1034 * src/reader.c (readgram): Bind the initial rule's lineno to that
1035 of the first rule.
1036 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1037 (Solved SR Conflicts): Adjust rule 0's line number.
1038
610ab194
AD
10392001-12-29 Akim Demaille <akim@epita.fr>
1040
1041 Fix the `GAWK Grammar' failure.
1042
1043 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1044 the reductions of the first state which was mistakenly confused
1045 with the final state because precisely final_state was initialized
1046 to 0.
1047 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1048 now noticed by Bison.
1049 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1050 have a reduction on $default.
1051
29d29c8f
AD
10522001-12-29 Akim Demaille <akim@epita.fr>
1053
1054 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1055 rule line numbers.
1056 * src/closure.c (print_closure): Likewise.
1057 * src/derives.c (print_derives): Likewise.
1058 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1059 now.
1060
7c6b64d0
AD
10612001-12-29 Akim Demaille <akim@epita.fr>
1062
1063 * src/lalr.c (lookaheads_print): New.
1064 (lalr): Call it when --trace-flag.
1065 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1066 are dumped.
1067
3d4daee3
AD
10682001-12-29 Akim Demaille <akim@epita.fr>
1069
1070 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1071 when walking through ritem, even via rule->rhs.
1072 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1073 (useful_production, useless_nonterminals): Likewise.
1074 (reduce_grammar_tables): Likewise, plus update nritems.
1075 * src/nullable.c (set_nullable): Likewise.
1076 * src/lalr.c (build_relations): Likewise.
1077 * tests/sets.at (Nullable): Adjust.
1078 Fortunately, now, the $axiom is no longer nullable.
1079
9e7f6bbd
AD
10802001-12-29 Akim Demaille <akim@epita.fr>
1081
1082 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1083 the 0-sentinel.
1084 * src/gram.c (ritem_longest_rhs): Likewise.
1085 * src/reduce.c (nonterminals_reduce): Likewise.
1086 * src/print_graph.c (print_graph): Likewise.
1087 * src/output.c (output_rule_data): Likewise.
1088 * src/nullable.c (set_nullable): Likewise.
1089
255ef638
AD
10902001-12-29 Akim Demaille <akim@epita.fr>
1091
1092 * src/output.c: Comment changes.
1093
0d8a7363
AD
10942001-12-27 Paul Eggert <eggert@twinsun.com>
1095
1096 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1097 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1098 Sparc, as they were causing more porting problems than the
1099 (minor) performance improvement was worth.
1100
1101 Also, catch up with 1.31's YYSTD.
1102
3db472b9
AD
11032001-12-27 Akim Demaille <akim@epita.fr>
1104
1105 * src/output.c (output_gram): Rely on nritems, not the
1106 0-sentinel. See below.
1107 Use -1 as separator, not 0.
1108 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1109 Rely on -1 as separator in yyrhs, instead of 0.
1110 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1111 twice `Now at end of input', therefore there are two lines less to
1112 expect.
1113
b365aa05
AD
11142001-12-27 Akim Demaille <akim@epita.fr>
1115
1116 * tests/regression.at (Unresolved SR Conflicts):
1117 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1118 below.
1119
30171f79
AD
11202001-12-27 Akim Demaille <akim@epita.fr>
1121
1122 * src/LR0.c (new_state): Recognize the final state by the fact it
1123 is reached by eoftoken.
1124 (insert_start_shifting_state, insert_eof_shifting_state)
1125 (insert_accepting_state, augment_automaton): Remove, since now
1126 these states are automatically computed from the initial state.
1127 (generate_states): Adjust.
1128 * src/print.c: When reporting a rule number to the user, substract
1129 1, so that the axiom rule is rule 0, and the first user rule is 1.
1130 * src/reduce.c: Likewise.
1131 * src/print_graph.c (print_core): For the time being, just as for
1132 the report, depend upon --trace-flags to dump the full set of
1133 items.
1134 * src/reader.c (readgram): Once the grammar read, insert the rule
1135 0: `$axiom: START-SYMBOL $'.
1136 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1137 number of the states has changed (the final state is no longer
1138 necessarily the last), catch up.
1139
75142d45
AD
11402001-12-27 Akim Demaille <akim@epita.fr>
1141
1142 Try to make the use of the eoftoken valid. Given that its value
1143 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1144 is used instead of > 0 where appropriate, (ii), depend upon nritems
1145 instead of the 0-sentinel.
1146
1147 * src/gram.h, src/gram.c (nritems): New.
1148 Expected to be duplication of nitems, but for the time being...
1149 * src/reader.c (packgram): Assert nritems and nitems are equal.
1150 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1151 * src/closure.c (print_closure, print_fderives): Likewise.
1152 * src/gram.c (ritem_print): Likewise.
1153 * src/print.c (print_core, print_grammar): Likewise.
1154 * src/print_graph.c: Likewise.
1155
b7c49edf
AD
11562001-12-27 Akim Demaille <akim@epita.fr>
1157
1158 * src/main.c (main): If there are complains after grammar
1159 reductions, then output the report anyway if requested, then die.
1160 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1161 * src/reader.c (eoftoken): New.
1162 (parse_token_decl): If the token being defined has value `0', it
1163 is the eoftoken.
1164 (packsymbols): No longer hack `tags' to insert `$' by hand.
1165 Be sure to preserve the value of the eoftoken.
1166 (reader): Make sure eoftoken is defined.
1167 Initialize nsyms to 0: now eoftoken is created just like the others.
1168 * src/print.c (print_grammar): Don't special case the eof token.
1169 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1170 lie anyway, albeit pleasant.
1171 * tests/calc.at: Exercise error messages with eoftoken.
1172 Change the grammar so that empty input is invalid.
1173 Adjust expectations.
1174 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1175
ec2da99f
AD
11762001-12-27 Akim Demaille <akim@epita.fr>
1177
1178 * configure.in: Check the protos of strchr ans strspn.
1179 Replace strchr if needed.
1180 * src/system.h: Provide the protos of strchr, strspn and memchr if
1181 missing.
1182 * lib/strchr.c: New.
1183 * src/reader.c (symbols_save): Use strchr.
1184
8adfa272
AD
11852001-12-27 Akim Demaille <akim@epita.fr>
1186
1187 * src/print.c, src/print_graph.c (escape): New.
1188 Use it to quote the TAGS outputs.
1189 * src/print_graph.c (print_state): Now errors are in red, and
1190 reductions in green.
1191 Prefer high to wide: output the state number on a line of its own.
1192
80dac38c
AD
11932001-12-27 Akim Demaille <akim@epita.fr>
1194
1195 * src/state.h, src/state.c (reductions_new): New.
1196 * src/LR0.c (set_state_table): Let all the states have a
1197 `reductions', even if reduced to 0.
1198 (save_reductions): Adjust.
1199 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1200 * src/print.c (print_reductions, print_actions): Adjust.
1201 * src/output.c (action_row): Adjust.
1202
2cec70b9
AD
12032001-12-27 Akim Demaille <akim@epita.fr>
1204
1205 * src/state.h, src/state.c (errs_new, errs_dup): New.
1206 * src/LR0.c (set_state_table): Let all the states have an errs,
1207 even if reduced to 0.
1208 * src/print.c (print_errs, print_reductions): Adjust.
1209 * src/output.c (output_actions, action_row): Adjust.
1210 * src/conflicts.c (resolve_sr_conflict): Adjust.
1211
13ca549a
AD
12122001-12-27 Akim Demaille <akim@epita.fr>
1213
1214 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1215
5092aba5
AD
12162001-12-27 Akim Demaille <akim@epita.fr>
1217
1218 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1219 * src/print.c: here.
1220 (lookaheadset, shiftset): New, used as additional storage by
1221 print_reductions.
1222 (print_results): Adjust.
1223 (print_shifts, print_gotos, print_errs): New, extracted from...
1224 (print_actions): here.
1225 * src/print_graph.c (print_actions): Remove dead code.
1226
11e2beca
AD
12272001-12-27 Akim Demaille <akim@epita.fr>
1228
1229 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1230 `$n' and `@n'.
1231
dac3c910
AD
12322001-12-27 Akim Demaille <akim@epita.fr>
1233
1234 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1235 (build_relations): Adjust.
1236
d0b0fefa
AD
12372001-12-27 Akim Demaille <akim@epita.fr>
1238
1239 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1240 duplication.
1241
adc8c848
AD
12422001-12-27 Akim Demaille <akim@epita.fr>
1243
1244 * src/reader.c (packgram): Catch nitems overflows.
1245
14d293ac
AD
12462001-12-27 Akim Demaille <akim@epita.fr>
1247
1248 * src/files.c, src/files.h (guard_obstack): Remove.
1249 * src/output.c (output): Adjust.
1250 * src/reader.c (parse_braces): New, factoring...
1251 (copy_action, copy_guard): these two which are renamed as...
1252 (parse_action, parse_guard): these.
1253 As a voluntary consequence, using braces around guards is now
1254 mandatory.
1255
f499b062
AD
12562001-12-27 Akim Demaille <akim@epita.fr>
1257
1258 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1259 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1260 members.
1261 (symbol_list_new): Adjust.
1262 (copy_action): action_line is the first line, not the last.
1263 (copy_guard): Just as for actions, store the `action' only, not
1264 the switch/case/break flesh.
1265 Don't parse the user action that might follow the guard, let...
1266 (readgram): do it, i.e., now, there can be an action after a
1267 guard.
1268 In other words the guard is just explicitly optional.
1269 (packgram): Adjust.
1270 * src/output.c (guards_output): New.
1271 (output_parser): Call it when needed.
1272 (output): Also free the guard and attrs obstacks.
1273 * src/files.c, src/files.h (obstack_save): Remove.
1274 (output_files): Remove.
1275 As a result, if one needs the former `.act' file, using an
1276 appropriate skeleton which requires actions and guards is now
1277 required.
1278 * src/main.c (main): Adjust.
1279 * tests/semantic.at: New.
1280 * tests/regression.at: Use `input.y' as input file name.
1281 Avoid 8+3 problems by requiring input.c when the test needs the
1282 parser.
1283
d945f5cd
AD
12842001-12-27 Akim Demaille <akim@epita.fr>
1285
1286 * src/reader.c (symbol_list_new): Be sure to initialize all the
1287 fields.
1288
d200e455
AD
12892001-12-27 Akim Demaille <akim@epita.fr>
1290
1291 All the hacks using a final pseudo state are now useless.
1292
1293 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1294 * src/lalr.c (nLA): New.
1295 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1296 instead of lookaheadsp from the pseudo state (nstate + 1).
1297
f9507c28
AD
12982001-12-27 Akim Demaille <akim@epita.fr>
1299
1300 * src/output.c (action_row, token_actions): Use a state_t instead
1301 of a integer, and nlookaheads instead of the following state's
1302 lookaheadsp.
1303
065fbd27
AD
13042001-12-27 Akim Demaille <akim@epita.fr>
1305
1306 * src/conflicts.c (log_resolution, flush_shift)
1307 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1308 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1309 (conflicts_print, print_reductions): Use a state_t instead of an
1310 integer when referring to a state.
1311 As much as possible, depend upon nlookaheads, instead of the
1312 `lookaheadsp' member of the following state (since lookaheads of
1313 successive states are successive, the difference between state n + 1
1314 and n served as the number of lookaheads for state n).
1315 * src/lalr.c (add_lookback_edge): Likewise.
1316 * src/print.c (print_core, print_actions, print_state)
1317 (print_results): Likewise.
1318 * src/print_graph.c (print_core, print_actions, print_state)
1319 (print_graph): Likewise.
1320 * src/conflicts.h: Adjust.
1321
1b177bd7
AD
13222001-12-27 Akim Demaille <akim@epita.fr>
1323
1324 * src/bison.hairy: Formatting/comment changes.
1325 ANSIfy.
1326 Remove `register' indications.
1327 Add plenty of `static'.
1328
7742ddeb
AD
13292001-12-27 Akim Demaille <akim@epita.fr>
1330
1331 * src/output.c (prepare): Drop the muscle `ntbase' which
1332 duplicates ntokens.
1333 * src/bison.simple: Formatting/comment changes.
1334 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1335 is an undocumented synonym.
1336
1fa14068
AD
13372001-12-22 Akim Demaille <akim@epita.fr>
1338
1339 * src/output.c (output_table_data): Change the prototype to use
1340 `int' for array ranges: some invocations do pass an int, not a
1341 short.
1342 Reported by Wayne Green.
1343
b9752825
AD
13442001-12-22 Akim Demaille <akim@epita.fr>
1345
1346 Some actions of web2c.y are improperly triggered.
1347 Reported by Mike Castle.
1348
1349 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1350 * tests/regression.at (Web2c): Rename as...
1351 (Web2c Report): this.
1352 (Web2c Actions): New.
1353
776209d6
AD
13542001-12-22 Akim Demaille <akim@epita.fr>
1355
1356 Reductions in web2c.y are improperly reported.
1357 Reported by Mike Castle.
1358
1359 * src/conflicts.c (print_reductions): Fix.
1360 * tests/regression.at (Web2c): New.
1361
275fc3ad
AD
13622001-12-18 Akim Demaille <akim@epita.fr>
1363
1364 Some host fail on `assert (!"foo")', which expands to
1365 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1366 Reported by Nelson Beebee.
1367
1368 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1369 `#define it_succeeded 0' and `assert (it_succeeded)'.
1370
897668ee
MA
13712001-12-17 Marc Autret <autret_m@epita.fr>
1372
1373 * src/bison.simple: Don't hard code the skeleton line and filename.
1374 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1375 New line counter 'skeleton_line' (skeleton-line muscle).
1376
ab3399e0
PE
13772001-12-17 Paul Eggert <eggert@twinsun.com>
1378
1379 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1380 YYDEBUG must be defined to a nonzero value.
1381
1382 * src/bison.simple (yytname): Do not assume that the user defines
1383 YYDEBUG to a properly parenthesized expression.
1384
3877f72b
AD
13852001-12-17 Akim Demaille <akim@epita.fr>
1386
1387 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1388 nlookaheads is a new member.
1389 Adjust all users.
1390 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1391 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1392 state.
776209d6 1393
331dbc1b
AD
13942001-12-17 Akim Demaille <akim@epita.fr>
1395
1396 * src/files.h, src/files.c (open_files, close_files): Remove.
1397 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1398 let...
1399 * src/reader.c (reader): Do it.
776209d6 1400
be750e4c
AD
14012001-12-17 Akim Demaille <akim@epita.fr>
1402
1403 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1404
709ae8c6
AD
14052001-12-17 Akim Demaille <akim@epita.fr>
1406
1407 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1408 (flush_reduce): New.
1409 (resolve_sr_conflict): Adjust.
776209d6 1410
f87685c3
AD
14112001-12-17 Akim Demaille <akim@epita.fr>
1412
1413 * src/output.c (output_obstack): Be static and rename as...
1414 (format_obstack): this, to avoid any confusion with files.c's
1415 output_obstack.
1416 * src/reader.h (muscle_obstack): Move to...
1417 * src/output.h: here, since it's defined in output.c.
1418
837491d8
AD
14192001-12-17 Akim Demaille <akim@epita.fr>
1420
1421 * src/output.c (action_row, save_column, default_goto)
1422 (sort_actions, matching_state, pack_vector): Better variable
1423 locality.
1424
796d61fb
AD
14252001-12-17 Akim Demaille <akim@epita.fr>
1426
1427 * src/output.c: Various formatting changes.
776209d6 1428
64d15509
AD
14292001-12-17 Akim Demaille <akim@epita.fr>
1430
1431 * src/files.c (output_files): Free the output_obstack.
1432 * src/main.c (main): Call print and print_graph conditionally.
1433 * src/print.c (print): Work unconditionally.
1434 * src/print_graph.c (print_graph): Work unconditionally.
1435 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1436
fbc8ecb7
MA
14372001-12-16 Marc Autret <autret_m@epita.fr>
1438
1439 * src/output.c (actions_output): Fix. When we use %no-lines,
1440 there is one less line per action.
1441
f0440388
MA
14422001-12-16 Marc Autret <autret_m@epita.fr>
1443
1444 * src/bison.simple: Remove a useless #line directive.
1445 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1446 * src/output.c (get_lines_number): New.
776209d6 1447 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1448 output muscles.
1449 Fix line numbering.
1450 (actions_output): Computes the number of lines taken by actions.
1451 (output_master_parser): Insert new skeleton which is the name of
1452 the output parser file name.
1453
a79986b8
MA
14542001-12-15 Marc Autret <autret_m@epita.fr>
1455
1456 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1457
4ec8e00f
MA
14582001-12-15 Marc Autret <autret_m@epita.fr>
1459
1460 * src/output.c (output_gram): Keep track of the hairy one.
1461
1a4648ff
AD
14622001-12-15 Akim Demaille <akim@epita.fr>
1463
1464 Make `make distcheck' work.
1465
1466 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1467 system.h which uses libgettext.h.
1468
9c2c67e6
AD
14692001-12-15 Akim Demaille <akim@epita.fr>
1470
1471 * src/nullable.c (set_nullable): Useless rules must be skipped,
1472 otherwise, since we range over their symbols, we might look at a
1473 nonterminal which no longer ``exists'', i.e., it is not counted in
1474 `nvars', hence we overflow our arrays.
1475
93ede233
AD
14762001-12-15 Akim Demaille <akim@epita.fr>
1477
1478 The header can also be produced directly, without any obstack!
1479 Yahoo!
1480
1481 * src/files.c, src/files.h (defines_obstack): Remove.
1482 (compute_header_macro): Global.
1483 (defines_obstack_save): Remove.
1484 * src/reader.c (parse_union_decl): No longer output to
1485 defines_obstack: its content can be found in the `stype' muscle
1486 anyway.
1487 (output_token_translations): Merge into...
1488 (symbols_output): this.
1489 Rename as...
1490 (symbols_save): this.
1491 (reader): Adjust.
1492 * src/output.c (header_output): New.
1493 (output): Call it.
1494
2666f928
AD
14952001-12-15 Akim Demaille <akim@epita.fr>
1496
1497 * src/reader.c (parse_union_decl): Instead of handling two obstack
1498 simultaneously, use one to define the `stype' muscle, and use the
1499 value of the latter to fill defines_obstack.
1500 (copy_comment): Remove.
1501 (copy_comment2): Work for a single obstack.
1502 Rename as...
1503 (copy_comment): this.
1504
428046f8
AD
15052001-12-15 Akim Demaille <akim@epita.fr>
1506
1507 * src/lex.c, src/lex.h (xgetc): No longer static.
1508 * src/reader.c (parse_union_decl): Revamp.
1509
ea52d706
AD
15102001-12-15 Akim Demaille <akim@epita.fr>
1511
1512 Still making progress in separating Bison into (i) input, (ii)
1513 process, (iii) output: now we can directly output the parser file
1514 without using table_obstack at all.
1515
1516 * src/files.c, src/files.h (table_obstack): Bye bye.
1517 (parser_file_name): New.
1518 * src/files.c (compute_output_file_names): Compute it.
1519 * src/output.c (actions_output, output_parser)
1520 (output_master_parser): To a file instead of an obstack.
1521
3f96f4dc
AD
15222001-12-15 Akim Demaille <akim@epita.fr>
1523
1524 Attach actions to rules, instead of pre-outputting them to
1525 actions_obstack.
1526
1527 * src/gram.h (rule_t): action and action_line are new members.
1528 * src/reader.c (symbol_list): Likewise.
1529 (copy_action): Save the actions within the rule.
1530 (packgram): Save them in rule_table.
1531 * src/output.c (actions_output): New.
1532 (output_parser): Use it on `%%actions'.
1533 (output_rule_data): Don't free rule_table.
1534 (output): Do it.
1535 (prepare): Don't save the `action' muscle.
1536 * src/bison.simple: s/%%action/%%actions/.
1537
51576fb3
AD
15382001-12-15 Akim Demaille <akim@epita.fr>
1539
1540 * src/reader.c (copy_action): When --yacc, don't append a `;'
1541 to the user action: let it fail if lacking.
dee049eb 1542 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1543
2648a72d
AD
15442001-12-14 Akim Demaille <akim@epita.fr>
1545
1546 * src/lex.c (literalchar): Simply return the char you decoded, non
1547 longer mess around with obstacks and int pointers.
1548 Adjust all callers.
1549
92790e5b
AD
15502001-12-14 Akim Demaille <akim@epita.fr>
1551
1552 * src/lex.c (literalchar): Don't escape the special characters,
1553 just decode them, and keep them as char (before, eol was output as
1554 the 2 char string `\n' etc.).
1555 * src/output.c (output_rule_data): Use quotearg to output the
1556 token strings.
1557
927c1557
PE
15582001-12-13 Paul Eggert <eggert@twinsun.com>
1559
1560 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1561 Do not infringe on the global user namespace when using C++.
1562 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1563 All uses of `fprintf' and `stderr' changed.
1564
1565 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1566
ed8e1f68
AD
15672001-12-13 Akim Demaille <akim@epita.fr>
1568
1569 The computation of nullable is broken: it doesn't handle empty
1570 RHS's properly.
1571
1572 * tests/torture.at (GNU AWK Grammar): New.
1573 * tests/sets.at (Nullable): New.
1574 * src/nullable.c (set_nullable): Instead of blindly looping over
1575 `ritems', loop over the rules, and then over their rhs's.
1576
1577 Work around Autotest bugs.
1578
1579 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1580 frame, because Autotest understand lines starting with a `+' as
1581 traces from the shell. Then, they are not processed properly.
1582 Admittedly an Autotest bug, but we don't have time to wait for
1583 Autotest to catch up.
1584 * tests/regression.at (Broken Closure): Adjust to the new table
1585 frames.
1586 Move to...
1587 * tests/sets.at: here.
1588
cb581495
AD
15892001-12-13 Akim Demaille <akim@epita.fr>
1590
1591 * src/closure.c (closure): Use nrules instead of playing tricks
1592 with BITS_PER_WORD.
1593
2e729273
AD
15942001-12-13 Akim Demaille <akim@epita.fr>
1595
1596 * src/print.c (print_actions): Output the handling of `$' as the
1597 traces do: shifting the token EOF. Before EOF was treated as a
1598 nonterminal.
1599 * tests/regression.at: Adjust some tests.
1600 * src/print_graph.c (print_core): Complete the set of items via
1601 closure. The next-to-final and final states are still unsatisfying,
1602 but that's to be addressed elsewhere.
1603 No longer output the rule numbers, but do output the state number.
1604 A single loop for the shifts + gotos is enough, but picked a
1605 distinct color for each.
1606 (print_graph): Initialize and finalize closure.
1607
107f7dfb
AD
16082001-12-13 Akim Demaille <akim@epita.fr>
1609
1610 * src/reader.c (readgram): Remove dead code, an strip useless
1611 braces.
1612 (get_type): Remove, unused.
1613
9b53a24f
AD
16142001-12-12 Akim Demaille <akim@epita.fr>
1615
1616 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1617 on that of lib/error.c.
1618
dbfb6dcd
AD
16192001-12-12 Akim Demaille <akim@epita.fr>
1620
1621 Some hosts don't like `/' in includes.
1622
1623 * src/system.h: Include libgettext.h without qualifying the path.
1624 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1625 $(top_srcdir).
1626
c25fb648
MA
16272001-12-11 Marc Autret <autret_m@epita.fr>
1628
1629 * src/output.c (output_parser): Remove useless muscle.
1630
710ddc4f
MA
16312001-12-11 Marc Autret <autret_m@epita.fr>
1632
1633 * src/bison.simple: Remove #line just before %%epilogue. It
1634 is now handled in ...
1635 * src/reader.c (read_additionnal_code): Add the output of a
1636 #line for the epilogue.
1637
e83d80b8
MA
16382001-12-10 Marc Autret <autret_m@epita.fr>
1639
927c1557 1640 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1641 replace precedent remove.
1642 * src/bison.simple: Remove #line before %%prologue because
1643 %%input-line is wrong at this time.
1644
971d5158
MA
16452001-12-10 Marc Autret <autret_m@epita.fr>
1646
1647 * src/reader.c (symbols_output): Clean up.
927c1557 1648 * src/output.c (output_gram, output): Clean up.
971d5158 1649
5edafffd
AD
16502001-12-10 Akim Demaille <akim@epita.fr>
1651
1652 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1653 * src/LR0.c (set_state_table): here.
1654 * src/lalr.c (lalr): Call it.
1655
0279f8e9
AD
16562001-12-10 Akim Demaille <akim@epita.fr>
1657
1658 * src/state.h (shifts): Remove the `number' member: shifts are
1659 attached to state, hence no longer need to be labelled with a
1660 state number.
1661
190c4f5f
AD
16622001-12-10 Akim Demaille <akim@epita.fr>
1663
1664 Now that states have a complete set of members, the linked list of
1665 shifts is useless: just fill directly the state's shifts member.
1666
1667 * src/state.h (shifts): Remove the `next' member.
1668 * src/LR0.c (first_state, last_state): Remove.
1669 Adjust the callers.
1670 (augment_automaton): Don't look for the shifts that must be added
1671 a shift on EOF: it is those of the state we looked for! But now,
1672 since shifts are attached, it is no longer needed to looking
1673 merely by its id: its number.
1674
2a73b93d
AD
16752001-12-10 Akim Demaille <akim@epita.fr>
1676
1677 * src/LR0.c (augment_automaton): Better variable locality.
1678 Remove an impossible branch: if there is a state corresponding to
1679 the start symbol being shifted, then there is shift for the start
1680 symbol from the initial state.
1681
74392f6a
AD
16822001-12-10 Akim Demaille <akim@epita.fr>
1683
1684 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1685 only when appropriate: when insert_start_shifting_state' is not
1686 invoked.
1687 * tests/regression.at (Rule Line Numbers): Adjust.
1688
37c82725
AD
16892001-12-10 Akim Demaille <akim@epita.fr>
1690
1691 * src/LR0.c (augment_automaton): Now that all states have shifts,
1692 merge the two cases addition shifts to the initial state.
1693
6a164e0c
AD
16942001-12-10 Akim Demaille <akim@epita.fr>
1695
1696 * src/lalr.c (set_state_table): Move to...
1697 * src/LR0.c: here.
1698 * src/lalr.c (lalr): Don't call it...
1699 * src/LR0.c (generate_states): do it.
1700 * src/LR0.h (first_state): Remove, only the table is used.
1701
7215de24
AD
17022001-12-10 Akim Demaille <akim@epita.fr>
1703
1704 * src/LR0.h (first_shift, first_reduction): Remove.
1705 * src/lalr.c: Don't use first_shift: find shifts through the
1706 states.
1707
80e25d4d
AD
17082001-12-10 Akim Demaille <akim@epita.fr>
1709
1710 * src/LR0.c: Attach shifts to states as soon as they are
1711 computed.
1712 * src/lalr.c (set_state_table): Instead of assigning shifts to
1713 state, just assert that the mapping was properly done.
1714
0ab3728b
AD
17152001-12-10 Akim Demaille <akim@epita.fr>
1716
1717 * src/LR0.c (insert_start_shift): Rename as...
1718 (insert_start_shifting_state): this.
1719 (insert_eof_shifting_state, insert_accepting_state): New.
1720 (augment_automaton): Adjust.
1721 Better locality of the variables.
1722 When looking if the start_symbol is shifted from the initial
1723 state, using `while (... symbol != start_symbol ...)' sounds
1724 better than `while (... symbol < start_symbol ...)': If fail
1725 to see how the order between symbols could be relevant!
1726
78af9bbc
AD
17272001-12-10 Akim Demaille <akim@epita.fr>
1728
1729 * src/getargs.h: Don't declare `spec_name_prefix' and
1730 `spec_file_prefix', declared by src/files.h.
1731 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1732 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1733 * src/output.c (prepare): Adjust.
1734 * src/reader.c (symbols_output): Likewise.
1735 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1736
bdef2a41
AD
17372001-12-10 Akim Demaille <akim@epita.fr>
1738
1739 * src/muscle_tab.c (muscle_init): NULL is a better default than
1740 `"0"'.
1741
3735969c
AD
17422001-12-10 Akim Demaille <akim@epita.fr>
1743
1744 * src/reader.c (reader): Calling symbols_output once is enough.
1745
49701457
AD
17462001-12-10 Akim Demaille <akim@epita.fr>
1747
1748 Now that states have a complete set of members, the linked list of
1749 reductions is useless: just fill directly the state's reductions
1750 member.
1751
1752 * src/state.h (struct reductions): Remove member `number' and
1753 `next'.
1754 * src/LR0.c (first_reduction, last_reduction): Remove.
1755 (save_reductions): Don't link the new reductions, store them in
1756 this_state.
1757 * src/lalr.c (set_state_table): No need to attach reductions to
1758 states, it's already done.
1759 * src/output.c (output_actions): No longer free the shifts, then
1760 the reductions, then the states: free all the states and their
1761 members.
1762
0edad749
AD
17632001-12-10 Akim Demaille <akim@epita.fr>
1764
1765 * src/options.c (OPTN, DRTV, BOTH): New.
1766 (option_table): Use them.
1767
0edad749
AD
1768 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1769 the job of system.h.
1770 * src/options.c: Don't include stdio.h and xalloc.h for the same
1771 reasons.
1772
5449dd0f
AD
17732001-12-10 Akim Demaille <akim@epita.fr>
1774
1775 * src/output.c (output, prepare): Make sure the values of the
1776 muscles `action' and `prologue' are 0-terminated.
1777
a870c567
AD
17782001-12-10 Akim Demaille <akim@epita.fr>
1779
1780 Clean up GCC warnings.
1781
1782 * src/reader.c (copy_action): `buf' is not used.
1783 (parse_skel_decl): Be static.
1784 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1785 * src/options.h (create_long_option_table): Have a real prototype.
1786 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1787 (hash_delete_at): Return const void *.
1788 Adjust casts to preserve the const.
1789
80df8768
AD
17902001-12-10 Akim Demaille <akim@epita.fr>
1791
1792 * configure.in: Require 2.52g.
1793 M4 is not needed, but AUTOM4TE is.
1794 * m4/m4.m4: Remove.
1795 * tests/Makefile.am: Adjust.
1796
f693ad14
AD
17972001-12-10 Akim Demaille <akim@epita.fr>
1798
1799 One structure for states is enough, even though theoretically
1800 there are LR(0) states and LALR(1) states.
1801
1802 * src/lalr.h (state_t): Remove.
1803 (state_table): Be state_t **, not state_t *.
1804 * src/state.h (core, CORE_ALLOC): Rename as...
1805 (state_t, STATE_ALLOC): this.
1806 Add the LALR(1) members: shifts, reductions, errs.
1807 * src/LR0.c (state_table): Rename as...
1808 (state_hash): this, to avoid name clashes with the global
1809 `state_table'.
1810 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1811 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1812
74ffbcb6
AD
18132001-12-10 Akim Demaille <akim@epita.fr>
1814
1815 Bison dumps core on bash.y.
1816 Reported by Pascal Bart.
1817
1818 * src/warshall.c (bitmatrix_print): New.
1819 (TC): Use it.
1820 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1821 j must be the outer loop.
1822 * tests/regression.at (Broken Closure): New.
1823
07708e19
AD
18242001-12-05 Akim Demaille <akim@epita.fr>
1825
1826 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1827 its argument.
1828