]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/lalr.h, src/lalr.c (LAruleno): Replace with...
[bison.git] / ChangeLog
CommitLineData
b0299a2e
AD
12002-04-07 Akim Demaille <akim@epita.fr>
2
3 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
4 (LArule): this, which is an array to rule_t*.
5 * src/print.c, src/conflicts.c: Adjust.
6
7
d7e1f00c
AD
82002-04-07 Akim Demaille <akim@epita.fr>
9
10 * src/gram.h (rule_t): Rename `number' as `user_number'.
11 `number' is a new member.
12 Adjust dependencies.
13 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14
cc9305dd
AD
152002-04-07 Akim Demaille <akim@epita.fr>
16
17 As a result of the previous patch, it is no longer needed
18 to reorder ritem itself.
19
20 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
21
b0940840
AD
222002-04-07 Akim Demaille <akim@epita.fr>
23
24 Be sure never to walk through RITEMS, but use only data related to
25 the rules themselves. RITEMS should be banished.
26
27 * src/output.c (output_token_translations): Rename as...
28 (prepare_tokens): this.
29 In addition to `translate', prepare the muscles `tname' and
30 `toknum', which were handled by...
31 (output_rule_data): this.
32 Remove, and move the remainder of its outputs into...
33 (prepare_rules): this new routines, which also merges content from
34 (output_gram): this.
35 (prepare_rules): Be sure never to walk through RITEMS.
36 (output_stos): Rename as...
37 (prepare_stos): this.
38 (output): Always invoke prepare_states, after all, just don't use it
39 in the output if you don't need it.
40
643a5994
AD
412002-04-07 Akim Demaille <akim@epita.fr>
42
43 * src/LR0.c (new_state): Display `nstates' as the name of the
44 newly created state.
45 Adjust to initialize first_state and last_state if needed.
46 Be sure to distinguish the initial from the final state.
47 (new_states): Create the itemset of the initial state, and use
48 new_state.
49 * src/closure.c (closure): Now that the initial state has its
50 items properly set, there is no need for a special case when
51 creating `ruleset'.
52
53 As a result, now the rule 0, reducing to $axiom, is visible in the
54 outputs. Adjust the test suite.
55
56 * tests/conflicts.at (Solved SR Conflicts)
57 (Unresolved SR Conflicts): Adjust.
58 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
59 * tests/conflicts.at (S/R in initial): New.
60
b4c4ccc2
AD
612002-04-07 Akim Demaille <akim@epita.fr>
62
63 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
64 the RHS of the rules.
65 * src/output.c (output_gram): Likewise.
66
bba97eb2
AD
672002-04-07 Akim Demaille <akim@epita.fr>
68
69 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
70 bucket.
71 Adjust all dependencies.
72 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
73 `number' of the buckets too.
74 * src/gram.h: Include `symtab.h'.
75 (associativity): Move to...
76 * src/symtab.h: here.
77 No longer include `gram.h'.
78
79
c3b407f4
AD
802002-04-07 Akim Demaille <akim@epita.fr>
81
82 * src/gram.h, src/gram.c (rules_rhs_length): New.
83 (ritem_longest_rhs): Use it.
84 * src/gram.h (rule_t): `number' is a new member.
85 * src/reader.c (packgram): Set it.
86 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
87 the end of `rules', and count them out of `nrules'.
88 (reduce_output, dump_grammar): Adjust.
89 * src/print.c (print_grammar): It is no longer needed to check for
90 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
91 * tests/reduce.at (Reduced Automaton): New test.
92
11652ab3
AD
932002-04-07 Akim Demaille <akim@epita.fr>
94
95 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
96 lacking `+ 1' to nrules, Bison reported as useless a token if it
97 was used solely to set the precedence of the last rule...
98
26b23c1a
AD
992002-04-07 Akim Demaille <akim@epita.fr>
100
101 * data/bison.c++, data/bison.simple: Don't output the current file
102 name in #line, to avoid useless diffs between two identical
103 outputs under different names.
104
18bcecb0
AD
1052002-04-07 Akim Demaille <akim@epita.fr>
106
107 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
108 Normalize loops to using `< nrules + 1', not `<= nrules'.
109
fa770c86
AD
1102002-04-07 Akim Demaille <akim@epita.fr>
111
112 * TODO: Update.
113
d9b739c3
AD
1142002-04-07 Akim Demaille <akim@epita.fr>
115
116 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
117 bucket.value as bucket.number.
118
99013900
AD
1192002-04-07 Akim Demaille <akim@epita.fr>
120
121 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
122 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
123 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
124 RHS, instead of being an index in RITEMS.
125
e966383b
PE
1262002-04-04 Paul Eggert <eggert@twinsun.com>
127
128 * doc/bison.texinfo: Update copyright date.
129 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
130 (Symbols): Warn about running Bison in one character set,
131 but compiling and/or running in an incompatible one.
132 Warn about character code 256, too.
133
1342002-04-03 Paul Eggert <eggert@twinsun.com>
135
136 * src/bison.data (YYSTACK_ALLOC): Depend on whether
137 YYERROR_VERBOSE is nonzero, not whether it is defined.
138
139 Merge changes from bison-1_29-branch.
c307773e 140
8d6c48b9
PE
1412002-03-20 Paul Eggert <eggert@twinsun.com>
142
143 Merge fixes from Debian bison_1.34-1.diff.
144
145 * configure.in (AC_PREREQ): 2.53.
146
e53c6322
AD
1472002-03-20 Akim Demaille <akim@epita.fr>
148
149 * src/conflicts.c (log_resolution): Argument `resolution' is const.
150
9ffbeca7
PE
1512002-03-19 Paul Eggert <eggert@twinsun.com>
152
21db0b2a
PE
153 * src/bison.simple (YYCOPY): New macro.
154 (YYSTACK_RELOCATE): Use it.
155 Remove Type arg; no longer needed. All callers changed.
156 (yymemcpy): Remove; no longer needed.
157
9ffbeca7
PE
158 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
159 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
160
642cb8f8
AD
1612002-03-19 Akim Demaille <akim@epita.fr>
162
163 Test and fix the #line outputs.
164
165 * tests/atlocal.at (GCC): New.
166 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
167 (Prologue synch line, ,%union synch line, Postprologue synch line)
168 (Action synch line, Epilogue synch line): New tests.
169 * src/reader.c (parse_union_decl): Define the muscle stype_line.
170 * data/bison.simple, data/bison.c++: Use it.
171
3c31a486
AD
1722002-03-19 Akim Demaille <akim@epita.fr>
173
174 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
175 (Solved SR Conflicts, %expect not enough, %expect right)
176 (%expect too much): Move to...
177 * tests/conflicts.at: this new file.
178
0d8bed56
AD
1792002-03-19 Akim Demaille <akim@epita.fr>
180
181 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
182 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
183 that we can move to enums for instance.
184 * src/output.c (token_definitions_output): Output a list of
185 `token-name, token-number' instead of the #define.
186 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
187
9208d17f
AD
1882002-03-14 Akim Demaille <akim@epita.fr>
189
190 Use Gettext 0.11.1.
191
af27eacb
RA
1922002-03-09 Robert Anisko <robert@lrde.epita.fr>
193
194 * data/bison.c++: Make the user able to add members to the generated
195 parser by subclassing.
196
9101a310
RA
1972002-03-05 Robert Anisko <robert@lrde.epita.fr>
198
199 * src/reader.c (read_additionnal_code): `c' should be an integer, not
200 a character.
201 Reported by Nicolas Tisserand and Nicolas Burrus.
202
fff9bf0b
RA
2032002-03-04 Robert Anisko <robert@lrde.epita.fr>
204
205 * src/reader.c: Warn about lacking semi-colons, do not complain.
206
64dba31e
RA
2072002-03-04 Robert Anisko <robert@lrde.epita.fr>
208
209 * data/bison.c++: Remove a debug line.
210
374f5a14
RA
2112002-03-04 Robert Anisko <robert@lrde.epita.fr>
212
213 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
214 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
215 provide a default implementation.
216
bfcf1f3a
AD
2172002-03-04 Akim Demaille <akim@epita.fr>
218
219 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
220 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
221 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
222 * tests/semantic.at (Parsing Guards): Similarly.
223 * src/reader.at (readgram): Complain if the last rule is not ended
224 with a semi-colon.
225
65ccf9fc
AD
2262002-03-04 Akim Demaille <akim@epita.fr>
227
228 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
229 * src/closure.c: here.
230 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
231 RTC.
232 * src/warshall.h, src/warshall.c: Remove.
233 * tests/sets.at (Broken Closure): Adjust.
234
d0039cbc
AD
2352002-03-04 Akim Demaille <akim@epita.fr>
236
237 * src/output.c (output_skeleton): tempdir is const.
238 bytes_read is unused.
239
345cea78
AD
2402002-03-04 Akim Demaille <akim@epita.fr>
241
242 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
243 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
244 Update.
245 From Michael Hayes.
246
564801f7
AD
2472002-03-04 Akim Demaille <akim@epita.fr>
248
249 * src/closure.c (closure): `r' is unused.
250
e5352bc7
AD
2512002-03-04 Akim Demaille <akim@epita.fr>
252
253 * tests/sets.at (Broken Closure): Add the ending `;'.
254 * src/reader.at (readgram): Complain if a rule is not ended with a
255 semi-colon.
256
914feea9
AD
2572002-03-04 Akim Demaille <akim@epita.fr>
258
259 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
260 (count_sr_conflicts): Use bitset_count.
261 * src/reduce.c (inaccessable_symbols): Ditto.
262 (bits_size): Remove.
263 * src/warshall.h, src/warshall.c: Convert to bitsetv.
264
f0250de6
AD
2652002-03-04 Akim Demaille <akim@epita.fr>
266
267 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
268 * src/reduce.c: Remove the `bitset_zero's following the
269 `bitset_create's, as now it is performed by the latter.
270
ef017502
AD
2712002-03-04 Akim Demaille <akim@epita.fr>
272
273 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
274 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
275 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
276 latest sources from Michael.
277
76514394
AD
2782002-03-04 Akim Demaille <akim@epita.fr>
279
280 * src/output.c (output): Don't free the grammar.
281 * src/reader.c (grammar_free): New.
282 * src/main.c (main): Call it and don't free symtab here.
283
55024580
AD
2842002-03-04 Akim Demaille <akim@epita.fr>
285
286 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
287 before returning.
288 Reported by Benoit Perrot.
289
f9abaa2c
AD
2902002-03-04 Akim Demaille <akim@epita.fr>
291
292 Use bitset operations when possible, not loops over bits.
293
294 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
295 bitset_or.
296 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
297 * src/reduce.c (useless_nonterminals): Formatting changes.
298 * src/warshall.c (TC): Use bitset_or.
299
0e721e75
AD
3002002-03-04 Akim Demaille <akim@epita.fr>
301
302 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
303 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
304 Ditto.
305
0fb1ffb1
AD
3062002-03-04 Akim Demaille <akim@epita.fr>
307
308 * src/lalr.c (F): Now a bitset*.
309 Adjust all dependencies.
310
b86796bf
AD
3112002-03-04 Akim Demaille <akim@epita.fr>
312
313 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
314 Adjust all dependencies.
315
602bbf31
AD
3162002-03-04 Akim Demaille <akim@epita.fr>
317
318 * src/L0.c, src/LR0.h (nstates): Be size_t.
319 Adjust comparisons (signed vs unsigned).
320 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
321 bitset*.
322 Adjust all dependencies.
323
d8a0245c
AD
3242002-03-04 Akim Demaille <akim@epita.fr>
325
326 * src/closure.c (firsts): Now, also a bitset.
327 Adjust all dependencies.
328 (varsetsize): Remove, now unused.
329 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
330
34ba9743
AD
3312002-03-04 Akim Demaille <akim@epita.fr>
332
333 * src/print.c: Convert to use bitset.h, not hand coded iterations
334 over ints.
335
ed86e78c
AD
3362002-03-04 Akim Demaille <akim@epita.fr>
337
338 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
339
dfdb1797
AD
3402002-03-04 Akim Demaille <akim@epita.fr>
341
342 * src/closure.c (ruleset): Be a bitset.
343 (rulesetsize): Remove.
344
7086e707
AD
3452002-03-04 Akim Demaille <akim@epita.fr>
346
347 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
348 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
349 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
350 * src/closure.c (fderives): Be an array of bitsets.
351
98254360
RA
3522002-02-28 Robert Anisko <robert@lrde.epita.fr>
353
354 * data/bison.c++: Merge the two generated headers. Insert a copyright
355 notice in each output file.
356
a75c057f
AD
3572002-02-28 Akim Demaille <akim@epita.fr>
358
359 * data/bison.c++: Copy the prologue of bison.simple to fetch
360 useful M4 definitions, such as b4_header_guard.
361
06b00abc
AD
3622002-02-25 Akim Demaille <akim@epita.fr>
363
364 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
365 translator friendly scheme for the bgr
366 copyright notice.
06b00abc 367
70e7d534
AD
3682002-02-25 Akim Demaille <akim@epita.fr>
369
370 * src/output.c (header_output): Remove, now handled completely via
371 M4.
372
abe017f6
AD
3732002-02-25 Akim Demaille <akim@epita.fr>
374
375 * m4/m4.m4: New, from CVS Autoconf.
376 * configure.in: Invoke it.
377 * src/output.c (output_skeleton): Use its result instead of the
378 hard coded name.
379
381fb12e
AD
3802002-02-25 Akim Demaille <akim@epita.fr>
381
382 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
383 Fileutils 4.1.5.
384 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
385 * src/output.c (output_skeleton): Use mkstemp to create a real
386 temporary file.
387 Move the filling of `skeleton' and its muscle to...
388 (prepare): here.
389 (output): Move the definition of the prologue muscle to...
390 (prepare): here.
391 * src/system.h (DEFAULT_TMPDIR): New.
392
6f38107f
PE
3932002-02-14 Paul Eggert <eggert@twinsun.com>
394
395 Remove the support for C++ namespace cleanliness; it was
396 causing more problems than it was curing, since it didn't work
397 properly on some nonstandard C++ compilers. This can wait
398 for a proper C++ parser.
399
400 * NEWS: Document this.
401 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
402 of C++, as it's treated like C now.
403 * src/bison.simple (YYSTD): Remove.
404 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
405 Treat C++ just like Standard C instead of trying to support
406 namespace cleanliness.
407
80cce3da
AD
4082002-02-14 Akim Demaille <akim@epita.fr>
409
410 * tests/regression.at (else): Adjust to Andreas' change.
411
842e8679
AD
4122002-02-14 Akim Demaille <akim@epita.fr>
413
414 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
415
4bda3f10
AD
4162002-02-13 Andreas Schwab <schwab@suse.de>
417
418 * src/output.c (output_rule_data): Don't output NULL, it might
419 not be defined yet.
420
4162fa07 4212002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 422
4162fa07
RA
423 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
424 (Copyright notice): Update.
b418ecd8 425
bd16a5dc
AD
4262002-02-11 Akim Demaille <akim@epita.fr>
427
428 * tests/regression.at (%nonassoc and eof): Don't include
429 nonportable headers.
430
8d69a1a3
RA
4312002-02-08 Robert Anisko <robert@lrde.epita.fr>
432
433 * data/bison.c++: Correct error recovery. Make the user able to
434 initialize the starting location.
435
9b2d0677
AD
4362002-02-07 Akim Demaille <akim@epita.fr>
437
438 * tests/input.at: New.
439
69e2658b
RA
4402002-02-07 Robert Anisko <robert@lrde.epita.fr>
441
442 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 443 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
444 directives around tables only needed for debugging.
445
4aacc3a7
RA
4462002-02-07 Robert Anisko <robert@lrde.epita.fr>
447
448 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
449 C++ parsers.
450 (yy::b4_name::parse): Use print_.
451
762a801e
RA
4522002-02-07 Robert Anisko <robert@lrde.epita.fr>
453
454 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
455
4bb2bc3f
RA
4562002-02-07 Robert Anisko <robert@lrde.epita.fr>
457
458 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
459 C++ parsers.
460 (yy::b4_name::parse): Build verbose error messages, and use error_.
461
6b45a3ca
RA
4622002-02-06 Robert Anisko <robert@lrde.epita.fr>
463
464 * data/bison.c++: Fix m4 quoting in comments.
465
50997c6e
RA
4662002-02-06 Robert Anisko <robert@lrde.epita.fr>
467
468 * data/bison.c++: Adjust the parser code. Fix some muscles that were
469 not expanded by m4.
470
3f3eed27
AD
4712002-02-05 Akim Demaille <akim@epita.fr>
472
473 * data/bison.c++: Adjust to the M4 back end.
474 More is certainly needed.
475
be2a1a68
AD
4762002-02-05 Akim Demaille <akim@epita.fr>
477
478 Give a try to M4 as a back end.
479
480 * lib/readpipe.c: New, from wdiff.
481 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
482 BISON_HAIRY.
483 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
484 specific values. Now it is m4 that performs the lookup.
485 * src/parse-skel.y: Remove.
486 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
487 * src/output.c (actions_output, guards_output)
488 (token_definitions_output): No longer keeps track of the output
489 line number, hence remove the second argument.
490 (guards_output): Check against the guard member of a rule, not the
491 action member.
492 Adjust callers.
493 (output_skeleton): Don't look for the skeleton location, let m4 do
494 that.
495 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
496 file will be used.
497 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
498 (prepare): Given that for the time being changesyntax is not
499 usable in M4, rename the muscles using `-' to `_'.
500 Define `defines_flag', `output_parser_name' and `output_header_name'.
501 * src/output.h (actions_output, guards_output)
502 (token_definitions_output): Adjust prototypes.
503 * src/scan-skel.l: Instead of scanning the skeletons, it now
504 processes the output of m4: `__oline__' and `#output'.
505 * data/bison.simple: Adjust to be used by M4(sugar).
506 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
507 to date.
508 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
509 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
510 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
511 shamelessly stolen from CVS Autoconf.
512
beda758b
AD
5132002-02-05 Akim Demaille <akim@epita.fr>
514
515 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
516 * configure.in: Check for the declarations of free and malloc.
517 * src/muscle_tab.c: Adjust.
518
5ece6d43
AD
5192002-02-05 Akim Demaille <akim@epita.fr>
520
521 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
522 which have no values.
523
5bb18f9a
AD
5242002-02-05 Akim Demaille <akim@epita.fr>
525
526 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
527 * data/: here.
528
894dd62e
PE
5292002-01-29 Paul Eggert <eggert@twinsun.com>
530
531 * src/bison.simple (YYSIZE_T): Do not define merely because
532 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
533 On some platforms, <alloca.h> does not declare YYSTD (size_t).
534
82841af7
AD
5352002-01-27 Akim Demaille <akim@epita.fr>
536
537 Fix `%nonassoc and eof'.
538
539 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
540 which were not properly copied! Replace
541 memcpy (res->errs, src->errs, src->nerrs);
542 with
543 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
544 !!!
545 * tests/regression.at (%nonassoc and eof): Adjust to newest
546 Autotest: `.' is not in the PATH.
547
318b76e9
AD
5482002-01-27 Akim Demaille <akim@epita.fr>
549
550 * tests/sets.at (AT_EXTRACT_SETS): New.
551 (Nullable): Use it.
552 (Firsts): New.
553
30d2f3d5
AD
5542002-01-26 Akim Demaille <akim@epita.fr>
555
556 * tests/actions.at, tests/calc.at, tests/headers.at,
557 * tests/torture.at: Adjust to the newest Autotest which no longer
558 forces `.' in the PATH.
559
30f8c395
AD
5602002-01-25 Akim Demaille <akim@epita.fr>
561
562 * tests/regression.at (%nonassoc and eof): New.
563 Suggested by Robert Anisko.
564
29ae55f1
AD
5652002-01-24 Akim Demaille <akim@epita.fr>
566
567 Bison dumps core when trying to complain about broken input files.
568 Reported by Cris van Pelt.
569
570 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
571 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
572 into...
573 (Invalid inputs): Strengthen: exercise parse_percent_token.
574
2b548aa6
RA
5752002-01-24 Robert Anisko <robert.anisko@epita.fr>
576
577 * src/Makefile.am: Add bison.c++.
578 * src/bison.c++: New skeleton.
579
bb0146c2
AD
5802002-01-21 Paolo Bonzini <bonzini@gnu.org>
581
582 * po/it.po: New.
583
bec30531
AD
5842002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
585
586 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
587
fc6edc45
MA
5882002-01-20 Marc Autret <marc@gnu.org>
589
590 * src/files.c (compute_output_file_names): Fix
591
5e5d5415
MA
5922002-01-20 Marc Autret <marc@gnu.org>
593
594 * tests/output.at: New test.
595 * src/files.c (compute_base_names): Don't map extensions when
596 the YACC flag is set, use defaults.
597 Reported by Evgeny Stambulchik.
598
44ea3fbd
MA
5992002-01-20 Marc Autret <marc@gnu.org>
600
bb0146c2 601 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
602 compilers as well (i.e. the vendor C compiler).
603 Suggested by Albert Chin-A-Young.
604
338963d1
TVH
6052002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
606
607 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
608 canonical definition.
609 * src/system.h: Use the canonical definition for PARAMS (avoids
610 a conflict with the macro from lib/hash.h).
611
c57b2479
AD
6122002-01-11 Akim Demaille <akim@epita.fr>
613
614 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 615 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 616
b85810ae
AD
6172002-01-09 Akim Demaille <akim@epita.fr>
618
619 * src/files.c, src/files.h (output_infix): New.
620 (tab_extension): Remove.
621 (compute_base_names): Compute the former, drop the latter.
622 * src/output.c (prepare): Insert the muscles `output-infix', and
623 `output-suffix'.
624 * src/parse-skel.y (string, string.1): New.
625 (section.header): Use it.
626 (section.yacc): Remove.
627 (prefix): Remove too.
628 * src/scan-skel.l: Adjust.
629 * src/bison.simple, src/bison.hairy: Adjust.
630
cae60122
AD
6312002-01-09 Akim Demaille <akim@epita.fr>
632
633 * configure.in (WERROR_CFLAGS): Compute it.
634 * src/Makefile.am (CFLAGS): Pass it.
635 * tests/atlocal.in (CFLAGS): Idem.
636 * src/files.c: Fix a few warnings.
637 (get_extension_index): Remove, unused.
638
ae404801
AD
6392002-01-08 Akim Demaille <akim@epita.fr>
640
641 * src/getargs.c (AS_FILE_NAME): New.
642 (getargs): Use it to convert DOSish file names.
643 * src/files.c (base_name): Rename as full_base_name to avoid
644 clashes with `base_name ()'.
645 (filename_split): New.
646 (compute_base_names): N-th rewrite, using filename_split.
647
22312b71
AD
6482002-01-08 Akim Demaille <akim@epita.fr>
649
650 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
651 New, stolen from the Fileutils 4.1.
652 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
653 * configure.in: Check for the presence of memrchr, and of its
654 prototype.
655
a67cef01
TVH
6562002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
657
658 * lib/hash.h (__P): Added definition for this macro.
659 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
660 BUILT_SOURCES, to ensure they are generated first.
661 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
662 %error-verbose to allow bootstrapping with bison 1.30x.
663
2b25d624
AD
6642002-01-06 Akim Demaille <akim@epita.fr>
665
666 * src/reader.c (parse_braces): Don't fetch the next char, the
667 convention is to fetch on entry.
668 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
669 'switch' without a following semicolon.
670 * tests/regression.at (braces parsing): New.
671
3460813b
AD
6722002-01-06 Akim Demaille <akim@epita.fr>
673
674 Bison is dead wrong in its RR conflict reports.
675
676 * tests/torture.at (GNU Cim Grammar): New.
677 * src/conflicts.c (count_rr_conflicts): Fix.
678
73784c64
AD
6792002-01-06 Akim Demaille <akim@epita.fr>
680
681 Creating package.m4 from configure.ac causes too many problems.
682
683 * tests/Makefile.am (package.m4): Create it by hand,
684 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
685
25d81090
AD
6862002-01-06 Akim Demaille <akim@epita.fr>
687
688 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
689 skeleton.h.
690
a9b8959e
PE
6912002-01-04 Paul Eggert <eggert@twinsun.com>
692
693 * doc/bison.texinfo (Debugging):
694 Remove YYSTDERR; it's no longer defined or used.
695 Also, s/cstdio.h/cstdio/.
696
25d81090
AD
6972002-01-03 Akim Demaille <akim@epita.fr>
698
699 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
700
1109455c
AD
7012002-01-03 Akim Demaille <akim@epita.fr>
702
703 * src/parse-skel.y (process_skeleton): Don't bind the parser's
704 tracing code to --trace, wait for a better --trace option, with
705 args.
706
7ea5e977
AD
7072002-01-03 Akim Demaille <akim@epita.fr>
708
709 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
710 The ISO C++ standard is extremely clear about it: stderr is
711 considered a macro, not a regular symbol (see table 94 `Header
712 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
713 Therefore std:: does not apply to it. It still does with fprintf.
714 Also, s/cstdio.h/cstdio/.
715
fab5b110
AD
7162002-01-03 Akim Demaille <akim@epita.fr>
717
718 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
719 for non system headers.
720
aed7fd9b
AD
7212002-01-02 Akim Demaille <akim@epita.fr>
722
723 Equip the skeleton chain with location tracking, runtime trace,
724 pure parser and scanner.
725
726 * src/parse-skel.y: Request a pure parser, locations, and prefix
727 renaming.
728 (%union): Having several members with the same type does not help
729 type mismatches, simplify.
730 (YYPRINT, yyprint): New.
731 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
732 (skel_error): this.
733 Handle locations.
734 * src/scan-skel.l: Adjust to these changes.
735 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
736 (LOCATION_PRINT, skel_control_t): New.
737
24fad99e
AD
7382001-12-30 Akim Demaille <akim@epita.fr>
739
740 * src/parse-skel.y: Get rid of the shift/reduce conflict:
741 replace `gb' with BLANKS.
742 * src/scan-skel.l: Adjust.
743
a4b36db4
AD
7442001-12-30 Akim Demaille <akim@epita.fr>
745
746 * src/system.h: We don't need nor want bcopy.
747 Throw away MS-DOS crap: we don't need getpid.
748 * configure.in: We don't need strndup. It was even causing
749 problems: because Flex includes the headers *before* us,
750 _GNU_SOURCE is not defined by config.h, and therefore strndup was
751 not visible.
752 * lib/xstrndup.c: New.
753 * src/scan-skel.l: Use it.
754 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
755 * src/parse-skel.y: Use %directives instead of #defines.
756
1239777d
AD
7572001-12-30 Akim Demaille <akim@epita.fr>
758
759 * src/skeleton.h: New.
760 * src/output.c (output_parser, output_master_parser): Remove, dead
761 code.
762 * src/output.h (get_lines_number, actions_output, guards_output)
763 (token_definitions_output): Prototype them.
764 * src/parse-skel.y: Add the license notice.
765 Include output.h and skeleton.h.
766 (process_skeleton): Returns void, and takes a single parameter.
767 * src/scan-skel.l: Add the license notice.
768 Include skeleton.h.
769 Don't use %option yylineno: it seems that then Flex imagines
770 REJECT has been used, and therefore it won't reallocate its
771 buffers (which makes no other sense to me than a bug). It results
772 in warnings for `unused: yy_flex_realloc'.
773
9b3add5b
RA
7742001-12-30 Robert Anisko <robert.anisko@epita.fr>
775
776 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
777 (MUSCLE_INSERT_PREFIX): ...to there.
778 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
779 (MUSCLE_INSERT_PREFIX): Move from here...
780
781 * src/bison.hairy: Add a section directive. Put braces around muscle
782 names. This parser skeleton is still broken, but Bison should not
783 choke on a bad muscle 'syntax'.
784 * src/bison.simple: Add a section directive. Put braces around muscle
785 names.
786
787 * src/files.h (strsuffix, stringappend): Add declarations.
788 (tab_extension): Add declaration.
789 (short_base_name): Add declaration.
790
791 * src/files.c (strsuffix, stringappend): No longer static. These
792 functions are used in the skeleton parser.
793 (tab_extension): New.
794 (compute_base_names): Use the computations done in this function
fab5b110 795 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
796 names.
797 (short_base_name): No longer static.
798
799 * src/output.c (output_skeleton): New.
800 (output): Disable call to output_master_parser, and give a try to
801 a new skeleton handling system.
802 (guards_output, actions_output): No longer static.
803 (token_definitions_output, get_lines_number): No longer static.
804
805 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
806
fab5b110 807 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
808 parse-skel.y.
809
810 * src/parse-skel.y: New file.
811 * src/scan-skel.l: New file.
812
b5b61c61
AD
8132001-12-29 Akim Demaille <akim@epita.fr>
814
815 %name-prefix is broken.
816
817 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
818 Adjust all dependencies.
819 * tests/headers.at (export YYLTYPE): Strengthen this test: use
820 %name-prefix.
821
822 Renaming yylval but not yylloc is not consistent. Now we do.
823
824 * src/bison.simple: Prefix yylloc if used.
825 * doc/bison.texinfo (Decl Summary): Document that.
826
8c9a50be
AD
8272001-12-29 Akim Demaille <akim@epita.fr>
828
829 * doc/bison.texinfo: Promote `%long-directive' over
830 `%long_directive'.
831 Remove all references to fixed-output-files, yacc is enough.
832
d99361e6
AD
8332001-12-29 Akim Demaille <akim@epita.fr>
834
835 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
836 user prologue. These are defaults.
837 * tests/actions.at (Mid-rule actions): Make sure the user can
838 define YYDEBUG and YYERROR_VERBOSE.
839
b9cecb91
AD
8402001-12-29 Akim Demaille <akim@epita.fr>
841
842 * src/output.c (header_output): Don't forget to export YYLTYPE and
843 yylloc.
844 * tests/headers.at (export YYLTYPE): New, make sure it does.
845 * tests/regression.at (%union and --defines, Invalid CPP headers):
846 Move to...
847 * tests/headers.at: here.
848
aea13e97
AD
8492001-12-29 Akim Demaille <akim@epita.fr>
850
851 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
852
931394cb
AD
8532001-12-29 Akim Demaille <akim@epita.fr>
854
855 * tests/actions.at (Mid-rule actions): Output on a single line
856 instead of several.
857
704a47c4
AD
8582001-12-29 Akim Demaille <akim@epita.fr>
859
860 * doc/bison.texinfo: Formatting changes.
861
091e20bb
AD
8622001-12-29 Akim Demaille <akim@epita.fr>
863
864 Don't store the token defs in a muscle, just be ready to output it
865 on command. Now possible via `symbols'. Fixes a memory leak.
866
867 * src/output.c (token_definitions_output): New.
868 (output_parser, header_output): Use it.
869 * src/reader.c (symbols_save): Remove.
870
cce71710
AD
8712001-12-29 Akim Demaille <akim@epita.fr>
872
873 * src/bison.simple: Do not provide a default for YYSTYPE and
874 YYLTYPE before the user's prologue. Otherwise it's hardly... a
875 default.
876
82c035a8
AD
8772001-12-29 Akim Demaille <akim@epita.fr>
878
879 Mid-rule actions are simply... ignored!
880
881 * src/reader.c (readgram): Be sure to attach mid-rule actions to
882 the empty-rule associated to the dummy symbol, not to the host
883 rule.
884 * tests/actions.at (Mid-rule actions): New.
885
8419d367
AD
8862001-12-29 Akim Demaille <akim@epita.fr>
887
888 Memory leak.
889
890 * src/reader.c (reader): Free grammar.
891
375d5806
AD
8922001-12-29 Akim Demaille <akim@epita.fr>
893
894 Memory leak.
895
896 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
897 since it allocates it for each state, although only one is needed.
898 (allocate_storage): Do it here.
899
f51cb8ff
AD
9002001-12-29 Akim Demaille <akim@epita.fr>
901
902 * src/options.h, src/options.c (create_long_option_table): Rename
903 as...
904 (long_option_table_new): this, with a clearer prototype.
905 (percent_table): Remove, unused,
906 * src/getargs.c (getargs): Adjust.
907
29e88316
AD
9082001-12-29 Akim Demaille <akim@epita.fr>
909
910 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
911 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
912 as states.
913
b9f71f19
AD
9142001-12-29 Akim Demaille <akim@epita.fr>
915
916 * src/lalr.c (build_relations): Rename `states' as `states1'.
917 Sorry, I don't understand exactly what it is, no better name...
918
1a2b5d37
AD
9192001-12-29 Akim Demaille <akim@epita.fr>
920
921 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
922 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
923 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
924 as rules.
925
1cca533e
AD
9262001-12-29 Akim Demaille <akim@epita.fr>
927
928 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
929 ago.
930
c03ae966
AD
9312001-12-29 Akim Demaille <akim@epita.fr>
932
933 * src/reader.c, src/reader.h (user_toknums): Remove.
934 Adjust all users to use symbols[i]->user_token_number.
935
5a670b1e
AD
9362001-12-29 Akim Demaille <akim@epita.fr>
937
938 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
939 Adjust all users to use symbols[i]->prec or ->assoc.
940
ad949da9
AD
9412001-12-29 Akim Demaille <akim@epita.fr>
942
943 * src/reader.c, src/reader.h (tags): Remove.
944 Adjust all users to use symbols[i]->tag.
945
0e78e603
AD
9462001-12-29 Akim Demaille <akim@epita.fr>
947
948 * src/gram.h, src/gram.c (symbols): New, similar to state_table
949 and rule_table.
950 * src/reader.c (packsymbols): Fill this table.
951 Drop sprec.
952 * src/conflicts.c (resolve_sr_conflict): Adjust.
953 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
954 single table.
955 Use symbols[i]->tag instead of tags[i].
956
213e640e
AD
9572001-12-29 Akim Demaille <akim@epita.fr>
958
959 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
960 In addition, put a comment in there, to replace...
961 * tests/regression.at (%union and C comments): Remove.
962
e7b8bef1
AD
9632001-12-29 Akim Demaille <akim@epita.fr>
964
965 * tests/regression.at (Web2c Actions): Blindly move the actual
966 output as expected output. The contents *seem* right to me, but I
967 can't pretend reading perfectly parser tables... Nonetheless, all
968 the other tests pass correctly, the table look OK, even though the
969 presence of `$axiom' is to be noted: AFAICS it is useless (but
970 harmless).
971
b68e7744
AD
9722001-12-29 Akim Demaille <akim@epita.fr>
973
974 * src/reader.c (readgram): Don't add the rule 0 if there were no
975 rules read. In other words, add it _after_ having performed
976 grammar sanity checks.
977 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
978
78d5bae9
AD
9792001-12-29 Akim Demaille <akim@epita.fr>
980
981 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
982 visible, and some states have now a different number.
983
ff442794
AD
9842001-12-29 Akim Demaille <akim@epita.fr>
985
986 * src/reader.c (readgram): Bind the initial rule's lineno to that
987 of the first rule.
988 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
989 (Solved SR Conflicts): Adjust rule 0's line number.
990
610ab194
AD
9912001-12-29 Akim Demaille <akim@epita.fr>
992
993 Fix the `GAWK Grammar' failure.
994
995 * src/LR0.c (final_state): Initialize to -1 so that we do compute
996 the reductions of the first state which was mistakenly confused
997 with the final state because precisely final_state was initialized
998 to 0.
999 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1000 now noticed by Bison.
1001 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1002 have a reduction on $default.
1003
29d29c8f
AD
10042001-12-29 Akim Demaille <akim@epita.fr>
1005
1006 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1007 rule line numbers.
1008 * src/closure.c (print_closure): Likewise.
1009 * src/derives.c (print_derives): Likewise.
1010 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1011 now.
1012
7c6b64d0
AD
10132001-12-29 Akim Demaille <akim@epita.fr>
1014
1015 * src/lalr.c (lookaheads_print): New.
1016 (lalr): Call it when --trace-flag.
1017 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1018 are dumped.
1019
3d4daee3
AD
10202001-12-29 Akim Demaille <akim@epita.fr>
1021
1022 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1023 when walking through ritem, even via rule->rhs.
1024 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1025 (useful_production, useless_nonterminals): Likewise.
1026 (reduce_grammar_tables): Likewise, plus update nritems.
1027 * src/nullable.c (set_nullable): Likewise.
1028 * src/lalr.c (build_relations): Likewise.
1029 * tests/sets.at (Nullable): Adjust.
1030 Fortunately, now, the $axiom is no longer nullable.
1031
9e7f6bbd
AD
10322001-12-29 Akim Demaille <akim@epita.fr>
1033
1034 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1035 the 0-sentinel.
1036 * src/gram.c (ritem_longest_rhs): Likewise.
1037 * src/reduce.c (nonterminals_reduce): Likewise.
1038 * src/print_graph.c (print_graph): Likewise.
1039 * src/output.c (output_rule_data): Likewise.
1040 * src/nullable.c (set_nullable): Likewise.
1041
255ef638
AD
10422001-12-29 Akim Demaille <akim@epita.fr>
1043
1044 * src/output.c: Comment changes.
1045
0d8a7363
AD
10462001-12-27 Paul Eggert <eggert@twinsun.com>
1047
1048 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1049 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1050 Sparc, as they were causing more porting problems than the
1051 (minor) performance improvement was worth.
1052
1053 Also, catch up with 1.31's YYSTD.
1054
3db472b9
AD
10552001-12-27 Akim Demaille <akim@epita.fr>
1056
1057 * src/output.c (output_gram): Rely on nritems, not the
1058 0-sentinel. See below.
1059 Use -1 as separator, not 0.
1060 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1061 Rely on -1 as separator in yyrhs, instead of 0.
1062 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1063 twice `Now at end of input', therefore there are two lines less to
1064 expect.
1065
b365aa05
AD
10662001-12-27 Akim Demaille <akim@epita.fr>
1067
1068 * tests/regression.at (Unresolved SR Conflicts):
1069 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1070 below.
1071
30171f79
AD
10722001-12-27 Akim Demaille <akim@epita.fr>
1073
1074 * src/LR0.c (new_state): Recognize the final state by the fact it
1075 is reached by eoftoken.
1076 (insert_start_shifting_state, insert_eof_shifting_state)
1077 (insert_accepting_state, augment_automaton): Remove, since now
1078 these states are automatically computed from the initial state.
1079 (generate_states): Adjust.
1080 * src/print.c: When reporting a rule number to the user, substract
1081 1, so that the axiom rule is rule 0, and the first user rule is 1.
1082 * src/reduce.c: Likewise.
1083 * src/print_graph.c (print_core): For the time being, just as for
1084 the report, depend upon --trace-flags to dump the full set of
1085 items.
1086 * src/reader.c (readgram): Once the grammar read, insert the rule
1087 0: `$axiom: START-SYMBOL $'.
1088 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1089 number of the states has changed (the final state is no longer
1090 necessarily the last), catch up.
1091
75142d45
AD
10922001-12-27 Akim Demaille <akim@epita.fr>
1093
1094 Try to make the use of the eoftoken valid. Given that its value
1095 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1096 is used instead of > 0 where appropriate, (ii), depend upon nritems
1097 instead of the 0-sentinel.
1098
1099 * src/gram.h, src/gram.c (nritems): New.
1100 Expected to be duplication of nitems, but for the time being...
1101 * src/reader.c (packgram): Assert nritems and nitems are equal.
1102 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1103 * src/closure.c (print_closure, print_fderives): Likewise.
1104 * src/gram.c (ritem_print): Likewise.
1105 * src/print.c (print_core, print_grammar): Likewise.
1106 * src/print_graph.c: Likewise.
1107
b7c49edf
AD
11082001-12-27 Akim Demaille <akim@epita.fr>
1109
1110 * src/main.c (main): If there are complains after grammar
1111 reductions, then output the report anyway if requested, then die.
1112 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1113 * src/reader.c (eoftoken): New.
1114 (parse_token_decl): If the token being defined has value `0', it
1115 is the eoftoken.
1116 (packsymbols): No longer hack `tags' to insert `$' by hand.
1117 Be sure to preserve the value of the eoftoken.
1118 (reader): Make sure eoftoken is defined.
1119 Initialize nsyms to 0: now eoftoken is created just like the others.
1120 * src/print.c (print_grammar): Don't special case the eof token.
1121 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1122 lie anyway, albeit pleasant.
1123 * tests/calc.at: Exercise error messages with eoftoken.
1124 Change the grammar so that empty input is invalid.
1125 Adjust expectations.
1126 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1127
ec2da99f
AD
11282001-12-27 Akim Demaille <akim@epita.fr>
1129
1130 * configure.in: Check the protos of strchr ans strspn.
1131 Replace strchr if needed.
1132 * src/system.h: Provide the protos of strchr, strspn and memchr if
1133 missing.
1134 * lib/strchr.c: New.
1135 * src/reader.c (symbols_save): Use strchr.
1136
8adfa272
AD
11372001-12-27 Akim Demaille <akim@epita.fr>
1138
1139 * src/print.c, src/print_graph.c (escape): New.
1140 Use it to quote the TAGS outputs.
1141 * src/print_graph.c (print_state): Now errors are in red, and
1142 reductions in green.
1143 Prefer high to wide: output the state number on a line of its own.
1144
80dac38c
AD
11452001-12-27 Akim Demaille <akim@epita.fr>
1146
1147 * src/state.h, src/state.c (reductions_new): New.
1148 * src/LR0.c (set_state_table): Let all the states have a
1149 `reductions', even if reduced to 0.
1150 (save_reductions): Adjust.
1151 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1152 * src/print.c (print_reductions, print_actions): Adjust.
1153 * src/output.c (action_row): Adjust.
1154
2cec70b9
AD
11552001-12-27 Akim Demaille <akim@epita.fr>
1156
1157 * src/state.h, src/state.c (errs_new, errs_dup): New.
1158 * src/LR0.c (set_state_table): Let all the states have an errs,
1159 even if reduced to 0.
1160 * src/print.c (print_errs, print_reductions): Adjust.
1161 * src/output.c (output_actions, action_row): Adjust.
1162 * src/conflicts.c (resolve_sr_conflict): Adjust.
1163
13ca549a
AD
11642001-12-27 Akim Demaille <akim@epita.fr>
1165
1166 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1167
5092aba5
AD
11682001-12-27 Akim Demaille <akim@epita.fr>
1169
1170 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1171 * src/print.c: here.
1172 (lookaheadset, shiftset): New, used as additional storage by
1173 print_reductions.
1174 (print_results): Adjust.
1175 (print_shifts, print_gotos, print_errs): New, extracted from...
1176 (print_actions): here.
1177 * src/print_graph.c (print_actions): Remove dead code.
1178
11e2beca
AD
11792001-12-27 Akim Demaille <akim@epita.fr>
1180
1181 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1182 `$n' and `@n'.
1183
dac3c910
AD
11842001-12-27 Akim Demaille <akim@epita.fr>
1185
1186 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1187 (build_relations): Adjust.
1188
d0b0fefa
AD
11892001-12-27 Akim Demaille <akim@epita.fr>
1190
1191 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1192 duplication.
1193
adc8c848
AD
11942001-12-27 Akim Demaille <akim@epita.fr>
1195
1196 * src/reader.c (packgram): Catch nitems overflows.
1197
14d293ac
AD
11982001-12-27 Akim Demaille <akim@epita.fr>
1199
1200 * src/files.c, src/files.h (guard_obstack): Remove.
1201 * src/output.c (output): Adjust.
1202 * src/reader.c (parse_braces): New, factoring...
1203 (copy_action, copy_guard): these two which are renamed as...
1204 (parse_action, parse_guard): these.
1205 As a voluntary consequence, using braces around guards is now
1206 mandatory.
1207
f499b062
AD
12082001-12-27 Akim Demaille <akim@epita.fr>
1209
1210 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1211 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1212 members.
1213 (symbol_list_new): Adjust.
1214 (copy_action): action_line is the first line, not the last.
1215 (copy_guard): Just as for actions, store the `action' only, not
1216 the switch/case/break flesh.
1217 Don't parse the user action that might follow the guard, let...
1218 (readgram): do it, i.e., now, there can be an action after a
1219 guard.
1220 In other words the guard is just explicitly optional.
1221 (packgram): Adjust.
1222 * src/output.c (guards_output): New.
1223 (output_parser): Call it when needed.
1224 (output): Also free the guard and attrs obstacks.
1225 * src/files.c, src/files.h (obstack_save): Remove.
1226 (output_files): Remove.
1227 As a result, if one needs the former `.act' file, using an
1228 appropriate skeleton which requires actions and guards is now
1229 required.
1230 * src/main.c (main): Adjust.
1231 * tests/semantic.at: New.
1232 * tests/regression.at: Use `input.y' as input file name.
1233 Avoid 8+3 problems by requiring input.c when the test needs the
1234 parser.
1235
d945f5cd
AD
12362001-12-27 Akim Demaille <akim@epita.fr>
1237
1238 * src/reader.c (symbol_list_new): Be sure to initialize all the
1239 fields.
1240
d200e455
AD
12412001-12-27 Akim Demaille <akim@epita.fr>
1242
1243 All the hacks using a final pseudo state are now useless.
1244
1245 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1246 * src/lalr.c (nLA): New.
1247 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1248 instead of lookaheadsp from the pseudo state (nstate + 1).
1249
f9507c28
AD
12502001-12-27 Akim Demaille <akim@epita.fr>
1251
1252 * src/output.c (action_row, token_actions): Use a state_t instead
1253 of a integer, and nlookaheads instead of the following state's
1254 lookaheadsp.
1255
065fbd27
AD
12562001-12-27 Akim Demaille <akim@epita.fr>
1257
1258 * src/conflicts.c (log_resolution, flush_shift)
1259 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1260 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1261 (conflicts_print, print_reductions): Use a state_t instead of an
1262 integer when referring to a state.
1263 As much as possible, depend upon nlookaheads, instead of the
1264 `lookaheadsp' member of the following state (since lookaheads of
1265 successive states are successive, the difference between state n + 1
1266 and n served as the number of lookaheads for state n).
1267 * src/lalr.c (add_lookback_edge): Likewise.
1268 * src/print.c (print_core, print_actions, print_state)
1269 (print_results): Likewise.
1270 * src/print_graph.c (print_core, print_actions, print_state)
1271 (print_graph): Likewise.
1272 * src/conflicts.h: Adjust.
1273
1b177bd7
AD
12742001-12-27 Akim Demaille <akim@epita.fr>
1275
1276 * src/bison.hairy: Formatting/comment changes.
1277 ANSIfy.
1278 Remove `register' indications.
1279 Add plenty of `static'.
1280
7742ddeb
AD
12812001-12-27 Akim Demaille <akim@epita.fr>
1282
1283 * src/output.c (prepare): Drop the muscle `ntbase' which
1284 duplicates ntokens.
1285 * src/bison.simple: Formatting/comment changes.
1286 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1287 is an undocumented synonym.
1288
1fa14068
AD
12892001-12-22 Akim Demaille <akim@epita.fr>
1290
1291 * src/output.c (output_table_data): Change the prototype to use
1292 `int' for array ranges: some invocations do pass an int, not a
1293 short.
1294 Reported by Wayne Green.
1295
b9752825
AD
12962001-12-22 Akim Demaille <akim@epita.fr>
1297
1298 Some actions of web2c.y are improperly triggered.
1299 Reported by Mike Castle.
1300
1301 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1302 * tests/regression.at (Web2c): Rename as...
1303 (Web2c Report): this.
1304 (Web2c Actions): New.
1305
776209d6
AD
13062001-12-22 Akim Demaille <akim@epita.fr>
1307
1308 Reductions in web2c.y are improperly reported.
1309 Reported by Mike Castle.
1310
1311 * src/conflicts.c (print_reductions): Fix.
1312 * tests/regression.at (Web2c): New.
1313
275fc3ad
AD
13142001-12-18 Akim Demaille <akim@epita.fr>
1315
1316 Some host fail on `assert (!"foo")', which expands to
1317 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1318 Reported by Nelson Beebee.
1319
1320 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1321 `#define it_succeeded 0' and `assert (it_succeeded)'.
1322
897668ee
MA
13232001-12-17 Marc Autret <autret_m@epita.fr>
1324
1325 * src/bison.simple: Don't hard code the skeleton line and filename.
1326 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1327 New line counter 'skeleton_line' (skeleton-line muscle).
1328
ab3399e0
PE
13292001-12-17 Paul Eggert <eggert@twinsun.com>
1330
1331 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1332 YYDEBUG must be defined to a nonzero value.
1333
1334 * src/bison.simple (yytname): Do not assume that the user defines
1335 YYDEBUG to a properly parenthesized expression.
1336
3877f72b
AD
13372001-12-17 Akim Demaille <akim@epita.fr>
1338
1339 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1340 nlookaheads is a new member.
1341 Adjust all users.
1342 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1343 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1344 state.
776209d6 1345
331dbc1b
AD
13462001-12-17 Akim Demaille <akim@epita.fr>
1347
1348 * src/files.h, src/files.c (open_files, close_files): Remove.
1349 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1350 let...
1351 * src/reader.c (reader): Do it.
776209d6 1352
be750e4c
AD
13532001-12-17 Akim Demaille <akim@epita.fr>
1354
1355 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1356
709ae8c6
AD
13572001-12-17 Akim Demaille <akim@epita.fr>
1358
1359 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1360 (flush_reduce): New.
1361 (resolve_sr_conflict): Adjust.
776209d6 1362
f87685c3
AD
13632001-12-17 Akim Demaille <akim@epita.fr>
1364
1365 * src/output.c (output_obstack): Be static and rename as...
1366 (format_obstack): this, to avoid any confusion with files.c's
1367 output_obstack.
1368 * src/reader.h (muscle_obstack): Move to...
1369 * src/output.h: here, since it's defined in output.c.
1370
837491d8
AD
13712001-12-17 Akim Demaille <akim@epita.fr>
1372
1373 * src/output.c (action_row, save_column, default_goto)
1374 (sort_actions, matching_state, pack_vector): Better variable
1375 locality.
1376
796d61fb
AD
13772001-12-17 Akim Demaille <akim@epita.fr>
1378
1379 * src/output.c: Various formatting changes.
776209d6 1380
64d15509
AD
13812001-12-17 Akim Demaille <akim@epita.fr>
1382
1383 * src/files.c (output_files): Free the output_obstack.
1384 * src/main.c (main): Call print and print_graph conditionally.
1385 * src/print.c (print): Work unconditionally.
1386 * src/print_graph.c (print_graph): Work unconditionally.
1387 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1388
fbc8ecb7
MA
13892001-12-16 Marc Autret <autret_m@epita.fr>
1390
1391 * src/output.c (actions_output): Fix. When we use %no-lines,
1392 there is one less line per action.
1393
f0440388
MA
13942001-12-16 Marc Autret <autret_m@epita.fr>
1395
1396 * src/bison.simple: Remove a useless #line directive.
1397 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1398 * src/output.c (get_lines_number): New.
776209d6 1399 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1400 output muscles.
1401 Fix line numbering.
1402 (actions_output): Computes the number of lines taken by actions.
1403 (output_master_parser): Insert new skeleton which is the name of
1404 the output parser file name.
1405
a79986b8
MA
14062001-12-15 Marc Autret <autret_m@epita.fr>
1407
1408 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1409
4ec8e00f
MA
14102001-12-15 Marc Autret <autret_m@epita.fr>
1411
1412 * src/output.c (output_gram): Keep track of the hairy one.
1413
1a4648ff
AD
14142001-12-15 Akim Demaille <akim@epita.fr>
1415
1416 Make `make distcheck' work.
1417
1418 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1419 system.h which uses libgettext.h.
1420
9c2c67e6
AD
14212001-12-15 Akim Demaille <akim@epita.fr>
1422
1423 * src/nullable.c (set_nullable): Useless rules must be skipped,
1424 otherwise, since we range over their symbols, we might look at a
1425 nonterminal which no longer ``exists'', i.e., it is not counted in
1426 `nvars', hence we overflow our arrays.
1427
93ede233
AD
14282001-12-15 Akim Demaille <akim@epita.fr>
1429
1430 The header can also be produced directly, without any obstack!
1431 Yahoo!
1432
1433 * src/files.c, src/files.h (defines_obstack): Remove.
1434 (compute_header_macro): Global.
1435 (defines_obstack_save): Remove.
1436 * src/reader.c (parse_union_decl): No longer output to
1437 defines_obstack: its content can be found in the `stype' muscle
1438 anyway.
1439 (output_token_translations): Merge into...
1440 (symbols_output): this.
1441 Rename as...
1442 (symbols_save): this.
1443 (reader): Adjust.
1444 * src/output.c (header_output): New.
1445 (output): Call it.
1446
2666f928
AD
14472001-12-15 Akim Demaille <akim@epita.fr>
1448
1449 * src/reader.c (parse_union_decl): Instead of handling two obstack
1450 simultaneously, use one to define the `stype' muscle, and use the
1451 value of the latter to fill defines_obstack.
1452 (copy_comment): Remove.
1453 (copy_comment2): Work for a single obstack.
1454 Rename as...
1455 (copy_comment): this.
1456
428046f8
AD
14572001-12-15 Akim Demaille <akim@epita.fr>
1458
1459 * src/lex.c, src/lex.h (xgetc): No longer static.
1460 * src/reader.c (parse_union_decl): Revamp.
1461
ea52d706
AD
14622001-12-15 Akim Demaille <akim@epita.fr>
1463
1464 Still making progress in separating Bison into (i) input, (ii)
1465 process, (iii) output: now we can directly output the parser file
1466 without using table_obstack at all.
1467
1468 * src/files.c, src/files.h (table_obstack): Bye bye.
1469 (parser_file_name): New.
1470 * src/files.c (compute_output_file_names): Compute it.
1471 * src/output.c (actions_output, output_parser)
1472 (output_master_parser): To a file instead of an obstack.
1473
3f96f4dc
AD
14742001-12-15 Akim Demaille <akim@epita.fr>
1475
1476 Attach actions to rules, instead of pre-outputting them to
1477 actions_obstack.
1478
1479 * src/gram.h (rule_t): action and action_line are new members.
1480 * src/reader.c (symbol_list): Likewise.
1481 (copy_action): Save the actions within the rule.
1482 (packgram): Save them in rule_table.
1483 * src/output.c (actions_output): New.
1484 (output_parser): Use it on `%%actions'.
1485 (output_rule_data): Don't free rule_table.
1486 (output): Do it.
1487 (prepare): Don't save the `action' muscle.
1488 * src/bison.simple: s/%%action/%%actions/.
1489
51576fb3
AD
14902001-12-15 Akim Demaille <akim@epita.fr>
1491
1492 * src/reader.c (copy_action): When --yacc, don't append a `;'
1493 to the user action: let it fail if lacking.
dee049eb 1494 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1495
2648a72d
AD
14962001-12-14 Akim Demaille <akim@epita.fr>
1497
1498 * src/lex.c (literalchar): Simply return the char you decoded, non
1499 longer mess around with obstacks and int pointers.
1500 Adjust all callers.
1501
92790e5b
AD
15022001-12-14 Akim Demaille <akim@epita.fr>
1503
1504 * src/lex.c (literalchar): Don't escape the special characters,
1505 just decode them, and keep them as char (before, eol was output as
1506 the 2 char string `\n' etc.).
1507 * src/output.c (output_rule_data): Use quotearg to output the
1508 token strings.
1509
927c1557
PE
15102001-12-13 Paul Eggert <eggert@twinsun.com>
1511
1512 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1513 Do not infringe on the global user namespace when using C++.
1514 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1515 All uses of `fprintf' and `stderr' changed.
1516
1517 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1518
ed8e1f68
AD
15192001-12-13 Akim Demaille <akim@epita.fr>
1520
1521 The computation of nullable is broken: it doesn't handle empty
1522 RHS's properly.
1523
1524 * tests/torture.at (GNU AWK Grammar): New.
1525 * tests/sets.at (Nullable): New.
1526 * src/nullable.c (set_nullable): Instead of blindly looping over
1527 `ritems', loop over the rules, and then over their rhs's.
1528
1529 Work around Autotest bugs.
1530
1531 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1532 frame, because Autotest understand lines starting with a `+' as
1533 traces from the shell. Then, they are not processed properly.
1534 Admittedly an Autotest bug, but we don't have time to wait for
1535 Autotest to catch up.
1536 * tests/regression.at (Broken Closure): Adjust to the new table
1537 frames.
1538 Move to...
1539 * tests/sets.at: here.
1540
cb581495
AD
15412001-12-13 Akim Demaille <akim@epita.fr>
1542
1543 * src/closure.c (closure): Use nrules instead of playing tricks
1544 with BITS_PER_WORD.
1545
2e729273
AD
15462001-12-13 Akim Demaille <akim@epita.fr>
1547
1548 * src/print.c (print_actions): Output the handling of `$' as the
1549 traces do: shifting the token EOF. Before EOF was treated as a
1550 nonterminal.
1551 * tests/regression.at: Adjust some tests.
1552 * src/print_graph.c (print_core): Complete the set of items via
1553 closure. The next-to-final and final states are still unsatisfying,
1554 but that's to be addressed elsewhere.
1555 No longer output the rule numbers, but do output the state number.
1556 A single loop for the shifts + gotos is enough, but picked a
1557 distinct color for each.
1558 (print_graph): Initialize and finalize closure.
1559
107f7dfb
AD
15602001-12-13 Akim Demaille <akim@epita.fr>
1561
1562 * src/reader.c (readgram): Remove dead code, an strip useless
1563 braces.
1564 (get_type): Remove, unused.
1565
9b53a24f
AD
15662001-12-12 Akim Demaille <akim@epita.fr>
1567
1568 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1569 on that of lib/error.c.
1570
dbfb6dcd
AD
15712001-12-12 Akim Demaille <akim@epita.fr>
1572
1573 Some hosts don't like `/' in includes.
1574
1575 * src/system.h: Include libgettext.h without qualifying the path.
1576 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1577 $(top_srcdir).
1578
c25fb648
MA
15792001-12-11 Marc Autret <autret_m@epita.fr>
1580
1581 * src/output.c (output_parser): Remove useless muscle.
1582
710ddc4f
MA
15832001-12-11 Marc Autret <autret_m@epita.fr>
1584
1585 * src/bison.simple: Remove #line just before %%epilogue. It
1586 is now handled in ...
1587 * src/reader.c (read_additionnal_code): Add the output of a
1588 #line for the epilogue.
1589
e83d80b8
MA
15902001-12-10 Marc Autret <autret_m@epita.fr>
1591
927c1557 1592 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1593 replace precedent remove.
1594 * src/bison.simple: Remove #line before %%prologue because
1595 %%input-line is wrong at this time.
1596
971d5158
MA
15972001-12-10 Marc Autret <autret_m@epita.fr>
1598
1599 * src/reader.c (symbols_output): Clean up.
927c1557 1600 * src/output.c (output_gram, output): Clean up.
971d5158 1601
5edafffd
AD
16022001-12-10 Akim Demaille <akim@epita.fr>
1603
1604 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1605 * src/LR0.c (set_state_table): here.
1606 * src/lalr.c (lalr): Call it.
1607
0279f8e9
AD
16082001-12-10 Akim Demaille <akim@epita.fr>
1609
1610 * src/state.h (shifts): Remove the `number' member: shifts are
1611 attached to state, hence no longer need to be labelled with a
1612 state number.
1613
190c4f5f
AD
16142001-12-10 Akim Demaille <akim@epita.fr>
1615
1616 Now that states have a complete set of members, the linked list of
1617 shifts is useless: just fill directly the state's shifts member.
1618
1619 * src/state.h (shifts): Remove the `next' member.
1620 * src/LR0.c (first_state, last_state): Remove.
1621 Adjust the callers.
1622 (augment_automaton): Don't look for the shifts that must be added
1623 a shift on EOF: it is those of the state we looked for! But now,
1624 since shifts are attached, it is no longer needed to looking
1625 merely by its id: its number.
1626
2a73b93d
AD
16272001-12-10 Akim Demaille <akim@epita.fr>
1628
1629 * src/LR0.c (augment_automaton): Better variable locality.
1630 Remove an impossible branch: if there is a state corresponding to
1631 the start symbol being shifted, then there is shift for the start
1632 symbol from the initial state.
1633
74392f6a
AD
16342001-12-10 Akim Demaille <akim@epita.fr>
1635
1636 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1637 only when appropriate: when insert_start_shifting_state' is not
1638 invoked.
1639 * tests/regression.at (Rule Line Numbers): Adjust.
1640
37c82725
AD
16412001-12-10 Akim Demaille <akim@epita.fr>
1642
1643 * src/LR0.c (augment_automaton): Now that all states have shifts,
1644 merge the two cases addition shifts to the initial state.
1645
6a164e0c
AD
16462001-12-10 Akim Demaille <akim@epita.fr>
1647
1648 * src/lalr.c (set_state_table): Move to...
1649 * src/LR0.c: here.
1650 * src/lalr.c (lalr): Don't call it...
1651 * src/LR0.c (generate_states): do it.
1652 * src/LR0.h (first_state): Remove, only the table is used.
1653
7215de24
AD
16542001-12-10 Akim Demaille <akim@epita.fr>
1655
1656 * src/LR0.h (first_shift, first_reduction): Remove.
1657 * src/lalr.c: Don't use first_shift: find shifts through the
1658 states.
1659
80e25d4d
AD
16602001-12-10 Akim Demaille <akim@epita.fr>
1661
1662 * src/LR0.c: Attach shifts to states as soon as they are
1663 computed.
1664 * src/lalr.c (set_state_table): Instead of assigning shifts to
1665 state, just assert that the mapping was properly done.
1666
0ab3728b
AD
16672001-12-10 Akim Demaille <akim@epita.fr>
1668
1669 * src/LR0.c (insert_start_shift): Rename as...
1670 (insert_start_shifting_state): this.
1671 (insert_eof_shifting_state, insert_accepting_state): New.
1672 (augment_automaton): Adjust.
1673 Better locality of the variables.
1674 When looking if the start_symbol is shifted from the initial
1675 state, using `while (... symbol != start_symbol ...)' sounds
1676 better than `while (... symbol < start_symbol ...)': If fail
1677 to see how the order between symbols could be relevant!
1678
78af9bbc
AD
16792001-12-10 Akim Demaille <akim@epita.fr>
1680
1681 * src/getargs.h: Don't declare `spec_name_prefix' and
1682 `spec_file_prefix', declared by src/files.h.
1683 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1684 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1685 * src/output.c (prepare): Adjust.
1686 * src/reader.c (symbols_output): Likewise.
1687 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1688
bdef2a41
AD
16892001-12-10 Akim Demaille <akim@epita.fr>
1690
1691 * src/muscle_tab.c (muscle_init): NULL is a better default than
1692 `"0"'.
1693
3735969c
AD
16942001-12-10 Akim Demaille <akim@epita.fr>
1695
1696 * src/reader.c (reader): Calling symbols_output once is enough.
1697
49701457
AD
16982001-12-10 Akim Demaille <akim@epita.fr>
1699
1700 Now that states have a complete set of members, the linked list of
1701 reductions is useless: just fill directly the state's reductions
1702 member.
1703
1704 * src/state.h (struct reductions): Remove member `number' and
1705 `next'.
1706 * src/LR0.c (first_reduction, last_reduction): Remove.
1707 (save_reductions): Don't link the new reductions, store them in
1708 this_state.
1709 * src/lalr.c (set_state_table): No need to attach reductions to
1710 states, it's already done.
1711 * src/output.c (output_actions): No longer free the shifts, then
1712 the reductions, then the states: free all the states and their
1713 members.
1714
0edad749
AD
17152001-12-10 Akim Demaille <akim@epita.fr>
1716
1717 * src/options.c (OPTN, DRTV, BOTH): New.
1718 (option_table): Use them.
1719
0edad749
AD
1720 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1721 the job of system.h.
1722 * src/options.c: Don't include stdio.h and xalloc.h for the same
1723 reasons.
1724
5449dd0f
AD
17252001-12-10 Akim Demaille <akim@epita.fr>
1726
1727 * src/output.c (output, prepare): Make sure the values of the
1728 muscles `action' and `prologue' are 0-terminated.
1729
a870c567
AD
17302001-12-10 Akim Demaille <akim@epita.fr>
1731
1732 Clean up GCC warnings.
1733
1734 * src/reader.c (copy_action): `buf' is not used.
1735 (parse_skel_decl): Be static.
1736 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1737 * src/options.h (create_long_option_table): Have a real prototype.
1738 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1739 (hash_delete_at): Return const void *.
1740 Adjust casts to preserve the const.
1741
80df8768
AD
17422001-12-10 Akim Demaille <akim@epita.fr>
1743
1744 * configure.in: Require 2.52g.
1745 M4 is not needed, but AUTOM4TE is.
1746 * m4/m4.m4: Remove.
1747 * tests/Makefile.am: Adjust.
1748
f693ad14
AD
17492001-12-10 Akim Demaille <akim@epita.fr>
1750
1751 One structure for states is enough, even though theoretically
1752 there are LR(0) states and LALR(1) states.
1753
1754 * src/lalr.h (state_t): Remove.
1755 (state_table): Be state_t **, not state_t *.
1756 * src/state.h (core, CORE_ALLOC): Rename as...
1757 (state_t, STATE_ALLOC): this.
1758 Add the LALR(1) members: shifts, reductions, errs.
1759 * src/LR0.c (state_table): Rename as...
1760 (state_hash): this, to avoid name clashes with the global
1761 `state_table'.
1762 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1763 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1764
74ffbcb6
AD
17652001-12-10 Akim Demaille <akim@epita.fr>
1766
1767 Bison dumps core on bash.y.
1768 Reported by Pascal Bart.
1769
1770 * src/warshall.c (bitmatrix_print): New.
1771 (TC): Use it.
1772 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1773 j must be the outer loop.
1774 * tests/regression.at (Broken Closure): New.
1775
07708e19
AD
17762001-12-05 Akim Demaille <akim@epita.fr>
1777
1778 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1779 its argument.
1780