]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/output.c (output_skeleton): Be sure to allocate enough room
[bison.git] / ChangeLog
CommitLineData
670ddffd
AD
12002-05-28 Akim Demaille <akim@epita.fr>
2
3 * src/output.c (output_skeleton): Be sure to allocate enough room
4 for `/' _and_ for `\0' in full_skeleton.
5
769b430f
AD
62002-05-28 Akim Demaille <akim@epita.fr>
7
8 * data/bison.c++: Catch up with bison.simple:
9 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
12 and popping traces.
13
7067cb36
PH
142002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15
16 * src/output.c (output_skeleton): Put an explicit path in front of
17 the skeleton file name, rather than relying on the -I directory,
18 to partially alleviate effects of having a skeleton file lying around
19 in the current directory.
769b430f 20
4a713ec2
PH
212002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
22
769b430f 23 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
24 obstack_printf should be obstack_fgrow1.
25
b408954b
AD
262002-05-26 Akim Demaille <akim@epita.fr>
27
28 * src/state.h (state_t): `solved_conflicts' is a new member.
29 * src/LR0.c (new_state): Set it to 0.
30 * src/conflicts.h, src/conflicts.c (print_conflicts)
31 (free_conflicts, solve_conflicts): Rename as...
32 (conflicts_print, conflicts_free, conflicts_solve): these.
33 Adjust callers.
34 * src/conflicts.c (enum conflict_resolution_e)
35 (solved_conflicts_obstack): New, used by...
36 (log_resolution): this.
37 Adjust to attach the conflict resolution to each state.
38 Complete the description with the precedence/associativity
39 information.
40 (resolve_sr_conflict): Adjust.
41 * src/print.c (print_state): Output its solved_conflicts.
42 * tests/conflicts.at (Unresolved SR Conflicts)
43 (Solved SR Conflicts): Exercise --report=all.
44
a49aecd5
AD
452002-05-26 Akim Demaille <akim@epita.fr>
46
47 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
48 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
49 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
50 (token_number_t, item_number_as_token_number)
51 (token_number_as_item_number, muscle_insert_token_number_table):
52 Rename as...
53 (symbol_number_t, item_number_as_symbol_number)
54 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
55 these, since it is more appropriate.
56
5504898e
AD
572002-05-26 Akim Demaille <akim@epita.fr>
58
59 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
60 `Error:' lines.
61 * data/bison.simple (yystos) [YYDEBUG]: New.
62 (yyparse) [YYDEBUG]: Display the symbols which are popped during
63 error recovery.
64 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
65
ec3bc396
AD
662002-05-25 Akim Demaille <akim@epita.fr>
67
68 * doc/bison.texinfo (Debugging): Split into...
69 (Tracing): this new section, its former contents, and...
70 (Understanding): this new section.
71 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
72 by...
73 (report_flag): this.
74 Adjust all dependencies.
75 (report_args, report_types, report_argmatch): New.
76 (usage, getargs): Report/support -r, --report.
77 * src/options.h
78 (struct option_table_struct): Rename as..,
79 (struct option_table_s): this.
80 Rename the `set_flag' member to `flag' to match with getopt_long's
81 struct.
82 * src/options.c (option_table): Split verbose into an entry for
83 %verbose, and another for --verbose.
84 Support --report/-r, so remove -r from the obsolete --raw.
85 * src/print.c: Attach full item sets and lookaheads reports to
86 report_flag instead of trace_flag.
87 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
88
78df8250
PE
892002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
90 and Paul Eggert <eggert@twinsun.com>
769b430f 91
78df8250
PE
92 * data/bison.simple (yyparse): Correct error handling to conform to
93 POSIX and yacc. Specifically, after syntax error is discovered,
94 do not reduce further before shifting the error token.
95 Clean up the code a bit by removing the labels yyerrdefault,
96 yyerrhandle, yyerrpop.
97 * NEWS: Document the above.
98
c0c9ea05
PH
992002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
100
101 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
102 type; it isn't always big enough, since it doesn't necessarily
103 include non-terminals.
769b430f 104 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
105 the latter can be removed.
106 (yy_token_number_type): Remove, only one use.
107 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
108 don't use TokenNumberType as element type.
769b430f 109
c0c9ea05
PH
110 * tests/regression.at: Modify expected output to agree with change
111 to yyr1 and yytranslate.
769b430f 112
6390a83f
FK
1132002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
114
115 * src/reader.c (parse_action): Use copy_character instead of
116 obstack_1grow.
117
db7c8e9a
AD
1182002-05-13 Akim Demaille <akim@epita.fr>
119
120 * tests/regression.at (Token definitions): Prototype yylex and
121 yyerror.
122
fcc61800
PH
1232002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
124
158c687b 125 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
126 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
127 32-bit arithmetic.
128 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
129
5683e9b2
AD
1302002-05-07 Akim Demaille <akim@epita.fr>
131
132 * tests/synclines.at: Be sure to prototype yylex and yyerror to
133 avoid GCC warnings.
134
0c2d3f4c
AD
1352002-05-07 Akim Demaille <akim@epita.fr>
136
137 Kill GCC warnings.
138
139 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
140 over the RHS of each rule.
141 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
142 * src/state.h (state_t): Member `nitems' is unsigned short.
143 * src/LR0.c (get_state): Adjust.
144 * src/reader.c (packgram): Likewise.
145 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
146 `Type'.
147 (muscle_insert_int_table): Remove, unused.
148 (prepare_rules): Remove `max'.
149
1565b720
AD
1502002-05-06 Akim Demaille <akim@epita.fr>
151
152 * src/closure.c (print_firsts): Display of the symbol tags.
153 (bitmatrix_print): Move to...
154 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
155 here.
156 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
157
cfaee611
AD
1582002-05-06 Akim Demaille <akim@epita.fr>
159
160 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
161 hash_do_for_each.
162
458be8e0
AD
1632002-05-06 Akim Demaille <akim@epita.fr>
164
165 * src/LR0.c (new_state, get_state): Instead of using the global
166 `kernel_size' and `kernel_base', have two new arguments:
167 `core_size' and `core'.
168 Adjust callers.
169
a900a624
AD
1702002-05-06 Akim Demaille <akim@epita.fr>
171
172 * src/reader.c (packgram): No longer end `ritem' with a 0
173 sentinel: it is not used.
174
d4e7d3a1
AD
1752002-05-05 Akim Demaille <akim@epita.fr>
176
177 New experimental feature: display the lookaheads in the report and
178 graph.
179
180 * src/print (print_core): When --trace-flag, display the rules
181 lookaheads.
182 * src/print_graph.c (print_core): Likewise.
183 Swap the arguments.
184 Adjust caller.
185
39ceb25b
AD
1862002-05-05 Akim Demaille <akim@epita.fr>
187
188 * tests/torture.at (Many lookaheads): New test.
189
5372019f
AD
1902002-05-05 Akim Demaille <akim@epita.fr>
191
192 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
193 (GENERATE_MUSCLE_INSERT_TABLE): this.
194 (output_int_table, output_unsigned_int_table, output_short_table)
195 (output_token_number_table, output_item_number_table): Replace with...
196 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
197 (muscle_insert_short_table, muscle_insert_token_number_table)
198 (muscle_insert_item_number_table): these.
199 Adjust all callers.
200 (prepare_tokens): Don't free `translations', since...
201 * src/reader.h, src/reader.c (grammar_free): do it.
202 Move to...
203 * src/gram.h, src/gram.c (grammar_free): here.
204 * data/bison.simple, data/bison.c++: b4_token_number_max is now
205 b4_translate_max.
206
5df5f6d5
AD
2072002-05-05 Akim Demaille <akim@epita.fr>
208
209 * src/output.c (output_unsigned_int_table): New.
210 (prepare_rules): `i' is unsigned.
211 `prhs', `rline', `r2' are unsigned int.
212 Rename muscle `rhs_number_max' as `rhs_max'.
213 Output muscles `prhs_max', `rline_max', and `r2_max'.
214 Free rline and r1.
215 * data/bison.simple, data/bison.c++: Adjust to use these muscles
216 to compute types instead of constant types.
217 * tests/regression.at (Web2c Actions): Adjust.
218
b87f8b21
AD
2192002-05-04 Akim Demaille <akim@epita.fr>
220
221 * src/symtab.h (SALIAS, SUNDEF): Rename as...
222 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
223 Adjust dependencies.
224 * src/output.c (token_definitions_output): Be sure not to output a
225 `#define 'a'' when fed with `%token 'a' "a"'.
226 * tests/regression.at (Token definitions): New.
227
8bb936e4
PE
2282002-05-03 Paul Eggert <eggert@twinsun.com>
229
230 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
231 for K&R C.
232
2332002-05-03 gettextize <bug-gnu-gettext@gnu.org>
234
235 * Makefile.am (SUBDIRS): Remove intl.
236 (EXTRA_DIST): Add config/config.rpath.
237
53c71a12
AD
2382002-05-03 Akim Demaille <akim@epita.fr>
239
240 * data/bison.simple (m4_if): Don't output empty enums.
241 And actually, output valid enum definitions :(.
242
289dd0cf
AD
2432002-05-03 Akim Demaille <akim@epita.fr>
244
245 * configure.bat: Remove, completely obsolete.
246 * Makefile.am (EXTRA_DIST): Adjust.
247 Don't distribute config.rpath...
248 * config/Makefile.am (EXTRA_DIST): Do it.
249
db85e524
AD
2502002-05-03 Akim Demaille <akim@epita.fr>
251
252 * configure.in (GETTEXT_VERSION): New.
253 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
254
83ccf991
AD
2552002-05-03 Akim Demaille <akim@epita.fr>
256
257 * data/bison.simple (b4_token_enum): New.
258 (b4_token_defines): Use it to output tokens both as #define and
259 enums.
260 Suggested by Paul Eggert.
261 * src/output.c (token_definitions_output): Don't output spurious
262 white spaces.
263
1f418995
AD
2642002-05-03 Akim Demaille <akim@epita.fr>
265
266 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
267
45119f04
RA
2682002-05-02 Robert Anisko <robert@lrde.epita.fr>
269
270 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
271 Update the stack class, give a try to deque as the default container.
272
b2d52318
AD
2732002-05-02 Akim Demaille <akim@epita.fr>
274
275 * data/bison.simple (yyparse): Do not implement @$ = @1.
276 (YYLLOC_DEFAULT): Adjust to do it.
277 * doc/bison.texinfo (Location Default Action): Fix.
278
3a8b4109
AD
2792002-05-02 Akim Demaille <akim@epita.fr>
280
281 * src/reader.c (parse_braces): Merge into...
282 (parse_action): this.
283
84614e13
AD
2842002-05-02 Akim Demaille <akim@epita.fr>
285
286 * configure.in (ALL_LINGUAS): Remove.
287 * po/LINGUAS, hr.po: New.
288
fdbcd8e2
AD
2892002-05-02 Akim Demaille <akim@epita.fr>
290
291 Remove the so called hairy (semantic) parsers.
292
293 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
294 * src/gram.h, src/gram.c (semantic_parser): Remove.
295 (rule_t): Remove the guard and guard_line members.
296 * src/lex.h (token_t): remove tok_guard.
297 * src/options.c (option_table): Remove %guard and %semantic_parser
298 support.
299 * src/output.c, src/output.h (guards_output): Remove.
300 (prepare): Adjust.
301 (token_definitions_output): Don't output the `T'
302 tokens (???).
303 (output_skeleton): Don't output the guards.
304 * src/files.c, src/files.c (attrsfile): Remove.
305 * src/reader.c (symbol_list): Remove the guard and guard_line
306 members.
307 Adjust dependencies.
308 (parse_guard): Remove.
309 * data/bison.hairy: Remove.
310 * doc/bison.texinfo (Environment Variables): Remove occurrences of
311 BISON_HAIRY.
312
82b6cb3f
AD
3132002-05-02 Akim Demaille <akim@epita.fr>
314
315 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
316 (parse_guard): Rename the formal argument `stack_offset' as
317 `rule_length', which is more readable.
318 Adjust callers.
319 (copy_at, copy_dollar): Instead of outputting the hard coded
320 values of $$, $n and so forth, output invocation to b4_lhs_value,
321 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
322 Note: this patch partially drops `semantic-parser' support: it
323 always does `rule_length - n', where semantic parsers ought to
324 always use `-n'.
82b6cb3f
AD
325 * data/bison.simple, data/bison.c++ (b4_lhs_value)
326 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
327
6cbfbcc5
AD
3282002-05-02 Akim Demaille <akim@epita.fr>
329
330 * configure.in (AC_INIT): Bump to 1.49b.
331 (AM_INIT_AUTOMAKE): Short invocation.
332
b8548114
AD
3332002-05-02 Akim Demaille <akim@epita.fr>
334
335 Version 1.49a.
336
c20cd1fa
AD
3372002-05-01 Akim Demaille <akim@epita.fr>
338
339 * src/skeleton.h: Remove.
340
8a9566d4
AD
3412002-05-01 Akim Demaille <akim@epita.fr>
342
343 * src/skeleton.h: Fix the #endif.
344 Reported by Magnus Fromreide.
345
8c6d399a
PE
3462002-04-26 Paul Eggert <eggert@twinsun.com>
347
348 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
349 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 350 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 351
2b7ed18a
RA
3522002-04-25 Robert Anisko <robert@lrde.epita.fr>
353
354 * src/scan-skel.l: Postprocess quadrigraphs.
355
356 * src/reader.c (copy_character): New function, used to output
357 single characters while replacing `[' and `]' with quadrigraphs, to
358 avoid troubles with M4 quotes.
359 (copy_comment): Output characters with copy_character.
360 (read_additionnal_code): Likewise.
361 (copy_string2): Likewise.
362 (copy_definition): Likewise.
363
364 * tests/calc.at: Exercise M4 quoting.
365
34a89c50
AD
3662002-04-25 Akim Demaille <akim@epita.fr>
367
368 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
369 between `!' and the command.
370 Reported by Paul Eggert.
371
0dd1580a
RA
3722002-04-24 Robert Anisko <robert@lrde.epita.fr>
373
374 * tests/calc.at: Exercise prologue splitting.
375
376 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
377 `b4_post_prologue' instead of `b4_prologue'.
378
379 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
380 muscles.
381 (output): Free pre_prologue_obstack and post_prologue_obstack.
382 * src/files.h, src/files.c (attrs_obstack): Remove.
383 (pre_prologue_obstack, post_prologue_obstack): New.
384 * src/reader.c (copy_definition): Add a parameter to specify the
385 obstack to fill, instead of using attrs_obstack unconditionally.
386 (read_declarations): Pass pre_prologue_obstack to copy_definition if
387 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
388
83c1796f
PE
3892002-04-23 Paul Eggert <eggert@twinsun.com>
390
391 * data/bison.simple: Remove unnecessary commentary and white
392 space differences from 1_29-branch.
393 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
394
395 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
396 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
397 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
398 constructors or destructors.
399
400 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
401
1207eeac
AD
4022002-04-23 Akim Demaille <akim@epita.fr>
403
404 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
405 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
406 location with columns.
407 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
408 All reported by Paul Eggert.
409
78ab8f67
AD
4102002-04-22 Akim Demaille <akim@epita.fr>
411
412 * src/reduce.c (dump_grammar): Move to...
413 * src/gram.h, src/gram.c (grammar_dump): here.
414 Be sure to separate long item numbers.
415 Don't read the members of a rule's prec if its nil.
416
133c20e2
AD
4172002-04-22 Akim Demaille <akim@epita.fr>
418
419 * src/output.c (table_size, table_grow): New.
420 (MAXTABLE): Remove, replace uses with table_size.
421 (pack_vector): Instead of dying when the table is too big, grow it.
422
9515e8a7
AD
4232002-04-22 Akim Demaille <akim@epita.fr>
424
425 * data/bison.simple (yyr1): Its type is that of a token number.
426 * data/bison.c++ (r1_): Likewise.
427 * tests/regression.at (Web2c Actions): Adjust.
428
23c5a174
AD
4292002-04-22 Akim Demaille <akim@epita.fr>
430
431 * src/reader.c (token_translations_init): 256 is now the default
432 value for the error token, i.e., it will be assigned another
433 number if the user assigned 256 to one of her tokens.
434 (reader): Don't force 256 to error.
435 * doc/bison.texinfo (Symbols): Adjust.
436 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
437 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
438 etc. instead of 10, 20, 30 (which was used to `jump' over error
439 (256) and undefined (2)).
440
5fbb0954
AD
4412002-04-22 Akim Demaille <akim@epita.fr>
442
443 Propagate more token_number_t.
444
445 * src/gram.h (token_number_as_item_number)
446 (item_number_as_token_number): New.
447 * src/output.c (GENERATE_OUTPUT_TABLE): New.
448 Use it to create output_item_number_table and
449 output_token_number_table.
450 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
451 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
452 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
453 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
454
4f940944
AD
4552002-04-22 Akim Demaille <akim@epita.fr>
456
457 * src/output.h, src/output.c (get_lines_number): Remove.
458
3ded9a63
AD
4592002-04-19 Akim Demaille <akim@epita.fr>
460
461 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
462 as Lex/Flex'.
463 (Debugging): More details about enabling the debugging features.
464 (Table of Symbols): Describe $$, $n, @$, and @n.
465 Suggested by Tim Josling.
466
e0c471a9
AD
4672002-04-19 Akim Demaille <akim@epita.fr>
468
469 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
470
fecc10cd
AD
4712002-04-10 Akim Demaille <akim@epita.fr>
472
473 * src/system.h: Rely on HAVE_LIMITS_H.
474 Suggested by Paul Eggert.
475
51dec47b
AD
4762002-04-09 Akim Demaille <akim@epita.fr>
477
478 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
479 full stderr, and strip it according to the bison options, instead
480 of composing the error message from different bits.
481 This makes it easier to check for several error messages.
482 Adjust all the invocations.
483 Add an invocation exercising the error token.
484 Add an invocation demonstrating a stupid error message.
485 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
486 Adjust the tests.
487 Error message are for stderr, not stdout.
488
007a50a4
AD
4892002-04-09 Akim Demaille <akim@epita.fr>
490
491 * src/gram.h, src/gram.c (error_token_number): Remove, use
492 errtoken->number.
493 * src/reader.c (reader): Don't specify the user token number (2)
494 for $undefined, as it uselessly prevents using it.
495 * src/gram.h (token_number_t): Move to...
496 * src/symtab.h: here.
497 (state_t.number): Is a token_number_t.
498 * src/print.c, src/reader.c: Use undeftoken->number instead of
499 hard coded 2.
500 (Even though this 2 is not the same as above: the number of the
501 undeftoken remains being 2, it is its user token number which
502 might not be 2).
503 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
504 `user_token_number_max'.
505 Output `undef_token_number'.
506 * data/bison.simple, data/bison.c++: Use them.
507 Be sure to map invalid yylex return values to
508 `undef_token_number'. This saves us from gratuitous SEGV.
509
510 * tests/conflicts.at (Solved SR Conflicts)
511 (Unresolved SR Conflicts): Adjust.
512 * tests/regression.at (Web2c Actions): Adjust.
513
06446ccf
AD
5142002-04-08 Akim Demaille <akim@epita.fr>
515
516 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
517 Adding #line.
518 Remove the duplicate `typedefs'.
519 (RhsNumberType): Fix the declaration and various other typos.
520 Use __ofile__.
521 * data/bison.simple: Use __ofile__.
522 * src/scan-skel.l: Handle __ofile__.
523
62a3e4f0
AD
5242002-04-08 Akim Demaille <akim@epita.fr>
525
526 * src/gram.h (item_number_t): New, the type of item numbers in
527 RITEM. Note that it must be able to code symbol numbers as
528 positive number, and the negation of rule numbers as negative
529 numbers.
530 Adjust all dependencies (pretty many).
531 * src/reduce.c (rule): Remove this `short *' pointer: use
532 item_number_t.
533 * src/system.h (MINSHORT, MAXSHORT): Remove.
534 Include `limits.h'.
535 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
536 (shortcpy): Remove.
537 (MAXTABLE): Move to...
538 * src/output.c (MAXTABLE): here.
539 (prepare_rules): Use output_int_table to output rhs.
540 * data/bison.simple, data/bison.c++: Adjust.
541 * tests/torture.at (Big triangle): Move the limit from 254 to
542 500.
543 * tests/regression.at (Web2c Actions): Ajust.
544
545 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
546 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
547 passes, but produces negative #line number, once fixed, GCC is
548 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
549 C), it passes.
550 * src/state.h (state_h): Code input lines on ints, not shorts.
551
bb88b0fc
AD
5522002-04-08 Akim Demaille <akim@epita.fr>
553
554 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
555 and then the grammar.
556
9a636f47
AD
5572002-04-08 Akim Demaille <akim@epita.fr>
558
559 * src/system.h: No longer using strndup.
560
680e8701
AD
5612002-04-07 Akim Demaille <akim@epita.fr>
562
563 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
564 * src/output.c (output_table_data): Return the longest number.
565 (prepare_tokens): Output `token_number_max').
566 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
567 New.
568 Use them to define yy_token_number_type/TokenNumberType.
569 Use this type for yytranslate.
570 * tests/torture.at (Big triangle): Push the limit from 124 to
571 253.
572 * tests/regression.at (Web2c Actions): Adjust.
573
817e9f41
AD
5742002-04-07 Akim Demaille <akim@epita.fr>
575
576 * tests/torture.at (Big triangle): New.
577 (GNU AWK Grammar, GNU Cim Grammar): Move to...
578 * tests/existing.at: here.
579
5123689b
AD
5802002-04-07 Akim Demaille <akim@epita.fr>
581
582 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
583 nritems.
584 Adjust dependencies.
585
f3849179
AD
5862002-04-07 Akim Demaille <akim@epita.fr>
587
588 * src/reader.c: Normalize increments to prefix form.
589
bd02036a
AD
5902002-04-07 Akim Demaille <akim@epita.fr>
591
592 * src/reader.c, symtab.c: Remove debugging code.
593
db8837cb
AD
5942002-04-07 Akim Demaille <akim@epita.fr>
595
596 Rename all the `bucket's as `symbol_t'.
597
598 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
599 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
600 * src/symtab.c, src/symtab.h (bucket): Rename as...
601 (symbol_t): this.
602 (symbol_list_new, bucket_check_defined, bucket_make_alias)
603 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
604 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
605 (buckets_new, buckets_free, buckets_do): Rename as...
606 (symbol_list_new, symbol_check_defined, symbol_make_alias)
607 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
608 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
609 (symbols_new, symbols_free, symbols_do): these.
610
72a23c97
AD
6112002-04-07 Akim Demaille <akim@epita.fr>
612
613 Use lib/hash for the symbol table.
614
615 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
616 EOF.
617 * src/lex.c (lex): Set the `number' member of new terminals.
618 * src/reader.c (bucket_check_defined, bucket_make_alias)
619 (bucket_check_alias_consistence, bucket_translation): New.
620 (reader, grammar_free, readgram, token_translations_init)
621 (packsymbols): Adjust.
622 (reader): Number the predefined tokens.
623 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
624 for predefined tokens.
625 * src/symtab.h (bucket): Remove all the hash table related
626 members.
627 * src/symtab.c (symtab): Replace by...
628 (bucket_table): this.
629 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
630 (buckets_new, buckets_do): New.
631
280a38c3
AD
6322002-04-07 Akim Demaille <akim@epita.fr>
633
634 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
635 (start_symbol, max_user_token_number, semantic_parser)
636 (error_token_number): Initialize.
637 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
638 Initialize.
639 (reader): Don't.
640 (errtoken, eoftoken, undeftoken, axiom): Extern.
641
03b31c0c
AD
6422002-04-07 Akim Demaille <akim@epita.fr>
643
644 * src/gram.h (rule_s): prec and precsym are now pointers
645 to the bucket giving the priority/associativity.
646 Member `associativity' removed: useless.
647 * src/reduce.c, src/conflicts.c: Adjust.
648
8b3df748
AD
6492002-04-07 Akim Demaille <akim@epita.fr>
650
651 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
652 Properly escape the symbols' TAG when outputting them.
653
e601aa1d
AD
6542002-04-07 Akim Demaille <akim@epita.fr>
655
656 * src/lalr.h (LA): Is a bitsetv, not bitset*.
657
b0299a2e
AD
6582002-04-07 Akim Demaille <akim@epita.fr>
659
660 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
661 (LArule): this, which is an array to rule_t*.
662 * src/print.c, src/conflicts.c: Adjust.
663
d7e1f00c
AD
6642002-04-07 Akim Demaille <akim@epita.fr>
665
666 * src/gram.h (rule_t): Rename `number' as `user_number'.
667 `number' is a new member.
668 Adjust dependencies.
669 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
670
cc9305dd
AD
6712002-04-07 Akim Demaille <akim@epita.fr>
672
673 As a result of the previous patch, it is no longer needed
674 to reorder ritem itself.
675
676 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
677
b0940840
AD
6782002-04-07 Akim Demaille <akim@epita.fr>
679
680 Be sure never to walk through RITEMS, but use only data related to
681 the rules themselves. RITEMS should be banished.
682
683 * src/output.c (output_token_translations): Rename as...
684 (prepare_tokens): this.
685 In addition to `translate', prepare the muscles `tname' and
686 `toknum', which were handled by...
687 (output_rule_data): this.
688 Remove, and move the remainder of its outputs into...
689 (prepare_rules): this new routines, which also merges content from
690 (output_gram): this.
691 (prepare_rules): Be sure never to walk through RITEMS.
692 (output_stos): Rename as...
693 (prepare_stos): this.
694 (output): Always invoke prepare_states, after all, just don't use it
695 in the output if you don't need it.
696
643a5994
AD
6972002-04-07 Akim Demaille <akim@epita.fr>
698
699 * src/LR0.c (new_state): Display `nstates' as the name of the
700 newly created state.
701 Adjust to initialize first_state and last_state if needed.
702 Be sure to distinguish the initial from the final state.
703 (new_states): Create the itemset of the initial state, and use
704 new_state.
705 * src/closure.c (closure): Now that the initial state has its
706 items properly set, there is no need for a special case when
707 creating `ruleset'.
708
709 As a result, now the rule 0, reducing to $axiom, is visible in the
710 outputs. Adjust the test suite.
711
712 * tests/conflicts.at (Solved SR Conflicts)
713 (Unresolved SR Conflicts): Adjust.
714 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
715 * tests/conflicts.at (S/R in initial): New.
716
b4c4ccc2
AD
7172002-04-07 Akim Demaille <akim@epita.fr>
718
719 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
720 the RHS of the rules.
721 * src/output.c (output_gram): Likewise.
722
bba97eb2
AD
7232002-04-07 Akim Demaille <akim@epita.fr>
724
725 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
726 bucket.
727 Adjust all dependencies.
728 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
729 `number' of the buckets too.
730 * src/gram.h: Include `symtab.h'.
731 (associativity): Move to...
732 * src/symtab.h: here.
733 No longer include `gram.h'.
734
c3b407f4
AD
7352002-04-07 Akim Demaille <akim@epita.fr>
736
737 * src/gram.h, src/gram.c (rules_rhs_length): New.
738 (ritem_longest_rhs): Use it.
739 * src/gram.h (rule_t): `number' is a new member.
740 * src/reader.c (packgram): Set it.
741 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
742 the end of `rules', and count them out of `nrules'.
743 (reduce_output, dump_grammar): Adjust.
744 * src/print.c (print_grammar): It is no longer needed to check for
745 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
746 * tests/reduce.at (Reduced Automaton): New test.
747
11652ab3
AD
7482002-04-07 Akim Demaille <akim@epita.fr>
749
750 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
751 lacking `+ 1' to nrules, Bison reported as useless a token if it
752 was used solely to set the precedence of the last rule...
753
26b23c1a
AD
7542002-04-07 Akim Demaille <akim@epita.fr>
755
756 * data/bison.c++, data/bison.simple: Don't output the current file
757 name in #line, to avoid useless diffs between two identical
758 outputs under different names.
759
18bcecb0
AD
7602002-04-07 Akim Demaille <akim@epita.fr>
761
762 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
763 Normalize loops to using `< nrules + 1', not `<= nrules'.
764
fa770c86
AD
7652002-04-07 Akim Demaille <akim@epita.fr>
766
767 * TODO: Update.
768
d9b739c3
AD
7692002-04-07 Akim Demaille <akim@epita.fr>
770
771 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
772 bucket.value as bucket.number.
773
99013900
AD
7742002-04-07 Akim Demaille <akim@epita.fr>
775
776 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
777 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
778 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
779 RHS, instead of being an index in RITEMS.
780
e966383b
PE
7812002-04-04 Paul Eggert <eggert@twinsun.com>
782
783 * doc/bison.texinfo: Update copyright date.
784 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
785 (Symbols): Warn about running Bison in one character set,
786 but compiling and/or running in an incompatible one.
787 Warn about character code 256, too.
788
7892002-04-03 Paul Eggert <eggert@twinsun.com>
790
791 * src/bison.data (YYSTACK_ALLOC): Depend on whether
792 YYERROR_VERBOSE is nonzero, not whether it is defined.
793
794 Merge changes from bison-1_29-branch.
c307773e 795
8d6c48b9
PE
7962002-03-20 Paul Eggert <eggert@twinsun.com>
797
798 Merge fixes from Debian bison_1.34-1.diff.
799
800 * configure.in (AC_PREREQ): 2.53.
801
e53c6322
AD
8022002-03-20 Akim Demaille <akim@epita.fr>
803
804 * src/conflicts.c (log_resolution): Argument `resolution' is const.
805
9ffbeca7
PE
8062002-03-19 Paul Eggert <eggert@twinsun.com>
807
21db0b2a
PE
808 * src/bison.simple (YYCOPY): New macro.
809 (YYSTACK_RELOCATE): Use it.
810 Remove Type arg; no longer needed. All callers changed.
811 (yymemcpy): Remove; no longer needed.
812
9ffbeca7
PE
813 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
814 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
815
642cb8f8
AD
8162002-03-19 Akim Demaille <akim@epita.fr>
817
818 Test and fix the #line outputs.
819
820 * tests/atlocal.at (GCC): New.
821 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
822 (Prologue synch line, ,%union synch line, Postprologue synch line)
823 (Action synch line, Epilogue synch line): New tests.
824 * src/reader.c (parse_union_decl): Define the muscle stype_line.
825 * data/bison.simple, data/bison.c++: Use it.
826
3c31a486
AD
8272002-03-19 Akim Demaille <akim@epita.fr>
828
829 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
830 (Solved SR Conflicts, %expect not enough, %expect right)
831 (%expect too much): Move to...
832 * tests/conflicts.at: this new file.
833
0d8bed56
AD
8342002-03-19 Akim Demaille <akim@epita.fr>
835
836 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
837 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
838 that we can move to enums for instance.
839 * src/output.c (token_definitions_output): Output a list of
840 `token-name, token-number' instead of the #define.
841 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
842
9208d17f
AD
8432002-03-14 Akim Demaille <akim@epita.fr>
844
845 Use Gettext 0.11.1.
846
af27eacb
RA
8472002-03-09 Robert Anisko <robert@lrde.epita.fr>
848
849 * data/bison.c++: Make the user able to add members to the generated
850 parser by subclassing.
851
9101a310
RA
8522002-03-05 Robert Anisko <robert@lrde.epita.fr>
853
854 * src/reader.c (read_additionnal_code): `c' should be an integer, not
855 a character.
856 Reported by Nicolas Tisserand and Nicolas Burrus.
857
fff9bf0b
RA
8582002-03-04 Robert Anisko <robert@lrde.epita.fr>
859
860 * src/reader.c: Warn about lacking semi-colons, do not complain.
861
64dba31e
RA
8622002-03-04 Robert Anisko <robert@lrde.epita.fr>
863
864 * data/bison.c++: Remove a debug line.
865
374f5a14
RA
8662002-03-04 Robert Anisko <robert@lrde.epita.fr>
867
868 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
869 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
870 provide a default implementation.
871
bfcf1f3a
AD
8722002-03-04 Akim Demaille <akim@epita.fr>
873
874 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
875 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
876 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
877 * tests/semantic.at (Parsing Guards): Similarly.
878 * src/reader.at (readgram): Complain if the last rule is not ended
879 with a semi-colon.
880
65ccf9fc
AD
8812002-03-04 Akim Demaille <akim@epita.fr>
882
883 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
884 * src/closure.c: here.
885 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
886 RTC.
887 * src/warshall.h, src/warshall.c: Remove.
888 * tests/sets.at (Broken Closure): Adjust.
889
d0039cbc
AD
8902002-03-04 Akim Demaille <akim@epita.fr>
891
892 * src/output.c (output_skeleton): tempdir is const.
893 bytes_read is unused.
894
345cea78
AD
8952002-03-04 Akim Demaille <akim@epita.fr>
896
897 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
898 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
899 Update.
900 From Michael Hayes.
901
564801f7
AD
9022002-03-04 Akim Demaille <akim@epita.fr>
903
904 * src/closure.c (closure): `r' is unused.
905
e5352bc7
AD
9062002-03-04 Akim Demaille <akim@epita.fr>
907
908 * tests/sets.at (Broken Closure): Add the ending `;'.
909 * src/reader.at (readgram): Complain if a rule is not ended with a
910 semi-colon.
911
914feea9
AD
9122002-03-04 Akim Demaille <akim@epita.fr>
913
914 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
915 (count_sr_conflicts): Use bitset_count.
916 * src/reduce.c (inaccessable_symbols): Ditto.
917 (bits_size): Remove.
918 * src/warshall.h, src/warshall.c: Convert to bitsetv.
919
f0250de6
AD
9202002-03-04 Akim Demaille <akim@epita.fr>
921
922 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
923 * src/reduce.c: Remove the `bitset_zero's following the
924 `bitset_create's, as now it is performed by the latter.
925
ef017502
AD
9262002-03-04 Akim Demaille <akim@epita.fr>
927
928 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
929 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
930 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
931 latest sources from Michael.
932
76514394
AD
9332002-03-04 Akim Demaille <akim@epita.fr>
934
935 * src/output.c (output): Don't free the grammar.
936 * src/reader.c (grammar_free): New.
937 * src/main.c (main): Call it and don't free symtab here.
938
55024580
AD
9392002-03-04 Akim Demaille <akim@epita.fr>
940
941 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
942 before returning.
943 Reported by Benoit Perrot.
944
f9abaa2c
AD
9452002-03-04 Akim Demaille <akim@epita.fr>
946
947 Use bitset operations when possible, not loops over bits.
948
949 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
950 bitset_or.
951 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
952 * src/reduce.c (useless_nonterminals): Formatting changes.
953 * src/warshall.c (TC): Use bitset_or.
954
0e721e75
AD
9552002-03-04 Akim Demaille <akim@epita.fr>
956
957 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
958 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
959 Ditto.
960
0fb1ffb1
AD
9612002-03-04 Akim Demaille <akim@epita.fr>
962
963 * src/lalr.c (F): Now a bitset*.
964 Adjust all dependencies.
965
b86796bf
AD
9662002-03-04 Akim Demaille <akim@epita.fr>
967
968 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
969 Adjust all dependencies.
970
602bbf31
AD
9712002-03-04 Akim Demaille <akim@epita.fr>
972
973 * src/L0.c, src/LR0.h (nstates): Be size_t.
974 Adjust comparisons (signed vs unsigned).
975 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
976 bitset*.
977 Adjust all dependencies.
978
d8a0245c
AD
9792002-03-04 Akim Demaille <akim@epita.fr>
980
981 * src/closure.c (firsts): Now, also a bitset.
982 Adjust all dependencies.
983 (varsetsize): Remove, now unused.
984 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
985
34ba9743
AD
9862002-03-04 Akim Demaille <akim@epita.fr>
987
988 * src/print.c: Convert to use bitset.h, not hand coded iterations
989 over ints.
990
ed86e78c
AD
9912002-03-04 Akim Demaille <akim@epita.fr>
992
993 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
994
dfdb1797
AD
9952002-03-04 Akim Demaille <akim@epita.fr>
996
997 * src/closure.c (ruleset): Be a bitset.
998 (rulesetsize): Remove.
999
7086e707
AD
10002002-03-04 Akim Demaille <akim@epita.fr>
1001
1002 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1003 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1004 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1005 * src/closure.c (fderives): Be an array of bitsets.
1006
98254360
RA
10072002-02-28 Robert Anisko <robert@lrde.epita.fr>
1008
1009 * data/bison.c++: Merge the two generated headers. Insert a copyright
1010 notice in each output file.
1011
a75c057f
AD
10122002-02-28 Akim Demaille <akim@epita.fr>
1013
1014 * data/bison.c++: Copy the prologue of bison.simple to fetch
1015 useful M4 definitions, such as b4_header_guard.
1016
06b00abc
AD
10172002-02-25 Akim Demaille <akim@epita.fr>
1018
1019 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
1020 translator friendly scheme for the bgr
1021 copyright notice.
06b00abc 1022
70e7d534
AD
10232002-02-25 Akim Demaille <akim@epita.fr>
1024
1025 * src/output.c (header_output): Remove, now handled completely via
1026 M4.
1027
abe017f6
AD
10282002-02-25 Akim Demaille <akim@epita.fr>
1029
1030 * m4/m4.m4: New, from CVS Autoconf.
1031 * configure.in: Invoke it.
1032 * src/output.c (output_skeleton): Use its result instead of the
1033 hard coded name.
1034
381fb12e
AD
10352002-02-25 Akim Demaille <akim@epita.fr>
1036
1037 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1038 Fileutils 4.1.5.
1039 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1040 * src/output.c (output_skeleton): Use mkstemp to create a real
1041 temporary file.
1042 Move the filling of `skeleton' and its muscle to...
1043 (prepare): here.
1044 (output): Move the definition of the prologue muscle to...
1045 (prepare): here.
1046 * src/system.h (DEFAULT_TMPDIR): New.
1047
6f38107f
PE
10482002-02-14 Paul Eggert <eggert@twinsun.com>
1049
1050 Remove the support for C++ namespace cleanliness; it was
1051 causing more problems than it was curing, since it didn't work
1052 properly on some nonstandard C++ compilers. This can wait
1053 for a proper C++ parser.
1054
1055 * NEWS: Document this.
1056 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1057 of C++, as it's treated like C now.
1058 * src/bison.simple (YYSTD): Remove.
1059 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1060 Treat C++ just like Standard C instead of trying to support
1061 namespace cleanliness.
1062
80cce3da
AD
10632002-02-14 Akim Demaille <akim@epita.fr>
1064
1065 * tests/regression.at (else): Adjust to Andreas' change.
1066
842e8679
AD
10672002-02-14 Akim Demaille <akim@epita.fr>
1068
1069 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1070
4bda3f10
AD
10712002-02-13 Andreas Schwab <schwab@suse.de>
1072
1073 * src/output.c (output_rule_data): Don't output NULL, it might
1074 not be defined yet.
1075
4162fa07 10762002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 1077
4162fa07
RA
1078 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1079 (Copyright notice): Update.
b418ecd8 1080
bd16a5dc
AD
10812002-02-11 Akim Demaille <akim@epita.fr>
1082
1083 * tests/regression.at (%nonassoc and eof): Don't include
1084 nonportable headers.
1085
8d69a1a3
RA
10862002-02-08 Robert Anisko <robert@lrde.epita.fr>
1087
1088 * data/bison.c++: Correct error recovery. Make the user able to
1089 initialize the starting location.
1090
9b2d0677
AD
10912002-02-07 Akim Demaille <akim@epita.fr>
1092
1093 * tests/input.at: New.
1094
69e2658b
RA
10952002-02-07 Robert Anisko <robert@lrde.epita.fr>
1096
1097 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 1098 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
1099 directives around tables only needed for debugging.
1100
4aacc3a7
RA
11012002-02-07 Robert Anisko <robert@lrde.epita.fr>
1102
1103 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1104 C++ parsers.
1105 (yy::b4_name::parse): Use print_.
1106
762a801e
RA
11072002-02-07 Robert Anisko <robert@lrde.epita.fr>
1108
1109 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1110
4bb2bc3f
RA
11112002-02-07 Robert Anisko <robert@lrde.epita.fr>
1112
1113 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1114 C++ parsers.
1115 (yy::b4_name::parse): Build verbose error messages, and use error_.
1116
6b45a3ca
RA
11172002-02-06 Robert Anisko <robert@lrde.epita.fr>
1118
1119 * data/bison.c++: Fix m4 quoting in comments.
1120
50997c6e
RA
11212002-02-06 Robert Anisko <robert@lrde.epita.fr>
1122
1123 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1124 not expanded by m4.
1125
3f3eed27
AD
11262002-02-05 Akim Demaille <akim@epita.fr>
1127
1128 * data/bison.c++: Adjust to the M4 back end.
1129 More is certainly needed.
1130
be2a1a68
AD
11312002-02-05 Akim Demaille <akim@epita.fr>
1132
1133 Give a try to M4 as a back end.
1134
1135 * lib/readpipe.c: New, from wdiff.
1136 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1137 BISON_HAIRY.
1138 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1139 specific values. Now it is m4 that performs the lookup.
1140 * src/parse-skel.y: Remove.
1141 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1142 * src/output.c (actions_output, guards_output)
1143 (token_definitions_output): No longer keeps track of the output
1144 line number, hence remove the second argument.
1145 (guards_output): Check against the guard member of a rule, not the
1146 action member.
1147 Adjust callers.
1148 (output_skeleton): Don't look for the skeleton location, let m4 do
1149 that.
1150 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1151 file will be used.
1152 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1153 (prepare): Given that for the time being changesyntax is not
1154 usable in M4, rename the muscles using `-' to `_'.
1155 Define `defines_flag', `output_parser_name' and `output_header_name'.
1156 * src/output.h (actions_output, guards_output)
1157 (token_definitions_output): Adjust prototypes.
1158 * src/scan-skel.l: Instead of scanning the skeletons, it now
1159 processes the output of m4: `__oline__' and `#output'.
1160 * data/bison.simple: Adjust to be used by M4(sugar).
1161 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1162 to date.
1163 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1164 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1165 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1166 shamelessly stolen from CVS Autoconf.
1167
beda758b
AD
11682002-02-05 Akim Demaille <akim@epita.fr>
1169
1170 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1171 * configure.in: Check for the declarations of free and malloc.
1172 * src/muscle_tab.c: Adjust.
1173
5ece6d43
AD
11742002-02-05 Akim Demaille <akim@epita.fr>
1175
1176 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1177 which have no values.
1178
5bb18f9a
AD
11792002-02-05 Akim Demaille <akim@epita.fr>
1180
1181 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1182 * data/: here.
1183
894dd62e
PE
11842002-01-29 Paul Eggert <eggert@twinsun.com>
1185
1186 * src/bison.simple (YYSIZE_T): Do not define merely because
1187 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1188 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1189
82841af7
AD
11902002-01-27 Akim Demaille <akim@epita.fr>
1191
1192 Fix `%nonassoc and eof'.
1193
1194 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1195 which were not properly copied! Replace
1196 memcpy (res->errs, src->errs, src->nerrs);
1197 with
1198 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1199 !!!
1200 * tests/regression.at (%nonassoc and eof): Adjust to newest
1201 Autotest: `.' is not in the PATH.
1202
318b76e9
AD
12032002-01-27 Akim Demaille <akim@epita.fr>
1204
1205 * tests/sets.at (AT_EXTRACT_SETS): New.
1206 (Nullable): Use it.
1207 (Firsts): New.
1208
30d2f3d5
AD
12092002-01-26 Akim Demaille <akim@epita.fr>
1210
1211 * tests/actions.at, tests/calc.at, tests/headers.at,
1212 * tests/torture.at: Adjust to the newest Autotest which no longer
1213 forces `.' in the PATH.
1214
30f8c395
AD
12152002-01-25 Akim Demaille <akim@epita.fr>
1216
1217 * tests/regression.at (%nonassoc and eof): New.
1218 Suggested by Robert Anisko.
1219
29ae55f1
AD
12202002-01-24 Akim Demaille <akim@epita.fr>
1221
1222 Bison dumps core when trying to complain about broken input files.
1223 Reported by Cris van Pelt.
1224
1225 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1226 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1227 into...
1228 (Invalid inputs): Strengthen: exercise parse_percent_token.
1229
2b548aa6
RA
12302002-01-24 Robert Anisko <robert.anisko@epita.fr>
1231
1232 * src/Makefile.am: Add bison.c++.
1233 * src/bison.c++: New skeleton.
1234
bb0146c2
AD
12352002-01-21 Paolo Bonzini <bonzini@gnu.org>
1236
1237 * po/it.po: New.
1238
bec30531
AD
12392002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1240
1241 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1242
fc6edc45
MA
12432002-01-20 Marc Autret <marc@gnu.org>
1244
1245 * src/files.c (compute_output_file_names): Fix
1246
5e5d5415
MA
12472002-01-20 Marc Autret <marc@gnu.org>
1248
1249 * tests/output.at: New test.
1250 * src/files.c (compute_base_names): Don't map extensions when
1251 the YACC flag is set, use defaults.
1252 Reported by Evgeny Stambulchik.
1253
44ea3fbd
MA
12542002-01-20 Marc Autret <marc@gnu.org>
1255
bb0146c2 1256 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1257 compilers as well (i.e. the vendor C compiler).
1258 Suggested by Albert Chin-A-Young.
1259
338963d1
TVH
12602002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1261
1262 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1263 canonical definition.
1264 * src/system.h: Use the canonical definition for PARAMS (avoids
1265 a conflict with the macro from lib/hash.h).
1266
c57b2479
AD
12672002-01-11 Akim Demaille <akim@epita.fr>
1268
1269 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1270 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1271
b85810ae
AD
12722002-01-09 Akim Demaille <akim@epita.fr>
1273
1274 * src/files.c, src/files.h (output_infix): New.
1275 (tab_extension): Remove.
1276 (compute_base_names): Compute the former, drop the latter.
1277 * src/output.c (prepare): Insert the muscles `output-infix', and
1278 `output-suffix'.
1279 * src/parse-skel.y (string, string.1): New.
1280 (section.header): Use it.
1281 (section.yacc): Remove.
1282 (prefix): Remove too.
1283 * src/scan-skel.l: Adjust.
1284 * src/bison.simple, src/bison.hairy: Adjust.
1285
cae60122
AD
12862002-01-09 Akim Demaille <akim@epita.fr>
1287
1288 * configure.in (WERROR_CFLAGS): Compute it.
1289 * src/Makefile.am (CFLAGS): Pass it.
1290 * tests/atlocal.in (CFLAGS): Idem.
1291 * src/files.c: Fix a few warnings.
1292 (get_extension_index): Remove, unused.
1293
ae404801
AD
12942002-01-08 Akim Demaille <akim@epita.fr>
1295
1296 * src/getargs.c (AS_FILE_NAME): New.
1297 (getargs): Use it to convert DOSish file names.
1298 * src/files.c (base_name): Rename as full_base_name to avoid
1299 clashes with `base_name ()'.
1300 (filename_split): New.
1301 (compute_base_names): N-th rewrite, using filename_split.
1302
22312b71
AD
13032002-01-08 Akim Demaille <akim@epita.fr>
1304
1305 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1306 New, stolen from the Fileutils 4.1.
1307 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1308 * configure.in: Check for the presence of memrchr, and of its
1309 prototype.
1310
a67cef01
TVH
13112002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1312
1313 * lib/hash.h (__P): Added definition for this macro.
1314 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1315 BUILT_SOURCES, to ensure they are generated first.
1316 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1317 %error-verbose to allow bootstrapping with bison 1.30x.
1318
2b25d624
AD
13192002-01-06 Akim Demaille <akim@epita.fr>
1320
1321 * src/reader.c (parse_braces): Don't fetch the next char, the
1322 convention is to fetch on entry.
1323 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1324 'switch' without a following semicolon.
1325 * tests/regression.at (braces parsing): New.
1326
3460813b
AD
13272002-01-06 Akim Demaille <akim@epita.fr>
1328
1329 Bison is dead wrong in its RR conflict reports.
1330
1331 * tests/torture.at (GNU Cim Grammar): New.
1332 * src/conflicts.c (count_rr_conflicts): Fix.
1333
73784c64
AD
13342002-01-06 Akim Demaille <akim@epita.fr>
1335
1336 Creating package.m4 from configure.ac causes too many problems.
1337
1338 * tests/Makefile.am (package.m4): Create it by hand,
1339 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1340
25d81090
AD
13412002-01-06 Akim Demaille <akim@epita.fr>
1342
1343 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1344 skeleton.h.
1345
a9b8959e
PE
13462002-01-04 Paul Eggert <eggert@twinsun.com>
1347
1348 * doc/bison.texinfo (Debugging):
1349 Remove YYSTDERR; it's no longer defined or used.
1350 Also, s/cstdio.h/cstdio/.
1351
25d81090
AD
13522002-01-03 Akim Demaille <akim@epita.fr>
1353
1354 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1355
1109455c
AD
13562002-01-03 Akim Demaille <akim@epita.fr>
1357
1358 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1359 tracing code to --trace, wait for a better --trace option, with
1360 args.
1361
7ea5e977
AD
13622002-01-03 Akim Demaille <akim@epita.fr>
1363
1364 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1365 The ISO C++ standard is extremely clear about it: stderr is
1366 considered a macro, not a regular symbol (see table 94 `Header
1367 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1368 Therefore std:: does not apply to it. It still does with fprintf.
1369 Also, s/cstdio.h/cstdio/.
1370
fab5b110
AD
13712002-01-03 Akim Demaille <akim@epita.fr>
1372
1373 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1374 for non system headers.
1375
aed7fd9b
AD
13762002-01-02 Akim Demaille <akim@epita.fr>
1377
1378 Equip the skeleton chain with location tracking, runtime trace,
1379 pure parser and scanner.
1380
1381 * src/parse-skel.y: Request a pure parser, locations, and prefix
1382 renaming.
1383 (%union): Having several members with the same type does not help
1384 type mismatches, simplify.
1385 (YYPRINT, yyprint): New.
1386 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1387 (skel_error): this.
1388 Handle locations.
1389 * src/scan-skel.l: Adjust to these changes.
1390 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1391 (LOCATION_PRINT, skel_control_t): New.
1392
24fad99e
AD
13932001-12-30 Akim Demaille <akim@epita.fr>
1394
1395 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1396 replace `gb' with BLANKS.
1397 * src/scan-skel.l: Adjust.
1398
a4b36db4
AD
13992001-12-30 Akim Demaille <akim@epita.fr>
1400
1401 * src/system.h: We don't need nor want bcopy.
1402 Throw away MS-DOS crap: we don't need getpid.
1403 * configure.in: We don't need strndup. It was even causing
1404 problems: because Flex includes the headers *before* us,
1405 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1406 not visible.
1407 * lib/xstrndup.c: New.
1408 * src/scan-skel.l: Use it.
1409 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1410 * src/parse-skel.y: Use %directives instead of #defines.
1411
1239777d
AD
14122001-12-30 Akim Demaille <akim@epita.fr>
1413
1414 * src/skeleton.h: New.
1415 * src/output.c (output_parser, output_master_parser): Remove, dead
1416 code.
1417 * src/output.h (get_lines_number, actions_output, guards_output)
1418 (token_definitions_output): Prototype them.
1419 * src/parse-skel.y: Add the license notice.
1420 Include output.h and skeleton.h.
1421 (process_skeleton): Returns void, and takes a single parameter.
1422 * src/scan-skel.l: Add the license notice.
1423 Include skeleton.h.
1424 Don't use %option yylineno: it seems that then Flex imagines
1425 REJECT has been used, and therefore it won't reallocate its
1426 buffers (which makes no other sense to me than a bug). It results
1427 in warnings for `unused: yy_flex_realloc'.
1428
9b3add5b
RA
14292001-12-30 Robert Anisko <robert.anisko@epita.fr>
1430
1431 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1432 (MUSCLE_INSERT_PREFIX): ...to there.
1433 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1434 (MUSCLE_INSERT_PREFIX): Move from here...
1435
1436 * src/bison.hairy: Add a section directive. Put braces around muscle
1437 names. This parser skeleton is still broken, but Bison should not
1438 choke on a bad muscle 'syntax'.
1439 * src/bison.simple: Add a section directive. Put braces around muscle
1440 names.
1441
1442 * src/files.h (strsuffix, stringappend): Add declarations.
1443 (tab_extension): Add declaration.
1444 (short_base_name): Add declaration.
1445
1446 * src/files.c (strsuffix, stringappend): No longer static. These
1447 functions are used in the skeleton parser.
1448 (tab_extension): New.
1449 (compute_base_names): Use the computations done in this function
fab5b110 1450 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1451 names.
1452 (short_base_name): No longer static.
1453
1454 * src/output.c (output_skeleton): New.
1455 (output): Disable call to output_master_parser, and give a try to
1456 a new skeleton handling system.
1457 (guards_output, actions_output): No longer static.
1458 (token_definitions_output, get_lines_number): No longer static.
1459
1460 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1461
fab5b110 1462 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1463 parse-skel.y.
1464
1465 * src/parse-skel.y: New file.
1466 * src/scan-skel.l: New file.
1467
b5b61c61
AD
14682001-12-29 Akim Demaille <akim@epita.fr>
1469
1470 %name-prefix is broken.
1471
1472 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1473 Adjust all dependencies.
1474 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1475 %name-prefix.
1476
1477 Renaming yylval but not yylloc is not consistent. Now we do.
1478
1479 * src/bison.simple: Prefix yylloc if used.
1480 * doc/bison.texinfo (Decl Summary): Document that.
1481
8c9a50be
AD
14822001-12-29 Akim Demaille <akim@epita.fr>
1483
1484 * doc/bison.texinfo: Promote `%long-directive' over
1485 `%long_directive'.
1486 Remove all references to fixed-output-files, yacc is enough.
1487
d99361e6
AD
14882001-12-29 Akim Demaille <akim@epita.fr>
1489
1490 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1491 user prologue. These are defaults.
1492 * tests/actions.at (Mid-rule actions): Make sure the user can
1493 define YYDEBUG and YYERROR_VERBOSE.
1494
b9cecb91
AD
14952001-12-29 Akim Demaille <akim@epita.fr>
1496
1497 * src/output.c (header_output): Don't forget to export YYLTYPE and
1498 yylloc.
1499 * tests/headers.at (export YYLTYPE): New, make sure it does.
1500 * tests/regression.at (%union and --defines, Invalid CPP headers):
1501 Move to...
1502 * tests/headers.at: here.
1503
aea13e97
AD
15042001-12-29 Akim Demaille <akim@epita.fr>
1505
1506 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1507
931394cb
AD
15082001-12-29 Akim Demaille <akim@epita.fr>
1509
1510 * tests/actions.at (Mid-rule actions): Output on a single line
1511 instead of several.
1512
704a47c4
AD
15132001-12-29 Akim Demaille <akim@epita.fr>
1514
1515 * doc/bison.texinfo: Formatting changes.
1516
091e20bb
AD
15172001-12-29 Akim Demaille <akim@epita.fr>
1518
1519 Don't store the token defs in a muscle, just be ready to output it
1520 on command. Now possible via `symbols'. Fixes a memory leak.
1521
1522 * src/output.c (token_definitions_output): New.
1523 (output_parser, header_output): Use it.
1524 * src/reader.c (symbols_save): Remove.
1525
cce71710
AD
15262001-12-29 Akim Demaille <akim@epita.fr>
1527
1528 * src/bison.simple: Do not provide a default for YYSTYPE and
1529 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1530 default.
1531
82c035a8
AD
15322001-12-29 Akim Demaille <akim@epita.fr>
1533
1534 Mid-rule actions are simply... ignored!
1535
1536 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1537 the empty-rule associated to the dummy symbol, not to the host
1538 rule.
1539 * tests/actions.at (Mid-rule actions): New.
1540
8419d367
AD
15412001-12-29 Akim Demaille <akim@epita.fr>
1542
1543 Memory leak.
1544
1545 * src/reader.c (reader): Free grammar.
1546
375d5806
AD
15472001-12-29 Akim Demaille <akim@epita.fr>
1548
1549 Memory leak.
1550
1551 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1552 since it allocates it for each state, although only one is needed.
1553 (allocate_storage): Do it here.
1554
f51cb8ff
AD
15552001-12-29 Akim Demaille <akim@epita.fr>
1556
1557 * src/options.h, src/options.c (create_long_option_table): Rename
1558 as...
1559 (long_option_table_new): this, with a clearer prototype.
1560 (percent_table): Remove, unused,
1561 * src/getargs.c (getargs): Adjust.
1562
29e88316
AD
15632001-12-29 Akim Demaille <akim@epita.fr>
1564
1565 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1566 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1567 as states.
1568
b9f71f19
AD
15692001-12-29 Akim Demaille <akim@epita.fr>
1570
1571 * src/lalr.c (build_relations): Rename `states' as `states1'.
1572 Sorry, I don't understand exactly what it is, no better name...
1573
1a2b5d37
AD
15742001-12-29 Akim Demaille <akim@epita.fr>
1575
1576 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1577 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1578 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1579 as rules.
1580
1cca533e
AD
15812001-12-29 Akim Demaille <akim@epita.fr>
1582
1583 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1584 ago.
1585
c03ae966
AD
15862001-12-29 Akim Demaille <akim@epita.fr>
1587
1588 * src/reader.c, src/reader.h (user_toknums): Remove.
1589 Adjust all users to use symbols[i]->user_token_number.
1590
5a670b1e
AD
15912001-12-29 Akim Demaille <akim@epita.fr>
1592
1593 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1594 Adjust all users to use symbols[i]->prec or ->assoc.
1595
ad949da9
AD
15962001-12-29 Akim Demaille <akim@epita.fr>
1597
1598 * src/reader.c, src/reader.h (tags): Remove.
1599 Adjust all users to use symbols[i]->tag.
1600
0e78e603
AD
16012001-12-29 Akim Demaille <akim@epita.fr>
1602
1603 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1604 and rule_table.
1605 * src/reader.c (packsymbols): Fill this table.
1606 Drop sprec.
1607 * src/conflicts.c (resolve_sr_conflict): Adjust.
1608 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1609 single table.
1610 Use symbols[i]->tag instead of tags[i].
1611
213e640e
AD
16122001-12-29 Akim Demaille <akim@epita.fr>
1613
1614 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1615 In addition, put a comment in there, to replace...
1616 * tests/regression.at (%union and C comments): Remove.
1617
e7b8bef1
AD
16182001-12-29 Akim Demaille <akim@epita.fr>
1619
1620 * tests/regression.at (Web2c Actions): Blindly move the actual
1621 output as expected output. The contents *seem* right to me, but I
1622 can't pretend reading perfectly parser tables... Nonetheless, all
1623 the other tests pass correctly, the table look OK, even though the
1624 presence of `$axiom' is to be noted: AFAICS it is useless (but
1625 harmless).
1626
b68e7744
AD
16272001-12-29 Akim Demaille <akim@epita.fr>
1628
1629 * src/reader.c (readgram): Don't add the rule 0 if there were no
1630 rules read. In other words, add it _after_ having performed
1631 grammar sanity checks.
1632 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1633
78d5bae9
AD
16342001-12-29 Akim Demaille <akim@epita.fr>
1635
1636 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1637 visible, and some states have now a different number.
1638
ff442794
AD
16392001-12-29 Akim Demaille <akim@epita.fr>
1640
1641 * src/reader.c (readgram): Bind the initial rule's lineno to that
1642 of the first rule.
1643 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1644 (Solved SR Conflicts): Adjust rule 0's line number.
1645
610ab194
AD
16462001-12-29 Akim Demaille <akim@epita.fr>
1647
1648 Fix the `GAWK Grammar' failure.
1649
1650 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1651 the reductions of the first state which was mistakenly confused
1652 with the final state because precisely final_state was initialized
1653 to 0.
1654 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1655 now noticed by Bison.
1656 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1657 have a reduction on $default.
1658
29d29c8f
AD
16592001-12-29 Akim Demaille <akim@epita.fr>
1660
1661 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1662 rule line numbers.
1663 * src/closure.c (print_closure): Likewise.
1664 * src/derives.c (print_derives): Likewise.
1665 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1666 now.
1667
7c6b64d0
AD
16682001-12-29 Akim Demaille <akim@epita.fr>
1669
1670 * src/lalr.c (lookaheads_print): New.
1671 (lalr): Call it when --trace-flag.
1672 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1673 are dumped.
1674
3d4daee3
AD
16752001-12-29 Akim Demaille <akim@epita.fr>
1676
1677 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1678 when walking through ritem, even via rule->rhs.
1679 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1680 (useful_production, useless_nonterminals): Likewise.
1681 (reduce_grammar_tables): Likewise, plus update nritems.
1682 * src/nullable.c (set_nullable): Likewise.
1683 * src/lalr.c (build_relations): Likewise.
1684 * tests/sets.at (Nullable): Adjust.
1685 Fortunately, now, the $axiom is no longer nullable.
1686
9e7f6bbd
AD
16872001-12-29 Akim Demaille <akim@epita.fr>
1688
1689 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1690 the 0-sentinel.
1691 * src/gram.c (ritem_longest_rhs): Likewise.
1692 * src/reduce.c (nonterminals_reduce): Likewise.
1693 * src/print_graph.c (print_graph): Likewise.
1694 * src/output.c (output_rule_data): Likewise.
1695 * src/nullable.c (set_nullable): Likewise.
1696
255ef638
AD
16972001-12-29 Akim Demaille <akim@epita.fr>
1698
1699 * src/output.c: Comment changes.
1700
0d8a7363
AD
17012001-12-27 Paul Eggert <eggert@twinsun.com>
1702
1703 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1704 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1705 Sparc, as they were causing more porting problems than the
1706 (minor) performance improvement was worth.
1707
1708 Also, catch up with 1.31's YYSTD.
1709
3db472b9
AD
17102001-12-27 Akim Demaille <akim@epita.fr>
1711
1712 * src/output.c (output_gram): Rely on nritems, not the
1713 0-sentinel. See below.
1714 Use -1 as separator, not 0.
1715 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1716 Rely on -1 as separator in yyrhs, instead of 0.
1717 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1718 twice `Now at end of input', therefore there are two lines less to
1719 expect.
1720
b365aa05
AD
17212001-12-27 Akim Demaille <akim@epita.fr>
1722
1723 * tests/regression.at (Unresolved SR Conflicts):
1724 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1725 below.
1726
30171f79
AD
17272001-12-27 Akim Demaille <akim@epita.fr>
1728
1729 * src/LR0.c (new_state): Recognize the final state by the fact it
1730 is reached by eoftoken.
1731 (insert_start_shifting_state, insert_eof_shifting_state)
1732 (insert_accepting_state, augment_automaton): Remove, since now
1733 these states are automatically computed from the initial state.
1734 (generate_states): Adjust.
1735 * src/print.c: When reporting a rule number to the user, substract
1736 1, so that the axiom rule is rule 0, and the first user rule is 1.
1737 * src/reduce.c: Likewise.
1738 * src/print_graph.c (print_core): For the time being, just as for
1739 the report, depend upon --trace-flags to dump the full set of
1740 items.
1741 * src/reader.c (readgram): Once the grammar read, insert the rule
1742 0: `$axiom: START-SYMBOL $'.
1743 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1744 number of the states has changed (the final state is no longer
1745 necessarily the last), catch up.
1746
75142d45
AD
17472001-12-27 Akim Demaille <akim@epita.fr>
1748
1749 Try to make the use of the eoftoken valid. Given that its value
1750 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1751 is used instead of > 0 where appropriate, (ii), depend upon nritems
1752 instead of the 0-sentinel.
1753
1754 * src/gram.h, src/gram.c (nritems): New.
1755 Expected to be duplication of nitems, but for the time being...
1756 * src/reader.c (packgram): Assert nritems and nitems are equal.
1757 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1758 * src/closure.c (print_closure, print_fderives): Likewise.
1759 * src/gram.c (ritem_print): Likewise.
1760 * src/print.c (print_core, print_grammar): Likewise.
1761 * src/print_graph.c: Likewise.
1762
b7c49edf
AD
17632001-12-27 Akim Demaille <akim@epita.fr>
1764
1765 * src/main.c (main): If there are complains after grammar
1766 reductions, then output the report anyway if requested, then die.
1767 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1768 * src/reader.c (eoftoken): New.
1769 (parse_token_decl): If the token being defined has value `0', it
1770 is the eoftoken.
1771 (packsymbols): No longer hack `tags' to insert `$' by hand.
1772 Be sure to preserve the value of the eoftoken.
1773 (reader): Make sure eoftoken is defined.
1774 Initialize nsyms to 0: now eoftoken is created just like the others.
1775 * src/print.c (print_grammar): Don't special case the eof token.
1776 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1777 lie anyway, albeit pleasant.
1778 * tests/calc.at: Exercise error messages with eoftoken.
1779 Change the grammar so that empty input is invalid.
1780 Adjust expectations.
1781 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1782
ec2da99f
AD
17832001-12-27 Akim Demaille <akim@epita.fr>
1784
1785 * configure.in: Check the protos of strchr ans strspn.
1786 Replace strchr if needed.
1787 * src/system.h: Provide the protos of strchr, strspn and memchr if
1788 missing.
1789 * lib/strchr.c: New.
1790 * src/reader.c (symbols_save): Use strchr.
1791
8adfa272
AD
17922001-12-27 Akim Demaille <akim@epita.fr>
1793
1794 * src/print.c, src/print_graph.c (escape): New.
1795 Use it to quote the TAGS outputs.
1796 * src/print_graph.c (print_state): Now errors are in red, and
1797 reductions in green.
1798 Prefer high to wide: output the state number on a line of its own.
1799
80dac38c
AD
18002001-12-27 Akim Demaille <akim@epita.fr>
1801
1802 * src/state.h, src/state.c (reductions_new): New.
1803 * src/LR0.c (set_state_table): Let all the states have a
1804 `reductions', even if reduced to 0.
1805 (save_reductions): Adjust.
1806 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1807 * src/print.c (print_reductions, print_actions): Adjust.
1808 * src/output.c (action_row): Adjust.
1809
2cec70b9
AD
18102001-12-27 Akim Demaille <akim@epita.fr>
1811
1812 * src/state.h, src/state.c (errs_new, errs_dup): New.
1813 * src/LR0.c (set_state_table): Let all the states have an errs,
1814 even if reduced to 0.
1815 * src/print.c (print_errs, print_reductions): Adjust.
1816 * src/output.c (output_actions, action_row): Adjust.
1817 * src/conflicts.c (resolve_sr_conflict): Adjust.
1818
13ca549a
AD
18192001-12-27 Akim Demaille <akim@epita.fr>
1820
1821 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1822
5092aba5
AD
18232001-12-27 Akim Demaille <akim@epita.fr>
1824
1825 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1826 * src/print.c: here.
1827 (lookaheadset, shiftset): New, used as additional storage by
1828 print_reductions.
1829 (print_results): Adjust.
1830 (print_shifts, print_gotos, print_errs): New, extracted from...
1831 (print_actions): here.
1832 * src/print_graph.c (print_actions): Remove dead code.
1833
11e2beca
AD
18342001-12-27 Akim Demaille <akim@epita.fr>
1835
1836 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1837 `$n' and `@n'.
1838
dac3c910
AD
18392001-12-27 Akim Demaille <akim@epita.fr>
1840
1841 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1842 (build_relations): Adjust.
1843
d0b0fefa
AD
18442001-12-27 Akim Demaille <akim@epita.fr>
1845
1846 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1847 duplication.
1848
adc8c848
AD
18492001-12-27 Akim Demaille <akim@epita.fr>
1850
1851 * src/reader.c (packgram): Catch nitems overflows.
1852
14d293ac
AD
18532001-12-27 Akim Demaille <akim@epita.fr>
1854
1855 * src/files.c, src/files.h (guard_obstack): Remove.
1856 * src/output.c (output): Adjust.
1857 * src/reader.c (parse_braces): New, factoring...
1858 (copy_action, copy_guard): these two which are renamed as...
1859 (parse_action, parse_guard): these.
1860 As a voluntary consequence, using braces around guards is now
1861 mandatory.
1862
f499b062
AD
18632001-12-27 Akim Demaille <akim@epita.fr>
1864
1865 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1866 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1867 members.
1868 (symbol_list_new): Adjust.
1869 (copy_action): action_line is the first line, not the last.
1870 (copy_guard): Just as for actions, store the `action' only, not
1871 the switch/case/break flesh.
1872 Don't parse the user action that might follow the guard, let...
1873 (readgram): do it, i.e., now, there can be an action after a
1874 guard.
1875 In other words the guard is just explicitly optional.
1876 (packgram): Adjust.
1877 * src/output.c (guards_output): New.
1878 (output_parser): Call it when needed.
1879 (output): Also free the guard and attrs obstacks.
1880 * src/files.c, src/files.h (obstack_save): Remove.
1881 (output_files): Remove.
1882 As a result, if one needs the former `.act' file, using an
1883 appropriate skeleton which requires actions and guards is now
1884 required.
1885 * src/main.c (main): Adjust.
1886 * tests/semantic.at: New.
1887 * tests/regression.at: Use `input.y' as input file name.
1888 Avoid 8+3 problems by requiring input.c when the test needs the
1889 parser.
1890
d945f5cd
AD
18912001-12-27 Akim Demaille <akim@epita.fr>
1892
1893 * src/reader.c (symbol_list_new): Be sure to initialize all the
1894 fields.
1895
d200e455
AD
18962001-12-27 Akim Demaille <akim@epita.fr>
1897
1898 All the hacks using a final pseudo state are now useless.
1899
1900 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1901 * src/lalr.c (nLA): New.
1902 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1903 instead of lookaheadsp from the pseudo state (nstate + 1).
1904
f9507c28
AD
19052001-12-27 Akim Demaille <akim@epita.fr>
1906
1907 * src/output.c (action_row, token_actions): Use a state_t instead
1908 of a integer, and nlookaheads instead of the following state's
1909 lookaheadsp.
1910
065fbd27
AD
19112001-12-27 Akim Demaille <akim@epita.fr>
1912
1913 * src/conflicts.c (log_resolution, flush_shift)
1914 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1915 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1916 (conflicts_print, print_reductions): Use a state_t instead of an
1917 integer when referring to a state.
1918 As much as possible, depend upon nlookaheads, instead of the
1919 `lookaheadsp' member of the following state (since lookaheads of
1920 successive states are successive, the difference between state n + 1
1921 and n served as the number of lookaheads for state n).
1922 * src/lalr.c (add_lookback_edge): Likewise.
1923 * src/print.c (print_core, print_actions, print_state)
1924 (print_results): Likewise.
1925 * src/print_graph.c (print_core, print_actions, print_state)
1926 (print_graph): Likewise.
1927 * src/conflicts.h: Adjust.
1928
1b177bd7
AD
19292001-12-27 Akim Demaille <akim@epita.fr>
1930
1931 * src/bison.hairy: Formatting/comment changes.
1932 ANSIfy.
1933 Remove `register' indications.
1934 Add plenty of `static'.
1935
7742ddeb
AD
19362001-12-27 Akim Demaille <akim@epita.fr>
1937
1938 * src/output.c (prepare): Drop the muscle `ntbase' which
1939 duplicates ntokens.
1940 * src/bison.simple: Formatting/comment changes.
1941 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1942 is an undocumented synonym.
1943
1fa14068
AD
19442001-12-22 Akim Demaille <akim@epita.fr>
1945
1946 * src/output.c (output_table_data): Change the prototype to use
1947 `int' for array ranges: some invocations do pass an int, not a
1948 short.
1949 Reported by Wayne Green.
1950
b9752825
AD
19512001-12-22 Akim Demaille <akim@epita.fr>
1952
1953 Some actions of web2c.y are improperly triggered.
1954 Reported by Mike Castle.
1955
1956 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1957 * tests/regression.at (Web2c): Rename as...
1958 (Web2c Report): this.
1959 (Web2c Actions): New.
1960
776209d6
AD
19612001-12-22 Akim Demaille <akim@epita.fr>
1962
1963 Reductions in web2c.y are improperly reported.
1964 Reported by Mike Castle.
1965
1966 * src/conflicts.c (print_reductions): Fix.
1967 * tests/regression.at (Web2c): New.
1968
275fc3ad
AD
19692001-12-18 Akim Demaille <akim@epita.fr>
1970
1971 Some host fail on `assert (!"foo")', which expands to
1972 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1973 Reported by Nelson Beebee.
1974
1975 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1976 `#define it_succeeded 0' and `assert (it_succeeded)'.
1977
897668ee
MA
19782001-12-17 Marc Autret <autret_m@epita.fr>
1979
1980 * src/bison.simple: Don't hard code the skeleton line and filename.
1981 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1982 New line counter 'skeleton_line' (skeleton-line muscle).
1983
ab3399e0
PE
19842001-12-17 Paul Eggert <eggert@twinsun.com>
1985
1986 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1987 YYDEBUG must be defined to a nonzero value.
1988
1989 * src/bison.simple (yytname): Do not assume that the user defines
1990 YYDEBUG to a properly parenthesized expression.
1991
3877f72b
AD
19922001-12-17 Akim Demaille <akim@epita.fr>
1993
1994 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1995 nlookaheads is a new member.
1996 Adjust all users.
1997 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1998 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1999 state.
776209d6 2000
331dbc1b
AD
20012001-12-17 Akim Demaille <akim@epita.fr>
2002
2003 * src/files.h, src/files.c (open_files, close_files): Remove.
2004 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2005 let...
2006 * src/reader.c (reader): Do it.
776209d6 2007
be750e4c
AD
20082001-12-17 Akim Demaille <akim@epita.fr>
2009
2010 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 2011
709ae8c6
AD
20122001-12-17 Akim Demaille <akim@epita.fr>
2013
2014 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2015 (flush_reduce): New.
2016 (resolve_sr_conflict): Adjust.
776209d6 2017
f87685c3
AD
20182001-12-17 Akim Demaille <akim@epita.fr>
2019
2020 * src/output.c (output_obstack): Be static and rename as...
2021 (format_obstack): this, to avoid any confusion with files.c's
2022 output_obstack.
2023 * src/reader.h (muscle_obstack): Move to...
2024 * src/output.h: here, since it's defined in output.c.
2025
837491d8
AD
20262001-12-17 Akim Demaille <akim@epita.fr>
2027
2028 * src/output.c (action_row, save_column, default_goto)
2029 (sort_actions, matching_state, pack_vector): Better variable
2030 locality.
2031
796d61fb
AD
20322001-12-17 Akim Demaille <akim@epita.fr>
2033
2034 * src/output.c: Various formatting changes.
776209d6 2035
64d15509
AD
20362001-12-17 Akim Demaille <akim@epita.fr>
2037
2038 * src/files.c (output_files): Free the output_obstack.
2039 * src/main.c (main): Call print and print_graph conditionally.
2040 * src/print.c (print): Work unconditionally.
2041 * src/print_graph.c (print_graph): Work unconditionally.
2042 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2043
fbc8ecb7
MA
20442001-12-16 Marc Autret <autret_m@epita.fr>
2045
2046 * src/output.c (actions_output): Fix. When we use %no-lines,
2047 there is one less line per action.
2048
f0440388
MA
20492001-12-16 Marc Autret <autret_m@epita.fr>
2050
2051 * src/bison.simple: Remove a useless #line directive.
2052 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2053 * src/output.c (get_lines_number): New.
776209d6 2054 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
2055 output muscles.
2056 Fix line numbering.
2057 (actions_output): Computes the number of lines taken by actions.
2058 (output_master_parser): Insert new skeleton which is the name of
2059 the output parser file name.
2060
a79986b8
MA
20612001-12-15 Marc Autret <autret_m@epita.fr>
2062
2063 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2064
4ec8e00f
MA
20652001-12-15 Marc Autret <autret_m@epita.fr>
2066
2067 * src/output.c (output_gram): Keep track of the hairy one.
2068
1a4648ff
AD
20692001-12-15 Akim Demaille <akim@epita.fr>
2070
2071 Make `make distcheck' work.
2072
2073 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2074 system.h which uses libgettext.h.
2075
9c2c67e6
AD
20762001-12-15 Akim Demaille <akim@epita.fr>
2077
2078 * src/nullable.c (set_nullable): Useless rules must be skipped,
2079 otherwise, since we range over their symbols, we might look at a
2080 nonterminal which no longer ``exists'', i.e., it is not counted in
2081 `nvars', hence we overflow our arrays.
2082
93ede233
AD
20832001-12-15 Akim Demaille <akim@epita.fr>
2084
2085 The header can also be produced directly, without any obstack!
2086 Yahoo!
2087
2088 * src/files.c, src/files.h (defines_obstack): Remove.
2089 (compute_header_macro): Global.
2090 (defines_obstack_save): Remove.
2091 * src/reader.c (parse_union_decl): No longer output to
2092 defines_obstack: its content can be found in the `stype' muscle
2093 anyway.
2094 (output_token_translations): Merge into...
2095 (symbols_output): this.
2096 Rename as...
2097 (symbols_save): this.
2098 (reader): Adjust.
2099 * src/output.c (header_output): New.
2100 (output): Call it.
2101
2666f928
AD
21022001-12-15 Akim Demaille <akim@epita.fr>
2103
2104 * src/reader.c (parse_union_decl): Instead of handling two obstack
2105 simultaneously, use one to define the `stype' muscle, and use the
2106 value of the latter to fill defines_obstack.
2107 (copy_comment): Remove.
2108 (copy_comment2): Work for a single obstack.
2109 Rename as...
2110 (copy_comment): this.
2111
428046f8
AD
21122001-12-15 Akim Demaille <akim@epita.fr>
2113
2114 * src/lex.c, src/lex.h (xgetc): No longer static.
2115 * src/reader.c (parse_union_decl): Revamp.
2116
ea52d706
AD
21172001-12-15 Akim Demaille <akim@epita.fr>
2118
2119 Still making progress in separating Bison into (i) input, (ii)
2120 process, (iii) output: now we can directly output the parser file
2121 without using table_obstack at all.
2122
2123 * src/files.c, src/files.h (table_obstack): Bye bye.
2124 (parser_file_name): New.
2125 * src/files.c (compute_output_file_names): Compute it.
2126 * src/output.c (actions_output, output_parser)
2127 (output_master_parser): To a file instead of an obstack.
2128
3f96f4dc
AD
21292001-12-15 Akim Demaille <akim@epita.fr>
2130
2131 Attach actions to rules, instead of pre-outputting them to
2132 actions_obstack.
2133
2134 * src/gram.h (rule_t): action and action_line are new members.
2135 * src/reader.c (symbol_list): Likewise.
2136 (copy_action): Save the actions within the rule.
2137 (packgram): Save them in rule_table.
2138 * src/output.c (actions_output): New.
2139 (output_parser): Use it on `%%actions'.
2140 (output_rule_data): Don't free rule_table.
2141 (output): Do it.
2142 (prepare): Don't save the `action' muscle.
2143 * src/bison.simple: s/%%action/%%actions/.
2144
51576fb3
AD
21452001-12-15 Akim Demaille <akim@epita.fr>
2146
2147 * src/reader.c (copy_action): When --yacc, don't append a `;'
2148 to the user action: let it fail if lacking.
dee049eb 2149 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2150
2648a72d
AD
21512001-12-14 Akim Demaille <akim@epita.fr>
2152
2153 * src/lex.c (literalchar): Simply return the char you decoded, non
2154 longer mess around with obstacks and int pointers.
2155 Adjust all callers.
2156
92790e5b
AD
21572001-12-14 Akim Demaille <akim@epita.fr>
2158
2159 * src/lex.c (literalchar): Don't escape the special characters,
2160 just decode them, and keep them as char (before, eol was output as
2161 the 2 char string `\n' etc.).
2162 * src/output.c (output_rule_data): Use quotearg to output the
2163 token strings.
2164
927c1557
PE
21652001-12-13 Paul Eggert <eggert@twinsun.com>
2166
2167 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2168 Do not infringe on the global user namespace when using C++.
2169 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2170 All uses of `fprintf' and `stderr' changed.
2171
2172 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2173
ed8e1f68
AD
21742001-12-13 Akim Demaille <akim@epita.fr>
2175
2176 The computation of nullable is broken: it doesn't handle empty
2177 RHS's properly.
2178
2179 * tests/torture.at (GNU AWK Grammar): New.
2180 * tests/sets.at (Nullable): New.
2181 * src/nullable.c (set_nullable): Instead of blindly looping over
2182 `ritems', loop over the rules, and then over their rhs's.
2183
2184 Work around Autotest bugs.
2185
2186 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2187 frame, because Autotest understand lines starting with a `+' as
2188 traces from the shell. Then, they are not processed properly.
2189 Admittedly an Autotest bug, but we don't have time to wait for
2190 Autotest to catch up.
2191 * tests/regression.at (Broken Closure): Adjust to the new table
2192 frames.
2193 Move to...
2194 * tests/sets.at: here.
2195
cb581495
AD
21962001-12-13 Akim Demaille <akim@epita.fr>
2197
2198 * src/closure.c (closure): Use nrules instead of playing tricks
2199 with BITS_PER_WORD.
2200
2e729273
AD
22012001-12-13 Akim Demaille <akim@epita.fr>
2202
2203 * src/print.c (print_actions): Output the handling of `$' as the
2204 traces do: shifting the token EOF. Before EOF was treated as a
2205 nonterminal.
2206 * tests/regression.at: Adjust some tests.
2207 * src/print_graph.c (print_core): Complete the set of items via
2208 closure. The next-to-final and final states are still unsatisfying,
2209 but that's to be addressed elsewhere.
2210 No longer output the rule numbers, but do output the state number.
2211 A single loop for the shifts + gotos is enough, but picked a
2212 distinct color for each.
2213 (print_graph): Initialize and finalize closure.
2214
107f7dfb
AD
22152001-12-13 Akim Demaille <akim@epita.fr>
2216
2217 * src/reader.c (readgram): Remove dead code, an strip useless
2218 braces.
2219 (get_type): Remove, unused.
2220
9b53a24f
AD
22212001-12-12 Akim Demaille <akim@epita.fr>
2222
2223 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2224 on that of lib/error.c.
2225
dbfb6dcd
AD
22262001-12-12 Akim Demaille <akim@epita.fr>
2227
2228 Some hosts don't like `/' in includes.
2229
2230 * src/system.h: Include libgettext.h without qualifying the path.
2231 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2232 $(top_srcdir).
2233
c25fb648
MA
22342001-12-11 Marc Autret <autret_m@epita.fr>
2235
2236 * src/output.c (output_parser): Remove useless muscle.
2237
710ddc4f
MA
22382001-12-11 Marc Autret <autret_m@epita.fr>
2239
2240 * src/bison.simple: Remove #line just before %%epilogue. It
2241 is now handled in ...
2242 * src/reader.c (read_additionnal_code): Add the output of a
2243 #line for the epilogue.
2244
e83d80b8
MA
22452001-12-10 Marc Autret <autret_m@epita.fr>
2246
927c1557 2247 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2248 replace precedent remove.
2249 * src/bison.simple: Remove #line before %%prologue because
2250 %%input-line is wrong at this time.
2251
971d5158
MA
22522001-12-10 Marc Autret <autret_m@epita.fr>
2253
2254 * src/reader.c (symbols_output): Clean up.
927c1557 2255 * src/output.c (output_gram, output): Clean up.
971d5158 2256
5edafffd
AD
22572001-12-10 Akim Demaille <akim@epita.fr>
2258
2259 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2260 * src/LR0.c (set_state_table): here.
2261 * src/lalr.c (lalr): Call it.
2262
0279f8e9
AD
22632001-12-10 Akim Demaille <akim@epita.fr>
2264
2265 * src/state.h (shifts): Remove the `number' member: shifts are
2266 attached to state, hence no longer need to be labelled with a
2267 state number.
2268
190c4f5f
AD
22692001-12-10 Akim Demaille <akim@epita.fr>
2270
2271 Now that states have a complete set of members, the linked list of
2272 shifts is useless: just fill directly the state's shifts member.
2273
2274 * src/state.h (shifts): Remove the `next' member.
2275 * src/LR0.c (first_state, last_state): Remove.
2276 Adjust the callers.
2277 (augment_automaton): Don't look for the shifts that must be added
2278 a shift on EOF: it is those of the state we looked for! But now,
2279 since shifts are attached, it is no longer needed to looking
2280 merely by its id: its number.
2281
2a73b93d
AD
22822001-12-10 Akim Demaille <akim@epita.fr>
2283
2284 * src/LR0.c (augment_automaton): Better variable locality.
2285 Remove an impossible branch: if there is a state corresponding to
2286 the start symbol being shifted, then there is shift for the start
2287 symbol from the initial state.
2288
74392f6a
AD
22892001-12-10 Akim Demaille <akim@epita.fr>
2290
2291 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2292 only when appropriate: when insert_start_shifting_state' is not
2293 invoked.
2294 * tests/regression.at (Rule Line Numbers): Adjust.
2295
37c82725
AD
22962001-12-10 Akim Demaille <akim@epita.fr>
2297
2298 * src/LR0.c (augment_automaton): Now that all states have shifts,
2299 merge the two cases addition shifts to the initial state.
2300
6a164e0c
AD
23012001-12-10 Akim Demaille <akim@epita.fr>
2302
2303 * src/lalr.c (set_state_table): Move to...
2304 * src/LR0.c: here.
2305 * src/lalr.c (lalr): Don't call it...
2306 * src/LR0.c (generate_states): do it.
2307 * src/LR0.h (first_state): Remove, only the table is used.
2308
7215de24
AD
23092001-12-10 Akim Demaille <akim@epita.fr>
2310
2311 * src/LR0.h (first_shift, first_reduction): Remove.
2312 * src/lalr.c: Don't use first_shift: find shifts through the
2313 states.
2314
80e25d4d
AD
23152001-12-10 Akim Demaille <akim@epita.fr>
2316
2317 * src/LR0.c: Attach shifts to states as soon as they are
2318 computed.
2319 * src/lalr.c (set_state_table): Instead of assigning shifts to
2320 state, just assert that the mapping was properly done.
2321
0ab3728b
AD
23222001-12-10 Akim Demaille <akim@epita.fr>
2323
2324 * src/LR0.c (insert_start_shift): Rename as...
2325 (insert_start_shifting_state): this.
2326 (insert_eof_shifting_state, insert_accepting_state): New.
2327 (augment_automaton): Adjust.
2328 Better locality of the variables.
2329 When looking if the start_symbol is shifted from the initial
2330 state, using `while (... symbol != start_symbol ...)' sounds
2331 better than `while (... symbol < start_symbol ...)': If fail
2332 to see how the order between symbols could be relevant!
2333
78af9bbc
AD
23342001-12-10 Akim Demaille <akim@epita.fr>
2335
2336 * src/getargs.h: Don't declare `spec_name_prefix' and
2337 `spec_file_prefix', declared by src/files.h.
2338 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2339 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2340 * src/output.c (prepare): Adjust.
2341 * src/reader.c (symbols_output): Likewise.
2342 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2343
bdef2a41
AD
23442001-12-10 Akim Demaille <akim@epita.fr>
2345
2346 * src/muscle_tab.c (muscle_init): NULL is a better default than
2347 `"0"'.
2348
3735969c
AD
23492001-12-10 Akim Demaille <akim@epita.fr>
2350
2351 * src/reader.c (reader): Calling symbols_output once is enough.
2352
49701457
AD
23532001-12-10 Akim Demaille <akim@epita.fr>
2354
2355 Now that states have a complete set of members, the linked list of
2356 reductions is useless: just fill directly the state's reductions
2357 member.
2358
2359 * src/state.h (struct reductions): Remove member `number' and
2360 `next'.
2361 * src/LR0.c (first_reduction, last_reduction): Remove.
2362 (save_reductions): Don't link the new reductions, store them in
2363 this_state.
2364 * src/lalr.c (set_state_table): No need to attach reductions to
2365 states, it's already done.
2366 * src/output.c (output_actions): No longer free the shifts, then
2367 the reductions, then the states: free all the states and their
2368 members.
2369
0edad749
AD
23702001-12-10 Akim Demaille <akim@epita.fr>
2371
2372 * src/options.c (OPTN, DRTV, BOTH): New.
2373 (option_table): Use them.
2374
0edad749
AD
2375 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2376 the job of system.h.
2377 * src/options.c: Don't include stdio.h and xalloc.h for the same
2378 reasons.
2379
5449dd0f
AD
23802001-12-10 Akim Demaille <akim@epita.fr>
2381
2382 * src/output.c (output, prepare): Make sure the values of the
2383 muscles `action' and `prologue' are 0-terminated.
2384
a870c567
AD
23852001-12-10 Akim Demaille <akim@epita.fr>
2386
2387 Clean up GCC warnings.
2388
2389 * src/reader.c (copy_action): `buf' is not used.
2390 (parse_skel_decl): Be static.
2391 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2392 * src/options.h (create_long_option_table): Have a real prototype.
2393 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2394 (hash_delete_at): Return const void *.
2395 Adjust casts to preserve the const.
2396
80df8768
AD
23972001-12-10 Akim Demaille <akim@epita.fr>
2398
2399 * configure.in: Require 2.52g.
2400 M4 is not needed, but AUTOM4TE is.
2401 * m4/m4.m4: Remove.
2402 * tests/Makefile.am: Adjust.
2403
f693ad14
AD
24042001-12-10 Akim Demaille <akim@epita.fr>
2405
2406 One structure for states is enough, even though theoretically
2407 there are LR(0) states and LALR(1) states.
2408
2409 * src/lalr.h (state_t): Remove.
2410 (state_table): Be state_t **, not state_t *.
2411 * src/state.h (core, CORE_ALLOC): Rename as...
2412 (state_t, STATE_ALLOC): this.
2413 Add the LALR(1) members: shifts, reductions, errs.
2414 * src/LR0.c (state_table): Rename as...
2415 (state_hash): this, to avoid name clashes with the global
2416 `state_table'.
2417 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2418 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2419
74ffbcb6
AD
24202001-12-10 Akim Demaille <akim@epita.fr>
2421
2422 Bison dumps core on bash.y.
2423 Reported by Pascal Bart.
2424
2425 * src/warshall.c (bitmatrix_print): New.
2426 (TC): Use it.
2427 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2428 j must be the outer loop.
2429 * tests/regression.at (Broken Closure): New.
2430
07708e19
AD
24312001-12-05 Akim Demaille <akim@epita.fr>
2432
2433 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2434 its argument.
2435