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