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