]> git.saurik.com Git - bison.git/blame - ChangeLog
Update.
[bison.git] / ChangeLog
CommitLineData
c20cd1fa
AD
12002-05-01 Akim Demaille <akim@epita.fr>
2
3 * src/skeleton.h: Remove.
4
8a9566d4
AD
52002-05-01 Akim Demaille <akim@epita.fr>
6
7 * src/skeleton.h: Fix the #endif.
8 Reported by Magnus Fromreide.
9
8c6d399a
PE
102002-04-26 Paul Eggert <eggert@twinsun.com>
11
12 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
13 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 14 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 15
2b7ed18a
RA
162002-04-25 Robert Anisko <robert@lrde.epita.fr>
17
18 * src/scan-skel.l: Postprocess quadrigraphs.
19
20 * src/reader.c (copy_character): New function, used to output
21 single characters while replacing `[' and `]' with quadrigraphs, to
22 avoid troubles with M4 quotes.
23 (copy_comment): Output characters with copy_character.
24 (read_additionnal_code): Likewise.
25 (copy_string2): Likewise.
26 (copy_definition): Likewise.
27
28 * tests/calc.at: Exercise M4 quoting.
29
34a89c50
AD
302002-04-25 Akim Demaille <akim@epita.fr>
31
32 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
33 between `!' and the command.
34 Reported by Paul Eggert.
35
0dd1580a
RA
362002-04-24 Robert Anisko <robert@lrde.epita.fr>
37
38 * tests/calc.at: Exercise prologue splitting.
39
40 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
41 `b4_post_prologue' instead of `b4_prologue'.
42
43 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
44 muscles.
45 (output): Free pre_prologue_obstack and post_prologue_obstack.
46 * src/files.h, src/files.c (attrs_obstack): Remove.
47 (pre_prologue_obstack, post_prologue_obstack): New.
48 * src/reader.c (copy_definition): Add a parameter to specify the
49 obstack to fill, instead of using attrs_obstack unconditionally.
50 (read_declarations): Pass pre_prologue_obstack to copy_definition if
51 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
52
83c1796f
PE
532002-04-23 Paul Eggert <eggert@twinsun.com>
54
55 * data/bison.simple: Remove unnecessary commentary and white
56 space differences from 1_29-branch.
57 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
58
59 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
60 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
61 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
62 constructors or destructors.
63
64 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
65
1207eeac
AD
662002-04-23 Akim Demaille <akim@epita.fr>
67
68 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
69 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
70 location with columns.
71 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
72 All reported by Paul Eggert.
73
78ab8f67
AD
742002-04-22 Akim Demaille <akim@epita.fr>
75
76 * src/reduce.c (dump_grammar): Move to...
77 * src/gram.h, src/gram.c (grammar_dump): here.
78 Be sure to separate long item numbers.
79 Don't read the members of a rule's prec if its nil.
80
133c20e2
AD
812002-04-22 Akim Demaille <akim@epita.fr>
82
83 * src/output.c (table_size, table_grow): New.
84 (MAXTABLE): Remove, replace uses with table_size.
85 (pack_vector): Instead of dying when the table is too big, grow it.
86
9515e8a7
AD
872002-04-22 Akim Demaille <akim@epita.fr>
88
89 * data/bison.simple (yyr1): Its type is that of a token number.
90 * data/bison.c++ (r1_): Likewise.
91 * tests/regression.at (Web2c Actions): Adjust.
92
23c5a174
AD
932002-04-22 Akim Demaille <akim@epita.fr>
94
95 * src/reader.c (token_translations_init): 256 is now the default
96 value for the error token, i.e., it will be assigned another
97 number if the user assigned 256 to one of her tokens.
98 (reader): Don't force 256 to error.
99 * doc/bison.texinfo (Symbols): Adjust.
100 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
101 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
102 etc. instead of 10, 20, 30 (which was used to `jump' over error
103 (256) and undefined (2)).
104
5fbb0954
AD
1052002-04-22 Akim Demaille <akim@epita.fr>
106
107 Propagate more token_number_t.
108
109 * src/gram.h (token_number_as_item_number)
110 (item_number_as_token_number): New.
111 * src/output.c (GENERATE_OUTPUT_TABLE): New.
112 Use it to create output_item_number_table and
113 output_token_number_table.
114 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
115 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
116 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
117 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
118
4f940944
AD
1192002-04-22 Akim Demaille <akim@epita.fr>
120
121 * src/output.h, src/output.c (get_lines_number): Remove.
122
3ded9a63
AD
1232002-04-19 Akim Demaille <akim@epita.fr>
124
125 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
126 as Lex/Flex'.
127 (Debugging): More details about enabling the debugging features.
128 (Table of Symbols): Describe $$, $n, @$, and @n.
129 Suggested by Tim Josling.
130
e0c471a9
AD
1312002-04-19 Akim Demaille <akim@epita.fr>
132
133 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
134
fecc10cd
AD
1352002-04-10 Akim Demaille <akim@epita.fr>
136
137 * src/system.h: Rely on HAVE_LIMITS_H.
138 Suggested by Paul Eggert.
139
51dec47b
AD
1402002-04-09 Akim Demaille <akim@epita.fr>
141
142 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
143 full stderr, and strip it according to the bison options, instead
144 of composing the error message from different bits.
145 This makes it easier to check for several error messages.
146 Adjust all the invocations.
147 Add an invocation exercising the error token.
148 Add an invocation demonstrating a stupid error message.
149 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
150 Adjust the tests.
151 Error message are for stderr, not stdout.
152
007a50a4
AD
1532002-04-09 Akim Demaille <akim@epita.fr>
154
155 * src/gram.h, src/gram.c (error_token_number): Remove, use
156 errtoken->number.
157 * src/reader.c (reader): Don't specify the user token number (2)
158 for $undefined, as it uselessly prevents using it.
159 * src/gram.h (token_number_t): Move to...
160 * src/symtab.h: here.
161 (state_t.number): Is a token_number_t.
162 * src/print.c, src/reader.c: Use undeftoken->number instead of
163 hard coded 2.
164 (Even though this 2 is not the same as above: the number of the
165 undeftoken remains being 2, it is its user token number which
166 might not be 2).
167 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
168 `user_token_number_max'.
169 Output `undef_token_number'.
170 * data/bison.simple, data/bison.c++: Use them.
171 Be sure to map invalid yylex return values to
172 `undef_token_number'. This saves us from gratuitous SEGV.
173
174 * tests/conflicts.at (Solved SR Conflicts)
175 (Unresolved SR Conflicts): Adjust.
176 * tests/regression.at (Web2c Actions): Adjust.
177
06446ccf
AD
1782002-04-08 Akim Demaille <akim@epita.fr>
179
180 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
181 Adding #line.
182 Remove the duplicate `typedefs'.
183 (RhsNumberType): Fix the declaration and various other typos.
184 Use __ofile__.
185 * data/bison.simple: Use __ofile__.
186 * src/scan-skel.l: Handle __ofile__.
187
62a3e4f0
AD
1882002-04-08 Akim Demaille <akim@epita.fr>
189
190 * src/gram.h (item_number_t): New, the type of item numbers in
191 RITEM. Note that it must be able to code symbol numbers as
192 positive number, and the negation of rule numbers as negative
193 numbers.
194 Adjust all dependencies (pretty many).
195 * src/reduce.c (rule): Remove this `short *' pointer: use
196 item_number_t.
197 * src/system.h (MINSHORT, MAXSHORT): Remove.
198 Include `limits.h'.
199 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
200 (shortcpy): Remove.
201 (MAXTABLE): Move to...
202 * src/output.c (MAXTABLE): here.
203 (prepare_rules): Use output_int_table to output rhs.
204 * data/bison.simple, data/bison.c++: Adjust.
205 * tests/torture.at (Big triangle): Move the limit from 254 to
206 500.
207 * tests/regression.at (Web2c Actions): Ajust.
208
209 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
210 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
211 passes, but produces negative #line number, once fixed, GCC is
212 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
213 C), it passes.
214 * src/state.h (state_h): Code input lines on ints, not shorts.
215
bb88b0fc
AD
2162002-04-08 Akim Demaille <akim@epita.fr>
217
218 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
219 and then the grammar.
220
9a636f47
AD
2212002-04-08 Akim Demaille <akim@epita.fr>
222
223 * src/system.h: No longer using strndup.
224
680e8701
AD
2252002-04-07 Akim Demaille <akim@epita.fr>
226
227 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
228 * src/output.c (output_table_data): Return the longest number.
229 (prepare_tokens): Output `token_number_max').
230 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
231 New.
232 Use them to define yy_token_number_type/TokenNumberType.
233 Use this type for yytranslate.
234 * tests/torture.at (Big triangle): Push the limit from 124 to
235 253.
236 * tests/regression.at (Web2c Actions): Adjust.
237
817e9f41
AD
2382002-04-07 Akim Demaille <akim@epita.fr>
239
240 * tests/torture.at (Big triangle): New.
241 (GNU AWK Grammar, GNU Cim Grammar): Move to...
242 * tests/existing.at: here.
243
5123689b
AD
2442002-04-07 Akim Demaille <akim@epita.fr>
245
246 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
247 nritems.
248 Adjust dependencies.
249
f3849179
AD
2502002-04-07 Akim Demaille <akim@epita.fr>
251
252 * src/reader.c: Normalize increments to prefix form.
253
bd02036a
AD
2542002-04-07 Akim Demaille <akim@epita.fr>
255
256 * src/reader.c, symtab.c: Remove debugging code.
257
db8837cb
AD
2582002-04-07 Akim Demaille <akim@epita.fr>
259
260 Rename all the `bucket's as `symbol_t'.
261
262 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
263 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
264 * src/symtab.c, src/symtab.h (bucket): Rename as...
265 (symbol_t): this.
266 (symbol_list_new, bucket_check_defined, bucket_make_alias)
267 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
268 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
269 (buckets_new, buckets_free, buckets_do): Rename as...
270 (symbol_list_new, symbol_check_defined, symbol_make_alias)
271 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
272 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
273 (symbols_new, symbols_free, symbols_do): these.
274
72a23c97
AD
2752002-04-07 Akim Demaille <akim@epita.fr>
276
277 Use lib/hash for the symbol table.
278
279 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
280 EOF.
281 * src/lex.c (lex): Set the `number' member of new terminals.
282 * src/reader.c (bucket_check_defined, bucket_make_alias)
283 (bucket_check_alias_consistence, bucket_translation): New.
284 (reader, grammar_free, readgram, token_translations_init)
285 (packsymbols): Adjust.
286 (reader): Number the predefined tokens.
287 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
288 for predefined tokens.
289 * src/symtab.h (bucket): Remove all the hash table related
290 members.
291 * src/symtab.c (symtab): Replace by...
292 (bucket_table): this.
293 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
294 (buckets_new, buckets_do): New.
295
280a38c3
AD
2962002-04-07 Akim Demaille <akim@epita.fr>
297
298 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
299 (start_symbol, max_user_token_number, semantic_parser)
300 (error_token_number): Initialize.
301 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
302 Initialize.
303 (reader): Don't.
304 (errtoken, eoftoken, undeftoken, axiom): Extern.
305
03b31c0c
AD
3062002-04-07 Akim Demaille <akim@epita.fr>
307
308 * src/gram.h (rule_s): prec and precsym are now pointers
309 to the bucket giving the priority/associativity.
310 Member `associativity' removed: useless.
311 * src/reduce.c, src/conflicts.c: Adjust.
312
8b3df748
AD
3132002-04-07 Akim Demaille <akim@epita.fr>
314
315 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
316 Properly escape the symbols' TAG when outputting them.
317
e601aa1d
AD
3182002-04-07 Akim Demaille <akim@epita.fr>
319
320 * src/lalr.h (LA): Is a bitsetv, not bitset*.
321
b0299a2e
AD
3222002-04-07 Akim Demaille <akim@epita.fr>
323
324 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
325 (LArule): this, which is an array to rule_t*.
326 * src/print.c, src/conflicts.c: Adjust.
327
d7e1f00c
AD
3282002-04-07 Akim Demaille <akim@epita.fr>
329
330 * src/gram.h (rule_t): Rename `number' as `user_number'.
331 `number' is a new member.
332 Adjust dependencies.
333 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
334
cc9305dd
AD
3352002-04-07 Akim Demaille <akim@epita.fr>
336
337 As a result of the previous patch, it is no longer needed
338 to reorder ritem itself.
339
340 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
341
b0940840
AD
3422002-04-07 Akim Demaille <akim@epita.fr>
343
344 Be sure never to walk through RITEMS, but use only data related to
345 the rules themselves. RITEMS should be banished.
346
347 * src/output.c (output_token_translations): Rename as...
348 (prepare_tokens): this.
349 In addition to `translate', prepare the muscles `tname' and
350 `toknum', which were handled by...
351 (output_rule_data): this.
352 Remove, and move the remainder of its outputs into...
353 (prepare_rules): this new routines, which also merges content from
354 (output_gram): this.
355 (prepare_rules): Be sure never to walk through RITEMS.
356 (output_stos): Rename as...
357 (prepare_stos): this.
358 (output): Always invoke prepare_states, after all, just don't use it
359 in the output if you don't need it.
360
643a5994
AD
3612002-04-07 Akim Demaille <akim@epita.fr>
362
363 * src/LR0.c (new_state): Display `nstates' as the name of the
364 newly created state.
365 Adjust to initialize first_state and last_state if needed.
366 Be sure to distinguish the initial from the final state.
367 (new_states): Create the itemset of the initial state, and use
368 new_state.
369 * src/closure.c (closure): Now that the initial state has its
370 items properly set, there is no need for a special case when
371 creating `ruleset'.
372
373 As a result, now the rule 0, reducing to $axiom, is visible in the
374 outputs. Adjust the test suite.
375
376 * tests/conflicts.at (Solved SR Conflicts)
377 (Unresolved SR Conflicts): Adjust.
378 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
379 * tests/conflicts.at (S/R in initial): New.
380
b4c4ccc2
AD
3812002-04-07 Akim Demaille <akim@epita.fr>
382
383 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
384 the RHS of the rules.
385 * src/output.c (output_gram): Likewise.
386
bba97eb2
AD
3872002-04-07 Akim Demaille <akim@epita.fr>
388
389 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
390 bucket.
391 Adjust all dependencies.
392 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
393 `number' of the buckets too.
394 * src/gram.h: Include `symtab.h'.
395 (associativity): Move to...
396 * src/symtab.h: here.
397 No longer include `gram.h'.
398
c3b407f4
AD
3992002-04-07 Akim Demaille <akim@epita.fr>
400
401 * src/gram.h, src/gram.c (rules_rhs_length): New.
402 (ritem_longest_rhs): Use it.
403 * src/gram.h (rule_t): `number' is a new member.
404 * src/reader.c (packgram): Set it.
405 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
406 the end of `rules', and count them out of `nrules'.
407 (reduce_output, dump_grammar): Adjust.
408 * src/print.c (print_grammar): It is no longer needed to check for
409 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
410 * tests/reduce.at (Reduced Automaton): New test.
411
11652ab3
AD
4122002-04-07 Akim Demaille <akim@epita.fr>
413
414 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
415 lacking `+ 1' to nrules, Bison reported as useless a token if it
416 was used solely to set the precedence of the last rule...
417
26b23c1a
AD
4182002-04-07 Akim Demaille <akim@epita.fr>
419
420 * data/bison.c++, data/bison.simple: Don't output the current file
421 name in #line, to avoid useless diffs between two identical
422 outputs under different names.
423
18bcecb0
AD
4242002-04-07 Akim Demaille <akim@epita.fr>
425
426 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
427 Normalize loops to using `< nrules + 1', not `<= nrules'.
428
fa770c86
AD
4292002-04-07 Akim Demaille <akim@epita.fr>
430
431 * TODO: Update.
432
d9b739c3
AD
4332002-04-07 Akim Demaille <akim@epita.fr>
434
435 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
436 bucket.value as bucket.number.
437
99013900
AD
4382002-04-07 Akim Demaille <akim@epita.fr>
439
440 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
441 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
442 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
443 RHS, instead of being an index in RITEMS.
444
e966383b
PE
4452002-04-04 Paul Eggert <eggert@twinsun.com>
446
447 * doc/bison.texinfo: Update copyright date.
448 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
449 (Symbols): Warn about running Bison in one character set,
450 but compiling and/or running in an incompatible one.
451 Warn about character code 256, too.
452
4532002-04-03 Paul Eggert <eggert@twinsun.com>
454
455 * src/bison.data (YYSTACK_ALLOC): Depend on whether
456 YYERROR_VERBOSE is nonzero, not whether it is defined.
457
458 Merge changes from bison-1_29-branch.
c307773e 459
8d6c48b9
PE
4602002-03-20 Paul Eggert <eggert@twinsun.com>
461
462 Merge fixes from Debian bison_1.34-1.diff.
463
464 * configure.in (AC_PREREQ): 2.53.
465
e53c6322
AD
4662002-03-20 Akim Demaille <akim@epita.fr>
467
468 * src/conflicts.c (log_resolution): Argument `resolution' is const.
469
9ffbeca7
PE
4702002-03-19 Paul Eggert <eggert@twinsun.com>
471
21db0b2a
PE
472 * src/bison.simple (YYCOPY): New macro.
473 (YYSTACK_RELOCATE): Use it.
474 Remove Type arg; no longer needed. All callers changed.
475 (yymemcpy): Remove; no longer needed.
476
9ffbeca7
PE
477 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
478 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
479
642cb8f8
AD
4802002-03-19 Akim Demaille <akim@epita.fr>
481
482 Test and fix the #line outputs.
483
484 * tests/atlocal.at (GCC): New.
485 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
486 (Prologue synch line, ,%union synch line, Postprologue synch line)
487 (Action synch line, Epilogue synch line): New tests.
488 * src/reader.c (parse_union_decl): Define the muscle stype_line.
489 * data/bison.simple, data/bison.c++: Use it.
490
3c31a486
AD
4912002-03-19 Akim Demaille <akim@epita.fr>
492
493 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
494 (Solved SR Conflicts, %expect not enough, %expect right)
495 (%expect too much): Move to...
496 * tests/conflicts.at: this new file.
497
0d8bed56
AD
4982002-03-19 Akim Demaille <akim@epita.fr>
499
500 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
501 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
502 that we can move to enums for instance.
503 * src/output.c (token_definitions_output): Output a list of
504 `token-name, token-number' instead of the #define.
505 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
506
9208d17f
AD
5072002-03-14 Akim Demaille <akim@epita.fr>
508
509 Use Gettext 0.11.1.
510
af27eacb
RA
5112002-03-09 Robert Anisko <robert@lrde.epita.fr>
512
513 * data/bison.c++: Make the user able to add members to the generated
514 parser by subclassing.
515
9101a310
RA
5162002-03-05 Robert Anisko <robert@lrde.epita.fr>
517
518 * src/reader.c (read_additionnal_code): `c' should be an integer, not
519 a character.
520 Reported by Nicolas Tisserand and Nicolas Burrus.
521
fff9bf0b
RA
5222002-03-04 Robert Anisko <robert@lrde.epita.fr>
523
524 * src/reader.c: Warn about lacking semi-colons, do not complain.
525
64dba31e
RA
5262002-03-04 Robert Anisko <robert@lrde.epita.fr>
527
528 * data/bison.c++: Remove a debug line.
529
374f5a14
RA
5302002-03-04 Robert Anisko <robert@lrde.epita.fr>
531
532 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
533 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
534 provide a default implementation.
535
bfcf1f3a
AD
5362002-03-04 Akim Demaille <akim@epita.fr>
537
538 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
539 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
540 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
541 * tests/semantic.at (Parsing Guards): Similarly.
542 * src/reader.at (readgram): Complain if the last rule is not ended
543 with a semi-colon.
544
65ccf9fc
AD
5452002-03-04 Akim Demaille <akim@epita.fr>
546
547 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
548 * src/closure.c: here.
549 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
550 RTC.
551 * src/warshall.h, src/warshall.c: Remove.
552 * tests/sets.at (Broken Closure): Adjust.
553
d0039cbc
AD
5542002-03-04 Akim Demaille <akim@epita.fr>
555
556 * src/output.c (output_skeleton): tempdir is const.
557 bytes_read is unused.
558
345cea78
AD
5592002-03-04 Akim Demaille <akim@epita.fr>
560
561 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
562 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
563 Update.
564 From Michael Hayes.
565
564801f7
AD
5662002-03-04 Akim Demaille <akim@epita.fr>
567
568 * src/closure.c (closure): `r' is unused.
569
e5352bc7
AD
5702002-03-04 Akim Demaille <akim@epita.fr>
571
572 * tests/sets.at (Broken Closure): Add the ending `;'.
573 * src/reader.at (readgram): Complain if a rule is not ended with a
574 semi-colon.
575
914feea9
AD
5762002-03-04 Akim Demaille <akim@epita.fr>
577
578 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
579 (count_sr_conflicts): Use bitset_count.
580 * src/reduce.c (inaccessable_symbols): Ditto.
581 (bits_size): Remove.
582 * src/warshall.h, src/warshall.c: Convert to bitsetv.
583
f0250de6
AD
5842002-03-04 Akim Demaille <akim@epita.fr>
585
586 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
587 * src/reduce.c: Remove the `bitset_zero's following the
588 `bitset_create's, as now it is performed by the latter.
589
ef017502
AD
5902002-03-04 Akim Demaille <akim@epita.fr>
591
592 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
593 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
594 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
595 latest sources from Michael.
596
76514394
AD
5972002-03-04 Akim Demaille <akim@epita.fr>
598
599 * src/output.c (output): Don't free the grammar.
600 * src/reader.c (grammar_free): New.
601 * src/main.c (main): Call it and don't free symtab here.
602
55024580
AD
6032002-03-04 Akim Demaille <akim@epita.fr>
604
605 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
606 before returning.
607 Reported by Benoit Perrot.
608
f9abaa2c
AD
6092002-03-04 Akim Demaille <akim@epita.fr>
610
611 Use bitset operations when possible, not loops over bits.
612
613 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
614 bitset_or.
615 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
616 * src/reduce.c (useless_nonterminals): Formatting changes.
617 * src/warshall.c (TC): Use bitset_or.
618
0e721e75
AD
6192002-03-04 Akim Demaille <akim@epita.fr>
620
621 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
622 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
623 Ditto.
624
0fb1ffb1
AD
6252002-03-04 Akim Demaille <akim@epita.fr>
626
627 * src/lalr.c (F): Now a bitset*.
628 Adjust all dependencies.
629
b86796bf
AD
6302002-03-04 Akim Demaille <akim@epita.fr>
631
632 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
633 Adjust all dependencies.
634
602bbf31
AD
6352002-03-04 Akim Demaille <akim@epita.fr>
636
637 * src/L0.c, src/LR0.h (nstates): Be size_t.
638 Adjust comparisons (signed vs unsigned).
639 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
640 bitset*.
641 Adjust all dependencies.
642
d8a0245c
AD
6432002-03-04 Akim Demaille <akim@epita.fr>
644
645 * src/closure.c (firsts): Now, also a bitset.
646 Adjust all dependencies.
647 (varsetsize): Remove, now unused.
648 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
649
34ba9743
AD
6502002-03-04 Akim Demaille <akim@epita.fr>
651
652 * src/print.c: Convert to use bitset.h, not hand coded iterations
653 over ints.
654
ed86e78c
AD
6552002-03-04 Akim Demaille <akim@epita.fr>
656
657 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
658
dfdb1797
AD
6592002-03-04 Akim Demaille <akim@epita.fr>
660
661 * src/closure.c (ruleset): Be a bitset.
662 (rulesetsize): Remove.
663
7086e707
AD
6642002-03-04 Akim Demaille <akim@epita.fr>
665
666 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
667 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
668 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
669 * src/closure.c (fderives): Be an array of bitsets.
670
98254360
RA
6712002-02-28 Robert Anisko <robert@lrde.epita.fr>
672
673 * data/bison.c++: Merge the two generated headers. Insert a copyright
674 notice in each output file.
675
a75c057f
AD
6762002-02-28 Akim Demaille <akim@epita.fr>
677
678 * data/bison.c++: Copy the prologue of bison.simple to fetch
679 useful M4 definitions, such as b4_header_guard.
680
06b00abc
AD
6812002-02-25 Akim Demaille <akim@epita.fr>
682
683 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
684 translator friendly scheme for the bgr
685 copyright notice.
06b00abc 686
70e7d534
AD
6872002-02-25 Akim Demaille <akim@epita.fr>
688
689 * src/output.c (header_output): Remove, now handled completely via
690 M4.
691
abe017f6
AD
6922002-02-25 Akim Demaille <akim@epita.fr>
693
694 * m4/m4.m4: New, from CVS Autoconf.
695 * configure.in: Invoke it.
696 * src/output.c (output_skeleton): Use its result instead of the
697 hard coded name.
698
381fb12e
AD
6992002-02-25 Akim Demaille <akim@epita.fr>
700
701 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
702 Fileutils 4.1.5.
703 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
704 * src/output.c (output_skeleton): Use mkstemp to create a real
705 temporary file.
706 Move the filling of `skeleton' and its muscle to...
707 (prepare): here.
708 (output): Move the definition of the prologue muscle to...
709 (prepare): here.
710 * src/system.h (DEFAULT_TMPDIR): New.
711
6f38107f
PE
7122002-02-14 Paul Eggert <eggert@twinsun.com>
713
714 Remove the support for C++ namespace cleanliness; it was
715 causing more problems than it was curing, since it didn't work
716 properly on some nonstandard C++ compilers. This can wait
717 for a proper C++ parser.
718
719 * NEWS: Document this.
720 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
721 of C++, as it's treated like C now.
722 * src/bison.simple (YYSTD): Remove.
723 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
724 Treat C++ just like Standard C instead of trying to support
725 namespace cleanliness.
726
80cce3da
AD
7272002-02-14 Akim Demaille <akim@epita.fr>
728
729 * tests/regression.at (else): Adjust to Andreas' change.
730
842e8679
AD
7312002-02-14 Akim Demaille <akim@epita.fr>
732
733 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
734
4bda3f10
AD
7352002-02-13 Andreas Schwab <schwab@suse.de>
736
737 * src/output.c (output_rule_data): Don't output NULL, it might
738 not be defined yet.
739
4162fa07 7402002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 741
4162fa07
RA
742 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
743 (Copyright notice): Update.
b418ecd8 744
bd16a5dc
AD
7452002-02-11 Akim Demaille <akim@epita.fr>
746
747 * tests/regression.at (%nonassoc and eof): Don't include
748 nonportable headers.
749
8d69a1a3
RA
7502002-02-08 Robert Anisko <robert@lrde.epita.fr>
751
752 * data/bison.c++: Correct error recovery. Make the user able to
753 initialize the starting location.
754
9b2d0677
AD
7552002-02-07 Akim Demaille <akim@epita.fr>
756
757 * tests/input.at: New.
758
69e2658b
RA
7592002-02-07 Robert Anisko <robert@lrde.epita.fr>
760
761 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 762 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
763 directives around tables only needed for debugging.
764
4aacc3a7
RA
7652002-02-07 Robert Anisko <robert@lrde.epita.fr>
766
767 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
768 C++ parsers.
769 (yy::b4_name::parse): Use print_.
770
762a801e
RA
7712002-02-07 Robert Anisko <robert@lrde.epita.fr>
772
773 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
774
4bb2bc3f
RA
7752002-02-07 Robert Anisko <robert@lrde.epita.fr>
776
777 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
778 C++ parsers.
779 (yy::b4_name::parse): Build verbose error messages, and use error_.
780
6b45a3ca
RA
7812002-02-06 Robert Anisko <robert@lrde.epita.fr>
782
783 * data/bison.c++: Fix m4 quoting in comments.
784
50997c6e
RA
7852002-02-06 Robert Anisko <robert@lrde.epita.fr>
786
787 * data/bison.c++: Adjust the parser code. Fix some muscles that were
788 not expanded by m4.
789
3f3eed27
AD
7902002-02-05 Akim Demaille <akim@epita.fr>
791
792 * data/bison.c++: Adjust to the M4 back end.
793 More is certainly needed.
794
be2a1a68
AD
7952002-02-05 Akim Demaille <akim@epita.fr>
796
797 Give a try to M4 as a back end.
798
799 * lib/readpipe.c: New, from wdiff.
800 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
801 BISON_HAIRY.
802 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
803 specific values. Now it is m4 that performs the lookup.
804 * src/parse-skel.y: Remove.
805 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
806 * src/output.c (actions_output, guards_output)
807 (token_definitions_output): No longer keeps track of the output
808 line number, hence remove the second argument.
809 (guards_output): Check against the guard member of a rule, not the
810 action member.
811 Adjust callers.
812 (output_skeleton): Don't look for the skeleton location, let m4 do
813 that.
814 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
815 file will be used.
816 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
817 (prepare): Given that for the time being changesyntax is not
818 usable in M4, rename the muscles using `-' to `_'.
819 Define `defines_flag', `output_parser_name' and `output_header_name'.
820 * src/output.h (actions_output, guards_output)
821 (token_definitions_output): Adjust prototypes.
822 * src/scan-skel.l: Instead of scanning the skeletons, it now
823 processes the output of m4: `__oline__' and `#output'.
824 * data/bison.simple: Adjust to be used by M4(sugar).
825 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
826 to date.
827 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
828 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
829 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
830 shamelessly stolen from CVS Autoconf.
831
beda758b
AD
8322002-02-05 Akim Demaille <akim@epita.fr>
833
834 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
835 * configure.in: Check for the declarations of free and malloc.
836 * src/muscle_tab.c: Adjust.
837
5ece6d43
AD
8382002-02-05 Akim Demaille <akim@epita.fr>
839
840 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
841 which have no values.
842
5bb18f9a
AD
8432002-02-05 Akim Demaille <akim@epita.fr>
844
845 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
846 * data/: here.
847
894dd62e
PE
8482002-01-29 Paul Eggert <eggert@twinsun.com>
849
850 * src/bison.simple (YYSIZE_T): Do not define merely because
851 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
852 On some platforms, <alloca.h> does not declare YYSTD (size_t).
853
82841af7
AD
8542002-01-27 Akim Demaille <akim@epita.fr>
855
856 Fix `%nonassoc and eof'.
857
858 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
859 which were not properly copied! Replace
860 memcpy (res->errs, src->errs, src->nerrs);
861 with
862 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
863 !!!
864 * tests/regression.at (%nonassoc and eof): Adjust to newest
865 Autotest: `.' is not in the PATH.
866
318b76e9
AD
8672002-01-27 Akim Demaille <akim@epita.fr>
868
869 * tests/sets.at (AT_EXTRACT_SETS): New.
870 (Nullable): Use it.
871 (Firsts): New.
872
30d2f3d5
AD
8732002-01-26 Akim Demaille <akim@epita.fr>
874
875 * tests/actions.at, tests/calc.at, tests/headers.at,
876 * tests/torture.at: Adjust to the newest Autotest which no longer
877 forces `.' in the PATH.
878
30f8c395
AD
8792002-01-25 Akim Demaille <akim@epita.fr>
880
881 * tests/regression.at (%nonassoc and eof): New.
882 Suggested by Robert Anisko.
883
29ae55f1
AD
8842002-01-24 Akim Demaille <akim@epita.fr>
885
886 Bison dumps core when trying to complain about broken input files.
887 Reported by Cris van Pelt.
888
889 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
890 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
891 into...
892 (Invalid inputs): Strengthen: exercise parse_percent_token.
893
2b548aa6
RA
8942002-01-24 Robert Anisko <robert.anisko@epita.fr>
895
896 * src/Makefile.am: Add bison.c++.
897 * src/bison.c++: New skeleton.
898
bb0146c2
AD
8992002-01-21 Paolo Bonzini <bonzini@gnu.org>
900
901 * po/it.po: New.
902
bec30531
AD
9032002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
904
905 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
906
fc6edc45
MA
9072002-01-20 Marc Autret <marc@gnu.org>
908
909 * src/files.c (compute_output_file_names): Fix
910
5e5d5415
MA
9112002-01-20 Marc Autret <marc@gnu.org>
912
913 * tests/output.at: New test.
914 * src/files.c (compute_base_names): Don't map extensions when
915 the YACC flag is set, use defaults.
916 Reported by Evgeny Stambulchik.
917
44ea3fbd
MA
9182002-01-20 Marc Autret <marc@gnu.org>
919
bb0146c2 920 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
921 compilers as well (i.e. the vendor C compiler).
922 Suggested by Albert Chin-A-Young.
923
338963d1
TVH
9242002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
925
926 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
927 canonical definition.
928 * src/system.h: Use the canonical definition for PARAMS (avoids
929 a conflict with the macro from lib/hash.h).
930
c57b2479
AD
9312002-01-11 Akim Demaille <akim@epita.fr>
932
933 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 934 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 935
b85810ae
AD
9362002-01-09 Akim Demaille <akim@epita.fr>
937
938 * src/files.c, src/files.h (output_infix): New.
939 (tab_extension): Remove.
940 (compute_base_names): Compute the former, drop the latter.
941 * src/output.c (prepare): Insert the muscles `output-infix', and
942 `output-suffix'.
943 * src/parse-skel.y (string, string.1): New.
944 (section.header): Use it.
945 (section.yacc): Remove.
946 (prefix): Remove too.
947 * src/scan-skel.l: Adjust.
948 * src/bison.simple, src/bison.hairy: Adjust.
949
cae60122
AD
9502002-01-09 Akim Demaille <akim@epita.fr>
951
952 * configure.in (WERROR_CFLAGS): Compute it.
953 * src/Makefile.am (CFLAGS): Pass it.
954 * tests/atlocal.in (CFLAGS): Idem.
955 * src/files.c: Fix a few warnings.
956 (get_extension_index): Remove, unused.
957
ae404801
AD
9582002-01-08 Akim Demaille <akim@epita.fr>
959
960 * src/getargs.c (AS_FILE_NAME): New.
961 (getargs): Use it to convert DOSish file names.
962 * src/files.c (base_name): Rename as full_base_name to avoid
963 clashes with `base_name ()'.
964 (filename_split): New.
965 (compute_base_names): N-th rewrite, using filename_split.
966
22312b71
AD
9672002-01-08 Akim Demaille <akim@epita.fr>
968
969 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
970 New, stolen from the Fileutils 4.1.
971 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
972 * configure.in: Check for the presence of memrchr, and of its
973 prototype.
974
a67cef01
TVH
9752002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
976
977 * lib/hash.h (__P): Added definition for this macro.
978 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
979 BUILT_SOURCES, to ensure they are generated first.
980 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
981 %error-verbose to allow bootstrapping with bison 1.30x.
982
2b25d624
AD
9832002-01-06 Akim Demaille <akim@epita.fr>
984
985 * src/reader.c (parse_braces): Don't fetch the next char, the
986 convention is to fetch on entry.
987 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
988 'switch' without a following semicolon.
989 * tests/regression.at (braces parsing): New.
990
3460813b
AD
9912002-01-06 Akim Demaille <akim@epita.fr>
992
993 Bison is dead wrong in its RR conflict reports.
994
995 * tests/torture.at (GNU Cim Grammar): New.
996 * src/conflicts.c (count_rr_conflicts): Fix.
997
73784c64
AD
9982002-01-06 Akim Demaille <akim@epita.fr>
999
1000 Creating package.m4 from configure.ac causes too many problems.
1001
1002 * tests/Makefile.am (package.m4): Create it by hand,
1003 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1004
25d81090
AD
10052002-01-06 Akim Demaille <akim@epita.fr>
1006
1007 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1008 skeleton.h.
1009
a9b8959e
PE
10102002-01-04 Paul Eggert <eggert@twinsun.com>
1011
1012 * doc/bison.texinfo (Debugging):
1013 Remove YYSTDERR; it's no longer defined or used.
1014 Also, s/cstdio.h/cstdio/.
1015
25d81090
AD
10162002-01-03 Akim Demaille <akim@epita.fr>
1017
1018 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1019
1109455c
AD
10202002-01-03 Akim Demaille <akim@epita.fr>
1021
1022 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1023 tracing code to --trace, wait for a better --trace option, with
1024 args.
1025
7ea5e977
AD
10262002-01-03 Akim Demaille <akim@epita.fr>
1027
1028 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1029 The ISO C++ standard is extremely clear about it: stderr is
1030 considered a macro, not a regular symbol (see table 94 `Header
1031 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1032 Therefore std:: does not apply to it. It still does with fprintf.
1033 Also, s/cstdio.h/cstdio/.
1034
fab5b110
AD
10352002-01-03 Akim Demaille <akim@epita.fr>
1036
1037 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1038 for non system headers.
1039
aed7fd9b
AD
10402002-01-02 Akim Demaille <akim@epita.fr>
1041
1042 Equip the skeleton chain with location tracking, runtime trace,
1043 pure parser and scanner.
1044
1045 * src/parse-skel.y: Request a pure parser, locations, and prefix
1046 renaming.
1047 (%union): Having several members with the same type does not help
1048 type mismatches, simplify.
1049 (YYPRINT, yyprint): New.
1050 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1051 (skel_error): this.
1052 Handle locations.
1053 * src/scan-skel.l: Adjust to these changes.
1054 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1055 (LOCATION_PRINT, skel_control_t): New.
1056
24fad99e
AD
10572001-12-30 Akim Demaille <akim@epita.fr>
1058
1059 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1060 replace `gb' with BLANKS.
1061 * src/scan-skel.l: Adjust.
1062
a4b36db4
AD
10632001-12-30 Akim Demaille <akim@epita.fr>
1064
1065 * src/system.h: We don't need nor want bcopy.
1066 Throw away MS-DOS crap: we don't need getpid.
1067 * configure.in: We don't need strndup. It was even causing
1068 problems: because Flex includes the headers *before* us,
1069 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1070 not visible.
1071 * lib/xstrndup.c: New.
1072 * src/scan-skel.l: Use it.
1073 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1074 * src/parse-skel.y: Use %directives instead of #defines.
1075
1239777d
AD
10762001-12-30 Akim Demaille <akim@epita.fr>
1077
1078 * src/skeleton.h: New.
1079 * src/output.c (output_parser, output_master_parser): Remove, dead
1080 code.
1081 * src/output.h (get_lines_number, actions_output, guards_output)
1082 (token_definitions_output): Prototype them.
1083 * src/parse-skel.y: Add the license notice.
1084 Include output.h and skeleton.h.
1085 (process_skeleton): Returns void, and takes a single parameter.
1086 * src/scan-skel.l: Add the license notice.
1087 Include skeleton.h.
1088 Don't use %option yylineno: it seems that then Flex imagines
1089 REJECT has been used, and therefore it won't reallocate its
1090 buffers (which makes no other sense to me than a bug). It results
1091 in warnings for `unused: yy_flex_realloc'.
1092
9b3add5b
RA
10932001-12-30 Robert Anisko <robert.anisko@epita.fr>
1094
1095 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1096 (MUSCLE_INSERT_PREFIX): ...to there.
1097 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1098 (MUSCLE_INSERT_PREFIX): Move from here...
1099
1100 * src/bison.hairy: Add a section directive. Put braces around muscle
1101 names. This parser skeleton is still broken, but Bison should not
1102 choke on a bad muscle 'syntax'.
1103 * src/bison.simple: Add a section directive. Put braces around muscle
1104 names.
1105
1106 * src/files.h (strsuffix, stringappend): Add declarations.
1107 (tab_extension): Add declaration.
1108 (short_base_name): Add declaration.
1109
1110 * src/files.c (strsuffix, stringappend): No longer static. These
1111 functions are used in the skeleton parser.
1112 (tab_extension): New.
1113 (compute_base_names): Use the computations done in this function
fab5b110 1114 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1115 names.
1116 (short_base_name): No longer static.
1117
1118 * src/output.c (output_skeleton): New.
1119 (output): Disable call to output_master_parser, and give a try to
1120 a new skeleton handling system.
1121 (guards_output, actions_output): No longer static.
1122 (token_definitions_output, get_lines_number): No longer static.
1123
1124 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1125
fab5b110 1126 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1127 parse-skel.y.
1128
1129 * src/parse-skel.y: New file.
1130 * src/scan-skel.l: New file.
1131
b5b61c61
AD
11322001-12-29 Akim Demaille <akim@epita.fr>
1133
1134 %name-prefix is broken.
1135
1136 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1137 Adjust all dependencies.
1138 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1139 %name-prefix.
1140
1141 Renaming yylval but not yylloc is not consistent. Now we do.
1142
1143 * src/bison.simple: Prefix yylloc if used.
1144 * doc/bison.texinfo (Decl Summary): Document that.
1145
8c9a50be
AD
11462001-12-29 Akim Demaille <akim@epita.fr>
1147
1148 * doc/bison.texinfo: Promote `%long-directive' over
1149 `%long_directive'.
1150 Remove all references to fixed-output-files, yacc is enough.
1151
d99361e6
AD
11522001-12-29 Akim Demaille <akim@epita.fr>
1153
1154 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1155 user prologue. These are defaults.
1156 * tests/actions.at (Mid-rule actions): Make sure the user can
1157 define YYDEBUG and YYERROR_VERBOSE.
1158
b9cecb91
AD
11592001-12-29 Akim Demaille <akim@epita.fr>
1160
1161 * src/output.c (header_output): Don't forget to export YYLTYPE and
1162 yylloc.
1163 * tests/headers.at (export YYLTYPE): New, make sure it does.
1164 * tests/regression.at (%union and --defines, Invalid CPP headers):
1165 Move to...
1166 * tests/headers.at: here.
1167
aea13e97
AD
11682001-12-29 Akim Demaille <akim@epita.fr>
1169
1170 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1171
931394cb
AD
11722001-12-29 Akim Demaille <akim@epita.fr>
1173
1174 * tests/actions.at (Mid-rule actions): Output on a single line
1175 instead of several.
1176
704a47c4
AD
11772001-12-29 Akim Demaille <akim@epita.fr>
1178
1179 * doc/bison.texinfo: Formatting changes.
1180
091e20bb
AD
11812001-12-29 Akim Demaille <akim@epita.fr>
1182
1183 Don't store the token defs in a muscle, just be ready to output it
1184 on command. Now possible via `symbols'. Fixes a memory leak.
1185
1186 * src/output.c (token_definitions_output): New.
1187 (output_parser, header_output): Use it.
1188 * src/reader.c (symbols_save): Remove.
1189
cce71710
AD
11902001-12-29 Akim Demaille <akim@epita.fr>
1191
1192 * src/bison.simple: Do not provide a default for YYSTYPE and
1193 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1194 default.
1195
82c035a8
AD
11962001-12-29 Akim Demaille <akim@epita.fr>
1197
1198 Mid-rule actions are simply... ignored!
1199
1200 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1201 the empty-rule associated to the dummy symbol, not to the host
1202 rule.
1203 * tests/actions.at (Mid-rule actions): New.
1204
8419d367
AD
12052001-12-29 Akim Demaille <akim@epita.fr>
1206
1207 Memory leak.
1208
1209 * src/reader.c (reader): Free grammar.
1210
375d5806
AD
12112001-12-29 Akim Demaille <akim@epita.fr>
1212
1213 Memory leak.
1214
1215 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1216 since it allocates it for each state, although only one is needed.
1217 (allocate_storage): Do it here.
1218
f51cb8ff
AD
12192001-12-29 Akim Demaille <akim@epita.fr>
1220
1221 * src/options.h, src/options.c (create_long_option_table): Rename
1222 as...
1223 (long_option_table_new): this, with a clearer prototype.
1224 (percent_table): Remove, unused,
1225 * src/getargs.c (getargs): Adjust.
1226
29e88316
AD
12272001-12-29 Akim Demaille <akim@epita.fr>
1228
1229 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1230 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1231 as states.
1232
b9f71f19
AD
12332001-12-29 Akim Demaille <akim@epita.fr>
1234
1235 * src/lalr.c (build_relations): Rename `states' as `states1'.
1236 Sorry, I don't understand exactly what it is, no better name...
1237
1a2b5d37
AD
12382001-12-29 Akim Demaille <akim@epita.fr>
1239
1240 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1241 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1242 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1243 as rules.
1244
1cca533e
AD
12452001-12-29 Akim Demaille <akim@epita.fr>
1246
1247 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1248 ago.
1249
c03ae966
AD
12502001-12-29 Akim Demaille <akim@epita.fr>
1251
1252 * src/reader.c, src/reader.h (user_toknums): Remove.
1253 Adjust all users to use symbols[i]->user_token_number.
1254
5a670b1e
AD
12552001-12-29 Akim Demaille <akim@epita.fr>
1256
1257 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1258 Adjust all users to use symbols[i]->prec or ->assoc.
1259
ad949da9
AD
12602001-12-29 Akim Demaille <akim@epita.fr>
1261
1262 * src/reader.c, src/reader.h (tags): Remove.
1263 Adjust all users to use symbols[i]->tag.
1264
0e78e603
AD
12652001-12-29 Akim Demaille <akim@epita.fr>
1266
1267 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1268 and rule_table.
1269 * src/reader.c (packsymbols): Fill this table.
1270 Drop sprec.
1271 * src/conflicts.c (resolve_sr_conflict): Adjust.
1272 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1273 single table.
1274 Use symbols[i]->tag instead of tags[i].
1275
213e640e
AD
12762001-12-29 Akim Demaille <akim@epita.fr>
1277
1278 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1279 In addition, put a comment in there, to replace...
1280 * tests/regression.at (%union and C comments): Remove.
1281
e7b8bef1
AD
12822001-12-29 Akim Demaille <akim@epita.fr>
1283
1284 * tests/regression.at (Web2c Actions): Blindly move the actual
1285 output as expected output. The contents *seem* right to me, but I
1286 can't pretend reading perfectly parser tables... Nonetheless, all
1287 the other tests pass correctly, the table look OK, even though the
1288 presence of `$axiom' is to be noted: AFAICS it is useless (but
1289 harmless).
1290
b68e7744
AD
12912001-12-29 Akim Demaille <akim@epita.fr>
1292
1293 * src/reader.c (readgram): Don't add the rule 0 if there were no
1294 rules read. In other words, add it _after_ having performed
1295 grammar sanity checks.
1296 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1297
78d5bae9
AD
12982001-12-29 Akim Demaille <akim@epita.fr>
1299
1300 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1301 visible, and some states have now a different number.
1302
ff442794
AD
13032001-12-29 Akim Demaille <akim@epita.fr>
1304
1305 * src/reader.c (readgram): Bind the initial rule's lineno to that
1306 of the first rule.
1307 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1308 (Solved SR Conflicts): Adjust rule 0's line number.
1309
610ab194
AD
13102001-12-29 Akim Demaille <akim@epita.fr>
1311
1312 Fix the `GAWK Grammar' failure.
1313
1314 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1315 the reductions of the first state which was mistakenly confused
1316 with the final state because precisely final_state was initialized
1317 to 0.
1318 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1319 now noticed by Bison.
1320 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1321 have a reduction on $default.
1322
29d29c8f
AD
13232001-12-29 Akim Demaille <akim@epita.fr>
1324
1325 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1326 rule line numbers.
1327 * src/closure.c (print_closure): Likewise.
1328 * src/derives.c (print_derives): Likewise.
1329 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1330 now.
1331
7c6b64d0
AD
13322001-12-29 Akim Demaille <akim@epita.fr>
1333
1334 * src/lalr.c (lookaheads_print): New.
1335 (lalr): Call it when --trace-flag.
1336 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1337 are dumped.
1338
3d4daee3
AD
13392001-12-29 Akim Demaille <akim@epita.fr>
1340
1341 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1342 when walking through ritem, even via rule->rhs.
1343 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1344 (useful_production, useless_nonterminals): Likewise.
1345 (reduce_grammar_tables): Likewise, plus update nritems.
1346 * src/nullable.c (set_nullable): Likewise.
1347 * src/lalr.c (build_relations): Likewise.
1348 * tests/sets.at (Nullable): Adjust.
1349 Fortunately, now, the $axiom is no longer nullable.
1350
9e7f6bbd
AD
13512001-12-29 Akim Demaille <akim@epita.fr>
1352
1353 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1354 the 0-sentinel.
1355 * src/gram.c (ritem_longest_rhs): Likewise.
1356 * src/reduce.c (nonterminals_reduce): Likewise.
1357 * src/print_graph.c (print_graph): Likewise.
1358 * src/output.c (output_rule_data): Likewise.
1359 * src/nullable.c (set_nullable): Likewise.
1360
255ef638
AD
13612001-12-29 Akim Demaille <akim@epita.fr>
1362
1363 * src/output.c: Comment changes.
1364
0d8a7363
AD
13652001-12-27 Paul Eggert <eggert@twinsun.com>
1366
1367 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1368 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1369 Sparc, as they were causing more porting problems than the
1370 (minor) performance improvement was worth.
1371
1372 Also, catch up with 1.31's YYSTD.
1373
3db472b9
AD
13742001-12-27 Akim Demaille <akim@epita.fr>
1375
1376 * src/output.c (output_gram): Rely on nritems, not the
1377 0-sentinel. See below.
1378 Use -1 as separator, not 0.
1379 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1380 Rely on -1 as separator in yyrhs, instead of 0.
1381 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1382 twice `Now at end of input', therefore there are two lines less to
1383 expect.
1384
b365aa05
AD
13852001-12-27 Akim Demaille <akim@epita.fr>
1386
1387 * tests/regression.at (Unresolved SR Conflicts):
1388 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1389 below.
1390
30171f79
AD
13912001-12-27 Akim Demaille <akim@epita.fr>
1392
1393 * src/LR0.c (new_state): Recognize the final state by the fact it
1394 is reached by eoftoken.
1395 (insert_start_shifting_state, insert_eof_shifting_state)
1396 (insert_accepting_state, augment_automaton): Remove, since now
1397 these states are automatically computed from the initial state.
1398 (generate_states): Adjust.
1399 * src/print.c: When reporting a rule number to the user, substract
1400 1, so that the axiom rule is rule 0, and the first user rule is 1.
1401 * src/reduce.c: Likewise.
1402 * src/print_graph.c (print_core): For the time being, just as for
1403 the report, depend upon --trace-flags to dump the full set of
1404 items.
1405 * src/reader.c (readgram): Once the grammar read, insert the rule
1406 0: `$axiom: START-SYMBOL $'.
1407 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1408 number of the states has changed (the final state is no longer
1409 necessarily the last), catch up.
1410
75142d45
AD
14112001-12-27 Akim Demaille <akim@epita.fr>
1412
1413 Try to make the use of the eoftoken valid. Given that its value
1414 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1415 is used instead of > 0 where appropriate, (ii), depend upon nritems
1416 instead of the 0-sentinel.
1417
1418 * src/gram.h, src/gram.c (nritems): New.
1419 Expected to be duplication of nitems, but for the time being...
1420 * src/reader.c (packgram): Assert nritems and nitems are equal.
1421 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1422 * src/closure.c (print_closure, print_fderives): Likewise.
1423 * src/gram.c (ritem_print): Likewise.
1424 * src/print.c (print_core, print_grammar): Likewise.
1425 * src/print_graph.c: Likewise.
1426
b7c49edf
AD
14272001-12-27 Akim Demaille <akim@epita.fr>
1428
1429 * src/main.c (main): If there are complains after grammar
1430 reductions, then output the report anyway if requested, then die.
1431 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1432 * src/reader.c (eoftoken): New.
1433 (parse_token_decl): If the token being defined has value `0', it
1434 is the eoftoken.
1435 (packsymbols): No longer hack `tags' to insert `$' by hand.
1436 Be sure to preserve the value of the eoftoken.
1437 (reader): Make sure eoftoken is defined.
1438 Initialize nsyms to 0: now eoftoken is created just like the others.
1439 * src/print.c (print_grammar): Don't special case the eof token.
1440 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1441 lie anyway, albeit pleasant.
1442 * tests/calc.at: Exercise error messages with eoftoken.
1443 Change the grammar so that empty input is invalid.
1444 Adjust expectations.
1445 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1446
ec2da99f
AD
14472001-12-27 Akim Demaille <akim@epita.fr>
1448
1449 * configure.in: Check the protos of strchr ans strspn.
1450 Replace strchr if needed.
1451 * src/system.h: Provide the protos of strchr, strspn and memchr if
1452 missing.
1453 * lib/strchr.c: New.
1454 * src/reader.c (symbols_save): Use strchr.
1455
8adfa272
AD
14562001-12-27 Akim Demaille <akim@epita.fr>
1457
1458 * src/print.c, src/print_graph.c (escape): New.
1459 Use it to quote the TAGS outputs.
1460 * src/print_graph.c (print_state): Now errors are in red, and
1461 reductions in green.
1462 Prefer high to wide: output the state number on a line of its own.
1463
80dac38c
AD
14642001-12-27 Akim Demaille <akim@epita.fr>
1465
1466 * src/state.h, src/state.c (reductions_new): New.
1467 * src/LR0.c (set_state_table): Let all the states have a
1468 `reductions', even if reduced to 0.
1469 (save_reductions): Adjust.
1470 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1471 * src/print.c (print_reductions, print_actions): Adjust.
1472 * src/output.c (action_row): Adjust.
1473
2cec70b9
AD
14742001-12-27 Akim Demaille <akim@epita.fr>
1475
1476 * src/state.h, src/state.c (errs_new, errs_dup): New.
1477 * src/LR0.c (set_state_table): Let all the states have an errs,
1478 even if reduced to 0.
1479 * src/print.c (print_errs, print_reductions): Adjust.
1480 * src/output.c (output_actions, action_row): Adjust.
1481 * src/conflicts.c (resolve_sr_conflict): Adjust.
1482
13ca549a
AD
14832001-12-27 Akim Demaille <akim@epita.fr>
1484
1485 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1486
5092aba5
AD
14872001-12-27 Akim Demaille <akim@epita.fr>
1488
1489 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1490 * src/print.c: here.
1491 (lookaheadset, shiftset): New, used as additional storage by
1492 print_reductions.
1493 (print_results): Adjust.
1494 (print_shifts, print_gotos, print_errs): New, extracted from...
1495 (print_actions): here.
1496 * src/print_graph.c (print_actions): Remove dead code.
1497
11e2beca
AD
14982001-12-27 Akim Demaille <akim@epita.fr>
1499
1500 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1501 `$n' and `@n'.
1502
dac3c910
AD
15032001-12-27 Akim Demaille <akim@epita.fr>
1504
1505 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1506 (build_relations): Adjust.
1507
d0b0fefa
AD
15082001-12-27 Akim Demaille <akim@epita.fr>
1509
1510 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1511 duplication.
1512
adc8c848
AD
15132001-12-27 Akim Demaille <akim@epita.fr>
1514
1515 * src/reader.c (packgram): Catch nitems overflows.
1516
14d293ac
AD
15172001-12-27 Akim Demaille <akim@epita.fr>
1518
1519 * src/files.c, src/files.h (guard_obstack): Remove.
1520 * src/output.c (output): Adjust.
1521 * src/reader.c (parse_braces): New, factoring...
1522 (copy_action, copy_guard): these two which are renamed as...
1523 (parse_action, parse_guard): these.
1524 As a voluntary consequence, using braces around guards is now
1525 mandatory.
1526
f499b062
AD
15272001-12-27 Akim Demaille <akim@epita.fr>
1528
1529 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1530 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1531 members.
1532 (symbol_list_new): Adjust.
1533 (copy_action): action_line is the first line, not the last.
1534 (copy_guard): Just as for actions, store the `action' only, not
1535 the switch/case/break flesh.
1536 Don't parse the user action that might follow the guard, let...
1537 (readgram): do it, i.e., now, there can be an action after a
1538 guard.
1539 In other words the guard is just explicitly optional.
1540 (packgram): Adjust.
1541 * src/output.c (guards_output): New.
1542 (output_parser): Call it when needed.
1543 (output): Also free the guard and attrs obstacks.
1544 * src/files.c, src/files.h (obstack_save): Remove.
1545 (output_files): Remove.
1546 As a result, if one needs the former `.act' file, using an
1547 appropriate skeleton which requires actions and guards is now
1548 required.
1549 * src/main.c (main): Adjust.
1550 * tests/semantic.at: New.
1551 * tests/regression.at: Use `input.y' as input file name.
1552 Avoid 8+3 problems by requiring input.c when the test needs the
1553 parser.
1554
d945f5cd
AD
15552001-12-27 Akim Demaille <akim@epita.fr>
1556
1557 * src/reader.c (symbol_list_new): Be sure to initialize all the
1558 fields.
1559
d200e455
AD
15602001-12-27 Akim Demaille <akim@epita.fr>
1561
1562 All the hacks using a final pseudo state are now useless.
1563
1564 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1565 * src/lalr.c (nLA): New.
1566 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1567 instead of lookaheadsp from the pseudo state (nstate + 1).
1568
f9507c28
AD
15692001-12-27 Akim Demaille <akim@epita.fr>
1570
1571 * src/output.c (action_row, token_actions): Use a state_t instead
1572 of a integer, and nlookaheads instead of the following state's
1573 lookaheadsp.
1574
065fbd27
AD
15752001-12-27 Akim Demaille <akim@epita.fr>
1576
1577 * src/conflicts.c (log_resolution, flush_shift)
1578 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1579 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1580 (conflicts_print, print_reductions): Use a state_t instead of an
1581 integer when referring to a state.
1582 As much as possible, depend upon nlookaheads, instead of the
1583 `lookaheadsp' member of the following state (since lookaheads of
1584 successive states are successive, the difference between state n + 1
1585 and n served as the number of lookaheads for state n).
1586 * src/lalr.c (add_lookback_edge): Likewise.
1587 * src/print.c (print_core, print_actions, print_state)
1588 (print_results): Likewise.
1589 * src/print_graph.c (print_core, print_actions, print_state)
1590 (print_graph): Likewise.
1591 * src/conflicts.h: Adjust.
1592
1b177bd7
AD
15932001-12-27 Akim Demaille <akim@epita.fr>
1594
1595 * src/bison.hairy: Formatting/comment changes.
1596 ANSIfy.
1597 Remove `register' indications.
1598 Add plenty of `static'.
1599
7742ddeb
AD
16002001-12-27 Akim Demaille <akim@epita.fr>
1601
1602 * src/output.c (prepare): Drop the muscle `ntbase' which
1603 duplicates ntokens.
1604 * src/bison.simple: Formatting/comment changes.
1605 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1606 is an undocumented synonym.
1607
1fa14068
AD
16082001-12-22 Akim Demaille <akim@epita.fr>
1609
1610 * src/output.c (output_table_data): Change the prototype to use
1611 `int' for array ranges: some invocations do pass an int, not a
1612 short.
1613 Reported by Wayne Green.
1614
b9752825
AD
16152001-12-22 Akim Demaille <akim@epita.fr>
1616
1617 Some actions of web2c.y are improperly triggered.
1618 Reported by Mike Castle.
1619
1620 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1621 * tests/regression.at (Web2c): Rename as...
1622 (Web2c Report): this.
1623 (Web2c Actions): New.
1624
776209d6
AD
16252001-12-22 Akim Demaille <akim@epita.fr>
1626
1627 Reductions in web2c.y are improperly reported.
1628 Reported by Mike Castle.
1629
1630 * src/conflicts.c (print_reductions): Fix.
1631 * tests/regression.at (Web2c): New.
1632
275fc3ad
AD
16332001-12-18 Akim Demaille <akim@epita.fr>
1634
1635 Some host fail on `assert (!"foo")', which expands to
1636 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1637 Reported by Nelson Beebee.
1638
1639 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1640 `#define it_succeeded 0' and `assert (it_succeeded)'.
1641
897668ee
MA
16422001-12-17 Marc Autret <autret_m@epita.fr>
1643
1644 * src/bison.simple: Don't hard code the skeleton line and filename.
1645 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1646 New line counter 'skeleton_line' (skeleton-line muscle).
1647
ab3399e0
PE
16482001-12-17 Paul Eggert <eggert@twinsun.com>
1649
1650 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1651 YYDEBUG must be defined to a nonzero value.
1652
1653 * src/bison.simple (yytname): Do not assume that the user defines
1654 YYDEBUG to a properly parenthesized expression.
1655
3877f72b
AD
16562001-12-17 Akim Demaille <akim@epita.fr>
1657
1658 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1659 nlookaheads is a new member.
1660 Adjust all users.
1661 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1662 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1663 state.
776209d6 1664
331dbc1b
AD
16652001-12-17 Akim Demaille <akim@epita.fr>
1666
1667 * src/files.h, src/files.c (open_files, close_files): Remove.
1668 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1669 let...
1670 * src/reader.c (reader): Do it.
776209d6 1671
be750e4c
AD
16722001-12-17 Akim Demaille <akim@epita.fr>
1673
1674 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1675
709ae8c6
AD
16762001-12-17 Akim Demaille <akim@epita.fr>
1677
1678 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1679 (flush_reduce): New.
1680 (resolve_sr_conflict): Adjust.
776209d6 1681
f87685c3
AD
16822001-12-17 Akim Demaille <akim@epita.fr>
1683
1684 * src/output.c (output_obstack): Be static and rename as...
1685 (format_obstack): this, to avoid any confusion with files.c's
1686 output_obstack.
1687 * src/reader.h (muscle_obstack): Move to...
1688 * src/output.h: here, since it's defined in output.c.
1689
837491d8
AD
16902001-12-17 Akim Demaille <akim@epita.fr>
1691
1692 * src/output.c (action_row, save_column, default_goto)
1693 (sort_actions, matching_state, pack_vector): Better variable
1694 locality.
1695
796d61fb
AD
16962001-12-17 Akim Demaille <akim@epita.fr>
1697
1698 * src/output.c: Various formatting changes.
776209d6 1699
64d15509
AD
17002001-12-17 Akim Demaille <akim@epita.fr>
1701
1702 * src/files.c (output_files): Free the output_obstack.
1703 * src/main.c (main): Call print and print_graph conditionally.
1704 * src/print.c (print): Work unconditionally.
1705 * src/print_graph.c (print_graph): Work unconditionally.
1706 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1707
fbc8ecb7
MA
17082001-12-16 Marc Autret <autret_m@epita.fr>
1709
1710 * src/output.c (actions_output): Fix. When we use %no-lines,
1711 there is one less line per action.
1712
f0440388
MA
17132001-12-16 Marc Autret <autret_m@epita.fr>
1714
1715 * src/bison.simple: Remove a useless #line directive.
1716 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1717 * src/output.c (get_lines_number): New.
776209d6 1718 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1719 output muscles.
1720 Fix line numbering.
1721 (actions_output): Computes the number of lines taken by actions.
1722 (output_master_parser): Insert new skeleton which is the name of
1723 the output parser file name.
1724
a79986b8
MA
17252001-12-15 Marc Autret <autret_m@epita.fr>
1726
1727 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1728
4ec8e00f
MA
17292001-12-15 Marc Autret <autret_m@epita.fr>
1730
1731 * src/output.c (output_gram): Keep track of the hairy one.
1732
1a4648ff
AD
17332001-12-15 Akim Demaille <akim@epita.fr>
1734
1735 Make `make distcheck' work.
1736
1737 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1738 system.h which uses libgettext.h.
1739
9c2c67e6
AD
17402001-12-15 Akim Demaille <akim@epita.fr>
1741
1742 * src/nullable.c (set_nullable): Useless rules must be skipped,
1743 otherwise, since we range over their symbols, we might look at a
1744 nonterminal which no longer ``exists'', i.e., it is not counted in
1745 `nvars', hence we overflow our arrays.
1746
93ede233
AD
17472001-12-15 Akim Demaille <akim@epita.fr>
1748
1749 The header can also be produced directly, without any obstack!
1750 Yahoo!
1751
1752 * src/files.c, src/files.h (defines_obstack): Remove.
1753 (compute_header_macro): Global.
1754 (defines_obstack_save): Remove.
1755 * src/reader.c (parse_union_decl): No longer output to
1756 defines_obstack: its content can be found in the `stype' muscle
1757 anyway.
1758 (output_token_translations): Merge into...
1759 (symbols_output): this.
1760 Rename as...
1761 (symbols_save): this.
1762 (reader): Adjust.
1763 * src/output.c (header_output): New.
1764 (output): Call it.
1765
2666f928
AD
17662001-12-15 Akim Demaille <akim@epita.fr>
1767
1768 * src/reader.c (parse_union_decl): Instead of handling two obstack
1769 simultaneously, use one to define the `stype' muscle, and use the
1770 value of the latter to fill defines_obstack.
1771 (copy_comment): Remove.
1772 (copy_comment2): Work for a single obstack.
1773 Rename as...
1774 (copy_comment): this.
1775
428046f8
AD
17762001-12-15 Akim Demaille <akim@epita.fr>
1777
1778 * src/lex.c, src/lex.h (xgetc): No longer static.
1779 * src/reader.c (parse_union_decl): Revamp.
1780
ea52d706
AD
17812001-12-15 Akim Demaille <akim@epita.fr>
1782
1783 Still making progress in separating Bison into (i) input, (ii)
1784 process, (iii) output: now we can directly output the parser file
1785 without using table_obstack at all.
1786
1787 * src/files.c, src/files.h (table_obstack): Bye bye.
1788 (parser_file_name): New.
1789 * src/files.c (compute_output_file_names): Compute it.
1790 * src/output.c (actions_output, output_parser)
1791 (output_master_parser): To a file instead of an obstack.
1792
3f96f4dc
AD
17932001-12-15 Akim Demaille <akim@epita.fr>
1794
1795 Attach actions to rules, instead of pre-outputting them to
1796 actions_obstack.
1797
1798 * src/gram.h (rule_t): action and action_line are new members.
1799 * src/reader.c (symbol_list): Likewise.
1800 (copy_action): Save the actions within the rule.
1801 (packgram): Save them in rule_table.
1802 * src/output.c (actions_output): New.
1803 (output_parser): Use it on `%%actions'.
1804 (output_rule_data): Don't free rule_table.
1805 (output): Do it.
1806 (prepare): Don't save the `action' muscle.
1807 * src/bison.simple: s/%%action/%%actions/.
1808
51576fb3
AD
18092001-12-15 Akim Demaille <akim@epita.fr>
1810
1811 * src/reader.c (copy_action): When --yacc, don't append a `;'
1812 to the user action: let it fail if lacking.
dee049eb 1813 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1814
2648a72d
AD
18152001-12-14 Akim Demaille <akim@epita.fr>
1816
1817 * src/lex.c (literalchar): Simply return the char you decoded, non
1818 longer mess around with obstacks and int pointers.
1819 Adjust all callers.
1820
92790e5b
AD
18212001-12-14 Akim Demaille <akim@epita.fr>
1822
1823 * src/lex.c (literalchar): Don't escape the special characters,
1824 just decode them, and keep them as char (before, eol was output as
1825 the 2 char string `\n' etc.).
1826 * src/output.c (output_rule_data): Use quotearg to output the
1827 token strings.
1828
927c1557
PE
18292001-12-13 Paul Eggert <eggert@twinsun.com>
1830
1831 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1832 Do not infringe on the global user namespace when using C++.
1833 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1834 All uses of `fprintf' and `stderr' changed.
1835
1836 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1837
ed8e1f68
AD
18382001-12-13 Akim Demaille <akim@epita.fr>
1839
1840 The computation of nullable is broken: it doesn't handle empty
1841 RHS's properly.
1842
1843 * tests/torture.at (GNU AWK Grammar): New.
1844 * tests/sets.at (Nullable): New.
1845 * src/nullable.c (set_nullable): Instead of blindly looping over
1846 `ritems', loop over the rules, and then over their rhs's.
1847
1848 Work around Autotest bugs.
1849
1850 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1851 frame, because Autotest understand lines starting with a `+' as
1852 traces from the shell. Then, they are not processed properly.
1853 Admittedly an Autotest bug, but we don't have time to wait for
1854 Autotest to catch up.
1855 * tests/regression.at (Broken Closure): Adjust to the new table
1856 frames.
1857 Move to...
1858 * tests/sets.at: here.
1859
cb581495
AD
18602001-12-13 Akim Demaille <akim@epita.fr>
1861
1862 * src/closure.c (closure): Use nrules instead of playing tricks
1863 with BITS_PER_WORD.
1864
2e729273
AD
18652001-12-13 Akim Demaille <akim@epita.fr>
1866
1867 * src/print.c (print_actions): Output the handling of `$' as the
1868 traces do: shifting the token EOF. Before EOF was treated as a
1869 nonterminal.
1870 * tests/regression.at: Adjust some tests.
1871 * src/print_graph.c (print_core): Complete the set of items via
1872 closure. The next-to-final and final states are still unsatisfying,
1873 but that's to be addressed elsewhere.
1874 No longer output the rule numbers, but do output the state number.
1875 A single loop for the shifts + gotos is enough, but picked a
1876 distinct color for each.
1877 (print_graph): Initialize and finalize closure.
1878
107f7dfb
AD
18792001-12-13 Akim Demaille <akim@epita.fr>
1880
1881 * src/reader.c (readgram): Remove dead code, an strip useless
1882 braces.
1883 (get_type): Remove, unused.
1884
9b53a24f
AD
18852001-12-12 Akim Demaille <akim@epita.fr>
1886
1887 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1888 on that of lib/error.c.
1889
dbfb6dcd
AD
18902001-12-12 Akim Demaille <akim@epita.fr>
1891
1892 Some hosts don't like `/' in includes.
1893
1894 * src/system.h: Include libgettext.h without qualifying the path.
1895 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1896 $(top_srcdir).
1897
c25fb648
MA
18982001-12-11 Marc Autret <autret_m@epita.fr>
1899
1900 * src/output.c (output_parser): Remove useless muscle.
1901
710ddc4f
MA
19022001-12-11 Marc Autret <autret_m@epita.fr>
1903
1904 * src/bison.simple: Remove #line just before %%epilogue. It
1905 is now handled in ...
1906 * src/reader.c (read_additionnal_code): Add the output of a
1907 #line for the epilogue.
1908
e83d80b8
MA
19092001-12-10 Marc Autret <autret_m@epita.fr>
1910
927c1557 1911 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1912 replace precedent remove.
1913 * src/bison.simple: Remove #line before %%prologue because
1914 %%input-line is wrong at this time.
1915
971d5158
MA
19162001-12-10 Marc Autret <autret_m@epita.fr>
1917
1918 * src/reader.c (symbols_output): Clean up.
927c1557 1919 * src/output.c (output_gram, output): Clean up.
971d5158 1920
5edafffd
AD
19212001-12-10 Akim Demaille <akim@epita.fr>
1922
1923 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1924 * src/LR0.c (set_state_table): here.
1925 * src/lalr.c (lalr): Call it.
1926
0279f8e9
AD
19272001-12-10 Akim Demaille <akim@epita.fr>
1928
1929 * src/state.h (shifts): Remove the `number' member: shifts are
1930 attached to state, hence no longer need to be labelled with a
1931 state number.
1932
190c4f5f
AD
19332001-12-10 Akim Demaille <akim@epita.fr>
1934
1935 Now that states have a complete set of members, the linked list of
1936 shifts is useless: just fill directly the state's shifts member.
1937
1938 * src/state.h (shifts): Remove the `next' member.
1939 * src/LR0.c (first_state, last_state): Remove.
1940 Adjust the callers.
1941 (augment_automaton): Don't look for the shifts that must be added
1942 a shift on EOF: it is those of the state we looked for! But now,
1943 since shifts are attached, it is no longer needed to looking
1944 merely by its id: its number.
1945
2a73b93d
AD
19462001-12-10 Akim Demaille <akim@epita.fr>
1947
1948 * src/LR0.c (augment_automaton): Better variable locality.
1949 Remove an impossible branch: if there is a state corresponding to
1950 the start symbol being shifted, then there is shift for the start
1951 symbol from the initial state.
1952
74392f6a
AD
19532001-12-10 Akim Demaille <akim@epita.fr>
1954
1955 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1956 only when appropriate: when insert_start_shifting_state' is not
1957 invoked.
1958 * tests/regression.at (Rule Line Numbers): Adjust.
1959
37c82725
AD
19602001-12-10 Akim Demaille <akim@epita.fr>
1961
1962 * src/LR0.c (augment_automaton): Now that all states have shifts,
1963 merge the two cases addition shifts to the initial state.
1964
6a164e0c
AD
19652001-12-10 Akim Demaille <akim@epita.fr>
1966
1967 * src/lalr.c (set_state_table): Move to...
1968 * src/LR0.c: here.
1969 * src/lalr.c (lalr): Don't call it...
1970 * src/LR0.c (generate_states): do it.
1971 * src/LR0.h (first_state): Remove, only the table is used.
1972
7215de24
AD
19732001-12-10 Akim Demaille <akim@epita.fr>
1974
1975 * src/LR0.h (first_shift, first_reduction): Remove.
1976 * src/lalr.c: Don't use first_shift: find shifts through the
1977 states.
1978
80e25d4d
AD
19792001-12-10 Akim Demaille <akim@epita.fr>
1980
1981 * src/LR0.c: Attach shifts to states as soon as they are
1982 computed.
1983 * src/lalr.c (set_state_table): Instead of assigning shifts to
1984 state, just assert that the mapping was properly done.
1985
0ab3728b
AD
19862001-12-10 Akim Demaille <akim@epita.fr>
1987
1988 * src/LR0.c (insert_start_shift): Rename as...
1989 (insert_start_shifting_state): this.
1990 (insert_eof_shifting_state, insert_accepting_state): New.
1991 (augment_automaton): Adjust.
1992 Better locality of the variables.
1993 When looking if the start_symbol is shifted from the initial
1994 state, using `while (... symbol != start_symbol ...)' sounds
1995 better than `while (... symbol < start_symbol ...)': If fail
1996 to see how the order between symbols could be relevant!
1997
78af9bbc
AD
19982001-12-10 Akim Demaille <akim@epita.fr>
1999
2000 * src/getargs.h: Don't declare `spec_name_prefix' and
2001 `spec_file_prefix', declared by src/files.h.
2002 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2003 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2004 * src/output.c (prepare): Adjust.
2005 * src/reader.c (symbols_output): Likewise.
2006 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2007
bdef2a41
AD
20082001-12-10 Akim Demaille <akim@epita.fr>
2009
2010 * src/muscle_tab.c (muscle_init): NULL is a better default than
2011 `"0"'.
2012
3735969c
AD
20132001-12-10 Akim Demaille <akim@epita.fr>
2014
2015 * src/reader.c (reader): Calling symbols_output once is enough.
2016
49701457
AD
20172001-12-10 Akim Demaille <akim@epita.fr>
2018
2019 Now that states have a complete set of members, the linked list of
2020 reductions is useless: just fill directly the state's reductions
2021 member.
2022
2023 * src/state.h (struct reductions): Remove member `number' and
2024 `next'.
2025 * src/LR0.c (first_reduction, last_reduction): Remove.
2026 (save_reductions): Don't link the new reductions, store them in
2027 this_state.
2028 * src/lalr.c (set_state_table): No need to attach reductions to
2029 states, it's already done.
2030 * src/output.c (output_actions): No longer free the shifts, then
2031 the reductions, then the states: free all the states and their
2032 members.
2033
0edad749
AD
20342001-12-10 Akim Demaille <akim@epita.fr>
2035
2036 * src/options.c (OPTN, DRTV, BOTH): New.
2037 (option_table): Use them.
2038
0edad749
AD
2039 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2040 the job of system.h.
2041 * src/options.c: Don't include stdio.h and xalloc.h for the same
2042 reasons.
2043
5449dd0f
AD
20442001-12-10 Akim Demaille <akim@epita.fr>
2045
2046 * src/output.c (output, prepare): Make sure the values of the
2047 muscles `action' and `prologue' are 0-terminated.
2048
a870c567
AD
20492001-12-10 Akim Demaille <akim@epita.fr>
2050
2051 Clean up GCC warnings.
2052
2053 * src/reader.c (copy_action): `buf' is not used.
2054 (parse_skel_decl): Be static.
2055 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2056 * src/options.h (create_long_option_table): Have a real prototype.
2057 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2058 (hash_delete_at): Return const void *.
2059 Adjust casts to preserve the const.
2060
80df8768
AD
20612001-12-10 Akim Demaille <akim@epita.fr>
2062
2063 * configure.in: Require 2.52g.
2064 M4 is not needed, but AUTOM4TE is.
2065 * m4/m4.m4: Remove.
2066 * tests/Makefile.am: Adjust.
2067
f693ad14
AD
20682001-12-10 Akim Demaille <akim@epita.fr>
2069
2070 One structure for states is enough, even though theoretically
2071 there are LR(0) states and LALR(1) states.
2072
2073 * src/lalr.h (state_t): Remove.
2074 (state_table): Be state_t **, not state_t *.
2075 * src/state.h (core, CORE_ALLOC): Rename as...
2076 (state_t, STATE_ALLOC): this.
2077 Add the LALR(1) members: shifts, reductions, errs.
2078 * src/LR0.c (state_table): Rename as...
2079 (state_hash): this, to avoid name clashes with the global
2080 `state_table'.
2081 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2082 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2083
74ffbcb6
AD
20842001-12-10 Akim Demaille <akim@epita.fr>
2085
2086 Bison dumps core on bash.y.
2087 Reported by Pascal Bart.
2088
2089 * src/warshall.c (bitmatrix_print): New.
2090 (TC): Use it.
2091 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2092 j must be the outer loop.
2093 * tests/regression.at (Broken Closure): New.
2094
07708e19
AD
20952001-12-05 Akim Demaille <akim@epita.fr>
2096
2097 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2098 its argument.
2099