]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Remove a dead item.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-04-23 Paul Eggert <eggert@twinsun.com>
2
3 * data/bison.simple: Remove unnecessary commentary and white
4 space differences from 1_29-branch.
5 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
6
7 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
8 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
9 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10 constructors or destructors.
11
12 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
13
142002-04-23 Akim Demaille <akim@epita.fr>
15
16 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18 location with columns.
19 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
20 All reported by Paul Eggert.
21
222002-04-22 Akim Demaille <akim@epita.fr>
23
24 * src/reduce.c (dump_grammar): Move to...
25 * src/gram.h, src/gram.c (grammar_dump): here.
26 Be sure to separate long item numbers.
27 Don't read the members of a rule's prec if its nil.
28
292002-04-22 Akim Demaille <akim@epita.fr>
30
31 * src/output.c (table_size, table_grow): New.
32 (MAXTABLE): Remove, replace uses with table_size.
33 (pack_vector): Instead of dying when the table is too big, grow it.
34
352002-04-22 Akim Demaille <akim@epita.fr>
36
37 * data/bison.simple (yyr1): Its type is that of a token number.
38 * data/bison.c++ (r1_): Likewise.
39 * tests/regression.at (Web2c Actions): Adjust.
40
412002-04-22 Akim Demaille <akim@epita.fr>
42
43 * src/reader.c (token_translations_init): 256 is now the default
44 value for the error token, i.e., it will be assigned another
45 number if the user assigned 256 to one of her tokens.
46 (reader): Don't force 256 to error.
47 * doc/bison.texinfo (Symbols): Adjust.
48 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
49 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
50 etc. instead of 10, 20, 30 (which was used to `jump' over error
51 (256) and undefined (2)).
52
532002-04-22 Akim Demaille <akim@epita.fr>
54
55 Propagate more token_number_t.
56
57 * src/gram.h (token_number_as_item_number)
58 (item_number_as_token_number): New.
59 * src/output.c (GENERATE_OUTPUT_TABLE): New.
60 Use it to create output_item_number_table and
61 output_token_number_table.
62 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
63 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
64 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
65 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
66
672002-04-22 Akim Demaille <akim@epita.fr>
68
69 * src/output.h, src/output.c (get_lines_number): Remove.
70
712002-04-19 Akim Demaille <akim@epita.fr>
72
73 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
74 as Lex/Flex'.
75 (Debugging): More details about enabling the debugging features.
76 (Table of Symbols): Describe $$, $n, @$, and @n.
77 Suggested by Tim Josling.
78
792002-04-19 Akim Demaille <akim@epita.fr>
80
81 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
82
832002-04-10 Akim Demaille <akim@epita.fr>
84
85 * src/system.h: Rely on HAVE_LIMITS_H.
86 Suggested by Paul Eggert.
87
882002-04-09 Akim Demaille <akim@epita.fr>
89
90 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
91 full stderr, and strip it according to the bison options, instead
92 of composing the error message from different bits.
93 This makes it easier to check for several error messages.
94 Adjust all the invocations.
95 Add an invocation exercising the error token.
96 Add an invocation demonstrating a stupid error message.
97 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
98 Adjust the tests.
99 Error message are for stderr, not stdout.
100
1012002-04-09 Akim Demaille <akim@epita.fr>
102
103 * src/gram.h, src/gram.c (error_token_number): Remove, use
104 errtoken->number.
105 * src/reader.c (reader): Don't specify the user token number (2)
106 for $undefined, as it uselessly prevents using it.
107 * src/gram.h (token_number_t): Move to...
108 * src/symtab.h: here.
109 (state_t.number): Is a token_number_t.
110 * src/print.c, src/reader.c: Use undeftoken->number instead of
111 hard coded 2.
112 (Even though this 2 is not the same as above: the number of the
113 undeftoken remains being 2, it is its user token number which
114 might not be 2).
115 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
116 `user_token_number_max'.
117 Output `undef_token_number'.
118 * data/bison.simple, data/bison.c++: Use them.
119 Be sure to map invalid yylex return values to
120 `undef_token_number'. This saves us from gratuitous SEGV.
121
122 * tests/conflicts.at (Solved SR Conflicts)
123 (Unresolved SR Conflicts): Adjust.
124 * tests/regression.at (Web2c Actions): Adjust.
125
1262002-04-08 Akim Demaille <akim@epita.fr>
127
128 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
129 Adding #line.
130 Remove the duplicate `typedefs'.
131 (RhsNumberType): Fix the declaration and various other typos.
132 Use __ofile__.
133 * data/bison.simple: Use __ofile__.
134 * src/scan-skel.l: Handle __ofile__.
135
1362002-04-08 Akim Demaille <akim@epita.fr>
137
138 * src/gram.h (item_number_t): New, the type of item numbers in
139 RITEM. Note that it must be able to code symbol numbers as
140 positive number, and the negation of rule numbers as negative
141 numbers.
142 Adjust all dependencies (pretty many).
143 * src/reduce.c (rule): Remove this `short *' pointer: use
144 item_number_t.
145 * src/system.h (MINSHORT, MAXSHORT): Remove.
146 Include `limits.h'.
147 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
148 (shortcpy): Remove.
149 (MAXTABLE): Move to...
150 * src/output.c (MAXTABLE): here.
151 (prepare_rules): Use output_int_table to output rhs.
152 * data/bison.simple, data/bison.c++: Adjust.
153 * tests/torture.at (Big triangle): Move the limit from 254 to
154 500.
155 * tests/regression.at (Web2c Actions): Ajust.
156
157 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
158 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
159 passes, but produces negative #line number, once fixed, GCC is
160 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
161 C), it passes.
162 * src/state.h (state_h): Code input lines on ints, not shorts.
163
1642002-04-08 Akim Demaille <akim@epita.fr>
165
166 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
167 and then the grammar.
168
1692002-04-08 Akim Demaille <akim@epita.fr>
170
171 * src/system.h: No longer using strndup.
172
1732002-04-07 Akim Demaille <akim@epita.fr>
174
175 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
176 * src/output.c (output_table_data): Return the longest number.
177 (prepare_tokens): Output `token_number_max').
178 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
179 New.
180 Use them to define yy_token_number_type/TokenNumberType.
181 Use this type for yytranslate.
182 * tests/torture.at (Big triangle): Push the limit from 124 to
183 253.
184 * tests/regression.at (Web2c Actions): Adjust.
185
1862002-04-07 Akim Demaille <akim@epita.fr>
187
188 * tests/torture.at (Big triangle): New.
189 (GNU AWK Grammar, GNU Cim Grammar): Move to...
190 * tests/existing.at: here.
191
1922002-04-07 Akim Demaille <akim@epita.fr>
193
194 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
195 nritems.
196 Adjust dependencies.
197
1982002-04-07 Akim Demaille <akim@epita.fr>
199
200 * src/reader.c: Normalize increments to prefix form.
201
2022002-04-07 Akim Demaille <akim@epita.fr>
203
204 * src/reader.c, symtab.c: Remove debugging code.
205
2062002-04-07 Akim Demaille <akim@epita.fr>
207
208 Rename all the `bucket's as `symbol_t'.
209
210 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
211 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
212 * src/symtab.c, src/symtab.h (bucket): Rename as...
213 (symbol_t): this.
214 (symbol_list_new, bucket_check_defined, bucket_make_alias)
215 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
216 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
217 (buckets_new, buckets_free, buckets_do): Rename as...
218 (symbol_list_new, symbol_check_defined, symbol_make_alias)
219 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
220 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
221 (symbols_new, symbols_free, symbols_do): these.
222
2232002-04-07 Akim Demaille <akim@epita.fr>
224
225 Use lib/hash for the symbol table.
226
227 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
228 EOF.
229 * src/lex.c (lex): Set the `number' member of new terminals.
230 * src/reader.c (bucket_check_defined, bucket_make_alias)
231 (bucket_check_alias_consistence, bucket_translation): New.
232 (reader, grammar_free, readgram, token_translations_init)
233 (packsymbols): Adjust.
234 (reader): Number the predefined tokens.
235 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
236 for predefined tokens.
237 * src/symtab.h (bucket): Remove all the hash table related
238 members.
239 * src/symtab.c (symtab): Replace by...
240 (bucket_table): this.
241 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
242 (buckets_new, buckets_do): New.
243
2442002-04-07 Akim Demaille <akim@epita.fr>
245
246 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
247 (start_symbol, max_user_token_number, semantic_parser)
248 (error_token_number): Initialize.
249 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
250 Initialize.
251 (reader): Don't.
252 (errtoken, eoftoken, undeftoken, axiom): Extern.
253
2542002-04-07 Akim Demaille <akim@epita.fr>
255
256 * src/gram.h (rule_s): prec and precsym are now pointers
257 to the bucket giving the priority/associativity.
258 Member `associativity' removed: useless.
259 * src/reduce.c, src/conflicts.c: Adjust.
260
2612002-04-07 Akim Demaille <akim@epita.fr>
262
263 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
264 Properly escape the symbols' TAG when outputting them.
265
2662002-04-07 Akim Demaille <akim@epita.fr>
267
268 * src/lalr.h (LA): Is a bitsetv, not bitset*.
269
2702002-04-07 Akim Demaille <akim@epita.fr>
271
272 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
273 (LArule): this, which is an array to rule_t*.
274 * src/print.c, src/conflicts.c: Adjust.
275
2762002-04-07 Akim Demaille <akim@epita.fr>
277
278 * src/gram.h (rule_t): Rename `number' as `user_number'.
279 `number' is a new member.
280 Adjust dependencies.
281 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
282
2832002-04-07 Akim Demaille <akim@epita.fr>
284
285 As a result of the previous patch, it is no longer needed
286 to reorder ritem itself.
287
288 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
289
2902002-04-07 Akim Demaille <akim@epita.fr>
291
292 Be sure never to walk through RITEMS, but use only data related to
293 the rules themselves. RITEMS should be banished.
294
295 * src/output.c (output_token_translations): Rename as...
296 (prepare_tokens): this.
297 In addition to `translate', prepare the muscles `tname' and
298 `toknum', which were handled by...
299 (output_rule_data): this.
300 Remove, and move the remainder of its outputs into...
301 (prepare_rules): this new routines, which also merges content from
302 (output_gram): this.
303 (prepare_rules): Be sure never to walk through RITEMS.
304 (output_stos): Rename as...
305 (prepare_stos): this.
306 (output): Always invoke prepare_states, after all, just don't use it
307 in the output if you don't need it.
308
3092002-04-07 Akim Demaille <akim@epita.fr>
310
311 * src/LR0.c (new_state): Display `nstates' as the name of the
312 newly created state.
313 Adjust to initialize first_state and last_state if needed.
314 Be sure to distinguish the initial from the final state.
315 (new_states): Create the itemset of the initial state, and use
316 new_state.
317 * src/closure.c (closure): Now that the initial state has its
318 items properly set, there is no need for a special case when
319 creating `ruleset'.
320
321 As a result, now the rule 0, reducing to $axiom, is visible in the
322 outputs. Adjust the test suite.
323
324 * tests/conflicts.at (Solved SR Conflicts)
325 (Unresolved SR Conflicts): Adjust.
326 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
327 * tests/conflicts.at (S/R in initial): New.
328
3292002-04-07 Akim Demaille <akim@epita.fr>
330
331 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
332 the RHS of the rules.
333 * src/output.c (output_gram): Likewise.
334
3352002-04-07 Akim Demaille <akim@epita.fr>
336
337 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
338 bucket.
339 Adjust all dependencies.
340 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
341 `number' of the buckets too.
342 * src/gram.h: Include `symtab.h'.
343 (associativity): Move to...
344 * src/symtab.h: here.
345 No longer include `gram.h'.
346
3472002-04-07 Akim Demaille <akim@epita.fr>
348
349 * src/gram.h, src/gram.c (rules_rhs_length): New.
350 (ritem_longest_rhs): Use it.
351 * src/gram.h (rule_t): `number' is a new member.
352 * src/reader.c (packgram): Set it.
353 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
354 the end of `rules', and count them out of `nrules'.
355 (reduce_output, dump_grammar): Adjust.
356 * src/print.c (print_grammar): It is no longer needed to check for
357 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
358 * tests/reduce.at (Reduced Automaton): New test.
359
3602002-04-07 Akim Demaille <akim@epita.fr>
361
362 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
363 lacking `+ 1' to nrules, Bison reported as useless a token if it
364 was used solely to set the precedence of the last rule...
365
3662002-04-07 Akim Demaille <akim@epita.fr>
367
368 * data/bison.c++, data/bison.simple: Don't output the current file
369 name in #line, to avoid useless diffs between two identical
370 outputs under different names.
371
3722002-04-07 Akim Demaille <akim@epita.fr>
373
374 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
375 Normalize loops to using `< nrules + 1', not `<= nrules'.
376
3772002-04-07 Akim Demaille <akim@epita.fr>
378
379 * TODO: Update.
380
3812002-04-07 Akim Demaille <akim@epita.fr>
382
383 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
384 bucket.value as bucket.number.
385
3862002-04-07 Akim Demaille <akim@epita.fr>
387
388 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
389 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
390 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
391 RHS, instead of being an index in RITEMS.
392
3932002-04-04 Paul Eggert <eggert@twinsun.com>
394
395 * doc/bison.texinfo: Update copyright date.
396 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
397 (Symbols): Warn about running Bison in one character set,
398 but compiling and/or running in an incompatible one.
399 Warn about character code 256, too.
400
4012002-04-03 Paul Eggert <eggert@twinsun.com>
402
403 * src/bison.data (YYSTACK_ALLOC): Depend on whether
404 YYERROR_VERBOSE is nonzero, not whether it is defined.
405
406 Merge changes from bison-1_29-branch.
407
4082002-03-20 Paul Eggert <eggert@twinsun.com>
409
410 Merge fixes from Debian bison_1.34-1.diff.
411
412 * configure.in (AC_PREREQ): 2.53.
413
4142002-03-20 Akim Demaille <akim@epita.fr>
415
416 * src/conflicts.c (log_resolution): Argument `resolution' is const.
417
4182002-03-19 Paul Eggert <eggert@twinsun.com>
419
420 * src/bison.simple (YYCOPY): New macro.
421 (YYSTACK_RELOCATE): Use it.
422 Remove Type arg; no longer needed. All callers changed.
423 (yymemcpy): Remove; no longer needed.
424
425 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
426 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
427
4282002-03-19 Akim Demaille <akim@epita.fr>
429
430 Test and fix the #line outputs.
431
432 * tests/atlocal.at (GCC): New.
433 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
434 (Prologue synch line, ,%union synch line, Postprologue synch line)
435 (Action synch line, Epilogue synch line): New tests.
436 * src/reader.c (parse_union_decl): Define the muscle stype_line.
437 * data/bison.simple, data/bison.c++: Use it.
438
4392002-03-19 Akim Demaille <akim@epita.fr>
440
441 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
442 (Solved SR Conflicts, %expect not enough, %expect right)
443 (%expect too much): Move to...
444 * tests/conflicts.at: this new file.
445
4462002-03-19 Akim Demaille <akim@epita.fr>
447
448 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
449 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
450 that we can move to enums for instance.
451 * src/output.c (token_definitions_output): Output a list of
452 `token-name, token-number' instead of the #define.
453 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
454
4552002-03-14 Akim Demaille <akim@epita.fr>
456
457 Use Gettext 0.11.1.
458
4592002-03-09 Robert Anisko <robert@lrde.epita.fr>
460
461 * data/bison.c++: Make the user able to add members to the generated
462 parser by subclassing.
463
4642002-03-05 Robert Anisko <robert@lrde.epita.fr>
465
466 * src/reader.c (read_additionnal_code): `c' should be an integer, not
467 a character.
468 Reported by Nicolas Tisserand and Nicolas Burrus.
469
4702002-03-04 Robert Anisko <robert@lrde.epita.fr>
471
472 * src/reader.c: Warn about lacking semi-colons, do not complain.
473
4742002-03-04 Robert Anisko <robert@lrde.epita.fr>
475
476 * data/bison.c++: Remove a debug line.
477
4782002-03-04 Robert Anisko <robert@lrde.epita.fr>
479
480 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
481 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
482 provide a default implementation.
483
4842002-03-04 Akim Demaille <akim@epita.fr>
485
486 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
487 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
488 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
489 * tests/semantic.at (Parsing Guards): Similarly.
490 * src/reader.at (readgram): Complain if the last rule is not ended
491 with a semi-colon.
492
4932002-03-04 Akim Demaille <akim@epita.fr>
494
495 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
496 * src/closure.c: here.
497 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
498 RTC.
499 * src/warshall.h, src/warshall.c: Remove.
500 * tests/sets.at (Broken Closure): Adjust.
501
5022002-03-04 Akim Demaille <akim@epita.fr>
503
504 * src/output.c (output_skeleton): tempdir is const.
505 bytes_read is unused.
506
5072002-03-04 Akim Demaille <akim@epita.fr>
508
509 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
510 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
511 Update.
512 From Michael Hayes.
513
5142002-03-04 Akim Demaille <akim@epita.fr>
515
516 * src/closure.c (closure): `r' is unused.
517
5182002-03-04 Akim Demaille <akim@epita.fr>
519
520 * tests/sets.at (Broken Closure): Add the ending `;'.
521 * src/reader.at (readgram): Complain if a rule is not ended with a
522 semi-colon.
523
5242002-03-04 Akim Demaille <akim@epita.fr>
525
526 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
527 (count_sr_conflicts): Use bitset_count.
528 * src/reduce.c (inaccessable_symbols): Ditto.
529 (bits_size): Remove.
530 * src/warshall.h, src/warshall.c: Convert to bitsetv.
531
5322002-03-04 Akim Demaille <akim@epita.fr>
533
534 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
535 * src/reduce.c: Remove the `bitset_zero's following the
536 `bitset_create's, as now it is performed by the latter.
537
5382002-03-04 Akim Demaille <akim@epita.fr>
539
540 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
541 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
542 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
543 latest sources from Michael.
544
5452002-03-04 Akim Demaille <akim@epita.fr>
546
547 * src/output.c (output): Don't free the grammar.
548 * src/reader.c (grammar_free): New.
549 * src/main.c (main): Call it and don't free symtab here.
550
5512002-03-04 Akim Demaille <akim@epita.fr>
552
553 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
554 before returning.
555 Reported by Benoit Perrot.
556
5572002-03-04 Akim Demaille <akim@epita.fr>
558
559 Use bitset operations when possible, not loops over bits.
560
561 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
562 bitset_or.
563 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
564 * src/reduce.c (useless_nonterminals): Formatting changes.
565 * src/warshall.c (TC): Use bitset_or.
566
5672002-03-04 Akim Demaille <akim@epita.fr>
568
569 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
570 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
571 Ditto.
572
5732002-03-04 Akim Demaille <akim@epita.fr>
574
575 * src/lalr.c (F): Now a bitset*.
576 Adjust all dependencies.
577
5782002-03-04 Akim Demaille <akim@epita.fr>
579
580 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
581 Adjust all dependencies.
582
5832002-03-04 Akim Demaille <akim@epita.fr>
584
585 * src/L0.c, src/LR0.h (nstates): Be size_t.
586 Adjust comparisons (signed vs unsigned).
587 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
588 bitset*.
589 Adjust all dependencies.
590
5912002-03-04 Akim Demaille <akim@epita.fr>
592
593 * src/closure.c (firsts): Now, also a bitset.
594 Adjust all dependencies.
595 (varsetsize): Remove, now unused.
596 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
597
5982002-03-04 Akim Demaille <akim@epita.fr>
599
600 * src/print.c: Convert to use bitset.h, not hand coded iterations
601 over ints.
602
6032002-03-04 Akim Demaille <akim@epita.fr>
604
605 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
606
6072002-03-04 Akim Demaille <akim@epita.fr>
608
609 * src/closure.c (ruleset): Be a bitset.
610 (rulesetsize): Remove.
611
6122002-03-04 Akim Demaille <akim@epita.fr>
613
614 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
615 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
616 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
617 * src/closure.c (fderives): Be an array of bitsets.
618
6192002-02-28 Robert Anisko <robert@lrde.epita.fr>
620
621 * data/bison.c++: Merge the two generated headers. Insert a copyright
622 notice in each output file.
623
6242002-02-28 Akim Demaille <akim@epita.fr>
625
626 * data/bison.c++: Copy the prologue of bison.simple to fetch
627 useful M4 definitions, such as b4_header_guard.
628
6292002-02-25 Akim Demaille <akim@epita.fr>
630
631 * src/getargs.c (version): Give the name of the authors, and use a
632 translator friendly scheme for the bgr
633 copyright notice.
634
6352002-02-25 Akim Demaille <akim@epita.fr>
636
637 * src/output.c (header_output): Remove, now handled completely via
638 M4.
639
6402002-02-25 Akim Demaille <akim@epita.fr>
641
642 * m4/m4.m4: New, from CVS Autoconf.
643 * configure.in: Invoke it.
644 * src/output.c (output_skeleton): Use its result instead of the
645 hard coded name.
646
6472002-02-25 Akim Demaille <akim@epita.fr>
648
649 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
650 Fileutils 4.1.5.
651 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
652 * src/output.c (output_skeleton): Use mkstemp to create a real
653 temporary file.
654 Move the filling of `skeleton' and its muscle to...
655 (prepare): here.
656 (output): Move the definition of the prologue muscle to...
657 (prepare): here.
658 * src/system.h (DEFAULT_TMPDIR): New.
659
6602002-02-14 Paul Eggert <eggert@twinsun.com>
661
662 Remove the support for C++ namespace cleanliness; it was
663 causing more problems than it was curing, since it didn't work
664 properly on some nonstandard C++ compilers. This can wait
665 for a proper C++ parser.
666
667 * NEWS: Document this.
668 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
669 of C++, as it's treated like C now.
670 * src/bison.simple (YYSTD): Remove.
671 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
672 Treat C++ just like Standard C instead of trying to support
673 namespace cleanliness.
674
6752002-02-14 Akim Demaille <akim@epita.fr>
676
677 * tests/regression.at (else): Adjust to Andreas' change.
678
6792002-02-14 Akim Demaille <akim@epita.fr>
680
681 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
682
6832002-02-13 Andreas Schwab <schwab@suse.de>
684
685 * src/output.c (output_rule_data): Don't output NULL, it might
686 not be defined yet.
687
6882002-02-11 Robert Anisko <robert@lrde.epita.fr>
689
690 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
691 (Copyright notice): Update.
692
6932002-02-11 Akim Demaille <akim@epita.fr>
694
695 * tests/regression.at (%nonassoc and eof): Don't include
696 nonportable headers.
697
6982002-02-08 Robert Anisko <robert@lrde.epita.fr>
699
700 * data/bison.c++: Correct error recovery. Make the user able to
701 initialize the starting location.
702
7032002-02-07 Akim Demaille <akim@epita.fr>
704
705 * tests/input.at: New.
706
7072002-02-07 Robert Anisko <robert@lrde.epita.fr>
708
709 * data/bison.c++: Replace some direct m4 expansions by constants. Be
710 more consistent when naming methods and variables. Put preprocessor
711 directives around tables only needed for debugging.
712
7132002-02-07 Robert Anisko <robert@lrde.epita.fr>
714
715 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
716 C++ parsers.
717 (yy::b4_name::parse): Use print_.
718
7192002-02-07 Robert Anisko <robert@lrde.epita.fr>
720
721 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
722
7232002-02-07 Robert Anisko <robert@lrde.epita.fr>
724
725 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
726 C++ parsers.
727 (yy::b4_name::parse): Build verbose error messages, and use error_.
728
7292002-02-06 Robert Anisko <robert@lrde.epita.fr>
730
731 * data/bison.c++: Fix m4 quoting in comments.
732
7332002-02-06 Robert Anisko <robert@lrde.epita.fr>
734
735 * data/bison.c++: Adjust the parser code. Fix some muscles that were
736 not expanded by m4.
737
7382002-02-05 Akim Demaille <akim@epita.fr>
739
740 * data/bison.c++: Adjust to the M4 back end.
741 More is certainly needed.
742
7432002-02-05 Akim Demaille <akim@epita.fr>
744
745 Give a try to M4 as a back end.
746
747 * lib/readpipe.c: New, from wdiff.
748 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
749 BISON_HAIRY.
750 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
751 specific values. Now it is m4 that performs the lookup.
752 * src/parse-skel.y: Remove.
753 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
754 * src/output.c (actions_output, guards_output)
755 (token_definitions_output): No longer keeps track of the output
756 line number, hence remove the second argument.
757 (guards_output): Check against the guard member of a rule, not the
758 action member.
759 Adjust callers.
760 (output_skeleton): Don't look for the skeleton location, let m4 do
761 that.
762 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
763 file will be used.
764 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
765 (prepare): Given that for the time being changesyntax is not
766 usable in M4, rename the muscles using `-' to `_'.
767 Define `defines_flag', `output_parser_name' and `output_header_name'.
768 * src/output.h (actions_output, guards_output)
769 (token_definitions_output): Adjust prototypes.
770 * src/scan-skel.l: Instead of scanning the skeletons, it now
771 processes the output of m4: `__oline__' and `#output'.
772 * data/bison.simple: Adjust to be used by M4(sugar).
773 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
774 to date.
775 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
776 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
777 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
778 shamelessly stolen from CVS Autoconf.
779
7802002-02-05 Akim Demaille <akim@epita.fr>
781
782 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
783 * configure.in: Check for the declarations of free and malloc.
784 * src/muscle_tab.c: Adjust.
785
7862002-02-05 Akim Demaille <akim@epita.fr>
787
788 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
789 which have no values.
790
7912002-02-05 Akim Demaille <akim@epita.fr>
792
793 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
794 * data/: here.
795
7962002-01-29 Paul Eggert <eggert@twinsun.com>
797
798 * src/bison.simple (YYSIZE_T): Do not define merely because
799 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
800 On some platforms, <alloca.h> does not declare YYSTD (size_t).
801
8022002-01-27 Akim Demaille <akim@epita.fr>
803
804 Fix `%nonassoc and eof'.
805
806 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
807 which were not properly copied! Replace
808 memcpy (res->errs, src->errs, src->nerrs);
809 with
810 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
811 !!!
812 * tests/regression.at (%nonassoc and eof): Adjust to newest
813 Autotest: `.' is not in the PATH.
814
8152002-01-27 Akim Demaille <akim@epita.fr>
816
817 * tests/sets.at (AT_EXTRACT_SETS): New.
818 (Nullable): Use it.
819 (Firsts): New.
820
8212002-01-26 Akim Demaille <akim@epita.fr>
822
823 * tests/actions.at, tests/calc.at, tests/headers.at,
824 * tests/torture.at: Adjust to the newest Autotest which no longer
825 forces `.' in the PATH.
826
8272002-01-25 Akim Demaille <akim@epita.fr>
828
829 * tests/regression.at (%nonassoc and eof): New.
830 Suggested by Robert Anisko.
831
8322002-01-24 Akim Demaille <akim@epita.fr>
833
834 Bison dumps core when trying to complain about broken input files.
835 Reported by Cris van Pelt.
836
837 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
838 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
839 into...
840 (Invalid inputs): Strengthen: exercise parse_percent_token.
841
8422002-01-24 Robert Anisko <robert.anisko@epita.fr>
843
844 * src/Makefile.am: Add bison.c++.
845 * src/bison.c++: New skeleton.
846
8472002-01-21 Paolo Bonzini <bonzini@gnu.org>
848
849 * po/it.po: New.
850
8512002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
852
853 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
854
8552002-01-20 Marc Autret <marc@gnu.org>
856
857 * src/files.c (compute_output_file_names): Fix
858
8592002-01-20 Marc Autret <marc@gnu.org>
860
861 * tests/output.at: New test.
862 * src/files.c (compute_base_names): Don't map extensions when
863 the YACC flag is set, use defaults.
864 Reported by Evgeny Stambulchik.
865
8662002-01-20 Marc Autret <marc@gnu.org>
867
868 * src/system.h: Need to define __attribute__ away for non-GCC
869 compilers as well (i.e. the vendor C compiler).
870 Suggested by Albert Chin-A-Young.
871
8722002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
873
874 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
875 canonical definition.
876 * src/system.h: Use the canonical definition for PARAMS (avoids
877 a conflict with the macro from lib/hash.h).
878
8792002-01-11 Akim Demaille <akim@epita.fr>
880
881 * configure.in: Use AC_FUNC_STRNLEN.
882 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
883
8842002-01-09 Akim Demaille <akim@epita.fr>
885
886 * src/files.c, src/files.h (output_infix): New.
887 (tab_extension): Remove.
888 (compute_base_names): Compute the former, drop the latter.
889 * src/output.c (prepare): Insert the muscles `output-infix', and
890 `output-suffix'.
891 * src/parse-skel.y (string, string.1): New.
892 (section.header): Use it.
893 (section.yacc): Remove.
894 (prefix): Remove too.
895 * src/scan-skel.l: Adjust.
896 * src/bison.simple, src/bison.hairy: Adjust.
897
8982002-01-09 Akim Demaille <akim@epita.fr>
899
900 * configure.in (WERROR_CFLAGS): Compute it.
901 * src/Makefile.am (CFLAGS): Pass it.
902 * tests/atlocal.in (CFLAGS): Idem.
903 * src/files.c: Fix a few warnings.
904 (get_extension_index): Remove, unused.
905
9062002-01-08 Akim Demaille <akim@epita.fr>
907
908 * src/getargs.c (AS_FILE_NAME): New.
909 (getargs): Use it to convert DOSish file names.
910 * src/files.c (base_name): Rename as full_base_name to avoid
911 clashes with `base_name ()'.
912 (filename_split): New.
913 (compute_base_names): N-th rewrite, using filename_split.
914
9152002-01-08 Akim Demaille <akim@epita.fr>
916
917 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
918 New, stolen from the Fileutils 4.1.
919 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
920 * configure.in: Check for the presence of memrchr, and of its
921 prototype.
922
9232002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
924
925 * lib/hash.h (__P): Added definition for this macro.
926 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
927 BUILT_SOURCES, to ensure they are generated first.
928 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
929 %error-verbose to allow bootstrapping with bison 1.30x.
930
9312002-01-06 Akim Demaille <akim@epita.fr>
932
933 * src/reader.c (parse_braces): Don't fetch the next char, the
934 convention is to fetch on entry.
935 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
936 'switch' without a following semicolon.
937 * tests/regression.at (braces parsing): New.
938
9392002-01-06 Akim Demaille <akim@epita.fr>
940
941 Bison is dead wrong in its RR conflict reports.
942
943 * tests/torture.at (GNU Cim Grammar): New.
944 * src/conflicts.c (count_rr_conflicts): Fix.
945
9462002-01-06 Akim Demaille <akim@epita.fr>
947
948 Creating package.m4 from configure.ac causes too many problems.
949
950 * tests/Makefile.am (package.m4): Create it by hand,
951 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
952
9532002-01-06 Akim Demaille <akim@epita.fr>
954
955 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
956 skeleton.h.
957
9582002-01-04 Paul Eggert <eggert@twinsun.com>
959
960 * doc/bison.texinfo (Debugging):
961 Remove YYSTDERR; it's no longer defined or used.
962 Also, s/cstdio.h/cstdio/.
963
9642002-01-03 Akim Demaille <akim@epita.fr>
965
966 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
967
9682002-01-03 Akim Demaille <akim@epita.fr>
969
970 * src/parse-skel.y (process_skeleton): Don't bind the parser's
971 tracing code to --trace, wait for a better --trace option, with
972 args.
973
9742002-01-03 Akim Demaille <akim@epita.fr>
975
976 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
977 The ISO C++ standard is extremely clear about it: stderr is
978 considered a macro, not a regular symbol (see table 94 `Header
979 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
980 Therefore std:: does not apply to it. It still does with fprintf.
981 Also, s/cstdio.h/cstdio/.
982
9832002-01-03 Akim Demaille <akim@epita.fr>
984
985 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
986 for non system headers.
987
9882002-01-02 Akim Demaille <akim@epita.fr>
989
990 Equip the skeleton chain with location tracking, runtime trace,
991 pure parser and scanner.
992
993 * src/parse-skel.y: Request a pure parser, locations, and prefix
994 renaming.
995 (%union): Having several members with the same type does not help
996 type mismatches, simplify.
997 (YYPRINT, yyprint): New.
998 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
999 (skel_error): this.
1000 Handle locations.
1001 * src/scan-skel.l: Adjust to these changes.
1002 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1003 (LOCATION_PRINT, skel_control_t): New.
1004
10052001-12-30 Akim Demaille <akim@epita.fr>
1006
1007 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1008 replace `gb' with BLANKS.
1009 * src/scan-skel.l: Adjust.
1010
10112001-12-30 Akim Demaille <akim@epita.fr>
1012
1013 * src/system.h: We don't need nor want bcopy.
1014 Throw away MS-DOS crap: we don't need getpid.
1015 * configure.in: We don't need strndup. It was even causing
1016 problems: because Flex includes the headers *before* us,
1017 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1018 not visible.
1019 * lib/xstrndup.c: New.
1020 * src/scan-skel.l: Use it.
1021 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1022 * src/parse-skel.y: Use %directives instead of #defines.
1023
10242001-12-30 Akim Demaille <akim@epita.fr>
1025
1026 * src/skeleton.h: New.
1027 * src/output.c (output_parser, output_master_parser): Remove, dead
1028 code.
1029 * src/output.h (get_lines_number, actions_output, guards_output)
1030 (token_definitions_output): Prototype them.
1031 * src/parse-skel.y: Add the license notice.
1032 Include output.h and skeleton.h.
1033 (process_skeleton): Returns void, and takes a single parameter.
1034 * src/scan-skel.l: Add the license notice.
1035 Include skeleton.h.
1036 Don't use %option yylineno: it seems that then Flex imagines
1037 REJECT has been used, and therefore it won't reallocate its
1038 buffers (which makes no other sense to me than a bug). It results
1039 in warnings for `unused: yy_flex_realloc'.
1040
10412001-12-30 Robert Anisko <robert.anisko@epita.fr>
1042
1043 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1044 (MUSCLE_INSERT_PREFIX): ...to there.
1045 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1046 (MUSCLE_INSERT_PREFIX): Move from here...
1047
1048 * src/bison.hairy: Add a section directive. Put braces around muscle
1049 names. This parser skeleton is still broken, but Bison should not
1050 choke on a bad muscle 'syntax'.
1051 * src/bison.simple: Add a section directive. Put braces around muscle
1052 names.
1053
1054 * src/files.h (strsuffix, stringappend): Add declarations.
1055 (tab_extension): Add declaration.
1056 (short_base_name): Add declaration.
1057
1058 * src/files.c (strsuffix, stringappend): No longer static. These
1059 functions are used in the skeleton parser.
1060 (tab_extension): New.
1061 (compute_base_names): Use the computations done in this function
1062 to guess if the generated parsers should have '.tab' in their
1063 names.
1064 (short_base_name): No longer static.
1065
1066 * src/output.c (output_skeleton): New.
1067 (output): Disable call to output_master_parser, and give a try to
1068 a new skeleton handling system.
1069 (guards_output, actions_output): No longer static.
1070 (token_definitions_output, get_lines_number): No longer static.
1071
1072 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1073
1074 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1075 parse-skel.y.
1076
1077 * src/parse-skel.y: New file.
1078 * src/scan-skel.l: New file.
1079
10802001-12-29 Akim Demaille <akim@epita.fr>
1081
1082 %name-prefix is broken.
1083
1084 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1085 Adjust all dependencies.
1086 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1087 %name-prefix.
1088
1089 Renaming yylval but not yylloc is not consistent. Now we do.
1090
1091 * src/bison.simple: Prefix yylloc if used.
1092 * doc/bison.texinfo (Decl Summary): Document that.
1093
10942001-12-29 Akim Demaille <akim@epita.fr>
1095
1096 * doc/bison.texinfo: Promote `%long-directive' over
1097 `%long_directive'.
1098 Remove all references to fixed-output-files, yacc is enough.
1099
11002001-12-29 Akim Demaille <akim@epita.fr>
1101
1102 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1103 user prologue. These are defaults.
1104 * tests/actions.at (Mid-rule actions): Make sure the user can
1105 define YYDEBUG and YYERROR_VERBOSE.
1106
11072001-12-29 Akim Demaille <akim@epita.fr>
1108
1109 * src/output.c (header_output): Don't forget to export YYLTYPE and
1110 yylloc.
1111 * tests/headers.at (export YYLTYPE): New, make sure it does.
1112 * tests/regression.at (%union and --defines, Invalid CPP headers):
1113 Move to...
1114 * tests/headers.at: here.
1115
11162001-12-29 Akim Demaille <akim@epita.fr>
1117
1118 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1119
11202001-12-29 Akim Demaille <akim@epita.fr>
1121
1122 * tests/actions.at (Mid-rule actions): Output on a single line
1123 instead of several.
1124
11252001-12-29 Akim Demaille <akim@epita.fr>
1126
1127 * doc/bison.texinfo: Formatting changes.
1128
11292001-12-29 Akim Demaille <akim@epita.fr>
1130
1131 Don't store the token defs in a muscle, just be ready to output it
1132 on command. Now possible via `symbols'. Fixes a memory leak.
1133
1134 * src/output.c (token_definitions_output): New.
1135 (output_parser, header_output): Use it.
1136 * src/reader.c (symbols_save): Remove.
1137
11382001-12-29 Akim Demaille <akim@epita.fr>
1139
1140 * src/bison.simple: Do not provide a default for YYSTYPE and
1141 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1142 default.
1143
11442001-12-29 Akim Demaille <akim@epita.fr>
1145
1146 Mid-rule actions are simply... ignored!
1147
1148 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1149 the empty-rule associated to the dummy symbol, not to the host
1150 rule.
1151 * tests/actions.at (Mid-rule actions): New.
1152
11532001-12-29 Akim Demaille <akim@epita.fr>
1154
1155 Memory leak.
1156
1157 * src/reader.c (reader): Free grammar.
1158
11592001-12-29 Akim Demaille <akim@epita.fr>
1160
1161 Memory leak.
1162
1163 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1164 since it allocates it for each state, although only one is needed.
1165 (allocate_storage): Do it here.
1166
11672001-12-29 Akim Demaille <akim@epita.fr>
1168
1169 * src/options.h, src/options.c (create_long_option_table): Rename
1170 as...
1171 (long_option_table_new): this, with a clearer prototype.
1172 (percent_table): Remove, unused,
1173 * src/getargs.c (getargs): Adjust.
1174
11752001-12-29 Akim Demaille <akim@epita.fr>
1176
1177 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1178 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1179 as states.
1180
11812001-12-29 Akim Demaille <akim@epita.fr>
1182
1183 * src/lalr.c (build_relations): Rename `states' as `states1'.
1184 Sorry, I don't understand exactly what it is, no better name...
1185
11862001-12-29 Akim Demaille <akim@epita.fr>
1187
1188 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1189 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1190 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1191 as rules.
1192
11932001-12-29 Akim Demaille <akim@epita.fr>
1194
1195 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1196 ago.
1197
11982001-12-29 Akim Demaille <akim@epita.fr>
1199
1200 * src/reader.c, src/reader.h (user_toknums): Remove.
1201 Adjust all users to use symbols[i]->user_token_number.
1202
12032001-12-29 Akim Demaille <akim@epita.fr>
1204
1205 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1206 Adjust all users to use symbols[i]->prec or ->assoc.
1207
12082001-12-29 Akim Demaille <akim@epita.fr>
1209
1210 * src/reader.c, src/reader.h (tags): Remove.
1211 Adjust all users to use symbols[i]->tag.
1212
12132001-12-29 Akim Demaille <akim@epita.fr>
1214
1215 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1216 and rule_table.
1217 * src/reader.c (packsymbols): Fill this table.
1218 Drop sprec.
1219 * src/conflicts.c (resolve_sr_conflict): Adjust.
1220 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1221 single table.
1222 Use symbols[i]->tag instead of tags[i].
1223
12242001-12-29 Akim Demaille <akim@epita.fr>
1225
1226 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1227 In addition, put a comment in there, to replace...
1228 * tests/regression.at (%union and C comments): Remove.
1229
12302001-12-29 Akim Demaille <akim@epita.fr>
1231
1232 * tests/regression.at (Web2c Actions): Blindly move the actual
1233 output as expected output. The contents *seem* right to me, but I
1234 can't pretend reading perfectly parser tables... Nonetheless, all
1235 the other tests pass correctly, the table look OK, even though the
1236 presence of `$axiom' is to be noted: AFAICS it is useless (but
1237 harmless).
1238
12392001-12-29 Akim Demaille <akim@epita.fr>
1240
1241 * src/reader.c (readgram): Don't add the rule 0 if there were no
1242 rules read. In other words, add it _after_ having performed
1243 grammar sanity checks.
1244 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1245
12462001-12-29 Akim Demaille <akim@epita.fr>
1247
1248 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1249 visible, and some states have now a different number.
1250
12512001-12-29 Akim Demaille <akim@epita.fr>
1252
1253 * src/reader.c (readgram): Bind the initial rule's lineno to that
1254 of the first rule.
1255 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1256 (Solved SR Conflicts): Adjust rule 0's line number.
1257
12582001-12-29 Akim Demaille <akim@epita.fr>
1259
1260 Fix the `GAWK Grammar' failure.
1261
1262 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1263 the reductions of the first state which was mistakenly confused
1264 with the final state because precisely final_state was initialized
1265 to 0.
1266 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1267 now noticed by Bison.
1268 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1269 have a reduction on $default.
1270
12712001-12-29 Akim Demaille <akim@epita.fr>
1272
1273 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1274 rule line numbers.
1275 * src/closure.c (print_closure): Likewise.
1276 * src/derives.c (print_derives): Likewise.
1277 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1278 now.
1279
12802001-12-29 Akim Demaille <akim@epita.fr>
1281
1282 * src/lalr.c (lookaheads_print): New.
1283 (lalr): Call it when --trace-flag.
1284 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1285 are dumped.
1286
12872001-12-29 Akim Demaille <akim@epita.fr>
1288
1289 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1290 when walking through ritem, even via rule->rhs.
1291 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1292 (useful_production, useless_nonterminals): Likewise.
1293 (reduce_grammar_tables): Likewise, plus update nritems.
1294 * src/nullable.c (set_nullable): Likewise.
1295 * src/lalr.c (build_relations): Likewise.
1296 * tests/sets.at (Nullable): Adjust.
1297 Fortunately, now, the $axiom is no longer nullable.
1298
12992001-12-29 Akim Demaille <akim@epita.fr>
1300
1301 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1302 the 0-sentinel.
1303 * src/gram.c (ritem_longest_rhs): Likewise.
1304 * src/reduce.c (nonterminals_reduce): Likewise.
1305 * src/print_graph.c (print_graph): Likewise.
1306 * src/output.c (output_rule_data): Likewise.
1307 * src/nullable.c (set_nullable): Likewise.
1308
13092001-12-29 Akim Demaille <akim@epita.fr>
1310
1311 * src/output.c: Comment changes.
1312
13132001-12-27 Paul Eggert <eggert@twinsun.com>
1314
1315 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1316 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1317 Sparc, as they were causing more porting problems than the
1318 (minor) performance improvement was worth.
1319
1320 Also, catch up with 1.31's YYSTD.
1321
13222001-12-27 Akim Demaille <akim@epita.fr>
1323
1324 * src/output.c (output_gram): Rely on nritems, not the
1325 0-sentinel. See below.
1326 Use -1 as separator, not 0.
1327 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1328 Rely on -1 as separator in yyrhs, instead of 0.
1329 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1330 twice `Now at end of input', therefore there are two lines less to
1331 expect.
1332
13332001-12-27 Akim Demaille <akim@epita.fr>
1334
1335 * tests/regression.at (Unresolved SR Conflicts):
1336 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1337 below.
1338
13392001-12-27 Akim Demaille <akim@epita.fr>
1340
1341 * src/LR0.c (new_state): Recognize the final state by the fact it
1342 is reached by eoftoken.
1343 (insert_start_shifting_state, insert_eof_shifting_state)
1344 (insert_accepting_state, augment_automaton): Remove, since now
1345 these states are automatically computed from the initial state.
1346 (generate_states): Adjust.
1347 * src/print.c: When reporting a rule number to the user, substract
1348 1, so that the axiom rule is rule 0, and the first user rule is 1.
1349 * src/reduce.c: Likewise.
1350 * src/print_graph.c (print_core): For the time being, just as for
1351 the report, depend upon --trace-flags to dump the full set of
1352 items.
1353 * src/reader.c (readgram): Once the grammar read, insert the rule
1354 0: `$axiom: START-SYMBOL $'.
1355 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1356 number of the states has changed (the final state is no longer
1357 necessarily the last), catch up.
1358
13592001-12-27 Akim Demaille <akim@epita.fr>
1360
1361 Try to make the use of the eoftoken valid. Given that its value
1362 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1363 is used instead of > 0 where appropriate, (ii), depend upon nritems
1364 instead of the 0-sentinel.
1365
1366 * src/gram.h, src/gram.c (nritems): New.
1367 Expected to be duplication of nitems, but for the time being...
1368 * src/reader.c (packgram): Assert nritems and nitems are equal.
1369 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1370 * src/closure.c (print_closure, print_fderives): Likewise.
1371 * src/gram.c (ritem_print): Likewise.
1372 * src/print.c (print_core, print_grammar): Likewise.
1373 * src/print_graph.c: Likewise.
1374
13752001-12-27 Akim Demaille <akim@epita.fr>
1376
1377 * src/main.c (main): If there are complains after grammar
1378 reductions, then output the report anyway if requested, then die.
1379 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1380 * src/reader.c (eoftoken): New.
1381 (parse_token_decl): If the token being defined has value `0', it
1382 is the eoftoken.
1383 (packsymbols): No longer hack `tags' to insert `$' by hand.
1384 Be sure to preserve the value of the eoftoken.
1385 (reader): Make sure eoftoken is defined.
1386 Initialize nsyms to 0: now eoftoken is created just like the others.
1387 * src/print.c (print_grammar): Don't special case the eof token.
1388 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1389 lie anyway, albeit pleasant.
1390 * tests/calc.at: Exercise error messages with eoftoken.
1391 Change the grammar so that empty input is invalid.
1392 Adjust expectations.
1393 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1394
13952001-12-27 Akim Demaille <akim@epita.fr>
1396
1397 * configure.in: Check the protos of strchr ans strspn.
1398 Replace strchr if needed.
1399 * src/system.h: Provide the protos of strchr, strspn and memchr if
1400 missing.
1401 * lib/strchr.c: New.
1402 * src/reader.c (symbols_save): Use strchr.
1403
14042001-12-27 Akim Demaille <akim@epita.fr>
1405
1406 * src/print.c, src/print_graph.c (escape): New.
1407 Use it to quote the TAGS outputs.
1408 * src/print_graph.c (print_state): Now errors are in red, and
1409 reductions in green.
1410 Prefer high to wide: output the state number on a line of its own.
1411
14122001-12-27 Akim Demaille <akim@epita.fr>
1413
1414 * src/state.h, src/state.c (reductions_new): New.
1415 * src/LR0.c (set_state_table): Let all the states have a
1416 `reductions', even if reduced to 0.
1417 (save_reductions): Adjust.
1418 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1419 * src/print.c (print_reductions, print_actions): Adjust.
1420 * src/output.c (action_row): Adjust.
1421
14222001-12-27 Akim Demaille <akim@epita.fr>
1423
1424 * src/state.h, src/state.c (errs_new, errs_dup): New.
1425 * src/LR0.c (set_state_table): Let all the states have an errs,
1426 even if reduced to 0.
1427 * src/print.c (print_errs, print_reductions): Adjust.
1428 * src/output.c (output_actions, action_row): Adjust.
1429 * src/conflicts.c (resolve_sr_conflict): Adjust.
1430
14312001-12-27 Akim Demaille <akim@epita.fr>
1432
1433 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1434
14352001-12-27 Akim Demaille <akim@epita.fr>
1436
1437 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1438 * src/print.c: here.
1439 (lookaheadset, shiftset): New, used as additional storage by
1440 print_reductions.
1441 (print_results): Adjust.
1442 (print_shifts, print_gotos, print_errs): New, extracted from...
1443 (print_actions): here.
1444 * src/print_graph.c (print_actions): Remove dead code.
1445
14462001-12-27 Akim Demaille <akim@epita.fr>
1447
1448 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1449 `$n' and `@n'.
1450
14512001-12-27 Akim Demaille <akim@epita.fr>
1452
1453 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1454 (build_relations): Adjust.
1455
14562001-12-27 Akim Demaille <akim@epita.fr>
1457
1458 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1459 duplication.
1460
14612001-12-27 Akim Demaille <akim@epita.fr>
1462
1463 * src/reader.c (packgram): Catch nitems overflows.
1464
14652001-12-27 Akim Demaille <akim@epita.fr>
1466
1467 * src/files.c, src/files.h (guard_obstack): Remove.
1468 * src/output.c (output): Adjust.
1469 * src/reader.c (parse_braces): New, factoring...
1470 (copy_action, copy_guard): these two which are renamed as...
1471 (parse_action, parse_guard): these.
1472 As a voluntary consequence, using braces around guards is now
1473 mandatory.
1474
14752001-12-27 Akim Demaille <akim@epita.fr>
1476
1477 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1478 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1479 members.
1480 (symbol_list_new): Adjust.
1481 (copy_action): action_line is the first line, not the last.
1482 (copy_guard): Just as for actions, store the `action' only, not
1483 the switch/case/break flesh.
1484 Don't parse the user action that might follow the guard, let...
1485 (readgram): do it, i.e., now, there can be an action after a
1486 guard.
1487 In other words the guard is just explicitly optional.
1488 (packgram): Adjust.
1489 * src/output.c (guards_output): New.
1490 (output_parser): Call it when needed.
1491 (output): Also free the guard and attrs obstacks.
1492 * src/files.c, src/files.h (obstack_save): Remove.
1493 (output_files): Remove.
1494 As a result, if one needs the former `.act' file, using an
1495 appropriate skeleton which requires actions and guards is now
1496 required.
1497 * src/main.c (main): Adjust.
1498 * tests/semantic.at: New.
1499 * tests/regression.at: Use `input.y' as input file name.
1500 Avoid 8+3 problems by requiring input.c when the test needs the
1501 parser.
1502
15032001-12-27 Akim Demaille <akim@epita.fr>
1504
1505 * src/reader.c (symbol_list_new): Be sure to initialize all the
1506 fields.
1507
15082001-12-27 Akim Demaille <akim@epita.fr>
1509
1510 All the hacks using a final pseudo state are now useless.
1511
1512 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1513 * src/lalr.c (nLA): New.
1514 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1515 instead of lookaheadsp from the pseudo state (nstate + 1).
1516
15172001-12-27 Akim Demaille <akim@epita.fr>
1518
1519 * src/output.c (action_row, token_actions): Use a state_t instead
1520 of a integer, and nlookaheads instead of the following state's
1521 lookaheadsp.
1522
15232001-12-27 Akim Demaille <akim@epita.fr>
1524
1525 * src/conflicts.c (log_resolution, flush_shift)
1526 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1527 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1528 (conflicts_print, print_reductions): Use a state_t instead of an
1529 integer when referring to a state.
1530 As much as possible, depend upon nlookaheads, instead of the
1531 `lookaheadsp' member of the following state (since lookaheads of
1532 successive states are successive, the difference between state n + 1
1533 and n served as the number of lookaheads for state n).
1534 * src/lalr.c (add_lookback_edge): Likewise.
1535 * src/print.c (print_core, print_actions, print_state)
1536 (print_results): Likewise.
1537 * src/print_graph.c (print_core, print_actions, print_state)
1538 (print_graph): Likewise.
1539 * src/conflicts.h: Adjust.
1540
15412001-12-27 Akim Demaille <akim@epita.fr>
1542
1543 * src/bison.hairy: Formatting/comment changes.
1544 ANSIfy.
1545 Remove `register' indications.
1546 Add plenty of `static'.
1547
15482001-12-27 Akim Demaille <akim@epita.fr>
1549
1550 * src/output.c (prepare): Drop the muscle `ntbase' which
1551 duplicates ntokens.
1552 * src/bison.simple: Formatting/comment changes.
1553 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1554 is an undocumented synonym.
1555
15562001-12-22 Akim Demaille <akim@epita.fr>
1557
1558 * src/output.c (output_table_data): Change the prototype to use
1559 `int' for array ranges: some invocations do pass an int, not a
1560 short.
1561 Reported by Wayne Green.
1562
15632001-12-22 Akim Demaille <akim@epita.fr>
1564
1565 Some actions of web2c.y are improperly triggered.
1566 Reported by Mike Castle.
1567
1568 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1569 * tests/regression.at (Web2c): Rename as...
1570 (Web2c Report): this.
1571 (Web2c Actions): New.
1572
15732001-12-22 Akim Demaille <akim@epita.fr>
1574
1575 Reductions in web2c.y are improperly reported.
1576 Reported by Mike Castle.
1577
1578 * src/conflicts.c (print_reductions): Fix.
1579 * tests/regression.at (Web2c): New.
1580
15812001-12-18 Akim Demaille <akim@epita.fr>
1582
1583 Some host fail on `assert (!"foo")', which expands to
1584 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1585 Reported by Nelson Beebee.
1586
1587 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1588 `#define it_succeeded 0' and `assert (it_succeeded)'.
1589
15902001-12-17 Marc Autret <autret_m@epita.fr>
1591
1592 * src/bison.simple: Don't hard code the skeleton line and filename.
1593 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1594 New line counter 'skeleton_line' (skeleton-line muscle).
1595
15962001-12-17 Paul Eggert <eggert@twinsun.com>
1597
1598 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1599 YYDEBUG must be defined to a nonzero value.
1600
1601 * src/bison.simple (yytname): Do not assume that the user defines
1602 YYDEBUG to a properly parenthesized expression.
1603
16042001-12-17 Akim Demaille <akim@epita.fr>
1605
1606 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1607 nlookaheads is a new member.
1608 Adjust all users.
1609 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1610 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1611 state.
1612
16132001-12-17 Akim Demaille <akim@epita.fr>
1614
1615 * src/files.h, src/files.c (open_files, close_files): Remove.
1616 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1617 let...
1618 * src/reader.c (reader): Do it.
1619
16202001-12-17 Akim Demaille <akim@epita.fr>
1621
1622 * src/conflicts.c (print_reductions): Formatting changes.
1623
16242001-12-17 Akim Demaille <akim@epita.fr>
1625
1626 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1627 (flush_reduce): New.
1628 (resolve_sr_conflict): Adjust.
1629
16302001-12-17 Akim Demaille <akim@epita.fr>
1631
1632 * src/output.c (output_obstack): Be static and rename as...
1633 (format_obstack): this, to avoid any confusion with files.c's
1634 output_obstack.
1635 * src/reader.h (muscle_obstack): Move to...
1636 * src/output.h: here, since it's defined in output.c.
1637
16382001-12-17 Akim Demaille <akim@epita.fr>
1639
1640 * src/output.c (action_row, save_column, default_goto)
1641 (sort_actions, matching_state, pack_vector): Better variable
1642 locality.
1643
16442001-12-17 Akim Demaille <akim@epita.fr>
1645
1646 * src/output.c: Various formatting changes.
1647
16482001-12-17 Akim Demaille <akim@epita.fr>
1649
1650 * src/files.c (output_files): Free the output_obstack.
1651 * src/main.c (main): Call print and print_graph conditionally.
1652 * src/print.c (print): Work unconditionally.
1653 * src/print_graph.c (print_graph): Work unconditionally.
1654 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1655
16562001-12-16 Marc Autret <autret_m@epita.fr>
1657
1658 * src/output.c (actions_output): Fix. When we use %no-lines,
1659 there is one less line per action.
1660
16612001-12-16 Marc Autret <autret_m@epita.fr>
1662
1663 * src/bison.simple: Remove a useless #line directive.
1664 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1665 * src/output.c (get_lines_number): New.
1666 (output_parser): Adjust, now takes care about the lines of a
1667 output muscles.
1668 Fix line numbering.
1669 (actions_output): Computes the number of lines taken by actions.
1670 (output_master_parser): Insert new skeleton which is the name of
1671 the output parser file name.
1672
16732001-12-15 Marc Autret <autret_m@epita.fr>
1674
1675 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1676
16772001-12-15 Marc Autret <autret_m@epita.fr>
1678
1679 * src/output.c (output_gram): Keep track of the hairy one.
1680
16812001-12-15 Akim Demaille <akim@epita.fr>
1682
1683 Make `make distcheck' work.
1684
1685 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1686 system.h which uses libgettext.h.
1687
16882001-12-15 Akim Demaille <akim@epita.fr>
1689
1690 * src/nullable.c (set_nullable): Useless rules must be skipped,
1691 otherwise, since we range over their symbols, we might look at a
1692 nonterminal which no longer ``exists'', i.e., it is not counted in
1693 `nvars', hence we overflow our arrays.
1694
16952001-12-15 Akim Demaille <akim@epita.fr>
1696
1697 The header can also be produced directly, without any obstack!
1698 Yahoo!
1699
1700 * src/files.c, src/files.h (defines_obstack): Remove.
1701 (compute_header_macro): Global.
1702 (defines_obstack_save): Remove.
1703 * src/reader.c (parse_union_decl): No longer output to
1704 defines_obstack: its content can be found in the `stype' muscle
1705 anyway.
1706 (output_token_translations): Merge into...
1707 (symbols_output): this.
1708 Rename as...
1709 (symbols_save): this.
1710 (reader): Adjust.
1711 * src/output.c (header_output): New.
1712 (output): Call it.
1713
17142001-12-15 Akim Demaille <akim@epita.fr>
1715
1716 * src/reader.c (parse_union_decl): Instead of handling two obstack
1717 simultaneously, use one to define the `stype' muscle, and use the
1718 value of the latter to fill defines_obstack.
1719 (copy_comment): Remove.
1720 (copy_comment2): Work for a single obstack.
1721 Rename as...
1722 (copy_comment): this.
1723
17242001-12-15 Akim Demaille <akim@epita.fr>
1725
1726 * src/lex.c, src/lex.h (xgetc): No longer static.
1727 * src/reader.c (parse_union_decl): Revamp.
1728
17292001-12-15 Akim Demaille <akim@epita.fr>
1730
1731 Still making progress in separating Bison into (i) input, (ii)
1732 process, (iii) output: now we can directly output the parser file
1733 without using table_obstack at all.
1734
1735 * src/files.c, src/files.h (table_obstack): Bye bye.
1736 (parser_file_name): New.
1737 * src/files.c (compute_output_file_names): Compute it.
1738 * src/output.c (actions_output, output_parser)
1739 (output_master_parser): To a file instead of an obstack.
1740
17412001-12-15 Akim Demaille <akim@epita.fr>
1742
1743 Attach actions to rules, instead of pre-outputting them to
1744 actions_obstack.
1745
1746 * src/gram.h (rule_t): action and action_line are new members.
1747 * src/reader.c (symbol_list): Likewise.
1748 (copy_action): Save the actions within the rule.
1749 (packgram): Save them in rule_table.
1750 * src/output.c (actions_output): New.
1751 (output_parser): Use it on `%%actions'.
1752 (output_rule_data): Don't free rule_table.
1753 (output): Do it.
1754 (prepare): Don't save the `action' muscle.
1755 * src/bison.simple: s/%%action/%%actions/.
1756
17572001-12-15 Akim Demaille <akim@epita.fr>
1758
1759 * src/reader.c (copy_action): When --yacc, don't append a `;'
1760 to the user action: let it fail if lacking.
1761 Suggested by Arnold Robbins and Tom Tromey.
1762
17632001-12-14 Akim Demaille <akim@epita.fr>
1764
1765 * src/lex.c (literalchar): Simply return the char you decoded, non
1766 longer mess around with obstacks and int pointers.
1767 Adjust all callers.
1768
17692001-12-14 Akim Demaille <akim@epita.fr>
1770
1771 * src/lex.c (literalchar): Don't escape the special characters,
1772 just decode them, and keep them as char (before, eol was output as
1773 the 2 char string `\n' etc.).
1774 * src/output.c (output_rule_data): Use quotearg to output the
1775 token strings.
1776
17772001-12-13 Paul Eggert <eggert@twinsun.com>
1778
1779 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1780 Do not infringe on the global user namespace when using C++.
1781 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1782 All uses of `fprintf' and `stderr' changed.
1783
1784 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1785
17862001-12-13 Akim Demaille <akim@epita.fr>
1787
1788 The computation of nullable is broken: it doesn't handle empty
1789 RHS's properly.
1790
1791 * tests/torture.at (GNU AWK Grammar): New.
1792 * tests/sets.at (Nullable): New.
1793 * src/nullable.c (set_nullable): Instead of blindly looping over
1794 `ritems', loop over the rules, and then over their rhs's.
1795
1796 Work around Autotest bugs.
1797
1798 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1799 frame, because Autotest understand lines starting with a `+' as
1800 traces from the shell. Then, they are not processed properly.
1801 Admittedly an Autotest bug, but we don't have time to wait for
1802 Autotest to catch up.
1803 * tests/regression.at (Broken Closure): Adjust to the new table
1804 frames.
1805 Move to...
1806 * tests/sets.at: here.
1807
18082001-12-13 Akim Demaille <akim@epita.fr>
1809
1810 * src/closure.c (closure): Use nrules instead of playing tricks
1811 with BITS_PER_WORD.
1812
18132001-12-13 Akim Demaille <akim@epita.fr>
1814
1815 * src/print.c (print_actions): Output the handling of `$' as the
1816 traces do: shifting the token EOF. Before EOF was treated as a
1817 nonterminal.
1818 * tests/regression.at: Adjust some tests.
1819 * src/print_graph.c (print_core): Complete the set of items via
1820 closure. The next-to-final and final states are still unsatisfying,
1821 but that's to be addressed elsewhere.
1822 No longer output the rule numbers, but do output the state number.
1823 A single loop for the shifts + gotos is enough, but picked a
1824 distinct color for each.
1825 (print_graph): Initialize and finalize closure.
1826
18272001-12-13 Akim Demaille <akim@epita.fr>
1828
1829 * src/reader.c (readgram): Remove dead code, an strip useless
1830 braces.
1831 (get_type): Remove, unused.
1832
18332001-12-12 Akim Demaille <akim@epita.fr>
1834
1835 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1836 on that of lib/error.c.
1837
18382001-12-12 Akim Demaille <akim@epita.fr>
1839
1840 Some hosts don't like `/' in includes.
1841
1842 * src/system.h: Include libgettext.h without qualifying the path.
1843 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1844 $(top_srcdir).
1845
18462001-12-11 Marc Autret <autret_m@epita.fr>
1847
1848 * src/output.c (output_parser): Remove useless muscle.
1849
18502001-12-11 Marc Autret <autret_m@epita.fr>
1851
1852 * src/bison.simple: Remove #line just before %%epilogue. It
1853 is now handled in ...
1854 * src/reader.c (read_additionnal_code): Add the output of a
1855 #line for the epilogue.
1856
18572001-12-10 Marc Autret <autret_m@epita.fr>
1858
1859 * src/reader.c (copy_definition): Re-use CPP-outed code which
1860 replace precedent remove.
1861 * src/bison.simple: Remove #line before %%prologue because
1862 %%input-line is wrong at this time.
1863
18642001-12-10 Marc Autret <autret_m@epita.fr>
1865
1866 * src/reader.c (symbols_output): Clean up.
1867 * src/output.c (output_gram, output): Clean up.
1868
18692001-12-10 Akim Demaille <akim@epita.fr>
1870
1871 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1872 * src/LR0.c (set_state_table): here.
1873 * src/lalr.c (lalr): Call it.
1874
18752001-12-10 Akim Demaille <akim@epita.fr>
1876
1877 * src/state.h (shifts): Remove the `number' member: shifts are
1878 attached to state, hence no longer need to be labelled with a
1879 state number.
1880
18812001-12-10 Akim Demaille <akim@epita.fr>
1882
1883 Now that states have a complete set of members, the linked list of
1884 shifts is useless: just fill directly the state's shifts member.
1885
1886 * src/state.h (shifts): Remove the `next' member.
1887 * src/LR0.c (first_state, last_state): Remove.
1888 Adjust the callers.
1889 (augment_automaton): Don't look for the shifts that must be added
1890 a shift on EOF: it is those of the state we looked for! But now,
1891 since shifts are attached, it is no longer needed to looking
1892 merely by its id: its number.
1893
18942001-12-10 Akim Demaille <akim@epita.fr>
1895
1896 * src/LR0.c (augment_automaton): Better variable locality.
1897 Remove an impossible branch: if there is a state corresponding to
1898 the start symbol being shifted, then there is shift for the start
1899 symbol from the initial state.
1900
19012001-12-10 Akim Demaille <akim@epita.fr>
1902
1903 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1904 only when appropriate: when insert_start_shifting_state' is not
1905 invoked.
1906 * tests/regression.at (Rule Line Numbers): Adjust.
1907
19082001-12-10 Akim Demaille <akim@epita.fr>
1909
1910 * src/LR0.c (augment_automaton): Now that all states have shifts,
1911 merge the two cases addition shifts to the initial state.
1912
19132001-12-10 Akim Demaille <akim@epita.fr>
1914
1915 * src/lalr.c (set_state_table): Move to...
1916 * src/LR0.c: here.
1917 * src/lalr.c (lalr): Don't call it...
1918 * src/LR0.c (generate_states): do it.
1919 * src/LR0.h (first_state): Remove, only the table is used.
1920
19212001-12-10 Akim Demaille <akim@epita.fr>
1922
1923 * src/LR0.h (first_shift, first_reduction): Remove.
1924 * src/lalr.c: Don't use first_shift: find shifts through the
1925 states.
1926
19272001-12-10 Akim Demaille <akim@epita.fr>
1928
1929 * src/LR0.c: Attach shifts to states as soon as they are
1930 computed.
1931 * src/lalr.c (set_state_table): Instead of assigning shifts to
1932 state, just assert that the mapping was properly done.
1933
19342001-12-10 Akim Demaille <akim@epita.fr>
1935
1936 * src/LR0.c (insert_start_shift): Rename as...
1937 (insert_start_shifting_state): this.
1938 (insert_eof_shifting_state, insert_accepting_state): New.
1939 (augment_automaton): Adjust.
1940 Better locality of the variables.
1941 When looking if the start_symbol is shifted from the initial
1942 state, using `while (... symbol != start_symbol ...)' sounds
1943 better than `while (... symbol < start_symbol ...)': If fail
1944 to see how the order between symbols could be relevant!
1945
19462001-12-10 Akim Demaille <akim@epita.fr>
1947
1948 * src/getargs.h: Don't declare `spec_name_prefix' and
1949 `spec_file_prefix', declared by src/files.h.
1950 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1951 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1952 * src/output.c (prepare): Adjust.
1953 * src/reader.c (symbols_output): Likewise.
1954 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1955
19562001-12-10 Akim Demaille <akim@epita.fr>
1957
1958 * src/muscle_tab.c (muscle_init): NULL is a better default than
1959 `"0"'.
1960
19612001-12-10 Akim Demaille <akim@epita.fr>
1962
1963 * src/reader.c (reader): Calling symbols_output once is enough.
1964
19652001-12-10 Akim Demaille <akim@epita.fr>
1966
1967 Now that states have a complete set of members, the linked list of
1968 reductions is useless: just fill directly the state's reductions
1969 member.
1970
1971 * src/state.h (struct reductions): Remove member `number' and
1972 `next'.
1973 * src/LR0.c (first_reduction, last_reduction): Remove.
1974 (save_reductions): Don't link the new reductions, store them in
1975 this_state.
1976 * src/lalr.c (set_state_table): No need to attach reductions to
1977 states, it's already done.
1978 * src/output.c (output_actions): No longer free the shifts, then
1979 the reductions, then the states: free all the states and their
1980 members.
1981
19822001-12-10 Akim Demaille <akim@epita.fr>
1983
1984 * src/options.c (OPTN, DRTV, BOTH): New.
1985 (option_table): Use them.
1986
1987 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1988 the job of system.h.
1989 * src/options.c: Don't include stdio.h and xalloc.h for the same
1990 reasons.
1991
19922001-12-10 Akim Demaille <akim@epita.fr>
1993
1994 * src/output.c (output, prepare): Make sure the values of the
1995 muscles `action' and `prologue' are 0-terminated.
1996
19972001-12-10 Akim Demaille <akim@epita.fr>
1998
1999 Clean up GCC warnings.
2000
2001 * src/reader.c (copy_action): `buf' is not used.
2002 (parse_skel_decl): Be static.
2003 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2004 * src/options.h (create_long_option_table): Have a real prototype.
2005 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2006 (hash_delete_at): Return const void *.
2007 Adjust casts to preserve the const.
2008
20092001-12-10 Akim Demaille <akim@epita.fr>
2010
2011 * configure.in: Require 2.52g.
2012 M4 is not needed, but AUTOM4TE is.
2013 * m4/m4.m4: Remove.
2014 * tests/Makefile.am: Adjust.
2015
20162001-12-10 Akim Demaille <akim@epita.fr>
2017
2018 One structure for states is enough, even though theoretically
2019 there are LR(0) states and LALR(1) states.
2020
2021 * src/lalr.h (state_t): Remove.
2022 (state_table): Be state_t **, not state_t *.
2023 * src/state.h (core, CORE_ALLOC): Rename as...
2024 (state_t, STATE_ALLOC): this.
2025 Add the LALR(1) members: shifts, reductions, errs.
2026 * src/LR0.c (state_table): Rename as...
2027 (state_hash): this, to avoid name clashes with the global
2028 `state_table'.
2029 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2030 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2031
20322001-12-10 Akim Demaille <akim@epita.fr>
2033
2034 Bison dumps core on bash.y.
2035 Reported by Pascal Bart.
2036
2037 * src/warshall.c (bitmatrix_print): New.
2038 (TC): Use it.
2039 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2040 j must be the outer loop.
2041 * tests/regression.at (Broken Closure): New.
2042
20432001-12-05 Akim Demaille <akim@epita.fr>
2044
2045 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2046 its argument.
2047