]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/symtab.c (symbol_user_token_number_set): Don't complain when
[bison.git] / ChangeLog
CommitLineData
5e424082
AD
12002-06-10 Akim Demaille <akim@epita.fr>
2
3 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4 assigning twice the same user number to a token, so that we can
5 use it in...
6 * src/lex.c (lex): here.
7 Also use `symbol_class_set' instead of hand written code.
8 * src/reader.c (parse_assoc_decl): Likewise.
9
44536b35
AD
102002-06-10 Akim Demaille <akim@epita.fr>
11
12 * src/symtab.c, src/symtab.c (symbol_class_set)
13 (symbol_user_token_number_set): New.
14 * src/reader.c (parse_token_decl): Use them.
15 Use a switch instead of ifs.
16 Use a single argument.
17
8b9f2372
AD
182002-06-10 Akim Demaille <akim@epita.fr>
19
20 Remove `%thong' support as it is undocumented, unused, duplicates
21 `%token's job, and creates useless e-mail traffic with people who
22 want to know what it is, why it is undocumented, unused, and
23 duplicates `%token's job.
24
25 * src/reader.c (parse_thong_decl): Remove.
26 * src/options.c (option_table): Remove "thong".
27 * src/lex.h (tok_thong): Remove.
28
3ae2b51f
AD
292002-06-10 Akim Demaille <akim@epita.fr>
30
31 * src/symtab.c, src/symtab.c (symbol_type_set)
32 (symbol_precedence_set): New.
33 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
34 (value_components_used): Remove, unused.
35
2f1afb73
AD
362002-06-09 Akim Demaille <akim@epita.fr>
37
38 Move symbols handling code out of the reader.
39
40 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
41 (axiom): Move to...
42 * src/symtab.h, src/symtab.c: here.
43
44 * src/gram.c (start_symbol): Remove: use startsymbol->number.
45 * src/reader.c (startval): Rename as...
46 * src/symtab.h, src/symtab.c (startsymbol): this.
47 * src/reader.c: Adjust.
48
49 * src/reader.c (symbol_check_defined, symbol_make_alias)
50 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
51 (token_translations_init)
52 Move to...
53 * src/symtab.c: here.
54 * src/reader.c (packsymbols): Move to...
55 * src/symtab.h, src/symtab.c (symbols_pack): here.
56 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
57 argument.
58
e9bca3ad
AD
592002-06-03 Akim Demaille <akim@epita.fr>
60
61 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
62 then statements.
63
86eff183
AD
642002-06-03 Akim Demaille <akim@epita.fr>
65
66 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
67 structs with non literals.
68 * src/scan-skel.l: never-interactive.
69 * src/conflicts.c (enum conflict_resolution_e): No trailing
70 comma.
71 * src/getargs.c (usage): Split long literal strings.
72 Reported by Hans Aberg.
73
717be197
AD
742002-05-28 Akim Demaille <akim@epita.fr>
75
76 * data/bison.c++: Use C++ ostreams.
77 (cdebug_): New member.
78
670ddffd
AD
792002-05-28 Akim Demaille <akim@epita.fr>
80
81 * src/output.c (output_skeleton): Be sure to allocate enough room
82 for `/' _and_ for `\0' in full_skeleton.
83
769b430f
AD
842002-05-28 Akim Demaille <akim@epita.fr>
85
86 * data/bison.c++: Catch up with bison.simple:
87 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
88 and Paul Eggert <eggert@twinsun.com>: `error' handing.
89 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
90 and popping traces.
91
7067cb36
PH
922002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
93
94 * src/output.c (output_skeleton): Put an explicit path in front of
95 the skeleton file name, rather than relying on the -I directory,
96 to partially alleviate effects of having a skeleton file lying around
97 in the current directory.
769b430f 98
4a713ec2
PH
992002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
100
769b430f 101 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
102 obstack_printf should be obstack_fgrow1.
103
b408954b
AD
1042002-05-26 Akim Demaille <akim@epita.fr>
105
106 * src/state.h (state_t): `solved_conflicts' is a new member.
107 * src/LR0.c (new_state): Set it to 0.
108 * src/conflicts.h, src/conflicts.c (print_conflicts)
109 (free_conflicts, solve_conflicts): Rename as...
110 (conflicts_print, conflicts_free, conflicts_solve): these.
111 Adjust callers.
112 * src/conflicts.c (enum conflict_resolution_e)
113 (solved_conflicts_obstack): New, used by...
114 (log_resolution): this.
115 Adjust to attach the conflict resolution to each state.
116 Complete the description with the precedence/associativity
117 information.
118 (resolve_sr_conflict): Adjust.
119 * src/print.c (print_state): Output its solved_conflicts.
120 * tests/conflicts.at (Unresolved SR Conflicts)
121 (Solved SR Conflicts): Exercise --report=all.
122
a49aecd5
AD
1232002-05-26 Akim Demaille <akim@epita.fr>
124
125 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
126 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
127 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
128 (token_number_t, item_number_as_token_number)
129 (token_number_as_item_number, muscle_insert_token_number_table):
130 Rename as...
131 (symbol_number_t, item_number_as_symbol_number)
132 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
133 these, since it is more appropriate.
134
5504898e
AD
1352002-05-26 Akim Demaille <akim@epita.fr>
136
137 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
138 `Error:' lines.
139 * data/bison.simple (yystos) [YYDEBUG]: New.
140 (yyparse) [YYDEBUG]: Display the symbols which are popped during
141 error recovery.
142 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
143
ec3bc396
AD
1442002-05-25 Akim Demaille <akim@epita.fr>
145
146 * doc/bison.texinfo (Debugging): Split into...
147 (Tracing): this new section, its former contents, and...
148 (Understanding): this new section.
149 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
150 by...
151 (report_flag): this.
152 Adjust all dependencies.
153 (report_args, report_types, report_argmatch): New.
154 (usage, getargs): Report/support -r, --report.
155 * src/options.h
156 (struct option_table_struct): Rename as..,
157 (struct option_table_s): this.
158 Rename the `set_flag' member to `flag' to match with getopt_long's
159 struct.
160 * src/options.c (option_table): Split verbose into an entry for
161 %verbose, and another for --verbose.
162 Support --report/-r, so remove -r from the obsolete --raw.
163 * src/print.c: Attach full item sets and lookaheads reports to
164 report_flag instead of trace_flag.
165 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
166
78df8250
PE
1672002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
168 and Paul Eggert <eggert@twinsun.com>
769b430f 169
78df8250
PE
170 * data/bison.simple (yyparse): Correct error handling to conform to
171 POSIX and yacc. Specifically, after syntax error is discovered,
172 do not reduce further before shifting the error token.
173 Clean up the code a bit by removing the labels yyerrdefault,
174 yyerrhandle, yyerrpop.
175 * NEWS: Document the above.
176
c0c9ea05
PH
1772002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
178
179 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
180 type; it isn't always big enough, since it doesn't necessarily
181 include non-terminals.
769b430f 182 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
183 the latter can be removed.
184 (yy_token_number_type): Remove, only one use.
185 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
186 don't use TokenNumberType as element type.
769b430f 187
c0c9ea05
PH
188 * tests/regression.at: Modify expected output to agree with change
189 to yyr1 and yytranslate.
769b430f 190
6390a83f
FK
1912002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
192
193 * src/reader.c (parse_action): Use copy_character instead of
194 obstack_1grow.
195
db7c8e9a
AD
1962002-05-13 Akim Demaille <akim@epita.fr>
197
198 * tests/regression.at (Token definitions): Prototype yylex and
199 yyerror.
200
fcc61800
PH
2012002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
202
158c687b 203 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
204 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
205 32-bit arithmetic.
206 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
207
5683e9b2
AD
2082002-05-07 Akim Demaille <akim@epita.fr>
209
210 * tests/synclines.at: Be sure to prototype yylex and yyerror to
211 avoid GCC warnings.
212
0c2d3f4c
AD
2132002-05-07 Akim Demaille <akim@epita.fr>
214
215 Kill GCC warnings.
216
217 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
218 over the RHS of each rule.
219 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
220 * src/state.h (state_t): Member `nitems' is unsigned short.
221 * src/LR0.c (get_state): Adjust.
222 * src/reader.c (packgram): Likewise.
223 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
224 `Type'.
225 (muscle_insert_int_table): Remove, unused.
226 (prepare_rules): Remove `max'.
227
1565b720
AD
2282002-05-06 Akim Demaille <akim@epita.fr>
229
230 * src/closure.c (print_firsts): Display of the symbol tags.
231 (bitmatrix_print): Move to...
232 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
233 here.
234 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
235
cfaee611
AD
2362002-05-06 Akim Demaille <akim@epita.fr>
237
238 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
239 hash_do_for_each.
240
458be8e0
AD
2412002-05-06 Akim Demaille <akim@epita.fr>
242
243 * src/LR0.c (new_state, get_state): Instead of using the global
244 `kernel_size' and `kernel_base', have two new arguments:
245 `core_size' and `core'.
246 Adjust callers.
247
a900a624
AD
2482002-05-06 Akim Demaille <akim@epita.fr>
249
250 * src/reader.c (packgram): No longer end `ritem' with a 0
251 sentinel: it is not used.
252
d4e7d3a1
AD
2532002-05-05 Akim Demaille <akim@epita.fr>
254
255 New experimental feature: display the lookaheads in the report and
256 graph.
257
258 * src/print (print_core): When --trace-flag, display the rules
259 lookaheads.
260 * src/print_graph.c (print_core): Likewise.
261 Swap the arguments.
262 Adjust caller.
263
39ceb25b
AD
2642002-05-05 Akim Demaille <akim@epita.fr>
265
266 * tests/torture.at (Many lookaheads): New test.
267
5372019f
AD
2682002-05-05 Akim Demaille <akim@epita.fr>
269
270 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
271 (GENERATE_MUSCLE_INSERT_TABLE): this.
272 (output_int_table, output_unsigned_int_table, output_short_table)
273 (output_token_number_table, output_item_number_table): Replace with...
274 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
275 (muscle_insert_short_table, muscle_insert_token_number_table)
276 (muscle_insert_item_number_table): these.
277 Adjust all callers.
278 (prepare_tokens): Don't free `translations', since...
279 * src/reader.h, src/reader.c (grammar_free): do it.
280 Move to...
281 * src/gram.h, src/gram.c (grammar_free): here.
282 * data/bison.simple, data/bison.c++: b4_token_number_max is now
283 b4_translate_max.
284
5df5f6d5
AD
2852002-05-05 Akim Demaille <akim@epita.fr>
286
287 * src/output.c (output_unsigned_int_table): New.
288 (prepare_rules): `i' is unsigned.
289 `prhs', `rline', `r2' are unsigned int.
290 Rename muscle `rhs_number_max' as `rhs_max'.
291 Output muscles `prhs_max', `rline_max', and `r2_max'.
292 Free rline and r1.
293 * data/bison.simple, data/bison.c++: Adjust to use these muscles
294 to compute types instead of constant types.
295 * tests/regression.at (Web2c Actions): Adjust.
296
b87f8b21
AD
2972002-05-04 Akim Demaille <akim@epita.fr>
298
299 * src/symtab.h (SALIAS, SUNDEF): Rename as...
300 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
301 Adjust dependencies.
302 * src/output.c (token_definitions_output): Be sure not to output a
303 `#define 'a'' when fed with `%token 'a' "a"'.
304 * tests/regression.at (Token definitions): New.
305
8bb936e4
PE
3062002-05-03 Paul Eggert <eggert@twinsun.com>
307
308 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
309 for K&R C.
310
3112002-05-03 gettextize <bug-gnu-gettext@gnu.org>
312
313 * Makefile.am (SUBDIRS): Remove intl.
314 (EXTRA_DIST): Add config/config.rpath.
315
53c71a12
AD
3162002-05-03 Akim Demaille <akim@epita.fr>
317
318 * data/bison.simple (m4_if): Don't output empty enums.
319 And actually, output valid enum definitions :(.
320
289dd0cf
AD
3212002-05-03 Akim Demaille <akim@epita.fr>
322
323 * configure.bat: Remove, completely obsolete.
324 * Makefile.am (EXTRA_DIST): Adjust.
325 Don't distribute config.rpath...
326 * config/Makefile.am (EXTRA_DIST): Do it.
327
db85e524
AD
3282002-05-03 Akim Demaille <akim@epita.fr>
329
330 * configure.in (GETTEXT_VERSION): New.
331 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
332
83ccf991
AD
3332002-05-03 Akim Demaille <akim@epita.fr>
334
335 * data/bison.simple (b4_token_enum): New.
336 (b4_token_defines): Use it to output tokens both as #define and
337 enums.
338 Suggested by Paul Eggert.
339 * src/output.c (token_definitions_output): Don't output spurious
340 white spaces.
341
1f418995
AD
3422002-05-03 Akim Demaille <akim@epita.fr>
343
344 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
345
45119f04
RA
3462002-05-02 Robert Anisko <robert@lrde.epita.fr>
347
348 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
349 Update the stack class, give a try to deque as the default container.
350
b2d52318
AD
3512002-05-02 Akim Demaille <akim@epita.fr>
352
353 * data/bison.simple (yyparse): Do not implement @$ = @1.
354 (YYLLOC_DEFAULT): Adjust to do it.
355 * doc/bison.texinfo (Location Default Action): Fix.
356
3a8b4109
AD
3572002-05-02 Akim Demaille <akim@epita.fr>
358
359 * src/reader.c (parse_braces): Merge into...
360 (parse_action): this.
361
84614e13
AD
3622002-05-02 Akim Demaille <akim@epita.fr>
363
364 * configure.in (ALL_LINGUAS): Remove.
365 * po/LINGUAS, hr.po: New.
366
fdbcd8e2
AD
3672002-05-02 Akim Demaille <akim@epita.fr>
368
369 Remove the so called hairy (semantic) parsers.
370
371 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
372 * src/gram.h, src/gram.c (semantic_parser): Remove.
373 (rule_t): Remove the guard and guard_line members.
374 * src/lex.h (token_t): remove tok_guard.
375 * src/options.c (option_table): Remove %guard and %semantic_parser
376 support.
377 * src/output.c, src/output.h (guards_output): Remove.
378 (prepare): Adjust.
379 (token_definitions_output): Don't output the `T'
380 tokens (???).
381 (output_skeleton): Don't output the guards.
382 * src/files.c, src/files.c (attrsfile): Remove.
383 * src/reader.c (symbol_list): Remove the guard and guard_line
384 members.
385 Adjust dependencies.
386 (parse_guard): Remove.
387 * data/bison.hairy: Remove.
388 * doc/bison.texinfo (Environment Variables): Remove occurrences of
389 BISON_HAIRY.
390
82b6cb3f
AD
3912002-05-02 Akim Demaille <akim@epita.fr>
392
393 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
394 (parse_guard): Rename the formal argument `stack_offset' as
395 `rule_length', which is more readable.
396 Adjust callers.
397 (copy_at, copy_dollar): Instead of outputting the hard coded
398 values of $$, $n and so forth, output invocation to b4_lhs_value,
399 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
400 Note: this patch partially drops `semantic-parser' support: it
401 always does `rule_length - n', where semantic parsers ought to
402 always use `-n'.
82b6cb3f
AD
403 * data/bison.simple, data/bison.c++ (b4_lhs_value)
404 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
405
6cbfbcc5
AD
4062002-05-02 Akim Demaille <akim@epita.fr>
407
408 * configure.in (AC_INIT): Bump to 1.49b.
409 (AM_INIT_AUTOMAKE): Short invocation.
410
b8548114
AD
4112002-05-02 Akim Demaille <akim@epita.fr>
412
413 Version 1.49a.
414
c20cd1fa
AD
4152002-05-01 Akim Demaille <akim@epita.fr>
416
417 * src/skeleton.h: Remove.
418
8a9566d4
AD
4192002-05-01 Akim Demaille <akim@epita.fr>
420
421 * src/skeleton.h: Fix the #endif.
422 Reported by Magnus Fromreide.
423
8c6d399a
PE
4242002-04-26 Paul Eggert <eggert@twinsun.com>
425
426 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
427 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 428 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 429
2b7ed18a
RA
4302002-04-25 Robert Anisko <robert@lrde.epita.fr>
431
432 * src/scan-skel.l: Postprocess quadrigraphs.
433
434 * src/reader.c (copy_character): New function, used to output
435 single characters while replacing `[' and `]' with quadrigraphs, to
436 avoid troubles with M4 quotes.
437 (copy_comment): Output characters with copy_character.
438 (read_additionnal_code): Likewise.
439 (copy_string2): Likewise.
440 (copy_definition): Likewise.
441
442 * tests/calc.at: Exercise M4 quoting.
443
34a89c50
AD
4442002-04-25 Akim Demaille <akim@epita.fr>
445
446 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
447 between `!' and the command.
448 Reported by Paul Eggert.
449
0dd1580a
RA
4502002-04-24 Robert Anisko <robert@lrde.epita.fr>
451
452 * tests/calc.at: Exercise prologue splitting.
453
454 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
455 `b4_post_prologue' instead of `b4_prologue'.
456
457 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
458 muscles.
459 (output): Free pre_prologue_obstack and post_prologue_obstack.
460 * src/files.h, src/files.c (attrs_obstack): Remove.
461 (pre_prologue_obstack, post_prologue_obstack): New.
462 * src/reader.c (copy_definition): Add a parameter to specify the
463 obstack to fill, instead of using attrs_obstack unconditionally.
464 (read_declarations): Pass pre_prologue_obstack to copy_definition if
465 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
466
83c1796f
PE
4672002-04-23 Paul Eggert <eggert@twinsun.com>
468
469 * data/bison.simple: Remove unnecessary commentary and white
470 space differences from 1_29-branch.
471 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
472
473 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
474 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
475 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
476 constructors or destructors.
477
478 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
479
1207eeac
AD
4802002-04-23 Akim Demaille <akim@epita.fr>
481
482 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
483 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
484 location with columns.
485 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
486 All reported by Paul Eggert.
487
78ab8f67
AD
4882002-04-22 Akim Demaille <akim@epita.fr>
489
490 * src/reduce.c (dump_grammar): Move to...
491 * src/gram.h, src/gram.c (grammar_dump): here.
492 Be sure to separate long item numbers.
493 Don't read the members of a rule's prec if its nil.
494
133c20e2
AD
4952002-04-22 Akim Demaille <akim@epita.fr>
496
497 * src/output.c (table_size, table_grow): New.
498 (MAXTABLE): Remove, replace uses with table_size.
499 (pack_vector): Instead of dying when the table is too big, grow it.
500
9515e8a7
AD
5012002-04-22 Akim Demaille <akim@epita.fr>
502
503 * data/bison.simple (yyr1): Its type is that of a token number.
504 * data/bison.c++ (r1_): Likewise.
505 * tests/regression.at (Web2c Actions): Adjust.
506
23c5a174
AD
5072002-04-22 Akim Demaille <akim@epita.fr>
508
509 * src/reader.c (token_translations_init): 256 is now the default
510 value for the error token, i.e., it will be assigned another
511 number if the user assigned 256 to one of her tokens.
512 (reader): Don't force 256 to error.
513 * doc/bison.texinfo (Symbols): Adjust.
514 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
515 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
516 etc. instead of 10, 20, 30 (which was used to `jump' over error
517 (256) and undefined (2)).
518
5fbb0954
AD
5192002-04-22 Akim Demaille <akim@epita.fr>
520
521 Propagate more token_number_t.
522
523 * src/gram.h (token_number_as_item_number)
524 (item_number_as_token_number): New.
525 * src/output.c (GENERATE_OUTPUT_TABLE): New.
526 Use it to create output_item_number_table and
527 output_token_number_table.
528 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
529 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
530 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
531 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
532
4f940944
AD
5332002-04-22 Akim Demaille <akim@epita.fr>
534
535 * src/output.h, src/output.c (get_lines_number): Remove.
536
3ded9a63
AD
5372002-04-19 Akim Demaille <akim@epita.fr>
538
539 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
540 as Lex/Flex'.
541 (Debugging): More details about enabling the debugging features.
542 (Table of Symbols): Describe $$, $n, @$, and @n.
543 Suggested by Tim Josling.
544
e0c471a9
AD
5452002-04-19 Akim Demaille <akim@epita.fr>
546
547 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
548
fecc10cd
AD
5492002-04-10 Akim Demaille <akim@epita.fr>
550
551 * src/system.h: Rely on HAVE_LIMITS_H.
552 Suggested by Paul Eggert.
553
51dec47b
AD
5542002-04-09 Akim Demaille <akim@epita.fr>
555
556 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
557 full stderr, and strip it according to the bison options, instead
558 of composing the error message from different bits.
559 This makes it easier to check for several error messages.
560 Adjust all the invocations.
561 Add an invocation exercising the error token.
562 Add an invocation demonstrating a stupid error message.
563 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
564 Adjust the tests.
565 Error message are for stderr, not stdout.
566
007a50a4
AD
5672002-04-09 Akim Demaille <akim@epita.fr>
568
569 * src/gram.h, src/gram.c (error_token_number): Remove, use
570 errtoken->number.
571 * src/reader.c (reader): Don't specify the user token number (2)
572 for $undefined, as it uselessly prevents using it.
573 * src/gram.h (token_number_t): Move to...
574 * src/symtab.h: here.
575 (state_t.number): Is a token_number_t.
576 * src/print.c, src/reader.c: Use undeftoken->number instead of
577 hard coded 2.
578 (Even though this 2 is not the same as above: the number of the
579 undeftoken remains being 2, it is its user token number which
580 might not be 2).
581 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
582 `user_token_number_max'.
583 Output `undef_token_number'.
584 * data/bison.simple, data/bison.c++: Use them.
585 Be sure to map invalid yylex return values to
586 `undef_token_number'. This saves us from gratuitous SEGV.
587
588 * tests/conflicts.at (Solved SR Conflicts)
589 (Unresolved SR Conflicts): Adjust.
590 * tests/regression.at (Web2c Actions): Adjust.
591
06446ccf
AD
5922002-04-08 Akim Demaille <akim@epita.fr>
593
594 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
595 Adding #line.
596 Remove the duplicate `typedefs'.
597 (RhsNumberType): Fix the declaration and various other typos.
598 Use __ofile__.
599 * data/bison.simple: Use __ofile__.
600 * src/scan-skel.l: Handle __ofile__.
601
62a3e4f0
AD
6022002-04-08 Akim Demaille <akim@epita.fr>
603
604 * src/gram.h (item_number_t): New, the type of item numbers in
605 RITEM. Note that it must be able to code symbol numbers as
606 positive number, and the negation of rule numbers as negative
607 numbers.
608 Adjust all dependencies (pretty many).
609 * src/reduce.c (rule): Remove this `short *' pointer: use
610 item_number_t.
611 * src/system.h (MINSHORT, MAXSHORT): Remove.
612 Include `limits.h'.
613 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
614 (shortcpy): Remove.
615 (MAXTABLE): Move to...
616 * src/output.c (MAXTABLE): here.
617 (prepare_rules): Use output_int_table to output rhs.
618 * data/bison.simple, data/bison.c++: Adjust.
619 * tests/torture.at (Big triangle): Move the limit from 254 to
620 500.
621 * tests/regression.at (Web2c Actions): Ajust.
622
623 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
624 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
625 passes, but produces negative #line number, once fixed, GCC is
626 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
627 C), it passes.
628 * src/state.h (state_h): Code input lines on ints, not shorts.
629
bb88b0fc
AD
6302002-04-08 Akim Demaille <akim@epita.fr>
631
632 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
633 and then the grammar.
634
9a636f47
AD
6352002-04-08 Akim Demaille <akim@epita.fr>
636
637 * src/system.h: No longer using strndup.
638
680e8701
AD
6392002-04-07 Akim Demaille <akim@epita.fr>
640
641 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
642 * src/output.c (output_table_data): Return the longest number.
643 (prepare_tokens): Output `token_number_max').
644 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
645 New.
646 Use them to define yy_token_number_type/TokenNumberType.
647 Use this type for yytranslate.
648 * tests/torture.at (Big triangle): Push the limit from 124 to
649 253.
650 * tests/regression.at (Web2c Actions): Adjust.
651
817e9f41
AD
6522002-04-07 Akim Demaille <akim@epita.fr>
653
654 * tests/torture.at (Big triangle): New.
655 (GNU AWK Grammar, GNU Cim Grammar): Move to...
656 * tests/existing.at: here.
657
5123689b
AD
6582002-04-07 Akim Demaille <akim@epita.fr>
659
660 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
661 nritems.
662 Adjust dependencies.
663
f3849179
AD
6642002-04-07 Akim Demaille <akim@epita.fr>
665
666 * src/reader.c: Normalize increments to prefix form.
667
bd02036a
AD
6682002-04-07 Akim Demaille <akim@epita.fr>
669
670 * src/reader.c, symtab.c: Remove debugging code.
671
db8837cb
AD
6722002-04-07 Akim Demaille <akim@epita.fr>
673
674 Rename all the `bucket's as `symbol_t'.
675
676 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
677 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
678 * src/symtab.c, src/symtab.h (bucket): Rename as...
679 (symbol_t): this.
680 (symbol_list_new, bucket_check_defined, bucket_make_alias)
681 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
682 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
683 (buckets_new, buckets_free, buckets_do): Rename as...
684 (symbol_list_new, symbol_check_defined, symbol_make_alias)
685 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
686 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
687 (symbols_new, symbols_free, symbols_do): these.
688
72a23c97
AD
6892002-04-07 Akim Demaille <akim@epita.fr>
690
691 Use lib/hash for the symbol table.
692
693 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
694 EOF.
695 * src/lex.c (lex): Set the `number' member of new terminals.
696 * src/reader.c (bucket_check_defined, bucket_make_alias)
697 (bucket_check_alias_consistence, bucket_translation): New.
698 (reader, grammar_free, readgram, token_translations_init)
699 (packsymbols): Adjust.
700 (reader): Number the predefined tokens.
701 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
702 for predefined tokens.
703 * src/symtab.h (bucket): Remove all the hash table related
704 members.
705 * src/symtab.c (symtab): Replace by...
706 (bucket_table): this.
707 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
708 (buckets_new, buckets_do): New.
709
280a38c3
AD
7102002-04-07 Akim Demaille <akim@epita.fr>
711
712 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
713 (start_symbol, max_user_token_number, semantic_parser)
714 (error_token_number): Initialize.
715 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
716 Initialize.
717 (reader): Don't.
718 (errtoken, eoftoken, undeftoken, axiom): Extern.
719
03b31c0c
AD
7202002-04-07 Akim Demaille <akim@epita.fr>
721
722 * src/gram.h (rule_s): prec and precsym are now pointers
723 to the bucket giving the priority/associativity.
724 Member `associativity' removed: useless.
725 * src/reduce.c, src/conflicts.c: Adjust.
726
8b3df748
AD
7272002-04-07 Akim Demaille <akim@epita.fr>
728
729 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
730 Properly escape the symbols' TAG when outputting them.
731
e601aa1d
AD
7322002-04-07 Akim Demaille <akim@epita.fr>
733
734 * src/lalr.h (LA): Is a bitsetv, not bitset*.
735
b0299a2e
AD
7362002-04-07 Akim Demaille <akim@epita.fr>
737
738 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
739 (LArule): this, which is an array to rule_t*.
740 * src/print.c, src/conflicts.c: Adjust.
741
d7e1f00c
AD
7422002-04-07 Akim Demaille <akim@epita.fr>
743
744 * src/gram.h (rule_t): Rename `number' as `user_number'.
745 `number' is a new member.
746 Adjust dependencies.
747 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
748
cc9305dd
AD
7492002-04-07 Akim Demaille <akim@epita.fr>
750
751 As a result of the previous patch, it is no longer needed
752 to reorder ritem itself.
753
754 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
755
b0940840
AD
7562002-04-07 Akim Demaille <akim@epita.fr>
757
758 Be sure never to walk through RITEMS, but use only data related to
759 the rules themselves. RITEMS should be banished.
760
761 * src/output.c (output_token_translations): Rename as...
762 (prepare_tokens): this.
763 In addition to `translate', prepare the muscles `tname' and
764 `toknum', which were handled by...
765 (output_rule_data): this.
766 Remove, and move the remainder of its outputs into...
767 (prepare_rules): this new routines, which also merges content from
768 (output_gram): this.
769 (prepare_rules): Be sure never to walk through RITEMS.
770 (output_stos): Rename as...
771 (prepare_stos): this.
772 (output): Always invoke prepare_states, after all, just don't use it
773 in the output if you don't need it.
774
643a5994
AD
7752002-04-07 Akim Demaille <akim@epita.fr>
776
777 * src/LR0.c (new_state): Display `nstates' as the name of the
778 newly created state.
779 Adjust to initialize first_state and last_state if needed.
780 Be sure to distinguish the initial from the final state.
781 (new_states): Create the itemset of the initial state, and use
782 new_state.
783 * src/closure.c (closure): Now that the initial state has its
784 items properly set, there is no need for a special case when
785 creating `ruleset'.
786
787 As a result, now the rule 0, reducing to $axiom, is visible in the
788 outputs. Adjust the test suite.
789
790 * tests/conflicts.at (Solved SR Conflicts)
791 (Unresolved SR Conflicts): Adjust.
792 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
793 * tests/conflicts.at (S/R in initial): New.
794
b4c4ccc2
AD
7952002-04-07 Akim Demaille <akim@epita.fr>
796
797 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
798 the RHS of the rules.
799 * src/output.c (output_gram): Likewise.
800
bba97eb2
AD
8012002-04-07 Akim Demaille <akim@epita.fr>
802
803 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
804 bucket.
805 Adjust all dependencies.
806 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
807 `number' of the buckets too.
808 * src/gram.h: Include `symtab.h'.
809 (associativity): Move to...
810 * src/symtab.h: here.
811 No longer include `gram.h'.
812
c3b407f4
AD
8132002-04-07 Akim Demaille <akim@epita.fr>
814
815 * src/gram.h, src/gram.c (rules_rhs_length): New.
816 (ritem_longest_rhs): Use it.
817 * src/gram.h (rule_t): `number' is a new member.
818 * src/reader.c (packgram): Set it.
819 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
820 the end of `rules', and count them out of `nrules'.
821 (reduce_output, dump_grammar): Adjust.
822 * src/print.c (print_grammar): It is no longer needed to check for
823 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
824 * tests/reduce.at (Reduced Automaton): New test.
825
11652ab3
AD
8262002-04-07 Akim Demaille <akim@epita.fr>
827
828 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
829 lacking `+ 1' to nrules, Bison reported as useless a token if it
830 was used solely to set the precedence of the last rule...
831
26b23c1a
AD
8322002-04-07 Akim Demaille <akim@epita.fr>
833
834 * data/bison.c++, data/bison.simple: Don't output the current file
835 name in #line, to avoid useless diffs between two identical
836 outputs under different names.
837
18bcecb0
AD
8382002-04-07 Akim Demaille <akim@epita.fr>
839
840 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
841 Normalize loops to using `< nrules + 1', not `<= nrules'.
842
fa770c86
AD
8432002-04-07 Akim Demaille <akim@epita.fr>
844
845 * TODO: Update.
846
d9b739c3
AD
8472002-04-07 Akim Demaille <akim@epita.fr>
848
849 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
850 bucket.value as bucket.number.
851
99013900
AD
8522002-04-07 Akim Demaille <akim@epita.fr>
853
854 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
855 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
856 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
857 RHS, instead of being an index in RITEMS.
858
e966383b
PE
8592002-04-04 Paul Eggert <eggert@twinsun.com>
860
861 * doc/bison.texinfo: Update copyright date.
862 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
863 (Symbols): Warn about running Bison in one character set,
864 but compiling and/or running in an incompatible one.
865 Warn about character code 256, too.
866
8672002-04-03 Paul Eggert <eggert@twinsun.com>
868
869 * src/bison.data (YYSTACK_ALLOC): Depend on whether
870 YYERROR_VERBOSE is nonzero, not whether it is defined.
871
872 Merge changes from bison-1_29-branch.
c307773e 873
8d6c48b9
PE
8742002-03-20 Paul Eggert <eggert@twinsun.com>
875
876 Merge fixes from Debian bison_1.34-1.diff.
877
878 * configure.in (AC_PREREQ): 2.53.
879
e53c6322
AD
8802002-03-20 Akim Demaille <akim@epita.fr>
881
882 * src/conflicts.c (log_resolution): Argument `resolution' is const.
883
9ffbeca7
PE
8842002-03-19 Paul Eggert <eggert@twinsun.com>
885
21db0b2a
PE
886 * src/bison.simple (YYCOPY): New macro.
887 (YYSTACK_RELOCATE): Use it.
888 Remove Type arg; no longer needed. All callers changed.
889 (yymemcpy): Remove; no longer needed.
890
9ffbeca7
PE
891 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
892 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
893
642cb8f8
AD
8942002-03-19 Akim Demaille <akim@epita.fr>
895
896 Test and fix the #line outputs.
897
898 * tests/atlocal.at (GCC): New.
899 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
900 (Prologue synch line, ,%union synch line, Postprologue synch line)
901 (Action synch line, Epilogue synch line): New tests.
902 * src/reader.c (parse_union_decl): Define the muscle stype_line.
903 * data/bison.simple, data/bison.c++: Use it.
904
3c31a486
AD
9052002-03-19 Akim Demaille <akim@epita.fr>
906
907 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
908 (Solved SR Conflicts, %expect not enough, %expect right)
909 (%expect too much): Move to...
910 * tests/conflicts.at: this new file.
911
0d8bed56
AD
9122002-03-19 Akim Demaille <akim@epita.fr>
913
914 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
915 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
916 that we can move to enums for instance.
917 * src/output.c (token_definitions_output): Output a list of
918 `token-name, token-number' instead of the #define.
919 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
920
9208d17f
AD
9212002-03-14 Akim Demaille <akim@epita.fr>
922
923 Use Gettext 0.11.1.
924
af27eacb
RA
9252002-03-09 Robert Anisko <robert@lrde.epita.fr>
926
927 * data/bison.c++: Make the user able to add members to the generated
928 parser by subclassing.
929
9101a310
RA
9302002-03-05 Robert Anisko <robert@lrde.epita.fr>
931
932 * src/reader.c (read_additionnal_code): `c' should be an integer, not
933 a character.
934 Reported by Nicolas Tisserand and Nicolas Burrus.
935
fff9bf0b
RA
9362002-03-04 Robert Anisko <robert@lrde.epita.fr>
937
938 * src/reader.c: Warn about lacking semi-colons, do not complain.
939
64dba31e
RA
9402002-03-04 Robert Anisko <robert@lrde.epita.fr>
941
942 * data/bison.c++: Remove a debug line.
943
374f5a14
RA
9442002-03-04 Robert Anisko <robert@lrde.epita.fr>
945
946 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
947 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
948 provide a default implementation.
949
bfcf1f3a
AD
9502002-03-04 Akim Demaille <akim@epita.fr>
951
952 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
953 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
954 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
955 * tests/semantic.at (Parsing Guards): Similarly.
956 * src/reader.at (readgram): Complain if the last rule is not ended
957 with a semi-colon.
958
65ccf9fc
AD
9592002-03-04 Akim Demaille <akim@epita.fr>
960
961 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
962 * src/closure.c: here.
963 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
964 RTC.
965 * src/warshall.h, src/warshall.c: Remove.
966 * tests/sets.at (Broken Closure): Adjust.
967
d0039cbc
AD
9682002-03-04 Akim Demaille <akim@epita.fr>
969
970 * src/output.c (output_skeleton): tempdir is const.
971 bytes_read is unused.
972
345cea78
AD
9732002-03-04 Akim Demaille <akim@epita.fr>
974
975 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
976 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
977 Update.
978 From Michael Hayes.
979
564801f7
AD
9802002-03-04 Akim Demaille <akim@epita.fr>
981
982 * src/closure.c (closure): `r' is unused.
983
e5352bc7
AD
9842002-03-04 Akim Demaille <akim@epita.fr>
985
986 * tests/sets.at (Broken Closure): Add the ending `;'.
987 * src/reader.at (readgram): Complain if a rule is not ended with a
988 semi-colon.
989
914feea9
AD
9902002-03-04 Akim Demaille <akim@epita.fr>
991
992 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
993 (count_sr_conflicts): Use bitset_count.
994 * src/reduce.c (inaccessable_symbols): Ditto.
995 (bits_size): Remove.
996 * src/warshall.h, src/warshall.c: Convert to bitsetv.
997
f0250de6
AD
9982002-03-04 Akim Demaille <akim@epita.fr>
999
1000 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
1001 * src/reduce.c: Remove the `bitset_zero's following the
1002 `bitset_create's, as now it is performed by the latter.
1003
ef017502
AD
10042002-03-04 Akim Demaille <akim@epita.fr>
1005
1006 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
1007 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
1008 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
1009 latest sources from Michael.
1010
76514394
AD
10112002-03-04 Akim Demaille <akim@epita.fr>
1012
1013 * src/output.c (output): Don't free the grammar.
1014 * src/reader.c (grammar_free): New.
1015 * src/main.c (main): Call it and don't free symtab here.
1016
55024580
AD
10172002-03-04 Akim Demaille <akim@epita.fr>
1018
1019 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
1020 before returning.
1021 Reported by Benoit Perrot.
1022
f9abaa2c
AD
10232002-03-04 Akim Demaille <akim@epita.fr>
1024
1025 Use bitset operations when possible, not loops over bits.
1026
1027 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
1028 bitset_or.
1029 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
1030 * src/reduce.c (useless_nonterminals): Formatting changes.
1031 * src/warshall.c (TC): Use bitset_or.
1032
0e721e75
AD
10332002-03-04 Akim Demaille <akim@epita.fr>
1034
1035 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
1036 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
1037 Ditto.
1038
0fb1ffb1
AD
10392002-03-04 Akim Demaille <akim@epita.fr>
1040
1041 * src/lalr.c (F): Now a bitset*.
1042 Adjust all dependencies.
1043
b86796bf
AD
10442002-03-04 Akim Demaille <akim@epita.fr>
1045
1046 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
1047 Adjust all dependencies.
1048
602bbf31
AD
10492002-03-04 Akim Demaille <akim@epita.fr>
1050
1051 * src/L0.c, src/LR0.h (nstates): Be size_t.
1052 Adjust comparisons (signed vs unsigned).
1053 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
1054 bitset*.
1055 Adjust all dependencies.
1056
d8a0245c
AD
10572002-03-04 Akim Demaille <akim@epita.fr>
1058
1059 * src/closure.c (firsts): Now, also a bitset.
1060 Adjust all dependencies.
1061 (varsetsize): Remove, now unused.
1062 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
1063
34ba9743
AD
10642002-03-04 Akim Demaille <akim@epita.fr>
1065
1066 * src/print.c: Convert to use bitset.h, not hand coded iterations
1067 over ints.
1068
ed86e78c
AD
10692002-03-04 Akim Demaille <akim@epita.fr>
1070
1071 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1072
dfdb1797
AD
10732002-03-04 Akim Demaille <akim@epita.fr>
1074
1075 * src/closure.c (ruleset): Be a bitset.
1076 (rulesetsize): Remove.
1077
7086e707
AD
10782002-03-04 Akim Demaille <akim@epita.fr>
1079
1080 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1081 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1082 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1083 * src/closure.c (fderives): Be an array of bitsets.
1084
98254360
RA
10852002-02-28 Robert Anisko <robert@lrde.epita.fr>
1086
1087 * data/bison.c++: Merge the two generated headers. Insert a copyright
1088 notice in each output file.
1089
a75c057f
AD
10902002-02-28 Akim Demaille <akim@epita.fr>
1091
1092 * data/bison.c++: Copy the prologue of bison.simple to fetch
1093 useful M4 definitions, such as b4_header_guard.
1094
06b00abc
AD
10952002-02-25 Akim Demaille <akim@epita.fr>
1096
1097 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
1098 translator friendly scheme for the bgr
1099 copyright notice.
06b00abc 1100
70e7d534
AD
11012002-02-25 Akim Demaille <akim@epita.fr>
1102
1103 * src/output.c (header_output): Remove, now handled completely via
1104 M4.
1105
abe017f6
AD
11062002-02-25 Akim Demaille <akim@epita.fr>
1107
1108 * m4/m4.m4: New, from CVS Autoconf.
1109 * configure.in: Invoke it.
1110 * src/output.c (output_skeleton): Use its result instead of the
1111 hard coded name.
1112
381fb12e
AD
11132002-02-25 Akim Demaille <akim@epita.fr>
1114
1115 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1116 Fileutils 4.1.5.
1117 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1118 * src/output.c (output_skeleton): Use mkstemp to create a real
1119 temporary file.
1120 Move the filling of `skeleton' and its muscle to...
1121 (prepare): here.
1122 (output): Move the definition of the prologue muscle to...
1123 (prepare): here.
1124 * src/system.h (DEFAULT_TMPDIR): New.
1125
6f38107f
PE
11262002-02-14 Paul Eggert <eggert@twinsun.com>
1127
1128 Remove the support for C++ namespace cleanliness; it was
1129 causing more problems than it was curing, since it didn't work
1130 properly on some nonstandard C++ compilers. This can wait
1131 for a proper C++ parser.
1132
1133 * NEWS: Document this.
1134 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1135 of C++, as it's treated like C now.
1136 * src/bison.simple (YYSTD): Remove.
1137 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1138 Treat C++ just like Standard C instead of trying to support
1139 namespace cleanliness.
1140
80cce3da
AD
11412002-02-14 Akim Demaille <akim@epita.fr>
1142
1143 * tests/regression.at (else): Adjust to Andreas' change.
1144
842e8679
AD
11452002-02-14 Akim Demaille <akim@epita.fr>
1146
1147 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1148
4bda3f10
AD
11492002-02-13 Andreas Schwab <schwab@suse.de>
1150
1151 * src/output.c (output_rule_data): Don't output NULL, it might
1152 not be defined yet.
1153
4162fa07 11542002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 1155
4162fa07
RA
1156 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1157 (Copyright notice): Update.
b418ecd8 1158
bd16a5dc
AD
11592002-02-11 Akim Demaille <akim@epita.fr>
1160
1161 * tests/regression.at (%nonassoc and eof): Don't include
1162 nonportable headers.
1163
8d69a1a3
RA
11642002-02-08 Robert Anisko <robert@lrde.epita.fr>
1165
1166 * data/bison.c++: Correct error recovery. Make the user able to
1167 initialize the starting location.
1168
9b2d0677
AD
11692002-02-07 Akim Demaille <akim@epita.fr>
1170
1171 * tests/input.at: New.
1172
69e2658b
RA
11732002-02-07 Robert Anisko <robert@lrde.epita.fr>
1174
1175 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 1176 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
1177 directives around tables only needed for debugging.
1178
4aacc3a7
RA
11792002-02-07 Robert Anisko <robert@lrde.epita.fr>
1180
1181 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1182 C++ parsers.
1183 (yy::b4_name::parse): Use print_.
1184
762a801e
RA
11852002-02-07 Robert Anisko <robert@lrde.epita.fr>
1186
1187 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1188
4bb2bc3f
RA
11892002-02-07 Robert Anisko <robert@lrde.epita.fr>
1190
1191 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1192 C++ parsers.
1193 (yy::b4_name::parse): Build verbose error messages, and use error_.
1194
6b45a3ca
RA
11952002-02-06 Robert Anisko <robert@lrde.epita.fr>
1196
1197 * data/bison.c++: Fix m4 quoting in comments.
1198
50997c6e
RA
11992002-02-06 Robert Anisko <robert@lrde.epita.fr>
1200
1201 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1202 not expanded by m4.
1203
3f3eed27
AD
12042002-02-05 Akim Demaille <akim@epita.fr>
1205
1206 * data/bison.c++: Adjust to the M4 back end.
1207 More is certainly needed.
1208
be2a1a68
AD
12092002-02-05 Akim Demaille <akim@epita.fr>
1210
1211 Give a try to M4 as a back end.
1212
1213 * lib/readpipe.c: New, from wdiff.
1214 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1215 BISON_HAIRY.
1216 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1217 specific values. Now it is m4 that performs the lookup.
1218 * src/parse-skel.y: Remove.
1219 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1220 * src/output.c (actions_output, guards_output)
1221 (token_definitions_output): No longer keeps track of the output
1222 line number, hence remove the second argument.
1223 (guards_output): Check against the guard member of a rule, not the
1224 action member.
1225 Adjust callers.
1226 (output_skeleton): Don't look for the skeleton location, let m4 do
1227 that.
1228 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1229 file will be used.
1230 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1231 (prepare): Given that for the time being changesyntax is not
1232 usable in M4, rename the muscles using `-' to `_'.
1233 Define `defines_flag', `output_parser_name' and `output_header_name'.
1234 * src/output.h (actions_output, guards_output)
1235 (token_definitions_output): Adjust prototypes.
1236 * src/scan-skel.l: Instead of scanning the skeletons, it now
1237 processes the output of m4: `__oline__' and `#output'.
1238 * data/bison.simple: Adjust to be used by M4(sugar).
1239 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1240 to date.
1241 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1242 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1243 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1244 shamelessly stolen from CVS Autoconf.
1245
beda758b
AD
12462002-02-05 Akim Demaille <akim@epita.fr>
1247
1248 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1249 * configure.in: Check for the declarations of free and malloc.
1250 * src/muscle_tab.c: Adjust.
1251
5ece6d43
AD
12522002-02-05 Akim Demaille <akim@epita.fr>
1253
1254 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1255 which have no values.
1256
5bb18f9a
AD
12572002-02-05 Akim Demaille <akim@epita.fr>
1258
1259 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1260 * data/: here.
1261
894dd62e
PE
12622002-01-29 Paul Eggert <eggert@twinsun.com>
1263
1264 * src/bison.simple (YYSIZE_T): Do not define merely because
1265 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1266 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1267
82841af7
AD
12682002-01-27 Akim Demaille <akim@epita.fr>
1269
1270 Fix `%nonassoc and eof'.
1271
1272 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1273 which were not properly copied! Replace
1274 memcpy (res->errs, src->errs, src->nerrs);
1275 with
1276 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1277 !!!
1278 * tests/regression.at (%nonassoc and eof): Adjust to newest
1279 Autotest: `.' is not in the PATH.
1280
318b76e9
AD
12812002-01-27 Akim Demaille <akim@epita.fr>
1282
1283 * tests/sets.at (AT_EXTRACT_SETS): New.
1284 (Nullable): Use it.
1285 (Firsts): New.
1286
30d2f3d5
AD
12872002-01-26 Akim Demaille <akim@epita.fr>
1288
1289 * tests/actions.at, tests/calc.at, tests/headers.at,
1290 * tests/torture.at: Adjust to the newest Autotest which no longer
1291 forces `.' in the PATH.
1292
30f8c395
AD
12932002-01-25 Akim Demaille <akim@epita.fr>
1294
1295 * tests/regression.at (%nonassoc and eof): New.
1296 Suggested by Robert Anisko.
1297
29ae55f1
AD
12982002-01-24 Akim Demaille <akim@epita.fr>
1299
1300 Bison dumps core when trying to complain about broken input files.
1301 Reported by Cris van Pelt.
1302
1303 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1304 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1305 into...
1306 (Invalid inputs): Strengthen: exercise parse_percent_token.
1307
2b548aa6
RA
13082002-01-24 Robert Anisko <robert.anisko@epita.fr>
1309
1310 * src/Makefile.am: Add bison.c++.
1311 * src/bison.c++: New skeleton.
1312
bb0146c2
AD
13132002-01-21 Paolo Bonzini <bonzini@gnu.org>
1314
1315 * po/it.po: New.
1316
bec30531
AD
13172002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1318
1319 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1320
fc6edc45
MA
13212002-01-20 Marc Autret <marc@gnu.org>
1322
1323 * src/files.c (compute_output_file_names): Fix
1324
5e5d5415
MA
13252002-01-20 Marc Autret <marc@gnu.org>
1326
1327 * tests/output.at: New test.
1328 * src/files.c (compute_base_names): Don't map extensions when
1329 the YACC flag is set, use defaults.
1330 Reported by Evgeny Stambulchik.
1331
44ea3fbd
MA
13322002-01-20 Marc Autret <marc@gnu.org>
1333
bb0146c2 1334 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1335 compilers as well (i.e. the vendor C compiler).
1336 Suggested by Albert Chin-A-Young.
1337
338963d1
TVH
13382002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1339
1340 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1341 canonical definition.
1342 * src/system.h: Use the canonical definition for PARAMS (avoids
1343 a conflict with the macro from lib/hash.h).
1344
c57b2479
AD
13452002-01-11 Akim Demaille <akim@epita.fr>
1346
1347 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1348 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1349
b85810ae
AD
13502002-01-09 Akim Demaille <akim@epita.fr>
1351
1352 * src/files.c, src/files.h (output_infix): New.
1353 (tab_extension): Remove.
1354 (compute_base_names): Compute the former, drop the latter.
1355 * src/output.c (prepare): Insert the muscles `output-infix', and
1356 `output-suffix'.
1357 * src/parse-skel.y (string, string.1): New.
1358 (section.header): Use it.
1359 (section.yacc): Remove.
1360 (prefix): Remove too.
1361 * src/scan-skel.l: Adjust.
1362 * src/bison.simple, src/bison.hairy: Adjust.
1363
cae60122
AD
13642002-01-09 Akim Demaille <akim@epita.fr>
1365
1366 * configure.in (WERROR_CFLAGS): Compute it.
1367 * src/Makefile.am (CFLAGS): Pass it.
1368 * tests/atlocal.in (CFLAGS): Idem.
1369 * src/files.c: Fix a few warnings.
1370 (get_extension_index): Remove, unused.
1371
ae404801
AD
13722002-01-08 Akim Demaille <akim@epita.fr>
1373
1374 * src/getargs.c (AS_FILE_NAME): New.
1375 (getargs): Use it to convert DOSish file names.
1376 * src/files.c (base_name): Rename as full_base_name to avoid
1377 clashes with `base_name ()'.
1378 (filename_split): New.
1379 (compute_base_names): N-th rewrite, using filename_split.
1380
22312b71
AD
13812002-01-08 Akim Demaille <akim@epita.fr>
1382
1383 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1384 New, stolen from the Fileutils 4.1.
1385 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1386 * configure.in: Check for the presence of memrchr, and of its
1387 prototype.
1388
a67cef01
TVH
13892002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1390
1391 * lib/hash.h (__P): Added definition for this macro.
1392 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1393 BUILT_SOURCES, to ensure they are generated first.
1394 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1395 %error-verbose to allow bootstrapping with bison 1.30x.
1396
2b25d624
AD
13972002-01-06 Akim Demaille <akim@epita.fr>
1398
1399 * src/reader.c (parse_braces): Don't fetch the next char, the
1400 convention is to fetch on entry.
1401 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1402 'switch' without a following semicolon.
1403 * tests/regression.at (braces parsing): New.
1404
3460813b
AD
14052002-01-06 Akim Demaille <akim@epita.fr>
1406
1407 Bison is dead wrong in its RR conflict reports.
1408
1409 * tests/torture.at (GNU Cim Grammar): New.
1410 * src/conflicts.c (count_rr_conflicts): Fix.
1411
73784c64
AD
14122002-01-06 Akim Demaille <akim@epita.fr>
1413
1414 Creating package.m4 from configure.ac causes too many problems.
1415
1416 * tests/Makefile.am (package.m4): Create it by hand,
1417 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1418
25d81090
AD
14192002-01-06 Akim Demaille <akim@epita.fr>
1420
1421 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1422 skeleton.h.
1423
a9b8959e
PE
14242002-01-04 Paul Eggert <eggert@twinsun.com>
1425
1426 * doc/bison.texinfo (Debugging):
1427 Remove YYSTDERR; it's no longer defined or used.
1428 Also, s/cstdio.h/cstdio/.
1429
25d81090
AD
14302002-01-03 Akim Demaille <akim@epita.fr>
1431
1432 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1433
1109455c
AD
14342002-01-03 Akim Demaille <akim@epita.fr>
1435
1436 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1437 tracing code to --trace, wait for a better --trace option, with
1438 args.
1439
7ea5e977
AD
14402002-01-03 Akim Demaille <akim@epita.fr>
1441
1442 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1443 The ISO C++ standard is extremely clear about it: stderr is
1444 considered a macro, not a regular symbol (see table 94 `Header
1445 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1446 Therefore std:: does not apply to it. It still does with fprintf.
1447 Also, s/cstdio.h/cstdio/.
1448
fab5b110
AD
14492002-01-03 Akim Demaille <akim@epita.fr>
1450
1451 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1452 for non system headers.
1453
aed7fd9b
AD
14542002-01-02 Akim Demaille <akim@epita.fr>
1455
1456 Equip the skeleton chain with location tracking, runtime trace,
1457 pure parser and scanner.
1458
1459 * src/parse-skel.y: Request a pure parser, locations, and prefix
1460 renaming.
1461 (%union): Having several members with the same type does not help
1462 type mismatches, simplify.
1463 (YYPRINT, yyprint): New.
1464 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1465 (skel_error): this.
1466 Handle locations.
1467 * src/scan-skel.l: Adjust to these changes.
1468 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1469 (LOCATION_PRINT, skel_control_t): New.
1470
24fad99e
AD
14712001-12-30 Akim Demaille <akim@epita.fr>
1472
1473 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1474 replace `gb' with BLANKS.
1475 * src/scan-skel.l: Adjust.
1476
a4b36db4
AD
14772001-12-30 Akim Demaille <akim@epita.fr>
1478
1479 * src/system.h: We don't need nor want bcopy.
1480 Throw away MS-DOS crap: we don't need getpid.
1481 * configure.in: We don't need strndup. It was even causing
1482 problems: because Flex includes the headers *before* us,
1483 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1484 not visible.
1485 * lib/xstrndup.c: New.
1486 * src/scan-skel.l: Use it.
1487 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1488 * src/parse-skel.y: Use %directives instead of #defines.
1489
1239777d
AD
14902001-12-30 Akim Demaille <akim@epita.fr>
1491
1492 * src/skeleton.h: New.
1493 * src/output.c (output_parser, output_master_parser): Remove, dead
1494 code.
1495 * src/output.h (get_lines_number, actions_output, guards_output)
1496 (token_definitions_output): Prototype them.
1497 * src/parse-skel.y: Add the license notice.
1498 Include output.h and skeleton.h.
1499 (process_skeleton): Returns void, and takes a single parameter.
1500 * src/scan-skel.l: Add the license notice.
1501 Include skeleton.h.
1502 Don't use %option yylineno: it seems that then Flex imagines
1503 REJECT has been used, and therefore it won't reallocate its
1504 buffers (which makes no other sense to me than a bug). It results
1505 in warnings for `unused: yy_flex_realloc'.
1506
9b3add5b
RA
15072001-12-30 Robert Anisko <robert.anisko@epita.fr>
1508
1509 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1510 (MUSCLE_INSERT_PREFIX): ...to there.
1511 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1512 (MUSCLE_INSERT_PREFIX): Move from here...
1513
1514 * src/bison.hairy: Add a section directive. Put braces around muscle
1515 names. This parser skeleton is still broken, but Bison should not
1516 choke on a bad muscle 'syntax'.
1517 * src/bison.simple: Add a section directive. Put braces around muscle
1518 names.
1519
1520 * src/files.h (strsuffix, stringappend): Add declarations.
1521 (tab_extension): Add declaration.
1522 (short_base_name): Add declaration.
1523
1524 * src/files.c (strsuffix, stringappend): No longer static. These
1525 functions are used in the skeleton parser.
1526 (tab_extension): New.
1527 (compute_base_names): Use the computations done in this function
fab5b110 1528 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1529 names.
1530 (short_base_name): No longer static.
1531
1532 * src/output.c (output_skeleton): New.
1533 (output): Disable call to output_master_parser, and give a try to
1534 a new skeleton handling system.
1535 (guards_output, actions_output): No longer static.
1536 (token_definitions_output, get_lines_number): No longer static.
1537
1538 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1539
fab5b110 1540 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1541 parse-skel.y.
1542
1543 * src/parse-skel.y: New file.
1544 * src/scan-skel.l: New file.
1545
b5b61c61
AD
15462001-12-29 Akim Demaille <akim@epita.fr>
1547
1548 %name-prefix is broken.
1549
1550 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1551 Adjust all dependencies.
1552 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1553 %name-prefix.
1554
1555 Renaming yylval but not yylloc is not consistent. Now we do.
1556
1557 * src/bison.simple: Prefix yylloc if used.
1558 * doc/bison.texinfo (Decl Summary): Document that.
1559
8c9a50be
AD
15602001-12-29 Akim Demaille <akim@epita.fr>
1561
1562 * doc/bison.texinfo: Promote `%long-directive' over
1563 `%long_directive'.
1564 Remove all references to fixed-output-files, yacc is enough.
1565
d99361e6
AD
15662001-12-29 Akim Demaille <akim@epita.fr>
1567
1568 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1569 user prologue. These are defaults.
1570 * tests/actions.at (Mid-rule actions): Make sure the user can
1571 define YYDEBUG and YYERROR_VERBOSE.
1572
b9cecb91
AD
15732001-12-29 Akim Demaille <akim@epita.fr>
1574
1575 * src/output.c (header_output): Don't forget to export YYLTYPE and
1576 yylloc.
1577 * tests/headers.at (export YYLTYPE): New, make sure it does.
1578 * tests/regression.at (%union and --defines, Invalid CPP headers):
1579 Move to...
1580 * tests/headers.at: here.
1581
aea13e97
AD
15822001-12-29 Akim Demaille <akim@epita.fr>
1583
1584 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1585
931394cb
AD
15862001-12-29 Akim Demaille <akim@epita.fr>
1587
1588 * tests/actions.at (Mid-rule actions): Output on a single line
1589 instead of several.
1590
704a47c4
AD
15912001-12-29 Akim Demaille <akim@epita.fr>
1592
1593 * doc/bison.texinfo: Formatting changes.
1594
091e20bb
AD
15952001-12-29 Akim Demaille <akim@epita.fr>
1596
1597 Don't store the token defs in a muscle, just be ready to output it
1598 on command. Now possible via `symbols'. Fixes a memory leak.
1599
1600 * src/output.c (token_definitions_output): New.
1601 (output_parser, header_output): Use it.
1602 * src/reader.c (symbols_save): Remove.
1603
cce71710
AD
16042001-12-29 Akim Demaille <akim@epita.fr>
1605
1606 * src/bison.simple: Do not provide a default for YYSTYPE and
1607 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1608 default.
1609
82c035a8
AD
16102001-12-29 Akim Demaille <akim@epita.fr>
1611
1612 Mid-rule actions are simply... ignored!
1613
1614 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1615 the empty-rule associated to the dummy symbol, not to the host
1616 rule.
1617 * tests/actions.at (Mid-rule actions): New.
1618
8419d367
AD
16192001-12-29 Akim Demaille <akim@epita.fr>
1620
1621 Memory leak.
1622
1623 * src/reader.c (reader): Free grammar.
1624
375d5806
AD
16252001-12-29 Akim Demaille <akim@epita.fr>
1626
1627 Memory leak.
1628
1629 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1630 since it allocates it for each state, although only one is needed.
1631 (allocate_storage): Do it here.
1632
f51cb8ff
AD
16332001-12-29 Akim Demaille <akim@epita.fr>
1634
1635 * src/options.h, src/options.c (create_long_option_table): Rename
1636 as...
1637 (long_option_table_new): this, with a clearer prototype.
1638 (percent_table): Remove, unused,
1639 * src/getargs.c (getargs): Adjust.
1640
29e88316
AD
16412001-12-29 Akim Demaille <akim@epita.fr>
1642
1643 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1644 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1645 as states.
1646
b9f71f19
AD
16472001-12-29 Akim Demaille <akim@epita.fr>
1648
1649 * src/lalr.c (build_relations): Rename `states' as `states1'.
1650 Sorry, I don't understand exactly what it is, no better name...
1651
1a2b5d37
AD
16522001-12-29 Akim Demaille <akim@epita.fr>
1653
1654 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1655 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1656 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1657 as rules.
1658
1cca533e
AD
16592001-12-29 Akim Demaille <akim@epita.fr>
1660
1661 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1662 ago.
1663
c03ae966
AD
16642001-12-29 Akim Demaille <akim@epita.fr>
1665
1666 * src/reader.c, src/reader.h (user_toknums): Remove.
1667 Adjust all users to use symbols[i]->user_token_number.
1668
5a670b1e
AD
16692001-12-29 Akim Demaille <akim@epita.fr>
1670
1671 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1672 Adjust all users to use symbols[i]->prec or ->assoc.
1673
ad949da9
AD
16742001-12-29 Akim Demaille <akim@epita.fr>
1675
1676 * src/reader.c, src/reader.h (tags): Remove.
1677 Adjust all users to use symbols[i]->tag.
1678
0e78e603
AD
16792001-12-29 Akim Demaille <akim@epita.fr>
1680
1681 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1682 and rule_table.
1683 * src/reader.c (packsymbols): Fill this table.
1684 Drop sprec.
1685 * src/conflicts.c (resolve_sr_conflict): Adjust.
1686 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1687 single table.
1688 Use symbols[i]->tag instead of tags[i].
1689
213e640e
AD
16902001-12-29 Akim Demaille <akim@epita.fr>
1691
1692 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1693 In addition, put a comment in there, to replace...
1694 * tests/regression.at (%union and C comments): Remove.
1695
e7b8bef1
AD
16962001-12-29 Akim Demaille <akim@epita.fr>
1697
1698 * tests/regression.at (Web2c Actions): Blindly move the actual
1699 output as expected output. The contents *seem* right to me, but I
1700 can't pretend reading perfectly parser tables... Nonetheless, all
1701 the other tests pass correctly, the table look OK, even though the
1702 presence of `$axiom' is to be noted: AFAICS it is useless (but
1703 harmless).
1704
b68e7744
AD
17052001-12-29 Akim Demaille <akim@epita.fr>
1706
1707 * src/reader.c (readgram): Don't add the rule 0 if there were no
1708 rules read. In other words, add it _after_ having performed
1709 grammar sanity checks.
1710 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1711
78d5bae9
AD
17122001-12-29 Akim Demaille <akim@epita.fr>
1713
1714 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1715 visible, and some states have now a different number.
1716
ff442794
AD
17172001-12-29 Akim Demaille <akim@epita.fr>
1718
1719 * src/reader.c (readgram): Bind the initial rule's lineno to that
1720 of the first rule.
1721 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1722 (Solved SR Conflicts): Adjust rule 0's line number.
1723
610ab194
AD
17242001-12-29 Akim Demaille <akim@epita.fr>
1725
1726 Fix the `GAWK Grammar' failure.
1727
1728 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1729 the reductions of the first state which was mistakenly confused
1730 with the final state because precisely final_state was initialized
1731 to 0.
1732 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1733 now noticed by Bison.
1734 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1735 have a reduction on $default.
1736
29d29c8f
AD
17372001-12-29 Akim Demaille <akim@epita.fr>
1738
1739 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1740 rule line numbers.
1741 * src/closure.c (print_closure): Likewise.
1742 * src/derives.c (print_derives): Likewise.
1743 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1744 now.
1745
7c6b64d0
AD
17462001-12-29 Akim Demaille <akim@epita.fr>
1747
1748 * src/lalr.c (lookaheads_print): New.
1749 (lalr): Call it when --trace-flag.
1750 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1751 are dumped.
1752
3d4daee3
AD
17532001-12-29 Akim Demaille <akim@epita.fr>
1754
1755 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1756 when walking through ritem, even via rule->rhs.
1757 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1758 (useful_production, useless_nonterminals): Likewise.
1759 (reduce_grammar_tables): Likewise, plus update nritems.
1760 * src/nullable.c (set_nullable): Likewise.
1761 * src/lalr.c (build_relations): Likewise.
1762 * tests/sets.at (Nullable): Adjust.
1763 Fortunately, now, the $axiom is no longer nullable.
1764
9e7f6bbd
AD
17652001-12-29 Akim Demaille <akim@epita.fr>
1766
1767 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1768 the 0-sentinel.
1769 * src/gram.c (ritem_longest_rhs): Likewise.
1770 * src/reduce.c (nonterminals_reduce): Likewise.
1771 * src/print_graph.c (print_graph): Likewise.
1772 * src/output.c (output_rule_data): Likewise.
1773 * src/nullable.c (set_nullable): Likewise.
1774
255ef638
AD
17752001-12-29 Akim Demaille <akim@epita.fr>
1776
1777 * src/output.c: Comment changes.
1778
0d8a7363
AD
17792001-12-27 Paul Eggert <eggert@twinsun.com>
1780
1781 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1782 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1783 Sparc, as they were causing more porting problems than the
1784 (minor) performance improvement was worth.
1785
1786 Also, catch up with 1.31's YYSTD.
1787
3db472b9
AD
17882001-12-27 Akim Demaille <akim@epita.fr>
1789
1790 * src/output.c (output_gram): Rely on nritems, not the
1791 0-sentinel. See below.
1792 Use -1 as separator, not 0.
1793 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1794 Rely on -1 as separator in yyrhs, instead of 0.
1795 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1796 twice `Now at end of input', therefore there are two lines less to
1797 expect.
1798
b365aa05
AD
17992001-12-27 Akim Demaille <akim@epita.fr>
1800
1801 * tests/regression.at (Unresolved SR Conflicts):
1802 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1803 below.
1804
30171f79
AD
18052001-12-27 Akim Demaille <akim@epita.fr>
1806
1807 * src/LR0.c (new_state): Recognize the final state by the fact it
1808 is reached by eoftoken.
1809 (insert_start_shifting_state, insert_eof_shifting_state)
1810 (insert_accepting_state, augment_automaton): Remove, since now
1811 these states are automatically computed from the initial state.
1812 (generate_states): Adjust.
1813 * src/print.c: When reporting a rule number to the user, substract
1814 1, so that the axiom rule is rule 0, and the first user rule is 1.
1815 * src/reduce.c: Likewise.
1816 * src/print_graph.c (print_core): For the time being, just as for
1817 the report, depend upon --trace-flags to dump the full set of
1818 items.
1819 * src/reader.c (readgram): Once the grammar read, insert the rule
1820 0: `$axiom: START-SYMBOL $'.
1821 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1822 number of the states has changed (the final state is no longer
1823 necessarily the last), catch up.
1824
75142d45
AD
18252001-12-27 Akim Demaille <akim@epita.fr>
1826
1827 Try to make the use of the eoftoken valid. Given that its value
1828 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1829 is used instead of > 0 where appropriate, (ii), depend upon nritems
1830 instead of the 0-sentinel.
1831
1832 * src/gram.h, src/gram.c (nritems): New.
1833 Expected to be duplication of nitems, but for the time being...
1834 * src/reader.c (packgram): Assert nritems and nitems are equal.
1835 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1836 * src/closure.c (print_closure, print_fderives): Likewise.
1837 * src/gram.c (ritem_print): Likewise.
1838 * src/print.c (print_core, print_grammar): Likewise.
1839 * src/print_graph.c: Likewise.
1840
b7c49edf
AD
18412001-12-27 Akim Demaille <akim@epita.fr>
1842
1843 * src/main.c (main): If there are complains after grammar
1844 reductions, then output the report anyway if requested, then die.
1845 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1846 * src/reader.c (eoftoken): New.
1847 (parse_token_decl): If the token being defined has value `0', it
1848 is the eoftoken.
1849 (packsymbols): No longer hack `tags' to insert `$' by hand.
1850 Be sure to preserve the value of the eoftoken.
1851 (reader): Make sure eoftoken is defined.
1852 Initialize nsyms to 0: now eoftoken is created just like the others.
1853 * src/print.c (print_grammar): Don't special case the eof token.
1854 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1855 lie anyway, albeit pleasant.
1856 * tests/calc.at: Exercise error messages with eoftoken.
1857 Change the grammar so that empty input is invalid.
1858 Adjust expectations.
1859 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1860
ec2da99f
AD
18612001-12-27 Akim Demaille <akim@epita.fr>
1862
1863 * configure.in: Check the protos of strchr ans strspn.
1864 Replace strchr if needed.
1865 * src/system.h: Provide the protos of strchr, strspn and memchr if
1866 missing.
1867 * lib/strchr.c: New.
1868 * src/reader.c (symbols_save): Use strchr.
1869
8adfa272
AD
18702001-12-27 Akim Demaille <akim@epita.fr>
1871
1872 * src/print.c, src/print_graph.c (escape): New.
1873 Use it to quote the TAGS outputs.
1874 * src/print_graph.c (print_state): Now errors are in red, and
1875 reductions in green.
1876 Prefer high to wide: output the state number on a line of its own.
1877
80dac38c
AD
18782001-12-27 Akim Demaille <akim@epita.fr>
1879
1880 * src/state.h, src/state.c (reductions_new): New.
1881 * src/LR0.c (set_state_table): Let all the states have a
1882 `reductions', even if reduced to 0.
1883 (save_reductions): Adjust.
1884 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1885 * src/print.c (print_reductions, print_actions): Adjust.
1886 * src/output.c (action_row): Adjust.
1887
2cec70b9
AD
18882001-12-27 Akim Demaille <akim@epita.fr>
1889
1890 * src/state.h, src/state.c (errs_new, errs_dup): New.
1891 * src/LR0.c (set_state_table): Let all the states have an errs,
1892 even if reduced to 0.
1893 * src/print.c (print_errs, print_reductions): Adjust.
1894 * src/output.c (output_actions, action_row): Adjust.
1895 * src/conflicts.c (resolve_sr_conflict): Adjust.
1896
13ca549a
AD
18972001-12-27 Akim Demaille <akim@epita.fr>
1898
1899 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1900
5092aba5
AD
19012001-12-27 Akim Demaille <akim@epita.fr>
1902
1903 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1904 * src/print.c: here.
1905 (lookaheadset, shiftset): New, used as additional storage by
1906 print_reductions.
1907 (print_results): Adjust.
1908 (print_shifts, print_gotos, print_errs): New, extracted from...
1909 (print_actions): here.
1910 * src/print_graph.c (print_actions): Remove dead code.
1911
11e2beca
AD
19122001-12-27 Akim Demaille <akim@epita.fr>
1913
1914 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1915 `$n' and `@n'.
1916
dac3c910
AD
19172001-12-27 Akim Demaille <akim@epita.fr>
1918
1919 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1920 (build_relations): Adjust.
1921
d0b0fefa
AD
19222001-12-27 Akim Demaille <akim@epita.fr>
1923
1924 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1925 duplication.
1926
adc8c848
AD
19272001-12-27 Akim Demaille <akim@epita.fr>
1928
1929 * src/reader.c (packgram): Catch nitems overflows.
1930
14d293ac
AD
19312001-12-27 Akim Demaille <akim@epita.fr>
1932
1933 * src/files.c, src/files.h (guard_obstack): Remove.
1934 * src/output.c (output): Adjust.
1935 * src/reader.c (parse_braces): New, factoring...
1936 (copy_action, copy_guard): these two which are renamed as...
1937 (parse_action, parse_guard): these.
1938 As a voluntary consequence, using braces around guards is now
1939 mandatory.
1940
f499b062
AD
19412001-12-27 Akim Demaille <akim@epita.fr>
1942
1943 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1944 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1945 members.
1946 (symbol_list_new): Adjust.
1947 (copy_action): action_line is the first line, not the last.
1948 (copy_guard): Just as for actions, store the `action' only, not
1949 the switch/case/break flesh.
1950 Don't parse the user action that might follow the guard, let...
1951 (readgram): do it, i.e., now, there can be an action after a
1952 guard.
1953 In other words the guard is just explicitly optional.
1954 (packgram): Adjust.
1955 * src/output.c (guards_output): New.
1956 (output_parser): Call it when needed.
1957 (output): Also free the guard and attrs obstacks.
1958 * src/files.c, src/files.h (obstack_save): Remove.
1959 (output_files): Remove.
1960 As a result, if one needs the former `.act' file, using an
1961 appropriate skeleton which requires actions and guards is now
1962 required.
1963 * src/main.c (main): Adjust.
1964 * tests/semantic.at: New.
1965 * tests/regression.at: Use `input.y' as input file name.
1966 Avoid 8+3 problems by requiring input.c when the test needs the
1967 parser.
1968
d945f5cd
AD
19692001-12-27 Akim Demaille <akim@epita.fr>
1970
1971 * src/reader.c (symbol_list_new): Be sure to initialize all the
1972 fields.
1973
d200e455
AD
19742001-12-27 Akim Demaille <akim@epita.fr>
1975
1976 All the hacks using a final pseudo state are now useless.
1977
1978 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1979 * src/lalr.c (nLA): New.
1980 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1981 instead of lookaheadsp from the pseudo state (nstate + 1).
1982
f9507c28
AD
19832001-12-27 Akim Demaille <akim@epita.fr>
1984
1985 * src/output.c (action_row, token_actions): Use a state_t instead
1986 of a integer, and nlookaheads instead of the following state's
1987 lookaheadsp.
1988
065fbd27
AD
19892001-12-27 Akim Demaille <akim@epita.fr>
1990
1991 * src/conflicts.c (log_resolution, flush_shift)
1992 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1993 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1994 (conflicts_print, print_reductions): Use a state_t instead of an
1995 integer when referring to a state.
1996 As much as possible, depend upon nlookaheads, instead of the
1997 `lookaheadsp' member of the following state (since lookaheads of
1998 successive states are successive, the difference between state n + 1
1999 and n served as the number of lookaheads for state n).
2000 * src/lalr.c (add_lookback_edge): Likewise.
2001 * src/print.c (print_core, print_actions, print_state)
2002 (print_results): Likewise.
2003 * src/print_graph.c (print_core, print_actions, print_state)
2004 (print_graph): Likewise.
2005 * src/conflicts.h: Adjust.
2006
1b177bd7
AD
20072001-12-27 Akim Demaille <akim@epita.fr>
2008
2009 * src/bison.hairy: Formatting/comment changes.
2010 ANSIfy.
2011 Remove `register' indications.
2012 Add plenty of `static'.
2013
7742ddeb
AD
20142001-12-27 Akim Demaille <akim@epita.fr>
2015
2016 * src/output.c (prepare): Drop the muscle `ntbase' which
2017 duplicates ntokens.
2018 * src/bison.simple: Formatting/comment changes.
2019 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
2020 is an undocumented synonym.
2021
1fa14068
AD
20222001-12-22 Akim Demaille <akim@epita.fr>
2023
2024 * src/output.c (output_table_data): Change the prototype to use
2025 `int' for array ranges: some invocations do pass an int, not a
2026 short.
2027 Reported by Wayne Green.
2028
b9752825
AD
20292001-12-22 Akim Demaille <akim@epita.fr>
2030
2031 Some actions of web2c.y are improperly triggered.
2032 Reported by Mike Castle.
2033
2034 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
2035 * tests/regression.at (Web2c): Rename as...
2036 (Web2c Report): this.
2037 (Web2c Actions): New.
2038
776209d6
AD
20392001-12-22 Akim Demaille <akim@epita.fr>
2040
2041 Reductions in web2c.y are improperly reported.
2042 Reported by Mike Castle.
2043
2044 * src/conflicts.c (print_reductions): Fix.
2045 * tests/regression.at (Web2c): New.
2046
275fc3ad
AD
20472001-12-18 Akim Demaille <akim@epita.fr>
2048
2049 Some host fail on `assert (!"foo")', which expands to
2050 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
2051 Reported by Nelson Beebee.
2052
2053 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
2054 `#define it_succeeded 0' and `assert (it_succeeded)'.
2055
897668ee
MA
20562001-12-17 Marc Autret <autret_m@epita.fr>
2057
2058 * src/bison.simple: Don't hard code the skeleton line and filename.
2059 * src/output.c (output_parser): Rename 'line' as 'output_line'.
2060 New line counter 'skeleton_line' (skeleton-line muscle).
2061
ab3399e0
PE
20622001-12-17 Paul Eggert <eggert@twinsun.com>
2063
2064 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2065 YYDEBUG must be defined to a nonzero value.
2066
2067 * src/bison.simple (yytname): Do not assume that the user defines
2068 YYDEBUG to a properly parenthesized expression.
2069
3877f72b
AD
20702001-12-17 Akim Demaille <akim@epita.fr>
2071
2072 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2073 nlookaheads is a new member.
2074 Adjust all users.
2075 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2076 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2077 state.
776209d6 2078
331dbc1b
AD
20792001-12-17 Akim Demaille <akim@epita.fr>
2080
2081 * src/files.h, src/files.c (open_files, close_files): Remove.
2082 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2083 let...
2084 * src/reader.c (reader): Do it.
776209d6 2085
be750e4c
AD
20862001-12-17 Akim Demaille <akim@epita.fr>
2087
2088 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 2089
709ae8c6
AD
20902001-12-17 Akim Demaille <akim@epita.fr>
2091
2092 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2093 (flush_reduce): New.
2094 (resolve_sr_conflict): Adjust.
776209d6 2095
f87685c3
AD
20962001-12-17 Akim Demaille <akim@epita.fr>
2097
2098 * src/output.c (output_obstack): Be static and rename as...
2099 (format_obstack): this, to avoid any confusion with files.c's
2100 output_obstack.
2101 * src/reader.h (muscle_obstack): Move to...
2102 * src/output.h: here, since it's defined in output.c.
2103
837491d8
AD
21042001-12-17 Akim Demaille <akim@epita.fr>
2105
2106 * src/output.c (action_row, save_column, default_goto)
2107 (sort_actions, matching_state, pack_vector): Better variable
2108 locality.
2109
796d61fb
AD
21102001-12-17 Akim Demaille <akim@epita.fr>
2111
2112 * src/output.c: Various formatting changes.
776209d6 2113
64d15509
AD
21142001-12-17 Akim Demaille <akim@epita.fr>
2115
2116 * src/files.c (output_files): Free the output_obstack.
2117 * src/main.c (main): Call print and print_graph conditionally.
2118 * src/print.c (print): Work unconditionally.
2119 * src/print_graph.c (print_graph): Work unconditionally.
2120 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2121
fbc8ecb7
MA
21222001-12-16 Marc Autret <autret_m@epita.fr>
2123
2124 * src/output.c (actions_output): Fix. When we use %no-lines,
2125 there is one less line per action.
2126
f0440388
MA
21272001-12-16 Marc Autret <autret_m@epita.fr>
2128
2129 * src/bison.simple: Remove a useless #line directive.
2130 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2131 * src/output.c (get_lines_number): New.
776209d6 2132 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
2133 output muscles.
2134 Fix line numbering.
2135 (actions_output): Computes the number of lines taken by actions.
2136 (output_master_parser): Insert new skeleton which is the name of
2137 the output parser file name.
2138
a79986b8
MA
21392001-12-15 Marc Autret <autret_m@epita.fr>
2140
2141 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2142
4ec8e00f
MA
21432001-12-15 Marc Autret <autret_m@epita.fr>
2144
2145 * src/output.c (output_gram): Keep track of the hairy one.
2146
1a4648ff
AD
21472001-12-15 Akim Demaille <akim@epita.fr>
2148
2149 Make `make distcheck' work.
2150
2151 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2152 system.h which uses libgettext.h.
2153
9c2c67e6
AD
21542001-12-15 Akim Demaille <akim@epita.fr>
2155
2156 * src/nullable.c (set_nullable): Useless rules must be skipped,
2157 otherwise, since we range over their symbols, we might look at a
2158 nonterminal which no longer ``exists'', i.e., it is not counted in
2159 `nvars', hence we overflow our arrays.
2160
93ede233
AD
21612001-12-15 Akim Demaille <akim@epita.fr>
2162
2163 The header can also be produced directly, without any obstack!
2164 Yahoo!
2165
2166 * src/files.c, src/files.h (defines_obstack): Remove.
2167 (compute_header_macro): Global.
2168 (defines_obstack_save): Remove.
2169 * src/reader.c (parse_union_decl): No longer output to
2170 defines_obstack: its content can be found in the `stype' muscle
2171 anyway.
2172 (output_token_translations): Merge into...
2173 (symbols_output): this.
2174 Rename as...
2175 (symbols_save): this.
2176 (reader): Adjust.
2177 * src/output.c (header_output): New.
2178 (output): Call it.
2179
2666f928
AD
21802001-12-15 Akim Demaille <akim@epita.fr>
2181
2182 * src/reader.c (parse_union_decl): Instead of handling two obstack
2183 simultaneously, use one to define the `stype' muscle, and use the
2184 value of the latter to fill defines_obstack.
2185 (copy_comment): Remove.
2186 (copy_comment2): Work for a single obstack.
2187 Rename as...
2188 (copy_comment): this.
2189
428046f8
AD
21902001-12-15 Akim Demaille <akim@epita.fr>
2191
2192 * src/lex.c, src/lex.h (xgetc): No longer static.
2193 * src/reader.c (parse_union_decl): Revamp.
2194
ea52d706
AD
21952001-12-15 Akim Demaille <akim@epita.fr>
2196
2197 Still making progress in separating Bison into (i) input, (ii)
2198 process, (iii) output: now we can directly output the parser file
2199 without using table_obstack at all.
2200
2201 * src/files.c, src/files.h (table_obstack): Bye bye.
2202 (parser_file_name): New.
2203 * src/files.c (compute_output_file_names): Compute it.
2204 * src/output.c (actions_output, output_parser)
2205 (output_master_parser): To a file instead of an obstack.
2206
3f96f4dc
AD
22072001-12-15 Akim Demaille <akim@epita.fr>
2208
2209 Attach actions to rules, instead of pre-outputting them to
2210 actions_obstack.
2211
2212 * src/gram.h (rule_t): action and action_line are new members.
2213 * src/reader.c (symbol_list): Likewise.
2214 (copy_action): Save the actions within the rule.
2215 (packgram): Save them in rule_table.
2216 * src/output.c (actions_output): New.
2217 (output_parser): Use it on `%%actions'.
2218 (output_rule_data): Don't free rule_table.
2219 (output): Do it.
2220 (prepare): Don't save the `action' muscle.
2221 * src/bison.simple: s/%%action/%%actions/.
2222
51576fb3
AD
22232001-12-15 Akim Demaille <akim@epita.fr>
2224
2225 * src/reader.c (copy_action): When --yacc, don't append a `;'
2226 to the user action: let it fail if lacking.
dee049eb 2227 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2228
2648a72d
AD
22292001-12-14 Akim Demaille <akim@epita.fr>
2230
2231 * src/lex.c (literalchar): Simply return the char you decoded, non
2232 longer mess around with obstacks and int pointers.
2233 Adjust all callers.
2234
92790e5b
AD
22352001-12-14 Akim Demaille <akim@epita.fr>
2236
2237 * src/lex.c (literalchar): Don't escape the special characters,
2238 just decode them, and keep them as char (before, eol was output as
2239 the 2 char string `\n' etc.).
2240 * src/output.c (output_rule_data): Use quotearg to output the
2241 token strings.
2242
927c1557
PE
22432001-12-13 Paul Eggert <eggert@twinsun.com>
2244
2245 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2246 Do not infringe on the global user namespace when using C++.
2247 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2248 All uses of `fprintf' and `stderr' changed.
2249
2250 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2251
ed8e1f68
AD
22522001-12-13 Akim Demaille <akim@epita.fr>
2253
2254 The computation of nullable is broken: it doesn't handle empty
2255 RHS's properly.
2256
2257 * tests/torture.at (GNU AWK Grammar): New.
2258 * tests/sets.at (Nullable): New.
2259 * src/nullable.c (set_nullable): Instead of blindly looping over
2260 `ritems', loop over the rules, and then over their rhs's.
2261
2262 Work around Autotest bugs.
2263
2264 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2265 frame, because Autotest understand lines starting with a `+' as
2266 traces from the shell. Then, they are not processed properly.
2267 Admittedly an Autotest bug, but we don't have time to wait for
2268 Autotest to catch up.
2269 * tests/regression.at (Broken Closure): Adjust to the new table
2270 frames.
2271 Move to...
2272 * tests/sets.at: here.
2273
cb581495
AD
22742001-12-13 Akim Demaille <akim@epita.fr>
2275
2276 * src/closure.c (closure): Use nrules instead of playing tricks
2277 with BITS_PER_WORD.
2278
2e729273
AD
22792001-12-13 Akim Demaille <akim@epita.fr>
2280
2281 * src/print.c (print_actions): Output the handling of `$' as the
2282 traces do: shifting the token EOF. Before EOF was treated as a
2283 nonterminal.
2284 * tests/regression.at: Adjust some tests.
2285 * src/print_graph.c (print_core): Complete the set of items via
2286 closure. The next-to-final and final states are still unsatisfying,
2287 but that's to be addressed elsewhere.
2288 No longer output the rule numbers, but do output the state number.
2289 A single loop for the shifts + gotos is enough, but picked a
2290 distinct color for each.
2291 (print_graph): Initialize and finalize closure.
2292
107f7dfb
AD
22932001-12-13 Akim Demaille <akim@epita.fr>
2294
2295 * src/reader.c (readgram): Remove dead code, an strip useless
2296 braces.
2297 (get_type): Remove, unused.
2298
9b53a24f
AD
22992001-12-12 Akim Demaille <akim@epita.fr>
2300
2301 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2302 on that of lib/error.c.
2303
dbfb6dcd
AD
23042001-12-12 Akim Demaille <akim@epita.fr>
2305
2306 Some hosts don't like `/' in includes.
2307
2308 * src/system.h: Include libgettext.h without qualifying the path.
2309 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2310 $(top_srcdir).
2311
c25fb648
MA
23122001-12-11 Marc Autret <autret_m@epita.fr>
2313
2314 * src/output.c (output_parser): Remove useless muscle.
2315
710ddc4f
MA
23162001-12-11 Marc Autret <autret_m@epita.fr>
2317
2318 * src/bison.simple: Remove #line just before %%epilogue. It
2319 is now handled in ...
2320 * src/reader.c (read_additionnal_code): Add the output of a
2321 #line for the epilogue.
2322
e83d80b8
MA
23232001-12-10 Marc Autret <autret_m@epita.fr>
2324
927c1557 2325 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2326 replace precedent remove.
2327 * src/bison.simple: Remove #line before %%prologue because
2328 %%input-line is wrong at this time.
2329
971d5158
MA
23302001-12-10 Marc Autret <autret_m@epita.fr>
2331
2332 * src/reader.c (symbols_output): Clean up.
927c1557 2333 * src/output.c (output_gram, output): Clean up.
971d5158 2334
5edafffd
AD
23352001-12-10 Akim Demaille <akim@epita.fr>
2336
2337 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2338 * src/LR0.c (set_state_table): here.
2339 * src/lalr.c (lalr): Call it.
2340
0279f8e9
AD
23412001-12-10 Akim Demaille <akim@epita.fr>
2342
2343 * src/state.h (shifts): Remove the `number' member: shifts are
2344 attached to state, hence no longer need to be labelled with a
2345 state number.
2346
190c4f5f
AD
23472001-12-10 Akim Demaille <akim@epita.fr>
2348
2349 Now that states have a complete set of members, the linked list of
2350 shifts is useless: just fill directly the state's shifts member.
2351
2352 * src/state.h (shifts): Remove the `next' member.
2353 * src/LR0.c (first_state, last_state): Remove.
2354 Adjust the callers.
2355 (augment_automaton): Don't look for the shifts that must be added
2356 a shift on EOF: it is those of the state we looked for! But now,
2357 since shifts are attached, it is no longer needed to looking
2358 merely by its id: its number.
2359
2a73b93d
AD
23602001-12-10 Akim Demaille <akim@epita.fr>
2361
2362 * src/LR0.c (augment_automaton): Better variable locality.
2363 Remove an impossible branch: if there is a state corresponding to
2364 the start symbol being shifted, then there is shift for the start
2365 symbol from the initial state.
2366
74392f6a
AD
23672001-12-10 Akim Demaille <akim@epita.fr>
2368
2369 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2370 only when appropriate: when insert_start_shifting_state' is not
2371 invoked.
2372 * tests/regression.at (Rule Line Numbers): Adjust.
2373
37c82725
AD
23742001-12-10 Akim Demaille <akim@epita.fr>
2375
2376 * src/LR0.c (augment_automaton): Now that all states have shifts,
2377 merge the two cases addition shifts to the initial state.
2378
6a164e0c
AD
23792001-12-10 Akim Demaille <akim@epita.fr>
2380
2381 * src/lalr.c (set_state_table): Move to...
2382 * src/LR0.c: here.
2383 * src/lalr.c (lalr): Don't call it...
2384 * src/LR0.c (generate_states): do it.
2385 * src/LR0.h (first_state): Remove, only the table is used.
2386
7215de24
AD
23872001-12-10 Akim Demaille <akim@epita.fr>
2388
2389 * src/LR0.h (first_shift, first_reduction): Remove.
2390 * src/lalr.c: Don't use first_shift: find shifts through the
2391 states.
2392
80e25d4d
AD
23932001-12-10 Akim Demaille <akim@epita.fr>
2394
2395 * src/LR0.c: Attach shifts to states as soon as they are
2396 computed.
2397 * src/lalr.c (set_state_table): Instead of assigning shifts to
2398 state, just assert that the mapping was properly done.
2399
0ab3728b
AD
24002001-12-10 Akim Demaille <akim@epita.fr>
2401
2402 * src/LR0.c (insert_start_shift): Rename as...
2403 (insert_start_shifting_state): this.
2404 (insert_eof_shifting_state, insert_accepting_state): New.
2405 (augment_automaton): Adjust.
2406 Better locality of the variables.
2407 When looking if the start_symbol is shifted from the initial
2408 state, using `while (... symbol != start_symbol ...)' sounds
2409 better than `while (... symbol < start_symbol ...)': If fail
2410 to see how the order between symbols could be relevant!
2411
78af9bbc
AD
24122001-12-10 Akim Demaille <akim@epita.fr>
2413
2414 * src/getargs.h: Don't declare `spec_name_prefix' and
2415 `spec_file_prefix', declared by src/files.h.
2416 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2417 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2418 * src/output.c (prepare): Adjust.
2419 * src/reader.c (symbols_output): Likewise.
2420 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2421
bdef2a41
AD
24222001-12-10 Akim Demaille <akim@epita.fr>
2423
2424 * src/muscle_tab.c (muscle_init): NULL is a better default than
2425 `"0"'.
2426
3735969c
AD
24272001-12-10 Akim Demaille <akim@epita.fr>
2428
2429 * src/reader.c (reader): Calling symbols_output once is enough.
2430
49701457
AD
24312001-12-10 Akim Demaille <akim@epita.fr>
2432
2433 Now that states have a complete set of members, the linked list of
2434 reductions is useless: just fill directly the state's reductions
2435 member.
2436
2437 * src/state.h (struct reductions): Remove member `number' and
2438 `next'.
2439 * src/LR0.c (first_reduction, last_reduction): Remove.
2440 (save_reductions): Don't link the new reductions, store them in
2441 this_state.
2442 * src/lalr.c (set_state_table): No need to attach reductions to
2443 states, it's already done.
2444 * src/output.c (output_actions): No longer free the shifts, then
2445 the reductions, then the states: free all the states and their
2446 members.
2447
0edad749
AD
24482001-12-10 Akim Demaille <akim@epita.fr>
2449
2450 * src/options.c (OPTN, DRTV, BOTH): New.
2451 (option_table): Use them.
2452
0edad749
AD
2453 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2454 the job of system.h.
2455 * src/options.c: Don't include stdio.h and xalloc.h for the same
2456 reasons.
2457
5449dd0f
AD
24582001-12-10 Akim Demaille <akim@epita.fr>
2459
2460 * src/output.c (output, prepare): Make sure the values of the
2461 muscles `action' and `prologue' are 0-terminated.
2462
a870c567
AD
24632001-12-10 Akim Demaille <akim@epita.fr>
2464
2465 Clean up GCC warnings.
2466
2467 * src/reader.c (copy_action): `buf' is not used.
2468 (parse_skel_decl): Be static.
2469 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2470 * src/options.h (create_long_option_table): Have a real prototype.
2471 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2472 (hash_delete_at): Return const void *.
2473 Adjust casts to preserve the const.
2474
80df8768
AD
24752001-12-10 Akim Demaille <akim@epita.fr>
2476
2477 * configure.in: Require 2.52g.
2478 M4 is not needed, but AUTOM4TE is.
2479 * m4/m4.m4: Remove.
2480 * tests/Makefile.am: Adjust.
2481
f693ad14
AD
24822001-12-10 Akim Demaille <akim@epita.fr>
2483
2484 One structure for states is enough, even though theoretically
2485 there are LR(0) states and LALR(1) states.
2486
2487 * src/lalr.h (state_t): Remove.
2488 (state_table): Be state_t **, not state_t *.
2489 * src/state.h (core, CORE_ALLOC): Rename as...
2490 (state_t, STATE_ALLOC): this.
2491 Add the LALR(1) members: shifts, reductions, errs.
2492 * src/LR0.c (state_table): Rename as...
2493 (state_hash): this, to avoid name clashes with the global
2494 `state_table'.
2495 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2496 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2497
74ffbcb6
AD
24982001-12-10 Akim Demaille <akim@epita.fr>
2499
2500 Bison dumps core on bash.y.
2501 Reported by Pascal Bart.
2502
2503 * src/warshall.c (bitmatrix_print): New.
2504 (TC): Use it.
2505 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2506 j must be the outer loop.
2507 * tests/regression.at (Broken Closure): New.
2508
07708e19
AD
25092001-12-05 Akim Demaille <akim@epita.fr>
2510
2511 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2512 its argument.
2513