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