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