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