]> git.saurik.com Git - bison.git/blame - ChangeLog
* tests/regression.at (Token definitions): Prototype yylex and
[bison.git] / ChangeLog
CommitLineData
db7c8e9a
AD
12002-05-13 Akim Demaille <akim@epita.fr>
2
3 * tests/regression.at (Token definitions): Prototype yylex and
4 yyerror.
5
fcc61800
PH
62002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7
158c687b 8 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
9 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10 32-bit arithmetic.
11 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
12
5683e9b2
AD
132002-05-07 Akim Demaille <akim@epita.fr>
14
15 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16 avoid GCC warnings.
17
0c2d3f4c
AD
182002-05-07 Akim Demaille <akim@epita.fr>
19
20 Kill GCC warnings.
21
22 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
23 over the RHS of each rule.
24 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
25 * src/state.h (state_t): Member `nitems' is unsigned short.
26 * src/LR0.c (get_state): Adjust.
27 * src/reader.c (packgram): Likewise.
28 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
29 `Type'.
30 (muscle_insert_int_table): Remove, unused.
31 (prepare_rules): Remove `max'.
32
1565b720
AD
332002-05-06 Akim Demaille <akim@epita.fr>
34
35 * src/closure.c (print_firsts): Display of the symbol tags.
36 (bitmatrix_print): Move to...
37 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
38 here.
39 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
40
cfaee611
AD
412002-05-06 Akim Demaille <akim@epita.fr>
42
43 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
44 hash_do_for_each.
45
458be8e0
AD
462002-05-06 Akim Demaille <akim@epita.fr>
47
48 * src/LR0.c (new_state, get_state): Instead of using the global
49 `kernel_size' and `kernel_base', have two new arguments:
50 `core_size' and `core'.
51 Adjust callers.
52
a900a624
AD
532002-05-06 Akim Demaille <akim@epita.fr>
54
55 * src/reader.c (packgram): No longer end `ritem' with a 0
56 sentinel: it is not used.
57
d4e7d3a1
AD
582002-05-05 Akim Demaille <akim@epita.fr>
59
60 New experimental feature: display the lookaheads in the report and
61 graph.
62
63 * src/print (print_core): When --trace-flag, display the rules
64 lookaheads.
65 * src/print_graph.c (print_core): Likewise.
66 Swap the arguments.
67 Adjust caller.
68
39ceb25b
AD
692002-05-05 Akim Demaille <akim@epita.fr>
70
71 * tests/torture.at (Many lookaheads): New test.
72
5372019f
AD
732002-05-05 Akim Demaille <akim@epita.fr>
74
75 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
76 (GENERATE_MUSCLE_INSERT_TABLE): this.
77 (output_int_table, output_unsigned_int_table, output_short_table)
78 (output_token_number_table, output_item_number_table): Replace with...
79 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
80 (muscle_insert_short_table, muscle_insert_token_number_table)
81 (muscle_insert_item_number_table): these.
82 Adjust all callers.
83 (prepare_tokens): Don't free `translations', since...
84 * src/reader.h, src/reader.c (grammar_free): do it.
85 Move to...
86 * src/gram.h, src/gram.c (grammar_free): here.
87 * data/bison.simple, data/bison.c++: b4_token_number_max is now
88 b4_translate_max.
89
5df5f6d5
AD
902002-05-05 Akim Demaille <akim@epita.fr>
91
92 * src/output.c (output_unsigned_int_table): New.
93 (prepare_rules): `i' is unsigned.
94 `prhs', `rline', `r2' are unsigned int.
95 Rename muscle `rhs_number_max' as `rhs_max'.
96 Output muscles `prhs_max', `rline_max', and `r2_max'.
97 Free rline and r1.
98 * data/bison.simple, data/bison.c++: Adjust to use these muscles
99 to compute types instead of constant types.
100 * tests/regression.at (Web2c Actions): Adjust.
101
b87f8b21
AD
1022002-05-04 Akim Demaille <akim@epita.fr>
103
104 * src/symtab.h (SALIAS, SUNDEF): Rename as...
105 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
106 Adjust dependencies.
107 * src/output.c (token_definitions_output): Be sure not to output a
108 `#define 'a'' when fed with `%token 'a' "a"'.
109 * tests/regression.at (Token definitions): New.
110
8bb936e4
PE
1112002-05-03 Paul Eggert <eggert@twinsun.com>
112
113 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
114 for K&R C.
115
1162002-05-03 gettextize <bug-gnu-gettext@gnu.org>
117
118 * Makefile.am (SUBDIRS): Remove intl.
119 (EXTRA_DIST): Add config/config.rpath.
120
53c71a12
AD
1212002-05-03 Akim Demaille <akim@epita.fr>
122
123 * data/bison.simple (m4_if): Don't output empty enums.
124 And actually, output valid enum definitions :(.
125
289dd0cf
AD
1262002-05-03 Akim Demaille <akim@epita.fr>
127
128 * configure.bat: Remove, completely obsolete.
129 * Makefile.am (EXTRA_DIST): Adjust.
130 Don't distribute config.rpath...
131 * config/Makefile.am (EXTRA_DIST): Do it.
132
db85e524
AD
1332002-05-03 Akim Demaille <akim@epita.fr>
134
135 * configure.in (GETTEXT_VERSION): New.
136 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
137
83ccf991
AD
1382002-05-03 Akim Demaille <akim@epita.fr>
139
140 * data/bison.simple (b4_token_enum): New.
141 (b4_token_defines): Use it to output tokens both as #define and
142 enums.
143 Suggested by Paul Eggert.
144 * src/output.c (token_definitions_output): Don't output spurious
145 white spaces.
146
1f418995
AD
1472002-05-03 Akim Demaille <akim@epita.fr>
148
149 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
150
45119f04
RA
1512002-05-02 Robert Anisko <robert@lrde.epita.fr>
152
153 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
154 Update the stack class, give a try to deque as the default container.
155
b2d52318
AD
1562002-05-02 Akim Demaille <akim@epita.fr>
157
158 * data/bison.simple (yyparse): Do not implement @$ = @1.
159 (YYLLOC_DEFAULT): Adjust to do it.
160 * doc/bison.texinfo (Location Default Action): Fix.
161
3a8b4109
AD
1622002-05-02 Akim Demaille <akim@epita.fr>
163
164 * src/reader.c (parse_braces): Merge into...
165 (parse_action): this.
166
84614e13
AD
1672002-05-02 Akim Demaille <akim@epita.fr>
168
169 * configure.in (ALL_LINGUAS): Remove.
170 * po/LINGUAS, hr.po: New.
171
fdbcd8e2
AD
1722002-05-02 Akim Demaille <akim@epita.fr>
173
174 Remove the so called hairy (semantic) parsers.
175
176 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
177 * src/gram.h, src/gram.c (semantic_parser): Remove.
178 (rule_t): Remove the guard and guard_line members.
179 * src/lex.h (token_t): remove tok_guard.
180 * src/options.c (option_table): Remove %guard and %semantic_parser
181 support.
182 * src/output.c, src/output.h (guards_output): Remove.
183 (prepare): Adjust.
184 (token_definitions_output): Don't output the `T'
185 tokens (???).
186 (output_skeleton): Don't output the guards.
187 * src/files.c, src/files.c (attrsfile): Remove.
188 * src/reader.c (symbol_list): Remove the guard and guard_line
189 members.
190 Adjust dependencies.
191 (parse_guard): Remove.
192 * data/bison.hairy: Remove.
193 * doc/bison.texinfo (Environment Variables): Remove occurrences of
194 BISON_HAIRY.
195
82b6cb3f
AD
1962002-05-02 Akim Demaille <akim@epita.fr>
197
198 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
199 (parse_guard): Rename the formal argument `stack_offset' as
200 `rule_length', which is more readable.
201 Adjust callers.
202 (copy_at, copy_dollar): Instead of outputting the hard coded
203 values of $$, $n and so forth, output invocation to b4_lhs_value,
204 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
205 Note: this patch partially drops `semantic-parser' support: it
206 always does `rule_length - n', where semantic parsers ought to
207 always use `-n'.
82b6cb3f
AD
208 * data/bison.simple, data/bison.c++ (b4_lhs_value)
209 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
210
6cbfbcc5
AD
2112002-05-02 Akim Demaille <akim@epita.fr>
212
213 * configure.in (AC_INIT): Bump to 1.49b.
214 (AM_INIT_AUTOMAKE): Short invocation.
215
b8548114
AD
2162002-05-02 Akim Demaille <akim@epita.fr>
217
218 Version 1.49a.
219
c20cd1fa
AD
2202002-05-01 Akim Demaille <akim@epita.fr>
221
222 * src/skeleton.h: Remove.
223
8a9566d4
AD
2242002-05-01 Akim Demaille <akim@epita.fr>
225
226 * src/skeleton.h: Fix the #endif.
227 Reported by Magnus Fromreide.
228
8c6d399a
PE
2292002-04-26 Paul Eggert <eggert@twinsun.com>
230
231 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
232 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 233 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 234
2b7ed18a
RA
2352002-04-25 Robert Anisko <robert@lrde.epita.fr>
236
237 * src/scan-skel.l: Postprocess quadrigraphs.
238
239 * src/reader.c (copy_character): New function, used to output
240 single characters while replacing `[' and `]' with quadrigraphs, to
241 avoid troubles with M4 quotes.
242 (copy_comment): Output characters with copy_character.
243 (read_additionnal_code): Likewise.
244 (copy_string2): Likewise.
245 (copy_definition): Likewise.
246
247 * tests/calc.at: Exercise M4 quoting.
248
34a89c50
AD
2492002-04-25 Akim Demaille <akim@epita.fr>
250
251 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
252 between `!' and the command.
253 Reported by Paul Eggert.
254
0dd1580a
RA
2552002-04-24 Robert Anisko <robert@lrde.epita.fr>
256
257 * tests/calc.at: Exercise prologue splitting.
258
259 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
260 `b4_post_prologue' instead of `b4_prologue'.
261
262 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
263 muscles.
264 (output): Free pre_prologue_obstack and post_prologue_obstack.
265 * src/files.h, src/files.c (attrs_obstack): Remove.
266 (pre_prologue_obstack, post_prologue_obstack): New.
267 * src/reader.c (copy_definition): Add a parameter to specify the
268 obstack to fill, instead of using attrs_obstack unconditionally.
269 (read_declarations): Pass pre_prologue_obstack to copy_definition if
270 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
271
83c1796f
PE
2722002-04-23 Paul Eggert <eggert@twinsun.com>
273
274 * data/bison.simple: Remove unnecessary commentary and white
275 space differences from 1_29-branch.
276 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
277
278 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
279 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
280 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
281 constructors or destructors.
282
283 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
284
1207eeac
AD
2852002-04-23 Akim Demaille <akim@epita.fr>
286
287 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
288 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
289 location with columns.
290 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
291 All reported by Paul Eggert.
292
78ab8f67
AD
2932002-04-22 Akim Demaille <akim@epita.fr>
294
295 * src/reduce.c (dump_grammar): Move to...
296 * src/gram.h, src/gram.c (grammar_dump): here.
297 Be sure to separate long item numbers.
298 Don't read the members of a rule's prec if its nil.
299
133c20e2
AD
3002002-04-22 Akim Demaille <akim@epita.fr>
301
302 * src/output.c (table_size, table_grow): New.
303 (MAXTABLE): Remove, replace uses with table_size.
304 (pack_vector): Instead of dying when the table is too big, grow it.
305
9515e8a7
AD
3062002-04-22 Akim Demaille <akim@epita.fr>
307
308 * data/bison.simple (yyr1): Its type is that of a token number.
309 * data/bison.c++ (r1_): Likewise.
310 * tests/regression.at (Web2c Actions): Adjust.
311
23c5a174
AD
3122002-04-22 Akim Demaille <akim@epita.fr>
313
314 * src/reader.c (token_translations_init): 256 is now the default
315 value for the error token, i.e., it will be assigned another
316 number if the user assigned 256 to one of her tokens.
317 (reader): Don't force 256 to error.
318 * doc/bison.texinfo (Symbols): Adjust.
319 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
320 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
321 etc. instead of 10, 20, 30 (which was used to `jump' over error
322 (256) and undefined (2)).
323
5fbb0954
AD
3242002-04-22 Akim Demaille <akim@epita.fr>
325
326 Propagate more token_number_t.
327
328 * src/gram.h (token_number_as_item_number)
329 (item_number_as_token_number): New.
330 * src/output.c (GENERATE_OUTPUT_TABLE): New.
331 Use it to create output_item_number_table and
332 output_token_number_table.
333 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
334 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
335 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
336 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
337
4f940944
AD
3382002-04-22 Akim Demaille <akim@epita.fr>
339
340 * src/output.h, src/output.c (get_lines_number): Remove.
341
3ded9a63
AD
3422002-04-19 Akim Demaille <akim@epita.fr>
343
344 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
345 as Lex/Flex'.
346 (Debugging): More details about enabling the debugging features.
347 (Table of Symbols): Describe $$, $n, @$, and @n.
348 Suggested by Tim Josling.
349
e0c471a9
AD
3502002-04-19 Akim Demaille <akim@epita.fr>
351
352 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
353
fecc10cd
AD
3542002-04-10 Akim Demaille <akim@epita.fr>
355
356 * src/system.h: Rely on HAVE_LIMITS_H.
357 Suggested by Paul Eggert.
358
51dec47b
AD
3592002-04-09 Akim Demaille <akim@epita.fr>
360
361 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
362 full stderr, and strip it according to the bison options, instead
363 of composing the error message from different bits.
364 This makes it easier to check for several error messages.
365 Adjust all the invocations.
366 Add an invocation exercising the error token.
367 Add an invocation demonstrating a stupid error message.
368 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
369 Adjust the tests.
370 Error message are for stderr, not stdout.
371
007a50a4
AD
3722002-04-09 Akim Demaille <akim@epita.fr>
373
374 * src/gram.h, src/gram.c (error_token_number): Remove, use
375 errtoken->number.
376 * src/reader.c (reader): Don't specify the user token number (2)
377 for $undefined, as it uselessly prevents using it.
378 * src/gram.h (token_number_t): Move to...
379 * src/symtab.h: here.
380 (state_t.number): Is a token_number_t.
381 * src/print.c, src/reader.c: Use undeftoken->number instead of
382 hard coded 2.
383 (Even though this 2 is not the same as above: the number of the
384 undeftoken remains being 2, it is its user token number which
385 might not be 2).
386 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
387 `user_token_number_max'.
388 Output `undef_token_number'.
389 * data/bison.simple, data/bison.c++: Use them.
390 Be sure to map invalid yylex return values to
391 `undef_token_number'. This saves us from gratuitous SEGV.
392
393 * tests/conflicts.at (Solved SR Conflicts)
394 (Unresolved SR Conflicts): Adjust.
395 * tests/regression.at (Web2c Actions): Adjust.
396
06446ccf
AD
3972002-04-08 Akim Demaille <akim@epita.fr>
398
399 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
400 Adding #line.
401 Remove the duplicate `typedefs'.
402 (RhsNumberType): Fix the declaration and various other typos.
403 Use __ofile__.
404 * data/bison.simple: Use __ofile__.
405 * src/scan-skel.l: Handle __ofile__.
406
62a3e4f0
AD
4072002-04-08 Akim Demaille <akim@epita.fr>
408
409 * src/gram.h (item_number_t): New, the type of item numbers in
410 RITEM. Note that it must be able to code symbol numbers as
411 positive number, and the negation of rule numbers as negative
412 numbers.
413 Adjust all dependencies (pretty many).
414 * src/reduce.c (rule): Remove this `short *' pointer: use
415 item_number_t.
416 * src/system.h (MINSHORT, MAXSHORT): Remove.
417 Include `limits.h'.
418 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
419 (shortcpy): Remove.
420 (MAXTABLE): Move to...
421 * src/output.c (MAXTABLE): here.
422 (prepare_rules): Use output_int_table to output rhs.
423 * data/bison.simple, data/bison.c++: Adjust.
424 * tests/torture.at (Big triangle): Move the limit from 254 to
425 500.
426 * tests/regression.at (Web2c Actions): Ajust.
427
428 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
429 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
430 passes, but produces negative #line number, once fixed, GCC is
431 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
432 C), it passes.
433 * src/state.h (state_h): Code input lines on ints, not shorts.
434
bb88b0fc
AD
4352002-04-08 Akim Demaille <akim@epita.fr>
436
437 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
438 and then the grammar.
439
9a636f47
AD
4402002-04-08 Akim Demaille <akim@epita.fr>
441
442 * src/system.h: No longer using strndup.
443
680e8701
AD
4442002-04-07 Akim Demaille <akim@epita.fr>
445
446 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
447 * src/output.c (output_table_data): Return the longest number.
448 (prepare_tokens): Output `token_number_max').
449 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
450 New.
451 Use them to define yy_token_number_type/TokenNumberType.
452 Use this type for yytranslate.
453 * tests/torture.at (Big triangle): Push the limit from 124 to
454 253.
455 * tests/regression.at (Web2c Actions): Adjust.
456
817e9f41
AD
4572002-04-07 Akim Demaille <akim@epita.fr>
458
459 * tests/torture.at (Big triangle): New.
460 (GNU AWK Grammar, GNU Cim Grammar): Move to...
461 * tests/existing.at: here.
462
5123689b
AD
4632002-04-07 Akim Demaille <akim@epita.fr>
464
465 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
466 nritems.
467 Adjust dependencies.
468
f3849179
AD
4692002-04-07 Akim Demaille <akim@epita.fr>
470
471 * src/reader.c: Normalize increments to prefix form.
472
bd02036a
AD
4732002-04-07 Akim Demaille <akim@epita.fr>
474
475 * src/reader.c, symtab.c: Remove debugging code.
476
db8837cb
AD
4772002-04-07 Akim Demaille <akim@epita.fr>
478
479 Rename all the `bucket's as `symbol_t'.
480
481 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
482 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
483 * src/symtab.c, src/symtab.h (bucket): Rename as...
484 (symbol_t): this.
485 (symbol_list_new, bucket_check_defined, bucket_make_alias)
486 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
487 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
488 (buckets_new, buckets_free, buckets_do): Rename as...
489 (symbol_list_new, symbol_check_defined, symbol_make_alias)
490 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
491 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
492 (symbols_new, symbols_free, symbols_do): these.
493
72a23c97
AD
4942002-04-07 Akim Demaille <akim@epita.fr>
495
496 Use lib/hash for the symbol table.
497
498 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
499 EOF.
500 * src/lex.c (lex): Set the `number' member of new terminals.
501 * src/reader.c (bucket_check_defined, bucket_make_alias)
502 (bucket_check_alias_consistence, bucket_translation): New.
503 (reader, grammar_free, readgram, token_translations_init)
504 (packsymbols): Adjust.
505 (reader): Number the predefined tokens.
506 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
507 for predefined tokens.
508 * src/symtab.h (bucket): Remove all the hash table related
509 members.
510 * src/symtab.c (symtab): Replace by...
511 (bucket_table): this.
512 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
513 (buckets_new, buckets_do): New.
514
280a38c3
AD
5152002-04-07 Akim Demaille <akim@epita.fr>
516
517 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
518 (start_symbol, max_user_token_number, semantic_parser)
519 (error_token_number): Initialize.
520 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
521 Initialize.
522 (reader): Don't.
523 (errtoken, eoftoken, undeftoken, axiom): Extern.
524
03b31c0c
AD
5252002-04-07 Akim Demaille <akim@epita.fr>
526
527 * src/gram.h (rule_s): prec and precsym are now pointers
528 to the bucket giving the priority/associativity.
529 Member `associativity' removed: useless.
530 * src/reduce.c, src/conflicts.c: Adjust.
531
8b3df748
AD
5322002-04-07 Akim Demaille <akim@epita.fr>
533
534 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
535 Properly escape the symbols' TAG when outputting them.
536
e601aa1d
AD
5372002-04-07 Akim Demaille <akim@epita.fr>
538
539 * src/lalr.h (LA): Is a bitsetv, not bitset*.
540
b0299a2e
AD
5412002-04-07 Akim Demaille <akim@epita.fr>
542
543 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
544 (LArule): this, which is an array to rule_t*.
545 * src/print.c, src/conflicts.c: Adjust.
546
d7e1f00c
AD
5472002-04-07 Akim Demaille <akim@epita.fr>
548
549 * src/gram.h (rule_t): Rename `number' as `user_number'.
550 `number' is a new member.
551 Adjust dependencies.
552 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
553
cc9305dd
AD
5542002-04-07 Akim Demaille <akim@epita.fr>
555
556 As a result of the previous patch, it is no longer needed
557 to reorder ritem itself.
558
559 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
560
b0940840
AD
5612002-04-07 Akim Demaille <akim@epita.fr>
562
563 Be sure never to walk through RITEMS, but use only data related to
564 the rules themselves. RITEMS should be banished.
565
566 * src/output.c (output_token_translations): Rename as...
567 (prepare_tokens): this.
568 In addition to `translate', prepare the muscles `tname' and
569 `toknum', which were handled by...
570 (output_rule_data): this.
571 Remove, and move the remainder of its outputs into...
572 (prepare_rules): this new routines, which also merges content from
573 (output_gram): this.
574 (prepare_rules): Be sure never to walk through RITEMS.
575 (output_stos): Rename as...
576 (prepare_stos): this.
577 (output): Always invoke prepare_states, after all, just don't use it
578 in the output if you don't need it.
579
643a5994
AD
5802002-04-07 Akim Demaille <akim@epita.fr>
581
582 * src/LR0.c (new_state): Display `nstates' as the name of the
583 newly created state.
584 Adjust to initialize first_state and last_state if needed.
585 Be sure to distinguish the initial from the final state.
586 (new_states): Create the itemset of the initial state, and use
587 new_state.
588 * src/closure.c (closure): Now that the initial state has its
589 items properly set, there is no need for a special case when
590 creating `ruleset'.
591
592 As a result, now the rule 0, reducing to $axiom, is visible in the
593 outputs. Adjust the test suite.
594
595 * tests/conflicts.at (Solved SR Conflicts)
596 (Unresolved SR Conflicts): Adjust.
597 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
598 * tests/conflicts.at (S/R in initial): New.
599
b4c4ccc2
AD
6002002-04-07 Akim Demaille <akim@epita.fr>
601
602 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
603 the RHS of the rules.
604 * src/output.c (output_gram): Likewise.
605
bba97eb2
AD
6062002-04-07 Akim Demaille <akim@epita.fr>
607
608 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
609 bucket.
610 Adjust all dependencies.
611 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
612 `number' of the buckets too.
613 * src/gram.h: Include `symtab.h'.
614 (associativity): Move to...
615 * src/symtab.h: here.
616 No longer include `gram.h'.
617
c3b407f4
AD
6182002-04-07 Akim Demaille <akim@epita.fr>
619
620 * src/gram.h, src/gram.c (rules_rhs_length): New.
621 (ritem_longest_rhs): Use it.
622 * src/gram.h (rule_t): `number' is a new member.
623 * src/reader.c (packgram): Set it.
624 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
625 the end of `rules', and count them out of `nrules'.
626 (reduce_output, dump_grammar): Adjust.
627 * src/print.c (print_grammar): It is no longer needed to check for
628 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
629 * tests/reduce.at (Reduced Automaton): New test.
630
11652ab3
AD
6312002-04-07 Akim Demaille <akim@epita.fr>
632
633 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
634 lacking `+ 1' to nrules, Bison reported as useless a token if it
635 was used solely to set the precedence of the last rule...
636
26b23c1a
AD
6372002-04-07 Akim Demaille <akim@epita.fr>
638
639 * data/bison.c++, data/bison.simple: Don't output the current file
640 name in #line, to avoid useless diffs between two identical
641 outputs under different names.
642
18bcecb0
AD
6432002-04-07 Akim Demaille <akim@epita.fr>
644
645 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
646 Normalize loops to using `< nrules + 1', not `<= nrules'.
647
fa770c86
AD
6482002-04-07 Akim Demaille <akim@epita.fr>
649
650 * TODO: Update.
651
d9b739c3
AD
6522002-04-07 Akim Demaille <akim@epita.fr>
653
654 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
655 bucket.value as bucket.number.
656
99013900
AD
6572002-04-07 Akim Demaille <akim@epita.fr>
658
659 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
660 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
661 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
662 RHS, instead of being an index in RITEMS.
663
e966383b
PE
6642002-04-04 Paul Eggert <eggert@twinsun.com>
665
666 * doc/bison.texinfo: Update copyright date.
667 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
668 (Symbols): Warn about running Bison in one character set,
669 but compiling and/or running in an incompatible one.
670 Warn about character code 256, too.
671
6722002-04-03 Paul Eggert <eggert@twinsun.com>
673
674 * src/bison.data (YYSTACK_ALLOC): Depend on whether
675 YYERROR_VERBOSE is nonzero, not whether it is defined.
676
677 Merge changes from bison-1_29-branch.
c307773e 678
8d6c48b9
PE
6792002-03-20 Paul Eggert <eggert@twinsun.com>
680
681 Merge fixes from Debian bison_1.34-1.diff.
682
683 * configure.in (AC_PREREQ): 2.53.
684
e53c6322
AD
6852002-03-20 Akim Demaille <akim@epita.fr>
686
687 * src/conflicts.c (log_resolution): Argument `resolution' is const.
688
9ffbeca7
PE
6892002-03-19 Paul Eggert <eggert@twinsun.com>
690
21db0b2a
PE
691 * src/bison.simple (YYCOPY): New macro.
692 (YYSTACK_RELOCATE): Use it.
693 Remove Type arg; no longer needed. All callers changed.
694 (yymemcpy): Remove; no longer needed.
695
9ffbeca7
PE
696 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
697 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
698
642cb8f8
AD
6992002-03-19 Akim Demaille <akim@epita.fr>
700
701 Test and fix the #line outputs.
702
703 * tests/atlocal.at (GCC): New.
704 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
705 (Prologue synch line, ,%union synch line, Postprologue synch line)
706 (Action synch line, Epilogue synch line): New tests.
707 * src/reader.c (parse_union_decl): Define the muscle stype_line.
708 * data/bison.simple, data/bison.c++: Use it.
709
3c31a486
AD
7102002-03-19 Akim Demaille <akim@epita.fr>
711
712 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
713 (Solved SR Conflicts, %expect not enough, %expect right)
714 (%expect too much): Move to...
715 * tests/conflicts.at: this new file.
716
0d8bed56
AD
7172002-03-19 Akim Demaille <akim@epita.fr>
718
719 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
720 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
721 that we can move to enums for instance.
722 * src/output.c (token_definitions_output): Output a list of
723 `token-name, token-number' instead of the #define.
724 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
725
9208d17f
AD
7262002-03-14 Akim Demaille <akim@epita.fr>
727
728 Use Gettext 0.11.1.
729
af27eacb
RA
7302002-03-09 Robert Anisko <robert@lrde.epita.fr>
731
732 * data/bison.c++: Make the user able to add members to the generated
733 parser by subclassing.
734
9101a310
RA
7352002-03-05 Robert Anisko <robert@lrde.epita.fr>
736
737 * src/reader.c (read_additionnal_code): `c' should be an integer, not
738 a character.
739 Reported by Nicolas Tisserand and Nicolas Burrus.
740
fff9bf0b
RA
7412002-03-04 Robert Anisko <robert@lrde.epita.fr>
742
743 * src/reader.c: Warn about lacking semi-colons, do not complain.
744
64dba31e
RA
7452002-03-04 Robert Anisko <robert@lrde.epita.fr>
746
747 * data/bison.c++: Remove a debug line.
748
374f5a14
RA
7492002-03-04 Robert Anisko <robert@lrde.epita.fr>
750
751 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
752 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
753 provide a default implementation.
754
bfcf1f3a
AD
7552002-03-04 Akim Demaille <akim@epita.fr>
756
757 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
758 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
759 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
760 * tests/semantic.at (Parsing Guards): Similarly.
761 * src/reader.at (readgram): Complain if the last rule is not ended
762 with a semi-colon.
763
65ccf9fc
AD
7642002-03-04 Akim Demaille <akim@epita.fr>
765
766 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
767 * src/closure.c: here.
768 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
769 RTC.
770 * src/warshall.h, src/warshall.c: Remove.
771 * tests/sets.at (Broken Closure): Adjust.
772
d0039cbc
AD
7732002-03-04 Akim Demaille <akim@epita.fr>
774
775 * src/output.c (output_skeleton): tempdir is const.
776 bytes_read is unused.
777
345cea78
AD
7782002-03-04 Akim Demaille <akim@epita.fr>
779
780 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
781 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
782 Update.
783 From Michael Hayes.
784
564801f7
AD
7852002-03-04 Akim Demaille <akim@epita.fr>
786
787 * src/closure.c (closure): `r' is unused.
788
e5352bc7
AD
7892002-03-04 Akim Demaille <akim@epita.fr>
790
791 * tests/sets.at (Broken Closure): Add the ending `;'.
792 * src/reader.at (readgram): Complain if a rule is not ended with a
793 semi-colon.
794
914feea9
AD
7952002-03-04 Akim Demaille <akim@epita.fr>
796
797 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
798 (count_sr_conflicts): Use bitset_count.
799 * src/reduce.c (inaccessable_symbols): Ditto.
800 (bits_size): Remove.
801 * src/warshall.h, src/warshall.c: Convert to bitsetv.
802
f0250de6
AD
8032002-03-04 Akim Demaille <akim@epita.fr>
804
805 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
806 * src/reduce.c: Remove the `bitset_zero's following the
807 `bitset_create's, as now it is performed by the latter.
808
ef017502
AD
8092002-03-04 Akim Demaille <akim@epita.fr>
810
811 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
812 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
813 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
814 latest sources from Michael.
815
76514394
AD
8162002-03-04 Akim Demaille <akim@epita.fr>
817
818 * src/output.c (output): Don't free the grammar.
819 * src/reader.c (grammar_free): New.
820 * src/main.c (main): Call it and don't free symtab here.
821
55024580
AD
8222002-03-04 Akim Demaille <akim@epita.fr>
823
824 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
825 before returning.
826 Reported by Benoit Perrot.
827
f9abaa2c
AD
8282002-03-04 Akim Demaille <akim@epita.fr>
829
830 Use bitset operations when possible, not loops over bits.
831
832 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
833 bitset_or.
834 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
835 * src/reduce.c (useless_nonterminals): Formatting changes.
836 * src/warshall.c (TC): Use bitset_or.
837
0e721e75
AD
8382002-03-04 Akim Demaille <akim@epita.fr>
839
840 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
841 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
842 Ditto.
843
0fb1ffb1
AD
8442002-03-04 Akim Demaille <akim@epita.fr>
845
846 * src/lalr.c (F): Now a bitset*.
847 Adjust all dependencies.
848
b86796bf
AD
8492002-03-04 Akim Demaille <akim@epita.fr>
850
851 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
852 Adjust all dependencies.
853
602bbf31
AD
8542002-03-04 Akim Demaille <akim@epita.fr>
855
856 * src/L0.c, src/LR0.h (nstates): Be size_t.
857 Adjust comparisons (signed vs unsigned).
858 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
859 bitset*.
860 Adjust all dependencies.
861
d8a0245c
AD
8622002-03-04 Akim Demaille <akim@epita.fr>
863
864 * src/closure.c (firsts): Now, also a bitset.
865 Adjust all dependencies.
866 (varsetsize): Remove, now unused.
867 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
868
34ba9743
AD
8692002-03-04 Akim Demaille <akim@epita.fr>
870
871 * src/print.c: Convert to use bitset.h, not hand coded iterations
872 over ints.
873
ed86e78c
AD
8742002-03-04 Akim Demaille <akim@epita.fr>
875
876 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
877
dfdb1797
AD
8782002-03-04 Akim Demaille <akim@epita.fr>
879
880 * src/closure.c (ruleset): Be a bitset.
881 (rulesetsize): Remove.
882
7086e707
AD
8832002-03-04 Akim Demaille <akim@epita.fr>
884
885 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
886 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
887 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
888 * src/closure.c (fderives): Be an array of bitsets.
889
98254360
RA
8902002-02-28 Robert Anisko <robert@lrde.epita.fr>
891
892 * data/bison.c++: Merge the two generated headers. Insert a copyright
893 notice in each output file.
894
a75c057f
AD
8952002-02-28 Akim Demaille <akim@epita.fr>
896
897 * data/bison.c++: Copy the prologue of bison.simple to fetch
898 useful M4 definitions, such as b4_header_guard.
899
06b00abc
AD
9002002-02-25 Akim Demaille <akim@epita.fr>
901
902 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
903 translator friendly scheme for the bgr
904 copyright notice.
06b00abc 905
70e7d534
AD
9062002-02-25 Akim Demaille <akim@epita.fr>
907
908 * src/output.c (header_output): Remove, now handled completely via
909 M4.
910
abe017f6
AD
9112002-02-25 Akim Demaille <akim@epita.fr>
912
913 * m4/m4.m4: New, from CVS Autoconf.
914 * configure.in: Invoke it.
915 * src/output.c (output_skeleton): Use its result instead of the
916 hard coded name.
917
381fb12e
AD
9182002-02-25 Akim Demaille <akim@epita.fr>
919
920 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
921 Fileutils 4.1.5.
922 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
923 * src/output.c (output_skeleton): Use mkstemp to create a real
924 temporary file.
925 Move the filling of `skeleton' and its muscle to...
926 (prepare): here.
927 (output): Move the definition of the prologue muscle to...
928 (prepare): here.
929 * src/system.h (DEFAULT_TMPDIR): New.
930
6f38107f
PE
9312002-02-14 Paul Eggert <eggert@twinsun.com>
932
933 Remove the support for C++ namespace cleanliness; it was
934 causing more problems than it was curing, since it didn't work
935 properly on some nonstandard C++ compilers. This can wait
936 for a proper C++ parser.
937
938 * NEWS: Document this.
939 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
940 of C++, as it's treated like C now.
941 * src/bison.simple (YYSTD): Remove.
942 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
943 Treat C++ just like Standard C instead of trying to support
944 namespace cleanliness.
945
80cce3da
AD
9462002-02-14 Akim Demaille <akim@epita.fr>
947
948 * tests/regression.at (else): Adjust to Andreas' change.
949
842e8679
AD
9502002-02-14 Akim Demaille <akim@epita.fr>
951
952 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
953
4bda3f10
AD
9542002-02-13 Andreas Schwab <schwab@suse.de>
955
956 * src/output.c (output_rule_data): Don't output NULL, it might
957 not be defined yet.
958
4162fa07 9592002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 960
4162fa07
RA
961 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
962 (Copyright notice): Update.
b418ecd8 963
bd16a5dc
AD
9642002-02-11 Akim Demaille <akim@epita.fr>
965
966 * tests/regression.at (%nonassoc and eof): Don't include
967 nonportable headers.
968
8d69a1a3
RA
9692002-02-08 Robert Anisko <robert@lrde.epita.fr>
970
971 * data/bison.c++: Correct error recovery. Make the user able to
972 initialize the starting location.
973
9b2d0677
AD
9742002-02-07 Akim Demaille <akim@epita.fr>
975
976 * tests/input.at: New.
977
69e2658b
RA
9782002-02-07 Robert Anisko <robert@lrde.epita.fr>
979
980 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 981 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
982 directives around tables only needed for debugging.
983
4aacc3a7
RA
9842002-02-07 Robert Anisko <robert@lrde.epita.fr>
985
986 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
987 C++ parsers.
988 (yy::b4_name::parse): Use print_.
989
762a801e
RA
9902002-02-07 Robert Anisko <robert@lrde.epita.fr>
991
992 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
993
4bb2bc3f
RA
9942002-02-07 Robert Anisko <robert@lrde.epita.fr>
995
996 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
997 C++ parsers.
998 (yy::b4_name::parse): Build verbose error messages, and use error_.
999
6b45a3ca
RA
10002002-02-06 Robert Anisko <robert@lrde.epita.fr>
1001
1002 * data/bison.c++: Fix m4 quoting in comments.
1003
50997c6e
RA
10042002-02-06 Robert Anisko <robert@lrde.epita.fr>
1005
1006 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1007 not expanded by m4.
1008
3f3eed27
AD
10092002-02-05 Akim Demaille <akim@epita.fr>
1010
1011 * data/bison.c++: Adjust to the M4 back end.
1012 More is certainly needed.
1013
be2a1a68
AD
10142002-02-05 Akim Demaille <akim@epita.fr>
1015
1016 Give a try to M4 as a back end.
1017
1018 * lib/readpipe.c: New, from wdiff.
1019 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1020 BISON_HAIRY.
1021 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1022 specific values. Now it is m4 that performs the lookup.
1023 * src/parse-skel.y: Remove.
1024 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1025 * src/output.c (actions_output, guards_output)
1026 (token_definitions_output): No longer keeps track of the output
1027 line number, hence remove the second argument.
1028 (guards_output): Check against the guard member of a rule, not the
1029 action member.
1030 Adjust callers.
1031 (output_skeleton): Don't look for the skeleton location, let m4 do
1032 that.
1033 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1034 file will be used.
1035 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1036 (prepare): Given that for the time being changesyntax is not
1037 usable in M4, rename the muscles using `-' to `_'.
1038 Define `defines_flag', `output_parser_name' and `output_header_name'.
1039 * src/output.h (actions_output, guards_output)
1040 (token_definitions_output): Adjust prototypes.
1041 * src/scan-skel.l: Instead of scanning the skeletons, it now
1042 processes the output of m4: `__oline__' and `#output'.
1043 * data/bison.simple: Adjust to be used by M4(sugar).
1044 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1045 to date.
1046 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1047 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1048 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1049 shamelessly stolen from CVS Autoconf.
1050
beda758b
AD
10512002-02-05 Akim Demaille <akim@epita.fr>
1052
1053 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1054 * configure.in: Check for the declarations of free and malloc.
1055 * src/muscle_tab.c: Adjust.
1056
5ece6d43
AD
10572002-02-05 Akim Demaille <akim@epita.fr>
1058
1059 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1060 which have no values.
1061
5bb18f9a
AD
10622002-02-05 Akim Demaille <akim@epita.fr>
1063
1064 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1065 * data/: here.
1066
894dd62e
PE
10672002-01-29 Paul Eggert <eggert@twinsun.com>
1068
1069 * src/bison.simple (YYSIZE_T): Do not define merely because
1070 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1071 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1072
82841af7
AD
10732002-01-27 Akim Demaille <akim@epita.fr>
1074
1075 Fix `%nonassoc and eof'.
1076
1077 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1078 which were not properly copied! Replace
1079 memcpy (res->errs, src->errs, src->nerrs);
1080 with
1081 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1082 !!!
1083 * tests/regression.at (%nonassoc and eof): Adjust to newest
1084 Autotest: `.' is not in the PATH.
1085
318b76e9
AD
10862002-01-27 Akim Demaille <akim@epita.fr>
1087
1088 * tests/sets.at (AT_EXTRACT_SETS): New.
1089 (Nullable): Use it.
1090 (Firsts): New.
1091
30d2f3d5
AD
10922002-01-26 Akim Demaille <akim@epita.fr>
1093
1094 * tests/actions.at, tests/calc.at, tests/headers.at,
1095 * tests/torture.at: Adjust to the newest Autotest which no longer
1096 forces `.' in the PATH.
1097
30f8c395
AD
10982002-01-25 Akim Demaille <akim@epita.fr>
1099
1100 * tests/regression.at (%nonassoc and eof): New.
1101 Suggested by Robert Anisko.
1102
29ae55f1
AD
11032002-01-24 Akim Demaille <akim@epita.fr>
1104
1105 Bison dumps core when trying to complain about broken input files.
1106 Reported by Cris van Pelt.
1107
1108 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1109 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1110 into...
1111 (Invalid inputs): Strengthen: exercise parse_percent_token.
1112
2b548aa6
RA
11132002-01-24 Robert Anisko <robert.anisko@epita.fr>
1114
1115 * src/Makefile.am: Add bison.c++.
1116 * src/bison.c++: New skeleton.
1117
bb0146c2
AD
11182002-01-21 Paolo Bonzini <bonzini@gnu.org>
1119
1120 * po/it.po: New.
1121
bec30531
AD
11222002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1123
1124 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1125
fc6edc45
MA
11262002-01-20 Marc Autret <marc@gnu.org>
1127
1128 * src/files.c (compute_output_file_names): Fix
1129
5e5d5415
MA
11302002-01-20 Marc Autret <marc@gnu.org>
1131
1132 * tests/output.at: New test.
1133 * src/files.c (compute_base_names): Don't map extensions when
1134 the YACC flag is set, use defaults.
1135 Reported by Evgeny Stambulchik.
1136
44ea3fbd
MA
11372002-01-20 Marc Autret <marc@gnu.org>
1138
bb0146c2 1139 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1140 compilers as well (i.e. the vendor C compiler).
1141 Suggested by Albert Chin-A-Young.
1142
338963d1
TVH
11432002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1144
1145 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1146 canonical definition.
1147 * src/system.h: Use the canonical definition for PARAMS (avoids
1148 a conflict with the macro from lib/hash.h).
1149
c57b2479
AD
11502002-01-11 Akim Demaille <akim@epita.fr>
1151
1152 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1153 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1154
b85810ae
AD
11552002-01-09 Akim Demaille <akim@epita.fr>
1156
1157 * src/files.c, src/files.h (output_infix): New.
1158 (tab_extension): Remove.
1159 (compute_base_names): Compute the former, drop the latter.
1160 * src/output.c (prepare): Insert the muscles `output-infix', and
1161 `output-suffix'.
1162 * src/parse-skel.y (string, string.1): New.
1163 (section.header): Use it.
1164 (section.yacc): Remove.
1165 (prefix): Remove too.
1166 * src/scan-skel.l: Adjust.
1167 * src/bison.simple, src/bison.hairy: Adjust.
1168
cae60122
AD
11692002-01-09 Akim Demaille <akim@epita.fr>
1170
1171 * configure.in (WERROR_CFLAGS): Compute it.
1172 * src/Makefile.am (CFLAGS): Pass it.
1173 * tests/atlocal.in (CFLAGS): Idem.
1174 * src/files.c: Fix a few warnings.
1175 (get_extension_index): Remove, unused.
1176
ae404801
AD
11772002-01-08 Akim Demaille <akim@epita.fr>
1178
1179 * src/getargs.c (AS_FILE_NAME): New.
1180 (getargs): Use it to convert DOSish file names.
1181 * src/files.c (base_name): Rename as full_base_name to avoid
1182 clashes with `base_name ()'.
1183 (filename_split): New.
1184 (compute_base_names): N-th rewrite, using filename_split.
1185
22312b71
AD
11862002-01-08 Akim Demaille <akim@epita.fr>
1187
1188 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1189 New, stolen from the Fileutils 4.1.
1190 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1191 * configure.in: Check for the presence of memrchr, and of its
1192 prototype.
1193
a67cef01
TVH
11942002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1195
1196 * lib/hash.h (__P): Added definition for this macro.
1197 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1198 BUILT_SOURCES, to ensure they are generated first.
1199 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1200 %error-verbose to allow bootstrapping with bison 1.30x.
1201
2b25d624
AD
12022002-01-06 Akim Demaille <akim@epita.fr>
1203
1204 * src/reader.c (parse_braces): Don't fetch the next char, the
1205 convention is to fetch on entry.
1206 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1207 'switch' without a following semicolon.
1208 * tests/regression.at (braces parsing): New.
1209
3460813b
AD
12102002-01-06 Akim Demaille <akim@epita.fr>
1211
1212 Bison is dead wrong in its RR conflict reports.
1213
1214 * tests/torture.at (GNU Cim Grammar): New.
1215 * src/conflicts.c (count_rr_conflicts): Fix.
1216
73784c64
AD
12172002-01-06 Akim Demaille <akim@epita.fr>
1218
1219 Creating package.m4 from configure.ac causes too many problems.
1220
1221 * tests/Makefile.am (package.m4): Create it by hand,
1222 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1223
25d81090
AD
12242002-01-06 Akim Demaille <akim@epita.fr>
1225
1226 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1227 skeleton.h.
1228
a9b8959e
PE
12292002-01-04 Paul Eggert <eggert@twinsun.com>
1230
1231 * doc/bison.texinfo (Debugging):
1232 Remove YYSTDERR; it's no longer defined or used.
1233 Also, s/cstdio.h/cstdio/.
1234
25d81090
AD
12352002-01-03 Akim Demaille <akim@epita.fr>
1236
1237 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1238
1109455c
AD
12392002-01-03 Akim Demaille <akim@epita.fr>
1240
1241 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1242 tracing code to --trace, wait for a better --trace option, with
1243 args.
1244
7ea5e977
AD
12452002-01-03 Akim Demaille <akim@epita.fr>
1246
1247 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1248 The ISO C++ standard is extremely clear about it: stderr is
1249 considered a macro, not a regular symbol (see table 94 `Header
1250 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1251 Therefore std:: does not apply to it. It still does with fprintf.
1252 Also, s/cstdio.h/cstdio/.
1253
fab5b110
AD
12542002-01-03 Akim Demaille <akim@epita.fr>
1255
1256 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1257 for non system headers.
1258
aed7fd9b
AD
12592002-01-02 Akim Demaille <akim@epita.fr>
1260
1261 Equip the skeleton chain with location tracking, runtime trace,
1262 pure parser and scanner.
1263
1264 * src/parse-skel.y: Request a pure parser, locations, and prefix
1265 renaming.
1266 (%union): Having several members with the same type does not help
1267 type mismatches, simplify.
1268 (YYPRINT, yyprint): New.
1269 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1270 (skel_error): this.
1271 Handle locations.
1272 * src/scan-skel.l: Adjust to these changes.
1273 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1274 (LOCATION_PRINT, skel_control_t): New.
1275
24fad99e
AD
12762001-12-30 Akim Demaille <akim@epita.fr>
1277
1278 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1279 replace `gb' with BLANKS.
1280 * src/scan-skel.l: Adjust.
1281
a4b36db4
AD
12822001-12-30 Akim Demaille <akim@epita.fr>
1283
1284 * src/system.h: We don't need nor want bcopy.
1285 Throw away MS-DOS crap: we don't need getpid.
1286 * configure.in: We don't need strndup. It was even causing
1287 problems: because Flex includes the headers *before* us,
1288 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1289 not visible.
1290 * lib/xstrndup.c: New.
1291 * src/scan-skel.l: Use it.
1292 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1293 * src/parse-skel.y: Use %directives instead of #defines.
1294
1239777d
AD
12952001-12-30 Akim Demaille <akim@epita.fr>
1296
1297 * src/skeleton.h: New.
1298 * src/output.c (output_parser, output_master_parser): Remove, dead
1299 code.
1300 * src/output.h (get_lines_number, actions_output, guards_output)
1301 (token_definitions_output): Prototype them.
1302 * src/parse-skel.y: Add the license notice.
1303 Include output.h and skeleton.h.
1304 (process_skeleton): Returns void, and takes a single parameter.
1305 * src/scan-skel.l: Add the license notice.
1306 Include skeleton.h.
1307 Don't use %option yylineno: it seems that then Flex imagines
1308 REJECT has been used, and therefore it won't reallocate its
1309 buffers (which makes no other sense to me than a bug). It results
1310 in warnings for `unused: yy_flex_realloc'.
1311
9b3add5b
RA
13122001-12-30 Robert Anisko <robert.anisko@epita.fr>
1313
1314 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1315 (MUSCLE_INSERT_PREFIX): ...to there.
1316 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1317 (MUSCLE_INSERT_PREFIX): Move from here...
1318
1319 * src/bison.hairy: Add a section directive. Put braces around muscle
1320 names. This parser skeleton is still broken, but Bison should not
1321 choke on a bad muscle 'syntax'.
1322 * src/bison.simple: Add a section directive. Put braces around muscle
1323 names.
1324
1325 * src/files.h (strsuffix, stringappend): Add declarations.
1326 (tab_extension): Add declaration.
1327 (short_base_name): Add declaration.
1328
1329 * src/files.c (strsuffix, stringappend): No longer static. These
1330 functions are used in the skeleton parser.
1331 (tab_extension): New.
1332 (compute_base_names): Use the computations done in this function
fab5b110 1333 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1334 names.
1335 (short_base_name): No longer static.
1336
1337 * src/output.c (output_skeleton): New.
1338 (output): Disable call to output_master_parser, and give a try to
1339 a new skeleton handling system.
1340 (guards_output, actions_output): No longer static.
1341 (token_definitions_output, get_lines_number): No longer static.
1342
1343 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1344
fab5b110 1345 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1346 parse-skel.y.
1347
1348 * src/parse-skel.y: New file.
1349 * src/scan-skel.l: New file.
1350
b5b61c61
AD
13512001-12-29 Akim Demaille <akim@epita.fr>
1352
1353 %name-prefix is broken.
1354
1355 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1356 Adjust all dependencies.
1357 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1358 %name-prefix.
1359
1360 Renaming yylval but not yylloc is not consistent. Now we do.
1361
1362 * src/bison.simple: Prefix yylloc if used.
1363 * doc/bison.texinfo (Decl Summary): Document that.
1364
8c9a50be
AD
13652001-12-29 Akim Demaille <akim@epita.fr>
1366
1367 * doc/bison.texinfo: Promote `%long-directive' over
1368 `%long_directive'.
1369 Remove all references to fixed-output-files, yacc is enough.
1370
d99361e6
AD
13712001-12-29 Akim Demaille <akim@epita.fr>
1372
1373 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1374 user prologue. These are defaults.
1375 * tests/actions.at (Mid-rule actions): Make sure the user can
1376 define YYDEBUG and YYERROR_VERBOSE.
1377
b9cecb91
AD
13782001-12-29 Akim Demaille <akim@epita.fr>
1379
1380 * src/output.c (header_output): Don't forget to export YYLTYPE and
1381 yylloc.
1382 * tests/headers.at (export YYLTYPE): New, make sure it does.
1383 * tests/regression.at (%union and --defines, Invalid CPP headers):
1384 Move to...
1385 * tests/headers.at: here.
1386
aea13e97
AD
13872001-12-29 Akim Demaille <akim@epita.fr>
1388
1389 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1390
931394cb
AD
13912001-12-29 Akim Demaille <akim@epita.fr>
1392
1393 * tests/actions.at (Mid-rule actions): Output on a single line
1394 instead of several.
1395
704a47c4
AD
13962001-12-29 Akim Demaille <akim@epita.fr>
1397
1398 * doc/bison.texinfo: Formatting changes.
1399
091e20bb
AD
14002001-12-29 Akim Demaille <akim@epita.fr>
1401
1402 Don't store the token defs in a muscle, just be ready to output it
1403 on command. Now possible via `symbols'. Fixes a memory leak.
1404
1405 * src/output.c (token_definitions_output): New.
1406 (output_parser, header_output): Use it.
1407 * src/reader.c (symbols_save): Remove.
1408
cce71710
AD
14092001-12-29 Akim Demaille <akim@epita.fr>
1410
1411 * src/bison.simple: Do not provide a default for YYSTYPE and
1412 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1413 default.
1414
82c035a8
AD
14152001-12-29 Akim Demaille <akim@epita.fr>
1416
1417 Mid-rule actions are simply... ignored!
1418
1419 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1420 the empty-rule associated to the dummy symbol, not to the host
1421 rule.
1422 * tests/actions.at (Mid-rule actions): New.
1423
8419d367
AD
14242001-12-29 Akim Demaille <akim@epita.fr>
1425
1426 Memory leak.
1427
1428 * src/reader.c (reader): Free grammar.
1429
375d5806
AD
14302001-12-29 Akim Demaille <akim@epita.fr>
1431
1432 Memory leak.
1433
1434 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1435 since it allocates it for each state, although only one is needed.
1436 (allocate_storage): Do it here.
1437
f51cb8ff
AD
14382001-12-29 Akim Demaille <akim@epita.fr>
1439
1440 * src/options.h, src/options.c (create_long_option_table): Rename
1441 as...
1442 (long_option_table_new): this, with a clearer prototype.
1443 (percent_table): Remove, unused,
1444 * src/getargs.c (getargs): Adjust.
1445
29e88316
AD
14462001-12-29 Akim Demaille <akim@epita.fr>
1447
1448 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1449 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1450 as states.
1451
b9f71f19
AD
14522001-12-29 Akim Demaille <akim@epita.fr>
1453
1454 * src/lalr.c (build_relations): Rename `states' as `states1'.
1455 Sorry, I don't understand exactly what it is, no better name...
1456
1a2b5d37
AD
14572001-12-29 Akim Demaille <akim@epita.fr>
1458
1459 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1460 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1461 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1462 as rules.
1463
1cca533e
AD
14642001-12-29 Akim Demaille <akim@epita.fr>
1465
1466 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1467 ago.
1468
c03ae966
AD
14692001-12-29 Akim Demaille <akim@epita.fr>
1470
1471 * src/reader.c, src/reader.h (user_toknums): Remove.
1472 Adjust all users to use symbols[i]->user_token_number.
1473
5a670b1e
AD
14742001-12-29 Akim Demaille <akim@epita.fr>
1475
1476 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1477 Adjust all users to use symbols[i]->prec or ->assoc.
1478
ad949da9
AD
14792001-12-29 Akim Demaille <akim@epita.fr>
1480
1481 * src/reader.c, src/reader.h (tags): Remove.
1482 Adjust all users to use symbols[i]->tag.
1483
0e78e603
AD
14842001-12-29 Akim Demaille <akim@epita.fr>
1485
1486 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1487 and rule_table.
1488 * src/reader.c (packsymbols): Fill this table.
1489 Drop sprec.
1490 * src/conflicts.c (resolve_sr_conflict): Adjust.
1491 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1492 single table.
1493 Use symbols[i]->tag instead of tags[i].
1494
213e640e
AD
14952001-12-29 Akim Demaille <akim@epita.fr>
1496
1497 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1498 In addition, put a comment in there, to replace...
1499 * tests/regression.at (%union and C comments): Remove.
1500
e7b8bef1
AD
15012001-12-29 Akim Demaille <akim@epita.fr>
1502
1503 * tests/regression.at (Web2c Actions): Blindly move the actual
1504 output as expected output. The contents *seem* right to me, but I
1505 can't pretend reading perfectly parser tables... Nonetheless, all
1506 the other tests pass correctly, the table look OK, even though the
1507 presence of `$axiom' is to be noted: AFAICS it is useless (but
1508 harmless).
1509
b68e7744
AD
15102001-12-29 Akim Demaille <akim@epita.fr>
1511
1512 * src/reader.c (readgram): Don't add the rule 0 if there were no
1513 rules read. In other words, add it _after_ having performed
1514 grammar sanity checks.
1515 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1516
78d5bae9
AD
15172001-12-29 Akim Demaille <akim@epita.fr>
1518
1519 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1520 visible, and some states have now a different number.
1521
ff442794
AD
15222001-12-29 Akim Demaille <akim@epita.fr>
1523
1524 * src/reader.c (readgram): Bind the initial rule's lineno to that
1525 of the first rule.
1526 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1527 (Solved SR Conflicts): Adjust rule 0's line number.
1528
610ab194
AD
15292001-12-29 Akim Demaille <akim@epita.fr>
1530
1531 Fix the `GAWK Grammar' failure.
1532
1533 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1534 the reductions of the first state which was mistakenly confused
1535 with the final state because precisely final_state was initialized
1536 to 0.
1537 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1538 now noticed by Bison.
1539 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1540 have a reduction on $default.
1541
29d29c8f
AD
15422001-12-29 Akim Demaille <akim@epita.fr>
1543
1544 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1545 rule line numbers.
1546 * src/closure.c (print_closure): Likewise.
1547 * src/derives.c (print_derives): Likewise.
1548 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1549 now.
1550
7c6b64d0
AD
15512001-12-29 Akim Demaille <akim@epita.fr>
1552
1553 * src/lalr.c (lookaheads_print): New.
1554 (lalr): Call it when --trace-flag.
1555 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1556 are dumped.
1557
3d4daee3
AD
15582001-12-29 Akim Demaille <akim@epita.fr>
1559
1560 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1561 when walking through ritem, even via rule->rhs.
1562 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1563 (useful_production, useless_nonterminals): Likewise.
1564 (reduce_grammar_tables): Likewise, plus update nritems.
1565 * src/nullable.c (set_nullable): Likewise.
1566 * src/lalr.c (build_relations): Likewise.
1567 * tests/sets.at (Nullable): Adjust.
1568 Fortunately, now, the $axiom is no longer nullable.
1569
9e7f6bbd
AD
15702001-12-29 Akim Demaille <akim@epita.fr>
1571
1572 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1573 the 0-sentinel.
1574 * src/gram.c (ritem_longest_rhs): Likewise.
1575 * src/reduce.c (nonterminals_reduce): Likewise.
1576 * src/print_graph.c (print_graph): Likewise.
1577 * src/output.c (output_rule_data): Likewise.
1578 * src/nullable.c (set_nullable): Likewise.
1579
255ef638
AD
15802001-12-29 Akim Demaille <akim@epita.fr>
1581
1582 * src/output.c: Comment changes.
1583
0d8a7363
AD
15842001-12-27 Paul Eggert <eggert@twinsun.com>
1585
1586 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1587 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1588 Sparc, as they were causing more porting problems than the
1589 (minor) performance improvement was worth.
1590
1591 Also, catch up with 1.31's YYSTD.
1592
3db472b9
AD
15932001-12-27 Akim Demaille <akim@epita.fr>
1594
1595 * src/output.c (output_gram): Rely on nritems, not the
1596 0-sentinel. See below.
1597 Use -1 as separator, not 0.
1598 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1599 Rely on -1 as separator in yyrhs, instead of 0.
1600 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1601 twice `Now at end of input', therefore there are two lines less to
1602 expect.
1603
b365aa05
AD
16042001-12-27 Akim Demaille <akim@epita.fr>
1605
1606 * tests/regression.at (Unresolved SR Conflicts):
1607 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1608 below.
1609
30171f79
AD
16102001-12-27 Akim Demaille <akim@epita.fr>
1611
1612 * src/LR0.c (new_state): Recognize the final state by the fact it
1613 is reached by eoftoken.
1614 (insert_start_shifting_state, insert_eof_shifting_state)
1615 (insert_accepting_state, augment_automaton): Remove, since now
1616 these states are automatically computed from the initial state.
1617 (generate_states): Adjust.
1618 * src/print.c: When reporting a rule number to the user, substract
1619 1, so that the axiom rule is rule 0, and the first user rule is 1.
1620 * src/reduce.c: Likewise.
1621 * src/print_graph.c (print_core): For the time being, just as for
1622 the report, depend upon --trace-flags to dump the full set of
1623 items.
1624 * src/reader.c (readgram): Once the grammar read, insert the rule
1625 0: `$axiom: START-SYMBOL $'.
1626 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1627 number of the states has changed (the final state is no longer
1628 necessarily the last), catch up.
1629
75142d45
AD
16302001-12-27 Akim Demaille <akim@epita.fr>
1631
1632 Try to make the use of the eoftoken valid. Given that its value
1633 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1634 is used instead of > 0 where appropriate, (ii), depend upon nritems
1635 instead of the 0-sentinel.
1636
1637 * src/gram.h, src/gram.c (nritems): New.
1638 Expected to be duplication of nitems, but for the time being...
1639 * src/reader.c (packgram): Assert nritems and nitems are equal.
1640 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1641 * src/closure.c (print_closure, print_fderives): Likewise.
1642 * src/gram.c (ritem_print): Likewise.
1643 * src/print.c (print_core, print_grammar): Likewise.
1644 * src/print_graph.c: Likewise.
1645
b7c49edf
AD
16462001-12-27 Akim Demaille <akim@epita.fr>
1647
1648 * src/main.c (main): If there are complains after grammar
1649 reductions, then output the report anyway if requested, then die.
1650 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1651 * src/reader.c (eoftoken): New.
1652 (parse_token_decl): If the token being defined has value `0', it
1653 is the eoftoken.
1654 (packsymbols): No longer hack `tags' to insert `$' by hand.
1655 Be sure to preserve the value of the eoftoken.
1656 (reader): Make sure eoftoken is defined.
1657 Initialize nsyms to 0: now eoftoken is created just like the others.
1658 * src/print.c (print_grammar): Don't special case the eof token.
1659 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1660 lie anyway, albeit pleasant.
1661 * tests/calc.at: Exercise error messages with eoftoken.
1662 Change the grammar so that empty input is invalid.
1663 Adjust expectations.
1664 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1665
ec2da99f
AD
16662001-12-27 Akim Demaille <akim@epita.fr>
1667
1668 * configure.in: Check the protos of strchr ans strspn.
1669 Replace strchr if needed.
1670 * src/system.h: Provide the protos of strchr, strspn and memchr if
1671 missing.
1672 * lib/strchr.c: New.
1673 * src/reader.c (symbols_save): Use strchr.
1674
8adfa272
AD
16752001-12-27 Akim Demaille <akim@epita.fr>
1676
1677 * src/print.c, src/print_graph.c (escape): New.
1678 Use it to quote the TAGS outputs.
1679 * src/print_graph.c (print_state): Now errors are in red, and
1680 reductions in green.
1681 Prefer high to wide: output the state number on a line of its own.
1682
80dac38c
AD
16832001-12-27 Akim Demaille <akim@epita.fr>
1684
1685 * src/state.h, src/state.c (reductions_new): New.
1686 * src/LR0.c (set_state_table): Let all the states have a
1687 `reductions', even if reduced to 0.
1688 (save_reductions): Adjust.
1689 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1690 * src/print.c (print_reductions, print_actions): Adjust.
1691 * src/output.c (action_row): Adjust.
1692
2cec70b9
AD
16932001-12-27 Akim Demaille <akim@epita.fr>
1694
1695 * src/state.h, src/state.c (errs_new, errs_dup): New.
1696 * src/LR0.c (set_state_table): Let all the states have an errs,
1697 even if reduced to 0.
1698 * src/print.c (print_errs, print_reductions): Adjust.
1699 * src/output.c (output_actions, action_row): Adjust.
1700 * src/conflicts.c (resolve_sr_conflict): Adjust.
1701
13ca549a
AD
17022001-12-27 Akim Demaille <akim@epita.fr>
1703
1704 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1705
5092aba5
AD
17062001-12-27 Akim Demaille <akim@epita.fr>
1707
1708 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1709 * src/print.c: here.
1710 (lookaheadset, shiftset): New, used as additional storage by
1711 print_reductions.
1712 (print_results): Adjust.
1713 (print_shifts, print_gotos, print_errs): New, extracted from...
1714 (print_actions): here.
1715 * src/print_graph.c (print_actions): Remove dead code.
1716
11e2beca
AD
17172001-12-27 Akim Demaille <akim@epita.fr>
1718
1719 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1720 `$n' and `@n'.
1721
dac3c910
AD
17222001-12-27 Akim Demaille <akim@epita.fr>
1723
1724 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1725 (build_relations): Adjust.
1726
d0b0fefa
AD
17272001-12-27 Akim Demaille <akim@epita.fr>
1728
1729 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1730 duplication.
1731
adc8c848
AD
17322001-12-27 Akim Demaille <akim@epita.fr>
1733
1734 * src/reader.c (packgram): Catch nitems overflows.
1735
14d293ac
AD
17362001-12-27 Akim Demaille <akim@epita.fr>
1737
1738 * src/files.c, src/files.h (guard_obstack): Remove.
1739 * src/output.c (output): Adjust.
1740 * src/reader.c (parse_braces): New, factoring...
1741 (copy_action, copy_guard): these two which are renamed as...
1742 (parse_action, parse_guard): these.
1743 As a voluntary consequence, using braces around guards is now
1744 mandatory.
1745
f499b062
AD
17462001-12-27 Akim Demaille <akim@epita.fr>
1747
1748 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1749 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1750 members.
1751 (symbol_list_new): Adjust.
1752 (copy_action): action_line is the first line, not the last.
1753 (copy_guard): Just as for actions, store the `action' only, not
1754 the switch/case/break flesh.
1755 Don't parse the user action that might follow the guard, let...
1756 (readgram): do it, i.e., now, there can be an action after a
1757 guard.
1758 In other words the guard is just explicitly optional.
1759 (packgram): Adjust.
1760 * src/output.c (guards_output): New.
1761 (output_parser): Call it when needed.
1762 (output): Also free the guard and attrs obstacks.
1763 * src/files.c, src/files.h (obstack_save): Remove.
1764 (output_files): Remove.
1765 As a result, if one needs the former `.act' file, using an
1766 appropriate skeleton which requires actions and guards is now
1767 required.
1768 * src/main.c (main): Adjust.
1769 * tests/semantic.at: New.
1770 * tests/regression.at: Use `input.y' as input file name.
1771 Avoid 8+3 problems by requiring input.c when the test needs the
1772 parser.
1773
d945f5cd
AD
17742001-12-27 Akim Demaille <akim@epita.fr>
1775
1776 * src/reader.c (symbol_list_new): Be sure to initialize all the
1777 fields.
1778
d200e455
AD
17792001-12-27 Akim Demaille <akim@epita.fr>
1780
1781 All the hacks using a final pseudo state are now useless.
1782
1783 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1784 * src/lalr.c (nLA): New.
1785 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1786 instead of lookaheadsp from the pseudo state (nstate + 1).
1787
f9507c28
AD
17882001-12-27 Akim Demaille <akim@epita.fr>
1789
1790 * src/output.c (action_row, token_actions): Use a state_t instead
1791 of a integer, and nlookaheads instead of the following state's
1792 lookaheadsp.
1793
065fbd27
AD
17942001-12-27 Akim Demaille <akim@epita.fr>
1795
1796 * src/conflicts.c (log_resolution, flush_shift)
1797 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1798 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1799 (conflicts_print, print_reductions): Use a state_t instead of an
1800 integer when referring to a state.
1801 As much as possible, depend upon nlookaheads, instead of the
1802 `lookaheadsp' member of the following state (since lookaheads of
1803 successive states are successive, the difference between state n + 1
1804 and n served as the number of lookaheads for state n).
1805 * src/lalr.c (add_lookback_edge): Likewise.
1806 * src/print.c (print_core, print_actions, print_state)
1807 (print_results): Likewise.
1808 * src/print_graph.c (print_core, print_actions, print_state)
1809 (print_graph): Likewise.
1810 * src/conflicts.h: Adjust.
1811
1b177bd7
AD
18122001-12-27 Akim Demaille <akim@epita.fr>
1813
1814 * src/bison.hairy: Formatting/comment changes.
1815 ANSIfy.
1816 Remove `register' indications.
1817 Add plenty of `static'.
1818
7742ddeb
AD
18192001-12-27 Akim Demaille <akim@epita.fr>
1820
1821 * src/output.c (prepare): Drop the muscle `ntbase' which
1822 duplicates ntokens.
1823 * src/bison.simple: Formatting/comment changes.
1824 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1825 is an undocumented synonym.
1826
1fa14068
AD
18272001-12-22 Akim Demaille <akim@epita.fr>
1828
1829 * src/output.c (output_table_data): Change the prototype to use
1830 `int' for array ranges: some invocations do pass an int, not a
1831 short.
1832 Reported by Wayne Green.
1833
b9752825
AD
18342001-12-22 Akim Demaille <akim@epita.fr>
1835
1836 Some actions of web2c.y are improperly triggered.
1837 Reported by Mike Castle.
1838
1839 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1840 * tests/regression.at (Web2c): Rename as...
1841 (Web2c Report): this.
1842 (Web2c Actions): New.
1843
776209d6
AD
18442001-12-22 Akim Demaille <akim@epita.fr>
1845
1846 Reductions in web2c.y are improperly reported.
1847 Reported by Mike Castle.
1848
1849 * src/conflicts.c (print_reductions): Fix.
1850 * tests/regression.at (Web2c): New.
1851
275fc3ad
AD
18522001-12-18 Akim Demaille <akim@epita.fr>
1853
1854 Some host fail on `assert (!"foo")', which expands to
1855 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1856 Reported by Nelson Beebee.
1857
1858 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1859 `#define it_succeeded 0' and `assert (it_succeeded)'.
1860
897668ee
MA
18612001-12-17 Marc Autret <autret_m@epita.fr>
1862
1863 * src/bison.simple: Don't hard code the skeleton line and filename.
1864 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1865 New line counter 'skeleton_line' (skeleton-line muscle).
1866
ab3399e0
PE
18672001-12-17 Paul Eggert <eggert@twinsun.com>
1868
1869 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1870 YYDEBUG must be defined to a nonzero value.
1871
1872 * src/bison.simple (yytname): Do not assume that the user defines
1873 YYDEBUG to a properly parenthesized expression.
1874
3877f72b
AD
18752001-12-17 Akim Demaille <akim@epita.fr>
1876
1877 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1878 nlookaheads is a new member.
1879 Adjust all users.
1880 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1881 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1882 state.
776209d6 1883
331dbc1b
AD
18842001-12-17 Akim Demaille <akim@epita.fr>
1885
1886 * src/files.h, src/files.c (open_files, close_files): Remove.
1887 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1888 let...
1889 * src/reader.c (reader): Do it.
776209d6 1890
be750e4c
AD
18912001-12-17 Akim Demaille <akim@epita.fr>
1892
1893 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1894
709ae8c6
AD
18952001-12-17 Akim Demaille <akim@epita.fr>
1896
1897 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1898 (flush_reduce): New.
1899 (resolve_sr_conflict): Adjust.
776209d6 1900
f87685c3
AD
19012001-12-17 Akim Demaille <akim@epita.fr>
1902
1903 * src/output.c (output_obstack): Be static and rename as...
1904 (format_obstack): this, to avoid any confusion with files.c's
1905 output_obstack.
1906 * src/reader.h (muscle_obstack): Move to...
1907 * src/output.h: here, since it's defined in output.c.
1908
837491d8
AD
19092001-12-17 Akim Demaille <akim@epita.fr>
1910
1911 * src/output.c (action_row, save_column, default_goto)
1912 (sort_actions, matching_state, pack_vector): Better variable
1913 locality.
1914
796d61fb
AD
19152001-12-17 Akim Demaille <akim@epita.fr>
1916
1917 * src/output.c: Various formatting changes.
776209d6 1918
64d15509
AD
19192001-12-17 Akim Demaille <akim@epita.fr>
1920
1921 * src/files.c (output_files): Free the output_obstack.
1922 * src/main.c (main): Call print and print_graph conditionally.
1923 * src/print.c (print): Work unconditionally.
1924 * src/print_graph.c (print_graph): Work unconditionally.
1925 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1926
fbc8ecb7
MA
19272001-12-16 Marc Autret <autret_m@epita.fr>
1928
1929 * src/output.c (actions_output): Fix. When we use %no-lines,
1930 there is one less line per action.
1931
f0440388
MA
19322001-12-16 Marc Autret <autret_m@epita.fr>
1933
1934 * src/bison.simple: Remove a useless #line directive.
1935 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1936 * src/output.c (get_lines_number): New.
776209d6 1937 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1938 output muscles.
1939 Fix line numbering.
1940 (actions_output): Computes the number of lines taken by actions.
1941 (output_master_parser): Insert new skeleton which is the name of
1942 the output parser file name.
1943
a79986b8
MA
19442001-12-15 Marc Autret <autret_m@epita.fr>
1945
1946 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1947
4ec8e00f
MA
19482001-12-15 Marc Autret <autret_m@epita.fr>
1949
1950 * src/output.c (output_gram): Keep track of the hairy one.
1951
1a4648ff
AD
19522001-12-15 Akim Demaille <akim@epita.fr>
1953
1954 Make `make distcheck' work.
1955
1956 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1957 system.h which uses libgettext.h.
1958
9c2c67e6
AD
19592001-12-15 Akim Demaille <akim@epita.fr>
1960
1961 * src/nullable.c (set_nullable): Useless rules must be skipped,
1962 otherwise, since we range over their symbols, we might look at a
1963 nonterminal which no longer ``exists'', i.e., it is not counted in
1964 `nvars', hence we overflow our arrays.
1965
93ede233
AD
19662001-12-15 Akim Demaille <akim@epita.fr>
1967
1968 The header can also be produced directly, without any obstack!
1969 Yahoo!
1970
1971 * src/files.c, src/files.h (defines_obstack): Remove.
1972 (compute_header_macro): Global.
1973 (defines_obstack_save): Remove.
1974 * src/reader.c (parse_union_decl): No longer output to
1975 defines_obstack: its content can be found in the `stype' muscle
1976 anyway.
1977 (output_token_translations): Merge into...
1978 (symbols_output): this.
1979 Rename as...
1980 (symbols_save): this.
1981 (reader): Adjust.
1982 * src/output.c (header_output): New.
1983 (output): Call it.
1984
2666f928
AD
19852001-12-15 Akim Demaille <akim@epita.fr>
1986
1987 * src/reader.c (parse_union_decl): Instead of handling two obstack
1988 simultaneously, use one to define the `stype' muscle, and use the
1989 value of the latter to fill defines_obstack.
1990 (copy_comment): Remove.
1991 (copy_comment2): Work for a single obstack.
1992 Rename as...
1993 (copy_comment): this.
1994
428046f8
AD
19952001-12-15 Akim Demaille <akim@epita.fr>
1996
1997 * src/lex.c, src/lex.h (xgetc): No longer static.
1998 * src/reader.c (parse_union_decl): Revamp.
1999
ea52d706
AD
20002001-12-15 Akim Demaille <akim@epita.fr>
2001
2002 Still making progress in separating Bison into (i) input, (ii)
2003 process, (iii) output: now we can directly output the parser file
2004 without using table_obstack at all.
2005
2006 * src/files.c, src/files.h (table_obstack): Bye bye.
2007 (parser_file_name): New.
2008 * src/files.c (compute_output_file_names): Compute it.
2009 * src/output.c (actions_output, output_parser)
2010 (output_master_parser): To a file instead of an obstack.
2011
3f96f4dc
AD
20122001-12-15 Akim Demaille <akim@epita.fr>
2013
2014 Attach actions to rules, instead of pre-outputting them to
2015 actions_obstack.
2016
2017 * src/gram.h (rule_t): action and action_line are new members.
2018 * src/reader.c (symbol_list): Likewise.
2019 (copy_action): Save the actions within the rule.
2020 (packgram): Save them in rule_table.
2021 * src/output.c (actions_output): New.
2022 (output_parser): Use it on `%%actions'.
2023 (output_rule_data): Don't free rule_table.
2024 (output): Do it.
2025 (prepare): Don't save the `action' muscle.
2026 * src/bison.simple: s/%%action/%%actions/.
2027
51576fb3
AD
20282001-12-15 Akim Demaille <akim@epita.fr>
2029
2030 * src/reader.c (copy_action): When --yacc, don't append a `;'
2031 to the user action: let it fail if lacking.
dee049eb 2032 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2033
2648a72d
AD
20342001-12-14 Akim Demaille <akim@epita.fr>
2035
2036 * src/lex.c (literalchar): Simply return the char you decoded, non
2037 longer mess around with obstacks and int pointers.
2038 Adjust all callers.
2039
92790e5b
AD
20402001-12-14 Akim Demaille <akim@epita.fr>
2041
2042 * src/lex.c (literalchar): Don't escape the special characters,
2043 just decode them, and keep them as char (before, eol was output as
2044 the 2 char string `\n' etc.).
2045 * src/output.c (output_rule_data): Use quotearg to output the
2046 token strings.
2047
927c1557
PE
20482001-12-13 Paul Eggert <eggert@twinsun.com>
2049
2050 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2051 Do not infringe on the global user namespace when using C++.
2052 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2053 All uses of `fprintf' and `stderr' changed.
2054
2055 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2056
ed8e1f68
AD
20572001-12-13 Akim Demaille <akim@epita.fr>
2058
2059 The computation of nullable is broken: it doesn't handle empty
2060 RHS's properly.
2061
2062 * tests/torture.at (GNU AWK Grammar): New.
2063 * tests/sets.at (Nullable): New.
2064 * src/nullable.c (set_nullable): Instead of blindly looping over
2065 `ritems', loop over the rules, and then over their rhs's.
2066
2067 Work around Autotest bugs.
2068
2069 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2070 frame, because Autotest understand lines starting with a `+' as
2071 traces from the shell. Then, they are not processed properly.
2072 Admittedly an Autotest bug, but we don't have time to wait for
2073 Autotest to catch up.
2074 * tests/regression.at (Broken Closure): Adjust to the new table
2075 frames.
2076 Move to...
2077 * tests/sets.at: here.
2078
cb581495
AD
20792001-12-13 Akim Demaille <akim@epita.fr>
2080
2081 * src/closure.c (closure): Use nrules instead of playing tricks
2082 with BITS_PER_WORD.
2083
2e729273
AD
20842001-12-13 Akim Demaille <akim@epita.fr>
2085
2086 * src/print.c (print_actions): Output the handling of `$' as the
2087 traces do: shifting the token EOF. Before EOF was treated as a
2088 nonterminal.
2089 * tests/regression.at: Adjust some tests.
2090 * src/print_graph.c (print_core): Complete the set of items via
2091 closure. The next-to-final and final states are still unsatisfying,
2092 but that's to be addressed elsewhere.
2093 No longer output the rule numbers, but do output the state number.
2094 A single loop for the shifts + gotos is enough, but picked a
2095 distinct color for each.
2096 (print_graph): Initialize and finalize closure.
2097
107f7dfb
AD
20982001-12-13 Akim Demaille <akim@epita.fr>
2099
2100 * src/reader.c (readgram): Remove dead code, an strip useless
2101 braces.
2102 (get_type): Remove, unused.
2103
9b53a24f
AD
21042001-12-12 Akim Demaille <akim@epita.fr>
2105
2106 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2107 on that of lib/error.c.
2108
dbfb6dcd
AD
21092001-12-12 Akim Demaille <akim@epita.fr>
2110
2111 Some hosts don't like `/' in includes.
2112
2113 * src/system.h: Include libgettext.h without qualifying the path.
2114 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2115 $(top_srcdir).
2116
c25fb648
MA
21172001-12-11 Marc Autret <autret_m@epita.fr>
2118
2119 * src/output.c (output_parser): Remove useless muscle.
2120
710ddc4f
MA
21212001-12-11 Marc Autret <autret_m@epita.fr>
2122
2123 * src/bison.simple: Remove #line just before %%epilogue. It
2124 is now handled in ...
2125 * src/reader.c (read_additionnal_code): Add the output of a
2126 #line for the epilogue.
2127
e83d80b8
MA
21282001-12-10 Marc Autret <autret_m@epita.fr>
2129
927c1557 2130 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2131 replace precedent remove.
2132 * src/bison.simple: Remove #line before %%prologue because
2133 %%input-line is wrong at this time.
2134
971d5158
MA
21352001-12-10 Marc Autret <autret_m@epita.fr>
2136
2137 * src/reader.c (symbols_output): Clean up.
927c1557 2138 * src/output.c (output_gram, output): Clean up.
971d5158 2139
5edafffd
AD
21402001-12-10 Akim Demaille <akim@epita.fr>
2141
2142 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2143 * src/LR0.c (set_state_table): here.
2144 * src/lalr.c (lalr): Call it.
2145
0279f8e9
AD
21462001-12-10 Akim Demaille <akim@epita.fr>
2147
2148 * src/state.h (shifts): Remove the `number' member: shifts are
2149 attached to state, hence no longer need to be labelled with a
2150 state number.
2151
190c4f5f
AD
21522001-12-10 Akim Demaille <akim@epita.fr>
2153
2154 Now that states have a complete set of members, the linked list of
2155 shifts is useless: just fill directly the state's shifts member.
2156
2157 * src/state.h (shifts): Remove the `next' member.
2158 * src/LR0.c (first_state, last_state): Remove.
2159 Adjust the callers.
2160 (augment_automaton): Don't look for the shifts that must be added
2161 a shift on EOF: it is those of the state we looked for! But now,
2162 since shifts are attached, it is no longer needed to looking
2163 merely by its id: its number.
2164
2a73b93d
AD
21652001-12-10 Akim Demaille <akim@epita.fr>
2166
2167 * src/LR0.c (augment_automaton): Better variable locality.
2168 Remove an impossible branch: if there is a state corresponding to
2169 the start symbol being shifted, then there is shift for the start
2170 symbol from the initial state.
2171
74392f6a
AD
21722001-12-10 Akim Demaille <akim@epita.fr>
2173
2174 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2175 only when appropriate: when insert_start_shifting_state' is not
2176 invoked.
2177 * tests/regression.at (Rule Line Numbers): Adjust.
2178
37c82725
AD
21792001-12-10 Akim Demaille <akim@epita.fr>
2180
2181 * src/LR0.c (augment_automaton): Now that all states have shifts,
2182 merge the two cases addition shifts to the initial state.
2183
6a164e0c
AD
21842001-12-10 Akim Demaille <akim@epita.fr>
2185
2186 * src/lalr.c (set_state_table): Move to...
2187 * src/LR0.c: here.
2188 * src/lalr.c (lalr): Don't call it...
2189 * src/LR0.c (generate_states): do it.
2190 * src/LR0.h (first_state): Remove, only the table is used.
2191
7215de24
AD
21922001-12-10 Akim Demaille <akim@epita.fr>
2193
2194 * src/LR0.h (first_shift, first_reduction): Remove.
2195 * src/lalr.c: Don't use first_shift: find shifts through the
2196 states.
2197
80e25d4d
AD
21982001-12-10 Akim Demaille <akim@epita.fr>
2199
2200 * src/LR0.c: Attach shifts to states as soon as they are
2201 computed.
2202 * src/lalr.c (set_state_table): Instead of assigning shifts to
2203 state, just assert that the mapping was properly done.
2204
0ab3728b
AD
22052001-12-10 Akim Demaille <akim@epita.fr>
2206
2207 * src/LR0.c (insert_start_shift): Rename as...
2208 (insert_start_shifting_state): this.
2209 (insert_eof_shifting_state, insert_accepting_state): New.
2210 (augment_automaton): Adjust.
2211 Better locality of the variables.
2212 When looking if the start_symbol is shifted from the initial
2213 state, using `while (... symbol != start_symbol ...)' sounds
2214 better than `while (... symbol < start_symbol ...)': If fail
2215 to see how the order between symbols could be relevant!
2216
78af9bbc
AD
22172001-12-10 Akim Demaille <akim@epita.fr>
2218
2219 * src/getargs.h: Don't declare `spec_name_prefix' and
2220 `spec_file_prefix', declared by src/files.h.
2221 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2222 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2223 * src/output.c (prepare): Adjust.
2224 * src/reader.c (symbols_output): Likewise.
2225 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2226
bdef2a41
AD
22272001-12-10 Akim Demaille <akim@epita.fr>
2228
2229 * src/muscle_tab.c (muscle_init): NULL is a better default than
2230 `"0"'.
2231
3735969c
AD
22322001-12-10 Akim Demaille <akim@epita.fr>
2233
2234 * src/reader.c (reader): Calling symbols_output once is enough.
2235
49701457
AD
22362001-12-10 Akim Demaille <akim@epita.fr>
2237
2238 Now that states have a complete set of members, the linked list of
2239 reductions is useless: just fill directly the state's reductions
2240 member.
2241
2242 * src/state.h (struct reductions): Remove member `number' and
2243 `next'.
2244 * src/LR0.c (first_reduction, last_reduction): Remove.
2245 (save_reductions): Don't link the new reductions, store them in
2246 this_state.
2247 * src/lalr.c (set_state_table): No need to attach reductions to
2248 states, it's already done.
2249 * src/output.c (output_actions): No longer free the shifts, then
2250 the reductions, then the states: free all the states and their
2251 members.
2252
0edad749
AD
22532001-12-10 Akim Demaille <akim@epita.fr>
2254
2255 * src/options.c (OPTN, DRTV, BOTH): New.
2256 (option_table): Use them.
2257
0edad749
AD
2258 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2259 the job of system.h.
2260 * src/options.c: Don't include stdio.h and xalloc.h for the same
2261 reasons.
2262
5449dd0f
AD
22632001-12-10 Akim Demaille <akim@epita.fr>
2264
2265 * src/output.c (output, prepare): Make sure the values of the
2266 muscles `action' and `prologue' are 0-terminated.
2267
a870c567
AD
22682001-12-10 Akim Demaille <akim@epita.fr>
2269
2270 Clean up GCC warnings.
2271
2272 * src/reader.c (copy_action): `buf' is not used.
2273 (parse_skel_decl): Be static.
2274 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2275 * src/options.h (create_long_option_table): Have a real prototype.
2276 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2277 (hash_delete_at): Return const void *.
2278 Adjust casts to preserve the const.
2279
80df8768
AD
22802001-12-10 Akim Demaille <akim@epita.fr>
2281
2282 * configure.in: Require 2.52g.
2283 M4 is not needed, but AUTOM4TE is.
2284 * m4/m4.m4: Remove.
2285 * tests/Makefile.am: Adjust.
2286
f693ad14
AD
22872001-12-10 Akim Demaille <akim@epita.fr>
2288
2289 One structure for states is enough, even though theoretically
2290 there are LR(0) states and LALR(1) states.
2291
2292 * src/lalr.h (state_t): Remove.
2293 (state_table): Be state_t **, not state_t *.
2294 * src/state.h (core, CORE_ALLOC): Rename as...
2295 (state_t, STATE_ALLOC): this.
2296 Add the LALR(1) members: shifts, reductions, errs.
2297 * src/LR0.c (state_table): Rename as...
2298 (state_hash): this, to avoid name clashes with the global
2299 `state_table'.
2300 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2301 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2302
74ffbcb6
AD
23032001-12-10 Akim Demaille <akim@epita.fr>
2304
2305 Bison dumps core on bash.y.
2306 Reported by Pascal Bart.
2307
2308 * src/warshall.c (bitmatrix_print): New.
2309 (TC): Use it.
2310 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2311 j must be the outer loop.
2312 * tests/regression.at (Broken Closure): New.
2313
07708e19
AD
23142001-12-05 Akim Demaille <akim@epita.fr>
2315
2316 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2317 its argument.
2318