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