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