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