]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/reader.c (grammar_end, grammar_symbol_append): New.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-06-11 Akim Demaille <akim@epita.fr>
2
3 * src/reader.c (grammar_end, grammar_symbol_append): New.
4 (readgram): Use them.
5 Make the use of `p' as local as possible.
6
72002-06-10 Akim Demaille <akim@epita.fr>
8
9 GCJ's parser requires the tokens to be defined before the prologue.
10
11 * data/bison.simple: Output the token definition before the user's
12 prologue.
13 * tests/regression.at (Braces parsing, Duplicate string)
14 (Mixing %token styles): Check the output from bison.
15 (Early token definitions): New.
16
172002-06-10 Akim Demaille <akim@epita.fr>
18
19 * src/symtab.c (symbol_user_token_number_set): Don't complain when
20 assigning twice the same user number to a token, so that we can
21 use it in...
22 * src/lex.c (lex): here.
23 Also use `symbol_class_set' instead of hand written code.
24 * src/reader.c (parse_assoc_decl): Likewise.
25
262002-06-10 Akim Demaille <akim@epita.fr>
27
28 * src/symtab.c, src/symtab.c (symbol_class_set)
29 (symbol_user_token_number_set): New.
30 * src/reader.c (parse_token_decl): Use them.
31 Use a switch instead of ifs.
32 Use a single argument.
33
342002-06-10 Akim Demaille <akim@epita.fr>
35
36 Remove `%thong' support as it is undocumented, unused, duplicates
37 `%token's job, and creates useless e-mail traffic with people who
38 want to know what it is, why it is undocumented, unused, and
39 duplicates `%token's job.
40
41 * src/reader.c (parse_thong_decl): Remove.
42 * src/options.c (option_table): Remove "thong".
43 * src/lex.h (tok_thong): Remove.
44
452002-06-10 Akim Demaille <akim@epita.fr>
46
47 * src/symtab.c, src/symtab.c (symbol_type_set)
48 (symbol_precedence_set): New.
49 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
50 (value_components_used): Remove, unused.
51
522002-06-09 Akim Demaille <akim@epita.fr>
53
54 Move symbols handling code out of the reader.
55
56 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
57 (axiom): Move to...
58 * src/symtab.h, src/symtab.c: here.
59
60 * src/gram.c (start_symbol): Remove: use startsymbol->number.
61 * src/reader.c (startval): Rename as...
62 * src/symtab.h, src/symtab.c (startsymbol): this.
63 * src/reader.c: Adjust.
64
65 * src/reader.c (symbol_check_defined, symbol_make_alias)
66 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
67 (token_translations_init)
68 Move to...
69 * src/symtab.c: here.
70 * src/reader.c (packsymbols): Move to...
71 * src/symtab.h, src/symtab.c (symbols_pack): here.
72 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
73 argument.
74
752002-06-03 Akim Demaille <akim@epita.fr>
76
77 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
78 then statements.
79
802002-06-03 Akim Demaille <akim@epita.fr>
81
82 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
83 structs with non literals.
84 * src/scan-skel.l: never-interactive.
85 * src/conflicts.c (enum conflict_resolution_e): No trailing
86 comma.
87 * src/getargs.c (usage): Split long literal strings.
88 Reported by Hans Aberg.
89
902002-05-28 Akim Demaille <akim@epita.fr>
91
92 * data/bison.c++: Use C++ ostreams.
93 (cdebug_): New member.
94
952002-05-28 Akim Demaille <akim@epita.fr>
96
97 * src/output.c (output_skeleton): Be sure to allocate enough room
98 for `/' _and_ for `\0' in full_skeleton.
99
1002002-05-28 Akim Demaille <akim@epita.fr>
101
102 * data/bison.c++: Catch up with bison.simple:
103 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
104 and Paul Eggert <eggert@twinsun.com>: `error' handing.
105 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
106 and popping traces.
107
1082002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
109
110 * src/output.c (output_skeleton): Put an explicit path in front of
111 the skeleton file name, rather than relying on the -I directory,
112 to partially alleviate effects of having a skeleton file lying around
113 in the current directory.
114
1152002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
116
117 * src/conflicts.c (log_resolution): Correct typo:
118 obstack_printf should be obstack_fgrow1.
119
1202002-05-26 Akim Demaille <akim@epita.fr>
121
122 * src/state.h (state_t): `solved_conflicts' is a new member.
123 * src/LR0.c (new_state): Set it to 0.
124 * src/conflicts.h, src/conflicts.c (print_conflicts)
125 (free_conflicts, solve_conflicts): Rename as...
126 (conflicts_print, conflicts_free, conflicts_solve): these.
127 Adjust callers.
128 * src/conflicts.c (enum conflict_resolution_e)
129 (solved_conflicts_obstack): New, used by...
130 (log_resolution): this.
131 Adjust to attach the conflict resolution to each state.
132 Complete the description with the precedence/associativity
133 information.
134 (resolve_sr_conflict): Adjust.
135 * src/print.c (print_state): Output its solved_conflicts.
136 * tests/conflicts.at (Unresolved SR Conflicts)
137 (Solved SR Conflicts): Exercise --report=all.
138
1392002-05-26 Akim Demaille <akim@epita.fr>
140
141 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
142 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
143 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
144 (token_number_t, item_number_as_token_number)
145 (token_number_as_item_number, muscle_insert_token_number_table):
146 Rename as...
147 (symbol_number_t, item_number_as_symbol_number)
148 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
149 these, since it is more appropriate.
150
1512002-05-26 Akim Demaille <akim@epita.fr>
152
153 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
154 `Error:' lines.
155 * data/bison.simple (yystos) [YYDEBUG]: New.
156 (yyparse) [YYDEBUG]: Display the symbols which are popped during
157 error recovery.
158 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
159
1602002-05-25 Akim Demaille <akim@epita.fr>
161
162 * doc/bison.texinfo (Debugging): Split into...
163 (Tracing): this new section, its former contents, and...
164 (Understanding): this new section.
165 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
166 by...
167 (report_flag): this.
168 Adjust all dependencies.
169 (report_args, report_types, report_argmatch): New.
170 (usage, getargs): Report/support -r, --report.
171 * src/options.h
172 (struct option_table_struct): Rename as..,
173 (struct option_table_s): this.
174 Rename the `set_flag' member to `flag' to match with getopt_long's
175 struct.
176 * src/options.c (option_table): Split verbose into an entry for
177 %verbose, and another for --verbose.
178 Support --report/-r, so remove -r from the obsolete --raw.
179 * src/print.c: Attach full item sets and lookaheads reports to
180 report_flag instead of trace_flag.
181 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
182
1832002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
184 and Paul Eggert <eggert@twinsun.com>
185
186 * data/bison.simple (yyparse): Correct error handling to conform to
187 POSIX and yacc. Specifically, after syntax error is discovered,
188 do not reduce further before shifting the error token.
189 Clean up the code a bit by removing the labels yyerrdefault,
190 yyerrhandle, yyerrpop.
191 * NEWS: Document the above.
192
1932002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
194
195 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
196 type; it isn't always big enough, since it doesn't necessarily
197 include non-terminals.
198 (yytranslate): Expand definition of yy_token_number_type, so that
199 the latter can be removed.
200 (yy_token_number_type): Remove, only one use.
201 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
202 don't use TokenNumberType as element type.
203
204 * tests/regression.at: Modify expected output to agree with change
205 to yyr1 and yytranslate.
206
2072002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
208
209 * src/reader.c (parse_action): Use copy_character instead of
210 obstack_1grow.
211
2122002-05-13 Akim Demaille <akim@epita.fr>
213
214 * tests/regression.at (Token definitions): Prototype yylex and
215 yyerror.
216
2172002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
218
219 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
220 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
221 32-bit arithmetic.
222 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
223
2242002-05-07 Akim Demaille <akim@epita.fr>
225
226 * tests/synclines.at: Be sure to prototype yylex and yyerror to
227 avoid GCC warnings.
228
2292002-05-07 Akim Demaille <akim@epita.fr>
230
231 Kill GCC warnings.
232
233 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
234 over the RHS of each rule.
235 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
236 * src/state.h (state_t): Member `nitems' is unsigned short.
237 * src/LR0.c (get_state): Adjust.
238 * src/reader.c (packgram): Likewise.
239 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
240 `Type'.
241 (muscle_insert_int_table): Remove, unused.
242 (prepare_rules): Remove `max'.
243
2442002-05-06 Akim Demaille <akim@epita.fr>
245
246 * src/closure.c (print_firsts): Display of the symbol tags.
247 (bitmatrix_print): Move to...
248 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
249 here.
250 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
251
2522002-05-06 Akim Demaille <akim@epita.fr>
253
254 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
255 hash_do_for_each.
256
2572002-05-06 Akim Demaille <akim@epita.fr>
258
259 * src/LR0.c (new_state, get_state): Instead of using the global
260 `kernel_size' and `kernel_base', have two new arguments:
261 `core_size' and `core'.
262 Adjust callers.
263
2642002-05-06 Akim Demaille <akim@epita.fr>
265
266 * src/reader.c (packgram): No longer end `ritem' with a 0
267 sentinel: it is not used.
268
2692002-05-05 Akim Demaille <akim@epita.fr>
270
271 New experimental feature: display the lookaheads in the report and
272 graph.
273
274 * src/print (print_core): When --trace-flag, display the rules
275 lookaheads.
276 * src/print_graph.c (print_core): Likewise.
277 Swap the arguments.
278 Adjust caller.
279
2802002-05-05 Akim Demaille <akim@epita.fr>
281
282 * tests/torture.at (Many lookaheads): New test.
283
2842002-05-05 Akim Demaille <akim@epita.fr>
285
286 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
287 (GENERATE_MUSCLE_INSERT_TABLE): this.
288 (output_int_table, output_unsigned_int_table, output_short_table)
289 (output_token_number_table, output_item_number_table): Replace with...
290 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
291 (muscle_insert_short_table, muscle_insert_token_number_table)
292 (muscle_insert_item_number_table): these.
293 Adjust all callers.
294 (prepare_tokens): Don't free `translations', since...
295 * src/reader.h, src/reader.c (grammar_free): do it.
296 Move to...
297 * src/gram.h, src/gram.c (grammar_free): here.
298 * data/bison.simple, data/bison.c++: b4_token_number_max is now
299 b4_translate_max.
300
3012002-05-05 Akim Demaille <akim@epita.fr>
302
303 * src/output.c (output_unsigned_int_table): New.
304 (prepare_rules): `i' is unsigned.
305 `prhs', `rline', `r2' are unsigned int.
306 Rename muscle `rhs_number_max' as `rhs_max'.
307 Output muscles `prhs_max', `rline_max', and `r2_max'.
308 Free rline and r1.
309 * data/bison.simple, data/bison.c++: Adjust to use these muscles
310 to compute types instead of constant types.
311 * tests/regression.at (Web2c Actions): Adjust.
312
3132002-05-04 Akim Demaille <akim@epita.fr>
314
315 * src/symtab.h (SALIAS, SUNDEF): Rename as...
316 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
317 Adjust dependencies.
318 * src/output.c (token_definitions_output): Be sure not to output a
319 `#define 'a'' when fed with `%token 'a' "a"'.
320 * tests/regression.at (Token definitions): New.
321
3222002-05-03 Paul Eggert <eggert@twinsun.com>
323
324 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
325 for K&R C.
326
3272002-05-03 gettextize <bug-gnu-gettext@gnu.org>
328
329 * Makefile.am (SUBDIRS): Remove intl.
330 (EXTRA_DIST): Add config/config.rpath.
331
3322002-05-03 Akim Demaille <akim@epita.fr>
333
334 * data/bison.simple (m4_if): Don't output empty enums.
335 And actually, output valid enum definitions :(.
336
3372002-05-03 Akim Demaille <akim@epita.fr>
338
339 * configure.bat: Remove, completely obsolete.
340 * Makefile.am (EXTRA_DIST): Adjust.
341 Don't distribute config.rpath...
342 * config/Makefile.am (EXTRA_DIST): Do it.
343
3442002-05-03 Akim Demaille <akim@epita.fr>
345
346 * configure.in (GETTEXT_VERSION): New.
347 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
348
3492002-05-03 Akim Demaille <akim@epita.fr>
350
351 * data/bison.simple (b4_token_enum): New.
352 (b4_token_defines): Use it to output tokens both as #define and
353 enums.
354 Suggested by Paul Eggert.
355 * src/output.c (token_definitions_output): Don't output spurious
356 white spaces.
357
3582002-05-03 Akim Demaille <akim@epita.fr>
359
360 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
361
3622002-05-02 Robert Anisko <robert@lrde.epita.fr>
363
364 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
365 Update the stack class, give a try to deque as the default container.
366
3672002-05-02 Akim Demaille <akim@epita.fr>
368
369 * data/bison.simple (yyparse): Do not implement @$ = @1.
370 (YYLLOC_DEFAULT): Adjust to do it.
371 * doc/bison.texinfo (Location Default Action): Fix.
372
3732002-05-02 Akim Demaille <akim@epita.fr>
374
375 * src/reader.c (parse_braces): Merge into...
376 (parse_action): this.
377
3782002-05-02 Akim Demaille <akim@epita.fr>
379
380 * configure.in (ALL_LINGUAS): Remove.
381 * po/LINGUAS, hr.po: New.
382
3832002-05-02 Akim Demaille <akim@epita.fr>
384
385 Remove the so called hairy (semantic) parsers.
386
387 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
388 * src/gram.h, src/gram.c (semantic_parser): Remove.
389 (rule_t): Remove the guard and guard_line members.
390 * src/lex.h (token_t): remove tok_guard.
391 * src/options.c (option_table): Remove %guard and %semantic_parser
392 support.
393 * src/output.c, src/output.h (guards_output): Remove.
394 (prepare): Adjust.
395 (token_definitions_output): Don't output the `T'
396 tokens (???).
397 (output_skeleton): Don't output the guards.
398 * src/files.c, src/files.c (attrsfile): Remove.
399 * src/reader.c (symbol_list): Remove the guard and guard_line
400 members.
401 Adjust dependencies.
402 (parse_guard): Remove.
403 * data/bison.hairy: Remove.
404 * doc/bison.texinfo (Environment Variables): Remove occurrences of
405 BISON_HAIRY.
406
4072002-05-02 Akim Demaille <akim@epita.fr>
408
409 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
410 (parse_guard): Rename the formal argument `stack_offset' as
411 `rule_length', which is more readable.
412 Adjust callers.
413 (copy_at, copy_dollar): Instead of outputting the hard coded
414 values of $$, $n and so forth, output invocation to b4_lhs_value,
415 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
416 Note: this patch partially drops `semantic-parser' support: it
417 always does `rule_length - n', where semantic parsers ought to
418 always use `-n'.
419 * data/bison.simple, data/bison.c++ (b4_lhs_value)
420 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
421
4222002-05-02 Akim Demaille <akim@epita.fr>
423
424 * configure.in (AC_INIT): Bump to 1.49b.
425 (AM_INIT_AUTOMAKE): Short invocation.
426
4272002-05-02 Akim Demaille <akim@epita.fr>
428
429 Version 1.49a.
430
4312002-05-01 Akim Demaille <akim@epita.fr>
432
433 * src/skeleton.h: Remove.
434
4352002-05-01 Akim Demaille <akim@epita.fr>
436
437 * src/skeleton.h: Fix the #endif.
438 Reported by Magnus Fromreide.
439
4402002-04-26 Paul Eggert <eggert@twinsun.com>
441
442 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
443 Define if we define YYSTYPE and YYLTYPE, respectively.
444 (YYCOPY): Fix [] quoting problem in the non-GCC case.
445
4462002-04-25 Robert Anisko <robert@lrde.epita.fr>
447
448 * src/scan-skel.l: Postprocess quadrigraphs.
449
450 * src/reader.c (copy_character): New function, used to output
451 single characters while replacing `[' and `]' with quadrigraphs, to
452 avoid troubles with M4 quotes.
453 (copy_comment): Output characters with copy_character.
454 (read_additionnal_code): Likewise.
455 (copy_string2): Likewise.
456 (copy_definition): Likewise.
457
458 * tests/calc.at: Exercise M4 quoting.
459
4602002-04-25 Akim Demaille <akim@epita.fr>
461
462 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
463 between `!' and the command.
464 Reported by Paul Eggert.
465
4662002-04-24 Robert Anisko <robert@lrde.epita.fr>
467
468 * tests/calc.at: Exercise prologue splitting.
469
470 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
471 `b4_post_prologue' instead of `b4_prologue'.
472
473 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
474 muscles.
475 (output): Free pre_prologue_obstack and post_prologue_obstack.
476 * src/files.h, src/files.c (attrs_obstack): Remove.
477 (pre_prologue_obstack, post_prologue_obstack): New.
478 * src/reader.c (copy_definition): Add a parameter to specify the
479 obstack to fill, instead of using attrs_obstack unconditionally.
480 (read_declarations): Pass pre_prologue_obstack to copy_definition if
481 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
482
4832002-04-23 Paul Eggert <eggert@twinsun.com>
484
485 * data/bison.simple: Remove unnecessary commentary and white
486 space differences from 1_29-branch.
487 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
488
489 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
490 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
491 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
492 constructors or destructors.
493
494 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
495
4962002-04-23 Akim Demaille <akim@epita.fr>
497
498 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
499 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
500 location with columns.
501 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
502 All reported by Paul Eggert.
503
5042002-04-22 Akim Demaille <akim@epita.fr>
505
506 * src/reduce.c (dump_grammar): Move to...
507 * src/gram.h, src/gram.c (grammar_dump): here.
508 Be sure to separate long item numbers.
509 Don't read the members of a rule's prec if its nil.
510
5112002-04-22 Akim Demaille <akim@epita.fr>
512
513 * src/output.c (table_size, table_grow): New.
514 (MAXTABLE): Remove, replace uses with table_size.
515 (pack_vector): Instead of dying when the table is too big, grow it.
516
5172002-04-22 Akim Demaille <akim@epita.fr>
518
519 * data/bison.simple (yyr1): Its type is that of a token number.
520 * data/bison.c++ (r1_): Likewise.
521 * tests/regression.at (Web2c Actions): Adjust.
522
5232002-04-22 Akim Demaille <akim@epita.fr>
524
525 * src/reader.c (token_translations_init): 256 is now the default
526 value for the error token, i.e., it will be assigned another
527 number if the user assigned 256 to one of her tokens.
528 (reader): Don't force 256 to error.
529 * doc/bison.texinfo (Symbols): Adjust.
530 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
531 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
532 etc. instead of 10, 20, 30 (which was used to `jump' over error
533 (256) and undefined (2)).
534
5352002-04-22 Akim Demaille <akim@epita.fr>
536
537 Propagate more token_number_t.
538
539 * src/gram.h (token_number_as_item_number)
540 (item_number_as_token_number): New.
541 * src/output.c (GENERATE_OUTPUT_TABLE): New.
542 Use it to create output_item_number_table and
543 output_token_number_table.
544 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
545 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
546 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
547 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
548
5492002-04-22 Akim Demaille <akim@epita.fr>
550
551 * src/output.h, src/output.c (get_lines_number): Remove.
552
5532002-04-19 Akim Demaille <akim@epita.fr>
554
555 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
556 as Lex/Flex'.
557 (Debugging): More details about enabling the debugging features.
558 (Table of Symbols): Describe $$, $n, @$, and @n.
559 Suggested by Tim Josling.
560
5612002-04-19 Akim Demaille <akim@epita.fr>
562
563 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
564
5652002-04-10 Akim Demaille <akim@epita.fr>
566
567 * src/system.h: Rely on HAVE_LIMITS_H.
568 Suggested by Paul Eggert.
569
5702002-04-09 Akim Demaille <akim@epita.fr>
571
572 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
573 full stderr, and strip it according to the bison options, instead
574 of composing the error message from different bits.
575 This makes it easier to check for several error messages.
576 Adjust all the invocations.
577 Add an invocation exercising the error token.
578 Add an invocation demonstrating a stupid error message.
579 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
580 Adjust the tests.
581 Error message are for stderr, not stdout.
582
5832002-04-09 Akim Demaille <akim@epita.fr>
584
585 * src/gram.h, src/gram.c (error_token_number): Remove, use
586 errtoken->number.
587 * src/reader.c (reader): Don't specify the user token number (2)
588 for $undefined, as it uselessly prevents using it.
589 * src/gram.h (token_number_t): Move to...
590 * src/symtab.h: here.
591 (state_t.number): Is a token_number_t.
592 * src/print.c, src/reader.c: Use undeftoken->number instead of
593 hard coded 2.
594 (Even though this 2 is not the same as above: the number of the
595 undeftoken remains being 2, it is its user token number which
596 might not be 2).
597 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
598 `user_token_number_max'.
599 Output `undef_token_number'.
600 * data/bison.simple, data/bison.c++: Use them.
601 Be sure to map invalid yylex return values to
602 `undef_token_number'. This saves us from gratuitous SEGV.
603
604 * tests/conflicts.at (Solved SR Conflicts)
605 (Unresolved SR Conflicts): Adjust.
606 * tests/regression.at (Web2c Actions): Adjust.
607
6082002-04-08 Akim Demaille <akim@epita.fr>
609
610 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
611 Adding #line.
612 Remove the duplicate `typedefs'.
613 (RhsNumberType): Fix the declaration and various other typos.
614 Use __ofile__.
615 * data/bison.simple: Use __ofile__.
616 * src/scan-skel.l: Handle __ofile__.
617
6182002-04-08 Akim Demaille <akim@epita.fr>
619
620 * src/gram.h (item_number_t): New, the type of item numbers in
621 RITEM. Note that it must be able to code symbol numbers as
622 positive number, and the negation of rule numbers as negative
623 numbers.
624 Adjust all dependencies (pretty many).
625 * src/reduce.c (rule): Remove this `short *' pointer: use
626 item_number_t.
627 * src/system.h (MINSHORT, MAXSHORT): Remove.
628 Include `limits.h'.
629 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
630 (shortcpy): Remove.
631 (MAXTABLE): Move to...
632 * src/output.c (MAXTABLE): here.
633 (prepare_rules): Use output_int_table to output rhs.
634 * data/bison.simple, data/bison.c++: Adjust.
635 * tests/torture.at (Big triangle): Move the limit from 254 to
636 500.
637 * tests/regression.at (Web2c Actions): Ajust.
638
639 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
640 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
641 passes, but produces negative #line number, once fixed, GCC is
642 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
643 C), it passes.
644 * src/state.h (state_h): Code input lines on ints, not shorts.
645
6462002-04-08 Akim Demaille <akim@epita.fr>
647
648 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
649 and then the grammar.
650
6512002-04-08 Akim Demaille <akim@epita.fr>
652
653 * src/system.h: No longer using strndup.
654
6552002-04-07 Akim Demaille <akim@epita.fr>
656
657 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
658 * src/output.c (output_table_data): Return the longest number.
659 (prepare_tokens): Output `token_number_max').
660 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
661 New.
662 Use them to define yy_token_number_type/TokenNumberType.
663 Use this type for yytranslate.
664 * tests/torture.at (Big triangle): Push the limit from 124 to
665 253.
666 * tests/regression.at (Web2c Actions): Adjust.
667
6682002-04-07 Akim Demaille <akim@epita.fr>
669
670 * tests/torture.at (Big triangle): New.
671 (GNU AWK Grammar, GNU Cim Grammar): Move to...
672 * tests/existing.at: here.
673
6742002-04-07 Akim Demaille <akim@epita.fr>
675
676 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
677 nritems.
678 Adjust dependencies.
679
6802002-04-07 Akim Demaille <akim@epita.fr>
681
682 * src/reader.c: Normalize increments to prefix form.
683
6842002-04-07 Akim Demaille <akim@epita.fr>
685
686 * src/reader.c, symtab.c: Remove debugging code.
687
6882002-04-07 Akim Demaille <akim@epita.fr>
689
690 Rename all the `bucket's as `symbol_t'.
691
692 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
693 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
694 * src/symtab.c, src/symtab.h (bucket): Rename as...
695 (symbol_t): this.
696 (symbol_list_new, bucket_check_defined, bucket_make_alias)
697 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
698 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
699 (buckets_new, buckets_free, buckets_do): Rename as...
700 (symbol_list_new, symbol_check_defined, symbol_make_alias)
701 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
702 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
703 (symbols_new, symbols_free, symbols_do): these.
704
7052002-04-07 Akim Demaille <akim@epita.fr>
706
707 Use lib/hash for the symbol table.
708
709 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
710 EOF.
711 * src/lex.c (lex): Set the `number' member of new terminals.
712 * src/reader.c (bucket_check_defined, bucket_make_alias)
713 (bucket_check_alias_consistence, bucket_translation): New.
714 (reader, grammar_free, readgram, token_translations_init)
715 (packsymbols): Adjust.
716 (reader): Number the predefined tokens.
717 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
718 for predefined tokens.
719 * src/symtab.h (bucket): Remove all the hash table related
720 members.
721 * src/symtab.c (symtab): Replace by...
722 (bucket_table): this.
723 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
724 (buckets_new, buckets_do): New.
725
7262002-04-07 Akim Demaille <akim@epita.fr>
727
728 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
729 (start_symbol, max_user_token_number, semantic_parser)
730 (error_token_number): Initialize.
731 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
732 Initialize.
733 (reader): Don't.
734 (errtoken, eoftoken, undeftoken, axiom): Extern.
735
7362002-04-07 Akim Demaille <akim@epita.fr>
737
738 * src/gram.h (rule_s): prec and precsym are now pointers
739 to the bucket giving the priority/associativity.
740 Member `associativity' removed: useless.
741 * src/reduce.c, src/conflicts.c: Adjust.
742
7432002-04-07 Akim Demaille <akim@epita.fr>
744
745 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
746 Properly escape the symbols' TAG when outputting them.
747
7482002-04-07 Akim Demaille <akim@epita.fr>
749
750 * src/lalr.h (LA): Is a bitsetv, not bitset*.
751
7522002-04-07 Akim Demaille <akim@epita.fr>
753
754 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
755 (LArule): this, which is an array to rule_t*.
756 * src/print.c, src/conflicts.c: Adjust.
757
7582002-04-07 Akim Demaille <akim@epita.fr>
759
760 * src/gram.h (rule_t): Rename `number' as `user_number'.
761 `number' is a new member.
762 Adjust dependencies.
763 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
764
7652002-04-07 Akim Demaille <akim@epita.fr>
766
767 As a result of the previous patch, it is no longer needed
768 to reorder ritem itself.
769
770 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
771
7722002-04-07 Akim Demaille <akim@epita.fr>
773
774 Be sure never to walk through RITEMS, but use only data related to
775 the rules themselves. RITEMS should be banished.
776
777 * src/output.c (output_token_translations): Rename as...
778 (prepare_tokens): this.
779 In addition to `translate', prepare the muscles `tname' and
780 `toknum', which were handled by...
781 (output_rule_data): this.
782 Remove, and move the remainder of its outputs into...
783 (prepare_rules): this new routines, which also merges content from
784 (output_gram): this.
785 (prepare_rules): Be sure never to walk through RITEMS.
786 (output_stos): Rename as...
787 (prepare_stos): this.
788 (output): Always invoke prepare_states, after all, just don't use it
789 in the output if you don't need it.
790
7912002-04-07 Akim Demaille <akim@epita.fr>
792
793 * src/LR0.c (new_state): Display `nstates' as the name of the
794 newly created state.
795 Adjust to initialize first_state and last_state if needed.
796 Be sure to distinguish the initial from the final state.
797 (new_states): Create the itemset of the initial state, and use
798 new_state.
799 * src/closure.c (closure): Now that the initial state has its
800 items properly set, there is no need for a special case when
801 creating `ruleset'.
802
803 As a result, now the rule 0, reducing to $axiom, is visible in the
804 outputs. Adjust the test suite.
805
806 * tests/conflicts.at (Solved SR Conflicts)
807 (Unresolved SR Conflicts): Adjust.
808 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
809 * tests/conflicts.at (S/R in initial): New.
810
8112002-04-07 Akim Demaille <akim@epita.fr>
812
813 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
814 the RHS of the rules.
815 * src/output.c (output_gram): Likewise.
816
8172002-04-07 Akim Demaille <akim@epita.fr>
818
819 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
820 bucket.
821 Adjust all dependencies.
822 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
823 `number' of the buckets too.
824 * src/gram.h: Include `symtab.h'.
825 (associativity): Move to...
826 * src/symtab.h: here.
827 No longer include `gram.h'.
828
8292002-04-07 Akim Demaille <akim@epita.fr>
830
831 * src/gram.h, src/gram.c (rules_rhs_length): New.
832 (ritem_longest_rhs): Use it.
833 * src/gram.h (rule_t): `number' is a new member.
834 * src/reader.c (packgram): Set it.
835 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
836 the end of `rules', and count them out of `nrules'.
837 (reduce_output, dump_grammar): Adjust.
838 * src/print.c (print_grammar): It is no longer needed to check for
839 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
840 * tests/reduce.at (Reduced Automaton): New test.
841
8422002-04-07 Akim Demaille <akim@epita.fr>
843
844 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
845 lacking `+ 1' to nrules, Bison reported as useless a token if it
846 was used solely to set the precedence of the last rule...
847
8482002-04-07 Akim Demaille <akim@epita.fr>
849
850 * data/bison.c++, data/bison.simple: Don't output the current file
851 name in #line, to avoid useless diffs between two identical
852 outputs under different names.
853
8542002-04-07 Akim Demaille <akim@epita.fr>
855
856 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
857 Normalize loops to using `< nrules + 1', not `<= nrules'.
858
8592002-04-07 Akim Demaille <akim@epita.fr>
860
861 * TODO: Update.
862
8632002-04-07 Akim Demaille <akim@epita.fr>
864
865 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
866 bucket.value as bucket.number.
867
8682002-04-07 Akim Demaille <akim@epita.fr>
869
870 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
871 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
872 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
873 RHS, instead of being an index in RITEMS.
874
8752002-04-04 Paul Eggert <eggert@twinsun.com>
876
877 * doc/bison.texinfo: Update copyright date.
878 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
879 (Symbols): Warn about running Bison in one character set,
880 but compiling and/or running in an incompatible one.
881 Warn about character code 256, too.
882
8832002-04-03 Paul Eggert <eggert@twinsun.com>
884
885 * src/bison.data (YYSTACK_ALLOC): Depend on whether
886 YYERROR_VERBOSE is nonzero, not whether it is defined.
887
888 Merge changes from bison-1_29-branch.
889
8902002-03-20 Paul Eggert <eggert@twinsun.com>
891
892 Merge fixes from Debian bison_1.34-1.diff.
893
894 * configure.in (AC_PREREQ): 2.53.
895
8962002-03-20 Akim Demaille <akim@epita.fr>
897
898 * src/conflicts.c (log_resolution): Argument `resolution' is const.
899
9002002-03-19 Paul Eggert <eggert@twinsun.com>
901
902 * src/bison.simple (YYCOPY): New macro.
903 (YYSTACK_RELOCATE): Use it.
904 Remove Type arg; no longer needed. All callers changed.
905 (yymemcpy): Remove; no longer needed.
906
907 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
908 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
909
9102002-03-19 Akim Demaille <akim@epita.fr>
911
912 Test and fix the #line outputs.
913
914 * tests/atlocal.at (GCC): New.
915 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
916 (Prologue synch line, ,%union synch line, Postprologue synch line)
917 (Action synch line, Epilogue synch line): New tests.
918 * src/reader.c (parse_union_decl): Define the muscle stype_line.
919 * data/bison.simple, data/bison.c++: Use it.
920
9212002-03-19 Akim Demaille <akim@epita.fr>
922
923 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
924 (Solved SR Conflicts, %expect not enough, %expect right)
925 (%expect too much): Move to...
926 * tests/conflicts.at: this new file.
927
9282002-03-19 Akim Demaille <akim@epita.fr>
929
930 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
931 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
932 that we can move to enums for instance.
933 * src/output.c (token_definitions_output): Output a list of
934 `token-name, token-number' instead of the #define.
935 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
936
9372002-03-14 Akim Demaille <akim@epita.fr>
938
939 Use Gettext 0.11.1.
940
9412002-03-09 Robert Anisko <robert@lrde.epita.fr>
942
943 * data/bison.c++: Make the user able to add members to the generated
944 parser by subclassing.
945
9462002-03-05 Robert Anisko <robert@lrde.epita.fr>
947
948 * src/reader.c (read_additionnal_code): `c' should be an integer, not
949 a character.
950 Reported by Nicolas Tisserand and Nicolas Burrus.
951
9522002-03-04 Robert Anisko <robert@lrde.epita.fr>
953
954 * src/reader.c: Warn about lacking semi-colons, do not complain.
955
9562002-03-04 Robert Anisko <robert@lrde.epita.fr>
957
958 * data/bison.c++: Remove a debug line.
959
9602002-03-04 Robert Anisko <robert@lrde.epita.fr>
961
962 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
963 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
964 provide a default implementation.
965
9662002-03-04 Akim Demaille <akim@epita.fr>
967
968 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
969 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
970 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
971 * tests/semantic.at (Parsing Guards): Similarly.
972 * src/reader.at (readgram): Complain if the last rule is not ended
973 with a semi-colon.
974
9752002-03-04 Akim Demaille <akim@epita.fr>
976
977 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
978 * src/closure.c: here.
979 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
980 RTC.
981 * src/warshall.h, src/warshall.c: Remove.
982 * tests/sets.at (Broken Closure): Adjust.
983
9842002-03-04 Akim Demaille <akim@epita.fr>
985
986 * src/output.c (output_skeleton): tempdir is const.
987 bytes_read is unused.
988
9892002-03-04 Akim Demaille <akim@epita.fr>
990
991 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
992 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
993 Update.
994 From Michael Hayes.
995
9962002-03-04 Akim Demaille <akim@epita.fr>
997
998 * src/closure.c (closure): `r' is unused.
999
10002002-03-04 Akim Demaille <akim@epita.fr>
1001
1002 * tests/sets.at (Broken Closure): Add the ending `;'.
1003 * src/reader.at (readgram): Complain if a rule is not ended with a
1004 semi-colon.
1005
10062002-03-04 Akim Demaille <akim@epita.fr>
1007
1008 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
1009 (count_sr_conflicts): Use bitset_count.
1010 * src/reduce.c (inaccessable_symbols): Ditto.
1011 (bits_size): Remove.
1012 * src/warshall.h, src/warshall.c: Convert to bitsetv.
1013
10142002-03-04 Akim Demaille <akim@epita.fr>
1015
1016 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
1017 * src/reduce.c: Remove the `bitset_zero's following the
1018 `bitset_create's, as now it is performed by the latter.
1019
10202002-03-04 Akim Demaille <akim@epita.fr>
1021
1022 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
1023 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
1024 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
1025 latest sources from Michael.
1026
10272002-03-04 Akim Demaille <akim@epita.fr>
1028
1029 * src/output.c (output): Don't free the grammar.
1030 * src/reader.c (grammar_free): New.
1031 * src/main.c (main): Call it and don't free symtab here.
1032
10332002-03-04 Akim Demaille <akim@epita.fr>
1034
1035 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
1036 before returning.
1037 Reported by Benoit Perrot.
1038
10392002-03-04 Akim Demaille <akim@epita.fr>
1040
1041 Use bitset operations when possible, not loops over bits.
1042
1043 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
1044 bitset_or.
1045 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
1046 * src/reduce.c (useless_nonterminals): Formatting changes.
1047 * src/warshall.c (TC): Use bitset_or.
1048
10492002-03-04 Akim Demaille <akim@epita.fr>
1050
1051 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
1052 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
1053 Ditto.
1054
10552002-03-04 Akim Demaille <akim@epita.fr>
1056
1057 * src/lalr.c (F): Now a bitset*.
1058 Adjust all dependencies.
1059
10602002-03-04 Akim Demaille <akim@epita.fr>
1061
1062 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
1063 Adjust all dependencies.
1064
10652002-03-04 Akim Demaille <akim@epita.fr>
1066
1067 * src/L0.c, src/LR0.h (nstates): Be size_t.
1068 Adjust comparisons (signed vs unsigned).
1069 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
1070 bitset*.
1071 Adjust all dependencies.
1072
10732002-03-04 Akim Demaille <akim@epita.fr>
1074
1075 * src/closure.c (firsts): Now, also a bitset.
1076 Adjust all dependencies.
1077 (varsetsize): Remove, now unused.
1078 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
1079
10802002-03-04 Akim Demaille <akim@epita.fr>
1081
1082 * src/print.c: Convert to use bitset.h, not hand coded iterations
1083 over ints.
1084
10852002-03-04 Akim Demaille <akim@epita.fr>
1086
1087 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1088
10892002-03-04 Akim Demaille <akim@epita.fr>
1090
1091 * src/closure.c (ruleset): Be a bitset.
1092 (rulesetsize): Remove.
1093
10942002-03-04 Akim Demaille <akim@epita.fr>
1095
1096 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1097 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1098 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1099 * src/closure.c (fderives): Be an array of bitsets.
1100
11012002-02-28 Robert Anisko <robert@lrde.epita.fr>
1102
1103 * data/bison.c++: Merge the two generated headers. Insert a copyright
1104 notice in each output file.
1105
11062002-02-28 Akim Demaille <akim@epita.fr>
1107
1108 * data/bison.c++: Copy the prologue of bison.simple to fetch
1109 useful M4 definitions, such as b4_header_guard.
1110
11112002-02-25 Akim Demaille <akim@epita.fr>
1112
1113 * src/getargs.c (version): Give the name of the authors, and use a
1114 translator friendly scheme for the bgr
1115 copyright notice.
1116
11172002-02-25 Akim Demaille <akim@epita.fr>
1118
1119 * src/output.c (header_output): Remove, now handled completely via
1120 M4.
1121
11222002-02-25 Akim Demaille <akim@epita.fr>
1123
1124 * m4/m4.m4: New, from CVS Autoconf.
1125 * configure.in: Invoke it.
1126 * src/output.c (output_skeleton): Use its result instead of the
1127 hard coded name.
1128
11292002-02-25 Akim Demaille <akim@epita.fr>
1130
1131 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1132 Fileutils 4.1.5.
1133 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1134 * src/output.c (output_skeleton): Use mkstemp to create a real
1135 temporary file.
1136 Move the filling of `skeleton' and its muscle to...
1137 (prepare): here.
1138 (output): Move the definition of the prologue muscle to...
1139 (prepare): here.
1140 * src/system.h (DEFAULT_TMPDIR): New.
1141
11422002-02-14 Paul Eggert <eggert@twinsun.com>
1143
1144 Remove the support for C++ namespace cleanliness; it was
1145 causing more problems than it was curing, since it didn't work
1146 properly on some nonstandard C++ compilers. This can wait
1147 for a proper C++ parser.
1148
1149 * NEWS: Document this.
1150 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1151 of C++, as it's treated like C now.
1152 * src/bison.simple (YYSTD): Remove.
1153 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1154 Treat C++ just like Standard C instead of trying to support
1155 namespace cleanliness.
1156
11572002-02-14 Akim Demaille <akim@epita.fr>
1158
1159 * tests/regression.at (else): Adjust to Andreas' change.
1160
11612002-02-14 Akim Demaille <akim@epita.fr>
1162
1163 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1164
11652002-02-13 Andreas Schwab <schwab@suse.de>
1166
1167 * src/output.c (output_rule_data): Don't output NULL, it might
1168 not be defined yet.
1169
11702002-02-11 Robert Anisko <robert@lrde.epita.fr>
1171
1172 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1173 (Copyright notice): Update.
1174
11752002-02-11 Akim Demaille <akim@epita.fr>
1176
1177 * tests/regression.at (%nonassoc and eof): Don't include
1178 nonportable headers.
1179
11802002-02-08 Robert Anisko <robert@lrde.epita.fr>
1181
1182 * data/bison.c++: Correct error recovery. Make the user able to
1183 initialize the starting location.
1184
11852002-02-07 Akim Demaille <akim@epita.fr>
1186
1187 * tests/input.at: New.
1188
11892002-02-07 Robert Anisko <robert@lrde.epita.fr>
1190
1191 * data/bison.c++: Replace some direct m4 expansions by constants. Be
1192 more consistent when naming methods and variables. Put preprocessor
1193 directives around tables only needed for debugging.
1194
11952002-02-07 Robert Anisko <robert@lrde.epita.fr>
1196
1197 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1198 C++ parsers.
1199 (yy::b4_name::parse): Use print_.
1200
12012002-02-07 Robert Anisko <robert@lrde.epita.fr>
1202
1203 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1204
12052002-02-07 Robert Anisko <robert@lrde.epita.fr>
1206
1207 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1208 C++ parsers.
1209 (yy::b4_name::parse): Build verbose error messages, and use error_.
1210
12112002-02-06 Robert Anisko <robert@lrde.epita.fr>
1212
1213 * data/bison.c++: Fix m4 quoting in comments.
1214
12152002-02-06 Robert Anisko <robert@lrde.epita.fr>
1216
1217 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1218 not expanded by m4.
1219
12202002-02-05 Akim Demaille <akim@epita.fr>
1221
1222 * data/bison.c++: Adjust to the M4 back end.
1223 More is certainly needed.
1224
12252002-02-05 Akim Demaille <akim@epita.fr>
1226
1227 Give a try to M4 as a back end.
1228
1229 * lib/readpipe.c: New, from wdiff.
1230 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1231 BISON_HAIRY.
1232 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1233 specific values. Now it is m4 that performs the lookup.
1234 * src/parse-skel.y: Remove.
1235 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1236 * src/output.c (actions_output, guards_output)
1237 (token_definitions_output): No longer keeps track of the output
1238 line number, hence remove the second argument.
1239 (guards_output): Check against the guard member of a rule, not the
1240 action member.
1241 Adjust callers.
1242 (output_skeleton): Don't look for the skeleton location, let m4 do
1243 that.
1244 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1245 file will be used.
1246 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1247 (prepare): Given that for the time being changesyntax is not
1248 usable in M4, rename the muscles using `-' to `_'.
1249 Define `defines_flag', `output_parser_name' and `output_header_name'.
1250 * src/output.h (actions_output, guards_output)
1251 (token_definitions_output): Adjust prototypes.
1252 * src/scan-skel.l: Instead of scanning the skeletons, it now
1253 processes the output of m4: `__oline__' and `#output'.
1254 * data/bison.simple: Adjust to be used by M4(sugar).
1255 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1256 to date.
1257 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1258 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1259 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1260 shamelessly stolen from CVS Autoconf.
1261
12622002-02-05 Akim Demaille <akim@epita.fr>
1263
1264 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1265 * configure.in: Check for the declarations of free and malloc.
1266 * src/muscle_tab.c: Adjust.
1267
12682002-02-05 Akim Demaille <akim@epita.fr>
1269
1270 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1271 which have no values.
1272
12732002-02-05 Akim Demaille <akim@epita.fr>
1274
1275 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1276 * data/: here.
1277
12782002-01-29 Paul Eggert <eggert@twinsun.com>
1279
1280 * src/bison.simple (YYSIZE_T): Do not define merely because
1281 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1282 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1283
12842002-01-27 Akim Demaille <akim@epita.fr>
1285
1286 Fix `%nonassoc and eof'.
1287
1288 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1289 which were not properly copied! Replace
1290 memcpy (res->errs, src->errs, src->nerrs);
1291 with
1292 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1293 !!!
1294 * tests/regression.at (%nonassoc and eof): Adjust to newest
1295 Autotest: `.' is not in the PATH.
1296
12972002-01-27 Akim Demaille <akim@epita.fr>
1298
1299 * tests/sets.at (AT_EXTRACT_SETS): New.
1300 (Nullable): Use it.
1301 (Firsts): New.
1302
13032002-01-26 Akim Demaille <akim@epita.fr>
1304
1305 * tests/actions.at, tests/calc.at, tests/headers.at,
1306 * tests/torture.at: Adjust to the newest Autotest which no longer
1307 forces `.' in the PATH.
1308
13092002-01-25 Akim Demaille <akim@epita.fr>
1310
1311 * tests/regression.at (%nonassoc and eof): New.
1312 Suggested by Robert Anisko.
1313
13142002-01-24 Akim Demaille <akim@epita.fr>
1315
1316 Bison dumps core when trying to complain about broken input files.
1317 Reported by Cris van Pelt.
1318
1319 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1320 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1321 into...
1322 (Invalid inputs): Strengthen: exercise parse_percent_token.
1323
13242002-01-24 Robert Anisko <robert.anisko@epita.fr>
1325
1326 * src/Makefile.am: Add bison.c++.
1327 * src/bison.c++: New skeleton.
1328
13292002-01-21 Paolo Bonzini <bonzini@gnu.org>
1330
1331 * po/it.po: New.
1332
13332002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1334
1335 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1336
13372002-01-20 Marc Autret <marc@gnu.org>
1338
1339 * src/files.c (compute_output_file_names): Fix
1340
13412002-01-20 Marc Autret <marc@gnu.org>
1342
1343 * tests/output.at: New test.
1344 * src/files.c (compute_base_names): Don't map extensions when
1345 the YACC flag is set, use defaults.
1346 Reported by Evgeny Stambulchik.
1347
13482002-01-20 Marc Autret <marc@gnu.org>
1349
1350 * src/system.h: Need to define __attribute__ away for non-GCC
1351 compilers as well (i.e. the vendor C compiler).
1352 Suggested by Albert Chin-A-Young.
1353
13542002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1355
1356 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1357 canonical definition.
1358 * src/system.h: Use the canonical definition for PARAMS (avoids
1359 a conflict with the macro from lib/hash.h).
1360
13612002-01-11 Akim Demaille <akim@epita.fr>
1362
1363 * configure.in: Use AC_FUNC_STRNLEN.
1364 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
1365
13662002-01-09 Akim Demaille <akim@epita.fr>
1367
1368 * src/files.c, src/files.h (output_infix): New.
1369 (tab_extension): Remove.
1370 (compute_base_names): Compute the former, drop the latter.
1371 * src/output.c (prepare): Insert the muscles `output-infix', and
1372 `output-suffix'.
1373 * src/parse-skel.y (string, string.1): New.
1374 (section.header): Use it.
1375 (section.yacc): Remove.
1376 (prefix): Remove too.
1377 * src/scan-skel.l: Adjust.
1378 * src/bison.simple, src/bison.hairy: Adjust.
1379
13802002-01-09 Akim Demaille <akim@epita.fr>
1381
1382 * configure.in (WERROR_CFLAGS): Compute it.
1383 * src/Makefile.am (CFLAGS): Pass it.
1384 * tests/atlocal.in (CFLAGS): Idem.
1385 * src/files.c: Fix a few warnings.
1386 (get_extension_index): Remove, unused.
1387
13882002-01-08 Akim Demaille <akim@epita.fr>
1389
1390 * src/getargs.c (AS_FILE_NAME): New.
1391 (getargs): Use it to convert DOSish file names.
1392 * src/files.c (base_name): Rename as full_base_name to avoid
1393 clashes with `base_name ()'.
1394 (filename_split): New.
1395 (compute_base_names): N-th rewrite, using filename_split.
1396
13972002-01-08 Akim Demaille <akim@epita.fr>
1398
1399 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1400 New, stolen from the Fileutils 4.1.
1401 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1402 * configure.in: Check for the presence of memrchr, and of its
1403 prototype.
1404
14052002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1406
1407 * lib/hash.h (__P): Added definition for this macro.
1408 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1409 BUILT_SOURCES, to ensure they are generated first.
1410 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1411 %error-verbose to allow bootstrapping with bison 1.30x.
1412
14132002-01-06 Akim Demaille <akim@epita.fr>
1414
1415 * src/reader.c (parse_braces): Don't fetch the next char, the
1416 convention is to fetch on entry.
1417 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1418 'switch' without a following semicolon.
1419 * tests/regression.at (braces parsing): New.
1420
14212002-01-06 Akim Demaille <akim@epita.fr>
1422
1423 Bison is dead wrong in its RR conflict reports.
1424
1425 * tests/torture.at (GNU Cim Grammar): New.
1426 * src/conflicts.c (count_rr_conflicts): Fix.
1427
14282002-01-06 Akim Demaille <akim@epita.fr>
1429
1430 Creating package.m4 from configure.ac causes too many problems.
1431
1432 * tests/Makefile.am (package.m4): Create it by hand,
1433 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1434
14352002-01-06 Akim Demaille <akim@epita.fr>
1436
1437 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1438 skeleton.h.
1439
14402002-01-04 Paul Eggert <eggert@twinsun.com>
1441
1442 * doc/bison.texinfo (Debugging):
1443 Remove YYSTDERR; it's no longer defined or used.
1444 Also, s/cstdio.h/cstdio/.
1445
14462002-01-03 Akim Demaille <akim@epita.fr>
1447
1448 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1449
14502002-01-03 Akim Demaille <akim@epita.fr>
1451
1452 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1453 tracing code to --trace, wait for a better --trace option, with
1454 args.
1455
14562002-01-03 Akim Demaille <akim@epita.fr>
1457
1458 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1459 The ISO C++ standard is extremely clear about it: stderr is
1460 considered a macro, not a regular symbol (see table 94 `Header
1461 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1462 Therefore std:: does not apply to it. It still does with fprintf.
1463 Also, s/cstdio.h/cstdio/.
1464
14652002-01-03 Akim Demaille <akim@epita.fr>
1466
1467 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1468 for non system headers.
1469
14702002-01-02 Akim Demaille <akim@epita.fr>
1471
1472 Equip the skeleton chain with location tracking, runtime trace,
1473 pure parser and scanner.
1474
1475 * src/parse-skel.y: Request a pure parser, locations, and prefix
1476 renaming.
1477 (%union): Having several members with the same type does not help
1478 type mismatches, simplify.
1479 (YYPRINT, yyprint): New.
1480 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1481 (skel_error): this.
1482 Handle locations.
1483 * src/scan-skel.l: Adjust to these changes.
1484 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1485 (LOCATION_PRINT, skel_control_t): New.
1486
14872001-12-30 Akim Demaille <akim@epita.fr>
1488
1489 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1490 replace `gb' with BLANKS.
1491 * src/scan-skel.l: Adjust.
1492
14932001-12-30 Akim Demaille <akim@epita.fr>
1494
1495 * src/system.h: We don't need nor want bcopy.
1496 Throw away MS-DOS crap: we don't need getpid.
1497 * configure.in: We don't need strndup. It was even causing
1498 problems: because Flex includes the headers *before* us,
1499 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1500 not visible.
1501 * lib/xstrndup.c: New.
1502 * src/scan-skel.l: Use it.
1503 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1504 * src/parse-skel.y: Use %directives instead of #defines.
1505
15062001-12-30 Akim Demaille <akim@epita.fr>
1507
1508 * src/skeleton.h: New.
1509 * src/output.c (output_parser, output_master_parser): Remove, dead
1510 code.
1511 * src/output.h (get_lines_number, actions_output, guards_output)
1512 (token_definitions_output): Prototype them.
1513 * src/parse-skel.y: Add the license notice.
1514 Include output.h and skeleton.h.
1515 (process_skeleton): Returns void, and takes a single parameter.
1516 * src/scan-skel.l: Add the license notice.
1517 Include skeleton.h.
1518 Don't use %option yylineno: it seems that then Flex imagines
1519 REJECT has been used, and therefore it won't reallocate its
1520 buffers (which makes no other sense to me than a bug). It results
1521 in warnings for `unused: yy_flex_realloc'.
1522
15232001-12-30 Robert Anisko <robert.anisko@epita.fr>
1524
1525 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1526 (MUSCLE_INSERT_PREFIX): ...to there.
1527 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1528 (MUSCLE_INSERT_PREFIX): Move from here...
1529
1530 * src/bison.hairy: Add a section directive. Put braces around muscle
1531 names. This parser skeleton is still broken, but Bison should not
1532 choke on a bad muscle 'syntax'.
1533 * src/bison.simple: Add a section directive. Put braces around muscle
1534 names.
1535
1536 * src/files.h (strsuffix, stringappend): Add declarations.
1537 (tab_extension): Add declaration.
1538 (short_base_name): Add declaration.
1539
1540 * src/files.c (strsuffix, stringappend): No longer static. These
1541 functions are used in the skeleton parser.
1542 (tab_extension): New.
1543 (compute_base_names): Use the computations done in this function
1544 to guess if the generated parsers should have '.tab' in their
1545 names.
1546 (short_base_name): No longer static.
1547
1548 * src/output.c (output_skeleton): New.
1549 (output): Disable call to output_master_parser, and give a try to
1550 a new skeleton handling system.
1551 (guards_output, actions_output): No longer static.
1552 (token_definitions_output, get_lines_number): No longer static.
1553
1554 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1555
1556 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1557 parse-skel.y.
1558
1559 * src/parse-skel.y: New file.
1560 * src/scan-skel.l: New file.
1561
15622001-12-29 Akim Demaille <akim@epita.fr>
1563
1564 %name-prefix is broken.
1565
1566 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1567 Adjust all dependencies.
1568 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1569 %name-prefix.
1570
1571 Renaming yylval but not yylloc is not consistent. Now we do.
1572
1573 * src/bison.simple: Prefix yylloc if used.
1574 * doc/bison.texinfo (Decl Summary): Document that.
1575
15762001-12-29 Akim Demaille <akim@epita.fr>
1577
1578 * doc/bison.texinfo: Promote `%long-directive' over
1579 `%long_directive'.
1580 Remove all references to fixed-output-files, yacc is enough.
1581
15822001-12-29 Akim Demaille <akim@epita.fr>
1583
1584 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1585 user prologue. These are defaults.
1586 * tests/actions.at (Mid-rule actions): Make sure the user can
1587 define YYDEBUG and YYERROR_VERBOSE.
1588
15892001-12-29 Akim Demaille <akim@epita.fr>
1590
1591 * src/output.c (header_output): Don't forget to export YYLTYPE and
1592 yylloc.
1593 * tests/headers.at (export YYLTYPE): New, make sure it does.
1594 * tests/regression.at (%union and --defines, Invalid CPP headers):
1595 Move to...
1596 * tests/headers.at: here.
1597
15982001-12-29 Akim Demaille <akim@epita.fr>
1599
1600 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1601
16022001-12-29 Akim Demaille <akim@epita.fr>
1603
1604 * tests/actions.at (Mid-rule actions): Output on a single line
1605 instead of several.
1606
16072001-12-29 Akim Demaille <akim@epita.fr>
1608
1609 * doc/bison.texinfo: Formatting changes.
1610
16112001-12-29 Akim Demaille <akim@epita.fr>
1612
1613 Don't store the token defs in a muscle, just be ready to output it
1614 on command. Now possible via `symbols'. Fixes a memory leak.
1615
1616 * src/output.c (token_definitions_output): New.
1617 (output_parser, header_output): Use it.
1618 * src/reader.c (symbols_save): Remove.
1619
16202001-12-29 Akim Demaille <akim@epita.fr>
1621
1622 * src/bison.simple: Do not provide a default for YYSTYPE and
1623 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1624 default.
1625
16262001-12-29 Akim Demaille <akim@epita.fr>
1627
1628 Mid-rule actions are simply... ignored!
1629
1630 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1631 the empty-rule associated to the dummy symbol, not to the host
1632 rule.
1633 * tests/actions.at (Mid-rule actions): New.
1634
16352001-12-29 Akim Demaille <akim@epita.fr>
1636
1637 Memory leak.
1638
1639 * src/reader.c (reader): Free grammar.
1640
16412001-12-29 Akim Demaille <akim@epita.fr>
1642
1643 Memory leak.
1644
1645 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1646 since it allocates it for each state, although only one is needed.
1647 (allocate_storage): Do it here.
1648
16492001-12-29 Akim Demaille <akim@epita.fr>
1650
1651 * src/options.h, src/options.c (create_long_option_table): Rename
1652 as...
1653 (long_option_table_new): this, with a clearer prototype.
1654 (percent_table): Remove, unused,
1655 * src/getargs.c (getargs): Adjust.
1656
16572001-12-29 Akim Demaille <akim@epita.fr>
1658
1659 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1660 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1661 as states.
1662
16632001-12-29 Akim Demaille <akim@epita.fr>
1664
1665 * src/lalr.c (build_relations): Rename `states' as `states1'.
1666 Sorry, I don't understand exactly what it is, no better name...
1667
16682001-12-29 Akim Demaille <akim@epita.fr>
1669
1670 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1671 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1672 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1673 as rules.
1674
16752001-12-29 Akim Demaille <akim@epita.fr>
1676
1677 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1678 ago.
1679
16802001-12-29 Akim Demaille <akim@epita.fr>
1681
1682 * src/reader.c, src/reader.h (user_toknums): Remove.
1683 Adjust all users to use symbols[i]->user_token_number.
1684
16852001-12-29 Akim Demaille <akim@epita.fr>
1686
1687 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1688 Adjust all users to use symbols[i]->prec or ->assoc.
1689
16902001-12-29 Akim Demaille <akim@epita.fr>
1691
1692 * src/reader.c, src/reader.h (tags): Remove.
1693 Adjust all users to use symbols[i]->tag.
1694
16952001-12-29 Akim Demaille <akim@epita.fr>
1696
1697 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1698 and rule_table.
1699 * src/reader.c (packsymbols): Fill this table.
1700 Drop sprec.
1701 * src/conflicts.c (resolve_sr_conflict): Adjust.
1702 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1703 single table.
1704 Use symbols[i]->tag instead of tags[i].
1705
17062001-12-29 Akim Demaille <akim@epita.fr>
1707
1708 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1709 In addition, put a comment in there, to replace...
1710 * tests/regression.at (%union and C comments): Remove.
1711
17122001-12-29 Akim Demaille <akim@epita.fr>
1713
1714 * tests/regression.at (Web2c Actions): Blindly move the actual
1715 output as expected output. The contents *seem* right to me, but I
1716 can't pretend reading perfectly parser tables... Nonetheless, all
1717 the other tests pass correctly, the table look OK, even though the
1718 presence of `$axiom' is to be noted: AFAICS it is useless (but
1719 harmless).
1720
17212001-12-29 Akim Demaille <akim@epita.fr>
1722
1723 * src/reader.c (readgram): Don't add the rule 0 if there were no
1724 rules read. In other words, add it _after_ having performed
1725 grammar sanity checks.
1726 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1727
17282001-12-29 Akim Demaille <akim@epita.fr>
1729
1730 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1731 visible, and some states have now a different number.
1732
17332001-12-29 Akim Demaille <akim@epita.fr>
1734
1735 * src/reader.c (readgram): Bind the initial rule's lineno to that
1736 of the first rule.
1737 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1738 (Solved SR Conflicts): Adjust rule 0's line number.
1739
17402001-12-29 Akim Demaille <akim@epita.fr>
1741
1742 Fix the `GAWK Grammar' failure.
1743
1744 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1745 the reductions of the first state which was mistakenly confused
1746 with the final state because precisely final_state was initialized
1747 to 0.
1748 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1749 now noticed by Bison.
1750 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1751 have a reduction on $default.
1752
17532001-12-29 Akim Demaille <akim@epita.fr>
1754
1755 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1756 rule line numbers.
1757 * src/closure.c (print_closure): Likewise.
1758 * src/derives.c (print_derives): Likewise.
1759 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1760 now.
1761
17622001-12-29 Akim Demaille <akim@epita.fr>
1763
1764 * src/lalr.c (lookaheads_print): New.
1765 (lalr): Call it when --trace-flag.
1766 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1767 are dumped.
1768
17692001-12-29 Akim Demaille <akim@epita.fr>
1770
1771 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1772 when walking through ritem, even via rule->rhs.
1773 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1774 (useful_production, useless_nonterminals): Likewise.
1775 (reduce_grammar_tables): Likewise, plus update nritems.
1776 * src/nullable.c (set_nullable): Likewise.
1777 * src/lalr.c (build_relations): Likewise.
1778 * tests/sets.at (Nullable): Adjust.
1779 Fortunately, now, the $axiom is no longer nullable.
1780
17812001-12-29 Akim Demaille <akim@epita.fr>
1782
1783 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1784 the 0-sentinel.
1785 * src/gram.c (ritem_longest_rhs): Likewise.
1786 * src/reduce.c (nonterminals_reduce): Likewise.
1787 * src/print_graph.c (print_graph): Likewise.
1788 * src/output.c (output_rule_data): Likewise.
1789 * src/nullable.c (set_nullable): Likewise.
1790
17912001-12-29 Akim Demaille <akim@epita.fr>
1792
1793 * src/output.c: Comment changes.
1794
17952001-12-27 Paul Eggert <eggert@twinsun.com>
1796
1797 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1798 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1799 Sparc, as they were causing more porting problems than the
1800 (minor) performance improvement was worth.
1801
1802 Also, catch up with 1.31's YYSTD.
1803
18042001-12-27 Akim Demaille <akim@epita.fr>
1805
1806 * src/output.c (output_gram): Rely on nritems, not the
1807 0-sentinel. See below.
1808 Use -1 as separator, not 0.
1809 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1810 Rely on -1 as separator in yyrhs, instead of 0.
1811 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1812 twice `Now at end of input', therefore there are two lines less to
1813 expect.
1814
18152001-12-27 Akim Demaille <akim@epita.fr>
1816
1817 * tests/regression.at (Unresolved SR Conflicts):
1818 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1819 below.
1820
18212001-12-27 Akim Demaille <akim@epita.fr>
1822
1823 * src/LR0.c (new_state): Recognize the final state by the fact it
1824 is reached by eoftoken.
1825 (insert_start_shifting_state, insert_eof_shifting_state)
1826 (insert_accepting_state, augment_automaton): Remove, since now
1827 these states are automatically computed from the initial state.
1828 (generate_states): Adjust.
1829 * src/print.c: When reporting a rule number to the user, substract
1830 1, so that the axiom rule is rule 0, and the first user rule is 1.
1831 * src/reduce.c: Likewise.
1832 * src/print_graph.c (print_core): For the time being, just as for
1833 the report, depend upon --trace-flags to dump the full set of
1834 items.
1835 * src/reader.c (readgram): Once the grammar read, insert the rule
1836 0: `$axiom: START-SYMBOL $'.
1837 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1838 number of the states has changed (the final state is no longer
1839 necessarily the last), catch up.
1840
18412001-12-27 Akim Demaille <akim@epita.fr>
1842
1843 Try to make the use of the eoftoken valid. Given that its value
1844 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1845 is used instead of > 0 where appropriate, (ii), depend upon nritems
1846 instead of the 0-sentinel.
1847
1848 * src/gram.h, src/gram.c (nritems): New.
1849 Expected to be duplication of nitems, but for the time being...
1850 * src/reader.c (packgram): Assert nritems and nitems are equal.
1851 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1852 * src/closure.c (print_closure, print_fderives): Likewise.
1853 * src/gram.c (ritem_print): Likewise.
1854 * src/print.c (print_core, print_grammar): Likewise.
1855 * src/print_graph.c: Likewise.
1856
18572001-12-27 Akim Demaille <akim@epita.fr>
1858
1859 * src/main.c (main): If there are complains after grammar
1860 reductions, then output the report anyway if requested, then die.
1861 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1862 * src/reader.c (eoftoken): New.
1863 (parse_token_decl): If the token being defined has value `0', it
1864 is the eoftoken.
1865 (packsymbols): No longer hack `tags' to insert `$' by hand.
1866 Be sure to preserve the value of the eoftoken.
1867 (reader): Make sure eoftoken is defined.
1868 Initialize nsyms to 0: now eoftoken is created just like the others.
1869 * src/print.c (print_grammar): Don't special case the eof token.
1870 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1871 lie anyway, albeit pleasant.
1872 * tests/calc.at: Exercise error messages with eoftoken.
1873 Change the grammar so that empty input is invalid.
1874 Adjust expectations.
1875 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1876
18772001-12-27 Akim Demaille <akim@epita.fr>
1878
1879 * configure.in: Check the protos of strchr ans strspn.
1880 Replace strchr if needed.
1881 * src/system.h: Provide the protos of strchr, strspn and memchr if
1882 missing.
1883 * lib/strchr.c: New.
1884 * src/reader.c (symbols_save): Use strchr.
1885
18862001-12-27 Akim Demaille <akim@epita.fr>
1887
1888 * src/print.c, src/print_graph.c (escape): New.
1889 Use it to quote the TAGS outputs.
1890 * src/print_graph.c (print_state): Now errors are in red, and
1891 reductions in green.
1892 Prefer high to wide: output the state number on a line of its own.
1893
18942001-12-27 Akim Demaille <akim@epita.fr>
1895
1896 * src/state.h, src/state.c (reductions_new): New.
1897 * src/LR0.c (set_state_table): Let all the states have a
1898 `reductions', even if reduced to 0.
1899 (save_reductions): Adjust.
1900 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1901 * src/print.c (print_reductions, print_actions): Adjust.
1902 * src/output.c (action_row): Adjust.
1903
19042001-12-27 Akim Demaille <akim@epita.fr>
1905
1906 * src/state.h, src/state.c (errs_new, errs_dup): New.
1907 * src/LR0.c (set_state_table): Let all the states have an errs,
1908 even if reduced to 0.
1909 * src/print.c (print_errs, print_reductions): Adjust.
1910 * src/output.c (output_actions, action_row): Adjust.
1911 * src/conflicts.c (resolve_sr_conflict): Adjust.
1912
19132001-12-27 Akim Demaille <akim@epita.fr>
1914
1915 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1916
19172001-12-27 Akim Demaille <akim@epita.fr>
1918
1919 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1920 * src/print.c: here.
1921 (lookaheadset, shiftset): New, used as additional storage by
1922 print_reductions.
1923 (print_results): Adjust.
1924 (print_shifts, print_gotos, print_errs): New, extracted from...
1925 (print_actions): here.
1926 * src/print_graph.c (print_actions): Remove dead code.
1927
19282001-12-27 Akim Demaille <akim@epita.fr>
1929
1930 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1931 `$n' and `@n'.
1932
19332001-12-27 Akim Demaille <akim@epita.fr>
1934
1935 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1936 (build_relations): Adjust.
1937
19382001-12-27 Akim Demaille <akim@epita.fr>
1939
1940 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1941 duplication.
1942
19432001-12-27 Akim Demaille <akim@epita.fr>
1944
1945 * src/reader.c (packgram): Catch nitems overflows.
1946
19472001-12-27 Akim Demaille <akim@epita.fr>
1948
1949 * src/files.c, src/files.h (guard_obstack): Remove.
1950 * src/output.c (output): Adjust.
1951 * src/reader.c (parse_braces): New, factoring...
1952 (copy_action, copy_guard): these two which are renamed as...
1953 (parse_action, parse_guard): these.
1954 As a voluntary consequence, using braces around guards is now
1955 mandatory.
1956
19572001-12-27 Akim Demaille <akim@epita.fr>
1958
1959 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1960 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1961 members.
1962 (symbol_list_new): Adjust.
1963 (copy_action): action_line is the first line, not the last.
1964 (copy_guard): Just as for actions, store the `action' only, not
1965 the switch/case/break flesh.
1966 Don't parse the user action that might follow the guard, let...
1967 (readgram): do it, i.e., now, there can be an action after a
1968 guard.
1969 In other words the guard is just explicitly optional.
1970 (packgram): Adjust.
1971 * src/output.c (guards_output): New.
1972 (output_parser): Call it when needed.
1973 (output): Also free the guard and attrs obstacks.
1974 * src/files.c, src/files.h (obstack_save): Remove.
1975 (output_files): Remove.
1976 As a result, if one needs the former `.act' file, using an
1977 appropriate skeleton which requires actions and guards is now
1978 required.
1979 * src/main.c (main): Adjust.
1980 * tests/semantic.at: New.
1981 * tests/regression.at: Use `input.y' as input file name.
1982 Avoid 8+3 problems by requiring input.c when the test needs the
1983 parser.
1984
19852001-12-27 Akim Demaille <akim@epita.fr>
1986
1987 * src/reader.c (symbol_list_new): Be sure to initialize all the
1988 fields.
1989
19902001-12-27 Akim Demaille <akim@epita.fr>
1991
1992 All the hacks using a final pseudo state are now useless.
1993
1994 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1995 * src/lalr.c (nLA): New.
1996 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1997 instead of lookaheadsp from the pseudo state (nstate + 1).
1998
19992001-12-27 Akim Demaille <akim@epita.fr>
2000
2001 * src/output.c (action_row, token_actions): Use a state_t instead
2002 of a integer, and nlookaheads instead of the following state's
2003 lookaheadsp.
2004
20052001-12-27 Akim Demaille <akim@epita.fr>
2006
2007 * src/conflicts.c (log_resolution, flush_shift)
2008 (resolve_sr_conflict, set_conflicts, solve_conflicts)
2009 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
2010 (conflicts_print, print_reductions): Use a state_t instead of an
2011 integer when referring to a state.
2012 As much as possible, depend upon nlookaheads, instead of the
2013 `lookaheadsp' member of the following state (since lookaheads of
2014 successive states are successive, the difference between state n + 1
2015 and n served as the number of lookaheads for state n).
2016 * src/lalr.c (add_lookback_edge): Likewise.
2017 * src/print.c (print_core, print_actions, print_state)
2018 (print_results): Likewise.
2019 * src/print_graph.c (print_core, print_actions, print_state)
2020 (print_graph): Likewise.
2021 * src/conflicts.h: Adjust.
2022
20232001-12-27 Akim Demaille <akim@epita.fr>
2024
2025 * src/bison.hairy: Formatting/comment changes.
2026 ANSIfy.
2027 Remove `register' indications.
2028 Add plenty of `static'.
2029
20302001-12-27 Akim Demaille <akim@epita.fr>
2031
2032 * src/output.c (prepare): Drop the muscle `ntbase' which
2033 duplicates ntokens.
2034 * src/bison.simple: Formatting/comment changes.
2035 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
2036 is an undocumented synonym.
2037
20382001-12-22 Akim Demaille <akim@epita.fr>
2039
2040 * src/output.c (output_table_data): Change the prototype to use
2041 `int' for array ranges: some invocations do pass an int, not a
2042 short.
2043 Reported by Wayne Green.
2044
20452001-12-22 Akim Demaille <akim@epita.fr>
2046
2047 Some actions of web2c.y are improperly triggered.
2048 Reported by Mike Castle.
2049
2050 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
2051 * tests/regression.at (Web2c): Rename as...
2052 (Web2c Report): this.
2053 (Web2c Actions): New.
2054
20552001-12-22 Akim Demaille <akim@epita.fr>
2056
2057 Reductions in web2c.y are improperly reported.
2058 Reported by Mike Castle.
2059
2060 * src/conflicts.c (print_reductions): Fix.
2061 * tests/regression.at (Web2c): New.
2062
20632001-12-18 Akim Demaille <akim@epita.fr>
2064
2065 Some host fail on `assert (!"foo")', which expands to
2066 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
2067 Reported by Nelson Beebee.
2068
2069 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
2070 `#define it_succeeded 0' and `assert (it_succeeded)'.
2071
20722001-12-17 Marc Autret <autret_m@epita.fr>
2073
2074 * src/bison.simple: Don't hard code the skeleton line and filename.
2075 * src/output.c (output_parser): Rename 'line' as 'output_line'.
2076 New line counter 'skeleton_line' (skeleton-line muscle).
2077
20782001-12-17 Paul Eggert <eggert@twinsun.com>
2079
2080 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2081 YYDEBUG must be defined to a nonzero value.
2082
2083 * src/bison.simple (yytname): Do not assume that the user defines
2084 YYDEBUG to a properly parenthesized expression.
2085
20862001-12-17 Akim Demaille <akim@epita.fr>
2087
2088 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2089 nlookaheads is a new member.
2090 Adjust all users.
2091 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2092 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2093 state.
2094
20952001-12-17 Akim Demaille <akim@epita.fr>
2096
2097 * src/files.h, src/files.c (open_files, close_files): Remove.
2098 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2099 let...
2100 * src/reader.c (reader): Do it.
2101
21022001-12-17 Akim Demaille <akim@epita.fr>
2103
2104 * src/conflicts.c (print_reductions): Formatting changes.
2105
21062001-12-17 Akim Demaille <akim@epita.fr>
2107
2108 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2109 (flush_reduce): New.
2110 (resolve_sr_conflict): Adjust.
2111
21122001-12-17 Akim Demaille <akim@epita.fr>
2113
2114 * src/output.c (output_obstack): Be static and rename as...
2115 (format_obstack): this, to avoid any confusion with files.c's
2116 output_obstack.
2117 * src/reader.h (muscle_obstack): Move to...
2118 * src/output.h: here, since it's defined in output.c.
2119
21202001-12-17 Akim Demaille <akim@epita.fr>
2121
2122 * src/output.c (action_row, save_column, default_goto)
2123 (sort_actions, matching_state, pack_vector): Better variable
2124 locality.
2125
21262001-12-17 Akim Demaille <akim@epita.fr>
2127
2128 * src/output.c: Various formatting changes.
2129
21302001-12-17 Akim Demaille <akim@epita.fr>
2131
2132 * src/files.c (output_files): Free the output_obstack.
2133 * src/main.c (main): Call print and print_graph conditionally.
2134 * src/print.c (print): Work unconditionally.
2135 * src/print_graph.c (print_graph): Work unconditionally.
2136 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2137
21382001-12-16 Marc Autret <autret_m@epita.fr>
2139
2140 * src/output.c (actions_output): Fix. When we use %no-lines,
2141 there is one less line per action.
2142
21432001-12-16 Marc Autret <autret_m@epita.fr>
2144
2145 * src/bison.simple: Remove a useless #line directive.
2146 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2147 * src/output.c (get_lines_number): New.
2148 (output_parser): Adjust, now takes care about the lines of a
2149 output muscles.
2150 Fix line numbering.
2151 (actions_output): Computes the number of lines taken by actions.
2152 (output_master_parser): Insert new skeleton which is the name of
2153 the output parser file name.
2154
21552001-12-15 Marc Autret <autret_m@epita.fr>
2156
2157 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2158
21592001-12-15 Marc Autret <autret_m@epita.fr>
2160
2161 * src/output.c (output_gram): Keep track of the hairy one.
2162
21632001-12-15 Akim Demaille <akim@epita.fr>
2164
2165 Make `make distcheck' work.
2166
2167 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2168 system.h which uses libgettext.h.
2169
21702001-12-15 Akim Demaille <akim@epita.fr>
2171
2172 * src/nullable.c (set_nullable): Useless rules must be skipped,
2173 otherwise, since we range over their symbols, we might look at a
2174 nonterminal which no longer ``exists'', i.e., it is not counted in
2175 `nvars', hence we overflow our arrays.
2176
21772001-12-15 Akim Demaille <akim@epita.fr>
2178
2179 The header can also be produced directly, without any obstack!
2180 Yahoo!
2181
2182 * src/files.c, src/files.h (defines_obstack): Remove.
2183 (compute_header_macro): Global.
2184 (defines_obstack_save): Remove.
2185 * src/reader.c (parse_union_decl): No longer output to
2186 defines_obstack: its content can be found in the `stype' muscle
2187 anyway.
2188 (output_token_translations): Merge into...
2189 (symbols_output): this.
2190 Rename as...
2191 (symbols_save): this.
2192 (reader): Adjust.
2193 * src/output.c (header_output): New.
2194 (output): Call it.
2195
21962001-12-15 Akim Demaille <akim@epita.fr>
2197
2198 * src/reader.c (parse_union_decl): Instead of handling two obstack
2199 simultaneously, use one to define the `stype' muscle, and use the
2200 value of the latter to fill defines_obstack.
2201 (copy_comment): Remove.
2202 (copy_comment2): Work for a single obstack.
2203 Rename as...
2204 (copy_comment): this.
2205
22062001-12-15 Akim Demaille <akim@epita.fr>
2207
2208 * src/lex.c, src/lex.h (xgetc): No longer static.
2209 * src/reader.c (parse_union_decl): Revamp.
2210
22112001-12-15 Akim Demaille <akim@epita.fr>
2212
2213 Still making progress in separating Bison into (i) input, (ii)
2214 process, (iii) output: now we can directly output the parser file
2215 without using table_obstack at all.
2216
2217 * src/files.c, src/files.h (table_obstack): Bye bye.
2218 (parser_file_name): New.
2219 * src/files.c (compute_output_file_names): Compute it.
2220 * src/output.c (actions_output, output_parser)
2221 (output_master_parser): To a file instead of an obstack.
2222
22232001-12-15 Akim Demaille <akim@epita.fr>
2224
2225 Attach actions to rules, instead of pre-outputting them to
2226 actions_obstack.
2227
2228 * src/gram.h (rule_t): action and action_line are new members.
2229 * src/reader.c (symbol_list): Likewise.
2230 (copy_action): Save the actions within the rule.
2231 (packgram): Save them in rule_table.
2232 * src/output.c (actions_output): New.
2233 (output_parser): Use it on `%%actions'.
2234 (output_rule_data): Don't free rule_table.
2235 (output): Do it.
2236 (prepare): Don't save the `action' muscle.
2237 * src/bison.simple: s/%%action/%%actions/.
2238
22392001-12-15 Akim Demaille <akim@epita.fr>
2240
2241 * src/reader.c (copy_action): When --yacc, don't append a `;'
2242 to the user action: let it fail if lacking.
2243 Suggested by Arnold Robbins and Tom Tromey.
2244
22452001-12-14 Akim Demaille <akim@epita.fr>
2246
2247 * src/lex.c (literalchar): Simply return the char you decoded, non
2248 longer mess around with obstacks and int pointers.
2249 Adjust all callers.
2250
22512001-12-14 Akim Demaille <akim@epita.fr>
2252
2253 * src/lex.c (literalchar): Don't escape the special characters,
2254 just decode them, and keep them as char (before, eol was output as
2255 the 2 char string `\n' etc.).
2256 * src/output.c (output_rule_data): Use quotearg to output the
2257 token strings.
2258
22592001-12-13 Paul Eggert <eggert@twinsun.com>
2260
2261 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2262 Do not infringe on the global user namespace when using C++.
2263 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2264 All uses of `fprintf' and `stderr' changed.
2265
2266 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2267
22682001-12-13 Akim Demaille <akim@epita.fr>
2269
2270 The computation of nullable is broken: it doesn't handle empty
2271 RHS's properly.
2272
2273 * tests/torture.at (GNU AWK Grammar): New.
2274 * tests/sets.at (Nullable): New.
2275 * src/nullable.c (set_nullable): Instead of blindly looping over
2276 `ritems', loop over the rules, and then over their rhs's.
2277
2278 Work around Autotest bugs.
2279
2280 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2281 frame, because Autotest understand lines starting with a `+' as
2282 traces from the shell. Then, they are not processed properly.
2283 Admittedly an Autotest bug, but we don't have time to wait for
2284 Autotest to catch up.
2285 * tests/regression.at (Broken Closure): Adjust to the new table
2286 frames.
2287 Move to...
2288 * tests/sets.at: here.
2289
22902001-12-13 Akim Demaille <akim@epita.fr>
2291
2292 * src/closure.c (closure): Use nrules instead of playing tricks
2293 with BITS_PER_WORD.
2294
22952001-12-13 Akim Demaille <akim@epita.fr>
2296
2297 * src/print.c (print_actions): Output the handling of `$' as the
2298 traces do: shifting the token EOF. Before EOF was treated as a
2299 nonterminal.
2300 * tests/regression.at: Adjust some tests.
2301 * src/print_graph.c (print_core): Complete the set of items via
2302 closure. The next-to-final and final states are still unsatisfying,
2303 but that's to be addressed elsewhere.
2304 No longer output the rule numbers, but do output the state number.
2305 A single loop for the shifts + gotos is enough, but picked a
2306 distinct color for each.
2307 (print_graph): Initialize and finalize closure.
2308
23092001-12-13 Akim Demaille <akim@epita.fr>
2310
2311 * src/reader.c (readgram): Remove dead code, an strip useless
2312 braces.
2313 (get_type): Remove, unused.
2314
23152001-12-12 Akim Demaille <akim@epita.fr>
2316
2317 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2318 on that of lib/error.c.
2319
23202001-12-12 Akim Demaille <akim@epita.fr>
2321
2322 Some hosts don't like `/' in includes.
2323
2324 * src/system.h: Include libgettext.h without qualifying the path.
2325 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2326 $(top_srcdir).
2327
23282001-12-11 Marc Autret <autret_m@epita.fr>
2329
2330 * src/output.c (output_parser): Remove useless muscle.
2331
23322001-12-11 Marc Autret <autret_m@epita.fr>
2333
2334 * src/bison.simple: Remove #line just before %%epilogue. It
2335 is now handled in ...
2336 * src/reader.c (read_additionnal_code): Add the output of a
2337 #line for the epilogue.
2338
23392001-12-10 Marc Autret <autret_m@epita.fr>
2340
2341 * src/reader.c (copy_definition): Re-use CPP-outed code which
2342 replace precedent remove.
2343 * src/bison.simple: Remove #line before %%prologue because
2344 %%input-line is wrong at this time.
2345
23462001-12-10 Marc Autret <autret_m@epita.fr>
2347
2348 * src/reader.c (symbols_output): Clean up.
2349 * src/output.c (output_gram, output): Clean up.
2350
23512001-12-10 Akim Demaille <akim@epita.fr>
2352
2353 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2354 * src/LR0.c (set_state_table): here.
2355 * src/lalr.c (lalr): Call it.
2356
23572001-12-10 Akim Demaille <akim@epita.fr>
2358
2359 * src/state.h (shifts): Remove the `number' member: shifts are
2360 attached to state, hence no longer need to be labelled with a
2361 state number.
2362
23632001-12-10 Akim Demaille <akim@epita.fr>
2364
2365 Now that states have a complete set of members, the linked list of
2366 shifts is useless: just fill directly the state's shifts member.
2367
2368 * src/state.h (shifts): Remove the `next' member.
2369 * src/LR0.c (first_state, last_state): Remove.
2370 Adjust the callers.
2371 (augment_automaton): Don't look for the shifts that must be added
2372 a shift on EOF: it is those of the state we looked for! But now,
2373 since shifts are attached, it is no longer needed to looking
2374 merely by its id: its number.
2375
23762001-12-10 Akim Demaille <akim@epita.fr>
2377
2378 * src/LR0.c (augment_automaton): Better variable locality.
2379 Remove an impossible branch: if there is a state corresponding to
2380 the start symbol being shifted, then there is shift for the start
2381 symbol from the initial state.
2382
23832001-12-10 Akim Demaille <akim@epita.fr>
2384
2385 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2386 only when appropriate: when insert_start_shifting_state' is not
2387 invoked.
2388 * tests/regression.at (Rule Line Numbers): Adjust.
2389
23902001-12-10 Akim Demaille <akim@epita.fr>
2391
2392 * src/LR0.c (augment_automaton): Now that all states have shifts,
2393 merge the two cases addition shifts to the initial state.
2394
23952001-12-10 Akim Demaille <akim@epita.fr>
2396
2397 * src/lalr.c (set_state_table): Move to...
2398 * src/LR0.c: here.
2399 * src/lalr.c (lalr): Don't call it...
2400 * src/LR0.c (generate_states): do it.
2401 * src/LR0.h (first_state): Remove, only the table is used.
2402
24032001-12-10 Akim Demaille <akim@epita.fr>
2404
2405 * src/LR0.h (first_shift, first_reduction): Remove.
2406 * src/lalr.c: Don't use first_shift: find shifts through the
2407 states.
2408
24092001-12-10 Akim Demaille <akim@epita.fr>
2410
2411 * src/LR0.c: Attach shifts to states as soon as they are
2412 computed.
2413 * src/lalr.c (set_state_table): Instead of assigning shifts to
2414 state, just assert that the mapping was properly done.
2415
24162001-12-10 Akim Demaille <akim@epita.fr>
2417
2418 * src/LR0.c (insert_start_shift): Rename as...
2419 (insert_start_shifting_state): this.
2420 (insert_eof_shifting_state, insert_accepting_state): New.
2421 (augment_automaton): Adjust.
2422 Better locality of the variables.
2423 When looking if the start_symbol is shifted from the initial
2424 state, using `while (... symbol != start_symbol ...)' sounds
2425 better than `while (... symbol < start_symbol ...)': If fail
2426 to see how the order between symbols could be relevant!
2427
24282001-12-10 Akim Demaille <akim@epita.fr>
2429
2430 * src/getargs.h: Don't declare `spec_name_prefix' and
2431 `spec_file_prefix', declared by src/files.h.
2432 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2433 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2434 * src/output.c (prepare): Adjust.
2435 * src/reader.c (symbols_output): Likewise.
2436 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2437
24382001-12-10 Akim Demaille <akim@epita.fr>
2439
2440 * src/muscle_tab.c (muscle_init): NULL is a better default than
2441 `"0"'.
2442
24432001-12-10 Akim Demaille <akim@epita.fr>
2444
2445 * src/reader.c (reader): Calling symbols_output once is enough.
2446
24472001-12-10 Akim Demaille <akim@epita.fr>
2448
2449 Now that states have a complete set of members, the linked list of
2450 reductions is useless: just fill directly the state's reductions
2451 member.
2452
2453 * src/state.h (struct reductions): Remove member `number' and
2454 `next'.
2455 * src/LR0.c (first_reduction, last_reduction): Remove.
2456 (save_reductions): Don't link the new reductions, store them in
2457 this_state.
2458 * src/lalr.c (set_state_table): No need to attach reductions to
2459 states, it's already done.
2460 * src/output.c (output_actions): No longer free the shifts, then
2461 the reductions, then the states: free all the states and their
2462 members.
2463
24642001-12-10 Akim Demaille <akim@epita.fr>
2465
2466 * src/options.c (OPTN, DRTV, BOTH): New.
2467 (option_table): Use them.
2468
2469 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2470 the job of system.h.
2471 * src/options.c: Don't include stdio.h and xalloc.h for the same
2472 reasons.
2473
24742001-12-10 Akim Demaille <akim@epita.fr>
2475
2476 * src/output.c (output, prepare): Make sure the values of the
2477 muscles `action' and `prologue' are 0-terminated.
2478
24792001-12-10 Akim Demaille <akim@epita.fr>
2480
2481 Clean up GCC warnings.
2482
2483 * src/reader.c (copy_action): `buf' is not used.
2484 (parse_skel_decl): Be static.
2485 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2486 * src/options.h (create_long_option_table): Have a real prototype.
2487 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2488 (hash_delete_at): Return const void *.
2489 Adjust casts to preserve the const.
2490
24912001-12-10 Akim Demaille <akim@epita.fr>
2492
2493 * configure.in: Require 2.52g.
2494 M4 is not needed, but AUTOM4TE is.
2495 * m4/m4.m4: Remove.
2496 * tests/Makefile.am: Adjust.
2497
24982001-12-10 Akim Demaille <akim@epita.fr>
2499
2500 One structure for states is enough, even though theoretically
2501 there are LR(0) states and LALR(1) states.
2502
2503 * src/lalr.h (state_t): Remove.
2504 (state_table): Be state_t **, not state_t *.
2505 * src/state.h (core, CORE_ALLOC): Rename as...
2506 (state_t, STATE_ALLOC): this.
2507 Add the LALR(1) members: shifts, reductions, errs.
2508 * src/LR0.c (state_table): Rename as...
2509 (state_hash): this, to avoid name clashes with the global
2510 `state_table'.
2511 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2512 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2513
25142001-12-10 Akim Demaille <akim@epita.fr>
2515
2516 Bison dumps core on bash.y.
2517 Reported by Pascal Bart.
2518
2519 * src/warshall.c (bitmatrix_print): New.
2520 (TC): Use it.
2521 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2522 j must be the outer loop.
2523 * tests/regression.at (Broken Closure): New.
2524
25252001-12-05 Akim Demaille <akim@epita.fr>
2526
2527 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2528 its argument.
2529