]>
Commit | Line | Data |
---|---|---|
6e649e65 PE |
1 | 2002-11-15 Paul Eggert <eggert@twinsun.com> |
2 | ||
3 | * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo, | |
4 | src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h, | |
5 | tests/action.at, tests/calc.at, tests/conflicts.at, | |
6 | tests/cxx-type.at, tests/regression.at: | |
7 | "parse error" -> "syntax error" for POSIX compatibility. | |
8 | "parsing stack overflow..." -> "parser stack overflow" so | |
9 | that code matches Bison documentation. | |
10 | ||
0f39aab9 AD |
11 | 2002-11-15 Akim Demaille <akim@epita.fr> |
12 | ||
13 | * src/parse-gram.y (declaration): Have %parse-param and %lex-param | |
14 | take two BRACED_CODE, not two string_content. | |
15 | Free the scanner's obstack when we are done. | |
16 | (code_content): New. | |
17 | * tests/calc.at: Adjust. | |
18 | * doc/bison.texinfo: Adjust. | |
19 | Also, make sure to include the `,' for these declarations. | |
20 | ||
761c1926 AD |
21 | 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be> |
22 | ||
23 | * m4/prereq.m4: Removed the commented jm_PREREQ_HASH | |
24 | definition; avoids potential autoreconf problems. | |
25 | ||
b0f98b10 AD |
26 | 2002-11-15 Akim Demaille <akim@epita.fr> |
27 | ||
28 | Always check the value returned by yyparse. | |
29 | ||
30 | * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value | |
31 | returned by yyparse. | |
32 | (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument. | |
33 | Adjust calls. | |
34 | * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value | |
35 | returned by yyparse. | |
36 | ||
970785f1 PH |
37 | 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
38 | ||
39 | * data/glr.c (yyFail): Always set yyerrflag. Corrects regression | |
40 | on input.at test. | |
41 | ||
8fcc7db1 PE |
42 | 2002-11-14 Paul Eggert <eggert@twinsun.com> |
43 | ||
7ec1b48e PE |
44 | * src/output.c (output_skeleton): Call xfopen instead of |
45 | duplicating xfopen's body. | |
46 | ||
cfff7583 PE |
47 | Fix bugs reported by Nelson H. F. Beebe in |
48 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>. | |
49 | ||
8fcc7db1 PE |
50 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that |
51 | "$CC -E foo.h" is allowed, as this doesn't work with the Portland | |
52 | Group compiler. Instead, use "$CC -E bar.c". Include the .h | |
53 | file twice in the grammar, as an extra check. | |
54 | ||
55 | * tests/input.at (Torturing the Scanner): Surround the | |
56 | backslash-newline tests with "#if 0", to make it less likely that | |
57 | we'll run into compiler bugs. Bring back solitary \ inside | |
58 | comment, but add a closing comment to work around HP C bug. Don't | |
59 | test backslash-newline in C character constant. This should fix | |
60 | the input.at bug reported by Nelson H. F. Beebe in | |
61 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>. | |
62 | ||
4e8d992c AD |
63 | 2002-11-14 Akim Demaille <akim@epita.fr> |
64 | ||
65 | * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit | |
66 | status of the compiler. | |
f32b346d | 67 | Calling `exit 1' is no longer needed. |
4e8d992c AD |
68 | Reported by Nelson H. F. Beebe. |
69 | ||
9501dc6e AD |
70 | 2002-11-14 Akim Demaille <akim@epita.fr> |
71 | ||
72 | * tests/atlocal.in (CPPFLAGS): We have config.h. | |
73 | * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR): | |
74 | New. | |
75 | * tests/actions.at, tests/calc.at, tests/conflicts.at, | |
76 | * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at, | |
77 | * tests/regression.at, tests/torture.at: Use them for all the | |
78 | grammars that are to be compiled. | |
79 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as... | |
80 | * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this. | |
81 | * doc/bison.texinfo (GLR Parsers): Document `inline'. | |
82 | ||
18b519c0 AD |
83 | 2002-11-14 Akim Demaille <akim@epita.fr> |
84 | ||
85 | * doc/bison.texinfo: Various formatting changes (alignments in | |
86 | samples, additional @group/@end group, GCS in samples. | |
87 | Use @deffn instead of simple @table to define the directives, | |
88 | macros, variables etc. | |
89 | ||
9a86cdb9 PE |
90 | 2002-11-13 Paul Eggert <eggert@twinsun.com> |
91 | ||
daa33def PE |
92 | Fix some bugs reported by Albert Chin-A-Young in |
93 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001881.html>. | |
18b519c0 | 94 | |
daa33def | 95 | * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c |
8fcc7db1 | 96 | -o c"; the HP C compiler chatters during compilation. |
daa33def PE |
97 | Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c". |
98 | * tests/headers.at (export YYLTYPE): Likewise. | |
99 | ||
100 | * tests/input.at (Torturing the Scanner): Remove lines containing | |
8fcc7db1 | 101 | solitary backslashes, as they tickle a bug in the HP C compiler. |
daa33def | 102 | |
9a86cdb9 PE |
103 | * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid // |
104 | comments, since they're not portable. Use GNU coding style. | |
105 | ||
9c1e26bd AD |
106 | 2002-11-13 Akim Demaille <akim@epita.fr> |
107 | ||
108 | * data/yacc.c: Leave bigger chunks of quoted text. | |
109 | (YYDSYMPRINTF): New. | |
110 | Use it to report symbol activities. | |
111 | * data/glr.c (YYDSYMPRINTF): New. | |
112 | Use it. | |
113 | ||
87f721cc PE |
114 | 2002-11-12 Paul Eggert <eggert@twinsun.com> |
115 | ||
116 | Version 1.75b. | |
117 | ||
118 | * data/glr.c (yydoAction): Return YYRESULTTAG, not int. | |
119 | (yyglrReduce): Return yyok, not 0. | |
120 | This should avoid the enumerated-type warnings reported | |
121 | by Nelson H.F. Beebe in | |
122 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001872.html>. | |
123 | ||
124 | * lib/bbitset.h (BITSET_INLINE): Remove. | |
125 | * lib/bitset.h [! BITSET_INLINE]: Remove. | |
126 | (bitset_set, bitset_reset, bitset_test): Rename local vars | |
127 | to avoid shadowing warnings by GCC. | |
128 | ||
129 | * data/glr.c (inline): Remove #define. It's the user's | |
130 | responsibility to #define it away, just like 'const'. | |
131 | This fixes one of the bugs reported by Nelson H.F. Beebe in | |
132 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001873.html>. | |
18b519c0 | 133 | |
87f721cc PE |
134 | * Makefile.maint (po-check): Scan .l and .y files instead of the |
135 | .c and the .h files that they generate. This fixes the bug | |
136 | reported by Tim Van Holder in: | |
137 | <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html> | |
138 | Look for N_ as well as for _. Try to avoid matching #define for | |
139 | N_ and _. | |
140 | * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c, | |
141 | src/system.h. Add src/parse-gram.y, src/scan-gram.l. | |
142 | * src/scan-gram.l: Revamp regular expressions so that " and ' | |
143 | do not confuse xgettext. | |
144 | ||
145 | * src/struniq.h (struniq_new): Do not declare the return type | |
146 | to be 'const'; this violates the C standard. | |
147 | * src/struniq.c (struniq_new): Likewise. | |
148 | ||
be14ade5 AD |
149 | 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com> |
150 | ||
151 | * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the | |
152 | duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq | |
153 | linker. | |
154 | ||
05291fbc AD |
155 | 2002-11-12 Akim Demaille <akim@epita.fr> |
156 | ||
157 | * Makefile.maint: Sync with Autoconf: | |
158 | (local_updates): New. | |
159 | ||
1f5fd52e AD |
160 | 2002-11-12 Akim Demaille <akim@epita.fr> |
161 | ||
162 | * po/POTFILES.in (src/lalr.c, src/state.c): Remove | |
163 | ||
283f1e64 AD |
164 | 2002-11-12 Akim Demaille <akim@epita.fr> |
165 | ||
166 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the | |
167 | locations. | |
168 | ||
886b69d1 AD |
169 | 2002-11-12 Akim Demaille <akim@epita.fr> |
170 | ||
171 | * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT, | |
172 | not yyvalue. | |
173 | ||
3df37415 AD |
174 | 2002-11-12 Akim Demaille <akim@epita.fr> |
175 | ||
176 | * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New. | |
177 | Use it to test the GLR parser. | |
178 | ||
7bd6c77e AD |
179 | 2002-11-12 Akim Demaille <akim@epita.fr> |
180 | ||
181 | * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton | |
182 | defines it. | |
183 | * data/glr.c (yystos): New. | |
184 | (b4_yysymprint_generate, b4_yydestruct_generate): Invoke. | |
185 | (YYDSYMPRINT): New. | |
186 | (yyval): Don't define it, it is handled via M4. | |
187 | (yyrecoverParseError): Free verbosely the discarded symbols. | |
188 | * data/yacc.c (yysymprint): Remove, rather... | |
189 | (b4_yysymprint_generate): invoke. | |
190 | * data/c.m4 (b4_yysymprint_generate): New. | |
191 | Accept pointers as arguments, as opposed to the version from | |
192 | yacc.c. | |
193 | (b4_yydestruct_generate): Likewise. | |
194 | * tests/cations.at (Printers and Destructors): Use Bison directives | |
195 | instead of CPP macros. | |
196 | Don't rely on internal details. | |
197 | ||
b0400cc6 AD |
198 | 2002-11-12 Akim Demaille <akim@epita.fr> |
199 | ||
200 | * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New. | |
201 | * data/yacc.c: Rename yychar1 as yytoken, as in glr.c. | |
202 | Don't work on yychar (i.e., do set it to YYEMPTY, don't match | |
203 | it against YYEMPTY and so forth), work on yytoken (i.e., set | |
204 | it to YYEMPTY etc.). | |
205 | (yydestruct): Replace with a b4_yydestruct_generate invocation. | |
206 | (b4_symbol_actions): Remove. | |
207 | * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands | |
208 | for 0, end-of-input. | |
209 | ||
72f889cc AD |
210 | 2002-11-12 Akim Demaille <akim@epita.fr> |
211 | ||
212 | * doc/bison.texinfo (Destructor Decl): New. | |
213 | ||
b1ae9233 AD |
214 | 2002-11-12 Akim Demaille <akim@epita.fr> |
215 | ||
216 | * src/tables.c (tables_generate): Use free for pointers that | |
217 | cannot be NULL, not XFREE. | |
218 | (pack_vector): Use assert, not fatal, for bound violations. | |
219 | * src/state.c (state_new): Likewise. | |
220 | * src/reader.c (reader): Likewise. | |
221 | * src/lalr.c (set_goto_map): Likewise. | |
72f889cc | 222 | * src/location.h (LOCATION_PRINT): If first_line is 0, just issue |
b1ae9233 AD |
223 | the file name. |
224 | ||
7ec2d4cd AD |
225 | 2002-11-12 Akim Demaille <akim@epita.fr> |
226 | ||
227 | * src/scan-gram.l, src/reader.h (scanner_last_string_free): | |
228 | Restore. | |
229 | * src/scan-gram.l (last_string): Is global to the file, not to | |
230 | yylex. | |
231 | * src/parse-gram.y (input): Don't append the epilogue here, | |
232 | (epilogue.opt): do it here, and free the scanner's obstack. | |
233 | * src/reader.c (epilogue_set): Rename as... | |
234 | (epilogue_augment): this. | |
235 | * data/c.m4 (b4_epilogue): Defaults to empty. | |
236 | ||
573a6cd3 AD |
237 | 2002-11-12 Akim Demaille <akim@epita.fr> |
238 | ||
239 | * src/getargs.c (long_options): Remove duplicates. | |
240 | * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar: | |
241 | Remove. | |
242 | * doc/bison.rnh: Remove. | |
243 | * doc/bison.texinfo (VMS Invocation): Remove. | |
244 | ||
95612cfa AD |
245 | 2002-11-12 Akim Demaille <akim@epita.fr> |
246 | ||
247 | * src/struniq.h, src/struniq.c (struniq_t): Is const. | |
248 | (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New. | |
249 | ||
250 | Use struniq for symbols. | |
251 | ||
252 | * src/symtab.h (symbol_t): The tag member is a struniq. | |
253 | (symbol_type_set): Adjust. | |
254 | * src/symtab.c (symbol_new): Takes a struniq. | |
255 | (symbol_free): Don't free the tag member. | |
256 | (hash_compare_symbol_t, hash_symbol_t): Rename as... | |
257 | (hash_compare_symbol, hash_symbol): these. | |
258 | Use the fact that tags as struniqs. | |
259 | (symbol_get): Use struniq_new. | |
260 | * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get): | |
261 | Returns a strniq. | |
262 | * src/reader.h (merger_list, grammar_currentmerge_set): The name | |
263 | and type members are struniqs. | |
264 | * src/reader.c (get_merge_function) | |
265 | (grammar_current_rule_merge_set): Adjust. | |
266 | (TYPE, current_type): Are struniq. | |
267 | ||
268 | Use struniq for file names. | |
269 | ||
270 | * src/files.h, src/files.c (infile): Split into... | |
271 | (grammar_file, current_file): these. | |
272 | * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust. | |
273 | * src/reduce.c (reduce_print): Likewise. | |
274 | * src/getargs.c (getargs): Likewise. | |
275 | * src/complain.h, src/complain.c: Likewise. | |
276 | * src/main.c (main): Call struniqs_new early enough to use it for | |
277 | file names. | |
278 | Don't free the input file name. | |
279 | ||
3e6656f9 AD |
280 | 2002-11-12 Akim Demaille <akim@epita.fr> |
281 | ||
282 | * src/symtab.c (symbol_free): Remove dead deactivated code: | |
283 | type_name are properly removed. | |
284 | Don't use XFREE to free items that cannot be NULL. | |
285 | * src/struniq.h, src/struniq.c: New. | |
286 | * src/main.c (main): Initialize/free struniqs. | |
287 | * src/parse-gram.y (%union): Add astruniq member. | |
288 | (yyprint): Adjust. | |
289 | * src/scan-gram.l (<{tag}>): Return a struniq. | |
290 | Free the obstack bit that used to store it. | |
291 | * src/symtab.h (symbol_t): The 'type_name' member is a struniq. | |
292 | ||
7672019c PE |
293 | 2002-11-11 Paul Eggert <eggert@twinsun.com> |
294 | ||
295 | Revamp to fix many (but not all) of the C- and M4-related quoting | |
296 | problems. Among other things, this fixes the Bison bug reported | |
297 | by Jan Hubicka when processing the Bash grammar; see: | |
298 | <http://mail.gnu.org/pipermail/bison-patches/2002-November/001329.html> | |
299 | ||
300 | Use new @ escapes consistently. Represent brackets with @{ and @} | |
301 | rather than @<:@ and @:>@, since this works a bit better with dumb | |
302 | editors like vi. Represent @ with @@, since @ is now consistently | |
303 | an escape. Use @oline@ and @ofile@ rather than __oline__ and | |
304 | __ofile__, to avoid unexpected expansions. Similarly, use @output | |
305 | rather than #output. | |
306 | ||
307 | * data/c.m4 (b4_copyright): Omit file name from comment, since | |
308 | the file name could contain "*/". | |
309 | (b4_synclines_flag): Don't quote the 2nd argument; it should already | |
310 | be quoted. All uses changed. | |
311 | ||
312 | * data/glr.c: Use new @ escapes consistently. | |
313 | (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name, | |
314 | b4_output_header_suffix, b4_output_header_name, b4_header_guard): | |
315 | Remove, since they couldn't handle arbitrary characters in file | |
316 | names. | |
317 | * data/lalr1.cc: Likewise. | |
318 | * data/yacc.c: Likewise. | |
319 | ||
320 | * src/files.c (output_infix): Remove; all uses removed. | |
321 | * src/files.h: Likewise. | |
322 | ||
323 | * data/glr.c: Remove use of "#ifdef b4_header_guard", since it | |
324 | mishandled funny characters in file names, and anyway it isn't | |
325 | needed any more. | |
326 | * data/yacc.c: Likewise. | |
327 | * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard. | |
328 | ||
329 | * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would. | |
330 | * data/yacc.c: Likewise. | |
331 | ||
332 | * src/muscle_tab.c: Include quotearg.h, since we need to quote C | |
333 | strings now. | |
334 | (muscle_init): Quote filename as a C string. | |
335 | * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused. | |
336 | (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros. | |
337 | * src/output.c (escaped_file_name_output): New function. | |
338 | (prepare_symbols): Quote tokens for M4. | |
339 | (prepare): Don't insert output_infix, output_prefix, | |
340 | output_parser_name, output_header_name; this is now down by scan-skel. | |
341 | Insert skeleton as a C string. | |
342 | ||
343 | * src/output.c (user_actions_output, symbol_destructors_output, | |
344 | symbol_printers_output): Quote filenames for C and M4. | |
345 | * src/reader.c (prologue_augment, epilogue_set): Likewise. | |
346 | ||
347 | * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash | |
348 | escapes other than \\ and \'; this simplifies the code. | |
349 | (<SC_STRING>): Likewise, for \\ and \". | |
350 | (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE, | |
351 | SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too. | |
352 | Use new escapes @{ and @} for [ and ]. | |
353 | ||
354 | * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing | |
355 | them with auto vars. | |
356 | Switch to new escape scheme, where @ is the escape character uniformly. | |
357 | Abort if a stray escape character is found. Avoid unbounded input | |
358 | buffer when parsing non-escaped text. | |
359 | ||
360 | * tests/input.at (Torturing the Scanner): Add tests that @oline@, | |
361 | __oline__, #output, $@, and @{ do not have unintended meanings. | |
362 | ||
acea4f3b PE |
363 | 2002-11-09 Paul Eggert <eggert@twinsun.com> |
364 | ||
365 | Fix the test failure due to GCC warnings described in | |
366 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001815.html>. | |
367 | * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which | |
368 | evaluate to 0 if it's impossible for NINF to be in the respective | |
369 | table. | |
370 | (yygetLRActions, yyrecoverParseError): Use them. | |
371 | ||
372 | * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were | |
373 | counted in the token inserted at end of file. Now takes | |
374 | location_t *, not location_t, so that the location can be | |
375 | adjusted. All uses changed. | |
376 | ||
377 | * tests/regression.at (Invalid inputs): Adjust wording in | |
378 | diagnostic to match the new behavior. | |
379 | ||
380 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR, | |
381 | AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR, | |
382 | AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x)) | |
383 | abort ();'. This reduces the runtime of the "Many lookaheads" | |
384 | test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running | |
385 | GCC 3.2. | |
386 | ||
20ef1ad5 PE |
387 | 2002-11-07 Paul Eggert <eggert@twinsun.com> |
388 | ||
389 | * src/parse-gram.y (CHARACTER): Remove unused token. | |
390 | All uses removed. | |
391 | ||
392 | * src/scan-gram.l: Remove stack option. We no longer use the | |
393 | stack, since the stack was never deeper than 1; instead, use the | |
394 | new auto var c_context to record the stacked value. | |
395 | ||
396 | Remove nounput option. At an unexpected end of file, we now unput | |
397 | the minimal input necessary to end cleanly; this simplifies the | |
398 | code. | |
399 | ||
400 | Avoid unbounded token sizes where this is easy. | |
401 | ||
402 | (unexpected_end_of_file): New function. | |
403 | Use it to systematize the error message on unexpected EOF. | |
404 | (last-string): Now auto, not static. | |
405 | (YY_OBS_FREE): Remove unnecessary do while (0) wrapper. | |
406 | (scanner_last_string_free): Remove; not used. | |
407 | (percent_percent_count): Move decl to just before use. | |
408 | (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file, | |
409 | not the (never otherwised-used) CHARACTER. | |
410 | ||
93724f13 AD |
411 | 2002-11-07 Akim Demaille <akim@epita.fr> |
412 | ||
413 | Let yyerror always receive the msg as last argument, so that | |
414 | yyerror can be variadic. | |
415 | ||
416 | * data/yacc.c (b4_yyerror_args): New. | |
417 | Use it when calling yyerror. | |
418 | * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New. | |
419 | Use it when calling yyerror. | |
420 | * doc/bison.texinfo (Error Reporting): Adjust. | |
421 | * tests/calc.at (_AT_DATA_CALC_Y): Adjust. | |
422 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust. | |
423 | ||
6e40b4eb AD |
424 | 2002-11-06 Akim Demaille <akim@epita.fr> |
425 | ||
426 | #line should have quoted strings. | |
427 | Ideally, this should be done by m4_quotearg. | |
428 | ||
429 | * src/scan-skel.l: Include quotearg.h. | |
430 | Quote __ofile__. | |
431 | * src/output.c (symbol_printers_output) | |
432 | (symbol_destructors_output): Quote the file name. | |
433 | ||
2dfbfc12 AD |
434 | 2002-11-06 Akim Demaille <akim@epita.fr> |
435 | ||
436 | * tests/regression.at (Invalid inputs): Adjust to the recent | |
437 | messages. | |
438 | ||
437c2d80 AD |
439 | 2002-11-06 Akim Demaille <akim@epita.fr> |
440 | ||
441 | Restore --no-lines. | |
442 | Reported by Jim Kent. | |
443 | ||
444 | * data/c.m4 (b4_syncline): New. | |
445 | * data/glr.c, data/yacc.c, data/lalr1.cc: Use it. | |
446 | * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline. | |
447 | * src/output.c (user_actions_output): Likewise. | |
448 | (prepare): Define 'b4_synclines_flag'. | |
2dfbfc12 | 449 | * src/muscle_tab.c (muscle_init): Don't define b4_linef. |
437c2d80 | 450 | |
900c5db5 AD |
451 | 2002-11-06 Akim Demaille <akim@epita.fr> |
452 | ||
453 | * src/main.c (main): Free `infile'. | |
454 | * src/scan-gram.l (handle_syncline): New. | |
455 | Recognize `#line'. | |
456 | * src/output.c (user_actions_output, symbol_destructors_output) | |
457 | (symbol_printers_output): Use the location's file name, not | |
458 | infile. | |
459 | * src/reader.c (prologue_augment, epilogue_set): Likewise. | |
460 | ||
e183b123 | 461 | 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
51b4a04c | 462 | |
e183b123 | 463 | * src/tables.c (matching_state): Don't allow states to match if |
51b4a04c | 464 | either has GLR conflict entries. |
e183b123 | 465 | |
193eb6b7 PE |
466 | 2002-11-05 Paul Eggert <eggert@twinsun.com> |
467 | ||
e183b123 PE |
468 | * src/scan-gram.l: Use more accurate diagnostics, e.g. |
469 | "integer out of range" rather than "invalid value". | |
470 | * tests/input.at (Invalid $n, Invalid @n): Change expected wording | |
471 | accordingly. | |
472 | ||
193eb6b7 PE |
473 | Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires. |
474 | Also, remove one static variable in the scanner. | |
475 | ||
476 | * src/scan-gram.l (braces_level): Now auto, not static. | |
477 | Initialize to zero if the compiler is being picky. | |
478 | (INITIAL): Clear braces_level instead of incrementing it. | |
479 | (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code, | |
480 | as POSIX 1003.1-2001 requires. | |
481 | * src/system.h (IF_LINT): New macro, taken from coreutils. | |
482 | * configure.ac: Define "lint" if --enable-gcc-warnings. | |
483 | ||
29c01725 AD |
484 | 2002-11-05 Akim Demaille <akim@epita.fr> |
485 | ||
486 | * src/scan-gram.l: When it starts with `%', complain about the | |
487 | whole directive, not just that `invalid character: %'. | |
488 | ||
8aeac3ca AD |
489 | 2002-11-04 Akim Demaille <akim@epita.fr> |
490 | ||
491 | * Makefile.maint: Update from Autoconf. | |
492 | (update, cvs-update, po-update, do-po-update): New. | |
493 | ||
793a58bb AD |
494 | 2002-11-04 Akim Demaille <akim@epita.fr> |
495 | ||
496 | * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex | |
497 | and yyerror. | |
498 | Have yyerror `use' its arguments. | |
499 | * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF | |
500 | returns true when location & yacc & pure & parse-param. | |
501 | (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments. | |
502 | ||
c4d720cd AD |
503 | 2002-11-04 Akim Demaille <akim@epita.fr> |
504 | ||
505 | * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid | |
506 | clashes. | |
507 | * src/scan-gram.l: Use [\'] instead of ['] to pacify | |
508 | font-lock-mode. | |
509 | Use complain_at. | |
510 | Use quote, not quote_n since LOCATION_PRINT no longer uses the | |
511 | slot 0. | |
512 | ||
613a0dc5 PE |
513 | 2002-11-03 Paul Eggert <eggert@twinsun.com> |
514 | ||
515 | * src/reader.c (get_merge_function, grammar_current_rule_check): | |
516 | Use consistent diagnostics for reporting type name clashes. | |
517 | Quote the types with <>, for consistency with Yacc. | |
518 | * tests/input.at (Type Clashes): Adjust to diagnostic changes. | |
519 | ||
2a8d363a AD |
520 | 2002-11-03 Akim Demaille <akim@epita.fr> |
521 | ||
522 | * data/c.m4 (b4_identification, b4_user_args, b4_parse_param): | |
523 | New. | |
524 | * data/yacc.m4 (b4_pure_args, b4_Pure_args): New. | |
525 | (b4_parse_param): Remove. | |
526 | Use b4_identification. | |
527 | Propagate b4_pure_args where needed to pass them to yyerror. | |
528 | * data/glr.m4 (b4_parse_param): Remove. | |
529 | (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args) | |
530 | (b4_lpure_formals): New. | |
531 | Use b4_identification. | |
532 | (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by | |
533 | b4_user_formals and b4_user_args. | |
534 | (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer) | |
535 | (yyreportAmbiguity): When using a pure parser, also need | |
536 | the location, and the parse-params. | |
537 | Adjust callers. | |
538 | (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError): | |
539 | When using a pure parser, also need the parse-params. | |
540 | Adjust callers. | |
541 | * tests/calc.at: Test pure (%pure-parser) and absolutely pure | |
542 | (%pure-parser + %parse-param) LALR and GLR parsers. | |
543 | (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF, | |
544 | AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF, | |
545 | AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF. | |
546 | (_AT_DATA_CALC_Y): Equip for purity of yyerror. | |
547 | (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF. | |
548 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity. | |
549 | * doc/bison.texinfo: Untabify the whole file. | |
550 | (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM. | |
551 | (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM. | |
552 | (Error Reporting): Adjust to these new directives. | |
553 | Document %error-verbose, deprecate YYERROR_VERBOSE. | |
554 | ||
9e32add8 AD |
555 | 2002-11-03 Akim Demaille <akim@epita.fr> |
556 | ||
557 | * tests/calc.at: Change all the AT_CHECK_CALC_LALR and | |
558 | AT_CHECK_CALC_GLR invocations to use % directives, instead of | |
559 | command line options. | |
560 | * tests/cxx-type.at: Formatting changes. | |
561 | ||
b02d90a5 PE |
562 | 2002-11-03 Paul Eggert <eggert@twinsun.com> |
563 | ||
564 | * src/scan-gram.l: Revamp to fix POSIX incompatibilities, | |
565 | to count columns correctly, and to check for invalid inputs. | |
9e32add8 | 566 | |
b02d90a5 PE |
567 | Use mbsnwidth to count columns correctly. Account for tabs, too. |
568 | Include mbswidth.h. | |
569 | (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS. | |
570 | (extend_location): New function. | |
571 | (YY_LINES): Remove. | |
572 | ||
573 | Handle CRLF in C code rather than in Lex code. | |
574 | (YY_INPUT): New macro. | |
575 | (no_cr_read): New function. | |
576 | ||
577 | Scan UCNs, even though we don't fully handle them yet. | |
578 | (convert_ucn_to_byte): New function. | |
579 | ||
580 | Handle backslash-newline correctly in C code. | |
581 | (SC_LINE_COMMENT, SC_YACC_COMMENT): New states. | |
582 | (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.; | |
583 | all uses changed. | |
584 | (tag, splice): New EREs. Do not allow NUL or newline in tags. | |
585 | Use {splice} wherever C allows backslash-newline. | |
586 | YY_STEP after space, newline, vertical-tab. | |
587 | ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT). | |
9e32add8 | 588 | |
b02d90a5 PE |
589 | (letter, id): Don't assume ASCII; e.g., spell out a-z. |
590 | ||
591 | ({int}, handle_action_dollar, handle_action_at): Check for integer | |
592 | overflow. | |
9e32add8 | 593 | |
b02d90a5 PE |
594 | (YY_STEP): Omit trailing semicolon, so that it's more like C. |
595 | ||
596 | (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00 | |
597 | as well as \000. Check for UCHAR_MAX, not 255. | |
598 | Allow \x with an arbitrary positive number of digits, as in C. | |
599 | Check for overflow here. | |
600 | Allow \? and UCNs, for compatibility with C. | |
601 | ||
602 | (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision | |
603 | with quote slot used by complain_at. | |
604 | ||
605 | * tests/input.at: Add tests for backslash-newline, m4 quotes | |
606 | in symbols, long literals, and funny escapes in strings. | |
607 | ||
608 | * configure.ac (jm_PREREQ_MBSWIDTH): Add. | |
609 | * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c. | |
610 | * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext. | |
611 | * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4. | |
612 | * m4/mbswidth.m4: New file, from GNU coreutils. | |
613 | ||
614 | * doc/bison.texinfo (Grammar Outline): Document // comments. | |
615 | (Symbols): Document that trigraphs have no special meaning in Bison, | |
616 | nor is backslash-newline allowed. | |
617 | (Actions): Document that trigraphs have no special meaning. | |
618 | ||
619 | * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove; | |
620 | no longer used. | |
621 | ||
622 | 2002-11-02 Paul Eggert <eggert@twinsun.com> | |
623 | ||
624 | * src/reader.c: Don't include quote.h; not needed. | |
625 | (get_merge_function): Reword warning to be consistent with | |
626 | type clash diagnostic in grammar_current_rule_check. | |
627 | ||
628 | * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two | |
629 | bug in trigraph handling. | |
630 | ||
631 | * src/output.c (prepare_symbols): When printing token names, | |
632 | escape "[" as "@<:@" and likewise for "]". | |
633 | ||
634 | * src/system.h (errno): Remove declaration, as we are now | |
635 | assuming C89 or better, and C89 guarantees errno. | |
636 | ||
762b212b PE |
637 | 2002-10-30 Paul Eggert <eggert@twinsun.com> |
638 | ||
639 | * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write): | |
640 | Check for close failures. | |
641 | * src/files.h (xfclose): Return void, not int, since it always | |
642 | returned zero. | |
643 | * src/files.c (xfclose): Likewise. Report I/O error if ferror | |
644 | indicates one. | |
645 | * src/output.c (output_skeleton): Use xfclose rather than fclose | |
646 | and ferror. xfclose now checks ferror. | |
647 | ||
648 | * data/glr.c (YYLEFTMOST_STATE): Remove. | |
649 | (yyreportTree): Use a stack-based leftmost state. This avoids | |
650 | our continuing battles with bogus warnings about initializers. | |
651 | ||
56100c60 AD |
652 | 2002-10-30 Akim Demaille <akim@epita.fr> |
653 | ||
654 | * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only | |
655 | #if. | |
656 | ||
51b4a04c PH |
657 | 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
658 | ||
659 | * tests/glr-regr1.at: New test for reported regressions. | |
660 | * tests/testsuite.at: Add glr-regr1.at test. | |
661 | * tests/Makefile.am: Add glr-regr1.at test. | |
e183b123 | 662 | |
bf1ebda2 PE |
663 | 2002-10-24 Paul Eggert <eggert@twinsun.com> |
664 | ||
5c16c6b1 PE |
665 | Version 1.75a. |
666 | ||
bf1ebda2 PE |
667 | * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration. |
668 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since | |
669 | we use malloc. Don't assume 'A' through 'Z' are contiguous. | |
670 | Don't assume strdup exists; POSIX says its an XSI extension. | |
671 | Check for buffer overflow on input. | |
672 | ||
b526ee61 AD |
673 | 2002-10-24 Akim Demaille <akim@epita.fr> |
674 | ||
675 | * src/output.c (output_skeleton): Don't disable M4sugar comments | |
676 | too soon: it results in comments being expanded. | |
677 | * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the | |
678 | first output. | |
679 | ||
f1886bb2 AD |
680 | 2002-10-24 Akim Demaille <akim@epita.fr> |
681 | ||
682 | * data/yacc.c (m4_int_type): New. | |
683 | * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed | |
684 | char' as only yacc.c wants K&R portability. | |
685 | * data/glr.c (yysigned_char): Remove. | |
686 | * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name. | |
687 | Reported by Quoc Peyrot. | |
688 | ||
c5576256 PE |
689 | 2002-10-23 Paul Eggert <eggert@twinsun.com> |
690 | ||
691 | * src/main.c (main): With --trace=time, report times even if a | |
692 | non-fatal error occurs. Formerly, the times were reported in some | |
693 | such cases but not in others. | |
694 | * src/reader.c (reader): Just return if a complaint has been issued, | |
695 | instead of exiting, so that 'main' can report times. | |
696 | ||
27b0ffea AD |
697 | 2002-10-22 Akim Demaille <akim@epita.fr> |
698 | ||
699 | * src/system.h: Include sys/types. | |
700 | Reported by Bert Deknuydt. | |
701 | ||
223a7883 PE |
702 | 2002-10-23 Paul Eggert <eggert@twinsun.com> |
703 | ||
704 | * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX. | |
705 | Suggested by Art Haas. | |
706 | ||
707 | 2002-10-22 Paul Eggert <eggert@twinsun.com> | |
708 | ||
709 | * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit | |
710 | decl; not needed any more. | |
711 | * src/main.c (main): Use return to exit, undoing yesterday's change. | |
712 | The last OS that we could find where this wouldn't work is | |
713 | SunOS 3.5, and that's too old to worry about now. | |
714 | ||
715 | * data/glr.c (struct yyltype): Define members even when not | |
716 | doing locations. This is more consistent with yacc.c, and it | |
717 | works around the following bug reports: | |
718 | http://mail.gnu.org/pipermail/bug-bison/2002-October/001764.html | |
719 | http://mail.gnu.org/pipermail/bug-bison/2002-October/001769.html | |
720 | and I hope it also fixes this bug report: | |
721 | http://mail.gnu.org/pipermail/bug-bison/2002-October/001748.html | |
27b0ffea | 722 | |
223a7883 PE |
723 | * doc/bison.texinfo: Minor spelling and typographical fixes. Use |
724 | @acronym consistently. Standardize on "Yacc" instead of "YACC", | |
725 | "Algol" instead of "ALGOL". Give a bit more history about BNF. | |
726 | ||
8b76775a AD |
727 | 2002-10-22 Akim Demaille <akim@epita.fr> |
728 | ||
729 | * data/README: New. | |
730 | ||
6db10d14 PE |
731 | 2002-10-21 Paul Eggert <eggert@twinsun.com> |
732 | ||
733 | Be consistent about 'bool'; the old code used an enum in one | |
734 | module and an int in another, and this violates the C standard. | |
735 | * m4/stdbool.m4: New file, from coreutils 4.5.3. | |
736 | * configure.ac (AC_HEADER_STDBOOL): Add. | |
737 | * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4. | |
738 | * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a) | |
739 | * src/symtab.c (hash_compare_symbol_t): Likewise. | |
740 | * src/system.h (bool, false, true): Use a definition consistent | |
741 | with ../lib/hash.c. All uses changed. | |
742 | ||
743 | * src/complain.c (warning_issued): Renamed from warn_message_count, | |
744 | so that we needn't worry about integer overflow (!). | |
745 | Now of type bool. All uses changed. | |
746 | (complaint_issued): Renamed from complain_message_count; likewise. | |
747 | ||
748 | * src/main.c (main): Use exit to exit with failure. | |
27b0ffea | 749 | |
6db10d14 PE |
750 | * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS |
751 | rather than 1 and 0. | |
752 | * src/main.c (main): Likewise. | |
753 | * src/getargs.c (getargs): Likewise. | |
754 | * src/reader.c (reader): Likewise. | |
755 | ||
756 | * src/getarg.c (getargs): Remove duplicate code for | |
757 | "Try `bison --help'". | |
758 | ||
759 | * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2. | |
760 | What was that "2" for? | |
761 | ||
762 | * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)). | |
763 | * src/getargs.c (usage): Likewise. | |
764 | ||
765 | * src/getargs.c (getargs): When there are too few operands, report | |
766 | the last one. When there are too many, report the first extra | |
767 | one. This is how diffutils does it. | |
768 | ||
92a060fd PE |
769 | 2002-10-20 Paul Eggert <eggert@twinsun.com> |
770 | ||
771 | Remove K&R vestiges. | |
772 | * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove. | |
773 | * src/complain.c (VA_START): Remove. Assume prototypes. | |
774 | (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro. | |
775 | (private_strerror, warn_at, warn, complain_at, complain, fatal_at, | |
776 | fatal): Assume prototypes. | |
777 | * src/complain.h: Assume prototypes. | |
778 | * src/system.h (PARAMS): Remove. | |
779 | Include <limits.h> unconditionally, since it's guaranteeed even | |
780 | for a freestanding C89 compiler. | |
781 | (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them. | |
782 | * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype. | |
8b76775a | 783 | |
e7cb57c0 AD |
784 | 2002-10-20 Akim Demaille <akim@epita.fr> |
785 | ||
786 | * src/muscle_tab.c (muscle_grow): Remove trailing debugging code. | |
787 | * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New. | |
788 | (yyuserAction, yydoAction, yyglrReduce, yyresolveValue) | |
789 | (yyresolveStates, yyresolveAction, yyresolveStack) | |
790 | (yyprocessOneStack): Use them. | |
791 | (yy_reduce_print): New. | |
792 | * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param. | |
793 | ||
0245f82d AD |
794 | 2002-10-20 Akim Demaille <akim@epita.fr> |
795 | ||
796 | * data/c.m4 (b4_c_ansi_args): Recognize functions with no | |
797 | arguments and output `void'. | |
798 | (b4_c_function): Rename as... | |
799 | (b4_c_function_def): this. | |
800 | (b4_c_function_decl, b4_c_ansi_function_def) | |
801 | (b4_c_ansi_function_decl): New. | |
802 | Change the interpretation of the arguments: before `int, foo', now | |
803 | `int foo, foo'. | |
804 | * data/yacc.c (yyparse): Prototype and define thanks to these. | |
805 | Adjust b4_c_function_def uses. | |
806 | * data/glr.c (yyparse): Likewise, but ANSI only. | |
807 | ||
39912f52 AD |
808 | 2002-10-20 Akim Demaille <akim@epita.fr> |
809 | ||
810 | * src/output.c (prepare): Move the definition of `tokens_number', | |
811 | `nterms_number', `undef_token_number', `user_token_number_max' | |
812 | to... | |
813 | (prepare_tokens): Here. | |
814 | (prepare_tokens): Rename as... | |
815 | (prepare_symbols): this. | |
816 | (prepare): Move the definition of `rules_number' to... | |
817 | (prepare_rules): here. | |
818 | (prepare): Move the definition of `last', `final_state_number', | |
819 | `states_number' to... | |
820 | (prepare_states): here. | |
821 | * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'. | |
822 | ||
20c1e2ad AD |
823 | 2002-10-20 Akim Demaille <akim@epita.fr> |
824 | ||
825 | * src/tables.h, src/tables.c, src/output.c: Comment changes. | |
826 | ||
21964f43 AD |
827 | 2002-10-20 Akim Demaille <akim@epita.fr> |
828 | ||
829 | * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to... | |
830 | * data/c.m4: here. | |
831 | ||
66d30cd4 AD |
832 | 2002-10-20 Akim Demaille <akim@epita.fr> |
833 | ||
834 | * src/output.c (prepare): Use MUSCLE_INSERT_STRING. | |
835 | * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as | |
836 | `pair'. | |
837 | (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth', | |
838 | `name' to... | |
839 | * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type) | |
840 | (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name): | |
841 | These. | |
842 | ||
95f2c9fe PE |
843 | 2002-10-19 Paul Eggert <eggert@twinsun.com> |
844 | ||
845 | Do not create a temporary file, as that involves security and | |
846 | cleanup headaches. Instead, use a pair of pipes. | |
847 | Derived from a suggestion by Florian Krohm. | |
848 | * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files. | |
849 | * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove. | |
850 | * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove. | |
851 | (BISON_PREREQ_SUBPIPE): Add. | |
852 | * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c. | |
853 | Add subpipe.h, subpipe.c. | |
854 | * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4. | |
855 | * po/POTFILES.in: Add lib/subpipe.c. | |
856 | * src/output.c: Include "subpipe.h". | |
857 | (m4_invoke): Remove decl. | |
858 | (scan_skel): New decl. | |
859 | (output_skeleton): Use pipe rather than temporary file for m4 input. | |
860 | Check that m4sugar.m4 is readable, to avoid deadlock. | |
861 | Check for pipe I/O error. | |
862 | * src/scan-skel.l (readpipe): Remove decl. | |
863 | (scan_skel): New function, to be used in place of m4_invoke. | |
864 | Read from stream rather than file. | |
66d30cd4 | 865 | |
95f2c9fe PE |
866 | * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to |
867 | float, as this generates a warning on Solaris 8 + GCC 3.2 with | |
868 | --enable-gcc-warnings. Instead, divide into 1.0 rather than 1; | |
869 | this generates a more-accurate value anyway. | |
870 | ||
871 | * lib/timevar.c (timervar_accumulate): Rename locals to | |
872 | avoid confusion with similarly-named more-global. | |
873 | * src/muscle_tab.c (muscle_pair_list_grow): Likewise. | |
874 | ||
875 | * src/output.c (prepare): Use xstrdup to convert char const * | |
876 | to char *, to avoid GCC warning. | |
877 | ||
c19988b7 AD |
878 | 2002-10-19 Akim Demaille <akim@epita.fr> |
879 | ||
880 | * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS, | |
881 | LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS. | |
882 | Use them to have `calc.y' ready for %pure-parser. | |
883 | * data/yacc.c (YYLEX): Pass a yylex return type to | |
884 | b4_c_function_call. | |
885 | ||
ae7453f2 AD |
886 | 2002-10-19 Akim Demaille <akim@epita.fr> |
887 | ||
888 | Prototype support of %lex-param and %parse-param. | |
889 | ||
890 | * src/parse-gram.y: Add the definition of the %lex-param and | |
891 | %parse-param tokens, plus their rules. | |
892 | Drop the `_' version of %glr-parser. | |
893 | Add the "," token. | |
894 | * src/scan-gram.l (INITIAL): Scan them. | |
895 | * src/muscle_tab.c: Comment changes. | |
896 | (muscle_insert, muscle_find): Rename `pair' as `probe'. | |
897 | * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused. | |
898 | (muscle_entry_s): The `value' member is no longer const. | |
899 | Adjust all dependencies. | |
900 | * src/muscle_tab.c (muscle_init): Adjust: use | |
901 | MUSCLE_INSERT_STRING. | |
902 | Initialize the obstack earlier. | |
903 | * src/muscle_tab.h, src/muscle_tab.c (muscle_grow) | |
904 | (muscle_pair_list_grow): New. | |
905 | * data/c.m4 (b4_c_function_call, b4_c_args): New. | |
906 | * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param. | |
907 | * tests/calc.at: Use %locations, not --locations. | |
908 | (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser. | |
909 | ||
0e575721 AD |
910 | 2002-10-19 Akim Demaille <akim@epita.fr> |
911 | ||
912 | * src/getargs.c (usage): Take status as argument and exit | |
913 | accordingly. | |
914 | Report the traditional `Try ... --help' message when status != 0. | |
915 | (usage, version): Don't take a FILE * as arg, it is pointless. | |
916 | (getargs): When there is an incorrect number of arguments, make it | |
917 | an error, and report it GNUlically thanks to `usage ()'. | |
918 | ||
724ce7f5 PE |
919 | 2002-10-18 Paul Eggert <eggert@twinsun.com> |
920 | ||
3a781eb2 PE |
921 | * data/glr.c (yyreportParseError): Don't assume that sprintf |
922 | yields the length of the printed string, as this is not true | |
923 | on SunOS 4.1.4. Reported by Peter Klein. | |
924 | ||
724ce7f5 PE |
925 | * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc. |
926 | * tests/conflicts.at (%nonassoc and eof): Likewise. | |
927 | Fixes SunOS 4.1.4 test failure reported by Peter Klein. | |
928 | ||
473d0a75 AD |
929 | 2002-10-17 Akim Demaille <akim@epita.fr> |
930 | ||
931 | * src/getargs.h (trace_e): Add trace_scan, and trace_parse. | |
932 | * src/getargs.c (trace_types, trace_args): Adjust. | |
933 | * src/reader.c (grammar_current_rule_prec_set) | |
934 | (grammar_current_rule_dprec_set, grammar_current_rule_merge_set): | |
935 | Standardize error messages. | |
936 | And s/@prec/%prec/! | |
937 | (reader): Use trace_flag to enable scanner/parser debugging, | |
938 | instead of an adhoc scheme. | |
939 | * src/scan-gram.l: Remove trailing debugging code. | |
940 | ||
e76d2469 PE |
941 | 2002-10-16 Paul Eggert <eggert@twinsun.com> |
942 | ||
93e2236a PE |
943 | * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as |
944 | MUSCLE_TAB_H. | |
945 | ||
e76d2469 PE |
946 | * NEWS: Officially drop support for building Bison with K&R C, |
947 | since it didn't work anyway and it's not worth worrying about. | |
948 | * Makefile.maint (wget_files): Remove ansi2knr.c. | |
949 | (ansi2knr.c-url_prefix): Remove. | |
950 | * lib/.cvsignore: Remove ansi2knr, ansi2knr.*. | |
951 | * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
952 | * src/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
953 | ||
5bd1c419 PE |
954 | 2002-10-15 Paul Eggert <eggert@twinsun.com> |
955 | ||
956 | Stop using the "enum_" trick for K&R-style function definitions; | |
957 | it confused me, and I was the author! Instead, assume that people | |
958 | who want to use K&R C compilers (when using these modules in GCC, | |
959 | perhaps?) will run ansi2knr. | |
960 | ||
961 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove. | |
962 | All uses of "enum_" changed to "enum ". | |
963 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
964 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
e76d2469 | 965 | |
5bd1c419 PE |
966 | * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or, |
967 | abitset_and_or_cmp, abitset_andn, abitset_andn_cmp, | |
968 | abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy, | |
969 | abitset_copy1, abitset_disjoint_p, abitset_empty_p, | |
970 | abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse, | |
971 | abitset_not, abitset_ones, abitset_or, abitset_or_and, | |
972 | abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set, | |
973 | abitset_size, abitset_small_list, abitset_subset_p, abitset_test, | |
974 | abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero): | |
975 | Use function prototypes; this removes the need for declaring | |
976 | static functions simply to provide their prototypes. | |
977 | * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_, | |
978 | bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_, | |
979 | bitset_count_, bitset_create, bitset_dump, bitset_first, | |
980 | bitset_free, bitset_init, bitset_last, bitset_next, | |
981 | bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p, | |
982 | bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev, | |
983 | bitset_print, bitset_release_memory, bitset_toggle_, | |
984 | bitset_type_choose, bitset_type_get, bitset_type_name_get, | |
985 | debug_bitset): Likewise. | |
986 | * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise. | |
987 | * lib/bitset_stats.c (bitset_log_histogram_print, | |
988 | bitset_percent_histogram_print, bitset_stats_and, | |
989 | bitset_stats_and_cmp, bitset_stats_and_or, | |
990 | bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp, | |
991 | bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy, | |
992 | bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p, | |
993 | bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable, | |
994 | bitset_stats_equal_p, bitset_stats_free, bitset_stats_init, | |
995 | bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not, | |
996 | bitset_stats_ones, bitset_stats_or, bitset_stats_or_and, | |
997 | bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print, | |
998 | bitset_stats_print_1, bitset_stats_read, bitset_stats_reset, | |
999 | bitset_stats_set, bitset_stats_size, bitset_stats_subset_p, | |
1000 | bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get, | |
1001 | bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp, | |
1002 | bitset_stats_zero): Likewise. | |
1003 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
1004 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
1005 | bitsetv_dump, debug_bitsetv): Likewise. | |
1006 | * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn, | |
1007 | ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_, | |
1008 | ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add, | |
1009 | ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find, | |
1010 | ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove, | |
1011 | ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p, | |
1012 | ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list, | |
1013 | ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp, | |
1014 | ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset, | |
1015 | ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test, | |
1016 | ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero): | |
1017 | Likewise. | |
1018 | * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp, | |
1019 | lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy, | |
1020 | lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc, | |
1021 | lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free, | |
1022 | lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p, | |
1023 | lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init, | |
1024 | lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones, | |
1025 | lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune, | |
1026 | lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size, | |
1027 | lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor, | |
1028 | lbitset_xor_cmp, lbitset_zero): Likewise. | |
e76d2469 | 1029 | |
ae26e1f0 AD |
1030 | 2002-10-14 Akim Demaille <akim@epita.fr> |
1031 | ||
1032 | Version 1.75. | |
1033 | ||
d43baf71 AD |
1034 | 2002-10-14 Akim Demaille <akim@epita.fr> |
1035 | ||
1036 | * tests/Makefile.am (maintainer-check-posix): New. | |
1037 | ||
7ebc83e3 AD |
1038 | 2002-10-14 Akim Demaille <akim@epita.fr> |
1039 | ||
1040 | * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc | |
1041 | member. | |
1042 | ||
05846dae AD |
1043 | 2002-10-14 Akim Demaille <akim@epita.fr> |
1044 | ||
1045 | * src/tables.c (table_ninf_remap): base -> tab. | |
1046 | Reported by Matt Rosing. | |
1047 | ||
1318e37d PE |
1048 | 2002-10-14 Paul Eggert <eggert@twinsun.com> |
1049 | ||
447fbb17 PE |
1050 | * tests/action.at, tests/calc.at, tests/conflicts.at, |
1051 | tests/cxx-type.at, tests/headers.at, tests/input.at, | |
1052 | tests/regression.at, tests/synclines.at, tests/torture.at: | |
1053 | Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c", | |
1054 | so that the tests still work even if POSIXLY_CORRECT is set. | |
1055 | * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise. | |
05846dae | 1056 | |
1318e37d PE |
1057 | * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char, |
1058 | for portability to K&R hosts. Fix typo: signed char is guaranteed | |
1059 | only to 127, not to 128. | |
1060 | * data/glr.c (yysigned_char): New type. | |
1061 | * data/yacc.c (yysigned_char): Likewise. | |
1062 | * tests/regression.at (Web2c Actions): signed char -> yysigned_char. | |
1063 | ||
cc0f0794 PE |
1064 | 2002-10-13 Paul Eggert <eggert@twinsun.com> |
1065 | ||
5038f418 PE |
1066 | * data/yacc.c (yyparse): Rewrite to avoid "comparison is always |
1067 | true due to limited range of data type" warning from GCC. | |
1068 | ||
cc0f0794 PE |
1069 | * data/c.m4 (b4_token_defines): Protect against double-inclusion |
1070 | by wrapping enum yytokentype's definition inside #ifndef | |
1071 | YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12. | |
1072 | ||
6fed0802 AD |
1073 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1074 | ||
1075 | * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction): | |
1076 | Un yy- yyrhs to avoid the name clash with the global YYRHS. | |
1077 | ||
32f0598d AD |
1078 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1079 | ||
1080 | * Makefile.maint: Update from Autoconf 2.54. | |
1081 | * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54. | |
1082 | ||
7ea9a33f AD |
1083 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1084 | ||
1085 | * src/print.c (print_state): Separate the list of solved conflicts | |
1086 | from the other items. | |
1087 | * tests/conflicts.at (Resolved SR Conflicts): Adjust. | |
1088 | ||
ea99527d AD |
1089 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1090 | ||
1091 | Let nondeterministic skeletons be usable with deterministic | |
1092 | tables. | |
1093 | ||
1094 | With the patch, GAWK compiled by GCC without -O2 passes its test | |
1095 | suite using a GLR parser driven by LALR tables. It fails with -O2 | |
1096 | because `struct stat' gives two different answers on my machine: | |
1097 | 88 (definition of an auto var) and later 96 (memset on this var). | |
1098 | Hence the stack is badly corrumpted. The headers inclusion is to | |
1099 | blame: if I move the awk.h inclusion before GLR's system header | |
1100 | inclusion, the two struct stat have the same size. | |
1101 | ||
1102 | * src/tables.c (pack_table): Always create conflict_table. | |
1103 | (token_actions): Always create conflict_list. | |
1104 | * data/glr.c (YYFLAG): Remove, unused. | |
1105 | ||
f377f69f AD |
1106 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1107 | ||
1108 | * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code. | |
1109 | (O0FLAGS): New. | |
1110 | (VALGRIND, GXX): New. | |
1111 | * tests/atlocal.in (CFLAGS): Use O0FLAGS. | |
1112 | * tests/bison.in: Run $PREBISON a pre-command. | |
1113 | * tests/Makefile.am (maintainer-check, maintainer-check-valgrind) | |
1114 | (maintainer-check-g++): New. | |
1115 | * Makefile.am (maintainer-check): New. | |
1116 | ||
2a1fe6ed AD |
1117 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1118 | ||
1119 | * data/glr.c: Formatting changes. | |
1120 | Tweak some trace messages to match yacc.c's. | |
1121 | ||
f50adbbd AD |
1122 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1123 | ||
1124 | GLR parsers sometimes raise parse errors instead of performing the | |
1125 | default reduction. | |
1126 | Reported by Charles-Henry de Boysson. | |
1127 | ||
1128 | * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't | |
1129 | check the length of the traces when %glr. | |
1130 | (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from | |
1131 | GLR's traces. | |
1132 | (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New. | |
1133 | Test GLR parsers. | |
1134 | * data/glr.c (YYLEFTMOST_STATE): Fix its value. | |
1135 | (yyltype): Remove the yy prefix from the member names. | |
1136 | (yytable): Complete its comment. | |
1137 | (yygetLRActions): Map error action number from YYTABLE from | |
1138 | YYTABLE_NINF to 0. | |
1139 | (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF | |
1140 | (which was a bug: it should have been YYTABEL_NINF, and yet it was | |
1141 | not satisfying as we could compare an YYACTION computed from | |
1142 | YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the | |
1143 | only value for error actions. | |
1144 | (yyreportParseError): In verbose parse error messages, don't issue | |
1145 | `error' in the list of expected tokens. | |
1146 | * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the | |
1147 | next action to perform to match glr.c's decoding. | |
1148 | (yytable): Complete its comment. | |
1149 | ||
bcbad5b9 PE |
1150 | 2002-10-13 Paul Eggert <eggert@twinsun.com> |
1151 | ||
1152 | Fix problem reported by Henrik Grubbstroem in | |
1153 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>: | |
1154 | "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected, | |
1155 | because the Bison parser reads the second action before reducing | |
1156 | the first one. | |
1157 | * src/scan-gram.l (rule_length): New static var. | |
1158 | Use it to keep track of the rule length in the scanner, since | |
1159 | we can't expect the parser to be in lock-step sync with the scanner. | |
1160 | (handle_action_dollar, handle_action_at): Use this var. | |
1161 | * tests/actions.at (Exotic Dollars): Test for the problem. | |
05846dae | 1162 | |
14904b89 PE |
1163 | 2002-10-12 Paul Eggert <eggert@twinsun.com> |
1164 | ||
1fe611e5 PE |
1165 | * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>. |
1166 | * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>. | |
1167 | Include <sys/time.h> when checking for clock_t and struct tms. | |
1168 | Use same include order as source. | |
1169 | This is for the SunOS 4.1.4 porting bug reported by Peter Klein in | |
1170 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>. | |
05846dae | 1171 | |
1fe611e5 PE |
1172 | * lib/timevar.c: Update copyright date and clarify comments. |
1173 | (get_time) [IN_GCC]: Keep the GCC version for reference. | |
05846dae | 1174 | |
1fe611e5 PE |
1175 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import |
1176 | GCC version as of today, then merge Bison's changes. | |
1177 | Change "GCC" to "Bison" in copyright notice. timevar.def's | |
1178 | author is Akim, so change that too. | |
1179 | ||
98194095 PE |
1180 | * src/reader.c (grammar_current_rule_check): |
1181 | Don't worry about the default action if $$ is untyped. | |
1182 | Prevents bogus warnings reported by Jim Gifford in | |
1183 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>. | |
1184 | ||
14904b89 PE |
1185 | * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE. |
1186 | * data/glr.c, data/lalr1.cc, data/yacc.c: | |
1187 | Output token definitions before the first part of user declarations. | |
1188 | Fixes compatibility problem reported by Jim Gifford for kbd in | |
1189 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>. | |
1190 | ||
ff6dca18 PE |
1191 | 2002-10-11 Paul Eggert <eggert@twinsun.com> |
1192 | ||
1193 | * data/yacc.c (yyreport_parse_error): Remove, putting its body into... | |
1194 | (yyparse): here. This undoes some of the 2002-07-25 change. | |
1195 | Compatibility problem reported by Ralf S. Engelschall with | |
1196 | OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>. | |
1197 | ||
eb714592 AD |
1198 | 2002-10-11 Akim Demaille <akim@epita.fr> |
1199 | ||
1200 | * tests/regression.at Characters Escapes): New. | |
1201 | * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and | |
1202 | characters. | |
1203 | Reported by Jan Nieuwenhuizen. | |
1204 | ||
b7195100 AD |
1205 | 2002-10-11 Akim Demaille <akim@epita.fr> |
1206 | ||
1207 | * po/id.po: New. | |
1208 | ||
f28a0f2d PE |
1209 | 2002-10-10 Paul Eggert <eggert@twinsun.com> |
1210 | ||
1211 | Portability fixes for bitsets; this also avoids several GCC | |
1212 | warnings. | |
1213 | ||
1214 | * lib/abitset.c: Include <stddef.h>, for offsetof. | |
1215 | * lib/lbitset.c: Likewise. | |
1216 | ||
1217 | * lib/abitset.c (abitset_bytes): Return a size that is aligned | |
1218 | properly for vectors of objects. Do not assume that adding a | |
1219 | header size to a multiple of a word size yields a value that is | |
1220 | properly aligned for the whole union. | |
1221 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
1222 | ||
1223 | * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new, | |
1224 | unique names for structures. | |
1225 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
1226 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
1227 | ||
1228 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p, | |
1229 | abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p, | |
1230 | abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn, | |
1231 | abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor, | |
1232 | abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp, | |
1233 | abitset_andn_or, abitset_andn_or_cmp, abitset_or_and, | |
1234 | abitset_or_and_cmp, abitset_copy): Supply prototype decls, | |
1235 | to improve the type-checking that GCC can do. | |
1236 | * lib/bitset.c (bitset_op4_cmp): Likewise. | |
1237 | * lib/bitset_stats.c (bitset_stats_count, | |
1238 | bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero, | |
1239 | bitset_stats_copy, bitset_stats_disjoint_p, | |
1240 | bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p, | |
1241 | bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn, | |
1242 | bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp, | |
1243 | bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or, | |
1244 | bitset_stats_and_or_cmp, bitset_stats_andn_or, | |
1245 | bitset_stats_andn_or_cmp, bitset_stats_or_and, | |
1246 | bitset_stats_or_and_cmp): Likewise. | |
1247 | * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn, | |
1248 | lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor, | |
1249 | lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not, | |
1250 | lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise. | |
1251 | ||
1252 | * lib/abitset.h: Include bitset.h, not bbitset.h. | |
1253 | * lib/ebitset.h: Likewise. | |
1254 | * lib/lbitset.h: Likewise. | |
1255 | ||
1256 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types. | |
1257 | All instances of parameters of type enum bitset_opts are now of | |
1258 | type enum_bitset_opts, to conform to the C Standard, and similarly | |
1259 | for enum_bitset_type. | |
1260 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
1261 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
1262 | ||
1263 | Do not use "struct bitset_struct" to mean different things in | |
1264 | different modules. Not only is this confusing, it violates | |
1265 | the C Standard, which requires that structure types in different | |
1266 | modules must be compatible if one is to be passed to the other. | |
1267 | * lib/bbitset.h (bitset): Now points to a union, not to a struct. | |
1268 | All instances of "struct bitset_struct *" replaced with "bitset". | |
1269 | * lib/bitset.h (struct bitset_struct): Remove, replacing with.... | |
1270 | (union bitset_union, struct abitset_struct, struct ebitset_struct, | |
1271 | struct lbitset_struct, struct bitset_stats_struct): New types. | |
1272 | All uses of struct bitset_struct changed to union bitset_union, | |
1273 | etc. | |
1274 | * lib/abitset.c (struct abitset_struct, abitset, | |
1275 | struct bitset_struct): Remove. | |
1276 | * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats, | |
1277 | struct bitset_struct): Remove. | |
1278 | * lib/ebitset.c (struct ebitset_struct, ebitset, struct | |
1279 | bitset_struct): Remove. | |
1280 | * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct): | |
1281 | Likewise. | |
1282 | ||
1283 | Do not call a function of type T using a call that assumes the | |
1284 | function is of a different type U. Standard C requires that a | |
1285 | function must be called with a type that is compatible with its | |
1286 | definition. | |
1287 | * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
1288 | New decls. | |
1289 | * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
1290 | New functions. | |
1291 | * lib/ebitset.c (PFV): Remove. | |
1292 | * lib/lbitset.c (PFV): Likewise. | |
1293 | * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or, | |
1294 | ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New | |
1295 | decls. | |
1296 | (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions. | |
1297 | (ebitset_vtable): Use them. | |
1298 | * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or, | |
1299 | lbitset_xor): New functions. | |
1300 | (lbitset_vtable): Use them. | |
1301 | ||
1302 | * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p): | |
1303 | Declare. | |
1304 | ||
1305 | * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a | |
1306 | GCC warning. | |
1307 | * lib/lbitset.c (LBITSET_CURRENT1): Likewise. | |
1308 | Use offsetof, for simplicity. | |
1309 | ||
6fbe4984 PE |
1310 | 2002-10-06 Paul Eggert <eggert@twinsun.com> |
1311 | ||
1312 | * lib/bitset.h (bitset_reset): Do not assume that bitset_word is | |
1313 | the same width as int. This reapplies a hunk of the 2002-08-12 patch | |
1314 | <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>, | |
1315 | which was inadvertently undone by the 2002-09-30 patch. | |
1316 | * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is | |
1317 | the same width as int. | |
1318 | ||
420f93c8 PE |
1319 | 2002-10-04 Paul Eggert <eggert@twinsun.com> |
1320 | ||
1321 | Version 1.50. | |
1322 | ||
1323 | * configure.ac (AC_INIT), NEWS: Increment version number. | |
1324 | ||
1325 | * doc/bison.texinfo: Minor spelling, grammar, and white space | |
1326 | fixes. | |
1327 | (Symbols): Mention that any negative value returned from yylex | |
1328 | signifies end-of-input. Warn about negative chars. Mention | |
1329 | the portable Standard C character set. | |
1330 | ||
1331 | The GNU coding standard says CFLAGS and YFLAGS are reserved | |
1332 | for the installer to set. | |
1333 | * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS. | |
1334 | * src/Makefile.am (AM_CFLAGS): Likewise. | |
1335 | (AM_YFLAGS): Renamed from YFLAGS. | |
1336 | ||
1337 | Fix some MAX and MIN problems. | |
1338 | * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN. | |
1339 | * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX. | |
1340 | * src/symtab.h (SYMBOL_NUMBER_MAX): New macro. | |
1341 | * src/reader.c (reader): Use it. | |
1342 | ||
1343 | * tests/regression.at (Braces parsing): Use grep, not fgrep, as | |
1344 | POSIX 1003.1-2001 has removed fgrep. | |
1345 | ||
1346 | 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz> | |
1347 | ||
1348 | * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be | |
1349 | interpreted as signed. | |
1350 | * lib/ebitset.c (ebitset_list): Fix bug. | |
1351 | ||
ff68026d PE |
1352 | 2002-10-01 Paul Eggert <eggert@twinsun.com> |
1353 | ||
1354 | More fixes for 64-bit hosts and large bitsets. | |
1355 | ||
1356 | * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list, | |
1357 | abitset_size, abitset_list, abitset_list_reverse, abitset_list): | |
1358 | Use bitset_bindex, not int or unsigned int or size_t, to count bits. | |
1359 | * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count, | |
1360 | struct bitset_vtable.list, struct bitset_vtable.list_reverse, | |
1361 | bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last, | |
1362 | bitset_count_): Likewise. | |
1363 | * lib/bitset.h (bitset_iterator.num, bitset_iterator.i, | |
1364 | bitset_first, bitset_last): Likewise. | |
1365 | * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list, | |
1366 | bitset_stats_list_reverse, bitset_stats_size, | |
1367 | bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse): | |
1368 | Likewise. | |
1369 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
1370 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
1371 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
1372 | bitsetv_reflexive_transitive_closure): Likewise. | |
1373 | * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise. | |
1374 | * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse): | |
1375 | Likewise. | |
1376 | * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge): | |
1377 | Likewise. | |
420f93c8 | 1378 | |
ff68026d PE |
1379 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes): |
1380 | Use size_t, not unsigned int, to count bytes. | |
1381 | * lib/abitset.h (abitset_bytes): Likewise. | |
1382 | * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc): | |
1383 | Likewise. | |
1384 | * lib/bitset.h (bitset_bytes): Likewise. | |
1385 | * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise. | |
1386 | * lib/bitset_stats.h (bitset_stats_bytes): Likewise. | |
1387 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
1388 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
1389 | * lib/ebitset.h (ebitset_bytes): Likewise. | |
1390 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
1391 | * lib/lbitset.h (lbitset_bytes): Likewise. | |
420f93c8 | 1392 | |
ff68026d PE |
1393 | * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p, |
1394 | abitset_subset_p, abitset_disjoint_p, abitset_and, | |
1395 | abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or, | |
1396 | abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or, | |
1397 | abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp, | |
1398 | abitset_or_and, abitset_or_and_cmp): | |
1399 | Use bitset_windex instead of unsigned int. | |
1400 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
1401 | * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow, | |
1402 | ebitset_elt_add, ebitset_elt_remove, ebitset_weed, | |
1403 | ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init): | |
1404 | Likewise. | |
1405 | * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise. | |
420f93c8 | 1406 | |
ff68026d PE |
1407 | * lib/bitset.c (bitset_print): |
1408 | Use proper printf formats for widths of integer types. | |
1409 | * lib/bitset_stats.c (bitset_percent_histogram_print, | |
1410 | bitset_log_histogram_print, bitset_stats_print_1): Likewise. | |
1411 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
1412 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
1413 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
420f93c8 | 1414 | |
ff68026d PE |
1415 | * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX, |
1416 | BITSET_SIZE_MAX): New macros. | |
1417 | (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that | |
1418 | sizeof (bitset_word) == sizeof (bitset_windex). All uses changed | |
1419 | to BITSET_WINDEX_MAX. | |
1420 | ||
1421 | * lib/bitset.c (bitset_next, bitset_prev, bitset_first, | |
1422 | bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value, | |
1423 | since we now return the bitset_bindex type (not int). | |
1424 | ||
1425 | * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow | |
1426 | when computing sizes. | |
1427 | * lib/ebitset.c (ebitset_elts_grow): Likewise. | |
1428 | ||
1429 | * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation | |
1430 | and avoid cast to unsigned. | |
1431 | ||
6aa452a6 AD |
1432 | 2002-09-30 Akim Demaille <akim@epita.fr> |
1433 | ||
1434 | * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h, | |
1435 | * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c: | |
1436 | Updates from Michael Hayes. | |
1437 | ||
927f7817 AD |
1438 | 2002-09-30 Art Haas <ahaas@neosoft.com> |
1439 | ||
1440 | * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER | |
1441 | invocations. | |
1442 | * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not | |
1443 | defined. | |
1444 | ||
9738f41e AD |
1445 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1446 | ||
1447 | Version 1.49c. | |
1448 | ||
a5c75d7f AD |
1449 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1450 | ||
1451 | * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7. | |
1452 | (Because of AC_LIBSOURCE). | |
1453 | ||
8280e179 AD |
1454 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1455 | ||
1456 | Playing with Autoscan. | |
1457 | ||
1458 | * configure.ac: Remove the old LIBOBJ tweaks. | |
1459 | (AC_REPLACE_FUNCS): Add strrchr and strtol. | |
1460 | * lib/strrchr.c: New. | |
1461 | * lib/strtol.c: New, from the Coreutils 4.5.1. | |
1462 | ||
ae64af35 AD |
1463 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1464 | ||
1465 | Playing with Autoscan. | |
1466 | ||
1467 | * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New. | |
1468 | * lib/Makefile.am (libbison_a_SOURCES): No longer include | |
1469 | argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd. | |
1470 | * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the | |
1471 | Coreutils 4.5.1. | |
1472 | ||
d1a1114f AD |
1473 | 2002-09-24 Akim Demaille <akim@epita.fr> |
1474 | ||
1475 | * doc/bison.texinfo (Stack Overflow): xref to Recursion. | |
1476 | (Frequently Asked Questions, Parser Stack Overflow): New. | |
1477 | ||
b906441c AD |
1478 | 2002-09-13 Akim Demaille <akim@epita.fr> |
1479 | ||
1480 | Playing with autoscan. | |
1481 | ||
1482 | * src/reader.c (get_merge_function): Use xstrdup, not strdup. | |
1483 | * src/files.c (skeleton_find): Remove, unused. | |
1484 | * m4/memcmp.m4: New, from the Coreutils 4.5.1. | |
1485 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP. | |
1486 | ||
bd701811 AD |
1487 | 2002-09-13 Akim Demaille <akim@epita.fr> |
1488 | ||
1489 | * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3. | |
1490 | * Makefile.am (AUTOMAKE_OPTIONS): Don't. | |
1491 | ||
e0a13e7b AD |
1492 | 2002-09-13 Akim Demaille <akim@epita.fr> |
1493 | ||
1494 | * configure.ac: Require 2.54. | |
1495 | s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/. | |
1496 | s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/. | |
1497 | * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4: | |
1498 | Remove, provided by Autoconf macros. | |
1499 | ||
c97011bf AD |
1500 | 2002-09-12 Akim Demaille <akim@epita.fr> |
1501 | ||
1502 | * m4/prereq.m4: Update, from Coreutils 4.5.1. | |
1503 | ||
d862b1be AD |
1504 | 2002-09-12 Akim Demaille <akim@epita.fr> |
1505 | ||
1506 | * m4/prereq.m4: Update, from Fileutils 4.1.5. | |
1507 | * configure.ac (jm_PREREQ_TEMPNAME): Invoke it. | |
1508 | Reported by Martin Mokrejs. | |
1509 | ||
3d38c03a AD |
1510 | 2002-09-10 Akim Demaille <akim@epita.fr> |
1511 | ||
1512 | * src/parse-gram.y: Associate a human readable string to each | |
1513 | token type. | |
1514 | * tests/regression.at (Invalid inputs): Adjust. | |
1515 | ||
b6347355 AD |
1516 | 2002-09-10 Gary V. Vaughan <gary@gnu.org> |
1517 | ||
1518 | * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships | |
1519 | with an Autoconf-2.5x style configure.ac. | |
1520 | ||
09ba4ab2 PE |
1521 | 2002-09-06 Paul Eggert <eggert@twinsun.com> |
1522 | ||
1523 | * doc/bison.texinfo (Conditions): Make explicit that the GPL | |
1524 | exception applies only to yacc.c. This is a modification of a | |
1525 | patch originally suggested by Akim Demaille. | |
1526 | ||
21846f69 AD |
1527 | 2002-09-06 Akim Demaille <akim@epita.fr> |
1528 | ||
09ba4ab2 PE |
1529 | * data/c.m4 (b4_copyright): Move the GPL exception comment from |
1530 | here to... | |
1531 | * data/yacc.c: here. | |
1532 | ||
21846f69 AD |
1533 | * data/lalr1.cc (struct yyltype): Don't define it, since we use |
1534 | LocationType. | |
1535 | (b4_ltype): Default to yy::Location from location.hh. | |
1536 | ||
c0ad8bf3 AD |
1537 | 2002-09-04 Jim Meyering <jim@meyering.net> |
1538 | ||
1539 | * data/yacc.c: Guard the declaration of yytoknum also with | |
1540 | `#ifdef YYPRINT', so it is declared only when used. | |
1541 | ||
3a93251e AD |
1542 | 2002-09-04 Akim Demaille <akim@epita.fr> |
1543 | ||
1544 | * configure.in: Rename as... | |
1545 | * configure.ac: this. | |
1546 | Bump to 1.49c. | |
1547 | ||
427c0dda AD |
1548 | 2002-09-04 Akim Demaille <akim@epita.fr> |
1549 | ||
1550 | * src/assoc.c, src/closure.c, src/gram.c, src/injections.c, | |
1551 | * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't | |
1552 | translate maintainer only messages. | |
1553 | ||
6a254321 PE |
1554 | 2002-08-12 Paul Eggert <eggert@twinsun.com> |
1555 | ||
645e30d1 PE |
1556 | Version 1.49b. |
1557 | ||
6a254321 PE |
1558 | * Makefile.am (SUBDIRS): Remove intl. |
1559 | (DISTCLEANFILES): Remove. | |
1560 | * NEWS: Mention that GNU M4 is now required. Clarify what is | |
1561 | meant by "larger grammars". Mention the pt_BR translation. | |
1562 | * configure.in (AC_CHECK_DECLS): Add getenv, getopt. | |
1563 | (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var. | |
1564 | Bump version from 0.11.2 to 0.11.5. | |
1565 | (BISON_PREREQ_STAGE): Remove. | |
1566 | (AM_GNU_GETTEXT): Use external gettext. | |
1567 | (AC_OUTPUT): Remove intl/Makefile. | |
1568 | ||
1569 | * config/depcomp, config/install-sh: Sync with Automake 1.6.3. | |
1570 | ||
1571 | * data/glr.c: Include string.h, for strlen. | |
1572 | (yyreportParseError): Use size_t for yysize. | |
1573 | (yy_yypstack): No longer nested inside yypstates, as nested | |
1574 | functions are not portable. Do not assume size_t is the | |
1575 | same width as int. | |
1576 | (yypstates): Do not assume that ptrdiff_t is the same width | |
1577 | as int, and similarly for yyposn and YYINDEX. | |
1578 | ||
1579 | * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage. | |
1580 | ||
1581 | * lib/Makefile.am (INCLUDES): Do not include from the intl | |
1582 | directory, which has been removed. | |
1583 | * src/Makefile.am (INCLUDES): Likewise. | |
1584 | ||
1585 | * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h. | |
1586 | (bitsets_sources, additional_bitsets_sources, timevars_sources): | |
1587 | New vars. | |
1588 | ||
1589 | * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension. | |
1590 | * tests/Makefile.am (EXTRA_DIST): Likewise. | |
1591 | ||
1592 | * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list): | |
1593 | Do not assume that bitset_windex is the same width as unsigned. | |
1594 | ||
1595 | * lib/abitset.c (abitset_unused_clear): Do not assume that | |
1596 | bitset_word is the same width as int. | |
1597 | * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise. | |
1598 | * lib/bitset.h (bitset_set, bitset_reset): Likewise. | |
1599 | * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise. | |
1600 | * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise. | |
1601 | * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise. | |
1602 | ||
1603 | * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for | |
1604 | portability to one's complement hosts!). | |
1605 | * lib/ebitset.c (ebitset_op1): Likewise. | |
1606 | * lib/lbitset.c (lbitset_op1): Likewise. | |
1607 | ||
1608 | * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar. | |
1609 | * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h, | |
1610 | lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c: | |
1611 | Sync with fileutils. | |
1612 | * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c, | |
1613 | lib/gettext.h: Sync with diffutils. | |
1614 | ||
1615 | * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c, | |
1616 | lib/strspn.c, lib/tempname.c: Use GPL, not LGPL. | |
1617 | ||
1618 | * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use | |
1619 | PROTOTYPES to check for prototypes, and "defined __STDC__" to | |
1620 | check for void *. | |
1621 | ||
1622 | * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not | |
1623 | size_t; the old version tried to do this but casted improperly. | |
1624 | (bitset_bindex, bitset_windex): Now size_t, not unsigned long. | |
1625 | (bitset_test): Now returns int, not unsigned long. | |
1626 | ||
1627 | * lib/bitset_stats.c: Include "gettext.h". | |
1628 | (_): New macro. | |
1629 | (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't | |
1630 | name locals "index", as it generates unnecessary warnings on some | |
1631 | hosts that have an "index" function. | |
1632 | ||
1633 | * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print, | |
1634 | bitset_stats_read, bitset_stats_write): Wrap strings in _() if | |
1635 | they need translation. | |
1636 | * src/LR0.c (state_list_append, new_itemsets, get_state, | |
1637 | append_states, generate_states): Likewise. | |
1638 | * src/assoc.c (assoc_to_string): Likewise. | |
1639 | * src/closure.c (print_closure, set_firsts, closure): Likewise. | |
1640 | * src/gram.c (grammar_dump): Likewise. | |
1641 | * src/injections.c (injections_compute): Likewise. | |
1642 | * src/lalr.c (lookaheads_print): Likewise. | |
1643 | * src/relation.c (relation_transpose): Likewise. | |
1644 | * src/scan-gram.l: Likewise. | |
1645 | * src/tables.c (table_grow, pack_vector): Likewise. | |
1646 | ||
1647 | * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4, | |
1648 | glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4. | |
1649 | * m4/malloc.m4, m4/realloc.m4: Sync with diffutils. | |
1650 | * m4/mbstate_t.m4: Sync with fileutils. | |
1651 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T. | |
1652 | ||
1653 | * po/LINGUAS: Add pt_BR. | |
1654 | * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c, | |
1655 | src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c, | |
1656 | lib/timevar.c. | |
1657 | Use src/parse-gram.y instead of src/parse-gram.c, as the gettext | |
1658 | manual recommends. | |
1659 | Similarly, use src/scan-gram.l instead of src/scan-gram.c. | |
1660 | ||
1661 | * src/complain.c (strerror_r): Remove decl; not needed. | |
1662 | (strerror): Use same pattern as ../lib/error.c. | |
1663 | ||
1664 | * src/files.c, src/files.h (compute_header_macro): Remove; unused. | |
1665 | ||
1666 | * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int. | |
1667 | ||
1668 | * src/main.c (main): Cast result of bindtextdomain and textdomain | |
1669 | to void, to avoid a GCC warning when --disable-nls is in effect. | |
1670 | ||
1671 | * src/scan-gram.l: Use strings rather than escapes when possible, | |
1672 | to minimize the number of warnings from xgettext. | |
1673 | (handle_action_dollar, handle_action_at): Don't use isdigit, | |
1674 | as it mishandles negative chars and it may not work as expected | |
1675 | outside the C locale. | |
1676 | ||
1677 | * src/symtab.c (symbol_get): Don't cast LHS of an assignment; | |
1678 | this is a GCC extension and is not portable to other compilers. | |
1679 | ||
1680 | * src/system.h (alloca): Use same pattern as ../lib/error.c. | |
1681 | Do not include <ctype.h>; no longer needed. | |
1682 | Do not include <malloc.h>; no longer needed (and generates | |
1683 | warnings on OpenBSD 3.0). | |
1684 | ||
1685 | * tests/cxx-type.at (yylex): Do not pass signed char to isupper; | |
1686 | it's not portable. | |
1687 | ||
1688 | * tests/regression.at: Do not use 'cc -c input.c -o input'; | |
1689 | Sun C rejects this. Instead, use 'cc -c input.c -o input.o'. | |
1690 | ||
1691 | * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero | |
1692 | exit status as failure, not just exit status 1. Sun C exits | |
1693 | with status 2 sometimes. | |
1694 | ||
1695 | * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro. | |
1696 | Use it for the two large tests. | |
1697 | ||
c8f002c7 AD |
1698 | 2002-08-02 Akim Demaille <akim@epita.fr> |
1699 | ||
1700 | * src/conflicts.c (conflicts_output): Don't output rules never | |
1701 | reduced here, since anyway that computation doesn't work. | |
1702 | * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p) | |
1703 | (rule_useless_p, rule_never_reduced_p): New. | |
1704 | (grammar_rules_partial_print): Use a filter instead of a range. | |
1705 | Display the title only if needed. | |
1706 | (grammar_rules_print): Adjust. | |
1707 | (grammar_rules_never_reduced_report): New. | |
1708 | * src/tables.c (action_row): Move the computation of rules never | |
1709 | reduced to... | |
1710 | (token_actions): here. | |
1711 | * src/main.c (main): Make the parser before making the report, so | |
1712 | that rules never reduced are computed. | |
1713 | Call grammar_rules_never_reduced_report. | |
1714 | * src/print.c (print_results): Report rules never reduced. | |
1715 | * tests/conflicts.at, tests/reduce.at: Adjust. | |
1716 | ||
cd08e51e AD |
1717 | 2002-08-01 Akim Demaille <akim@epita.fr> |
1718 | ||
1719 | Instead of attaching lookaheads and duplicating the rules being | |
1720 | reduced by a state, attach the lookaheads to the reductions. | |
1721 | ||
1722 | * src/state.h (state_t): Remove the `lookaheads', | |
1723 | `lookaheads_rule' member. | |
1724 | (reductions_t): Add a `lookaheads' member. | |
1725 | Use a regular array for the `rules'. | |
1726 | * src/state.c (reductions_new): Initialize the lookaheads member | |
1727 | to 0. | |
1728 | (state_rule_lookaheads_print): Adjust. | |
1729 | * src/state.h, src/state.c (state_reductions_find): New. | |
1730 | * src/conflicts.c (resolve_sr_conflict, set_conflicts) | |
1731 | (count_rr_conflicts): Adjust. | |
1732 | * src/lalr.c (LArule): Remove. | |
1733 | (add_lookback_edge): Adjust. | |
1734 | (state_lookaheads_count): New. | |
1735 | (states_lookaheads_initialize): Merge into... | |
1736 | (initialize_LA): this. | |
1737 | (lalr_free): Adjust. | |
1738 | * src/main.c (main): Don't free nullable and derives too early: it | |
1739 | is used by --verbose. | |
1740 | * src/print.c, src/print_graph.c, src/tables.c: Adjust. | |
1741 | ||
bb0027a9 AD |
1742 | 2002-08-01 Akim Demaille <akim@epita.fr> |
1743 | ||
1744 | * src/derives.h, src/derives.c (derives): A `rule_t***' instead of | |
1745 | `rule_number_t**'. | |
1746 | (set_derives, free_derives): Rename as... | |
1747 | (derives_compute, derives_free): this. | |
1748 | Adjust all dependencies. | |
1749 | * src/nullable.c (set_nullable, free_nullable): Rename as... | |
1750 | (nullable_compute, nullable_free): these. | |
1751 | (rule_list_t): Store rule_t *, not rule_number_t. | |
1752 | * src/state.c (state_rule_lookaheads_print): Directly compare rule | |
1753 | pointers, instead of their numbers. | |
1754 | * src/main.c (main): Call nullable_free, and derives_free earlier, | |
1755 | as they were lo longer used. | |
1756 | ||
3325ddc4 AD |
1757 | 2002-08-01 Akim Demaille <akim@epita.fr> |
1758 | ||
1759 | * lib/timevar.c (get_time): Include children time. | |
1760 | * src/lalr.h (LA, LArule): Don't export them: used with the | |
1761 | state_t. | |
1762 | * src/lalr.c (LA, LArule): Static. | |
1763 | * src/lalr.h, src/lalr.c (lalr_free): New. | |
1764 | * src/main.c (main): Call it. | |
1765 | * src/tables.c (pack_vector): Check whether loc is >= to the | |
1766 | table_size, not >. | |
1767 | (pack_tables): Don't free froms, tos, conflict_tos, and pos... | |
1768 | (tables_generate): do it, since that's also it which allocates | |
1769 | them. | |
1770 | Don't free LA and LArule, main does. | |
1771 | ||
c6f1a33c AD |
1772 | 2002-07-31 Akim Demaille <akim@epita.fr> |
1773 | ||
1774 | Separate parser tables computation and output. | |
1775 | ||
1776 | * src/output.c (nvectors, base_t, base, base_ninf, conflict_table) | |
1777 | (conflict_list, conflict_list_cnt, table, check, table_ninf) | |
1778 | (yydefgoto, yydefact, high): Move to... | |
1779 | * src/tables.h, src/tables.c: here. | |
1780 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
1781 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
1782 | (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN) | |
1783 | (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX) | |
1784 | (ACTION_MIN, actrow, order, nentries, pos, conflrow) | |
1785 | (conflict_list_free, table_size, lowzero, table_grow, conflict_row) | |
1786 | (action_row, save_row, token_actions, save_column, default_goto) | |
1787 | (goto_actions, sort_actions, matching_state, pack_vector) | |
1788 | (table_ninf_remap, pack_table, prepare_actions): Move to... | |
1789 | * src/tables.c: here. | |
1790 | * src/tables.h, src/tables.c(tables_generate, tables_free): New. | |
1791 | * src/output.c (token_actions, output_base, output_conflicts) | |
1792 | (output_check): Merge into... | |
1793 | (prepare_actions): this. | |
1794 | (actions_output): Rename as... | |
1795 | (user_actions_output): this. | |
1796 | * src/main.c (main): Call tables_generate and tables_free. | |
1797 | ||
1509d42f AD |
1798 | 2002-07-31 Akim Demaille <akim@epita.fr> |
1799 | ||
1800 | Steal GCC's --time-report support. | |
1801 | ||
1802 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: New, | |
1803 | stolen/adjusted from GCC. | |
1804 | * m4/stage.m4: Remove time related checks. | |
1805 | * m4/timevar.m4: New. | |
1806 | * configure.in: Adjust. | |
1807 | * src/system.h: Adjust to using timevar.h. | |
1808 | * src/getargs.h, src/getargs.c: Support trace_time for | |
1809 | --trace=time. | |
1810 | * src/main.c (stage): Remove. | |
1811 | (main): Replace `stage' invocations with timevar calls. | |
1812 | * src/output.c: Insert pertinent timevar calls. | |
1813 | ||
273a74fa AD |
1814 | 2002-07-31 Akim Demaille <akim@epita.fr> |
1815 | ||
1816 | Let --trace have arguments. | |
1817 | ||
1818 | * src/getargs.h (enum trace_e): New. | |
1819 | * src/getargs.c (trace_args, trace_types, trace_argmatch): New. | |
1820 | (long_options, short_options): --trace/-T takes an optional | |
1821 | argument. | |
1822 | Change all the uses of trace_flag to reflect the new flags. | |
1823 | * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets. | |
1824 | ||
1825 | Strengthen `stage' portability. | |
1826 | ||
1827 | * m4/stage.m4 (BISON_PREREQ_STAGE): New. | |
1828 | * configure.in: Use it. | |
1829 | Don't check for malloc.h and sys/times.h. | |
1830 | * src/system.h: Include them when appropriate. | |
1831 | * src/main.c (stage): Compile only when mallinfo, struct mallinfo, | |
1832 | times and struct tms are available. | |
1833 | ||
217598da AD |
1834 | 2002-07-30 Akim Demaille <akim@epita.fr> |
1835 | ||
1836 | In verbose parse error message, don't report `error' as an | |
1837 | expected token. | |
1838 | * tests/actions.at (Printers and Destructors): Adjust. | |
1839 | * tests/calc.at (Calculator $1): Adjust. | |
1840 | * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose | |
1841 | error message, do not report the parser accepts the error token in | |
1842 | that state. | |
1843 | ||
52489d44 AD |
1844 | 2002-07-30 Akim Demaille <akim@epita.fr> |
1845 | ||
1846 | Normalize conflict related messages. | |
1847 | ||
1848 | * src/complain.h, src/complain.c (warn, complain): New. | |
1849 | * src/conflicts.c (conflicts_print): Use them. | |
1850 | (conflict_report_yacc): New, extracted from... | |
1851 | (conflicts_print): here. | |
1852 | * tests/conflicts.at, tests/existing.at: Adjust. | |
1853 | ||
e8832397 AD |
1854 | 2002-07-30 Akim Demaille <akim@epita.fr> |
1855 | ||
1856 | Report rules which are never reduced by the parser: those hidden | |
1857 | by conflicts. | |
1858 | ||
1859 | * src/LR0.c (save_reductions): Don't make the final state too | |
1860 | different: save its reduction (accept) instead of having a state | |
1861 | without any action (no shift or goto, no reduce). | |
1862 | Note: the final state is now a ``regular'' state, i.e., the | |
1863 | parsers now contain `reduce 0' as default reduction. | |
1864 | Nevertheless, since they decide to `accept' when yystate = | |
1865 | final_state, they still will not reduce rule 0. | |
1866 | * src/print.c (print_actions, print_reduction): Adjust. | |
1867 | * src/output.c (action_row): Track reduced rules. | |
1868 | (token_actions): Report rules never reduced. | |
1869 | * tests/conflicts.at, tests/regression.at: Adjust. | |
1870 | ||
caf23d24 AD |
1871 | 2002-07-30 Akim Demaille <akim@epita.fr> |
1872 | ||
1873 | `stage' was accidently included in a previous patch. | |
1874 | Initiate its autoconfiscation. | |
1875 | ||
1876 | * configure.in: Look for malloc.h and sys/times.h. | |
1877 | * src/main.c (stage): Adjust. | |
1878 | Report only when trace_flag. | |
1879 | ||
640748ee AD |
1880 | 2002-07-29 Akim Demaille <akim@epita.fr> |
1881 | ||
1882 | * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not | |
1883 | state_number_t. | |
1884 | (errs_t): symbol_t*, not symbol_number_t. | |
1885 | (reductions_t): rule_t*, not rule_number_t. | |
1886 | (FOR_EACH_SHIFT): New. | |
1887 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c | |
1888 | * src/print.c, src/print_graph.c: Adjust. | |
1889 | ||
88bce5a2 AD |
1890 | 2002-07-29 Akim Demaille <akim@epita.fr> |
1891 | ||
1892 | Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $. | |
1893 | ||
1894 | * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as... | |
1895 | (endtoken, accept): these. | |
1896 | * src/reader.c (reader): Set endtoken's default tag to "$end". | |
1897 | Set undeftoken's tag to "$undefined" instead of "$undefined.". | |
1898 | * doc/bison.texinfo (Table of Symbols): Mention $accept and $end. | |
1899 | Adjust. | |
1900 | ||
1bfb97db AD |
1901 | 2002-07-29 Akim Demaille <akim@epita.fr> |
1902 | ||
1903 | * src/reduce.c (reduce_grammar): When the language is empty, | |
1904 | complain about the start symbol, not the axiom. | |
1905 | Use its location. | |
1906 | * tests/reduce.at (Empty Language): New. | |
1907 | ||
fc5734fe AD |
1908 | 2002-07-26 Akim Demaille <akim@epita.fr> |
1909 | ||
1910 | * src/reader.h, src/reader.c (gram_error): ... can't get | |
1911 | yycontrol without making too strong assumptions on the parser | |
1912 | itself. | |
1913 | * src/output.c (prepare_tokens): Use the real 0th value of | |
1914 | token_translations instead of `0'. | |
1915 | * src/parse-gram.y (yyerror): Don't rely on yycontrol being | |
1916 | visible here. | |
1917 | * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc | |
1918 | for the time being: %locations ought to provide it to yyerror. | |
1919 | ||
3650b4b8 AD |
1920 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1921 | ||
1922 | * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1. | |
1923 | * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./. | |
1924 | * tests/regression.at (Web2c Actions): Adjust. | |
1925 | ||
4b3d3a8e AD |
1926 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1927 | ||
1928 | Stop storing rules from 1 to nrules + 1. | |
1929 | ||
1930 | * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c | |
1931 | * src/nullable.c, src/output.c, src/print.c, src/reader.c | |
1932 | * src/reduce.c: Allocate and free from &rules[0], not &rules[1]. | |
1933 | Iterate from 0 to nrules. | |
1934 | Use rule_number_as_item_number and item_number_as_rule_number. | |
1935 | Adjust to `derive' now containing possibly 0. | |
1936 | * src/gram.h (rule_number_as_item_number, item_number_as_rule_number): | |
1937 | Handle the `- 1' part in rule numbers from/to item numbers. | |
1938 | * src/conflicts.c (log_resolution): Fix the message which reversed | |
1939 | shift and reduce. | |
1940 | * src/output.c (action_row): Initialize default_rule to -1. | |
1941 | (token_actions): Adjust. | |
1942 | * tests/sets.at (Nullable, Firsts): Fix the previously bogus | |
1943 | expected output. | |
1944 | * tests/conflicts.at (Resolved SR Conflicts): Likewise. | |
1945 | ||
4a2a22f4 AD |
1946 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1947 | ||
1948 | * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg) | |
1949 | (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls) | |
1950 | (b4_c_knr_arg_decl): New. | |
1951 | * data/yacc.c: Use it to define yysymprint, yydestruct, and | |
1952 | yyreport_parse_error. | |
1953 | ||
b8df3223 AD |
1954 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1955 | ||
1956 | * data/yacc.c (yyreport_parse_error): New, extracted from... | |
1957 | (yyparse): here. | |
1958 | (yydestruct, yysymprint): Move above yyparse. | |
1959 | Be K&R compliant. | |
1960 | ||
a762e609 AD |
1961 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1962 | ||
1963 | * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New, | |
1964 | replace... | |
1965 | (b4_sint_type, b4_uint_type): these. | |
1966 | * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for. | |
1967 | * tests/regression.at (Web2c Actions): Adjust. | |
1968 | ||
12b0043a AD |
1969 | 2002-07-25 Akim Demaille <akim@epita.fr> |
1970 | ||
1971 | * src/gram.h (TIEM_NUMBER_MAX): New. | |
1972 | (item_number_of_rule_number, rule_number_of_item_number): Rename | |
1973 | as... | |
1974 | (rule_number_as_item_number, item_number_as_rule_number): these. | |
1975 | Adjust dependencies. | |
1976 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
1977 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
1978 | (symbol_number_to_vector_number): New. | |
1979 | (order): Of vector_number_t* type. | |
1980 | (base_t, BASE_MAX, BASE_MIN): New. | |
1981 | (froms, tos, width, pos, check): Of base_t type. | |
1982 | (action_number_t, ACTION_MIN, ACTION_MAX): New. | |
1983 | (actrow): Of action_number_t type. | |
1984 | (conflrow): Of unsigned int type. | |
1985 | (table_ninf, base_ninf): New. | |
1986 | (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value. | |
1987 | (muscle_insert_int_table, muscle_insert_base_table) | |
1988 | (muscle_insert_rule_number_table): New. | |
1989 | (prepare_tokens): Output `toknum' as int_table. | |
1990 | (action_row): Returns a rule_number_t. | |
1991 | Use ACTION_MIN, not SHRT_MIN. | |
1992 | (token_actions): yydefact is rule_number_t*. | |
1993 | (table_ninf_remap): New. | |
1994 | (pack_table): Use it for `base' and `table'. | |
1995 | * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove, | |
1996 | replaced with... | |
1997 | (YYPACT_NINF, YYTABLE_NINF): these. | |
1998 | (yypact, yytable): Compute their types instead of hard-coded | |
1999 | `short'. | |
2000 | * tests/regression.at (Web2c Actions): Adjust. | |
2001 | ||
5dde258a AD |
2002 | 2002-07-19 Akim Demaille <akim@epita.fr> |
2003 | ||
2004 | * src/scan-gram.l (id): Can start with an underscore. | |
2005 | ||
a945ec39 AD |
2006 | 2002-07-16 Akim Demaille <akim@epita.fr> |
2007 | ||
2008 | * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New. | |
2009 | Adjust all former `associativity' dependencies. | |
2010 | * src/symtab.c (symbol_new): Default associativity is `undef', not | |
2011 | `right'. | |
2012 | (symbol_check_alias_consistence): Adjust. | |
2013 | ||
fae437e8 AD |
2014 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2015 | ||
2016 | * doc/bison.texinfo: Properly set the ``header'' part. | |
2017 | Use @dircategory ``GNU programming tools'' as per Texinfo's | |
2018 | documentation. | |
2019 | Use @copying. | |
2020 | ||
1a715ef2 AD |
2021 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2022 | ||
2023 | * lib/quotearg.h: Protect against multiple inclusions. | |
2024 | * src/location.h (location_t): Add a `file' member. | |
2025 | (LOCATION_RESET, LOCATION_PRINT): Adjust. | |
2026 | * src/complain.c (warn_at, complain_at, fatal_at): Drop | |
2027 | `error_one_per_line' support. | |
2028 | ||
a5d50994 AD |
2029 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2030 | ||
2031 | * src/complain.h, src/complain.c (warn, complain): Remove, unused. | |
2032 | * src/reader.c (lineno): Remove. | |
2033 | Adjust all dependencies. | |
2034 | (get_merge_function): Take a location and use complain_at. | |
2035 | * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise. | |
2036 | * tests/regression.at (Invalid inputs, Mixing %token styles): | |
2037 | Adjust. | |
2038 | ||
b275314e AD |
2039 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2040 | ||
2041 | * src/parse-gram.y (rules_or_grammar_declaration): Add an error | |
2042 | recovery rule, and forbid extensions when --yacc. | |
2043 | (gram_error): Use complain_at. | |
2044 | * src/reader.c (reader): Exit if there were parse errors. | |
2045 | ||
865b9df1 AD |
2046 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2047 | ||
2048 | * tests/synclines.at (AT_SYNCLINES_COMPILE): New. | |
2049 | (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs. | |
2050 | Reported by R Blake <blakers@mac.com>. | |
2051 | ||
c76e14da AD |
2052 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2053 | ||
2054 | * data/yacc.c: Output the copyright notive in the header. | |
2055 | ||
7db2ed2d AD |
2056 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2057 | ||
2058 | * src/output.c (froms, tos): Are state_number_t. | |
2059 | (save_column): sp, sp1, and sp2 are state_number_t. | |
2060 | (prepare): Rename `final' as `final_state_number', `nnts' as | |
2061 | `nterms_number', `nrules' as `rules_number', `nstates' as | |
2062 | `states_number', and `ntokens' as `tokens_number'. Remove `nsym', | |
2063 | unused. | |
2064 | * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust. | |
2065 | * data/lalr1.cc (nsym_): Remove, unused. | |
2066 | ||
e68e0410 AD |
2067 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2068 | ||
2069 | * src/lalr.h, src/lalr.c (goto_number_t): New. | |
2070 | * src/lalr.c (goto_list_t): New. | |
2071 | Propagate them. | |
2072 | * src/nullable.c (rule_list_t): New. | |
2073 | Propagate. | |
2074 | * src/types.h: Remove. | |
2075 | ||
e1a4f3a4 AD |
2076 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2077 | ||
2078 | * src/closure.c (print_fderives): Use rule_rhs_print. | |
2079 | * src/derives.c (print_derives): Use rule_rhs_print. | |
2080 | (rule_list_t): New, replaces `shorts'. | |
2081 | (set_derives): Add comments. | |
2082 | * tests/sets.at (Nullable, Firsts): Adjust. | |
2083 | ||
536545f3 AD |
2084 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2085 | ||
2086 | * src/output.c (prepare_actions): Free `tally' and `width'. | |
2087 | (prepare_actions): Allocate and free `order'. | |
2088 | * src/symtab.c (symbols_free): Free `symbols'. | |
2089 | * src/scan-gram.l (scanner_free): Clear Flex's scanners memory. | |
2090 | * src/output.c (m4_invoke): Move to... | |
2091 | * src/scan-skel.l: here. | |
2092 | (<<EOF>>): Close yyout, and free its name. | |
2093 | ||
8b752b00 AD |
2094 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2095 | ||
2096 | Fix some memory leaks, and fix a bug: state 0 was examined twice. | |
2097 | ||
2098 | * src/LR0.c (new_state): Merge into... | |
2099 | (state_list_append): this. | |
2100 | (new_states): Merge into... | |
2101 | (generate_states): here. | |
2102 | (set_states): Don't ensure a proper `errs' state member here, do it... | |
2103 | * src/conflicts.c (conflicts_solve): here. | |
2104 | * src/state.h, src/state.c: Comment changes. | |
2105 | (state_t): Rename member `shifts' as `transitions'. | |
2106 | Adjust all dependencies. | |
2107 | (errs_new): For consistency, also take the values as argument. | |
2108 | (errs_dup): Remove. | |
2109 | (state_errs_set): New. | |
2110 | (state_reductions_set, state_transitions_set): Assert that no | |
2111 | previous value was assigned. | |
2112 | (state_free): New. | |
2113 | (states_free): Use it. | |
2114 | * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as | |
2115 | temporary storage: use `errs' and `nerrs' as elsewhere. | |
2116 | (set_conflicts): Allocate and free this `errs'. | |
2117 | ||
613f5e1a AD |
2118 | 2002-07-02 Akim Demaille <akim@epita.fr> |
2119 | ||
2120 | * lib/libiberty.h: New. | |
2121 | * lib: Update the bitset implementation from upstream. | |
2122 | * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c, | |
2123 | * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE. | |
2124 | * src/main.c: Adjust bitset stats calls. | |
2125 | ||
26e0cadc PE |
2126 | 2002-07-01 Paul Eggert <eggert@twinsun.com> |
2127 | ||
2128 | * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned | |
2129 | char, so that negative chars don't collide with $. | |
2130 | ||
1154cced AD |
2131 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2132 | ||
2133 | Have the GLR tests be `warning' checked, and fix the warnings. | |
2134 | ||
2135 | * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG | |
2136 | (yyuserAction, yyreportAmbiguity): `Use' all the arguments. | |
2137 | (yyremoveDeletes): `yyi' and `yyj' are size_t. | |
2138 | Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies. | |
2139 | (yyaddDeferredAction): static. | |
2140 | (yyglrReduce): yyi, yyk, amd yyposn are size_t. | |
2141 | (yyreportParseError): yyprefix is const. | |
2142 | yytokenp is used only when verbose. | |
2143 | (yy__GNUC__): Replace with __GNUC__. | |
2144 | (yypdumpstack): yyi is size_t. | |
2145 | (yypreference): Un-yy local variables and arguments, to avoid | |
2146 | clashes with `yyr1'. Anyway, we are not in the user name space. | |
2147 | (yytname_size): be an int, as is compared with ints. | |
2148 | * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New. | |
2149 | Use them. | |
2150 | * tests/cxx-gram.at: Use quotation to protect $1. | |
2151 | Use AT_COMPILE to enable warnings hunts. | |
2152 | Prototype yylex and yyerror. | |
2153 | `Use' argc. | |
2154 | Include `string.h', not `strings.h'. | |
2155 | Produce and prototype stmtMerge only when used. | |
2156 | yylex takes a location. | |
2157 | ||
97650f4e AD |
2158 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2159 | ||
2160 | We spend a lot of time in quotearg, in particular when --verbose. | |
2161 | ||
2162 | * src/symtab.c (symbol_get): Store a quoted version of the key. | |
2163 | (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove. | |
2164 | Adjust all callers. | |
2165 | ||
d2576365 AD |
2166 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2167 | ||
2168 | * src/state.h (reductions_t): Rename member `nreds' as num. | |
2169 | (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'. | |
2170 | * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types. | |
2171 | ||
ccaf65bc AD |
2172 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2173 | ||
2174 | * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT) | |
2175 | (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED) | |
2176 | (shifts_to): Rename as... | |
2177 | (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION) | |
2178 | (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE) | |
2179 | (TRANSITION_IS_DISABLED, transitions_to): these. | |
2180 | ||
87675353 AD |
2181 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2182 | ||
2183 | * src/print.c (print_shifts, print_gotos): Merge into... | |
2184 | (print_transitions): this. | |
2185 | (print_transitions, print_errs, print_reductions): Align the | |
2186 | lookaheads columns. | |
2187 | (print_core, print_transitions, print_errs, print_state, | |
2188 | print_grammar): Output empty lines separator before, not after. | |
2189 | (state_default_rule_compute): Rename as... | |
2190 | (state_default_rule): this. | |
2191 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
2192 | (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust. | |
2193 | * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust. | |
2194 | ||
ce4ccb4b AD |
2195 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2196 | ||
2197 | Display items as we display rules. | |
2198 | ||
2199 | * src/gram.h, src/gram.c (rule_lhs_print): New. | |
2200 | * src/gram.c (grammar_rules_partial_print): Use it. | |
2201 | * src/print.c (print_core): Likewise. | |
2202 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
2203 | (Unresolved SR Conflicts): Adjust. | |
2204 | (Unresolved SR Conflicts): Adjust and rename as... | |
2205 | (Resolved SR Conflicts): this, as was meant. | |
2206 | * tests/regression.at (Web2c Report): Adjust. | |
2207 | ||
bc933ef1 AD |
2208 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2209 | ||
2210 | * src/print.c (state_default_rule_compute): New, extracted from... | |
2211 | (print_reductions): here. | |
2212 | Pessimize, but clarify the code. | |
2213 | * tests/conflicts.at (Defaulted Conflicted Reduction): New. | |
2214 | ||
53d4308d AD |
2215 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2216 | ||
2217 | * src/output.c (action_row): Let default_rule be always a rule | |
2218 | number. | |
2219 | ||
574fb2d5 AD |
2220 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2221 | ||
2222 | * src/closure.c (print_firsts, print_fderives, closure): | |
2223 | Use BITSET_EXECUTE. | |
2224 | * src/lalr.c (lookaheads_print): Likewise. | |
2225 | * src/state.c (state_rule_lookaheads_print): Likewise. | |
2226 | * src/print_graph.c (print_core): Likewise. | |
2227 | * src/print.c (print_reductions): Likewise. | |
2228 | * src/output.c (action_row): Likewise. | |
2229 | Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL. | |
2230 | ||
05811fd7 AD |
2231 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2232 | ||
2233 | * src/print_graph.c: Use report_flag. | |
2234 | ||
0e4d5753 AD |
2235 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2236 | ||
2237 | * src/lalr.c (traverse, digraph, matrix_print, transpose): Move | |
2238 | to... | |
2239 | * src/relation.h, src/relation.c (traverse, relation_digraph) | |
2240 | (relation_print, relation_transpose): New. | |
2241 | ||
24c7d800 AD |
2242 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2243 | ||
2244 | * src/state.h, src/state.c (shifts_to): New. | |
2245 | * src/lalr.c (build_relations): Use it. | |
2246 | ||
9222837b AD |
2247 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2248 | ||
2249 | * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number) | |
2250 | (item_number_of_rule_number, rule_number_of_item_number): New. | |
2251 | * src/LR0.c, src/closure.c, src/derives.c, src/derives.h, | |
2252 | * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c, | |
2253 | * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h: | |
2254 | Propagate their use. | |
2255 | Much remains to be done, in particular wrt `shorts' from types.h. | |
2256 | ||
260008e5 AD |
2257 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2258 | ||
2259 | * src/symtab.c (symbol_new): Initialize the `printer' member. | |
2260 | ||
8a731ca8 AD |
2261 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2262 | ||
2263 | * src/LR0.c (save_reductions): Remove, replaced by... | |
2264 | * src/state.h, src/state.c (state_reductions_set): New. | |
2265 | (reductions, errs): Rename as... | |
2266 | (reductions_t, errs_t): these. | |
2267 | Adjust all dependencies. | |
2268 | ||
32e1e0a4 AD |
2269 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2270 | ||
2271 | * src/LR0.c (state_list_t, state_list_append): New. | |
2272 | (first_state, last_state): Now symbol_list_t. | |
2273 | (this_state): Remove. | |
2274 | (new_itemsets, append_states, save_reductions): Take a state_t as | |
2275 | argument. | |
2276 | (set_states, generate_states): Adjust. | |
2277 | (save_shifts): Remove, replaced by... | |
2278 | * src/state.h, src/state.c (state_shifts_set): New. | |
2279 | (shifts): Rename as... | |
2280 | (shifts_t): this. | |
2281 | Adjust all dependencies. | |
2282 | * src/state.h (state_t): Remove the `next' member. | |
2283 | ||
e5fb6710 AD |
2284 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2285 | ||
2286 | * src/vcg.c (quote): Use slot 2, since we often pass symbol tag | |
2287 | escaped in slot 0. | |
2288 | ||
c7ca99d4 AD |
2289 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2290 | ||
2291 | Use hash.h for the state hash table. | |
2292 | ||
2293 | * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove. | |
2294 | (allocate_storage): Use state_hash_new. | |
2295 | (free_storage): Use state_hash_free. | |
2296 | (new_state, get_state): Adjust. | |
2297 | * src/lalr.h, src/lalr.c (states): Move to... | |
2298 | * src/states.h (state_t): Remove the `link' member, no longer | |
2299 | used. | |
2300 | * src/states.h, src/states.c: here. | |
2301 | (state_hash_new, state_hash_free, state_hash_lookup) | |
2302 | (state_hash_insert, states_free): New. | |
2303 | * src/states.c (state_table, state_compare, state_hash): New. | |
2304 | * src/output.c (output_actions): Do not free states now, since we | |
2305 | still need to know the final_state number in `prepare', called | |
2306 | afterwards. Do it... | |
2307 | * src/main.c (main): here: call states_free after `output'. | |
2308 | ||
df0e7316 AD |
2309 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2310 | ||
2311 | * src/state.h, src/state.c (state_new): New, extracted from... | |
2312 | * src/LR0.c (new_state): here. | |
2313 | * src/state.h (STATE_ALLOC): Move to... | |
2314 | * src/state.c: here. | |
2315 | * src/LR0.h, src/LR0.c (nstates, final_state): Move to... | |
2316 | * src/state.h, src/state.c: here. | |
2317 | ||
39f41916 AD |
2318 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2319 | ||
2320 | * src/reader.c (gensym): Rename as... | |
2321 | * src/symtab.h, src/symtab.c (dummy_symbol_get): this. | |
2322 | (getsym): Rename as... | |
2323 | (symbol_get): this. | |
2324 | ||
d57650a5 AD |
2325 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2326 | ||
2327 | * src/state.h (state_number_t, STATE_NUMBER_MAX): New. | |
2328 | * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h, | |
2329 | * src/output.c, src/print.c, src/print_graph.c: Propagate. | |
2330 | * src/LR0.h, src/LR0.h (final_state): Is a state_t*. | |
2331 | ||
5a08f1ce AD |
2332 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2333 | ||
2334 | Make the test suite pass with warnings checked. | |
2335 | ||
2336 | * tests/actions.at (Printers and Destructors): Improve. | |
2337 | Avoid unsigned vs. signed issues. | |
2338 | * tests/calc.at: Don't exercise the scanner here, do it... | |
2339 | * tests/input.at (Torturing the Scanner): here. | |
2340 | ||
720623af PH |
2341 | 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2342 | ||
88e7e941 | 2343 | * data/glr.c: Correct typo in Emacs-mode directive. Slightly |
720623af PH |
2344 | reorganize first lines parallel to yacc.c. |
2345 | ||
fb8135fa AD |
2346 | 2002-06-28 Akim Demaille <akim@epita.fr> |
2347 | ||
2348 | * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define) | |
2349 | (b4_token_enum, b4_token_defines): New, factored from... | |
2350 | * data/lalr1.cc, data/yacc.c, glr.c: here. | |
2351 | ||
41442480 AD |
2352 | 2002-06-28 Akim Demaille <akim@epita.fr> |
2353 | ||
2354 | * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for | |
2355 | unused variables. | |
2356 | * src/output.c (merger_output): static. | |
2357 | ||
e0e5bf84 AD |
2358 | 2002-06-28 Akim Demaille <akim@epita.fr> |
2359 | ||
2360 | * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../. | |
2361 | * src/conflicts.c (conflicts_total_count): `i' is unsigned, to | |
2362 | pacify GCC. | |
2363 | * src/output.c (save_row): Initialize all the variables to pacify GCC. | |
e0e5bf84 | 2364 | |
676385e2 PH |
2365 | 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2366 | ||
2367 | Accumulated changelog for new GLR parsing features. | |
2368 | ||
6a254321 | 2369 | * src/conflicts.c (count_total_conflicts): Change name to |
676385e2 PH |
2370 | conflicts_total_count. |
2371 | * src/conflicts.h: Ditto. | |
2372 | * src/output.c (token_actions): Use the new name. | |
2373 | (output_conflicts): Change conflp => conflict_list_heads, and | |
2374 | confl => conflict_list for better readability. | |
2375 | * data/glr.c: Use the new names. | |
2376 | * NEWS: Add self to GLR announcement. | |
e0e5bf84 | 2377 | |
676385e2 PH |
2378 | * src/reader.c (free_merger_functions): Cleanup: XFREE->free. |
2379 | ||
2380 | * doc/bison.texinfo (GLR Parsers): Make corrections suggested by | |
2381 | Akim Demaille. | |
2382 | ||
2383 | * data/bison.glr: Change name to glr.c | |
2384 | * data/glr.c: Renamed from bison.glr. | |
2385 | * data/Makefile.am: Add glr.c | |
e0e5bf84 AD |
2386 | |
2387 | * src/getargs.c: | |
2388 | ||
676385e2 PH |
2389 | * src/symlist.h: Add dprec and merger fields to symbol_list_s. |
2390 | * src/symlist.c (symbol_list_new): Initialize dprec and merger fields. | |
e0e5bf84 | 2391 | |
676385e2 PH |
2392 | Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2393 | ||
2394 | * data/bison.glr: Be sure to restore the | |
2395 | current #line when returning to the skeleton contents after having | |
2396 | exposed the input file's #line. | |
2397 | ||
2398 | Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2399 | ||
2400 | * data/bison.glr: Bring up to date with changes to bison.simple. | |
2401 | ||
2402 | Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2403 | ||
2404 | * data/bison.glr: Correct definitions that use b4_prefix. | |
2405 | Various reformatting. | |
2406 | (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack. | |
2407 | (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove | |
2408 | yytokenp argument; now part of stack. | |
2409 | (yychar): Define to behave as documented. | |
2410 | (yyclearin): Ditto. | |
e0e5bf84 | 2411 | |
676385e2 PH |
2412 | Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2413 | ||
2414 | * src/reader.h: Add declaration for free_merger_functions. | |
2415 | ||
2416 | * src/reader.c (merge_functions): New variable. | |
2417 | (get_merge_function): New function. | |
2418 | (free_merger_functions): New function. | |
2419 | (readgram): Check for %prec that is not followed by a symbol. | |
2420 | Handle %dprec and %merge declarations. | |
2421 | (packgram): Initialize dprec and merger fields in rules array. | |
2422 | ||
2423 | * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list, | |
2424 | conflict_list_cnt, conflict_list_free): New variables. | |
2425 | (table_grow): Also grow conflict_table. | |
e0e5bf84 | 2426 | (prepare_rules): Output dprec and merger tables. |
676385e2 | 2427 | (conflict_row): New function. |
e0e5bf84 | 2428 | (action_row): Output conflict lists for GLR parser. Don't use |
676385e2 PH |
2429 | default reduction in conflicted states for GLR parser so that there |
2430 | are spaces for the conflict lists. | |
2431 | (save_row): Also save conflict information. | |
2432 | (token_actions): Allocate conflict list. | |
2433 | (merger_output): New function. | |
2434 | (pack_vector): Pack conflict table, too. | |
2435 | (output_conflicts): New function to output yyconflp and yyconfl. | |
2436 | (output_check): Allocate conflict_tos. | |
2437 | (output_actions): Output conflict tables, also. | |
2438 | (output_skeleton): Output b4_mergers definition. | |
2439 | (prepare): Output b4_max_rhs_length definition. | |
2440 | Use 'bison.glr' as default skeleton for GLR parsers. | |
2441 | ||
2442 | * src/gram.c (glr_parser): New flag. | |
2443 | (grammar_free): Call free_merger_functions. | |
2444 | ||
2445 | * src/conflicts.c (count_rr_conflicts): Augment to optionally count | |
2446 | all pairs of conflicting reductions, rather than just all tokens | |
2447 | causing conflicts. Needed to size conflict tables. | |
e0e5bf84 | 2448 | (conflicts_output): Modify call to count_rr_conflicts for new |
676385e2 PH |
2449 | interface. |
2450 | (conflicts_print): Ditto. | |
2451 | (count_total_conflicts): New function. | |
2452 | ||
2453 | * src/reader.h (merger_list): New type. | |
2454 | (merge_functions): New variable. | |
2455 | ||
2456 | * src/lex.h (tok_dprec, tok_merge): New token types. | |
2457 | ||
2458 | * src/gram.h (rule_s): Add dprec and merger fields. | |
2459 | (glr_parser): New flag. | |
2460 | ||
2461 | * src/conflicts.h (count_total_conflicts): New function. | |
2462 | ||
2463 | * src/options.c (option_table): Add %dprec, %merge, and %glr-parser. | |
2464 | ||
2465 | * doc/bison.texinfo (Generalized LR Parsing): New section. | |
2466 | (GLR Parsers): New section. | |
2467 | (Language and Grammar): Mention GLR parsing. | |
2468 | (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR | |
2469 | Correct typo ("tge" -> "the"). | |
2470 | ||
2471 | * data/bison.glr: New skeleton for GLR parsing. | |
2472 | ||
2473 | * tests/cxx-gram.at: New tests for GLR parsing. | |
2474 | ||
2475 | * tests/testsuite.at: Include cxx-gram.at. | |
2476 | ||
2477 | * tests/Makefile.am: Add cxx-gram.at. | |
e0e5bf84 | 2478 | |
676385e2 PH |
2479 | * src/parse-gram.y: |
2480 | ||
2481 | * src/scan-gram.l: Add %dprec, %glr-parser, %merge. | |
2482 | ||
2483 | * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser. | |
e0e5bf84 | 2484 | |
b5480d74 | 2485 | 2002-06-27 Akim Demaille <akim@epita.fr> |
e2aaf4c4 AD |
2486 | |
2487 | * src/options.h, src/options.c: Remove. | |
2488 | * src/getargs.c (short_options, long_options): New. | |
2489 | ||
60491a94 AD |
2490 | 2002-06-27 Akim Demaille <akim@epita.fr> |
2491 | ||
2492 | * data/bison.simple, data/bison.c++: Rename as... | |
2493 | * data/yacc.c, data/lalr1.cc: these. | |
2494 | * doc/bison.texinfo (Environment Variables): Remove. | |
2495 | ||
9be0c25b AD |
2496 | 2002-06-25 Raja R Harinath <harinath@cs.umn.edu> |
2497 | ||
2498 | * src/getargs.c (report_argmatch): Initialize strtok(). | |
2499 | ||
1ae72863 AD |
2500 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2501 | ||
2502 | * data/bison.simple (b4_symbol_actions): New, replaces... | |
2503 | (b4_symbol_destructor, b4_symbol_printer): these. | |
2504 | (yysymprint): Be sure to call YYPRINT only for tokens, and using | |
2505 | user token numbers. | |
2506 | ||
87542d29 AD |
2507 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2508 | ||
2509 | * data/bison.simple (yydestructor): Rename as... | |
2510 | (yydestruct): this. | |
2511 | ||
1a31ed21 AD |
2512 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2513 | ||
2514 | * src/symtab.h, src/symtab.c (symbol_type_set) | |
2515 | (symbol_destructor_set, symbol_precedence_set): The location is | |
2516 | the last argument. | |
2517 | Adjust all callers. | |
2518 | ||
e776192e AD |
2519 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2520 | ||
2521 | * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser | |
2522 | internals. | |
2523 | * src/reader.h, src/reader.c (grammar_current_rule_prec_set): | |
2524 | Takes a location. | |
2525 | * src/symtab.h, src/symtab.c (symbol_class_set) | |
2526 | (symbol_user_token_number_set): Likewise. | |
2527 | Adjust all callers. | |
2528 | Promote complain_at. | |
2529 | * tests/input.at (Type Clashes): Adjust. | |
2530 | ||
5c1180b3 AD |
2531 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2532 | ||
2533 | * data/bison.simple (YYLEX): Fix the declaration when | |
2534 | %pure-parser. | |
2535 | ||
e3170060 AD |
2536 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2537 | ||
2538 | * data/bison.simple (yysymprint): Don't print the token number, | |
2539 | just its name. | |
2540 | * tests/actions.at (Destructors): Rename as... | |
2541 | (Printers and Destructors): this. | |
2542 | Also exercise %printer. | |
2543 | ||
253862fd AD |
2544 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2545 | ||
2546 | * data/bison.simple (YYDSYMPRINT): New. | |
2547 | Use it to remove many of the #if YYDEBUG/if (yydebug). | |
2548 | ||
366eea36 AD |
2549 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2550 | ||
2551 | * src/symtab.h, src/symtab.c (symbol_t): printer and | |
2552 | printer_location are new members. | |
2553 | (symbol_printer_set): New. | |
2554 | * src/parse-gram.y (PERCENT_PRINTER): New token. | |
2555 | Handle its associated rule. | |
2556 | * src/scan-gram.l: Adjust. | |
2557 | (handle_destructor_at, handle_destructor_dollar): Rename as... | |
2558 | (handle_symbol_code_at, handle_symbol_code_dollar): these. | |
2559 | * src/output.c (symbol_printers_output): New. | |
2560 | (output_skeleton): Call it. | |
2561 | * data/bison.simple (yysymprint): New. Cannot be named yyprint | |
2562 | since there are already many grammar files with a user `yyprint'. | |
2563 | Replace the calls to YYPRINT to calls to yysymprint. | |
2564 | * tests/calc.at: Adjust. | |
2565 | * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was | |
2566 | taking advantage of parser very internal details (stack size!). | |
2567 | ||
4f25ebb0 AD |
2568 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2569 | ||
2570 | * src/scan-gram.l: Complete the scanner with the missing patterns | |
2571 | to pacify Flex. | |
2572 | Use `quote' and `symbol_tag_get' where appropriate. | |
2573 | ||
93b68a0e AD |
2574 | 2002-06-19 Akim Demaille <akim@epita.fr> |
2575 | ||
2576 | * tests/actions.at (Destructors): Augment to test locations. | |
2577 | * data/bison.simple (yydestructor): Pass it the current location | |
2578 | if locations are enabled. | |
2579 | Prototype only when __STDC__ or C++. | |
2580 | Change the argument names to move into the yy name space: there is | |
2581 | user code here. | |
2582 | ||
58612f1d AD |
2583 | 2002-06-19 Akim Demaille <akim@epita.fr> |
2584 | ||
74310291 AD |
2585 | * data/bison.simple (b4_pure_if): New. |
2586 | Use it instead of #ifdef YYPURE. | |
2587 | ||
2588 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
2589 | ||
2590 | * data/bison.simple (b4_location_if): New. | |
58612f1d AD |
2591 | Use it instead of #ifdef YYLSP_NEEDED. |
2592 | ||
f25bfb75 AD |
2593 | 2002-06-19 Akim Demaille <akim@epita.fr> |
2594 | ||
2595 | Prepare @$ in %destructor, but currently don't bind it in the | |
2596 | skeleton, as %location use is not cleaned up yet. | |
2597 | ||
2598 | * src/scan-gram.l (handle_dollar, handle_destructor_at) | |
2599 | (handle_action_at): New. | |
2600 | (handle_at, handle_action_dollar, handle_destructor_dollar): Take | |
2601 | a braced_code_t and a location as additional arguments. | |
2602 | (handle_destructor_dollar): Instead of requiring `b4_eval', just | |
2603 | unquote one when outputting `b4_dollar_dollar'. | |
2604 | Adjust callers. | |
2605 | * data/bison.simple (b4_eval): Remove. | |
2606 | (b4_symbol_destructor): Adjust. | |
2607 | * tests/input.at (Invalid @n): Adjust. | |
2608 | ||
c732d2c6 AD |
2609 | 2002-06-19 Zack Weinberg <zack@codesourcery.com> |
2610 | ||
2611 | * doc/bison.texinfo: Document ability to have multiple | |
2612 | prologue sections. | |
2613 | ||
8c165d89 AD |
2614 | 2002-06-18 Akim Demaille <akim@epita.fr> |
2615 | ||
2616 | * src/files.c (compute_base_names): When computing the output file | |
2617 | names from the input file name, strip the directory part. | |
2618 | ||
ca98bf57 AD |
2619 | 2002-06-18 Akim Demaille <akim@epita.fr> |
2620 | ||
2621 | * data/bison.simple.new: Comment changes. | |
2622 | Reported by Andreas Schwab. | |
2623 | ||
0bfb02ff AD |
2624 | 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu> |
2625 | ||
2626 | * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that | |
2627 | there are no `label `yyoverflowlab' defined but not used' warnings | |
2628 | when yyoverflow is defined. | |
2629 | ||
24c0aad7 AD |
2630 | 2002-06-18 Akim Demaille <akim@epita.fr> |
2631 | ||
2632 | * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a | |
2633 | new member. | |
2634 | (symbol_destructor_set): Adjust. | |
2635 | * src/output.c (symbol_destructors_output): Output the destructor | |
2636 | locations. | |
2637 | Output the symbol name. | |
2638 | * data/bison.simple (b4_symbol_destructor): Adjust. | |
2639 | ||
5719c109 AD |
2640 | 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com> |
2641 | and Akim Demaille <akim@epita.fr> | |
2642 | ||
2643 | * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy | |
2644 | what's left on the stack when the error recovery hits EOF. | |
2645 | * tests/actions.at (Destructors): Complete to exercise this case. | |
2646 | ||
9280d3ef AD |
2647 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2648 | ||
2649 | * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of | |
2650 | arguments is really empty, not only equal to `[]'. | |
2651 | * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new | |
2652 | member. | |
2653 | (symbol_destructor_set): New. | |
2654 | * src/output.c (symbol_destructors_output): New. | |
2655 | * src/reader.h (brace_code_t, current_braced_code): New. | |
2656 | * src/scan-gram.l (BRACED_CODE): Use it to branch on... | |
2657 | (handle_dollar): Rename as... | |
2658 | (handle_action_dollar): this. | |
2659 | (handle_destructor_dollar): New. | |
2660 | * src/parse-gram.y (PERCENT_DESTRUCTOR): New. | |
2661 | (grammar_declaration): Use it. | |
2662 | * data/bison.simple (yystos): Is always defined. | |
2663 | (yydestructor): New. | |
2664 | * tests/actions.at (Destructors): New. | |
2665 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep. | |
2666 | ||
dafdc66f AD |
2667 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2668 | ||
2669 | * src/symlist.h, src/symlist.c (symbol_list_length): New. | |
2670 | * src/scan-gram.l (handle_dollar, handle_at): Compute the | |
2671 | rule_length only when needed. | |
2672 | * src/output.c (actions_output, token_definitions_output): Output | |
2673 | the full M4 block. | |
2674 | * src/symtab.c: Don't access directly to the symbol tag, use | |
2675 | symbol_tag_get. | |
2676 | * src/parse-gram.y: Use symbol_list_free. | |
2677 | ||
56c47203 AD |
2678 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2679 | ||
2680 | * src/reader.h, src/reader.c (symbol_list, symbol_list_new) | |
2681 | (symbol_list_prepend, get_type_name): Move to... | |
2682 | * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new) | |
2683 | (symbol_list_prepend, symbol_list_n_type_name_get): here. | |
2684 | Adjust all callers. | |
2685 | (symbol_list_free): New. | |
2686 | * src/scan-gram.l (handle_dollar): Takes a location. | |
2687 | * tests/input.at (Invalid $n): Adjust. | |
2688 | ||
1e0bab92 AD |
2689 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2690 | ||
2691 | * src/reader.h, src/reader.c (symbol_list_new): Export it. | |
2692 | (symbol_list_prepend): New. | |
2693 | * src/parse-gram.y (%union): `list' is a new member. | |
2694 | (symbols.1): New, replaces... | |
2695 | (terms_to_prec.1, nterms_to_type.1): these. | |
2696 | * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set) | |
2697 | Take a location as additional argument. | |
2698 | Adjust all callers. | |
2699 | ||
04e60654 AD |
2700 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2701 | ||
2702 | * src/parse-gram.y: Move %token in the declaration section so that | |
2703 | we don't depend upon CVS Bison. | |
2704 | ||
10e5b8bd AD |
2705 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2706 | ||
2707 | * src/state.h, src/state.c (state_rule_lookaheads_print): New. | |
2708 | * src/print.c (print_core): Use it. | |
2709 | ||
9801d40c AD |
2710 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2711 | ||
2712 | * src/conflicts.c (log_resolution): Accept the rule involved in | |
2713 | the sr conflicts instead of the lookahead number that points to | |
2714 | that rule. | |
2715 | (flush_reduce): Accept the current lookahead vector as argument, | |
2716 | instead of the index in LA. | |
2717 | (resolve_sr_conflict): Accept the current number of lookahead | |
2718 | bitset to consider for the STATE, instead of the index in LA. | |
2719 | (set_conflicts): Adjust. | |
2720 | * src/lalr.c, src/lalr.h, src/state.h: Comment changes. | |
2721 | ||
c0263492 AD |
2722 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2723 | ||
2724 | * src/state.h (state_t): Replace the `lookaheadsp' member, a | |
2725 | short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**). | |
2726 | Adjust all dependencies. | |
2727 | * src/lalr.c (initialize_lookaheads): Split into... | |
2728 | (states_lookaheads_count, states_lookaheads_initialize): these. | |
2729 | (lalr): Adjust. | |
2730 | ||
9757c359 AD |
2731 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2732 | ||
2733 | * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved | |
2734 | out of... | |
2735 | (grammar_rules_print): here. | |
2736 | * src/reduce.c (reduce_output): Use it. | |
2737 | * tests/reduce.at (Useless Rules, Reduced Automaton) | |
2738 | (Underivable Rules): Adjust. | |
2739 | ||
6b98e4b5 AD |
2740 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2741 | ||
2742 | Copy BYacc's nice way to report the grammar. | |
2743 | ||
2744 | * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print): | |
2745 | New. | |
2746 | Don't print the rules' location, it is confusing and useless. | |
2747 | (rule_print): Use grammar_rhs_print. | |
2748 | * src/print.c (print_grammar): Use grammar_rules_print. | |
2749 | ||
6b98e4b5 AD |
2750 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2751 | ||
2752 | Complete and rationalize `useless thing' warnings. | |
2753 | ||
2754 | * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n) | |
2755 | (symbol_tag_print): New. | |
2756 | Use them everywhere in place of accessing directly the tag member. | |
2757 | * src/gram.h, src/gram.c (rule_print): New. | |
2758 | Use it where a rule used to be printed `by hand'. | |
2759 | * src/reduce.c (nonterminals_reduce): Report the use nonterminals. | |
2760 | (reduce_grammar_tables): Report the useless rules. | |
2761 | (reduce_print): Useless things are a warning, not an error. | |
2762 | Report it as such. | |
2763 | * tests/reduce.at (Useless Nonterminals, Useless Rules): | |
2764 | (Reduced Automaton, Underivable Rules): Adjust. | |
2765 | * tests/regression.at (Web2c Report, Web2c Report): Adjust. | |
2766 | * tests/conflicts.at (Unresolved SR Conflicts) | |
2767 | (Solved SR Conflicts): Adjust. | |
2768 | ||
ee000ba4 AD |
2769 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2770 | ||
2771 | Let symbols have a location. | |
2772 | ||
2773 | * src/symtab.h, src/symtab.c (symbol_t): Location is a new member. | |
2774 | (getsym): Adjust. | |
2775 | Adjust all callers. | |
2776 | * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at): | |
2777 | Use location_t, not int. | |
2778 | * src/symtab.c (symbol_check_defined): Take advantage of the | |
2779 | location. | |
2780 | * tests/regression.at (Invalid inputs): Adjust. | |
2781 | ||
8efe435c AD |
2782 | 2002-06-15 Akim Demaille <akim@epita.fr> |
2783 | ||
2784 | * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New. | |
2785 | (input): Don't try to initialize yylloc here, do it in the | |
2786 | scanner. | |
2787 | * src/scan-gram.l (YY_USER_INIT): Initialize yylloc. | |
2788 | * src/gram.h (rule_t): Change line and action_line into location | |
2789 | and action_location, of location_t type. | |
2790 | Adjust all dependencies. | |
2791 | * src/location.h, src/location.c (empty_location): New. | |
2792 | * src/reader.h, src/reader.c (grammar_start_symbol_set) | |
2793 | (grammar_symbol_append, grammar_rule_begin, grammar_rule_end) | |
2794 | (grammar_current_rule_symbol_append) | |
2795 | (grammar_current_rule_action_append): Expect a location as argument. | |
2796 | * src/reader.c (grammar_midrule_action): Adjust to attach an | |
2797 | action's location as dummy symbol location. | |
2798 | * src/symtab.h, src/symtab.c (startsymbol_location): New. | |
2799 | * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust | |
2800 | the line numbers. | |
2801 | ||
1921f1d7 AD |
2802 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2803 | ||
2804 | Grammar declarations may be found in the grammar section. | |
2805 | ||
2806 | * src/parse-gram.y (rules_or_grammar_declaration): New. | |
2807 | (declarations): Each declaration may end with a semicolon, not | |
2808 | just... | |
2809 | (grammar_declaration): `"%union"'. | |
2810 | (grammar): Branch to rules_or_grammar_declaration. | |
2811 | ||
4515534c AD |
2812 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2813 | ||
2814 | * src/main.c (main): Invoke scanner_free. | |
2815 | ||
f958596b AD |
2816 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2817 | ||
2818 | * src/output.c (m4_invoke): Extracted from... | |
2819 | (output_skeleton): here. | |
2820 | Free tempfile. | |
2821 | ||
2c569025 AD |
2822 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2823 | ||
2824 | * src/parse-gram.y (directives, directive, gram) | |
2825 | (grammar_directives, precedence_directives, precedence_directive): | |
2826 | Rename as... | |
2827 | (declarations, declaration, grammar, grammar_declaration) | |
2828 | (precedence_declaration, precedence_declarator): these. | |
2829 | (symbol_declaration): New. | |
2830 | ||
592e8d4d AD |
2831 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2832 | ||
2833 | * src/files.c (action_obstack): Remove, unused. | |
2834 | (output_obstack): Remove it, and all its dependencies, as it is no | |
2835 | longer needed. | |
2836 | * src/reader.c (epilogue_set): Build the epilogue in the | |
2837 | muscle_obstack. | |
2838 | * src/output.h, src/output.c (muscle_obstack): Move to... | |
2839 | * src/muscle_tab.h, src/muscle_tab.h: here. | |
2840 | (muscle_init): Initialize muscle_obstack. | |
2841 | (muscle_free): New. | |
2842 | * src/main.c (main): Call it. | |
2843 | ||
0c15323d AD |
2844 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2845 | ||
2846 | * src/location.h: New, extracted from... | |
2847 | * src/reader.h: here. | |
2848 | * src/Makefile.am (noinst_HEADERS): Merge into | |
2849 | (bison_SOURCES): this. | |
2850 | Add location.h. | |
2851 | * src/parse-gram.y: Use location_t instead of Bison's. | |
2852 | * src/reader.h, src/reader.c (prologue_augment, epilogue_set): | |
2853 | Use location_t instead of ints. | |
2854 | ||
e96c9728 AD |
2855 | 2002-06-14 Akim Demaille <akim@epita.fr> |
2856 | ||
2857 | * data/bison.simple, data/bison.c++: Be sure to restore the | |
2858 | current #line when returning to the skeleton contents after having | |
2859 | exposed the input file's #line. | |
2860 | ||
75d1fe16 AD |
2861 | 2002-06-12 Akim Demaille <akim@epita.fr> |
2862 | ||
2863 | * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too | |
2864 | eager. | |
2865 | * tests/actions.at (Exotic Dollars): New. | |
2866 | ||
6c35d22c AD |
2867 | 2002-06-12 Akim Demaille <akim@epita.fr> |
2868 | ||
2869 | * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst | |
2870 | ['"/] too eagerly. | |
2871 | * tests/input.at (Torturing the Scanner): New. | |
2872 | ||
1d6412ad AD |
2873 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2874 | ||
2875 | * src/scan-gram.l (YY_OBS_INIT): Remove, replace with... | |
2876 | [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE] | |
2877 | [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment. | |
2878 | * src/reader.h, src/scan-gram.l (scanner_initialize): this. | |
2879 | * src/reader.c (reader): Use it. | |
2880 | ||
4cdb01db AD |
2881 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2882 | ||
2883 | * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval. | |
2884 | Adjust all callers. | |
2885 | (scanner_last_string_free): New. | |
2886 | ||
44995b2e AD |
2887 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2888 | ||
2889 | * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as... | |
2890 | (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these. | |
2891 | (last_string, YY_OBS_FREE): New. | |
2892 | Use them when returning an ID. | |
2893 | ||
e9955c83 AD |
2894 | 2002-06-11 Akim Demaille <akim@epita.fr> |
2895 | ||
2896 | Have Bison grammars parsed by a Bison grammar. | |
2897 | ||
2898 | * src/reader.c, src/reader.h (prologue_augment): New. | |
2899 | * src/reader.c (copy_definition): Remove. | |
2900 | ||
2901 | * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment) | |
2902 | (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action) | |
2903 | (grammar_current_rule_prec_set, grammar_current_rule_check) | |
2904 | (grammar_current_rule_symbol_append) | |
2905 | (grammar_current_rule_action_append): Export. | |
2906 | * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_ | |
2907 | (symbol_list_action_append): Remove. | |
2908 | Hook the routines from reader. | |
2909 | * src/scan-gram.l: In INITIAL, characters and strings are tokens. | |
2910 | * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now. | |
2911 | ||
2912 | * src/reader.c (read_declarations): Remove, unused. | |
2913 | ||
2914 | * src/parse-gram.y: Handle the epilogue. | |
2915 | * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as... | |
2916 | (grammar_start_symbol_set): this. | |
2917 | * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet. | |
2918 | * src/reader.c (readgram): Remove, unused. | |
2919 | (reader): Adjust to insert eoftoken and axiom where appropriate. | |
2920 | ||
2921 | * src/reader.c (copy_dollar): Replace with... | |
2922 | * src/scan-gram.h (handle_dollar): this. | |
2923 | * src/parse-gram.y: Remove `%thong'. | |
2924 | ||
2925 | * src/reader.c (copy_at): Replace with... | |
2926 | * src/scan-gram.h (handle_at): this. | |
2927 | ||
2928 | * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at): | |
2929 | New. | |
2930 | ||
2931 | * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the | |
2932 | time being. | |
2933 | ||
2934 | * src/reader.h, src/reader.c (grammar_rule_end): New. | |
2935 | ||
2936 | * src/parse.y (current_type, current_class): New. | |
2937 | Implement `%nterm', `%token' support. | |
2938 | Merge `%term' into `%token'. | |
2939 | (string_as_id): New. | |
2940 | * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the | |
2941 | type name. | |
2942 | ||
2943 | * src/parse-gram.y: Be sure to handle properly the beginning of | |
2944 | rules. | |
2945 | ||
2946 | * src/parse-gram.y: Handle %type. | |
2947 | * src/reader.c (grammar_rule_end): Call grammar_current_rule_check. | |
2948 | ||
2949 | * src/parse-gram.y: More directives support. | |
2950 | * src/options.c: No longer handle source directives. | |
2951 | ||
2952 | * src/parse-gram.y: Fix %output. | |
2953 | ||
2954 | * src/parse-gram.y: Handle %union. | |
2955 | Use the prologue locations. | |
2956 | * src/reader.c (parse_union_decl): Remove. | |
2957 | ||
2958 | * src/reader.h, src/reader.c (epilogue_set): New. | |
2959 | * src/parse-gram.y: Use it. | |
2960 | ||
2961 | * data/bison.simple, data/bison.c++: b4_stype is now either not | |
2962 | defined, then default to int, or to the contents of %union, | |
2963 | without `union' itself. | |
2964 | Adjust. | |
2965 | * src/muscle_tab.c (muscle_init): Don't predefine `stype'. | |
2966 | ||
2967 | * src/output.c (actions_output): Don't output braces, as they are | |
2968 | already handled by the scanner. | |
2969 | ||
2970 | * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of | |
2971 | characters to themselves. | |
2972 | ||
2973 | * tests/reduce.at (Reduced Automaton): End the grammars with %% so | |
2974 | that the epilogue has a proper #line. | |
2975 | ||
2976 | * src/parse-gram.y: Handle precedence/associativity. | |
2977 | ||
2978 | * src/symtab.c (symbol_precedence_set): Requires the symbol to be | |
2979 | a terminal. | |
2980 | * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters. | |
2981 | * tests/calc.at: Do not use `%token "foo"' as it makes not sense | |
2982 | at all to define terminals that cannot be emitted. | |
2983 | ||
2984 | * src/scan-gram.l: Escape M4 characters. | |
2985 | ||
2986 | * src/scan-gram.l: Working properly with escapes in user | |
2987 | strings/characters. | |
2988 | ||
2989 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR) | |
2990 | (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING' | |
2991 | grammar. | |
2992 | Use more modest sizes, as for the time being the parser does not | |
2993 | release memory, and therefore the process swallows a huge amount | |
2994 | of memory. | |
2995 | ||
2996 | * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the | |
2997 | stricter %token grammar. | |
2998 | ||
2999 | * src/symtab.h (associativity): Add `undef_assoc'. | |
3000 | (symbol_precedence_set): Do nothing when passed an undef_assoc. | |
3001 | * src/symtab.c (symbol_check_alias_consistence): Adjust. | |
3002 | ||
3003 | * tests/regression.at (Invalid %directive): Remove, as it is now | |
3004 | meaningless. | |
3005 | (Invalid inputs): Adjust to the new error messages. | |
3006 | (Token definitions): The new grammar doesn't allow too many | |
3007 | eccentricities. | |
3008 | ||
3009 | * src/lex.h, src/lex.c: Remove. | |
3010 | * src/reader.c (lastprec, skip_to_char, read_signed_integer) | |
3011 | (copy_character, copy_string2, copy_string, copy_identifier) | |
3012 | (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl) | |
3013 | (parse_muscle_decl, parse_dquoted_param, parse_skel_decl) | |
3014 | (parse_action): Remove. | |
3015 | * po/POTFILES.in: Adjust. | |
3016 | ||
2e047461 AD |
3017 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3018 | ||
3019 | * src/reader.c (parse_action): Don't store directly into the | |
3020 | rule's action member: return the action as a string. | |
3021 | Don't require `rule_length' as an argument: compute it. | |
3022 | (grammar_current_rule_symbol_append) | |
3023 | (grammar_current_rule_action_append): New, eved out from | |
3024 | (readgram): here. | |
3025 | Remove `action_flag', `rulelength', unused now. | |
3026 | ||
9af3fbce AD |
3027 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3028 | ||
3029 | * src/reader.c (grammar_current_rule_prec_set). | |
3030 | (grammar_current_rule_check): New, eved out from... | |
3031 | (readgram): here. | |
3032 | Remove `xaction', `first_rhs': useless. | |
3033 | * tests/input.at (Type clashes): New. | |
3034 | * tests/existing.at (GNU Cim Grammar): Adjust. | |
3035 | ||
1485e106 AD |
3036 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3037 | ||
3038 | * src/reader.c (grammar_midrule_action): New, Eved out from | |
3039 | (readgram): here. | |
3040 | ||
da4160c3 AD |
3041 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3042 | ||
3043 | * src/reader.c (grammar_rule_begin, previous_rule, current_rule): | |
3044 | New. | |
3045 | (readgram): Use them as replacement of inlined code, crule and | |
3046 | crule1. | |
3047 | ||
f6d0f937 AD |
3048 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3049 | ||
3050 | * src/reader.c (grammar_end, grammar_symbol_append): New. | |
3051 | (readgram): Use them. | |
3052 | Make the use of `p' as local as possible. | |
3053 | ||
69078d4b AD |
3054 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3055 | ||
3056 | GCJ's parser requires the tokens to be defined before the prologue. | |
3057 | ||
3058 | * data/bison.simple: Output the token definition before the user's | |
3059 | prologue. | |
3060 | * tests/regression.at (Braces parsing, Duplicate string) | |
3061 | (Mixing %token styles): Check the output from bison. | |
3062 | (Early token definitions): New. | |
3063 | ||
5e424082 AD |
3064 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3065 | ||
3066 | * src/symtab.c (symbol_user_token_number_set): Don't complain when | |
3067 | assigning twice the same user number to a token, so that we can | |
3068 | use it in... | |
3069 | * src/lex.c (lex): here. | |
3070 | Also use `symbol_class_set' instead of hand written code. | |
3071 | * src/reader.c (parse_assoc_decl): Likewise. | |
3072 | ||
44536b35 AD |
3073 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3074 | ||
3075 | * src/symtab.c, src/symtab.c (symbol_class_set) | |
3076 | (symbol_user_token_number_set): New. | |
3077 | * src/reader.c (parse_token_decl): Use them. | |
3078 | Use a switch instead of ifs. | |
3079 | Use a single argument. | |
3080 | ||
8b9f2372 AD |
3081 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3082 | ||
3083 | Remove `%thong' support as it is undocumented, unused, duplicates | |
3084 | `%token's job, and creates useless e-mail traffic with people who | |
3085 | want to know what it is, why it is undocumented, unused, and | |
3086 | duplicates `%token's job. | |
3087 | ||
3088 | * src/reader.c (parse_thong_decl): Remove. | |
3089 | * src/options.c (option_table): Remove "thong". | |
3090 | * src/lex.h (tok_thong): Remove. | |
3091 | ||
3ae2b51f AD |
3092 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3093 | ||
3094 | * src/symtab.c, src/symtab.c (symbol_type_set) | |
3095 | (symbol_precedence_set): New. | |
3096 | * src/reader.c (parse_type_decl, parse_assoc_decl): Use them. | |
3097 | (value_components_used): Remove, unused. | |
3098 | ||
2f1afb73 AD |
3099 | 2002-06-09 Akim Demaille <akim@epita.fr> |
3100 | ||
3101 | Move symbols handling code out of the reader. | |
3102 | ||
3103 | * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken) | |
3104 | (axiom): Move to... | |
3105 | * src/symtab.h, src/symtab.c: here. | |
3106 | ||
3107 | * src/gram.c (start_symbol): Remove: use startsymbol->number. | |
3108 | * src/reader.c (startval): Rename as... | |
3109 | * src/symtab.h, src/symtab.c (startsymbol): this. | |
3110 | * src/reader.c: Adjust. | |
3111 | ||
3112 | * src/reader.c (symbol_check_defined, symbol_make_alias) | |
3113 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
3114 | (token_translations_init) | |
3115 | Move to... | |
3116 | * src/symtab.c: here. | |
3117 | * src/reader.c (packsymbols): Move to... | |
3118 | * src/symtab.h, src/symtab.c (symbols_pack): here. | |
3119 | * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as | |
3120 | argument. | |
3121 | ||
e9bca3ad AD |
3122 | 2002-06-03 Akim Demaille <akim@epita.fr> |
3123 | ||
3124 | * src/muscle_tab.c (muscle_insert, muscle_find): Declarations, | |
3125 | then statements. | |
3126 | ||
86eff183 AD |
3127 | 2002-06-03 Akim Demaille <akim@epita.fr> |
3128 | ||
3129 | * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize | |
3130 | structs with non literals. | |
3131 | * src/scan-skel.l: never-interactive. | |
3132 | * src/conflicts.c (enum conflict_resolution_e): No trailing | |
3133 | comma. | |
3134 | * src/getargs.c (usage): Split long literal strings. | |
3135 | Reported by Hans Aberg. | |
3136 | ||
717be197 AD |
3137 | 2002-05-28 Akim Demaille <akim@epita.fr> |
3138 | ||
3139 | * data/bison.c++: Use C++ ostreams. | |
3140 | (cdebug_): New member. | |
3141 | ||
670ddffd AD |
3142 | 2002-05-28 Akim Demaille <akim@epita.fr> |
3143 | ||
3144 | * src/output.c (output_skeleton): Be sure to allocate enough room | |
3145 | for `/' _and_ for `\0' in full_skeleton. | |
3146 | ||
769b430f AD |
3147 | 2002-05-28 Akim Demaille <akim@epita.fr> |
3148 | ||
3149 | * data/bison.c++: Catch up with bison.simple: | |
3150 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
3151 | and Paul Eggert <eggert@twinsun.com>: `error' handing. | |
3152 | 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_, | |
3153 | and popping traces. | |
3154 | ||
7067cb36 PH |
3155 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3156 | ||
3157 | * src/output.c (output_skeleton): Put an explicit path in front of | |
3158 | the skeleton file name, rather than relying on the -I directory, | |
3159 | to partially alleviate effects of having a skeleton file lying around | |
3160 | in the current directory. | |
769b430f | 3161 | |
4a713ec2 PH |
3162 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3163 | ||
769b430f | 3164 | * src/conflicts.c (log_resolution): Correct typo: |
4a713ec2 PH |
3165 | obstack_printf should be obstack_fgrow1. |
3166 | ||
b408954b AD |
3167 | 2002-05-26 Akim Demaille <akim@epita.fr> |
3168 | ||
3169 | * src/state.h (state_t): `solved_conflicts' is a new member. | |
3170 | * src/LR0.c (new_state): Set it to 0. | |
3171 | * src/conflicts.h, src/conflicts.c (print_conflicts) | |
3172 | (free_conflicts, solve_conflicts): Rename as... | |
3173 | (conflicts_print, conflicts_free, conflicts_solve): these. | |
3174 | Adjust callers. | |
3175 | * src/conflicts.c (enum conflict_resolution_e) | |
3176 | (solved_conflicts_obstack): New, used by... | |
3177 | (log_resolution): this. | |
3178 | Adjust to attach the conflict resolution to each state. | |
3179 | Complete the description with the precedence/associativity | |
3180 | information. | |
3181 | (resolve_sr_conflict): Adjust. | |
3182 | * src/print.c (print_state): Output its solved_conflicts. | |
3183 | * tests/conflicts.at (Unresolved SR Conflicts) | |
3184 | (Solved SR Conflicts): Exercise --report=all. | |
3185 | ||
a49aecd5 AD |
3186 | 2002-05-26 Akim Demaille <akim@epita.fr> |
3187 | ||
3188 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
3189 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
3190 | * src/reader.c, src/reduce.c, src/state.h, src/symtab.h | |
3191 | (token_number_t, item_number_as_token_number) | |
3192 | (token_number_as_item_number, muscle_insert_token_number_table): | |
3193 | Rename as... | |
3194 | (symbol_number_t, item_number_as_symbol_number) | |
3195 | (symbol_number_as_item_number, muscle_insert_symbol_number_table): | |
3196 | these, since it is more appropriate. | |
3197 | ||
5504898e AD |
3198 | 2002-05-26 Akim Demaille <akim@epita.fr> |
3199 | ||
3200 | * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional | |
3201 | `Error:' lines. | |
3202 | * data/bison.simple (yystos) [YYDEBUG]: New. | |
3203 | (yyparse) [YYDEBUG]: Display the symbols which are popped during | |
3204 | error recovery. | |
3205 | * tests/regression.at (Web2c Actions): Adjust: yystos is output now. | |
3206 | ||
ec3bc396 AD |
3207 | 2002-05-25 Akim Demaille <akim@epita.fr> |
3208 | ||
3209 | * doc/bison.texinfo (Debugging): Split into... | |
3210 | (Tracing): this new section, its former contents, and... | |
3211 | (Understanding): this new section. | |
3212 | * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced | |
3213 | by... | |
3214 | (report_flag): this. | |
3215 | Adjust all dependencies. | |
3216 | (report_args, report_types, report_argmatch): New. | |
3217 | (usage, getargs): Report/support -r, --report. | |
3218 | * src/options.h | |
3219 | (struct option_table_struct): Rename as.., | |
3220 | (struct option_table_s): this. | |
3221 | Rename the `set_flag' member to `flag' to match with getopt_long's | |
3222 | struct. | |
3223 | * src/options.c (option_table): Split verbose into an entry for | |
3224 | %verbose, and another for --verbose. | |
3225 | Support --report/-r, so remove -r from the obsolete --raw. | |
3226 | * src/print.c: Attach full item sets and lookaheads reports to | |
3227 | report_flag instead of trace_flag. | |
3228 | * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1. | |
3229 | ||
78df8250 PE |
3230 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3231 | and Paul Eggert <eggert@twinsun.com> | |
769b430f | 3232 | |
78df8250 PE |
3233 | * data/bison.simple (yyparse): Correct error handling to conform to |
3234 | POSIX and yacc. Specifically, after syntax error is discovered, | |
3235 | do not reduce further before shifting the error token. | |
3236 | Clean up the code a bit by removing the labels yyerrdefault, | |
3237 | yyerrhandle, yyerrpop. | |
3238 | * NEWS: Document the above. | |
3239 | ||
c0c9ea05 PH |
3240 | 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3241 | ||
3242 | * data/bison.simple (yyr1): Don't use yy_token_number_type as element | |
3243 | type; it isn't always big enough, since it doesn't necessarily | |
3244 | include non-terminals. | |
769b430f | 3245 | (yytranslate): Expand definition of yy_token_number_type, so that |
c0c9ea05 PH |
3246 | the latter can be removed. |
3247 | (yy_token_number_type): Remove, only one use. | |
3248 | * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple--- | |
3249 | don't use TokenNumberType as element type. | |
769b430f | 3250 | |
c0c9ea05 PH |
3251 | * tests/regression.at: Modify expected output to agree with change |
3252 | to yyr1 and yytranslate. | |
769b430f | 3253 | |
6390a83f FK |
3254 | 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com> |
3255 | ||
3256 | * src/reader.c (parse_action): Use copy_character instead of | |
3257 | obstack_1grow. | |
3258 | ||
db7c8e9a AD |
3259 | 2002-05-13 Akim Demaille <akim@epita.fr> |
3260 | ||
3261 | * tests/regression.at (Token definitions): Prototype yylex and | |
3262 | yyerror. | |
3263 | ||
fcc61800 PH |
3264 | 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3265 | ||
158c687b | 3266 | * src/scan-skel.l: Correct off-by-one error in handling of __oline__. |
fcc61800 PH |
3267 | * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect |
3268 | 32-bit arithmetic. | |
3269 | * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto. | |
3270 | ||
5683e9b2 AD |
3271 | 2002-05-07 Akim Demaille <akim@epita.fr> |
3272 | ||
3273 | * tests/synclines.at: Be sure to prototype yylex and yyerror to | |
3274 | avoid GCC warnings. | |
3275 | ||
0c2d3f4c AD |
3276 | 2002-05-07 Akim Demaille <akim@epita.fr> |
3277 | ||
3278 | Kill GCC warnings. | |
3279 | ||
3280 | * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop | |
3281 | over the RHS of each rule. | |
3282 | * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int. | |
3283 | * src/state.h (state_t): Member `nitems' is unsigned short. | |
3284 | * src/LR0.c (get_state): Adjust. | |
3285 | * src/reader.c (packgram): Likewise. | |
3286 | * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type | |
3287 | `Type'. | |
3288 | (muscle_insert_int_table): Remove, unused. | |
3289 | (prepare_rules): Remove `max'. | |
3290 | ||
1565b720 AD |
3291 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3292 | ||
3293 | * src/closure.c (print_firsts): Display of the symbol tags. | |
3294 | (bitmatrix_print): Move to... | |
3295 | * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump): | |
3296 | here. | |
3297 | * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust. | |
3298 | ||
cfaee611 AD |
3299 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3300 | ||
3301 | * src/muscle_tab.c (muscle_m4_output): Must return TRUE for | |
3302 | hash_do_for_each. | |
3303 | ||
458be8e0 AD |
3304 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3305 | ||
3306 | * src/LR0.c (new_state, get_state): Instead of using the global | |
3307 | `kernel_size' and `kernel_base', have two new arguments: | |
3308 | `core_size' and `core'. | |
3309 | Adjust callers. | |
3310 | ||
a900a624 AD |
3311 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3312 | ||
3313 | * src/reader.c (packgram): No longer end `ritem' with a 0 | |
3314 | sentinel: it is not used. | |
3315 | ||
d4e7d3a1 AD |
3316 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3317 | ||
3318 | New experimental feature: display the lookaheads in the report and | |
3319 | graph. | |
3320 | ||
3321 | * src/print (print_core): When --trace-flag, display the rules | |
3322 | lookaheads. | |
3323 | * src/print_graph.c (print_core): Likewise. | |
3324 | Swap the arguments. | |
3325 | Adjust caller. | |
3326 | ||
39ceb25b AD |
3327 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3328 | ||
3329 | * tests/torture.at (Many lookaheads): New test. | |
3330 | ||
5372019f AD |
3331 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3332 | ||
3333 | * src/output.c (GENERATE_OUTPUT_TABLE): Replace with... | |
3334 | (GENERATE_MUSCLE_INSERT_TABLE): this. | |
3335 | (output_int_table, output_unsigned_int_table, output_short_table) | |
3336 | (output_token_number_table, output_item_number_table): Replace with... | |
3337 | (muscle_insert_int_table, muscle_insert_unsigned_int_table) | |
3338 | (muscle_insert_short_table, muscle_insert_token_number_table) | |
3339 | (muscle_insert_item_number_table): these. | |
3340 | Adjust all callers. | |
3341 | (prepare_tokens): Don't free `translations', since... | |
3342 | * src/reader.h, src/reader.c (grammar_free): do it. | |
3343 | Move to... | |
3344 | * src/gram.h, src/gram.c (grammar_free): here. | |
3345 | * data/bison.simple, data/bison.c++: b4_token_number_max is now | |
3346 | b4_translate_max. | |
3347 | ||
5df5f6d5 AD |
3348 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3349 | ||
3350 | * src/output.c (output_unsigned_int_table): New. | |
3351 | (prepare_rules): `i' is unsigned. | |
3352 | `prhs', `rline', `r2' are unsigned int. | |
3353 | Rename muscle `rhs_number_max' as `rhs_max'. | |
3354 | Output muscles `prhs_max', `rline_max', and `r2_max'. | |
3355 | Free rline and r1. | |
3356 | * data/bison.simple, data/bison.c++: Adjust to use these muscles | |
3357 | to compute types instead of constant types. | |
3358 | * tests/regression.at (Web2c Actions): Adjust. | |
3359 | ||
b87f8b21 AD |
3360 | 2002-05-04 Akim Demaille <akim@epita.fr> |
3361 | ||
3362 | * src/symtab.h (SALIAS, SUNDEF): Rename as... | |
3363 | (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these. | |
3364 | Adjust dependencies. | |
3365 | * src/output.c (token_definitions_output): Be sure not to output a | |
3366 | `#define 'a'' when fed with `%token 'a' "a"'. | |
3367 | * tests/regression.at (Token definitions): New. | |
3368 | ||
8bb936e4 PE |
3369 | 2002-05-03 Paul Eggert <eggert@twinsun.com> |
3370 | ||
3371 | * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE | |
3372 | for K&R C. | |
3373 | ||
3374 | 2002-05-03 gettextize <bug-gnu-gettext@gnu.org> | |
3375 | ||
3376 | * Makefile.am (SUBDIRS): Remove intl. | |
3377 | (EXTRA_DIST): Add config/config.rpath. | |
3378 | ||
53c71a12 AD |
3379 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3380 | ||
3381 | * data/bison.simple (m4_if): Don't output empty enums. | |
3382 | And actually, output valid enum definitions :(. | |
3383 | ||
289dd0cf AD |
3384 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3385 | ||
3386 | * configure.bat: Remove, completely obsolete. | |
3387 | * Makefile.am (EXTRA_DIST): Adjust. | |
3388 | Don't distribute config.rpath... | |
3389 | * config/Makefile.am (EXTRA_DIST): Do it. | |
3390 | ||
db85e524 AD |
3391 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3392 | ||
3393 | * configure.in (GETTEXT_VERSION): New. | |
3394 | Suggested by Bruno Haible for the forthcoming Gettext 0.10.3. | |
3395 | ||
83ccf991 AD |
3396 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3397 | ||
3398 | * data/bison.simple (b4_token_enum): New. | |
3399 | (b4_token_defines): Use it to output tokens both as #define and | |
3400 | enums. | |
3401 | Suggested by Paul Eggert. | |
3402 | * src/output.c (token_definitions_output): Don't output spurious | |
3403 | white spaces. | |
3404 | ||
1f418995 AD |
3405 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3406 | ||
3407 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
3408 | ||
45119f04 RA |
3409 | 2002-05-02 Robert Anisko <robert@lrde.epita.fr> |
3410 | ||
3411 | * data/bison.c++: Adapt expansion of $s and @s to the C++ parser. | |
3412 | Update the stack class, give a try to deque as the default container. | |
3413 | ||
b2d52318 AD |
3414 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3415 | ||
3416 | * data/bison.simple (yyparse): Do not implement @$ = @1. | |
3417 | (YYLLOC_DEFAULT): Adjust to do it. | |
3418 | * doc/bison.texinfo (Location Default Action): Fix. | |
3419 | ||
3a8b4109 AD |
3420 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3421 | ||
3422 | * src/reader.c (parse_braces): Merge into... | |
3423 | (parse_action): this. | |
3424 | ||
84614e13 AD |
3425 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3426 | ||
3427 | * configure.in (ALL_LINGUAS): Remove. | |
3428 | * po/LINGUAS, hr.po: New. | |
3429 | ||
fdbcd8e2 AD |
3430 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3431 | ||
3432 | Remove the so called hairy (semantic) parsers. | |
3433 | ||
3434 | * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove. | |
3435 | * src/gram.h, src/gram.c (semantic_parser): Remove. | |
3436 | (rule_t): Remove the guard and guard_line members. | |
3437 | * src/lex.h (token_t): remove tok_guard. | |
3438 | * src/options.c (option_table): Remove %guard and %semantic_parser | |
3439 | support. | |
3440 | * src/output.c, src/output.h (guards_output): Remove. | |
3441 | (prepare): Adjust. | |
3442 | (token_definitions_output): Don't output the `T' | |
3443 | tokens (???). | |
3444 | (output_skeleton): Don't output the guards. | |
3445 | * src/files.c, src/files.c (attrsfile): Remove. | |
3446 | * src/reader.c (symbol_list): Remove the guard and guard_line | |
3447 | members. | |
3448 | Adjust dependencies. | |
3449 | (parse_guard): Remove. | |
3450 | * data/bison.hairy: Remove. | |
3451 | * doc/bison.texinfo (Environment Variables): Remove occurrences of | |
3452 | BISON_HAIRY. | |
3453 | ||
82b6cb3f AD |
3454 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3455 | ||
3456 | * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action) | |
3457 | (parse_guard): Rename the formal argument `stack_offset' as | |
3458 | `rule_length', which is more readable. | |
3459 | Adjust callers. | |
3460 | (copy_at, copy_dollar): Instead of outputting the hard coded | |
3461 | values of $$, $n and so forth, output invocation to b4_lhs_value, | |
3462 | b4_lhs_location, b4_rhs_value, and b4_rhs_location. | |
900c877b AD |
3463 | Note: this patch partially drops `semantic-parser' support: it |
3464 | always does `rule_length - n', where semantic parsers ought to | |
3465 | always use `-n'. | |
82b6cb3f AD |
3466 | * data/bison.simple, data/bison.c++ (b4_lhs_value) |
3467 | (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New. | |
3468 | ||
6cbfbcc5 AD |
3469 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3470 | ||
3471 | * configure.in (AC_INIT): Bump to 1.49b. | |
3472 | (AM_INIT_AUTOMAKE): Short invocation. | |
3473 | ||
b8548114 AD |
3474 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3475 | ||
3476 | Version 1.49a. | |
3477 | ||
c20cd1fa AD |
3478 | 2002-05-01 Akim Demaille <akim@epita.fr> |
3479 | ||
3480 | * src/skeleton.h: Remove. | |
3481 | ||
8a9566d4 AD |
3482 | 2002-05-01 Akim Demaille <akim@epita.fr> |
3483 | ||
3484 | * src/skeleton.h: Fix the #endif. | |
3485 | Reported by Magnus Fromreide. | |
3486 | ||
8c6d399a PE |
3487 | 2002-04-26 Paul Eggert <eggert@twinsun.com> |
3488 | ||
3489 | * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL): | |
3490 | Define if we define YYSTYPE and YYLTYPE, respectively. | |
b756bb75 | 3491 | (YYCOPY): Fix [] quoting problem in the non-GCC case. |
8a9566d4 | 3492 | |
2b7ed18a RA |
3493 | 2002-04-25 Robert Anisko <robert@lrde.epita.fr> |
3494 | ||
3495 | * src/scan-skel.l: Postprocess quadrigraphs. | |
3496 | ||
3497 | * src/reader.c (copy_character): New function, used to output | |
3498 | single characters while replacing `[' and `]' with quadrigraphs, to | |
3499 | avoid troubles with M4 quotes. | |
3500 | (copy_comment): Output characters with copy_character. | |
3501 | (read_additionnal_code): Likewise. | |
3502 | (copy_string2): Likewise. | |
3503 | (copy_definition): Likewise. | |
3504 | ||
3505 | * tests/calc.at: Exercise M4 quoting. | |
3506 | ||
34a89c50 AD |
3507 | 2002-04-25 Akim Demaille <akim@epita.fr> |
3508 | ||
3509 | * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space | |
3510 | between `!' and the command. | |
3511 | Reported by Paul Eggert. | |
3512 | ||
0dd1580a RA |
3513 | 2002-04-24 Robert Anisko <robert@lrde.epita.fr> |
3514 | ||
3515 | * tests/calc.at: Exercise prologue splitting. | |
3516 | ||
3517 | * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and | |
3518 | `b4_post_prologue' instead of `b4_prologue'. | |
3519 | ||
3520 | * src/output.c (prepare): Add the `pre_prologue' and `post_prologue' | |
3521 | muscles. | |
3522 | (output): Free pre_prologue_obstack and post_prologue_obstack. | |
3523 | * src/files.h, src/files.c (attrs_obstack): Remove. | |
3524 | (pre_prologue_obstack, post_prologue_obstack): New. | |
3525 | * src/reader.c (copy_definition): Add a parameter to specify the | |
3526 | obstack to fill, instead of using attrs_obstack unconditionally. | |
3527 | (read_declarations): Pass pre_prologue_obstack to copy_definition if | |
3528 | `%union' has not yet been seen, pass post_prologue_obstack otherwise. | |
3529 | ||
83c1796f PE |
3530 | 2002-04-23 Paul Eggert <eggert@twinsun.com> |
3531 | ||
3532 | * data/bison.simple: Remove unnecessary commentary and white | |
3533 | space differences from 1_29-branch. | |
3534 | Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE). | |
3535 | ||
3536 | (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY, | |
3537 | YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or | |
3538 | if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial | |
3539 | constructors or destructors. | |
3540 | ||
3541 | (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack. | |
3542 | ||
1207eeac AD |
3543 | 2002-04-23 Akim Demaille <akim@epita.fr> |
3544 | ||
3545 | * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels. | |
3546 | * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's | |
3547 | location with columns. | |
3548 | * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'. | |
3549 | All reported by Paul Eggert. | |
3550 | ||
78ab8f67 AD |
3551 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3552 | ||
3553 | * src/reduce.c (dump_grammar): Move to... | |
3554 | * src/gram.h, src/gram.c (grammar_dump): here. | |
3555 | Be sure to separate long item numbers. | |
3556 | Don't read the members of a rule's prec if its nil. | |
3557 | ||
133c20e2 AD |
3558 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3559 | ||
3560 | * src/output.c (table_size, table_grow): New. | |
3561 | (MAXTABLE): Remove, replace uses with table_size. | |
3562 | (pack_vector): Instead of dying when the table is too big, grow it. | |
3563 | ||
9515e8a7 AD |
3564 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3565 | ||
3566 | * data/bison.simple (yyr1): Its type is that of a token number. | |
3567 | * data/bison.c++ (r1_): Likewise. | |
3568 | * tests/regression.at (Web2c Actions): Adjust. | |
3569 | ||
23c5a174 AD |
3570 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3571 | ||
3572 | * src/reader.c (token_translations_init): 256 is now the default | |
3573 | value for the error token, i.e., it will be assigned another | |
3574 | number if the user assigned 256 to one of her tokens. | |
3575 | (reader): Don't force 256 to error. | |
3576 | * doc/bison.texinfo (Symbols): Adjust. | |
3577 | * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR) | |
3578 | (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3 | |
3579 | etc. instead of 10, 20, 30 (which was used to `jump' over error | |
3580 | (256) and undefined (2)). | |
3581 | ||
5fbb0954 AD |
3582 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3583 | ||
3584 | Propagate more token_number_t. | |
3585 | ||
3586 | * src/gram.h (token_number_as_item_number) | |
3587 | (item_number_as_token_number): New. | |
3588 | * src/output.c (GENERATE_OUTPUT_TABLE): New. | |
3589 | Use it to create output_item_number_table and | |
3590 | output_token_number_table. | |
3591 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
3592 | * src/lex.c, src/nullable.c, src/output.c, src/print.c, | |
3593 | * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h, | |
3594 | * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts. | |
3595 | ||
4f940944 AD |
3596 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3597 | ||
3598 | * src/output.h, src/output.c (get_lines_number): Remove. | |
3599 | ||
3ded9a63 AD |
3600 | 2002-04-19 Akim Demaille <akim@epita.fr> |
3601 | ||
3602 | * doc/bison.texinfo (Actions): Make clear that `|' is not the same | |
3603 | as Lex/Flex'. | |
3604 | (Debugging): More details about enabling the debugging features. | |
3605 | (Table of Symbols): Describe $$, $n, @$, and @n. | |
3606 | Suggested by Tim Josling. | |
3607 | ||
e0c471a9 AD |
3608 | 2002-04-19 Akim Demaille <akim@epita.fr> |
3609 | ||
3610 | * doc/bison.texinfo: Remove the uses of the obsolete @refill. | |
3611 | ||
fecc10cd AD |
3612 | 2002-04-10 Akim Demaille <akim@epita.fr> |
3613 | ||
3614 | * src/system.h: Rely on HAVE_LIMITS_H. | |
3615 | Suggested by Paul Eggert. | |
3616 | ||
51dec47b AD |
3617 | 2002-04-09 Akim Demaille <akim@epita.fr> |
3618 | ||
3619 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the | |
3620 | full stderr, and strip it according to the bison options, instead | |
3621 | of composing the error message from different bits. | |
3622 | This makes it easier to check for several error messages. | |
3623 | Adjust all the invocations. | |
3624 | Add an invocation exercising the error token. | |
3625 | Add an invocation demonstrating a stupid error message. | |
3626 | (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0. | |
3627 | Adjust the tests. | |
3628 | Error message are for stderr, not stdout. | |
3629 | ||
007a50a4 AD |
3630 | 2002-04-09 Akim Demaille <akim@epita.fr> |
3631 | ||
3632 | * src/gram.h, src/gram.c (error_token_number): Remove, use | |
3633 | errtoken->number. | |
3634 | * src/reader.c (reader): Don't specify the user token number (2) | |
3635 | for $undefined, as it uselessly prevents using it. | |
3636 | * src/gram.h (token_number_t): Move to... | |
3637 | * src/symtab.h: here. | |
3638 | (state_t.number): Is a token_number_t. | |
3639 | * src/print.c, src/reader.c: Use undeftoken->number instead of | |
3640 | hard coded 2. | |
3641 | (Even though this 2 is not the same as above: the number of the | |
3642 | undeftoken remains being 2, it is its user token number which | |
3643 | might not be 2). | |
3644 | * src/output.c (prepare_tokens): Rename the `maxtok' muscle with | |
3645 | `user_token_number_max'. | |
3646 | Output `undef_token_number'. | |
3647 | * data/bison.simple, data/bison.c++: Use them. | |
3648 | Be sure to map invalid yylex return values to | |
3649 | `undef_token_number'. This saves us from gratuitous SEGV. | |
3650 | ||
3651 | * tests/conflicts.at (Solved SR Conflicts) | |
3652 | (Unresolved SR Conflicts): Adjust. | |
3653 | * tests/regression.at (Web2c Actions): Adjust. | |
3654 | ||
06446ccf AD |
3655 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3656 | ||
3657 | * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/. | |
3658 | Adding #line. | |
3659 | Remove the duplicate `typedefs'. | |
3660 | (RhsNumberType): Fix the declaration and various other typos. | |
3661 | Use __ofile__. | |
3662 | * data/bison.simple: Use __ofile__. | |
3663 | * src/scan-skel.l: Handle __ofile__. | |
3664 | ||
62a3e4f0 AD |
3665 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3666 | ||
3667 | * src/gram.h (item_number_t): New, the type of item numbers in | |
3668 | RITEM. Note that it must be able to code symbol numbers as | |
3669 | positive number, and the negation of rule numbers as negative | |
3670 | numbers. | |
3671 | Adjust all dependencies (pretty many). | |
3672 | * src/reduce.c (rule): Remove this `short *' pointer: use | |
3673 | item_number_t. | |
3674 | * src/system.h (MINSHORT, MAXSHORT): Remove. | |
3675 | Include `limits.h'. | |
3676 | Adjust dependencies to using SHRT_MAX and SHRT_MIN. | |
3677 | (shortcpy): Remove. | |
3678 | (MAXTABLE): Move to... | |
3679 | * src/output.c (MAXTABLE): here. | |
3680 | (prepare_rules): Use output_int_table to output rhs. | |
3681 | * data/bison.simple, data/bison.c++: Adjust. | |
3682 | * tests/torture.at (Big triangle): Move the limit from 254 to | |
3683 | 500. | |
3684 | * tests/regression.at (Web2c Actions): Ajust. | |
3685 | ||
3686 | Trying with bigger grammars shows various phenomena: at 3000 (28Mb | |
3687 | of grammar file) bison is killed by my system, at 2000 (12Mb) bison | |
3688 | passes, but produces negative #line number, once fixed, GCC is | |
3689 | killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of | |
3690 | C), it passes. | |
3691 | * src/state.h (state_h): Code input lines on ints, not shorts. | |
3692 | ||
bb88b0fc AD |
3693 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3694 | ||
3695 | * src/reduce.c (reduce_grammar): First reduce the nonterminals, | |
3696 | and then the grammar. | |
3697 | ||
9a636f47 AD |
3698 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3699 | ||
3700 | * src/system.h: No longer using strndup. | |
3701 | ||
680e8701 AD |
3702 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3703 | ||
3704 | * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New. | |
3705 | * src/output.c (output_table_data): Return the longest number. | |
3706 | (prepare_tokens): Output `token_number_max'). | |
3707 | * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type): | |
3708 | New. | |
3709 | Use them to define yy_token_number_type/TokenNumberType. | |
3710 | Use this type for yytranslate. | |
3711 | * tests/torture.at (Big triangle): Push the limit from 124 to | |
3712 | 253. | |
3713 | * tests/regression.at (Web2c Actions): Adjust. | |
3714 | ||
817e9f41 AD |
3715 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3716 | ||
3717 | * tests/torture.at (Big triangle): New. | |
3718 | (GNU AWK Grammar, GNU Cim Grammar): Move to... | |
3719 | * tests/existing.at: here. | |
3720 | ||
5123689b AD |
3721 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3722 | ||
3723 | * src/gram.h, src/gram.c (nitems): Remove, it is an alias of | |
3724 | nritems. | |
3725 | Adjust dependencies. | |
3726 | ||
f3849179 AD |
3727 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3728 | ||
3729 | * src/reader.c: Normalize increments to prefix form. | |
3730 | ||
bd02036a AD |
3731 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3732 | ||
3733 | * src/reader.c, symtab.c: Remove debugging code. | |
3734 | ||
db8837cb AD |
3735 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3736 | ||
3737 | Rename all the `bucket's as `symbol_t'. | |
3738 | ||
3739 | * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c, | |
3740 | * src/reader.c, src/reader.h, src/reduce.c, src/state.h, | |
3741 | * src/symtab.c, src/symtab.h (bucket): Rename as... | |
3742 | (symbol_t): this. | |
3743 | (symbol_list_new, bucket_check_defined, bucket_make_alias) | |
3744 | (bucket_check_alias_consistence, bucket_pack, bucket_translation) | |
3745 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
3746 | (buckets_new, buckets_free, buckets_do): Rename as... | |
3747 | (symbol_list_new, symbol_check_defined, symbol_make_alias) | |
3748 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
3749 | (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t) | |
3750 | (symbols_new, symbols_free, symbols_do): these. | |
3751 | ||
72a23c97 AD |
3752 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3753 | ||
3754 | Use lib/hash for the symbol table. | |
3755 | ||
3756 | * src/gram.c (ntokens): Initialize to 1, to reserve a slot for | |
3757 | EOF. | |
3758 | * src/lex.c (lex): Set the `number' member of new terminals. | |
3759 | * src/reader.c (bucket_check_defined, bucket_make_alias) | |
3760 | (bucket_check_alias_consistence, bucket_translation): New. | |
3761 | (reader, grammar_free, readgram, token_translations_init) | |
3762 | (packsymbols): Adjust. | |
3763 | (reader): Number the predefined tokens. | |
3764 | * src/reduce.c (inaccessable_symbols): Just use hard coded numbers | |
3765 | for predefined tokens. | |
3766 | * src/symtab.h (bucket): Remove all the hash table related | |
3767 | members. | |
3768 | * src/symtab.c (symtab): Replace by... | |
3769 | (bucket_table): this. | |
3770 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
3771 | (buckets_new, buckets_do): New. | |
3772 | ||
280a38c3 AD |
3773 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3774 | ||
3775 | * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems) | |
3776 | (start_symbol, max_user_token_number, semantic_parser) | |
3777 | (error_token_number): Initialize. | |
3778 | * src/reader.c (grammar, start_flag, startval, typed, lastprec): | |
3779 | Initialize. | |
3780 | (reader): Don't. | |
3781 | (errtoken, eoftoken, undeftoken, axiom): Extern. | |
3782 | ||
03b31c0c AD |
3783 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3784 | ||
3785 | * src/gram.h (rule_s): prec and precsym are now pointers | |
3786 | to the bucket giving the priority/associativity. | |
3787 | Member `associativity' removed: useless. | |
3788 | * src/reduce.c, src/conflicts.c: Adjust. | |
3789 | ||
8b3df748 AD |
3790 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3791 | ||
3792 | * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c: | |
3793 | Properly escape the symbols' TAG when outputting them. | |
3794 | ||
e601aa1d AD |
3795 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3796 | ||
3797 | * src/lalr.h (LA): Is a bitsetv, not bitset*. | |
3798 | ||
b0299a2e AD |
3799 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3800 | ||
3801 | * src/lalr.h, src/lalr.c (LAruleno): Replace with... | |
3802 | (LArule): this, which is an array to rule_t*. | |
3803 | * src/print.c, src/conflicts.c: Adjust. | |
3804 | ||
d7e1f00c AD |
3805 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3806 | ||
3807 | * src/gram.h (rule_t): Rename `number' as `user_number'. | |
3808 | `number' is a new member. | |
3809 | Adjust dependencies. | |
3810 | * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number. | |
3811 | ||
cc9305dd AD |
3812 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3813 | ||
3814 | As a result of the previous patch, it is no longer needed | |
3815 | to reorder ritem itself. | |
3816 | ||
3817 | * src/reduce.c (reduce_grammar_tables): Don't sort RITEM. | |
3818 | ||
b0940840 AD |
3819 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3820 | ||
3821 | Be sure never to walk through RITEMS, but use only data related to | |
3822 | the rules themselves. RITEMS should be banished. | |
3823 | ||
3824 | * src/output.c (output_token_translations): Rename as... | |
3825 | (prepare_tokens): this. | |
3826 | In addition to `translate', prepare the muscles `tname' and | |
3827 | `toknum', which were handled by... | |
3828 | (output_rule_data): this. | |
3829 | Remove, and move the remainder of its outputs into... | |
3830 | (prepare_rules): this new routines, which also merges content from | |
3831 | (output_gram): this. | |
3832 | (prepare_rules): Be sure never to walk through RITEMS. | |
3833 | (output_stos): Rename as... | |
3834 | (prepare_stos): this. | |
3835 | (output): Always invoke prepare_states, after all, just don't use it | |
3836 | in the output if you don't need it. | |
3837 | ||
643a5994 AD |
3838 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3839 | ||
3840 | * src/LR0.c (new_state): Display `nstates' as the name of the | |
3841 | newly created state. | |
3842 | Adjust to initialize first_state and last_state if needed. | |
3843 | Be sure to distinguish the initial from the final state. | |
3844 | (new_states): Create the itemset of the initial state, and use | |
3845 | new_state. | |
3846 | * src/closure.c (closure): Now that the initial state has its | |
3847 | items properly set, there is no need for a special case when | |
3848 | creating `ruleset'. | |
3849 | ||
3850 | As a result, now the rule 0, reducing to $axiom, is visible in the | |
3851 | outputs. Adjust the test suite. | |
3852 | ||
3853 | * tests/conflicts.at (Solved SR Conflicts) | |
3854 | (Unresolved SR Conflicts): Adjust. | |
3855 | * tests/regression.at (Web2c Report, Rule Line Numbers): Idem. | |
3856 | * tests/conflicts.at (S/R in initial): New. | |
3857 | ||
b4c4ccc2 AD |
3858 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3859 | ||
3860 | * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over | |
3861 | the RHS of the rules. | |
3862 | * src/output.c (output_gram): Likewise. | |
3863 | ||
bba97eb2 AD |
3864 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3865 | ||
3866 | * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's | |
3867 | bucket. | |
3868 | Adjust all dependencies. | |
3869 | * src/reduce.c (nonterminals_reduce): Don't forget to renumber the | |
3870 | `number' of the buckets too. | |
3871 | * src/gram.h: Include `symtab.h'. | |
3872 | (associativity): Move to... | |
3873 | * src/symtab.h: here. | |
3874 | No longer include `gram.h'. | |
3875 | ||
c3b407f4 AD |
3876 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3877 | ||
3878 | * src/gram.h, src/gram.c (rules_rhs_length): New. | |
3879 | (ritem_longest_rhs): Use it. | |
3880 | * src/gram.h (rule_t): `number' is a new member. | |
3881 | * src/reader.c (packgram): Set it. | |
3882 | * src/reduce.c (reduce_grammar_tables): Move the useless rules at | |
3883 | the end of `rules', and count them out of `nrules'. | |
3884 | (reduce_output, dump_grammar): Adjust. | |
3885 | * src/print.c (print_grammar): It is no longer needed to check for | |
3886 | the usefulness of a rule, as useless rules are beyond `nrules + 1'. | |
3887 | * tests/reduce.at (Reduced Automaton): New test. | |
3888 | ||
11652ab3 AD |
3889 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3890 | ||
3891 | * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a | |
3892 | lacking `+ 1' to nrules, Bison reported as useless a token if it | |
3893 | was used solely to set the precedence of the last rule... | |
3894 | ||
26b23c1a AD |
3895 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3896 | ||
3897 | * data/bison.c++, data/bison.simple: Don't output the current file | |
3898 | name in #line, to avoid useless diffs between two identical | |
3899 | outputs under different names. | |
3900 | ||
18bcecb0 AD |
3901 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3902 | ||
3903 | * src/closure.c, src/print.c, src/reader.c, src/reduce.c: | |
3904 | Normalize loops to using `< nrules + 1', not `<= nrules'. | |
3905 | ||
fa770c86 AD |
3906 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3907 | ||
3908 | * TODO: Update. | |
3909 | ||
d9b739c3 AD |
3910 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3911 | ||
3912 | * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename | |
3913 | bucket.value as bucket.number. | |
3914 | ||
99013900 AD |
3915 | 2002-04-07 Akim Demaille <akim@epita.fr> |
3916 | ||
3917 | * src/closure.c, src/derives.c, src/gram.h, src/lalr.c, | |
3918 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
3919 | * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the | |
3920 | RHS, instead of being an index in RITEMS. | |
3921 | ||
e966383b PE |
3922 | 2002-04-04 Paul Eggert <eggert@twinsun.com> |
3923 | ||
3924 | * doc/bison.texinfo: Update copyright date. | |
3925 | (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII. | |
3926 | (Symbols): Warn about running Bison in one character set, | |
3927 | but compiling and/or running in an incompatible one. | |
3928 | Warn about character code 256, too. | |
3929 | ||
3930 | 2002-04-03 Paul Eggert <eggert@twinsun.com> | |
3931 | ||
3932 | * src/bison.data (YYSTACK_ALLOC): Depend on whether | |
3933 | YYERROR_VERBOSE is nonzero, not whether it is defined. | |
3934 | ||
3935 | Merge changes from bison-1_29-branch. | |
c307773e | 3936 | |
8d6c48b9 PE |
3937 | 2002-03-20 Paul Eggert <eggert@twinsun.com> |
3938 | ||
3939 | Merge fixes from Debian bison_1.34-1.diff. | |
3940 | ||
3941 | * configure.in (AC_PREREQ): 2.53. | |
3942 | ||
e53c6322 AD |
3943 | 2002-03-20 Akim Demaille <akim@epita.fr> |
3944 | ||
3945 | * src/conflicts.c (log_resolution): Argument `resolution' is const. | |
3946 | ||
9ffbeca7 PE |
3947 | 2002-03-19 Paul Eggert <eggert@twinsun.com> |
3948 | ||
21db0b2a PE |
3949 | * src/bison.simple (YYCOPY): New macro. |
3950 | (YYSTACK_RELOCATE): Use it. | |
3951 | Remove Type arg; no longer needed. All callers changed. | |
3952 | (yymemcpy): Remove; no longer needed. | |
3953 | ||
9ffbeca7 PE |
3954 | * Makefile.am (AUTOMAKE_OPTIONS): 1.6. |
3955 | * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
3956 | ||
642cb8f8 AD |
3957 | 2002-03-19 Akim Demaille <akim@epita.fr> |
3958 | ||
3959 | Test and fix the #line outputs. | |
3960 | ||
3961 | * tests/atlocal.at (GCC): New. | |
3962 | * tests/synclines.at (AT_TEST_SYNCLINE): New macro. | |
3963 | (Prologue synch line, ,%union synch line, Postprologue synch line) | |
3964 | (Action synch line, Epilogue synch line): New tests. | |
3965 | * src/reader.c (parse_union_decl): Define the muscle stype_line. | |
3966 | * data/bison.simple, data/bison.c++: Use it. | |
3967 | ||
3c31a486 AD |
3968 | 2002-03-19 Akim Demaille <akim@epita.fr> |
3969 | ||
3970 | * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts) | |
3971 | (Solved SR Conflicts, %expect not enough, %expect right) | |
3972 | (%expect too much): Move to... | |
3973 | * tests/conflicts.at: this new file. | |
3974 | ||
0d8bed56 AD |
3975 | 2002-03-19 Akim Demaille <akim@epita.fr> |
3976 | ||
3977 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
3978 | * data/bison.simple, data/bison.c++: Handle the `#define' part, so | |
3979 | that we can move to enums for instance. | |
3980 | * src/output.c (token_definitions_output): Output a list of | |
3981 | `token-name, token-number' instead of the #define. | |
3982 | (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'. | |
3983 | ||
9208d17f AD |
3984 | 2002-03-14 Akim Demaille <akim@epita.fr> |
3985 | ||
3986 | Use Gettext 0.11.1. | |
3987 | ||
af27eacb RA |
3988 | 2002-03-09 Robert Anisko <robert@lrde.epita.fr> |
3989 | ||
3990 | * data/bison.c++: Make the user able to add members to the generated | |
3991 | parser by subclassing. | |
3992 | ||
9101a310 RA |
3993 | 2002-03-05 Robert Anisko <robert@lrde.epita.fr> |
3994 | ||
3995 | * src/reader.c (read_additionnal_code): `c' should be an integer, not | |
3996 | a character. | |
3997 | Reported by Nicolas Tisserand and Nicolas Burrus. | |
3998 | ||
fff9bf0b RA |
3999 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
4000 | ||
4001 | * src/reader.c: Warn about lacking semi-colons, do not complain. | |
4002 | ||
64dba31e RA |
4003 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
4004 | ||
4005 | * data/bison.c++: Remove a debug line. | |
4006 | ||
374f5a14 RA |
4007 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
4008 | ||
4009 | * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge | |
4010 | location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and | |
4011 | provide a default implementation. | |
4012 | ||
bfcf1f3a AD |
4013 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4014 | ||
4015 | * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'. | |
4016 | * tests/output.at (AT_CHECK_OUTPUT): Likewise. | |
4017 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto. | |
4018 | * tests/semantic.at (Parsing Guards): Similarly. | |
4019 | * src/reader.at (readgram): Complain if the last rule is not ended | |
4020 | with a semi-colon. | |
4021 | ||
65ccf9fc AD |
4022 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4023 | ||
4024 | * src/warshall.h, src/warshall.c (bitmatrix_print): Move to... | |
4025 | * src/closure.c: here. | |
4026 | (set_firsts): Use bitsetv_reflexive_transitive_closure instead of | |
4027 | RTC. | |
4028 | * src/warshall.h, src/warshall.c: Remove. | |
4029 | * tests/sets.at (Broken Closure): Adjust. | |
4030 | ||
d0039cbc AD |
4031 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4032 | ||
4033 | * src/output.c (output_skeleton): tempdir is const. | |
4034 | bytes_read is unused. | |
4035 | ||
345cea78 AD |
4036 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4037 | ||
4038 | * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
4039 | * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c: | |
4040 | Update. | |
4041 | From Michael Hayes. | |
4042 | ||
564801f7 AD |
4043 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4044 | ||
4045 | * src/closure.c (closure): `r' is unused. | |
4046 | ||
e5352bc7 AD |
4047 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4048 | ||
4049 | * tests/sets.at (Broken Closure): Add the ending `;'. | |
4050 | * src/reader.at (readgram): Complain if a rule is not ended with a | |
4051 | semi-colon. | |
4052 | ||
914feea9 AD |
4053 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4054 | ||
4055 | * src/conflicts.c (set_conflicts): Use bitset_disjoint_p. | |
4056 | (count_sr_conflicts): Use bitset_count. | |
4057 | * src/reduce.c (inaccessable_symbols): Ditto. | |
4058 | (bits_size): Remove. | |
4059 | * src/warshall.h, src/warshall.c: Convert to bitsetv. | |
4060 | ||
f0250de6 AD |
4061 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4062 | ||
4063 | * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c, | |
4064 | * src/reduce.c: Remove the `bitset_zero's following the | |
4065 | `bitset_create's, as now it is performed by the latter. | |
4066 | ||
ef017502 AD |
4067 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4068 | ||
4069 | * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h, | |
4070 | * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h, | |
4071 | * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the | |
4072 | latest sources from Michael. | |
4073 | ||
76514394 AD |
4074 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4075 | ||
4076 | * src/output.c (output): Don't free the grammar. | |
4077 | * src/reader.c (grammar_free): New. | |
4078 | * src/main.c (main): Call it and don't free symtab here. | |
4079 | ||
55024580 AD |
4080 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4081 | ||
4082 | * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer | |
4083 | before returning. | |
4084 | Reported by Benoit Perrot. | |
4085 | ||
f9abaa2c AD |
4086 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4087 | ||
4088 | Use bitset operations when possible, not loops over bits. | |
4089 | ||
4090 | * src/conflicts.c (set_conflicts, count_sr_conflicts): Use | |
4091 | bitset_or. | |
4092 | * src/print.c (print_reductions): Use bitset_and, bitset_andn. | |
4093 | * src/reduce.c (useless_nonterminals): Formatting changes. | |
4094 | * src/warshall.c (TC): Use bitset_or. | |
4095 | ||
0e721e75 AD |
4096 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4097 | ||
4098 | * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused. | |
4099 | * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET): | |
4100 | Ditto. | |
4101 | ||
0fb1ffb1 AD |
4102 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4103 | ||
4104 | * src/lalr.c (F): Now a bitset*. | |
4105 | Adjust all dependencies. | |
4106 | ||
b86796bf AD |
4107 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4108 | ||
4109 | * src/conflicts.c (shiftset, lookaheadset): Now bitset. | |
4110 | Adjust all dependencies. | |
4111 | ||
602bbf31 AD |
4112 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4113 | ||
4114 | * src/L0.c, src/LR0.h (nstates): Be size_t. | |
4115 | Adjust comparisons (signed vs unsigned). | |
4116 | * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a | |
4117 | bitset*. | |
4118 | Adjust all dependencies. | |
4119 | ||
d8a0245c AD |
4120 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4121 | ||
4122 | * src/closure.c (firsts): Now, also a bitset. | |
4123 | Adjust all dependencies. | |
4124 | (varsetsize): Remove, now unused. | |
4125 | * src/warshall.h, src/warshall.c: Now work on arrays of bitsets. | |
4126 | ||
34ba9743 AD |
4127 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4128 | ||
4129 | * src/print.c: Convert to use bitset.h, not hand coded iterations | |
4130 | over ints. | |
4131 | ||
ed86e78c AD |
4132 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4133 | ||
4134 | * src/reduce.c: Convert to use bitset.h, not hand coded BSet. | |
4135 | ||
dfdb1797 AD |
4136 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4137 | ||
4138 | * src/closure.c (ruleset): Be a bitset. | |
4139 | (rulesetsize): Remove. | |
4140 | ||
7086e707 AD |
4141 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4142 | ||
4143 | * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
4144 | * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, | |
4145 | * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New. | |
4146 | * src/closure.c (fderives): Be an array of bitsets. | |
4147 | ||
98254360 RA |
4148 | 2002-02-28 Robert Anisko <robert@lrde.epita.fr> |
4149 | ||
4150 | * data/bison.c++: Merge the two generated headers. Insert a copyright | |
4151 | notice in each output file. | |
4152 | ||
a75c057f AD |
4153 | 2002-02-28 Akim Demaille <akim@epita.fr> |
4154 | ||
4155 | * data/bison.c++: Copy the prologue of bison.simple to fetch | |
4156 | useful M4 definitions, such as b4_header_guard. | |
4157 | ||
06b00abc AD |
4158 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4159 | ||
4160 | * src/getargs.c (version): Give the name of the authors, and use a | |
a75c057f AD |
4161 | translator friendly scheme for the bgr |
4162 | copyright notice. | |
06b00abc | 4163 | |
70e7d534 AD |
4164 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4165 | ||
4166 | * src/output.c (header_output): Remove, now handled completely via | |
4167 | M4. | |
4168 | ||
abe017f6 AD |
4169 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4170 | ||
4171 | * m4/m4.m4: New, from CVS Autoconf. | |
4172 | * configure.in: Invoke it. | |
4173 | * src/output.c (output_skeleton): Use its result instead of the | |
4174 | hard coded name. | |
4175 | ||
381fb12e AD |
4176 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4177 | ||
4178 | * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from | |
4179 | Fileutils 4.1.5. | |
4180 | * configure.in: Invoke UTILS_FUNC_MKSTEMP. | |
4181 | * src/output.c (output_skeleton): Use mkstemp to create a real | |
4182 | temporary file. | |
4183 | Move the filling of `skeleton' and its muscle to... | |
4184 | (prepare): here. | |
4185 | (output): Move the definition of the prologue muscle to... | |
4186 | (prepare): here. | |
4187 | * src/system.h (DEFAULT_TMPDIR): New. | |
4188 | ||
6f38107f PE |
4189 | 2002-02-14 Paul Eggert <eggert@twinsun.com> |
4190 | ||
4191 | Remove the support for C++ namespace cleanliness; it was | |
4192 | causing more problems than it was curing, since it didn't work | |
4193 | properly on some nonstandard C++ compilers. This can wait | |
4194 | for a proper C++ parser. | |
4195 | ||
4196 | * NEWS: Document this. | |
4197 | * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention | |
4198 | of C++, as it's treated like C now. | |
4199 | * src/bison.simple (YYSTD): Remove. | |
4200 | (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL): | |
4201 | Treat C++ just like Standard C instead of trying to support | |
4202 | namespace cleanliness. | |
4203 | ||
80cce3da AD |
4204 | 2002-02-14 Akim Demaille <akim@epita.fr> |
4205 | ||
4206 | * tests/regression.at (else): Adjust to Andreas' change. | |
4207 | ||
842e8679 AD |
4208 | 2002-02-14 Akim Demaille <akim@epita.fr> |
4209 | ||
4210 | * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. | |
4211 | ||
4bda3f10 AD |
4212 | 2002-02-13 Andreas Schwab <schwab@suse.de> |
4213 | ||
4214 | * src/output.c (output_rule_data): Don't output NULL, it might | |
4215 | not be defined yet. | |
4216 | ||
4162fa07 | 4217 | 2002-02-11 Robert Anisko <robert@lrde.epita.fr> |
b418ecd8 | 4218 | |
4162fa07 RA |
4219 | * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue. |
4220 | (Copyright notice): Update. | |
b418ecd8 | 4221 | |
bd16a5dc AD |
4222 | 2002-02-11 Akim Demaille <akim@epita.fr> |
4223 | ||
4224 | * tests/regression.at (%nonassoc and eof): Don't include | |
4225 | nonportable headers. | |
4226 | ||
8d69a1a3 RA |
4227 | 2002-02-08 Robert Anisko <robert@lrde.epita.fr> |
4228 | ||
4229 | * data/bison.c++: Correct error recovery. Make the user able to | |
4230 | initialize the starting location. | |
4231 | ||
9b2d0677 AD |
4232 | 2002-02-07 Akim Demaille <akim@epita.fr> |
4233 | ||
4234 | * tests/input.at: New. | |
4235 | ||
69e2658b RA |
4236 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4237 | ||
4238 | * data/bison.c++: Replace some direct m4 expansions by constants. Be | |
9b2d0677 | 4239 | more consistent when naming methods and variables. Put preprocessor |
69e2658b RA |
4240 | directives around tables only needed for debugging. |
4241 | ||
4aacc3a7 RA |
4242 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4243 | ||
4244 | * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in | |
4245 | C++ parsers. | |
4246 | (yy::b4_name::parse): Use print_. | |
4247 | ||
762a801e RA |
4248 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4249 | ||
4250 | * data/bison.c++ (yy::b4_name::parse): Error recovery is back. | |
4251 | ||
4bb2bc3f RA |
4252 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4253 | ||
4254 | * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in | |
4255 | C++ parsers. | |
4256 | (yy::b4_name::parse): Build verbose error messages, and use error_. | |
4257 | ||
6b45a3ca RA |
4258 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
4259 | ||
4260 | * data/bison.c++: Fix m4 quoting in comments. | |
4261 | ||
50997c6e RA |
4262 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
4263 | ||
4264 | * data/bison.c++: Adjust the parser code. Fix some muscles that were | |
4265 | not expanded by m4. | |
4266 | ||
3f3eed27 AD |
4267 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4268 | ||
4269 | * data/bison.c++: Adjust to the M4 back end. | |
4270 | More is certainly needed. | |
4271 | ||
be2a1a68 AD |
4272 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4273 | ||
4274 | Give a try to M4 as a back end. | |
4275 | ||
4276 | * lib/readpipe.c: New, from wdiff. | |
4277 | * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and | |
4278 | BISON_HAIRY. | |
4279 | * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS | |
4280 | specific values. Now it is m4 that performs the lookup. | |
4281 | * src/parse-skel.y: Remove. | |
4282 | * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New. | |
4283 | * src/output.c (actions_output, guards_output) | |
4284 | (token_definitions_output): No longer keeps track of the output | |
4285 | line number, hence remove the second argument. | |
4286 | (guards_output): Check against the guard member of a rule, not the | |
4287 | action member. | |
4288 | Adjust callers. | |
4289 | (output_skeleton): Don't look for the skeleton location, let m4 do | |
4290 | that. | |
4291 | Create `/tmp/muscles.m4'. This is temporary, a proper temporary | |
4292 | file will be used. | |
4293 | Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton. | |
4294 | (prepare): Given that for the time being changesyntax is not | |
4295 | usable in M4, rename the muscles using `-' to `_'. | |
4296 | Define `defines_flag', `output_parser_name' and `output_header_name'. | |
4297 | * src/output.h (actions_output, guards_output) | |
4298 | (token_definitions_output): Adjust prototypes. | |
4299 | * src/scan-skel.l: Instead of scanning the skeletons, it now | |
4300 | processes the output of m4: `__oline__' and `#output'. | |
4301 | * data/bison.simple: Adjust to be used by M4(sugar). | |
4302 | * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up | |
4303 | to date. | |
4304 | * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR' | |
4305 | instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'. | |
4306 | * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New, | |
4307 | shamelessly stolen from CVS Autoconf. | |
4308 | ||
beda758b AD |
4309 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4310 | ||
4311 | * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version. | |
4312 | * configure.in: Check for the declarations of free and malloc. | |
4313 | * src/muscle_tab.c: Adjust. | |
4314 | ||
5ece6d43 AD |
4315 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4316 | ||
4317 | * src/muscle_tab.c (muscle_init): Don't default to NULL muscle | |
4318 | which have no values. | |
4319 | ||
5bb18f9a AD |
4320 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4321 | ||
4322 | * src/bison.simple, src/bison.hairy, src/bison.c++: Move to... | |
4323 | * data/: here. | |
4324 | ||
894dd62e PE |
4325 | 2002-01-29 Paul Eggert <eggert@twinsun.com> |
4326 | ||
4327 | * src/bison.simple (YYSIZE_T): Do not define merely because | |
4328 | YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined. | |
4329 | On some platforms, <alloca.h> does not declare YYSTD (size_t). | |
4330 | ||
82841af7 AD |
4331 | 2002-01-27 Akim Demaille <akim@epita.fr> |
4332 | ||
4333 | Fix `%nonassoc and eof'. | |
4334 | ||
4335 | * src/state.c (errs_dup): Aaaah! The failure was due to bytes | |
4336 | which were not properly copied! Replace | |
4337 | memcpy (res->errs, src->errs, src->nerrs); | |
4338 | with | |
4339 | memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); | |
4340 | !!! | |
4341 | * tests/regression.at (%nonassoc and eof): Adjust to newest | |
4342 | Autotest: `.' is not in the PATH. | |
4343 | ||
318b76e9 AD |
4344 | 2002-01-27 Akim Demaille <akim@epita.fr> |
4345 | ||
4346 | * tests/sets.at (AT_EXTRACT_SETS): New. | |
4347 | (Nullable): Use it. | |
4348 | (Firsts): New. | |
4349 | ||
30d2f3d5 AD |
4350 | 2002-01-26 Akim Demaille <akim@epita.fr> |
4351 | ||
4352 | * tests/actions.at, tests/calc.at, tests/headers.at, | |
4353 | * tests/torture.at: Adjust to the newest Autotest which no longer | |
4354 | forces `.' in the PATH. | |
4355 | ||
30f8c395 AD |
4356 | 2002-01-25 Akim Demaille <akim@epita.fr> |
4357 | ||
4358 | * tests/regression.at (%nonassoc and eof): New. | |
4359 | Suggested by Robert Anisko. | |
4360 | ||
29ae55f1 AD |
4361 | 2002-01-24 Akim Demaille <akim@epita.fr> |
4362 | ||
4363 | Bison dumps core when trying to complain about broken input files. | |
4364 | Reported by Cris van Pelt. | |
4365 | ||
4366 | * src/lex.c (parse_percent_token): Be sure to set token_buffer. | |
4367 | * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge | |
4368 | into... | |
4369 | (Invalid inputs): Strengthen: exercise parse_percent_token. | |
4370 | ||
2b548aa6 RA |
4371 | 2002-01-24 Robert Anisko <robert.anisko@epita.fr> |
4372 | ||
4373 | * src/Makefile.am: Add bison.c++. | |
4374 | * src/bison.c++: New skeleton. | |
4375 | ||
bb0146c2 AD |
4376 | 2002-01-21 Paolo Bonzini <bonzini@gnu.org> |
4377 | ||
4378 | * po/it.po: New. | |
4379 | ||
bec30531 AD |
4380 | 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net> |
4381 | ||
4382 | * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. | |
4383 | ||
fc6edc45 MA |
4384 | 2002-01-20 Marc Autret <marc@gnu.org> |
4385 | ||
4386 | * src/files.c (compute_output_file_names): Fix | |
4387 | ||
5e5d5415 MA |
4388 | 2002-01-20 Marc Autret <marc@gnu.org> |
4389 | ||
4390 | * tests/output.at: New test. | |
4391 | * src/files.c (compute_base_names): Don't map extensions when | |
4392 | the YACC flag is set, use defaults. | |
4393 | Reported by Evgeny Stambulchik. | |
4394 | ||
44ea3fbd MA |
4395 | 2002-01-20 Marc Autret <marc@gnu.org> |
4396 | ||
bb0146c2 | 4397 | * src/system.h: Need to define __attribute__ away for non-GCC |
44ea3fbd MA |
4398 | compilers as well (i.e. the vendor C compiler). |
4399 | Suggested by Albert Chin-A-Young. | |
4400 | ||
338963d1 TVH |
4401 | 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be> |
4402 | ||
4403 | * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the | |
4404 | canonical definition. | |
4405 | * src/system.h: Use the canonical definition for PARAMS (avoids | |
4406 | a conflict with the macro from lib/hash.h). | |
4407 | ||
c57b2479 AD |
4408 | 2002-01-11 Akim Demaille <akim@epita.fr> |
4409 | ||
4410 | * configure.in: Use AC_FUNC_STRNLEN. | |
d9e9746c | 4411 | Fixes the failures observed on AIX 4.3 by H.Merijn Brand. |
c57b2479 | 4412 | |
b85810ae AD |
4413 | 2002-01-09 Akim Demaille <akim@epita.fr> |
4414 | ||
4415 | * src/files.c, src/files.h (output_infix): New. | |
4416 | (tab_extension): Remove. | |
4417 | (compute_base_names): Compute the former, drop the latter. | |
4418 | * src/output.c (prepare): Insert the muscles `output-infix', and | |
4419 | `output-suffix'. | |
4420 | * src/parse-skel.y (string, string.1): New. | |
4421 | (section.header): Use it. | |
4422 | (section.yacc): Remove. | |
4423 | (prefix): Remove too. | |
4424 | * src/scan-skel.l: Adjust. | |
4425 | * src/bison.simple, src/bison.hairy: Adjust. | |
4426 | ||
cae60122 AD |
4427 | 2002-01-09 Akim Demaille <akim@epita.fr> |
4428 | ||
4429 | * configure.in (WERROR_CFLAGS): Compute it. | |
4430 | * src/Makefile.am (CFLAGS): Pass it. | |
4431 | * tests/atlocal.in (CFLAGS): Idem. | |
4432 | * src/files.c: Fix a few warnings. | |
4433 | (get_extension_index): Remove, unused. | |
4434 | ||
ae404801 AD |
4435 | 2002-01-08 Akim Demaille <akim@epita.fr> |
4436 | ||
4437 | * src/getargs.c (AS_FILE_NAME): New. | |
4438 | (getargs): Use it to convert DOSish file names. | |
4439 | * src/files.c (base_name): Rename as full_base_name to avoid | |
4440 | clashes with `base_name ()'. | |
4441 | (filename_split): New. | |
4442 | (compute_base_names): N-th rewrite, using filename_split. | |
4443 | ||
22312b71 AD |
4444 | 2002-01-08 Akim Demaille <akim@epita.fr> |
4445 | ||
4446 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
4447 | New, stolen from the Fileutils 4.1. | |
4448 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
4449 | * configure.in: Check for the presence of memrchr, and of its | |
4450 | prototype. | |
4451 | ||
a67cef01 TVH |
4452 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> |
4453 | ||
4454 | * lib/hash.h (__P): Added definition for this macro. | |
4455 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
4456 | BUILT_SOURCES, to ensure they are generated first. | |
4457 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
4458 | %error-verbose to allow bootstrapping with bison 1.30x. | |
4459 | ||
2b25d624 AD |
4460 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4461 | ||
4462 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
4463 | convention is to fetch on entry. | |
4464 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
4465 | 'switch' without a following semicolon. | |
4466 | * tests/regression.at (braces parsing): New. | |
4467 | ||
3460813b AD |
4468 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4469 | ||
4470 | Bison is dead wrong in its RR conflict reports. | |
4471 | ||
4472 | * tests/torture.at (GNU Cim Grammar): New. | |
4473 | * src/conflicts.c (count_rr_conflicts): Fix. | |
4474 | ||
73784c64 AD |
4475 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4476 | ||
4477 | Creating package.m4 from configure.ac causes too many problems. | |
4478 | ||
4479 | * tests/Makefile.am (package.m4): Create it by hand, | |
4480 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
4481 | ||
25d81090 AD |
4482 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4483 | ||
4484 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
4485 | skeleton.h. | |
4486 | ||
a9b8959e PE |
4487 | 2002-01-04 Paul Eggert <eggert@twinsun.com> |
4488 | ||
4489 | * doc/bison.texinfo (Debugging): | |
4490 | Remove YYSTDERR; it's no longer defined or used. | |
4491 | Also, s/cstdio.h/cstdio/. | |
4492 | ||
25d81090 AD |
4493 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4494 | ||
4495 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
4496 | ||
1109455c AD |
4497 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4498 | ||
4499 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
4500 | tracing code to --trace, wait for a better --trace option, with | |
4501 | args. | |
4502 | ||
7ea5e977 AD |
4503 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4504 | ||
4505 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
4506 | The ISO C++ standard is extremely clear about it: stderr is | |
4507 | considered a macro, not a regular symbol (see table 94 `Header | |
4508 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
4509 | Therefore std:: does not apply to it. It still does with fprintf. | |
4510 | Also, s/cstdio.h/cstdio/. | |
4511 | ||
fab5b110 AD |
4512 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4513 | ||
4514 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
4515 | for non system headers. | |
4516 | ||
aed7fd9b AD |
4517 | 2002-01-02 Akim Demaille <akim@epita.fr> |
4518 | ||
4519 | Equip the skeleton chain with location tracking, runtime trace, | |
4520 | pure parser and scanner. | |
4521 | ||
4522 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
4523 | renaming. | |
4524 | (%union): Having several members with the same type does not help | |
4525 | type mismatches, simplify. | |
4526 | (YYPRINT, yyprint): New. | |
4527 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
4528 | (skel_error): this. | |
4529 | Handle locations. | |
4530 | * src/scan-skel.l: Adjust to these changes. | |
4531 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
4532 | (LOCATION_PRINT, skel_control_t): New. | |
4533 | ||
24fad99e AD |
4534 | 2001-12-30 Akim Demaille <akim@epita.fr> |
4535 | ||
4536 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
4537 | replace `gb' with BLANKS. | |
4538 | * src/scan-skel.l: Adjust. | |
4539 | ||
a4b36db4 AD |
4540 | 2001-12-30 Akim Demaille <akim@epita.fr> |
4541 | ||
4542 | * src/system.h: We don't need nor want bcopy. | |
4543 | Throw away MS-DOS crap: we don't need getpid. | |
4544 | * configure.in: We don't need strndup. It was even causing | |
4545 | problems: because Flex includes the headers *before* us, | |
4546 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
4547 | not visible. | |
4548 | * lib/xstrndup.c: New. | |
4549 | * src/scan-skel.l: Use it. | |
4550 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
4551 | * src/parse-skel.y: Use %directives instead of #defines. | |
4552 | ||
1239777d AD |
4553 | 2001-12-30 Akim Demaille <akim@epita.fr> |
4554 | ||
4555 | * src/skeleton.h: New. | |
4556 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
4557 | code. | |
4558 | * src/output.h (get_lines_number, actions_output, guards_output) | |
4559 | (token_definitions_output): Prototype them. | |
4560 | * src/parse-skel.y: Add the license notice. | |
4561 | Include output.h and skeleton.h. | |
4562 | (process_skeleton): Returns void, and takes a single parameter. | |
4563 | * src/scan-skel.l: Add the license notice. | |
4564 | Include skeleton.h. | |
4565 | Don't use %option yylineno: it seems that then Flex imagines | |
4566 | REJECT has been used, and therefore it won't reallocate its | |
4567 | buffers (which makes no other sense to me than a bug). It results | |
4568 | in warnings for `unused: yy_flex_realloc'. | |
4569 | ||
9b3add5b RA |
4570 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> |
4571 | ||
4572 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
4573 | (MUSCLE_INSERT_PREFIX): ...to there. | |
4574 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
4575 | (MUSCLE_INSERT_PREFIX): Move from here... | |
4576 | ||
4577 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
4578 | names. This parser skeleton is still broken, but Bison should not | |
4579 | choke on a bad muscle 'syntax'. | |
4580 | * src/bison.simple: Add a section directive. Put braces around muscle | |
4581 | names. | |
4582 | ||
4583 | * src/files.h (strsuffix, stringappend): Add declarations. | |
4584 | (tab_extension): Add declaration. | |
4585 | (short_base_name): Add declaration. | |
4586 | ||
4587 | * src/files.c (strsuffix, stringappend): No longer static. These | |
4588 | functions are used in the skeleton parser. | |
4589 | (tab_extension): New. | |
4590 | (compute_base_names): Use the computations done in this function | |
fab5b110 | 4591 | to guess if the generated parsers should have '.tab' in their |
9b3add5b RA |
4592 | names. |
4593 | (short_base_name): No longer static. | |
4594 | ||
4595 | * src/output.c (output_skeleton): New. | |
4596 | (output): Disable call to output_master_parser, and give a try to | |
4597 | a new skeleton handling system. | |
4598 | (guards_output, actions_output): No longer static. | |
4599 | (token_definitions_output, get_lines_number): No longer static. | |
4600 | ||
4601 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
4602 | ||
fab5b110 | 4603 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and |
9b3add5b RA |
4604 | parse-skel.y. |
4605 | ||
4606 | * src/parse-skel.y: New file. | |
4607 | * src/scan-skel.l: New file. | |
4608 | ||
b5b61c61 AD |
4609 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4610 | ||
4611 | %name-prefix is broken. | |
4612 | ||
4613 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
4614 | Adjust all dependencies. | |
4615 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
4616 | %name-prefix. | |
4617 | ||
4618 | Renaming yylval but not yylloc is not consistent. Now we do. | |
4619 | ||
4620 | * src/bison.simple: Prefix yylloc if used. | |
4621 | * doc/bison.texinfo (Decl Summary): Document that. | |
4622 | ||
8c9a50be AD |
4623 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4624 | ||
4625 | * doc/bison.texinfo: Promote `%long-directive' over | |
4626 | `%long_directive'. | |
4627 | Remove all references to fixed-output-files, yacc is enough. | |
4628 | ||
d99361e6 AD |
4629 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4630 | ||
4631 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
4632 | user prologue. These are defaults. | |
4633 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
4634 | define YYDEBUG and YYERROR_VERBOSE. | |
4635 | ||
b9cecb91 AD |
4636 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4637 | ||
4638 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
4639 | yylloc. | |
4640 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
4641 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
4642 | Move to... | |
4643 | * tests/headers.at: here. | |
4644 | ||
aea13e97 AD |
4645 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4646 | ||
4647 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
4648 | ||
931394cb AD |
4649 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4650 | ||
4651 | * tests/actions.at (Mid-rule actions): Output on a single line | |
4652 | instead of several. | |
4653 | ||
704a47c4 AD |
4654 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4655 | ||
4656 | * doc/bison.texinfo: Formatting changes. | |
4657 | ||
091e20bb AD |
4658 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4659 | ||
4660 | Don't store the token defs in a muscle, just be ready to output it | |
4661 | on command. Now possible via `symbols'. Fixes a memory leak. | |
4662 | ||
4663 | * src/output.c (token_definitions_output): New. | |
4664 | (output_parser, header_output): Use it. | |
4665 | * src/reader.c (symbols_save): Remove. | |
4666 | ||
cce71710 AD |
4667 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4668 | ||
4669 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
4670 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
4671 | default. | |
4672 | ||
82c035a8 AD |
4673 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4674 | ||
4675 | Mid-rule actions are simply... ignored! | |
4676 | ||
4677 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
4678 | the empty-rule associated to the dummy symbol, not to the host | |
4679 | rule. | |
4680 | * tests/actions.at (Mid-rule actions): New. | |
4681 | ||
8419d367 AD |
4682 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4683 | ||
4684 | Memory leak. | |
4685 | ||
4686 | * src/reader.c (reader): Free grammar. | |
4687 | ||
375d5806 AD |
4688 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4689 | ||
4690 | Memory leak. | |
4691 | ||
4692 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
4693 | since it allocates it for each state, although only one is needed. | |
4694 | (allocate_storage): Do it here. | |
4695 | ||
f51cb8ff AD |
4696 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4697 | ||
4698 | * src/options.h, src/options.c (create_long_option_table): Rename | |
4699 | as... | |
4700 | (long_option_table_new): this, with a clearer prototype. | |
4701 | (percent_table): Remove, unused, | |
4702 | * src/getargs.c (getargs): Adjust. | |
4703 | ||
29e88316 AD |
4704 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4705 | ||
4706 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
4707 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
4708 | as states. | |
4709 | ||
b9f71f19 AD |
4710 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4711 | ||
4712 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
4713 | Sorry, I don't understand exactly what it is, no better name... | |
4714 | ||
1a2b5d37 AD |
4715 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4716 | ||
4717 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
4718 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
4719 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
4720 | as rules. | |
4721 | ||
1cca533e AD |
4722 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4723 | ||
4724 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
4725 | ago. | |
4726 | ||
c03ae966 AD |
4727 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4728 | ||
4729 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
4730 | Adjust all users to use symbols[i]->user_token_number. | |
4731 | ||
5a670b1e AD |
4732 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4733 | ||
4734 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
4735 | Adjust all users to use symbols[i]->prec or ->assoc. | |
4736 | ||
ad949da9 AD |
4737 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4738 | ||
4739 | * src/reader.c, src/reader.h (tags): Remove. | |
4740 | Adjust all users to use symbols[i]->tag. | |
4741 | ||
0e78e603 AD |
4742 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4743 | ||
4744 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
4745 | and rule_table. | |
4746 | * src/reader.c (packsymbols): Fill this table. | |
4747 | Drop sprec. | |
4748 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
4749 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
4750 | single table. | |
4751 | Use symbols[i]->tag instead of tags[i]. | |
4752 | ||
213e640e AD |
4753 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4754 | ||
4755 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
4756 | In addition, put a comment in there, to replace... | |
4757 | * tests/regression.at (%union and C comments): Remove. | |
4758 | ||
e7b8bef1 AD |
4759 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4760 | ||
4761 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
4762 | output as expected output. The contents *seem* right to me, but I | |
4763 | can't pretend reading perfectly parser tables... Nonetheless, all | |
4764 | the other tests pass correctly, the table look OK, even though the | |
4765 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
4766 | harmless). | |
4767 | ||
b68e7744 AD |
4768 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4769 | ||
4770 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
4771 | rules read. In other words, add it _after_ having performed | |
4772 | grammar sanity checks. | |
4773 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
4774 | ||
78d5bae9 AD |
4775 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4776 | ||
4777 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
4778 | visible, and some states have now a different number. | |
4779 | ||
ff442794 AD |
4780 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4781 | ||
4782 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
4783 | of the first rule. | |
4784 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
4785 | (Solved SR Conflicts): Adjust rule 0's line number. | |
4786 | ||
610ab194 AD |
4787 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4788 | ||
4789 | Fix the `GAWK Grammar' failure. | |
4790 | ||
4791 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
4792 | the reductions of the first state which was mistakenly confused | |
4793 | with the final state because precisely final_state was initialized | |
4794 | to 0. | |
4795 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
4796 | now noticed by Bison. | |
4797 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
4798 | have a reduction on $default. | |
4799 | ||
29d29c8f AD |
4800 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4801 | ||
4802 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
4803 | rule line numbers. | |
4804 | * src/closure.c (print_closure): Likewise. | |
4805 | * src/derives.c (print_derives): Likewise. | |
4806 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
4807 | now. | |
4808 | ||
7c6b64d0 AD |
4809 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4810 | ||
4811 | * src/lalr.c (lookaheads_print): New. | |
4812 | (lalr): Call it when --trace-flag. | |
4813 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
4814 | are dumped. | |
4815 | ||
3d4daee3 AD |
4816 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4817 | ||
4818 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
4819 | when walking through ritem, even via rule->rhs. | |
4820 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
4821 | (useful_production, useless_nonterminals): Likewise. | |
4822 | (reduce_grammar_tables): Likewise, plus update nritems. | |
4823 | * src/nullable.c (set_nullable): Likewise. | |
4824 | * src/lalr.c (build_relations): Likewise. | |
4825 | * tests/sets.at (Nullable): Adjust. | |
4826 | Fortunately, now, the $axiom is no longer nullable. | |
4827 | ||
9e7f6bbd AD |
4828 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4829 | ||
4830 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
4831 | the 0-sentinel. | |
4832 | * src/gram.c (ritem_longest_rhs): Likewise. | |
4833 | * src/reduce.c (nonterminals_reduce): Likewise. | |
4834 | * src/print_graph.c (print_graph): Likewise. | |
4835 | * src/output.c (output_rule_data): Likewise. | |
4836 | * src/nullable.c (set_nullable): Likewise. | |
4837 | ||
255ef638 AD |
4838 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4839 | ||
4840 | * src/output.c: Comment changes. | |
4841 | ||
0d8a7363 AD |
4842 | 2001-12-27 Paul Eggert <eggert@twinsun.com> |
4843 | ||
4844 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
4845 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
4846 | Sparc, as they were causing more porting problems than the | |
4847 | (minor) performance improvement was worth. | |
4848 | ||
4849 | Also, catch up with 1.31's YYSTD. | |
4850 | ||
3db472b9 AD |
4851 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4852 | ||
4853 | * src/output.c (output_gram): Rely on nritems, not the | |
4854 | 0-sentinel. See below. | |
4855 | Use -1 as separator, not 0. | |
4856 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
4857 | Rely on -1 as separator in yyrhs, instead of 0. | |
4858 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
4859 | twice `Now at end of input', therefore there are two lines less to | |
4860 | expect. | |
4861 | ||
b365aa05 AD |
4862 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4863 | ||
4864 | * tests/regression.at (Unresolved SR Conflicts): | |
4865 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
4866 | below. | |
4867 | ||
30171f79 AD |
4868 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4869 | ||
4870 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
4871 | is reached by eoftoken. | |
4872 | (insert_start_shifting_state, insert_eof_shifting_state) | |
4873 | (insert_accepting_state, augment_automaton): Remove, since now | |
4874 | these states are automatically computed from the initial state. | |
4875 | (generate_states): Adjust. | |
4876 | * src/print.c: When reporting a rule number to the user, substract | |
4877 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
4878 | * src/reduce.c: Likewise. | |
4879 | * src/print_graph.c (print_core): For the time being, just as for | |
4880 | the report, depend upon --trace-flags to dump the full set of | |
4881 | items. | |
4882 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
4883 | 0: `$axiom: START-SYMBOL $'. | |
4884 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
4885 | number of the states has changed (the final state is no longer | |
4886 | necessarily the last), catch up. | |
4887 | ||
75142d45 AD |
4888 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4889 | ||
4890 | Try to make the use of the eoftoken valid. Given that its value | |
4891 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
4892 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
4893 | instead of the 0-sentinel. | |
4894 | ||
4895 | * src/gram.h, src/gram.c (nritems): New. | |
4896 | Expected to be duplication of nitems, but for the time being... | |
4897 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
4898 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
4899 | * src/closure.c (print_closure, print_fderives): Likewise. | |
4900 | * src/gram.c (ritem_print): Likewise. | |
4901 | * src/print.c (print_core, print_grammar): Likewise. | |
4902 | * src/print_graph.c: Likewise. | |
4903 | ||
b7c49edf AD |
4904 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4905 | ||
4906 | * src/main.c (main): If there are complains after grammar | |
4907 | reductions, then output the report anyway if requested, then die. | |
4908 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
4909 | * src/reader.c (eoftoken): New. | |
4910 | (parse_token_decl): If the token being defined has value `0', it | |
4911 | is the eoftoken. | |
4912 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
4913 | Be sure to preserve the value of the eoftoken. | |
4914 | (reader): Make sure eoftoken is defined. | |
4915 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
4916 | * src/print.c (print_grammar): Don't special case the eof token. | |
4917 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
4918 | lie anyway, albeit pleasant. | |
4919 | * tests/calc.at: Exercise error messages with eoftoken. | |
4920 | Change the grammar so that empty input is invalid. | |
4921 | Adjust expectations. | |
4922 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
4923 | ||
ec2da99f AD |
4924 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4925 | ||
4926 | * configure.in: Check the protos of strchr ans strspn. | |
4927 | Replace strchr if needed. | |
4928 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
4929 | missing. | |
4930 | * lib/strchr.c: New. | |
4931 | * src/reader.c (symbols_save): Use strchr. | |
4932 | ||
8adfa272 AD |
4933 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4934 | ||
4935 | * src/print.c, src/print_graph.c (escape): New. | |
4936 | Use it to quote the TAGS outputs. | |
4937 | * src/print_graph.c (print_state): Now errors are in red, and | |
4938 | reductions in green. | |
4939 | Prefer high to wide: output the state number on a line of its own. | |
4940 | ||
80dac38c AD |
4941 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4942 | ||
4943 | * src/state.h, src/state.c (reductions_new): New. | |
4944 | * src/LR0.c (set_state_table): Let all the states have a | |
4945 | `reductions', even if reduced to 0. | |
4946 | (save_reductions): Adjust. | |
4947 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
4948 | * src/print.c (print_reductions, print_actions): Adjust. | |
4949 | * src/output.c (action_row): Adjust. | |
4950 | ||
2cec70b9 AD |
4951 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4952 | ||
4953 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
4954 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
4955 | even if reduced to 0. | |
4956 | * src/print.c (print_errs, print_reductions): Adjust. | |
4957 | * src/output.c (output_actions, action_row): Adjust. | |
4958 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
4959 | ||
13ca549a AD |
4960 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4961 | ||
4962 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
4963 | ||
5092aba5 AD |
4964 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4965 | ||
4966 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
4967 | * src/print.c: here. | |
4968 | (lookaheadset, shiftset): New, used as additional storage by | |
4969 | print_reductions. | |
4970 | (print_results): Adjust. | |
4971 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
4972 | (print_actions): here. | |
4973 | * src/print_graph.c (print_actions): Remove dead code. | |
4974 | ||
11e2beca AD |
4975 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4976 | ||
4977 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
4978 | `$n' and `@n'. | |
4979 | ||
dac3c910 AD |
4980 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4981 | ||
4982 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
4983 | (build_relations): Adjust. | |
4984 | ||
d0b0fefa AD |
4985 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4986 | ||
4987 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
4988 | duplication. | |
4989 | ||
adc8c848 AD |
4990 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4991 | ||
4992 | * src/reader.c (packgram): Catch nitems overflows. | |
4993 | ||
14d293ac AD |
4994 | 2001-12-27 Akim Demaille <akim@epita.fr> |
4995 | ||
4996 | * src/files.c, src/files.h (guard_obstack): Remove. | |
4997 | * src/output.c (output): Adjust. | |
4998 | * src/reader.c (parse_braces): New, factoring... | |
4999 | (copy_action, copy_guard): these two which are renamed as... | |
5000 | (parse_action, parse_guard): these. | |
5001 | As a voluntary consequence, using braces around guards is now | |
5002 | mandatory. | |
5003 | ||
f499b062 AD |
5004 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5005 | ||
5006 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
5007 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
5008 | members. | |
5009 | (symbol_list_new): Adjust. | |
5010 | (copy_action): action_line is the first line, not the last. | |
5011 | (copy_guard): Just as for actions, store the `action' only, not | |
5012 | the switch/case/break flesh. | |
5013 | Don't parse the user action that might follow the guard, let... | |
5014 | (readgram): do it, i.e., now, there can be an action after a | |
5015 | guard. | |
5016 | In other words the guard is just explicitly optional. | |
5017 | (packgram): Adjust. | |
5018 | * src/output.c (guards_output): New. | |
5019 | (output_parser): Call it when needed. | |
5020 | (output): Also free the guard and attrs obstacks. | |
5021 | * src/files.c, src/files.h (obstack_save): Remove. | |
5022 | (output_files): Remove. | |
5023 | As a result, if one needs the former `.act' file, using an | |
5024 | appropriate skeleton which requires actions and guards is now | |
5025 | required. | |
5026 | * src/main.c (main): Adjust. | |
5027 | * tests/semantic.at: New. | |
5028 | * tests/regression.at: Use `input.y' as input file name. | |
5029 | Avoid 8+3 problems by requiring input.c when the test needs the | |
5030 | parser. | |
5031 | ||
d945f5cd AD |
5032 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5033 | ||
5034 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
5035 | fields. | |
5036 | ||
d200e455 AD |
5037 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5038 | ||
5039 | All the hacks using a final pseudo state are now useless. | |
5040 | ||
5041 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
5042 | * src/lalr.c (nLA): New. | |
5043 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
5044 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
5045 | ||
f9507c28 AD |
5046 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5047 | ||
5048 | * src/output.c (action_row, token_actions): Use a state_t instead | |
5049 | of a integer, and nlookaheads instead of the following state's | |
5050 | lookaheadsp. | |
5051 | ||
065fbd27 AD |
5052 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5053 | ||
5054 | * src/conflicts.c (log_resolution, flush_shift) | |
5055 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
5056 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
5057 | (conflicts_print, print_reductions): Use a state_t instead of an | |
5058 | integer when referring to a state. | |
5059 | As much as possible, depend upon nlookaheads, instead of the | |
5060 | `lookaheadsp' member of the following state (since lookaheads of | |
5061 | successive states are successive, the difference between state n + 1 | |
5062 | and n served as the number of lookaheads for state n). | |
5063 | * src/lalr.c (add_lookback_edge): Likewise. | |
5064 | * src/print.c (print_core, print_actions, print_state) | |
5065 | (print_results): Likewise. | |
5066 | * src/print_graph.c (print_core, print_actions, print_state) | |
5067 | (print_graph): Likewise. | |
5068 | * src/conflicts.h: Adjust. | |
5069 | ||
1b177bd7 AD |
5070 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5071 | ||
5072 | * src/bison.hairy: Formatting/comment changes. | |
5073 | ANSIfy. | |
5074 | Remove `register' indications. | |
5075 | Add plenty of `static'. | |
5076 | ||
7742ddeb AD |
5077 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5078 | ||
5079 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
5080 | duplicates ntokens. | |
5081 | * src/bison.simple: Formatting/comment changes. | |
5082 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
5083 | is an undocumented synonym. | |
5084 | ||
1fa14068 AD |
5085 | 2001-12-22 Akim Demaille <akim@epita.fr> |
5086 | ||
5087 | * src/output.c (output_table_data): Change the prototype to use | |
5088 | `int' for array ranges: some invocations do pass an int, not a | |
5089 | short. | |
5090 | Reported by Wayne Green. | |
5091 | ||
b9752825 AD |
5092 | 2001-12-22 Akim Demaille <akim@epita.fr> |
5093 | ||
5094 | Some actions of web2c.y are improperly triggered. | |
5095 | Reported by Mike Castle. | |
5096 | ||
5097 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
5098 | * tests/regression.at (Web2c): Rename as... | |
5099 | (Web2c Report): this. | |
5100 | (Web2c Actions): New. | |
5101 | ||
776209d6 AD |
5102 | 2001-12-22 Akim Demaille <akim@epita.fr> |
5103 | ||
5104 | Reductions in web2c.y are improperly reported. | |
5105 | Reported by Mike Castle. | |
5106 | ||
5107 | * src/conflicts.c (print_reductions): Fix. | |
5108 | * tests/regression.at (Web2c): New. | |
5109 | ||
275fc3ad AD |
5110 | 2001-12-18 Akim Demaille <akim@epita.fr> |
5111 | ||
5112 | Some host fail on `assert (!"foo")', which expands to | |
5113 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
5114 | Reported by Nelson Beebee. | |
5115 | ||
5116 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
5117 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
5118 | ||
897668ee MA |
5119 | 2001-12-17 Marc Autret <autret_m@epita.fr> |
5120 | ||
5121 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
5122 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
5123 | New line counter 'skeleton_line' (skeleton-line muscle). | |
5124 | ||
ab3399e0 PE |
5125 | 2001-12-17 Paul Eggert <eggert@twinsun.com> |
5126 | ||
5127 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
5128 | YYDEBUG must be defined to a nonzero value. | |
5129 | ||
5130 | * src/bison.simple (yytname): Do not assume that the user defines | |
5131 | YYDEBUG to a properly parenthesized expression. | |
5132 | ||
3877f72b AD |
5133 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5134 | ||
5135 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
5136 | nlookaheads is a new member. | |
5137 | Adjust all users. | |
5138 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
5139 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
5140 | state. | |
776209d6 | 5141 | |
331dbc1b AD |
5142 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5143 | ||
5144 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
5145 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
5146 | let... | |
5147 | * src/reader.c (reader): Do it. | |
776209d6 | 5148 | |
be750e4c AD |
5149 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5150 | ||
5151 | * src/conflicts.c (print_reductions): Formatting changes. | |
776209d6 | 5152 | |
709ae8c6 AD |
5153 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5154 | ||
5155 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
5156 | (flush_reduce): New. | |
5157 | (resolve_sr_conflict): Adjust. | |
776209d6 | 5158 | |
f87685c3 AD |
5159 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5160 | ||
5161 | * src/output.c (output_obstack): Be static and rename as... | |
5162 | (format_obstack): this, to avoid any confusion with files.c's | |
5163 | output_obstack. | |
5164 | * src/reader.h (muscle_obstack): Move to... | |
5165 | * src/output.h: here, since it's defined in output.c. | |
5166 | ||
837491d8 AD |
5167 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5168 | ||
5169 | * src/output.c (action_row, save_column, default_goto) | |
5170 | (sort_actions, matching_state, pack_vector): Better variable | |
5171 | locality. | |
5172 | ||
796d61fb AD |
5173 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5174 | ||
5175 | * src/output.c: Various formatting changes. | |
776209d6 | 5176 | |
64d15509 AD |
5177 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5178 | ||
5179 | * src/files.c (output_files): Free the output_obstack. | |
5180 | * src/main.c (main): Call print and print_graph conditionally. | |
5181 | * src/print.c (print): Work unconditionally. | |
5182 | * src/print_graph.c (print_graph): Work unconditionally. | |
5183 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
5184 | ||
fbc8ecb7 MA |
5185 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
5186 | ||
5187 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
5188 | there is one less line per action. | |
5189 | ||
f0440388 MA |
5190 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
5191 | ||
5192 | * src/bison.simple: Remove a useless #line directive. | |
5193 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
5194 | * src/output.c (get_lines_number): New. | |
776209d6 | 5195 | (output_parser): Adjust, now takes care about the lines of a |
f0440388 MA |
5196 | output muscles. |
5197 | Fix line numbering. | |
5198 | (actions_output): Computes the number of lines taken by actions. | |
5199 | (output_master_parser): Insert new skeleton which is the name of | |
5200 | the output parser file name. | |
5201 | ||
a79986b8 MA |
5202 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
5203 | ||
5204 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
5205 | ||
4ec8e00f MA |
5206 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
5207 | ||
5208 | * src/output.c (output_gram): Keep track of the hairy one. | |
5209 | ||
1a4648ff AD |
5210 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5211 | ||
5212 | Make `make distcheck' work. | |
5213 | ||
5214 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
5215 | system.h which uses libgettext.h. | |
5216 | ||
9c2c67e6 AD |
5217 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5218 | ||
5219 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
5220 | otherwise, since we range over their symbols, we might look at a | |
5221 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
5222 | `nvars', hence we overflow our arrays. | |
5223 | ||
93ede233 AD |
5224 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5225 | ||
5226 | The header can also be produced directly, without any obstack! | |
5227 | Yahoo! | |
5228 | ||
5229 | * src/files.c, src/files.h (defines_obstack): Remove. | |
5230 | (compute_header_macro): Global. | |
5231 | (defines_obstack_save): Remove. | |
5232 | * src/reader.c (parse_union_decl): No longer output to | |
5233 | defines_obstack: its content can be found in the `stype' muscle | |
5234 | anyway. | |
5235 | (output_token_translations): Merge into... | |
5236 | (symbols_output): this. | |
5237 | Rename as... | |
5238 | (symbols_save): this. | |
5239 | (reader): Adjust. | |
5240 | * src/output.c (header_output): New. | |
5241 | (output): Call it. | |
5242 | ||
2666f928 AD |
5243 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5244 | ||
5245 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
5246 | simultaneously, use one to define the `stype' muscle, and use the | |
5247 | value of the latter to fill defines_obstack. | |
5248 | (copy_comment): Remove. | |
5249 | (copy_comment2): Work for a single obstack. | |
5250 | Rename as... | |
5251 | (copy_comment): this. | |
5252 | ||
428046f8 AD |
5253 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5254 | ||
5255 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
5256 | * src/reader.c (parse_union_decl): Revamp. | |
5257 | ||
ea52d706 AD |
5258 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5259 | ||
5260 | Still making progress in separating Bison into (i) input, (ii) | |
5261 | process, (iii) output: now we can directly output the parser file | |
5262 | without using table_obstack at all. | |
5263 | ||
5264 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
5265 | (parser_file_name): New. | |
5266 | * src/files.c (compute_output_file_names): Compute it. | |
5267 | * src/output.c (actions_output, output_parser) | |
5268 | (output_master_parser): To a file instead of an obstack. | |
5269 | ||
3f96f4dc AD |
5270 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5271 | ||
5272 | Attach actions to rules, instead of pre-outputting them to | |
5273 | actions_obstack. | |
5274 | ||
5275 | * src/gram.h (rule_t): action and action_line are new members. | |
5276 | * src/reader.c (symbol_list): Likewise. | |
5277 | (copy_action): Save the actions within the rule. | |
5278 | (packgram): Save them in rule_table. | |
5279 | * src/output.c (actions_output): New. | |
5280 | (output_parser): Use it on `%%actions'. | |
5281 | (output_rule_data): Don't free rule_table. | |
5282 | (output): Do it. | |
5283 | (prepare): Don't save the `action' muscle. | |
5284 | * src/bison.simple: s/%%action/%%actions/. | |
5285 | ||
51576fb3 AD |
5286 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5287 | ||
5288 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
5289 | to the user action: let it fail if lacking. | |
dee049eb | 5290 | Suggested by Arnold Robbins and Tom Tromey. |
51576fb3 | 5291 | |
2648a72d AD |
5292 | 2001-12-14 Akim Demaille <akim@epita.fr> |
5293 | ||
5294 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
5295 | longer mess around with obstacks and int pointers. | |
5296 | Adjust all callers. | |
5297 | ||
92790e5b AD |
5298 | 2001-12-14 Akim Demaille <akim@epita.fr> |
5299 | ||
5300 | * src/lex.c (literalchar): Don't escape the special characters, | |
5301 | just decode them, and keep them as char (before, eol was output as | |
5302 | the 2 char string `\n' etc.). | |
5303 | * src/output.c (output_rule_data): Use quotearg to output the | |
5304 | token strings. | |
5305 | ||
927c1557 PE |
5306 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
5307 | ||
5308 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
5309 | Do not infringe on the global user namespace when using C++. | |
5310 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
5311 | All uses of `fprintf' and `stderr' changed. | |
5312 | ||
5313 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
5314 | ||
ed8e1f68 AD |
5315 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5316 | ||
5317 | The computation of nullable is broken: it doesn't handle empty | |
5318 | RHS's properly. | |
5319 | ||
5320 | * tests/torture.at (GNU AWK Grammar): New. | |
5321 | * tests/sets.at (Nullable): New. | |
5322 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
5323 | `ritems', loop over the rules, and then over their rhs's. | |
5324 | ||
5325 | Work around Autotest bugs. | |
5326 | ||
5327 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
5328 | frame, because Autotest understand lines starting with a `+' as | |
5329 | traces from the shell. Then, they are not processed properly. | |
5330 | Admittedly an Autotest bug, but we don't have time to wait for | |
5331 | Autotest to catch up. | |
5332 | * tests/regression.at (Broken Closure): Adjust to the new table | |
5333 | frames. | |
5334 | Move to... | |
5335 | * tests/sets.at: here. | |
5336 | ||
cb581495 AD |
5337 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5338 | ||
5339 | * src/closure.c (closure): Use nrules instead of playing tricks | |
5340 | with BITS_PER_WORD. | |
5341 | ||
2e729273 AD |
5342 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5343 | ||
5344 | * src/print.c (print_actions): Output the handling of `$' as the | |
5345 | traces do: shifting the token EOF. Before EOF was treated as a | |
5346 | nonterminal. | |
5347 | * tests/regression.at: Adjust some tests. | |
5348 | * src/print_graph.c (print_core): Complete the set of items via | |
5349 | closure. The next-to-final and final states are still unsatisfying, | |
5350 | but that's to be addressed elsewhere. | |
5351 | No longer output the rule numbers, but do output the state number. | |
5352 | A single loop for the shifts + gotos is enough, but picked a | |
5353 | distinct color for each. | |
5354 | (print_graph): Initialize and finalize closure. | |
5355 | ||
107f7dfb AD |
5356 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5357 | ||
5358 | * src/reader.c (readgram): Remove dead code, an strip useless | |
5359 | braces. | |
5360 | (get_type): Remove, unused. | |
5361 | ||
9b53a24f AD |
5362 | 2001-12-12 Akim Demaille <akim@epita.fr> |
5363 | ||
5364 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
5365 | on that of lib/error.c. | |
5366 | ||
dbfb6dcd AD |
5367 | 2001-12-12 Akim Demaille <akim@epita.fr> |
5368 | ||
5369 | Some hosts don't like `/' in includes. | |
5370 | ||
5371 | * src/system.h: Include libgettext.h without qualifying the path. | |
5372 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
5373 | $(top_srcdir). | |
5374 | ||
c25fb648 MA |
5375 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
5376 | ||
5377 | * src/output.c (output_parser): Remove useless muscle. | |
5378 | ||
710ddc4f MA |
5379 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
5380 | ||
5381 | * src/bison.simple: Remove #line just before %%epilogue. It | |
5382 | is now handled in ... | |
5383 | * src/reader.c (read_additionnal_code): Add the output of a | |
5384 | #line for the epilogue. | |
5385 | ||
e83d80b8 MA |
5386 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
5387 | ||
927c1557 | 5388 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
5389 | replace precedent remove. |
5390 | * src/bison.simple: Remove #line before %%prologue because | |
5391 | %%input-line is wrong at this time. | |
5392 | ||
971d5158 MA |
5393 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
5394 | ||
5395 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 5396 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 5397 | |
5edafffd AD |
5398 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5399 | ||
5400 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
5401 | * src/LR0.c (set_state_table): here. | |
5402 | * src/lalr.c (lalr): Call it. | |
5403 | ||
0279f8e9 AD |
5404 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5405 | ||
5406 | * src/state.h (shifts): Remove the `number' member: shifts are | |
5407 | attached to state, hence no longer need to be labelled with a | |
5408 | state number. | |
5409 | ||
190c4f5f AD |
5410 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5411 | ||
5412 | Now that states have a complete set of members, the linked list of | |
5413 | shifts is useless: just fill directly the state's shifts member. | |
5414 | ||
5415 | * src/state.h (shifts): Remove the `next' member. | |
5416 | * src/LR0.c (first_state, last_state): Remove. | |
5417 | Adjust the callers. | |
5418 | (augment_automaton): Don't look for the shifts that must be added | |
5419 | a shift on EOF: it is those of the state we looked for! But now, | |
5420 | since shifts are attached, it is no longer needed to looking | |
5421 | merely by its id: its number. | |
5422 | ||
2a73b93d AD |
5423 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5424 | ||
5425 | * src/LR0.c (augment_automaton): Better variable locality. | |
5426 | Remove an impossible branch: if there is a state corresponding to | |
5427 | the start symbol being shifted, then there is shift for the start | |
5428 | symbol from the initial state. | |
5429 | ||
74392f6a AD |
5430 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5431 | ||
5432 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
5433 | only when appropriate: when insert_start_shifting_state' is not | |
5434 | invoked. | |
5435 | * tests/regression.at (Rule Line Numbers): Adjust. | |
5436 | ||
37c82725 AD |
5437 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5438 | ||
5439 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
5440 | merge the two cases addition shifts to the initial state. | |
5441 | ||
6a164e0c AD |
5442 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5443 | ||
5444 | * src/lalr.c (set_state_table): Move to... | |
5445 | * src/LR0.c: here. | |
5446 | * src/lalr.c (lalr): Don't call it... | |
5447 | * src/LR0.c (generate_states): do it. | |
5448 | * src/LR0.h (first_state): Remove, only the table is used. | |
5449 | ||
7215de24 AD |
5450 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5451 | ||
5452 | * src/LR0.h (first_shift, first_reduction): Remove. | |
5453 | * src/lalr.c: Don't use first_shift: find shifts through the | |
5454 | states. | |
5455 | ||
80e25d4d AD |
5456 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5457 | ||
5458 | * src/LR0.c: Attach shifts to states as soon as they are | |
5459 | computed. | |
5460 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
5461 | state, just assert that the mapping was properly done. | |
5462 | ||
0ab3728b AD |
5463 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5464 | ||
5465 | * src/LR0.c (insert_start_shift): Rename as... | |
5466 | (insert_start_shifting_state): this. | |
5467 | (insert_eof_shifting_state, insert_accepting_state): New. | |
5468 | (augment_automaton): Adjust. | |
5469 | Better locality of the variables. | |
5470 | When looking if the start_symbol is shifted from the initial | |
5471 | state, using `while (... symbol != start_symbol ...)' sounds | |
5472 | better than `while (... symbol < start_symbol ...)': If fail | |
5473 | to see how the order between symbols could be relevant! | |
5474 | ||
78af9bbc AD |
5475 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5476 | ||
5477 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
5478 | `spec_file_prefix', declared by src/files.h. | |
5479 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
5480 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
5481 | * src/output.c (prepare): Adjust. | |
5482 | * src/reader.c (symbols_output): Likewise. | |
5483 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
5484 | ||
bdef2a41 AD |
5485 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5486 | ||
5487 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
5488 | `"0"'. | |
5489 | ||
3735969c AD |
5490 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5491 | ||
5492 | * src/reader.c (reader): Calling symbols_output once is enough. | |
5493 | ||
49701457 AD |
5494 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5495 | ||
5496 | Now that states have a complete set of members, the linked list of | |
5497 | reductions is useless: just fill directly the state's reductions | |
5498 | member. | |
5499 | ||
5500 | * src/state.h (struct reductions): Remove member `number' and | |
5501 | `next'. | |
5502 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
5503 | (save_reductions): Don't link the new reductions, store them in | |
5504 | this_state. | |
5505 | * src/lalr.c (set_state_table): No need to attach reductions to | |
5506 | states, it's already done. | |
5507 | * src/output.c (output_actions): No longer free the shifts, then | |
5508 | the reductions, then the states: free all the states and their | |
5509 | members. | |
5510 | ||
0edad749 AD |
5511 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5512 | ||
5513 | * src/options.c (OPTN, DRTV, BOTH): New. | |
5514 | (option_table): Use them. | |
5515 | ||
0edad749 AD |
5516 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
5517 | the job of system.h. | |
5518 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
5519 | reasons. | |
5520 | ||
5449dd0f AD |
5521 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5522 | ||
5523 | * src/output.c (output, prepare): Make sure the values of the | |
5524 | muscles `action' and `prologue' are 0-terminated. | |
5525 | ||
a870c567 AD |
5526 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5527 | ||
5528 | Clean up GCC warnings. | |
5529 | ||
5530 | * src/reader.c (copy_action): `buf' is not used. | |
5531 | (parse_skel_decl): Be static. | |
5532 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
5533 | * src/options.h (create_long_option_table): Have a real prototype. | |
5534 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
5535 | (hash_delete_at): Return const void *. | |
5536 | Adjust casts to preserve the const. | |
5537 | ||
80df8768 AD |
5538 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5539 | ||
5540 | * configure.in: Require 2.52g. | |
5541 | M4 is not needed, but AUTOM4TE is. | |
5542 | * m4/m4.m4: Remove. | |
5543 | * tests/Makefile.am: Adjust. | |
5544 | ||
f693ad14 AD |
5545 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5546 | ||
5547 | One structure for states is enough, even though theoretically | |
5548 | there are LR(0) states and LALR(1) states. | |
5549 | ||
5550 | * src/lalr.h (state_t): Remove. | |
5551 | (state_table): Be state_t **, not state_t *. | |
5552 | * src/state.h (core, CORE_ALLOC): Rename as... | |
5553 | (state_t, STATE_ALLOC): this. | |
5554 | Add the LALR(1) members: shifts, reductions, errs. | |
5555 | * src/LR0.c (state_table): Rename as... | |
5556 | (state_hash): this, to avoid name clashes with the global | |
5557 | `state_table'. | |
5558 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
5559 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
5560 | ||
74ffbcb6 AD |
5561 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5562 | ||
5563 | Bison dumps core on bash.y. | |
5564 | Reported by Pascal Bart. | |
5565 | ||
5566 | * src/warshall.c (bitmatrix_print): New. | |
5567 | (TC): Use it. | |
5568 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
5569 | j must be the outer loop. | |
5570 | * tests/regression.at (Broken Closure): New. | |
5571 | ||
07708e19 AD |
5572 | 2001-12-05 Akim Demaille <akim@epita.fr> |
5573 | ||
5574 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
5575 | its argument. | |
5576 |