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