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