]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Regen.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-05-06 Akim Demaille <akim@epita.fr>
2
3 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4 hash_do_for_each.
5
62002-05-06 Akim Demaille <akim@epita.fr>
7
8 * src/LR0.c (new_state, get_state): Instead of using the global
9 `kernel_size' and `kernel_base', have two new arguments:
10 `core_size' and `core'.
11 Adjust callers.
12
132002-05-06 Akim Demaille <akim@epita.fr>
14
15 * src/reader.c (packgram): No longer end `ritem' with a 0
16 sentinel: it is not used.
17
182002-05-05 Akim Demaille <akim@epita.fr>
19
20 New experimental feature: display the lookaheads in the report and
21 graph.
22
23 * src/print (print_core): When --trace-flag, display the rules
24 lookaheads.
25 * src/print_graph.c (print_core): Likewise.
26 Swap the arguments.
27 Adjust caller.
28
292002-05-05 Akim Demaille <akim@epita.fr>
30
31 * tests/torture.at (Many lookaheads): New test.
32
332002-05-05 Akim Demaille <akim@epita.fr>
34
35 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
36 (GENERATE_MUSCLE_INSERT_TABLE): this.
37 (output_int_table, output_unsigned_int_table, output_short_table)
38 (output_token_number_table, output_item_number_table): Replace with...
39 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
40 (muscle_insert_short_table, muscle_insert_token_number_table)
41 (muscle_insert_item_number_table): these.
42 Adjust all callers.
43 (prepare_tokens): Don't free `translations', since...
44 * src/reader.h, src/reader.c (grammar_free): do it.
45 Move to...
46 * src/gram.h, src/gram.c (grammar_free): here.
47 * data/bison.simple, data/bison.c++: b4_token_number_max is now
48 b4_translate_max.
49
502002-05-05 Akim Demaille <akim@epita.fr>
51
52 * src/output.c (output_unsigned_int_table): New.
53 (prepare_rules): `i' is unsigned.
54 `prhs', `rline', `r2' are unsigned int.
55 Rename muscle `rhs_number_max' as `rhs_max'.
56 Output muscles `prhs_max', `rline_max', and `r2_max'.
57 Free rline and r1.
58 * data/bison.simple, data/bison.c++: Adjust to use these muscles
59 to compute types instead of constant types.
60 * tests/regression.at (Web2c Actions): Adjust.
61
622002-05-04 Akim Demaille <akim@epita.fr>
63
64 * src/symtab.h (SALIAS, SUNDEF): Rename as...
65 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
66 Adjust dependencies.
67 * src/output.c (token_definitions_output): Be sure not to output a
68 `#define 'a'' when fed with `%token 'a' "a"'.
69 * tests/regression.at (Token definitions): New.
70
712002-05-03 Paul Eggert <eggert@twinsun.com>
72
73 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
74 for K&R C.
75
762002-05-03 gettextize <bug-gnu-gettext@gnu.org>
77
78 * Makefile.am (SUBDIRS): Remove intl.
79 (EXTRA_DIST): Add config/config.rpath.
80
812002-05-03 Akim Demaille <akim@epita.fr>
82
83 * data/bison.simple (m4_if): Don't output empty enums.
84 And actually, output valid enum definitions :(.
85
862002-05-03 Akim Demaille <akim@epita.fr>
87
88 * configure.bat: Remove, completely obsolete.
89 * Makefile.am (EXTRA_DIST): Adjust.
90 Don't distribute config.rpath...
91 * config/Makefile.am (EXTRA_DIST): Do it.
92
932002-05-03 Akim Demaille <akim@epita.fr>
94
95 * configure.in (GETTEXT_VERSION): New.
96 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
97
982002-05-03 Akim Demaille <akim@epita.fr>
99
100 * data/bison.simple (b4_token_enum): New.
101 (b4_token_defines): Use it to output tokens both as #define and
102 enums.
103 Suggested by Paul Eggert.
104 * src/output.c (token_definitions_output): Don't output spurious
105 white spaces.
106
1072002-05-03 Akim Demaille <akim@epita.fr>
108
109 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
110
1112002-05-02 Robert Anisko <robert@lrde.epita.fr>
112
113 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
114 Update the stack class, give a try to deque as the default container.
115
1162002-05-02 Akim Demaille <akim@epita.fr>
117
118 * data/bison.simple (yyparse): Do not implement @$ = @1.
119 (YYLLOC_DEFAULT): Adjust to do it.
120 * doc/bison.texinfo (Location Default Action): Fix.
121
1222002-05-02 Akim Demaille <akim@epita.fr>
123
124 * src/reader.c (parse_braces): Merge into...
125 (parse_action): this.
126
1272002-05-02 Akim Demaille <akim@epita.fr>
128
129 * configure.in (ALL_LINGUAS): Remove.
130 * po/LINGUAS, hr.po: New.
131
1322002-05-02 Akim Demaille <akim@epita.fr>
133
134 Remove the so called hairy (semantic) parsers.
135
136 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
137 * src/gram.h, src/gram.c (semantic_parser): Remove.
138 (rule_t): Remove the guard and guard_line members.
139 * src/lex.h (token_t): remove tok_guard.
140 * src/options.c (option_table): Remove %guard and %semantic_parser
141 support.
142 * src/output.c, src/output.h (guards_output): Remove.
143 (prepare): Adjust.
144 (token_definitions_output): Don't output the `T'
145 tokens (???).
146 (output_skeleton): Don't output the guards.
147 * src/files.c, src/files.c (attrsfile): Remove.
148 * src/reader.c (symbol_list): Remove the guard and guard_line
149 members.
150 Adjust dependencies.
151 (parse_guard): Remove.
152 * data/bison.hairy: Remove.
153 * doc/bison.texinfo (Environment Variables): Remove occurrences of
154 BISON_HAIRY.
155
1562002-05-02 Akim Demaille <akim@epita.fr>
157
158 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
159 (parse_guard): Rename the formal argument `stack_offset' as
160 `rule_length', which is more readable.
161 Adjust callers.
162 (copy_at, copy_dollar): Instead of outputting the hard coded
163 values of $$, $n and so forth, output invocation to b4_lhs_value,
164 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
165 Note: this patch partially drops `semantic-parser' support: it
166 always does `rule_length - n', where semantic parsers ought to
167 always use `-n'.
168 * data/bison.simple, data/bison.c++ (b4_lhs_value)
169 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
170
1712002-05-02 Akim Demaille <akim@epita.fr>
172
173 * configure.in (AC_INIT): Bump to 1.49b.
174 (AM_INIT_AUTOMAKE): Short invocation.
175
1762002-05-02 Akim Demaille <akim@epita.fr>
177
178 Version 1.49a.
179
1802002-05-01 Akim Demaille <akim@epita.fr>
181
182 * src/skeleton.h: Remove.
183
1842002-05-01 Akim Demaille <akim@epita.fr>
185
186 * src/skeleton.h: Fix the #endif.
187 Reported by Magnus Fromreide.
188
1892002-04-26 Paul Eggert <eggert@twinsun.com>
190
191 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
192 Define if we define YYSTYPE and YYLTYPE, respectively.
193 (YYCOPY): Fix [] quoting problem in the non-GCC case.
194
1952002-04-25 Robert Anisko <robert@lrde.epita.fr>
196
197 * src/scan-skel.l: Postprocess quadrigraphs.
198
199 * src/reader.c (copy_character): New function, used to output
200 single characters while replacing `[' and `]' with quadrigraphs, to
201 avoid troubles with M4 quotes.
202 (copy_comment): Output characters with copy_character.
203 (read_additionnal_code): Likewise.
204 (copy_string2): Likewise.
205 (copy_definition): Likewise.
206
207 * tests/calc.at: Exercise M4 quoting.
208
2092002-04-25 Akim Demaille <akim@epita.fr>
210
211 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
212 between `!' and the command.
213 Reported by Paul Eggert.
214
2152002-04-24 Robert Anisko <robert@lrde.epita.fr>
216
217 * tests/calc.at: Exercise prologue splitting.
218
219 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
220 `b4_post_prologue' instead of `b4_prologue'.
221
222 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
223 muscles.
224 (output): Free pre_prologue_obstack and post_prologue_obstack.
225 * src/files.h, src/files.c (attrs_obstack): Remove.
226 (pre_prologue_obstack, post_prologue_obstack): New.
227 * src/reader.c (copy_definition): Add a parameter to specify the
228 obstack to fill, instead of using attrs_obstack unconditionally.
229 (read_declarations): Pass pre_prologue_obstack to copy_definition if
230 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
231
2322002-04-23 Paul Eggert <eggert@twinsun.com>
233
234 * data/bison.simple: Remove unnecessary commentary and white
235 space differences from 1_29-branch.
236 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
237
238 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
239 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
240 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
241 constructors or destructors.
242
243 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
244
2452002-04-23 Akim Demaille <akim@epita.fr>
246
247 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
248 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
249 location with columns.
250 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
251 All reported by Paul Eggert.
252
2532002-04-22 Akim Demaille <akim@epita.fr>
254
255 * src/reduce.c (dump_grammar): Move to...
256 * src/gram.h, src/gram.c (grammar_dump): here.
257 Be sure to separate long item numbers.
258 Don't read the members of a rule's prec if its nil.
259
2602002-04-22 Akim Demaille <akim@epita.fr>
261
262 * src/output.c (table_size, table_grow): New.
263 (MAXTABLE): Remove, replace uses with table_size.
264 (pack_vector): Instead of dying when the table is too big, grow it.
265
2662002-04-22 Akim Demaille <akim@epita.fr>
267
268 * data/bison.simple (yyr1): Its type is that of a token number.
269 * data/bison.c++ (r1_): Likewise.
270 * tests/regression.at (Web2c Actions): Adjust.
271
2722002-04-22 Akim Demaille <akim@epita.fr>
273
274 * src/reader.c (token_translations_init): 256 is now the default
275 value for the error token, i.e., it will be assigned another
276 number if the user assigned 256 to one of her tokens.
277 (reader): Don't force 256 to error.
278 * doc/bison.texinfo (Symbols): Adjust.
279 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
280 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
281 etc. instead of 10, 20, 30 (which was used to `jump' over error
282 (256) and undefined (2)).
283
2842002-04-22 Akim Demaille <akim@epita.fr>
285
286 Propagate more token_number_t.
287
288 * src/gram.h (token_number_as_item_number)
289 (item_number_as_token_number): New.
290 * src/output.c (GENERATE_OUTPUT_TABLE): New.
291 Use it to create output_item_number_table and
292 output_token_number_table.
293 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
294 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
295 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
296 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
297
2982002-04-22 Akim Demaille <akim@epita.fr>
299
300 * src/output.h, src/output.c (get_lines_number): Remove.
301
3022002-04-19 Akim Demaille <akim@epita.fr>
303
304 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
305 as Lex/Flex'.
306 (Debugging): More details about enabling the debugging features.
307 (Table of Symbols): Describe $$, $n, @$, and @n.
308 Suggested by Tim Josling.
309
3102002-04-19 Akim Demaille <akim@epita.fr>
311
312 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
313
3142002-04-10 Akim Demaille <akim@epita.fr>
315
316 * src/system.h: Rely on HAVE_LIMITS_H.
317 Suggested by Paul Eggert.
318
3192002-04-09 Akim Demaille <akim@epita.fr>
320
321 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
322 full stderr, and strip it according to the bison options, instead
323 of composing the error message from different bits.
324 This makes it easier to check for several error messages.
325 Adjust all the invocations.
326 Add an invocation exercising the error token.
327 Add an invocation demonstrating a stupid error message.
328 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
329 Adjust the tests.
330 Error message are for stderr, not stdout.
331
3322002-04-09 Akim Demaille <akim@epita.fr>
333
334 * src/gram.h, src/gram.c (error_token_number): Remove, use
335 errtoken->number.
336 * src/reader.c (reader): Don't specify the user token number (2)
337 for $undefined, as it uselessly prevents using it.
338 * src/gram.h (token_number_t): Move to...
339 * src/symtab.h: here.
340 (state_t.number): Is a token_number_t.
341 * src/print.c, src/reader.c: Use undeftoken->number instead of
342 hard coded 2.
343 (Even though this 2 is not the same as above: the number of the
344 undeftoken remains being 2, it is its user token number which
345 might not be 2).
346 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
347 `user_token_number_max'.
348 Output `undef_token_number'.
349 * data/bison.simple, data/bison.c++: Use them.
350 Be sure to map invalid yylex return values to
351 `undef_token_number'. This saves us from gratuitous SEGV.
352
353 * tests/conflicts.at (Solved SR Conflicts)
354 (Unresolved SR Conflicts): Adjust.
355 * tests/regression.at (Web2c Actions): Adjust.
356
3572002-04-08 Akim Demaille <akim@epita.fr>
358
359 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
360 Adding #line.
361 Remove the duplicate `typedefs'.
362 (RhsNumberType): Fix the declaration and various other typos.
363 Use __ofile__.
364 * data/bison.simple: Use __ofile__.
365 * src/scan-skel.l: Handle __ofile__.
366
3672002-04-08 Akim Demaille <akim@epita.fr>
368
369 * src/gram.h (item_number_t): New, the type of item numbers in
370 RITEM. Note that it must be able to code symbol numbers as
371 positive number, and the negation of rule numbers as negative
372 numbers.
373 Adjust all dependencies (pretty many).
374 * src/reduce.c (rule): Remove this `short *' pointer: use
375 item_number_t.
376 * src/system.h (MINSHORT, MAXSHORT): Remove.
377 Include `limits.h'.
378 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
379 (shortcpy): Remove.
380 (MAXTABLE): Move to...
381 * src/output.c (MAXTABLE): here.
382 (prepare_rules): Use output_int_table to output rhs.
383 * data/bison.simple, data/bison.c++: Adjust.
384 * tests/torture.at (Big triangle): Move the limit from 254 to
385 500.
386 * tests/regression.at (Web2c Actions): Ajust.
387
388 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
389 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
390 passes, but produces negative #line number, once fixed, GCC is
391 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
392 C), it passes.
393 * src/state.h (state_h): Code input lines on ints, not shorts.
394
3952002-04-08 Akim Demaille <akim@epita.fr>
396
397 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
398 and then the grammar.
399
4002002-04-08 Akim Demaille <akim@epita.fr>
401
402 * src/system.h: No longer using strndup.
403
4042002-04-07 Akim Demaille <akim@epita.fr>
405
406 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
407 * src/output.c (output_table_data): Return the longest number.
408 (prepare_tokens): Output `token_number_max').
409 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
410 New.
411 Use them to define yy_token_number_type/TokenNumberType.
412 Use this type for yytranslate.
413 * tests/torture.at (Big triangle): Push the limit from 124 to
414 253.
415 * tests/regression.at (Web2c Actions): Adjust.
416
4172002-04-07 Akim Demaille <akim@epita.fr>
418
419 * tests/torture.at (Big triangle): New.
420 (GNU AWK Grammar, GNU Cim Grammar): Move to...
421 * tests/existing.at: here.
422
4232002-04-07 Akim Demaille <akim@epita.fr>
424
425 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
426 nritems.
427 Adjust dependencies.
428
4292002-04-07 Akim Demaille <akim@epita.fr>
430
431 * src/reader.c: Normalize increments to prefix form.
432
4332002-04-07 Akim Demaille <akim@epita.fr>
434
435 * src/reader.c, symtab.c: Remove debugging code.
436
4372002-04-07 Akim Demaille <akim@epita.fr>
438
439 Rename all the `bucket's as `symbol_t'.
440
441 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
442 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
443 * src/symtab.c, src/symtab.h (bucket): Rename as...
444 (symbol_t): this.
445 (symbol_list_new, bucket_check_defined, bucket_make_alias)
446 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
447 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
448 (buckets_new, buckets_free, buckets_do): Rename as...
449 (symbol_list_new, symbol_check_defined, symbol_make_alias)
450 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
451 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
452 (symbols_new, symbols_free, symbols_do): these.
453
4542002-04-07 Akim Demaille <akim@epita.fr>
455
456 Use lib/hash for the symbol table.
457
458 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
459 EOF.
460 * src/lex.c (lex): Set the `number' member of new terminals.
461 * src/reader.c (bucket_check_defined, bucket_make_alias)
462 (bucket_check_alias_consistence, bucket_translation): New.
463 (reader, grammar_free, readgram, token_translations_init)
464 (packsymbols): Adjust.
465 (reader): Number the predefined tokens.
466 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
467 for predefined tokens.
468 * src/symtab.h (bucket): Remove all the hash table related
469 members.
470 * src/symtab.c (symtab): Replace by...
471 (bucket_table): this.
472 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
473 (buckets_new, buckets_do): New.
474
4752002-04-07 Akim Demaille <akim@epita.fr>
476
477 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
478 (start_symbol, max_user_token_number, semantic_parser)
479 (error_token_number): Initialize.
480 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
481 Initialize.
482 (reader): Don't.
483 (errtoken, eoftoken, undeftoken, axiom): Extern.
484
4852002-04-07 Akim Demaille <akim@epita.fr>
486
487 * src/gram.h (rule_s): prec and precsym are now pointers
488 to the bucket giving the priority/associativity.
489 Member `associativity' removed: useless.
490 * src/reduce.c, src/conflicts.c: Adjust.
491
4922002-04-07 Akim Demaille <akim@epita.fr>
493
494 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
495 Properly escape the symbols' TAG when outputting them.
496
4972002-04-07 Akim Demaille <akim@epita.fr>
498
499 * src/lalr.h (LA): Is a bitsetv, not bitset*.
500
5012002-04-07 Akim Demaille <akim@epita.fr>
502
503 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
504 (LArule): this, which is an array to rule_t*.
505 * src/print.c, src/conflicts.c: Adjust.
506
5072002-04-07 Akim Demaille <akim@epita.fr>
508
509 * src/gram.h (rule_t): Rename `number' as `user_number'.
510 `number' is a new member.
511 Adjust dependencies.
512 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
513
5142002-04-07 Akim Demaille <akim@epita.fr>
515
516 As a result of the previous patch, it is no longer needed
517 to reorder ritem itself.
518
519 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
520
5212002-04-07 Akim Demaille <akim@epita.fr>
522
523 Be sure never to walk through RITEMS, but use only data related to
524 the rules themselves. RITEMS should be banished.
525
526 * src/output.c (output_token_translations): Rename as...
527 (prepare_tokens): this.
528 In addition to `translate', prepare the muscles `tname' and
529 `toknum', which were handled by...
530 (output_rule_data): this.
531 Remove, and move the remainder of its outputs into...
532 (prepare_rules): this new routines, which also merges content from
533 (output_gram): this.
534 (prepare_rules): Be sure never to walk through RITEMS.
535 (output_stos): Rename as...
536 (prepare_stos): this.
537 (output): Always invoke prepare_states, after all, just don't use it
538 in the output if you don't need it.
539
5402002-04-07 Akim Demaille <akim@epita.fr>
541
542 * src/LR0.c (new_state): Display `nstates' as the name of the
543 newly created state.
544 Adjust to initialize first_state and last_state if needed.
545 Be sure to distinguish the initial from the final state.
546 (new_states): Create the itemset of the initial state, and use
547 new_state.
548 * src/closure.c (closure): Now that the initial state has its
549 items properly set, there is no need for a special case when
550 creating `ruleset'.
551
552 As a result, now the rule 0, reducing to $axiom, is visible in the
553 outputs. Adjust the test suite.
554
555 * tests/conflicts.at (Solved SR Conflicts)
556 (Unresolved SR Conflicts): Adjust.
557 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
558 * tests/conflicts.at (S/R in initial): New.
559
5602002-04-07 Akim Demaille <akim@epita.fr>
561
562 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
563 the RHS of the rules.
564 * src/output.c (output_gram): Likewise.
565
5662002-04-07 Akim Demaille <akim@epita.fr>
567
568 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
569 bucket.
570 Adjust all dependencies.
571 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
572 `number' of the buckets too.
573 * src/gram.h: Include `symtab.h'.
574 (associativity): Move to...
575 * src/symtab.h: here.
576 No longer include `gram.h'.
577
5782002-04-07 Akim Demaille <akim@epita.fr>
579
580 * src/gram.h, src/gram.c (rules_rhs_length): New.
581 (ritem_longest_rhs): Use it.
582 * src/gram.h (rule_t): `number' is a new member.
583 * src/reader.c (packgram): Set it.
584 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
585 the end of `rules', and count them out of `nrules'.
586 (reduce_output, dump_grammar): Adjust.
587 * src/print.c (print_grammar): It is no longer needed to check for
588 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
589 * tests/reduce.at (Reduced Automaton): New test.
590
5912002-04-07 Akim Demaille <akim@epita.fr>
592
593 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
594 lacking `+ 1' to nrules, Bison reported as useless a token if it
595 was used solely to set the precedence of the last rule...
596
5972002-04-07 Akim Demaille <akim@epita.fr>
598
599 * data/bison.c++, data/bison.simple: Don't output the current file
600 name in #line, to avoid useless diffs between two identical
601 outputs under different names.
602
6032002-04-07 Akim Demaille <akim@epita.fr>
604
605 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
606 Normalize loops to using `< nrules + 1', not `<= nrules'.
607
6082002-04-07 Akim Demaille <akim@epita.fr>
609
610 * TODO: Update.
611
6122002-04-07 Akim Demaille <akim@epita.fr>
613
614 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
615 bucket.value as bucket.number.
616
6172002-04-07 Akim Demaille <akim@epita.fr>
618
619 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
620 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
621 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
622 RHS, instead of being an index in RITEMS.
623
6242002-04-04 Paul Eggert <eggert@twinsun.com>
625
626 * doc/bison.texinfo: Update copyright date.
627 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
628 (Symbols): Warn about running Bison in one character set,
629 but compiling and/or running in an incompatible one.
630 Warn about character code 256, too.
631
6322002-04-03 Paul Eggert <eggert@twinsun.com>
633
634 * src/bison.data (YYSTACK_ALLOC): Depend on whether
635 YYERROR_VERBOSE is nonzero, not whether it is defined.
636
637 Merge changes from bison-1_29-branch.
638
6392002-03-20 Paul Eggert <eggert@twinsun.com>
640
641 Merge fixes from Debian bison_1.34-1.diff.
642
643 * configure.in (AC_PREREQ): 2.53.
644
6452002-03-20 Akim Demaille <akim@epita.fr>
646
647 * src/conflicts.c (log_resolution): Argument `resolution' is const.
648
6492002-03-19 Paul Eggert <eggert@twinsun.com>
650
651 * src/bison.simple (YYCOPY): New macro.
652 (YYSTACK_RELOCATE): Use it.
653 Remove Type arg; no longer needed. All callers changed.
654 (yymemcpy): Remove; no longer needed.
655
656 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
657 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
658
6592002-03-19 Akim Demaille <akim@epita.fr>
660
661 Test and fix the #line outputs.
662
663 * tests/atlocal.at (GCC): New.
664 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
665 (Prologue synch line, ,%union synch line, Postprologue synch line)
666 (Action synch line, Epilogue synch line): New tests.
667 * src/reader.c (parse_union_decl): Define the muscle stype_line.
668 * data/bison.simple, data/bison.c++: Use it.
669
6702002-03-19 Akim Demaille <akim@epita.fr>
671
672 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
673 (Solved SR Conflicts, %expect not enough, %expect right)
674 (%expect too much): Move to...
675 * tests/conflicts.at: this new file.
676
6772002-03-19 Akim Demaille <akim@epita.fr>
678
679 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
680 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
681 that we can move to enums for instance.
682 * src/output.c (token_definitions_output): Output a list of
683 `token-name, token-number' instead of the #define.
684 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
685
6862002-03-14 Akim Demaille <akim@epita.fr>
687
688 Use Gettext 0.11.1.
689
6902002-03-09 Robert Anisko <robert@lrde.epita.fr>
691
692 * data/bison.c++: Make the user able to add members to the generated
693 parser by subclassing.
694
6952002-03-05 Robert Anisko <robert@lrde.epita.fr>
696
697 * src/reader.c (read_additionnal_code): `c' should be an integer, not
698 a character.
699 Reported by Nicolas Tisserand and Nicolas Burrus.
700
7012002-03-04 Robert Anisko <robert@lrde.epita.fr>
702
703 * src/reader.c: Warn about lacking semi-colons, do not complain.
704
7052002-03-04 Robert Anisko <robert@lrde.epita.fr>
706
707 * data/bison.c++: Remove a debug line.
708
7092002-03-04 Robert Anisko <robert@lrde.epita.fr>
710
711 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
712 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
713 provide a default implementation.
714
7152002-03-04 Akim Demaille <akim@epita.fr>
716
717 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
718 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
719 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
720 * tests/semantic.at (Parsing Guards): Similarly.
721 * src/reader.at (readgram): Complain if the last rule is not ended
722 with a semi-colon.
723
7242002-03-04 Akim Demaille <akim@epita.fr>
725
726 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
727 * src/closure.c: here.
728 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
729 RTC.
730 * src/warshall.h, src/warshall.c: Remove.
731 * tests/sets.at (Broken Closure): Adjust.
732
7332002-03-04 Akim Demaille <akim@epita.fr>
734
735 * src/output.c (output_skeleton): tempdir is const.
736 bytes_read is unused.
737
7382002-03-04 Akim Demaille <akim@epita.fr>
739
740 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
741 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
742 Update.
743 From Michael Hayes.
744
7452002-03-04 Akim Demaille <akim@epita.fr>
746
747 * src/closure.c (closure): `r' is unused.
748
7492002-03-04 Akim Demaille <akim@epita.fr>
750
751 * tests/sets.at (Broken Closure): Add the ending `;'.
752 * src/reader.at (readgram): Complain if a rule is not ended with a
753 semi-colon.
754
7552002-03-04 Akim Demaille <akim@epita.fr>
756
757 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
758 (count_sr_conflicts): Use bitset_count.
759 * src/reduce.c (inaccessable_symbols): Ditto.
760 (bits_size): Remove.
761 * src/warshall.h, src/warshall.c: Convert to bitsetv.
762
7632002-03-04 Akim Demaille <akim@epita.fr>
764
765 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
766 * src/reduce.c: Remove the `bitset_zero's following the
767 `bitset_create's, as now it is performed by the latter.
768
7692002-03-04 Akim Demaille <akim@epita.fr>
770
771 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
772 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
773 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
774 latest sources from Michael.
775
7762002-03-04 Akim Demaille <akim@epita.fr>
777
778 * src/output.c (output): Don't free the grammar.
779 * src/reader.c (grammar_free): New.
780 * src/main.c (main): Call it and don't free symtab here.
781
7822002-03-04 Akim Demaille <akim@epita.fr>
783
784 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
785 before returning.
786 Reported by Benoit Perrot.
787
7882002-03-04 Akim Demaille <akim@epita.fr>
789
790 Use bitset operations when possible, not loops over bits.
791
792 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
793 bitset_or.
794 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
795 * src/reduce.c (useless_nonterminals): Formatting changes.
796 * src/warshall.c (TC): Use bitset_or.
797
7982002-03-04 Akim Demaille <akim@epita.fr>
799
800 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
801 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
802 Ditto.
803
8042002-03-04 Akim Demaille <akim@epita.fr>
805
806 * src/lalr.c (F): Now a bitset*.
807 Adjust all dependencies.
808
8092002-03-04 Akim Demaille <akim@epita.fr>
810
811 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
812 Adjust all dependencies.
813
8142002-03-04 Akim Demaille <akim@epita.fr>
815
816 * src/L0.c, src/LR0.h (nstates): Be size_t.
817 Adjust comparisons (signed vs unsigned).
818 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
819 bitset*.
820 Adjust all dependencies.
821
8222002-03-04 Akim Demaille <akim@epita.fr>
823
824 * src/closure.c (firsts): Now, also a bitset.
825 Adjust all dependencies.
826 (varsetsize): Remove, now unused.
827 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
828
8292002-03-04 Akim Demaille <akim@epita.fr>
830
831 * src/print.c: Convert to use bitset.h, not hand coded iterations
832 over ints.
833
8342002-03-04 Akim Demaille <akim@epita.fr>
835
836 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
837
8382002-03-04 Akim Demaille <akim@epita.fr>
839
840 * src/closure.c (ruleset): Be a bitset.
841 (rulesetsize): Remove.
842
8432002-03-04 Akim Demaille <akim@epita.fr>
844
845 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
846 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
847 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
848 * src/closure.c (fderives): Be an array of bitsets.
849
8502002-02-28 Robert Anisko <robert@lrde.epita.fr>
851
852 * data/bison.c++: Merge the two generated headers. Insert a copyright
853 notice in each output file.
854
8552002-02-28 Akim Demaille <akim@epita.fr>
856
857 * data/bison.c++: Copy the prologue of bison.simple to fetch
858 useful M4 definitions, such as b4_header_guard.
859
8602002-02-25 Akim Demaille <akim@epita.fr>
861
862 * src/getargs.c (version): Give the name of the authors, and use a
863 translator friendly scheme for the bgr
864 copyright notice.
865
8662002-02-25 Akim Demaille <akim@epita.fr>
867
868 * src/output.c (header_output): Remove, now handled completely via
869 M4.
870
8712002-02-25 Akim Demaille <akim@epita.fr>
872
873 * m4/m4.m4: New, from CVS Autoconf.
874 * configure.in: Invoke it.
875 * src/output.c (output_skeleton): Use its result instead of the
876 hard coded name.
877
8782002-02-25 Akim Demaille <akim@epita.fr>
879
880 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
881 Fileutils 4.1.5.
882 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
883 * src/output.c (output_skeleton): Use mkstemp to create a real
884 temporary file.
885 Move the filling of `skeleton' and its muscle to...
886 (prepare): here.
887 (output): Move the definition of the prologue muscle to...
888 (prepare): here.
889 * src/system.h (DEFAULT_TMPDIR): New.
890
8912002-02-14 Paul Eggert <eggert@twinsun.com>
892
893 Remove the support for C++ namespace cleanliness; it was
894 causing more problems than it was curing, since it didn't work
895 properly on some nonstandard C++ compilers. This can wait
896 for a proper C++ parser.
897
898 * NEWS: Document this.
899 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
900 of C++, as it's treated like C now.
901 * src/bison.simple (YYSTD): Remove.
902 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
903 Treat C++ just like Standard C instead of trying to support
904 namespace cleanliness.
905
9062002-02-14 Akim Demaille <akim@epita.fr>
907
908 * tests/regression.at (else): Adjust to Andreas' change.
909
9102002-02-14 Akim Demaille <akim@epita.fr>
911
912 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
913
9142002-02-13 Andreas Schwab <schwab@suse.de>
915
916 * src/output.c (output_rule_data): Don't output NULL, it might
917 not be defined yet.
918
9192002-02-11 Robert Anisko <robert@lrde.epita.fr>
920
921 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
922 (Copyright notice): Update.
923
9242002-02-11 Akim Demaille <akim@epita.fr>
925
926 * tests/regression.at (%nonassoc and eof): Don't include
927 nonportable headers.
928
9292002-02-08 Robert Anisko <robert@lrde.epita.fr>
930
931 * data/bison.c++: Correct error recovery. Make the user able to
932 initialize the starting location.
933
9342002-02-07 Akim Demaille <akim@epita.fr>
935
936 * tests/input.at: New.
937
9382002-02-07 Robert Anisko <robert@lrde.epita.fr>
939
940 * data/bison.c++: Replace some direct m4 expansions by constants. Be
941 more consistent when naming methods and variables. Put preprocessor
942 directives around tables only needed for debugging.
943
9442002-02-07 Robert Anisko <robert@lrde.epita.fr>
945
946 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
947 C++ parsers.
948 (yy::b4_name::parse): Use print_.
949
9502002-02-07 Robert Anisko <robert@lrde.epita.fr>
951
952 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
953
9542002-02-07 Robert Anisko <robert@lrde.epita.fr>
955
956 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
957 C++ parsers.
958 (yy::b4_name::parse): Build verbose error messages, and use error_.
959
9602002-02-06 Robert Anisko <robert@lrde.epita.fr>
961
962 * data/bison.c++: Fix m4 quoting in comments.
963
9642002-02-06 Robert Anisko <robert@lrde.epita.fr>
965
966 * data/bison.c++: Adjust the parser code. Fix some muscles that were
967 not expanded by m4.
968
9692002-02-05 Akim Demaille <akim@epita.fr>
970
971 * data/bison.c++: Adjust to the M4 back end.
972 More is certainly needed.
973
9742002-02-05 Akim Demaille <akim@epita.fr>
975
976 Give a try to M4 as a back end.
977
978 * lib/readpipe.c: New, from wdiff.
979 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
980 BISON_HAIRY.
981 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
982 specific values. Now it is m4 that performs the lookup.
983 * src/parse-skel.y: Remove.
984 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
985 * src/output.c (actions_output, guards_output)
986 (token_definitions_output): No longer keeps track of the output
987 line number, hence remove the second argument.
988 (guards_output): Check against the guard member of a rule, not the
989 action member.
990 Adjust callers.
991 (output_skeleton): Don't look for the skeleton location, let m4 do
992 that.
993 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
994 file will be used.
995 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
996 (prepare): Given that for the time being changesyntax is not
997 usable in M4, rename the muscles using `-' to `_'.
998 Define `defines_flag', `output_parser_name' and `output_header_name'.
999 * src/output.h (actions_output, guards_output)
1000 (token_definitions_output): Adjust prototypes.
1001 * src/scan-skel.l: Instead of scanning the skeletons, it now
1002 processes the output of m4: `__oline__' and `#output'.
1003 * data/bison.simple: Adjust to be used by M4(sugar).
1004 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1005 to date.
1006 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1007 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1008 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1009 shamelessly stolen from CVS Autoconf.
1010
10112002-02-05 Akim Demaille <akim@epita.fr>
1012
1013 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1014 * configure.in: Check for the declarations of free and malloc.
1015 * src/muscle_tab.c: Adjust.
1016
10172002-02-05 Akim Demaille <akim@epita.fr>
1018
1019 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1020 which have no values.
1021
10222002-02-05 Akim Demaille <akim@epita.fr>
1023
1024 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1025 * data/: here.
1026
10272002-01-29 Paul Eggert <eggert@twinsun.com>
1028
1029 * src/bison.simple (YYSIZE_T): Do not define merely because
1030 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1031 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1032
10332002-01-27 Akim Demaille <akim@epita.fr>
1034
1035 Fix `%nonassoc and eof'.
1036
1037 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1038 which were not properly copied! Replace
1039 memcpy (res->errs, src->errs, src->nerrs);
1040 with
1041 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1042 !!!
1043 * tests/regression.at (%nonassoc and eof): Adjust to newest
1044 Autotest: `.' is not in the PATH.
1045
10462002-01-27 Akim Demaille <akim@epita.fr>
1047
1048 * tests/sets.at (AT_EXTRACT_SETS): New.
1049 (Nullable): Use it.
1050 (Firsts): New.
1051
10522002-01-26 Akim Demaille <akim@epita.fr>
1053
1054 * tests/actions.at, tests/calc.at, tests/headers.at,
1055 * tests/torture.at: Adjust to the newest Autotest which no longer
1056 forces `.' in the PATH.
1057
10582002-01-25 Akim Demaille <akim@epita.fr>
1059
1060 * tests/regression.at (%nonassoc and eof): New.
1061 Suggested by Robert Anisko.
1062
10632002-01-24 Akim Demaille <akim@epita.fr>
1064
1065 Bison dumps core when trying to complain about broken input files.
1066 Reported by Cris van Pelt.
1067
1068 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1069 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1070 into...
1071 (Invalid inputs): Strengthen: exercise parse_percent_token.
1072
10732002-01-24 Robert Anisko <robert.anisko@epita.fr>
1074
1075 * src/Makefile.am: Add bison.c++.
1076 * src/bison.c++: New skeleton.
1077
10782002-01-21 Paolo Bonzini <bonzini@gnu.org>
1079
1080 * po/it.po: New.
1081
10822002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1083
1084 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1085
10862002-01-20 Marc Autret <marc@gnu.org>
1087
1088 * src/files.c (compute_output_file_names): Fix
1089
10902002-01-20 Marc Autret <marc@gnu.org>
1091
1092 * tests/output.at: New test.
1093 * src/files.c (compute_base_names): Don't map extensions when
1094 the YACC flag is set, use defaults.
1095 Reported by Evgeny Stambulchik.
1096
10972002-01-20 Marc Autret <marc@gnu.org>
1098
1099 * src/system.h: Need to define __attribute__ away for non-GCC
1100 compilers as well (i.e. the vendor C compiler).
1101 Suggested by Albert Chin-A-Young.
1102
11032002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1104
1105 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1106 canonical definition.
1107 * src/system.h: Use the canonical definition for PARAMS (avoids
1108 a conflict with the macro from lib/hash.h).
1109
11102002-01-11 Akim Demaille <akim@epita.fr>
1111
1112 * configure.in: Use AC_FUNC_STRNLEN.
1113 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
1114
11152002-01-09 Akim Demaille <akim@epita.fr>
1116
1117 * src/files.c, src/files.h (output_infix): New.
1118 (tab_extension): Remove.
1119 (compute_base_names): Compute the former, drop the latter.
1120 * src/output.c (prepare): Insert the muscles `output-infix', and
1121 `output-suffix'.
1122 * src/parse-skel.y (string, string.1): New.
1123 (section.header): Use it.
1124 (section.yacc): Remove.
1125 (prefix): Remove too.
1126 * src/scan-skel.l: Adjust.
1127 * src/bison.simple, src/bison.hairy: Adjust.
1128
11292002-01-09 Akim Demaille <akim@epita.fr>
1130
1131 * configure.in (WERROR_CFLAGS): Compute it.
1132 * src/Makefile.am (CFLAGS): Pass it.
1133 * tests/atlocal.in (CFLAGS): Idem.
1134 * src/files.c: Fix a few warnings.
1135 (get_extension_index): Remove, unused.
1136
11372002-01-08 Akim Demaille <akim@epita.fr>
1138
1139 * src/getargs.c (AS_FILE_NAME): New.
1140 (getargs): Use it to convert DOSish file names.
1141 * src/files.c (base_name): Rename as full_base_name to avoid
1142 clashes with `base_name ()'.
1143 (filename_split): New.
1144 (compute_base_names): N-th rewrite, using filename_split.
1145
11462002-01-08 Akim Demaille <akim@epita.fr>
1147
1148 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1149 New, stolen from the Fileutils 4.1.
1150 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1151 * configure.in: Check for the presence of memrchr, and of its
1152 prototype.
1153
11542002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1155
1156 * lib/hash.h (__P): Added definition for this macro.
1157 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1158 BUILT_SOURCES, to ensure they are generated first.
1159 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1160 %error-verbose to allow bootstrapping with bison 1.30x.
1161
11622002-01-06 Akim Demaille <akim@epita.fr>
1163
1164 * src/reader.c (parse_braces): Don't fetch the next char, the
1165 convention is to fetch on entry.
1166 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1167 'switch' without a following semicolon.
1168 * tests/regression.at (braces parsing): New.
1169
11702002-01-06 Akim Demaille <akim@epita.fr>
1171
1172 Bison is dead wrong in its RR conflict reports.
1173
1174 * tests/torture.at (GNU Cim Grammar): New.
1175 * src/conflicts.c (count_rr_conflicts): Fix.
1176
11772002-01-06 Akim Demaille <akim@epita.fr>
1178
1179 Creating package.m4 from configure.ac causes too many problems.
1180
1181 * tests/Makefile.am (package.m4): Create it by hand,
1182 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1183
11842002-01-06 Akim Demaille <akim@epita.fr>
1185
1186 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1187 skeleton.h.
1188
11892002-01-04 Paul Eggert <eggert@twinsun.com>
1190
1191 * doc/bison.texinfo (Debugging):
1192 Remove YYSTDERR; it's no longer defined or used.
1193 Also, s/cstdio.h/cstdio/.
1194
11952002-01-03 Akim Demaille <akim@epita.fr>
1196
1197 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1198
11992002-01-03 Akim Demaille <akim@epita.fr>
1200
1201 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1202 tracing code to --trace, wait for a better --trace option, with
1203 args.
1204
12052002-01-03 Akim Demaille <akim@epita.fr>
1206
1207 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1208 The ISO C++ standard is extremely clear about it: stderr is
1209 considered a macro, not a regular symbol (see table 94 `Header
1210 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1211 Therefore std:: does not apply to it. It still does with fprintf.
1212 Also, s/cstdio.h/cstdio/.
1213
12142002-01-03 Akim Demaille <akim@epita.fr>
1215
1216 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1217 for non system headers.
1218
12192002-01-02 Akim Demaille <akim@epita.fr>
1220
1221 Equip the skeleton chain with location tracking, runtime trace,
1222 pure parser and scanner.
1223
1224 * src/parse-skel.y: Request a pure parser, locations, and prefix
1225 renaming.
1226 (%union): Having several members with the same type does not help
1227 type mismatches, simplify.
1228 (YYPRINT, yyprint): New.
1229 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1230 (skel_error): this.
1231 Handle locations.
1232 * src/scan-skel.l: Adjust to these changes.
1233 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1234 (LOCATION_PRINT, skel_control_t): New.
1235
12362001-12-30 Akim Demaille <akim@epita.fr>
1237
1238 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1239 replace `gb' with BLANKS.
1240 * src/scan-skel.l: Adjust.
1241
12422001-12-30 Akim Demaille <akim@epita.fr>
1243
1244 * src/system.h: We don't need nor want bcopy.
1245 Throw away MS-DOS crap: we don't need getpid.
1246 * configure.in: We don't need strndup. It was even causing
1247 problems: because Flex includes the headers *before* us,
1248 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1249 not visible.
1250 * lib/xstrndup.c: New.
1251 * src/scan-skel.l: Use it.
1252 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1253 * src/parse-skel.y: Use %directives instead of #defines.
1254
12552001-12-30 Akim Demaille <akim@epita.fr>
1256
1257 * src/skeleton.h: New.
1258 * src/output.c (output_parser, output_master_parser): Remove, dead
1259 code.
1260 * src/output.h (get_lines_number, actions_output, guards_output)
1261 (token_definitions_output): Prototype them.
1262 * src/parse-skel.y: Add the license notice.
1263 Include output.h and skeleton.h.
1264 (process_skeleton): Returns void, and takes a single parameter.
1265 * src/scan-skel.l: Add the license notice.
1266 Include skeleton.h.
1267 Don't use %option yylineno: it seems that then Flex imagines
1268 REJECT has been used, and therefore it won't reallocate its
1269 buffers (which makes no other sense to me than a bug). It results
1270 in warnings for `unused: yy_flex_realloc'.
1271
12722001-12-30 Robert Anisko <robert.anisko@epita.fr>
1273
1274 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1275 (MUSCLE_INSERT_PREFIX): ...to there.
1276 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1277 (MUSCLE_INSERT_PREFIX): Move from here...
1278
1279 * src/bison.hairy: Add a section directive. Put braces around muscle
1280 names. This parser skeleton is still broken, but Bison should not
1281 choke on a bad muscle 'syntax'.
1282 * src/bison.simple: Add a section directive. Put braces around muscle
1283 names.
1284
1285 * src/files.h (strsuffix, stringappend): Add declarations.
1286 (tab_extension): Add declaration.
1287 (short_base_name): Add declaration.
1288
1289 * src/files.c (strsuffix, stringappend): No longer static. These
1290 functions are used in the skeleton parser.
1291 (tab_extension): New.
1292 (compute_base_names): Use the computations done in this function
1293 to guess if the generated parsers should have '.tab' in their
1294 names.
1295 (short_base_name): No longer static.
1296
1297 * src/output.c (output_skeleton): New.
1298 (output): Disable call to output_master_parser, and give a try to
1299 a new skeleton handling system.
1300 (guards_output, actions_output): No longer static.
1301 (token_definitions_output, get_lines_number): No longer static.
1302
1303 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1304
1305 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1306 parse-skel.y.
1307
1308 * src/parse-skel.y: New file.
1309 * src/scan-skel.l: New file.
1310
13112001-12-29 Akim Demaille <akim@epita.fr>
1312
1313 %name-prefix is broken.
1314
1315 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1316 Adjust all dependencies.
1317 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1318 %name-prefix.
1319
1320 Renaming yylval but not yylloc is not consistent. Now we do.
1321
1322 * src/bison.simple: Prefix yylloc if used.
1323 * doc/bison.texinfo (Decl Summary): Document that.
1324
13252001-12-29 Akim Demaille <akim@epita.fr>
1326
1327 * doc/bison.texinfo: Promote `%long-directive' over
1328 `%long_directive'.
1329 Remove all references to fixed-output-files, yacc is enough.
1330
13312001-12-29 Akim Demaille <akim@epita.fr>
1332
1333 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1334 user prologue. These are defaults.
1335 * tests/actions.at (Mid-rule actions): Make sure the user can
1336 define YYDEBUG and YYERROR_VERBOSE.
1337
13382001-12-29 Akim Demaille <akim@epita.fr>
1339
1340 * src/output.c (header_output): Don't forget to export YYLTYPE and
1341 yylloc.
1342 * tests/headers.at (export YYLTYPE): New, make sure it does.
1343 * tests/regression.at (%union and --defines, Invalid CPP headers):
1344 Move to...
1345 * tests/headers.at: here.
1346
13472001-12-29 Akim Demaille <akim@epita.fr>
1348
1349 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1350
13512001-12-29 Akim Demaille <akim@epita.fr>
1352
1353 * tests/actions.at (Mid-rule actions): Output on a single line
1354 instead of several.
1355
13562001-12-29 Akim Demaille <akim@epita.fr>
1357
1358 * doc/bison.texinfo: Formatting changes.
1359
13602001-12-29 Akim Demaille <akim@epita.fr>
1361
1362 Don't store the token defs in a muscle, just be ready to output it
1363 on command. Now possible via `symbols'. Fixes a memory leak.
1364
1365 * src/output.c (token_definitions_output): New.
1366 (output_parser, header_output): Use it.
1367 * src/reader.c (symbols_save): Remove.
1368
13692001-12-29 Akim Demaille <akim@epita.fr>
1370
1371 * src/bison.simple: Do not provide a default for YYSTYPE and
1372 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1373 default.
1374
13752001-12-29 Akim Demaille <akim@epita.fr>
1376
1377 Mid-rule actions are simply... ignored!
1378
1379 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1380 the empty-rule associated to the dummy symbol, not to the host
1381 rule.
1382 * tests/actions.at (Mid-rule actions): New.
1383
13842001-12-29 Akim Demaille <akim@epita.fr>
1385
1386 Memory leak.
1387
1388 * src/reader.c (reader): Free grammar.
1389
13902001-12-29 Akim Demaille <akim@epita.fr>
1391
1392 Memory leak.
1393
1394 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1395 since it allocates it for each state, although only one is needed.
1396 (allocate_storage): Do it here.
1397
13982001-12-29 Akim Demaille <akim@epita.fr>
1399
1400 * src/options.h, src/options.c (create_long_option_table): Rename
1401 as...
1402 (long_option_table_new): this, with a clearer prototype.
1403 (percent_table): Remove, unused,
1404 * src/getargs.c (getargs): Adjust.
1405
14062001-12-29 Akim Demaille <akim@epita.fr>
1407
1408 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1409 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1410 as states.
1411
14122001-12-29 Akim Demaille <akim@epita.fr>
1413
1414 * src/lalr.c (build_relations): Rename `states' as `states1'.
1415 Sorry, I don't understand exactly what it is, no better name...
1416
14172001-12-29 Akim Demaille <akim@epita.fr>
1418
1419 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1420 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1421 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1422 as rules.
1423
14242001-12-29 Akim Demaille <akim@epita.fr>
1425
1426 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1427 ago.
1428
14292001-12-29 Akim Demaille <akim@epita.fr>
1430
1431 * src/reader.c, src/reader.h (user_toknums): Remove.
1432 Adjust all users to use symbols[i]->user_token_number.
1433
14342001-12-29 Akim Demaille <akim@epita.fr>
1435
1436 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1437 Adjust all users to use symbols[i]->prec or ->assoc.
1438
14392001-12-29 Akim Demaille <akim@epita.fr>
1440
1441 * src/reader.c, src/reader.h (tags): Remove.
1442 Adjust all users to use symbols[i]->tag.
1443
14442001-12-29 Akim Demaille <akim@epita.fr>
1445
1446 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1447 and rule_table.
1448 * src/reader.c (packsymbols): Fill this table.
1449 Drop sprec.
1450 * src/conflicts.c (resolve_sr_conflict): Adjust.
1451 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1452 single table.
1453 Use symbols[i]->tag instead of tags[i].
1454
14552001-12-29 Akim Demaille <akim@epita.fr>
1456
1457 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1458 In addition, put a comment in there, to replace...
1459 * tests/regression.at (%union and C comments): Remove.
1460
14612001-12-29 Akim Demaille <akim@epita.fr>
1462
1463 * tests/regression.at (Web2c Actions): Blindly move the actual
1464 output as expected output. The contents *seem* right to me, but I
1465 can't pretend reading perfectly parser tables... Nonetheless, all
1466 the other tests pass correctly, the table look OK, even though the
1467 presence of `$axiom' is to be noted: AFAICS it is useless (but
1468 harmless).
1469
14702001-12-29 Akim Demaille <akim@epita.fr>
1471
1472 * src/reader.c (readgram): Don't add the rule 0 if there were no
1473 rules read. In other words, add it _after_ having performed
1474 grammar sanity checks.
1475 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1476
14772001-12-29 Akim Demaille <akim@epita.fr>
1478
1479 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1480 visible, and some states have now a different number.
1481
14822001-12-29 Akim Demaille <akim@epita.fr>
1483
1484 * src/reader.c (readgram): Bind the initial rule's lineno to that
1485 of the first rule.
1486 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1487 (Solved SR Conflicts): Adjust rule 0's line number.
1488
14892001-12-29 Akim Demaille <akim@epita.fr>
1490
1491 Fix the `GAWK Grammar' failure.
1492
1493 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1494 the reductions of the first state which was mistakenly confused
1495 with the final state because precisely final_state was initialized
1496 to 0.
1497 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1498 now noticed by Bison.
1499 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1500 have a reduction on $default.
1501
15022001-12-29 Akim Demaille <akim@epita.fr>
1503
1504 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1505 rule line numbers.
1506 * src/closure.c (print_closure): Likewise.
1507 * src/derives.c (print_derives): Likewise.
1508 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1509 now.
1510
15112001-12-29 Akim Demaille <akim@epita.fr>
1512
1513 * src/lalr.c (lookaheads_print): New.
1514 (lalr): Call it when --trace-flag.
1515 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1516 are dumped.
1517
15182001-12-29 Akim Demaille <akim@epita.fr>
1519
1520 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1521 when walking through ritem, even via rule->rhs.
1522 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1523 (useful_production, useless_nonterminals): Likewise.
1524 (reduce_grammar_tables): Likewise, plus update nritems.
1525 * src/nullable.c (set_nullable): Likewise.
1526 * src/lalr.c (build_relations): Likewise.
1527 * tests/sets.at (Nullable): Adjust.
1528 Fortunately, now, the $axiom is no longer nullable.
1529
15302001-12-29 Akim Demaille <akim@epita.fr>
1531
1532 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1533 the 0-sentinel.
1534 * src/gram.c (ritem_longest_rhs): Likewise.
1535 * src/reduce.c (nonterminals_reduce): Likewise.
1536 * src/print_graph.c (print_graph): Likewise.
1537 * src/output.c (output_rule_data): Likewise.
1538 * src/nullable.c (set_nullable): Likewise.
1539
15402001-12-29 Akim Demaille <akim@epita.fr>
1541
1542 * src/output.c: Comment changes.
1543
15442001-12-27 Paul Eggert <eggert@twinsun.com>
1545
1546 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1547 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1548 Sparc, as they were causing more porting problems than the
1549 (minor) performance improvement was worth.
1550
1551 Also, catch up with 1.31's YYSTD.
1552
15532001-12-27 Akim Demaille <akim@epita.fr>
1554
1555 * src/output.c (output_gram): Rely on nritems, not the
1556 0-sentinel. See below.
1557 Use -1 as separator, not 0.
1558 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1559 Rely on -1 as separator in yyrhs, instead of 0.
1560 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1561 twice `Now at end of input', therefore there are two lines less to
1562 expect.
1563
15642001-12-27 Akim Demaille <akim@epita.fr>
1565
1566 * tests/regression.at (Unresolved SR Conflicts):
1567 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1568 below.
1569
15702001-12-27 Akim Demaille <akim@epita.fr>
1571
1572 * src/LR0.c (new_state): Recognize the final state by the fact it
1573 is reached by eoftoken.
1574 (insert_start_shifting_state, insert_eof_shifting_state)
1575 (insert_accepting_state, augment_automaton): Remove, since now
1576 these states are automatically computed from the initial state.
1577 (generate_states): Adjust.
1578 * src/print.c: When reporting a rule number to the user, substract
1579 1, so that the axiom rule is rule 0, and the first user rule is 1.
1580 * src/reduce.c: Likewise.
1581 * src/print_graph.c (print_core): For the time being, just as for
1582 the report, depend upon --trace-flags to dump the full set of
1583 items.
1584 * src/reader.c (readgram): Once the grammar read, insert the rule
1585 0: `$axiom: START-SYMBOL $'.
1586 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1587 number of the states has changed (the final state is no longer
1588 necessarily the last), catch up.
1589
15902001-12-27 Akim Demaille <akim@epita.fr>
1591
1592 Try to make the use of the eoftoken valid. Given that its value
1593 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1594 is used instead of > 0 where appropriate, (ii), depend upon nritems
1595 instead of the 0-sentinel.
1596
1597 * src/gram.h, src/gram.c (nritems): New.
1598 Expected to be duplication of nitems, but for the time being...
1599 * src/reader.c (packgram): Assert nritems and nitems are equal.
1600 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1601 * src/closure.c (print_closure, print_fderives): Likewise.
1602 * src/gram.c (ritem_print): Likewise.
1603 * src/print.c (print_core, print_grammar): Likewise.
1604 * src/print_graph.c: Likewise.
1605
16062001-12-27 Akim Demaille <akim@epita.fr>
1607
1608 * src/main.c (main): If there are complains after grammar
1609 reductions, then output the report anyway if requested, then die.
1610 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1611 * src/reader.c (eoftoken): New.
1612 (parse_token_decl): If the token being defined has value `0', it
1613 is the eoftoken.
1614 (packsymbols): No longer hack `tags' to insert `$' by hand.
1615 Be sure to preserve the value of the eoftoken.
1616 (reader): Make sure eoftoken is defined.
1617 Initialize nsyms to 0: now eoftoken is created just like the others.
1618 * src/print.c (print_grammar): Don't special case the eof token.
1619 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1620 lie anyway, albeit pleasant.
1621 * tests/calc.at: Exercise error messages with eoftoken.
1622 Change the grammar so that empty input is invalid.
1623 Adjust expectations.
1624 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1625
16262001-12-27 Akim Demaille <akim@epita.fr>
1627
1628 * configure.in: Check the protos of strchr ans strspn.
1629 Replace strchr if needed.
1630 * src/system.h: Provide the protos of strchr, strspn and memchr if
1631 missing.
1632 * lib/strchr.c: New.
1633 * src/reader.c (symbols_save): Use strchr.
1634
16352001-12-27 Akim Demaille <akim@epita.fr>
1636
1637 * src/print.c, src/print_graph.c (escape): New.
1638 Use it to quote the TAGS outputs.
1639 * src/print_graph.c (print_state): Now errors are in red, and
1640 reductions in green.
1641 Prefer high to wide: output the state number on a line of its own.
1642
16432001-12-27 Akim Demaille <akim@epita.fr>
1644
1645 * src/state.h, src/state.c (reductions_new): New.
1646 * src/LR0.c (set_state_table): Let all the states have a
1647 `reductions', even if reduced to 0.
1648 (save_reductions): Adjust.
1649 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1650 * src/print.c (print_reductions, print_actions): Adjust.
1651 * src/output.c (action_row): Adjust.
1652
16532001-12-27 Akim Demaille <akim@epita.fr>
1654
1655 * src/state.h, src/state.c (errs_new, errs_dup): New.
1656 * src/LR0.c (set_state_table): Let all the states have an errs,
1657 even if reduced to 0.
1658 * src/print.c (print_errs, print_reductions): Adjust.
1659 * src/output.c (output_actions, action_row): Adjust.
1660 * src/conflicts.c (resolve_sr_conflict): Adjust.
1661
16622001-12-27 Akim Demaille <akim@epita.fr>
1663
1664 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1665
16662001-12-27 Akim Demaille <akim@epita.fr>
1667
1668 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1669 * src/print.c: here.
1670 (lookaheadset, shiftset): New, used as additional storage by
1671 print_reductions.
1672 (print_results): Adjust.
1673 (print_shifts, print_gotos, print_errs): New, extracted from...
1674 (print_actions): here.
1675 * src/print_graph.c (print_actions): Remove dead code.
1676
16772001-12-27 Akim Demaille <akim@epita.fr>
1678
1679 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1680 `$n' and `@n'.
1681
16822001-12-27 Akim Demaille <akim@epita.fr>
1683
1684 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1685 (build_relations): Adjust.
1686
16872001-12-27 Akim Demaille <akim@epita.fr>
1688
1689 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1690 duplication.
1691
16922001-12-27 Akim Demaille <akim@epita.fr>
1693
1694 * src/reader.c (packgram): Catch nitems overflows.
1695
16962001-12-27 Akim Demaille <akim@epita.fr>
1697
1698 * src/files.c, src/files.h (guard_obstack): Remove.
1699 * src/output.c (output): Adjust.
1700 * src/reader.c (parse_braces): New, factoring...
1701 (copy_action, copy_guard): these two which are renamed as...
1702 (parse_action, parse_guard): these.
1703 As a voluntary consequence, using braces around guards is now
1704 mandatory.
1705
17062001-12-27 Akim Demaille <akim@epita.fr>
1707
1708 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1709 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1710 members.
1711 (symbol_list_new): Adjust.
1712 (copy_action): action_line is the first line, not the last.
1713 (copy_guard): Just as for actions, store the `action' only, not
1714 the switch/case/break flesh.
1715 Don't parse the user action that might follow the guard, let...
1716 (readgram): do it, i.e., now, there can be an action after a
1717 guard.
1718 In other words the guard is just explicitly optional.
1719 (packgram): Adjust.
1720 * src/output.c (guards_output): New.
1721 (output_parser): Call it when needed.
1722 (output): Also free the guard and attrs obstacks.
1723 * src/files.c, src/files.h (obstack_save): Remove.
1724 (output_files): Remove.
1725 As a result, if one needs the former `.act' file, using an
1726 appropriate skeleton which requires actions and guards is now
1727 required.
1728 * src/main.c (main): Adjust.
1729 * tests/semantic.at: New.
1730 * tests/regression.at: Use `input.y' as input file name.
1731 Avoid 8+3 problems by requiring input.c when the test needs the
1732 parser.
1733
17342001-12-27 Akim Demaille <akim@epita.fr>
1735
1736 * src/reader.c (symbol_list_new): Be sure to initialize all the
1737 fields.
1738
17392001-12-27 Akim Demaille <akim@epita.fr>
1740
1741 All the hacks using a final pseudo state are now useless.
1742
1743 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1744 * src/lalr.c (nLA): New.
1745 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1746 instead of lookaheadsp from the pseudo state (nstate + 1).
1747
17482001-12-27 Akim Demaille <akim@epita.fr>
1749
1750 * src/output.c (action_row, token_actions): Use a state_t instead
1751 of a integer, and nlookaheads instead of the following state's
1752 lookaheadsp.
1753
17542001-12-27 Akim Demaille <akim@epita.fr>
1755
1756 * src/conflicts.c (log_resolution, flush_shift)
1757 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1758 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1759 (conflicts_print, print_reductions): Use a state_t instead of an
1760 integer when referring to a state.
1761 As much as possible, depend upon nlookaheads, instead of the
1762 `lookaheadsp' member of the following state (since lookaheads of
1763 successive states are successive, the difference between state n + 1
1764 and n served as the number of lookaheads for state n).
1765 * src/lalr.c (add_lookback_edge): Likewise.
1766 * src/print.c (print_core, print_actions, print_state)
1767 (print_results): Likewise.
1768 * src/print_graph.c (print_core, print_actions, print_state)
1769 (print_graph): Likewise.
1770 * src/conflicts.h: Adjust.
1771
17722001-12-27 Akim Demaille <akim@epita.fr>
1773
1774 * src/bison.hairy: Formatting/comment changes.
1775 ANSIfy.
1776 Remove `register' indications.
1777 Add plenty of `static'.
1778
17792001-12-27 Akim Demaille <akim@epita.fr>
1780
1781 * src/output.c (prepare): Drop the muscle `ntbase' which
1782 duplicates ntokens.
1783 * src/bison.simple: Formatting/comment changes.
1784 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1785 is an undocumented synonym.
1786
17872001-12-22 Akim Demaille <akim@epita.fr>
1788
1789 * src/output.c (output_table_data): Change the prototype to use
1790 `int' for array ranges: some invocations do pass an int, not a
1791 short.
1792 Reported by Wayne Green.
1793
17942001-12-22 Akim Demaille <akim@epita.fr>
1795
1796 Some actions of web2c.y are improperly triggered.
1797 Reported by Mike Castle.
1798
1799 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1800 * tests/regression.at (Web2c): Rename as...
1801 (Web2c Report): this.
1802 (Web2c Actions): New.
1803
18042001-12-22 Akim Demaille <akim@epita.fr>
1805
1806 Reductions in web2c.y are improperly reported.
1807 Reported by Mike Castle.
1808
1809 * src/conflicts.c (print_reductions): Fix.
1810 * tests/regression.at (Web2c): New.
1811
18122001-12-18 Akim Demaille <akim@epita.fr>
1813
1814 Some host fail on `assert (!"foo")', which expands to
1815 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1816 Reported by Nelson Beebee.
1817
1818 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1819 `#define it_succeeded 0' and `assert (it_succeeded)'.
1820
18212001-12-17 Marc Autret <autret_m@epita.fr>
1822
1823 * src/bison.simple: Don't hard code the skeleton line and filename.
1824 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1825 New line counter 'skeleton_line' (skeleton-line muscle).
1826
18272001-12-17 Paul Eggert <eggert@twinsun.com>
1828
1829 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1830 YYDEBUG must be defined to a nonzero value.
1831
1832 * src/bison.simple (yytname): Do not assume that the user defines
1833 YYDEBUG to a properly parenthesized expression.
1834
18352001-12-17 Akim Demaille <akim@epita.fr>
1836
1837 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1838 nlookaheads is a new member.
1839 Adjust all users.
1840 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1841 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1842 state.
1843
18442001-12-17 Akim Demaille <akim@epita.fr>
1845
1846 * src/files.h, src/files.c (open_files, close_files): Remove.
1847 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1848 let...
1849 * src/reader.c (reader): Do it.
1850
18512001-12-17 Akim Demaille <akim@epita.fr>
1852
1853 * src/conflicts.c (print_reductions): Formatting changes.
1854
18552001-12-17 Akim Demaille <akim@epita.fr>
1856
1857 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1858 (flush_reduce): New.
1859 (resolve_sr_conflict): Adjust.
1860
18612001-12-17 Akim Demaille <akim@epita.fr>
1862
1863 * src/output.c (output_obstack): Be static and rename as...
1864 (format_obstack): this, to avoid any confusion with files.c's
1865 output_obstack.
1866 * src/reader.h (muscle_obstack): Move to...
1867 * src/output.h: here, since it's defined in output.c.
1868
18692001-12-17 Akim Demaille <akim@epita.fr>
1870
1871 * src/output.c (action_row, save_column, default_goto)
1872 (sort_actions, matching_state, pack_vector): Better variable
1873 locality.
1874
18752001-12-17 Akim Demaille <akim@epita.fr>
1876
1877 * src/output.c: Various formatting changes.
1878
18792001-12-17 Akim Demaille <akim@epita.fr>
1880
1881 * src/files.c (output_files): Free the output_obstack.
1882 * src/main.c (main): Call print and print_graph conditionally.
1883 * src/print.c (print): Work unconditionally.
1884 * src/print_graph.c (print_graph): Work unconditionally.
1885 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1886
18872001-12-16 Marc Autret <autret_m@epita.fr>
1888
1889 * src/output.c (actions_output): Fix. When we use %no-lines,
1890 there is one less line per action.
1891
18922001-12-16 Marc Autret <autret_m@epita.fr>
1893
1894 * src/bison.simple: Remove a useless #line directive.
1895 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1896 * src/output.c (get_lines_number): New.
1897 (output_parser): Adjust, now takes care about the lines of a
1898 output muscles.
1899 Fix line numbering.
1900 (actions_output): Computes the number of lines taken by actions.
1901 (output_master_parser): Insert new skeleton which is the name of
1902 the output parser file name.
1903
19042001-12-15 Marc Autret <autret_m@epita.fr>
1905
1906 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1907
19082001-12-15 Marc Autret <autret_m@epita.fr>
1909
1910 * src/output.c (output_gram): Keep track of the hairy one.
1911
19122001-12-15 Akim Demaille <akim@epita.fr>
1913
1914 Make `make distcheck' work.
1915
1916 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1917 system.h which uses libgettext.h.
1918
19192001-12-15 Akim Demaille <akim@epita.fr>
1920
1921 * src/nullable.c (set_nullable): Useless rules must be skipped,
1922 otherwise, since we range over their symbols, we might look at a
1923 nonterminal which no longer ``exists'', i.e., it is not counted in
1924 `nvars', hence we overflow our arrays.
1925
19262001-12-15 Akim Demaille <akim@epita.fr>
1927
1928 The header can also be produced directly, without any obstack!
1929 Yahoo!
1930
1931 * src/files.c, src/files.h (defines_obstack): Remove.
1932 (compute_header_macro): Global.
1933 (defines_obstack_save): Remove.
1934 * src/reader.c (parse_union_decl): No longer output to
1935 defines_obstack: its content can be found in the `stype' muscle
1936 anyway.
1937 (output_token_translations): Merge into...
1938 (symbols_output): this.
1939 Rename as...
1940 (symbols_save): this.
1941 (reader): Adjust.
1942 * src/output.c (header_output): New.
1943 (output): Call it.
1944
19452001-12-15 Akim Demaille <akim@epita.fr>
1946
1947 * src/reader.c (parse_union_decl): Instead of handling two obstack
1948 simultaneously, use one to define the `stype' muscle, and use the
1949 value of the latter to fill defines_obstack.
1950 (copy_comment): Remove.
1951 (copy_comment2): Work for a single obstack.
1952 Rename as...
1953 (copy_comment): this.
1954
19552001-12-15 Akim Demaille <akim@epita.fr>
1956
1957 * src/lex.c, src/lex.h (xgetc): No longer static.
1958 * src/reader.c (parse_union_decl): Revamp.
1959
19602001-12-15 Akim Demaille <akim@epita.fr>
1961
1962 Still making progress in separating Bison into (i) input, (ii)
1963 process, (iii) output: now we can directly output the parser file
1964 without using table_obstack at all.
1965
1966 * src/files.c, src/files.h (table_obstack): Bye bye.
1967 (parser_file_name): New.
1968 * src/files.c (compute_output_file_names): Compute it.
1969 * src/output.c (actions_output, output_parser)
1970 (output_master_parser): To a file instead of an obstack.
1971
19722001-12-15 Akim Demaille <akim@epita.fr>
1973
1974 Attach actions to rules, instead of pre-outputting them to
1975 actions_obstack.
1976
1977 * src/gram.h (rule_t): action and action_line are new members.
1978 * src/reader.c (symbol_list): Likewise.
1979 (copy_action): Save the actions within the rule.
1980 (packgram): Save them in rule_table.
1981 * src/output.c (actions_output): New.
1982 (output_parser): Use it on `%%actions'.
1983 (output_rule_data): Don't free rule_table.
1984 (output): Do it.
1985 (prepare): Don't save the `action' muscle.
1986 * src/bison.simple: s/%%action/%%actions/.
1987
19882001-12-15 Akim Demaille <akim@epita.fr>
1989
1990 * src/reader.c (copy_action): When --yacc, don't append a `;'
1991 to the user action: let it fail if lacking.
1992 Suggested by Arnold Robbins and Tom Tromey.
1993
19942001-12-14 Akim Demaille <akim@epita.fr>
1995
1996 * src/lex.c (literalchar): Simply return the char you decoded, non
1997 longer mess around with obstacks and int pointers.
1998 Adjust all callers.
1999
20002001-12-14 Akim Demaille <akim@epita.fr>
2001
2002 * src/lex.c (literalchar): Don't escape the special characters,
2003 just decode them, and keep them as char (before, eol was output as
2004 the 2 char string `\n' etc.).
2005 * src/output.c (output_rule_data): Use quotearg to output the
2006 token strings.
2007
20082001-12-13 Paul Eggert <eggert@twinsun.com>
2009
2010 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2011 Do not infringe on the global user namespace when using C++.
2012 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2013 All uses of `fprintf' and `stderr' changed.
2014
2015 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2016
20172001-12-13 Akim Demaille <akim@epita.fr>
2018
2019 The computation of nullable is broken: it doesn't handle empty
2020 RHS's properly.
2021
2022 * tests/torture.at (GNU AWK Grammar): New.
2023 * tests/sets.at (Nullable): New.
2024 * src/nullable.c (set_nullable): Instead of blindly looping over
2025 `ritems', loop over the rules, and then over their rhs's.
2026
2027 Work around Autotest bugs.
2028
2029 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2030 frame, because Autotest understand lines starting with a `+' as
2031 traces from the shell. Then, they are not processed properly.
2032 Admittedly an Autotest bug, but we don't have time to wait for
2033 Autotest to catch up.
2034 * tests/regression.at (Broken Closure): Adjust to the new table
2035 frames.
2036 Move to...
2037 * tests/sets.at: here.
2038
20392001-12-13 Akim Demaille <akim@epita.fr>
2040
2041 * src/closure.c (closure): Use nrules instead of playing tricks
2042 with BITS_PER_WORD.
2043
20442001-12-13 Akim Demaille <akim@epita.fr>
2045
2046 * src/print.c (print_actions): Output the handling of `$' as the
2047 traces do: shifting the token EOF. Before EOF was treated as a
2048 nonterminal.
2049 * tests/regression.at: Adjust some tests.
2050 * src/print_graph.c (print_core): Complete the set of items via
2051 closure. The next-to-final and final states are still unsatisfying,
2052 but that's to be addressed elsewhere.
2053 No longer output the rule numbers, but do output the state number.
2054 A single loop for the shifts + gotos is enough, but picked a
2055 distinct color for each.
2056 (print_graph): Initialize and finalize closure.
2057
20582001-12-13 Akim Demaille <akim@epita.fr>
2059
2060 * src/reader.c (readgram): Remove dead code, an strip useless
2061 braces.
2062 (get_type): Remove, unused.
2063
20642001-12-12 Akim Demaille <akim@epita.fr>
2065
2066 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2067 on that of lib/error.c.
2068
20692001-12-12 Akim Demaille <akim@epita.fr>
2070
2071 Some hosts don't like `/' in includes.
2072
2073 * src/system.h: Include libgettext.h without qualifying the path.
2074 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2075 $(top_srcdir).
2076
20772001-12-11 Marc Autret <autret_m@epita.fr>
2078
2079 * src/output.c (output_parser): Remove useless muscle.
2080
20812001-12-11 Marc Autret <autret_m@epita.fr>
2082
2083 * src/bison.simple: Remove #line just before %%epilogue. It
2084 is now handled in ...
2085 * src/reader.c (read_additionnal_code): Add the output of a
2086 #line for the epilogue.
2087
20882001-12-10 Marc Autret <autret_m@epita.fr>
2089
2090 * src/reader.c (copy_definition): Re-use CPP-outed code which
2091 replace precedent remove.
2092 * src/bison.simple: Remove #line before %%prologue because
2093 %%input-line is wrong at this time.
2094
20952001-12-10 Marc Autret <autret_m@epita.fr>
2096
2097 * src/reader.c (symbols_output): Clean up.
2098 * src/output.c (output_gram, output): Clean up.
2099
21002001-12-10 Akim Demaille <akim@epita.fr>
2101
2102 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2103 * src/LR0.c (set_state_table): here.
2104 * src/lalr.c (lalr): Call it.
2105
21062001-12-10 Akim Demaille <akim@epita.fr>
2107
2108 * src/state.h (shifts): Remove the `number' member: shifts are
2109 attached to state, hence no longer need to be labelled with a
2110 state number.
2111
21122001-12-10 Akim Demaille <akim@epita.fr>
2113
2114 Now that states have a complete set of members, the linked list of
2115 shifts is useless: just fill directly the state's shifts member.
2116
2117 * src/state.h (shifts): Remove the `next' member.
2118 * src/LR0.c (first_state, last_state): Remove.
2119 Adjust the callers.
2120 (augment_automaton): Don't look for the shifts that must be added
2121 a shift on EOF: it is those of the state we looked for! But now,
2122 since shifts are attached, it is no longer needed to looking
2123 merely by its id: its number.
2124
21252001-12-10 Akim Demaille <akim@epita.fr>
2126
2127 * src/LR0.c (augment_automaton): Better variable locality.
2128 Remove an impossible branch: if there is a state corresponding to
2129 the start symbol being shifted, then there is shift for the start
2130 symbol from the initial state.
2131
21322001-12-10 Akim Demaille <akim@epita.fr>
2133
2134 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2135 only when appropriate: when insert_start_shifting_state' is not
2136 invoked.
2137 * tests/regression.at (Rule Line Numbers): Adjust.
2138
21392001-12-10 Akim Demaille <akim@epita.fr>
2140
2141 * src/LR0.c (augment_automaton): Now that all states have shifts,
2142 merge the two cases addition shifts to the initial state.
2143
21442001-12-10 Akim Demaille <akim@epita.fr>
2145
2146 * src/lalr.c (set_state_table): Move to...
2147 * src/LR0.c: here.
2148 * src/lalr.c (lalr): Don't call it...
2149 * src/LR0.c (generate_states): do it.
2150 * src/LR0.h (first_state): Remove, only the table is used.
2151
21522001-12-10 Akim Demaille <akim@epita.fr>
2153
2154 * src/LR0.h (first_shift, first_reduction): Remove.
2155 * src/lalr.c: Don't use first_shift: find shifts through the
2156 states.
2157
21582001-12-10 Akim Demaille <akim@epita.fr>
2159
2160 * src/LR0.c: Attach shifts to states as soon as they are
2161 computed.
2162 * src/lalr.c (set_state_table): Instead of assigning shifts to
2163 state, just assert that the mapping was properly done.
2164
21652001-12-10 Akim Demaille <akim@epita.fr>
2166
2167 * src/LR0.c (insert_start_shift): Rename as...
2168 (insert_start_shifting_state): this.
2169 (insert_eof_shifting_state, insert_accepting_state): New.
2170 (augment_automaton): Adjust.
2171 Better locality of the variables.
2172 When looking if the start_symbol is shifted from the initial
2173 state, using `while (... symbol != start_symbol ...)' sounds
2174 better than `while (... symbol < start_symbol ...)': If fail
2175 to see how the order between symbols could be relevant!
2176
21772001-12-10 Akim Demaille <akim@epita.fr>
2178
2179 * src/getargs.h: Don't declare `spec_name_prefix' and
2180 `spec_file_prefix', declared by src/files.h.
2181 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2182 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2183 * src/output.c (prepare): Adjust.
2184 * src/reader.c (symbols_output): Likewise.
2185 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2186
21872001-12-10 Akim Demaille <akim@epita.fr>
2188
2189 * src/muscle_tab.c (muscle_init): NULL is a better default than
2190 `"0"'.
2191
21922001-12-10 Akim Demaille <akim@epita.fr>
2193
2194 * src/reader.c (reader): Calling symbols_output once is enough.
2195
21962001-12-10 Akim Demaille <akim@epita.fr>
2197
2198 Now that states have a complete set of members, the linked list of
2199 reductions is useless: just fill directly the state's reductions
2200 member.
2201
2202 * src/state.h (struct reductions): Remove member `number' and
2203 `next'.
2204 * src/LR0.c (first_reduction, last_reduction): Remove.
2205 (save_reductions): Don't link the new reductions, store them in
2206 this_state.
2207 * src/lalr.c (set_state_table): No need to attach reductions to
2208 states, it's already done.
2209 * src/output.c (output_actions): No longer free the shifts, then
2210 the reductions, then the states: free all the states and their
2211 members.
2212
22132001-12-10 Akim Demaille <akim@epita.fr>
2214
2215 * src/options.c (OPTN, DRTV, BOTH): New.
2216 (option_table): Use them.
2217
2218 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2219 the job of system.h.
2220 * src/options.c: Don't include stdio.h and xalloc.h for the same
2221 reasons.
2222
22232001-12-10 Akim Demaille <akim@epita.fr>
2224
2225 * src/output.c (output, prepare): Make sure the values of the
2226 muscles `action' and `prologue' are 0-terminated.
2227
22282001-12-10 Akim Demaille <akim@epita.fr>
2229
2230 Clean up GCC warnings.
2231
2232 * src/reader.c (copy_action): `buf' is not used.
2233 (parse_skel_decl): Be static.
2234 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2235 * src/options.h (create_long_option_table): Have a real prototype.
2236 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2237 (hash_delete_at): Return const void *.
2238 Adjust casts to preserve the const.
2239
22402001-12-10 Akim Demaille <akim@epita.fr>
2241
2242 * configure.in: Require 2.52g.
2243 M4 is not needed, but AUTOM4TE is.
2244 * m4/m4.m4: Remove.
2245 * tests/Makefile.am: Adjust.
2246
22472001-12-10 Akim Demaille <akim@epita.fr>
2248
2249 One structure for states is enough, even though theoretically
2250 there are LR(0) states and LALR(1) states.
2251
2252 * src/lalr.h (state_t): Remove.
2253 (state_table): Be state_t **, not state_t *.
2254 * src/state.h (core, CORE_ALLOC): Rename as...
2255 (state_t, STATE_ALLOC): this.
2256 Add the LALR(1) members: shifts, reductions, errs.
2257 * src/LR0.c (state_table): Rename as...
2258 (state_hash): this, to avoid name clashes with the global
2259 `state_table'.
2260 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2261 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2262
22632001-12-10 Akim Demaille <akim@epita.fr>
2264
2265 Bison dumps core on bash.y.
2266 Reported by Pascal Bart.
2267
2268 * src/warshall.c (bitmatrix_print): New.
2269 (TC): Use it.
2270 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2271 j must be the outer loop.
2272 * tests/regression.at (Broken Closure): New.
2273
22742001-12-05 Akim Demaille <akim@epita.fr>
2275
2276 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2277 its argument.
2278