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