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