]>
Commit | Line | Data |
---|---|---|
60491a94 AD |
1 | 2002-06-27 Akim Demaille <akim@epita.fr> |
2 | ||
3 | * data/bison.simple, data/bison.c++: Rename as... | |
4 | * data/yacc.c, data/lalr1.cc: these. | |
5 | * doc/bison.texinfo (Environment Variables): Remove. | |
6 | ||
9be0c25b AD |
7 | 2002-06-25 Raja R Harinath <harinath@cs.umn.edu> |
8 | ||
9 | * src/getargs.c (report_argmatch): Initialize strtok(). | |
10 | ||
1ae72863 AD |
11 | 2002-06-20 Akim Demaille <akim@epita.fr> |
12 | ||
13 | * data/bison.simple (b4_symbol_actions): New, replaces... | |
14 | (b4_symbol_destructor, b4_symbol_printer): these. | |
15 | (yysymprint): Be sure to call YYPRINT only for tokens, and using | |
16 | user token numbers. | |
17 | ||
87542d29 AD |
18 | 2002-06-20 Akim Demaille <akim@epita.fr> |
19 | ||
20 | * data/bison.simple (yydestructor): Rename as... | |
21 | (yydestruct): this. | |
22 | ||
1a31ed21 AD |
23 | 2002-06-20 Akim Demaille <akim@epita.fr> |
24 | ||
25 | * src/symtab.h, src/symtab.c (symbol_type_set) | |
26 | (symbol_destructor_set, symbol_precedence_set): The location is | |
27 | the last argument. | |
28 | Adjust all callers. | |
29 | ||
e776192e AD |
30 | 2002-06-20 Akim Demaille <akim@epita.fr> |
31 | ||
32 | * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser | |
33 | internals. | |
34 | * src/reader.h, src/reader.c (grammar_current_rule_prec_set): | |
35 | Takes a location. | |
36 | * src/symtab.h, src/symtab.c (symbol_class_set) | |
37 | (symbol_user_token_number_set): Likewise. | |
38 | Adjust all callers. | |
39 | Promote complain_at. | |
40 | * tests/input.at (Type Clashes): Adjust. | |
41 | ||
5c1180b3 AD |
42 | 2002-06-20 Akim Demaille <akim@epita.fr> |
43 | ||
44 | * data/bison.simple (YYLEX): Fix the declaration when | |
45 | %pure-parser. | |
46 | ||
e3170060 AD |
47 | 2002-06-20 Akim Demaille <akim@epita.fr> |
48 | ||
49 | * data/bison.simple (yysymprint): Don't print the token number, | |
50 | just its name. | |
51 | * tests/actions.at (Destructors): Rename as... | |
52 | (Printers and Destructors): this. | |
53 | Also exercise %printer. | |
54 | ||
253862fd AD |
55 | 2002-06-20 Akim Demaille <akim@epita.fr> |
56 | ||
57 | * data/bison.simple (YYDSYMPRINT): New. | |
58 | Use it to remove many of the #if YYDEBUG/if (yydebug). | |
59 | ||
366eea36 AD |
60 | 2002-06-20 Akim Demaille <akim@epita.fr> |
61 | ||
62 | * src/symtab.h, src/symtab.c (symbol_t): printer and | |
63 | printer_location are new members. | |
64 | (symbol_printer_set): New. | |
65 | * src/parse-gram.y (PERCENT_PRINTER): New token. | |
66 | Handle its associated rule. | |
67 | * src/scan-gram.l: Adjust. | |
68 | (handle_destructor_at, handle_destructor_dollar): Rename as... | |
69 | (handle_symbol_code_at, handle_symbol_code_dollar): these. | |
70 | * src/output.c (symbol_printers_output): New. | |
71 | (output_skeleton): Call it. | |
72 | * data/bison.simple (yysymprint): New. Cannot be named yyprint | |
73 | since there are already many grammar files with a user `yyprint'. | |
74 | Replace the calls to YYPRINT to calls to yysymprint. | |
75 | * tests/calc.at: Adjust. | |
76 | * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was | |
77 | taking advantage of parser very internal details (stack size!). | |
78 | ||
4f25ebb0 AD |
79 | 2002-06-20 Akim Demaille <akim@epita.fr> |
80 | ||
81 | * src/scan-gram.l: Complete the scanner with the missing patterns | |
82 | to pacify Flex. | |
83 | Use `quote' and `symbol_tag_get' where appropriate. | |
84 | ||
93b68a0e AD |
85 | 2002-06-19 Akim Demaille <akim@epita.fr> |
86 | ||
87 | * tests/actions.at (Destructors): Augment to test locations. | |
88 | * data/bison.simple (yydestructor): Pass it the current location | |
89 | if locations are enabled. | |
90 | Prototype only when __STDC__ or C++. | |
91 | Change the argument names to move into the yy name space: there is | |
92 | user code here. | |
93 | ||
58612f1d AD |
94 | 2002-06-19 Akim Demaille <akim@epita.fr> |
95 | ||
74310291 AD |
96 | * data/bison.simple (b4_pure_if): New. |
97 | Use it instead of #ifdef YYPURE. | |
98 | ||
99 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
100 | ||
101 | * data/bison.simple (b4_location_if): New. | |
58612f1d AD |
102 | Use it instead of #ifdef YYLSP_NEEDED. |
103 | ||
f25bfb75 AD |
104 | 2002-06-19 Akim Demaille <akim@epita.fr> |
105 | ||
106 | Prepare @$ in %destructor, but currently don't bind it in the | |
107 | skeleton, as %location use is not cleaned up yet. | |
108 | ||
109 | * src/scan-gram.l (handle_dollar, handle_destructor_at) | |
110 | (handle_action_at): New. | |
111 | (handle_at, handle_action_dollar, handle_destructor_dollar): Take | |
112 | a braced_code_t and a location as additional arguments. | |
113 | (handle_destructor_dollar): Instead of requiring `b4_eval', just | |
114 | unquote one when outputting `b4_dollar_dollar'. | |
115 | Adjust callers. | |
116 | * data/bison.simple (b4_eval): Remove. | |
117 | (b4_symbol_destructor): Adjust. | |
118 | * tests/input.at (Invalid @n): Adjust. | |
119 | ||
c732d2c6 AD |
120 | 2002-06-19 Zack Weinberg <zack@codesourcery.com> |
121 | ||
122 | * doc/bison.texinfo: Document ability to have multiple | |
123 | prologue sections. | |
124 | ||
8c165d89 AD |
125 | 2002-06-18 Akim Demaille <akim@epita.fr> |
126 | ||
127 | * src/files.c (compute_base_names): When computing the output file | |
128 | names from the input file name, strip the directory part. | |
129 | ||
ca98bf57 AD |
130 | 2002-06-18 Akim Demaille <akim@epita.fr> |
131 | ||
132 | * data/bison.simple.new: Comment changes. | |
133 | Reported by Andreas Schwab. | |
134 | ||
0bfb02ff AD |
135 | 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu> |
136 | ||
137 | * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that | |
138 | there are no `label `yyoverflowlab' defined but not used' warnings | |
139 | when yyoverflow is defined. | |
140 | ||
24c0aad7 AD |
141 | 2002-06-18 Akim Demaille <akim@epita.fr> |
142 | ||
143 | * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a | |
144 | new member. | |
145 | (symbol_destructor_set): Adjust. | |
146 | * src/output.c (symbol_destructors_output): Output the destructor | |
147 | locations. | |
148 | Output the symbol name. | |
149 | * data/bison.simple (b4_symbol_destructor): Adjust. | |
150 | ||
5719c109 AD |
151 | 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com> |
152 | and Akim Demaille <akim@epita.fr> | |
153 | ||
154 | * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy | |
155 | what's left on the stack when the error recovery hits EOF. | |
156 | * tests/actions.at (Destructors): Complete to exercise this case. | |
157 | ||
9280d3ef AD |
158 | 2002-06-17 Akim Demaille <akim@epita.fr> |
159 | ||
160 | * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of | |
161 | arguments is really empty, not only equal to `[]'. | |
162 | * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new | |
163 | member. | |
164 | (symbol_destructor_set): New. | |
165 | * src/output.c (symbol_destructors_output): New. | |
166 | * src/reader.h (brace_code_t, current_braced_code): New. | |
167 | * src/scan-gram.l (BRACED_CODE): Use it to branch on... | |
168 | (handle_dollar): Rename as... | |
169 | (handle_action_dollar): this. | |
170 | (handle_destructor_dollar): New. | |
171 | * src/parse-gram.y (PERCENT_DESTRUCTOR): New. | |
172 | (grammar_declaration): Use it. | |
173 | * data/bison.simple (yystos): Is always defined. | |
174 | (yydestructor): New. | |
175 | * tests/actions.at (Destructors): New. | |
176 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep. | |
177 | ||
dafdc66f AD |
178 | 2002-06-17 Akim Demaille <akim@epita.fr> |
179 | ||
180 | * src/symlist.h, src/symlist.c (symbol_list_length): New. | |
181 | * src/scan-gram.l (handle_dollar, handle_at): Compute the | |
182 | rule_length only when needed. | |
183 | * src/output.c (actions_output, token_definitions_output): Output | |
184 | the full M4 block. | |
185 | * src/symtab.c: Don't access directly to the symbol tag, use | |
186 | symbol_tag_get. | |
187 | * src/parse-gram.y: Use symbol_list_free. | |
188 | ||
56c47203 AD |
189 | 2002-06-17 Akim Demaille <akim@epita.fr> |
190 | ||
191 | * src/reader.h, src/reader.c (symbol_list, symbol_list_new) | |
192 | (symbol_list_prepend, get_type_name): Move to... | |
193 | * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new) | |
194 | (symbol_list_prepend, symbol_list_n_type_name_get): here. | |
195 | Adjust all callers. | |
196 | (symbol_list_free): New. | |
197 | * src/scan-gram.l (handle_dollar): Takes a location. | |
198 | * tests/input.at (Invalid $n): Adjust. | |
199 | ||
1e0bab92 AD |
200 | 2002-06-17 Akim Demaille <akim@epita.fr> |
201 | ||
202 | * src/reader.h, src/reader.c (symbol_list_new): Export it. | |
203 | (symbol_list_prepend): New. | |
204 | * src/parse-gram.y (%union): `list' is a new member. | |
205 | (symbols.1): New, replaces... | |
206 | (terms_to_prec.1, nterms_to_type.1): these. | |
207 | * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set) | |
208 | Take a location as additional argument. | |
209 | Adjust all callers. | |
210 | ||
04e60654 AD |
211 | 2002-06-15 Akim Demaille <akim@epita.fr> |
212 | ||
213 | * src/parse-gram.y: Move %token in the declaration section so that | |
214 | we don't depend upon CVS Bison. | |
215 | ||
10e5b8bd AD |
216 | 2002-06-15 Akim Demaille <akim@epita.fr> |
217 | ||
218 | * src/state.h, src/state.c (state_rule_lookaheads_print): New. | |
219 | * src/print.c (print_core): Use it. | |
220 | ||
9801d40c AD |
221 | 2002-06-15 Akim Demaille <akim@epita.fr> |
222 | ||
223 | * src/conflicts.c (log_resolution): Accept the rule involved in | |
224 | the sr conflicts instead of the lookahead number that points to | |
225 | that rule. | |
226 | (flush_reduce): Accept the current lookahead vector as argument, | |
227 | instead of the index in LA. | |
228 | (resolve_sr_conflict): Accept the current number of lookahead | |
229 | bitset to consider for the STATE, instead of the index in LA. | |
230 | (set_conflicts): Adjust. | |
231 | * src/lalr.c, src/lalr.h, src/state.h: Comment changes. | |
232 | ||
c0263492 AD |
233 | 2002-06-15 Akim Demaille <akim@epita.fr> |
234 | ||
235 | * src/state.h (state_t): Replace the `lookaheadsp' member, a | |
236 | short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**). | |
237 | Adjust all dependencies. | |
238 | * src/lalr.c (initialize_lookaheads): Split into... | |
239 | (states_lookaheads_count, states_lookaheads_initialize): these. | |
240 | (lalr): Adjust. | |
241 | ||
9757c359 AD |
242 | 2002-06-15 Akim Demaille <akim@epita.fr> |
243 | ||
244 | * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved | |
245 | out of... | |
246 | (grammar_rules_print): here. | |
247 | * src/reduce.c (reduce_output): Use it. | |
248 | * tests/reduce.at (Useless Rules, Reduced Automaton) | |
249 | (Underivable Rules): Adjust. | |
250 | ||
6b98e4b5 AD |
251 | 2002-06-15 Akim Demaille <akim@epita.fr> |
252 | ||
253 | Copy BYacc's nice way to report the grammar. | |
254 | ||
255 | * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print): | |
256 | New. | |
257 | Don't print the rules' location, it is confusing and useless. | |
258 | (rule_print): Use grammar_rhs_print. | |
259 | * src/print.c (print_grammar): Use grammar_rules_print. | |
260 | ||
6b98e4b5 AD |
261 | 2002-06-15 Akim Demaille <akim@epita.fr> |
262 | ||
263 | Complete and rationalize `useless thing' warnings. | |
264 | ||
265 | * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n) | |
266 | (symbol_tag_print): New. | |
267 | Use them everywhere in place of accessing directly the tag member. | |
268 | * src/gram.h, src/gram.c (rule_print): New. | |
269 | Use it where a rule used to be printed `by hand'. | |
270 | * src/reduce.c (nonterminals_reduce): Report the use nonterminals. | |
271 | (reduce_grammar_tables): Report the useless rules. | |
272 | (reduce_print): Useless things are a warning, not an error. | |
273 | Report it as such. | |
274 | * tests/reduce.at (Useless Nonterminals, Useless Rules): | |
275 | (Reduced Automaton, Underivable Rules): Adjust. | |
276 | * tests/regression.at (Web2c Report, Web2c Report): Adjust. | |
277 | * tests/conflicts.at (Unresolved SR Conflicts) | |
278 | (Solved SR Conflicts): Adjust. | |
279 | ||
ee000ba4 AD |
280 | 2002-06-15 Akim Demaille <akim@epita.fr> |
281 | ||
282 | Let symbols have a location. | |
283 | ||
284 | * src/symtab.h, src/symtab.c (symbol_t): Location is a new member. | |
285 | (getsym): Adjust. | |
286 | Adjust all callers. | |
287 | * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at): | |
288 | Use location_t, not int. | |
289 | * src/symtab.c (symbol_check_defined): Take advantage of the | |
290 | location. | |
291 | * tests/regression.at (Invalid inputs): Adjust. | |
292 | ||
8efe435c AD |
293 | 2002-06-15 Akim Demaille <akim@epita.fr> |
294 | ||
295 | * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New. | |
296 | (input): Don't try to initialize yylloc here, do it in the | |
297 | scanner. | |
298 | * src/scan-gram.l (YY_USER_INIT): Initialize yylloc. | |
299 | * src/gram.h (rule_t): Change line and action_line into location | |
300 | and action_location, of location_t type. | |
301 | Adjust all dependencies. | |
302 | * src/location.h, src/location.c (empty_location): New. | |
303 | * src/reader.h, src/reader.c (grammar_start_symbol_set) | |
304 | (grammar_symbol_append, grammar_rule_begin, grammar_rule_end) | |
305 | (grammar_current_rule_symbol_append) | |
306 | (grammar_current_rule_action_append): Expect a location as argument. | |
307 | * src/reader.c (grammar_midrule_action): Adjust to attach an | |
308 | action's location as dummy symbol location. | |
309 | * src/symtab.h, src/symtab.c (startsymbol_location): New. | |
310 | * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust | |
311 | the line numbers. | |
312 | ||
1921f1d7 AD |
313 | 2002-06-14 Akim Demaille <akim@epita.fr> |
314 | ||
315 | Grammar declarations may be found in the grammar section. | |
316 | ||
317 | * src/parse-gram.y (rules_or_grammar_declaration): New. | |
318 | (declarations): Each declaration may end with a semicolon, not | |
319 | just... | |
320 | (grammar_declaration): `"%union"'. | |
321 | (grammar): Branch to rules_or_grammar_declaration. | |
322 | ||
4515534c AD |
323 | 2002-06-14 Akim Demaille <akim@epita.fr> |
324 | ||
325 | * src/main.c (main): Invoke scanner_free. | |
326 | ||
f958596b AD |
327 | 2002-06-14 Akim Demaille <akim@epita.fr> |
328 | ||
329 | * src/output.c (m4_invoke): Extracted from... | |
330 | (output_skeleton): here. | |
331 | Free tempfile. | |
332 | ||
2c569025 AD |
333 | 2002-06-14 Akim Demaille <akim@epita.fr> |
334 | ||
335 | * src/parse-gram.y (directives, directive, gram) | |
336 | (grammar_directives, precedence_directives, precedence_directive): | |
337 | Rename as... | |
338 | (declarations, declaration, grammar, grammar_declaration) | |
339 | (precedence_declaration, precedence_declarator): these. | |
340 | (symbol_declaration): New. | |
341 | ||
592e8d4d AD |
342 | 2002-06-14 Akim Demaille <akim@epita.fr> |
343 | ||
344 | * src/files.c (action_obstack): Remove, unused. | |
345 | (output_obstack): Remove it, and all its dependencies, as it is no | |
346 | longer needed. | |
347 | * src/reader.c (epilogue_set): Build the epilogue in the | |
348 | muscle_obstack. | |
349 | * src/output.h, src/output.c (muscle_obstack): Move to... | |
350 | * src/muscle_tab.h, src/muscle_tab.h: here. | |
351 | (muscle_init): Initialize muscle_obstack. | |
352 | (muscle_free): New. | |
353 | * src/main.c (main): Call it. | |
354 | ||
0c15323d AD |
355 | 2002-06-14 Akim Demaille <akim@epita.fr> |
356 | ||
357 | * src/location.h: New, extracted from... | |
358 | * src/reader.h: here. | |
359 | * src/Makefile.am (noinst_HEADERS): Merge into | |
360 | (bison_SOURCES): this. | |
361 | Add location.h. | |
362 | * src/parse-gram.y: Use location_t instead of Bison's. | |
363 | * src/reader.h, src/reader.c (prologue_augment, epilogue_set): | |
364 | Use location_t instead of ints. | |
365 | ||
e96c9728 AD |
366 | 2002-06-14 Akim Demaille <akim@epita.fr> |
367 | ||
368 | * data/bison.simple, data/bison.c++: Be sure to restore the | |
369 | current #line when returning to the skeleton contents after having | |
370 | exposed the input file's #line. | |
371 | ||
75d1fe16 AD |
372 | 2002-06-12 Akim Demaille <akim@epita.fr> |
373 | ||
374 | * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too | |
375 | eager. | |
376 | * tests/actions.at (Exotic Dollars): New. | |
377 | ||
6c35d22c AD |
378 | 2002-06-12 Akim Demaille <akim@epita.fr> |
379 | ||
380 | * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst | |
381 | ['"/] too eagerly. | |
382 | * tests/input.at (Torturing the Scanner): New. | |
383 | ||
1d6412ad AD |
384 | 2002-06-11 Akim Demaille <akim@epita.fr> |
385 | ||
386 | * src/scan-gram.l (YY_OBS_INIT): Remove, replace with... | |
387 | [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE] | |
388 | [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment. | |
389 | * src/reader.h, src/scan-gram.l (scanner_initialize): this. | |
390 | * src/reader.c (reader): Use it. | |
391 | ||
4cdb01db AD |
392 | 2002-06-11 Akim Demaille <akim@epita.fr> |
393 | ||
394 | * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval. | |
395 | Adjust all callers. | |
396 | (scanner_last_string_free): New. | |
397 | ||
44995b2e AD |
398 | 2002-06-11 Akim Demaille <akim@epita.fr> |
399 | ||
400 | * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as... | |
401 | (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these. | |
402 | (last_string, YY_OBS_FREE): New. | |
403 | Use them when returning an ID. | |
404 | ||
e9955c83 AD |
405 | 2002-06-11 Akim Demaille <akim@epita.fr> |
406 | ||
407 | Have Bison grammars parsed by a Bison grammar. | |
408 | ||
409 | * src/reader.c, src/reader.h (prologue_augment): New. | |
410 | * src/reader.c (copy_definition): Remove. | |
411 | ||
412 | * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment) | |
413 | (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action) | |
414 | (grammar_current_rule_prec_set, grammar_current_rule_check) | |
415 | (grammar_current_rule_symbol_append) | |
416 | (grammar_current_rule_action_append): Export. | |
417 | * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_ | |
418 | (symbol_list_action_append): Remove. | |
419 | Hook the routines from reader. | |
420 | * src/scan-gram.l: In INITIAL, characters and strings are tokens. | |
421 | * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now. | |
422 | ||
423 | * src/reader.c (read_declarations): Remove, unused. | |
424 | ||
425 | * src/parse-gram.y: Handle the epilogue. | |
426 | * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as... | |
427 | (grammar_start_symbol_set): this. | |
428 | * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet. | |
429 | * src/reader.c (readgram): Remove, unused. | |
430 | (reader): Adjust to insert eoftoken and axiom where appropriate. | |
431 | ||
432 | * src/reader.c (copy_dollar): Replace with... | |
433 | * src/scan-gram.h (handle_dollar): this. | |
434 | * src/parse-gram.y: Remove `%thong'. | |
435 | ||
436 | * src/reader.c (copy_at): Replace with... | |
437 | * src/scan-gram.h (handle_at): this. | |
438 | ||
439 | * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at): | |
440 | New. | |
441 | ||
442 | * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the | |
443 | time being. | |
444 | ||
445 | * src/reader.h, src/reader.c (grammar_rule_end): New. | |
446 | ||
447 | * src/parse.y (current_type, current_class): New. | |
448 | Implement `%nterm', `%token' support. | |
449 | Merge `%term' into `%token'. | |
450 | (string_as_id): New. | |
451 | * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the | |
452 | type name. | |
453 | ||
454 | * src/parse-gram.y: Be sure to handle properly the beginning of | |
455 | rules. | |
456 | ||
457 | * src/parse-gram.y: Handle %type. | |
458 | * src/reader.c (grammar_rule_end): Call grammar_current_rule_check. | |
459 | ||
460 | * src/parse-gram.y: More directives support. | |
461 | * src/options.c: No longer handle source directives. | |
462 | ||
463 | * src/parse-gram.y: Fix %output. | |
464 | ||
465 | * src/parse-gram.y: Handle %union. | |
466 | Use the prologue locations. | |
467 | * src/reader.c (parse_union_decl): Remove. | |
468 | ||
469 | * src/reader.h, src/reader.c (epilogue_set): New. | |
470 | * src/parse-gram.y: Use it. | |
471 | ||
472 | * data/bison.simple, data/bison.c++: b4_stype is now either not | |
473 | defined, then default to int, or to the contents of %union, | |
474 | without `union' itself. | |
475 | Adjust. | |
476 | * src/muscle_tab.c (muscle_init): Don't predefine `stype'. | |
477 | ||
478 | * src/output.c (actions_output): Don't output braces, as they are | |
479 | already handled by the scanner. | |
480 | ||
481 | * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of | |
482 | characters to themselves. | |
483 | ||
484 | * tests/reduce.at (Reduced Automaton): End the grammars with %% so | |
485 | that the epilogue has a proper #line. | |
486 | ||
487 | * src/parse-gram.y: Handle precedence/associativity. | |
488 | ||
489 | * src/symtab.c (symbol_precedence_set): Requires the symbol to be | |
490 | a terminal. | |
491 | * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters. | |
492 | * tests/calc.at: Do not use `%token "foo"' as it makes not sense | |
493 | at all to define terminals that cannot be emitted. | |
494 | ||
495 | * src/scan-gram.l: Escape M4 characters. | |
496 | ||
497 | * src/scan-gram.l: Working properly with escapes in user | |
498 | strings/characters. | |
499 | ||
500 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR) | |
501 | (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING' | |
502 | grammar. | |
503 | Use more modest sizes, as for the time being the parser does not | |
504 | release memory, and therefore the process swallows a huge amount | |
505 | of memory. | |
506 | ||
507 | * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the | |
508 | stricter %token grammar. | |
509 | ||
510 | * src/symtab.h (associativity): Add `undef_assoc'. | |
511 | (symbol_precedence_set): Do nothing when passed an undef_assoc. | |
512 | * src/symtab.c (symbol_check_alias_consistence): Adjust. | |
513 | ||
514 | * tests/regression.at (Invalid %directive): Remove, as it is now | |
515 | meaningless. | |
516 | (Invalid inputs): Adjust to the new error messages. | |
517 | (Token definitions): The new grammar doesn't allow too many | |
518 | eccentricities. | |
519 | ||
520 | * src/lex.h, src/lex.c: Remove. | |
521 | * src/reader.c (lastprec, skip_to_char, read_signed_integer) | |
522 | (copy_character, copy_string2, copy_string, copy_identifier) | |
523 | (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl) | |
524 | (parse_muscle_decl, parse_dquoted_param, parse_skel_decl) | |
525 | (parse_action): Remove. | |
526 | * po/POTFILES.in: Adjust. | |
527 | ||
2e047461 AD |
528 | 2002-06-11 Akim Demaille <akim@epita.fr> |
529 | ||
530 | * src/reader.c (parse_action): Don't store directly into the | |
531 | rule's action member: return the action as a string. | |
532 | Don't require `rule_length' as an argument: compute it. | |
533 | (grammar_current_rule_symbol_append) | |
534 | (grammar_current_rule_action_append): New, eved out from | |
535 | (readgram): here. | |
536 | Remove `action_flag', `rulelength', unused now. | |
537 | ||
9af3fbce AD |
538 | 2002-06-11 Akim Demaille <akim@epita.fr> |
539 | ||
540 | * src/reader.c (grammar_current_rule_prec_set). | |
541 | (grammar_current_rule_check): New, eved out from... | |
542 | (readgram): here. | |
543 | Remove `xaction', `first_rhs': useless. | |
544 | * tests/input.at (Type clashes): New. | |
545 | * tests/existing.at (GNU Cim Grammar): Adjust. | |
546 | ||
1485e106 AD |
547 | 2002-06-11 Akim Demaille <akim@epita.fr> |
548 | ||
549 | * src/reader.c (grammar_midrule_action): New, Eved out from | |
550 | (readgram): here. | |
551 | ||
da4160c3 AD |
552 | 2002-06-11 Akim Demaille <akim@epita.fr> |
553 | ||
554 | * src/reader.c (grammar_rule_begin, previous_rule, current_rule): | |
555 | New. | |
556 | (readgram): Use them as replacement of inlined code, crule and | |
557 | crule1. | |
558 | ||
f6d0f937 AD |
559 | 2002-06-11 Akim Demaille <akim@epita.fr> |
560 | ||
561 | * src/reader.c (grammar_end, grammar_symbol_append): New. | |
562 | (readgram): Use them. | |
563 | Make the use of `p' as local as possible. | |
564 | ||
69078d4b AD |
565 | 2002-06-10 Akim Demaille <akim@epita.fr> |
566 | ||
567 | GCJ's parser requires the tokens to be defined before the prologue. | |
568 | ||
569 | * data/bison.simple: Output the token definition before the user's | |
570 | prologue. | |
571 | * tests/regression.at (Braces parsing, Duplicate string) | |
572 | (Mixing %token styles): Check the output from bison. | |
573 | (Early token definitions): New. | |
574 | ||
5e424082 AD |
575 | 2002-06-10 Akim Demaille <akim@epita.fr> |
576 | ||
577 | * src/symtab.c (symbol_user_token_number_set): Don't complain when | |
578 | assigning twice the same user number to a token, so that we can | |
579 | use it in... | |
580 | * src/lex.c (lex): here. | |
581 | Also use `symbol_class_set' instead of hand written code. | |
582 | * src/reader.c (parse_assoc_decl): Likewise. | |
583 | ||
44536b35 AD |
584 | 2002-06-10 Akim Demaille <akim@epita.fr> |
585 | ||
586 | * src/symtab.c, src/symtab.c (symbol_class_set) | |
587 | (symbol_user_token_number_set): New. | |
588 | * src/reader.c (parse_token_decl): Use them. | |
589 | Use a switch instead of ifs. | |
590 | Use a single argument. | |
591 | ||
8b9f2372 AD |
592 | 2002-06-10 Akim Demaille <akim@epita.fr> |
593 | ||
594 | Remove `%thong' support as it is undocumented, unused, duplicates | |
595 | `%token's job, and creates useless e-mail traffic with people who | |
596 | want to know what it is, why it is undocumented, unused, and | |
597 | duplicates `%token's job. | |
598 | ||
599 | * src/reader.c (parse_thong_decl): Remove. | |
600 | * src/options.c (option_table): Remove "thong". | |
601 | * src/lex.h (tok_thong): Remove. | |
602 | ||
3ae2b51f AD |
603 | 2002-06-10 Akim Demaille <akim@epita.fr> |
604 | ||
605 | * src/symtab.c, src/symtab.c (symbol_type_set) | |
606 | (symbol_precedence_set): New. | |
607 | * src/reader.c (parse_type_decl, parse_assoc_decl): Use them. | |
608 | (value_components_used): Remove, unused. | |
609 | ||
2f1afb73 AD |
610 | 2002-06-09 Akim Demaille <akim@epita.fr> |
611 | ||
612 | Move symbols handling code out of the reader. | |
613 | ||
614 | * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken) | |
615 | (axiom): Move to... | |
616 | * src/symtab.h, src/symtab.c: here. | |
617 | ||
618 | * src/gram.c (start_symbol): Remove: use startsymbol->number. | |
619 | * src/reader.c (startval): Rename as... | |
620 | * src/symtab.h, src/symtab.c (startsymbol): this. | |
621 | * src/reader.c: Adjust. | |
622 | ||
623 | * src/reader.c (symbol_check_defined, symbol_make_alias) | |
624 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
625 | (token_translations_init) | |
626 | Move to... | |
627 | * src/symtab.c: here. | |
628 | * src/reader.c (packsymbols): Move to... | |
629 | * src/symtab.h, src/symtab.c (symbols_pack): here. | |
630 | * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as | |
631 | argument. | |
632 | ||
e9bca3ad AD |
633 | 2002-06-03 Akim Demaille <akim@epita.fr> |
634 | ||
635 | * src/muscle_tab.c (muscle_insert, muscle_find): Declarations, | |
636 | then statements. | |
637 | ||
86eff183 AD |
638 | 2002-06-03 Akim Demaille <akim@epita.fr> |
639 | ||
640 | * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize | |
641 | structs with non literals. | |
642 | * src/scan-skel.l: never-interactive. | |
643 | * src/conflicts.c (enum conflict_resolution_e): No trailing | |
644 | comma. | |
645 | * src/getargs.c (usage): Split long literal strings. | |
646 | Reported by Hans Aberg. | |
647 | ||
717be197 AD |
648 | 2002-05-28 Akim Demaille <akim@epita.fr> |
649 | ||
650 | * data/bison.c++: Use C++ ostreams. | |
651 | (cdebug_): New member. | |
652 | ||
670ddffd AD |
653 | 2002-05-28 Akim Demaille <akim@epita.fr> |
654 | ||
655 | * src/output.c (output_skeleton): Be sure to allocate enough room | |
656 | for `/' _and_ for `\0' in full_skeleton. | |
657 | ||
769b430f AD |
658 | 2002-05-28 Akim Demaille <akim@epita.fr> |
659 | ||
660 | * data/bison.c++: Catch up with bison.simple: | |
661 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
662 | and Paul Eggert <eggert@twinsun.com>: `error' handing. | |
663 | 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_, | |
664 | and popping traces. | |
665 | ||
7067cb36 PH |
666 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
667 | ||
668 | * src/output.c (output_skeleton): Put an explicit path in front of | |
669 | the skeleton file name, rather than relying on the -I directory, | |
670 | to partially alleviate effects of having a skeleton file lying around | |
671 | in the current directory. | |
769b430f | 672 | |
4a713ec2 PH |
673 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
674 | ||
769b430f | 675 | * src/conflicts.c (log_resolution): Correct typo: |
4a713ec2 PH |
676 | obstack_printf should be obstack_fgrow1. |
677 | ||
b408954b AD |
678 | 2002-05-26 Akim Demaille <akim@epita.fr> |
679 | ||
680 | * src/state.h (state_t): `solved_conflicts' is a new member. | |
681 | * src/LR0.c (new_state): Set it to 0. | |
682 | * src/conflicts.h, src/conflicts.c (print_conflicts) | |
683 | (free_conflicts, solve_conflicts): Rename as... | |
684 | (conflicts_print, conflicts_free, conflicts_solve): these. | |
685 | Adjust callers. | |
686 | * src/conflicts.c (enum conflict_resolution_e) | |
687 | (solved_conflicts_obstack): New, used by... | |
688 | (log_resolution): this. | |
689 | Adjust to attach the conflict resolution to each state. | |
690 | Complete the description with the precedence/associativity | |
691 | information. | |
692 | (resolve_sr_conflict): Adjust. | |
693 | * src/print.c (print_state): Output its solved_conflicts. | |
694 | * tests/conflicts.at (Unresolved SR Conflicts) | |
695 | (Solved SR Conflicts): Exercise --report=all. | |
696 | ||
a49aecd5 AD |
697 | 2002-05-26 Akim Demaille <akim@epita.fr> |
698 | ||
699 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
700 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
701 | * src/reader.c, src/reduce.c, src/state.h, src/symtab.h | |
702 | (token_number_t, item_number_as_token_number) | |
703 | (token_number_as_item_number, muscle_insert_token_number_table): | |
704 | Rename as... | |
705 | (symbol_number_t, item_number_as_symbol_number) | |
706 | (symbol_number_as_item_number, muscle_insert_symbol_number_table): | |
707 | these, since it is more appropriate. | |
708 | ||
5504898e AD |
709 | 2002-05-26 Akim Demaille <akim@epita.fr> |
710 | ||
711 | * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional | |
712 | `Error:' lines. | |
713 | * data/bison.simple (yystos) [YYDEBUG]: New. | |
714 | (yyparse) [YYDEBUG]: Display the symbols which are popped during | |
715 | error recovery. | |
716 | * tests/regression.at (Web2c Actions): Adjust: yystos is output now. | |
717 | ||
ec3bc396 AD |
718 | 2002-05-25 Akim Demaille <akim@epita.fr> |
719 | ||
720 | * doc/bison.texinfo (Debugging): Split into... | |
721 | (Tracing): this new section, its former contents, and... | |
722 | (Understanding): this new section. | |
723 | * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced | |
724 | by... | |
725 | (report_flag): this. | |
726 | Adjust all dependencies. | |
727 | (report_args, report_types, report_argmatch): New. | |
728 | (usage, getargs): Report/support -r, --report. | |
729 | * src/options.h | |
730 | (struct option_table_struct): Rename as.., | |
731 | (struct option_table_s): this. | |
732 | Rename the `set_flag' member to `flag' to match with getopt_long's | |
733 | struct. | |
734 | * src/options.c (option_table): Split verbose into an entry for | |
735 | %verbose, and another for --verbose. | |
736 | Support --report/-r, so remove -r from the obsolete --raw. | |
737 | * src/print.c: Attach full item sets and lookaheads reports to | |
738 | report_flag instead of trace_flag. | |
739 | * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1. | |
740 | ||
78df8250 PE |
741 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
742 | and Paul Eggert <eggert@twinsun.com> | |
769b430f | 743 | |
78df8250 PE |
744 | * data/bison.simple (yyparse): Correct error handling to conform to |
745 | POSIX and yacc. Specifically, after syntax error is discovered, | |
746 | do not reduce further before shifting the error token. | |
747 | Clean up the code a bit by removing the labels yyerrdefault, | |
748 | yyerrhandle, yyerrpop. | |
749 | * NEWS: Document the above. | |
750 | ||
c0c9ea05 PH |
751 | 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
752 | ||
753 | * data/bison.simple (yyr1): Don't use yy_token_number_type as element | |
754 | type; it isn't always big enough, since it doesn't necessarily | |
755 | include non-terminals. | |
769b430f | 756 | (yytranslate): Expand definition of yy_token_number_type, so that |
c0c9ea05 PH |
757 | the latter can be removed. |
758 | (yy_token_number_type): Remove, only one use. | |
759 | * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple--- | |
760 | don't use TokenNumberType as element type. | |
769b430f | 761 | |
c0c9ea05 PH |
762 | * tests/regression.at: Modify expected output to agree with change |
763 | to yyr1 and yytranslate. | |
769b430f | 764 | |
6390a83f FK |
765 | 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com> |
766 | ||
767 | * src/reader.c (parse_action): Use copy_character instead of | |
768 | obstack_1grow. | |
769 | ||
db7c8e9a AD |
770 | 2002-05-13 Akim Demaille <akim@epita.fr> |
771 | ||
772 | * tests/regression.at (Token definitions): Prototype yylex and | |
773 | yyerror. | |
774 | ||
fcc61800 PH |
775 | 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
776 | ||
158c687b | 777 | * src/scan-skel.l: Correct off-by-one error in handling of __oline__. |
fcc61800 PH |
778 | * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect |
779 | 32-bit arithmetic. | |
780 | * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto. | |
781 | ||
5683e9b2 AD |
782 | 2002-05-07 Akim Demaille <akim@epita.fr> |
783 | ||
784 | * tests/synclines.at: Be sure to prototype yylex and yyerror to | |
785 | avoid GCC warnings. | |
786 | ||
0c2d3f4c AD |
787 | 2002-05-07 Akim Demaille <akim@epita.fr> |
788 | ||
789 | Kill GCC warnings. | |
790 | ||
791 | * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop | |
792 | over the RHS of each rule. | |
793 | * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int. | |
794 | * src/state.h (state_t): Member `nitems' is unsigned short. | |
795 | * src/LR0.c (get_state): Adjust. | |
796 | * src/reader.c (packgram): Likewise. | |
797 | * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type | |
798 | `Type'. | |
799 | (muscle_insert_int_table): Remove, unused. | |
800 | (prepare_rules): Remove `max'. | |
801 | ||
1565b720 AD |
802 | 2002-05-06 Akim Demaille <akim@epita.fr> |
803 | ||
804 | * src/closure.c (print_firsts): Display of the symbol tags. | |
805 | (bitmatrix_print): Move to... | |
806 | * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump): | |
807 | here. | |
808 | * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust. | |
809 | ||
cfaee611 AD |
810 | 2002-05-06 Akim Demaille <akim@epita.fr> |
811 | ||
812 | * src/muscle_tab.c (muscle_m4_output): Must return TRUE for | |
813 | hash_do_for_each. | |
814 | ||
458be8e0 AD |
815 | 2002-05-06 Akim Demaille <akim@epita.fr> |
816 | ||
817 | * src/LR0.c (new_state, get_state): Instead of using the global | |
818 | `kernel_size' and `kernel_base', have two new arguments: | |
819 | `core_size' and `core'. | |
820 | Adjust callers. | |
821 | ||
a900a624 AD |
822 | 2002-05-06 Akim Demaille <akim@epita.fr> |
823 | ||
824 | * src/reader.c (packgram): No longer end `ritem' with a 0 | |
825 | sentinel: it is not used. | |
826 | ||
d4e7d3a1 AD |
827 | 2002-05-05 Akim Demaille <akim@epita.fr> |
828 | ||
829 | New experimental feature: display the lookaheads in the report and | |
830 | graph. | |
831 | ||
832 | * src/print (print_core): When --trace-flag, display the rules | |
833 | lookaheads. | |
834 | * src/print_graph.c (print_core): Likewise. | |
835 | Swap the arguments. | |
836 | Adjust caller. | |
837 | ||
39ceb25b AD |
838 | 2002-05-05 Akim Demaille <akim@epita.fr> |
839 | ||
840 | * tests/torture.at (Many lookaheads): New test. | |
841 | ||
5372019f AD |
842 | 2002-05-05 Akim Demaille <akim@epita.fr> |
843 | ||
844 | * src/output.c (GENERATE_OUTPUT_TABLE): Replace with... | |
845 | (GENERATE_MUSCLE_INSERT_TABLE): this. | |
846 | (output_int_table, output_unsigned_int_table, output_short_table) | |
847 | (output_token_number_table, output_item_number_table): Replace with... | |
848 | (muscle_insert_int_table, muscle_insert_unsigned_int_table) | |
849 | (muscle_insert_short_table, muscle_insert_token_number_table) | |
850 | (muscle_insert_item_number_table): these. | |
851 | Adjust all callers. | |
852 | (prepare_tokens): Don't free `translations', since... | |
853 | * src/reader.h, src/reader.c (grammar_free): do it. | |
854 | Move to... | |
855 | * src/gram.h, src/gram.c (grammar_free): here. | |
856 | * data/bison.simple, data/bison.c++: b4_token_number_max is now | |
857 | b4_translate_max. | |
858 | ||
5df5f6d5 AD |
859 | 2002-05-05 Akim Demaille <akim@epita.fr> |
860 | ||
861 | * src/output.c (output_unsigned_int_table): New. | |
862 | (prepare_rules): `i' is unsigned. | |
863 | `prhs', `rline', `r2' are unsigned int. | |
864 | Rename muscle `rhs_number_max' as `rhs_max'. | |
865 | Output muscles `prhs_max', `rline_max', and `r2_max'. | |
866 | Free rline and r1. | |
867 | * data/bison.simple, data/bison.c++: Adjust to use these muscles | |
868 | to compute types instead of constant types. | |
869 | * tests/regression.at (Web2c Actions): Adjust. | |
870 | ||
b87f8b21 AD |
871 | 2002-05-04 Akim Demaille <akim@epita.fr> |
872 | ||
873 | * src/symtab.h (SALIAS, SUNDEF): Rename as... | |
874 | (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these. | |
875 | Adjust dependencies. | |
876 | * src/output.c (token_definitions_output): Be sure not to output a | |
877 | `#define 'a'' when fed with `%token 'a' "a"'. | |
878 | * tests/regression.at (Token definitions): New. | |
879 | ||
8bb936e4 PE |
880 | 2002-05-03 Paul Eggert <eggert@twinsun.com> |
881 | ||
882 | * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE | |
883 | for K&R C. | |
884 | ||
885 | 2002-05-03 gettextize <bug-gnu-gettext@gnu.org> | |
886 | ||
887 | * Makefile.am (SUBDIRS): Remove intl. | |
888 | (EXTRA_DIST): Add config/config.rpath. | |
889 | ||
53c71a12 AD |
890 | 2002-05-03 Akim Demaille <akim@epita.fr> |
891 | ||
892 | * data/bison.simple (m4_if): Don't output empty enums. | |
893 | And actually, output valid enum definitions :(. | |
894 | ||
289dd0cf AD |
895 | 2002-05-03 Akim Demaille <akim@epita.fr> |
896 | ||
897 | * configure.bat: Remove, completely obsolete. | |
898 | * Makefile.am (EXTRA_DIST): Adjust. | |
899 | Don't distribute config.rpath... | |
900 | * config/Makefile.am (EXTRA_DIST): Do it. | |
901 | ||
db85e524 AD |
902 | 2002-05-03 Akim Demaille <akim@epita.fr> |
903 | ||
904 | * configure.in (GETTEXT_VERSION): New. | |
905 | Suggested by Bruno Haible for the forthcoming Gettext 0.10.3. | |
906 | ||
83ccf991 AD |
907 | 2002-05-03 Akim Demaille <akim@epita.fr> |
908 | ||
909 | * data/bison.simple (b4_token_enum): New. | |
910 | (b4_token_defines): Use it to output tokens both as #define and | |
911 | enums. | |
912 | Suggested by Paul Eggert. | |
913 | * src/output.c (token_definitions_output): Don't output spurious | |
914 | white spaces. | |
915 | ||
1f418995 AD |
916 | 2002-05-03 Akim Demaille <akim@epita.fr> |
917 | ||
918 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
919 | ||
45119f04 RA |
920 | 2002-05-02 Robert Anisko <robert@lrde.epita.fr> |
921 | ||
922 | * data/bison.c++: Adapt expansion of $s and @s to the C++ parser. | |
923 | Update the stack class, give a try to deque as the default container. | |
924 | ||
b2d52318 AD |
925 | 2002-05-02 Akim Demaille <akim@epita.fr> |
926 | ||
927 | * data/bison.simple (yyparse): Do not implement @$ = @1. | |
928 | (YYLLOC_DEFAULT): Adjust to do it. | |
929 | * doc/bison.texinfo (Location Default Action): Fix. | |
930 | ||
3a8b4109 AD |
931 | 2002-05-02 Akim Demaille <akim@epita.fr> |
932 | ||
933 | * src/reader.c (parse_braces): Merge into... | |
934 | (parse_action): this. | |
935 | ||
84614e13 AD |
936 | 2002-05-02 Akim Demaille <akim@epita.fr> |
937 | ||
938 | * configure.in (ALL_LINGUAS): Remove. | |
939 | * po/LINGUAS, hr.po: New. | |
940 | ||
fdbcd8e2 AD |
941 | 2002-05-02 Akim Demaille <akim@epita.fr> |
942 | ||
943 | Remove the so called hairy (semantic) parsers. | |
944 | ||
945 | * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove. | |
946 | * src/gram.h, src/gram.c (semantic_parser): Remove. | |
947 | (rule_t): Remove the guard and guard_line members. | |
948 | * src/lex.h (token_t): remove tok_guard. | |
949 | * src/options.c (option_table): Remove %guard and %semantic_parser | |
950 | support. | |
951 | * src/output.c, src/output.h (guards_output): Remove. | |
952 | (prepare): Adjust. | |
953 | (token_definitions_output): Don't output the `T' | |
954 | tokens (???). | |
955 | (output_skeleton): Don't output the guards. | |
956 | * src/files.c, src/files.c (attrsfile): Remove. | |
957 | * src/reader.c (symbol_list): Remove the guard and guard_line | |
958 | members. | |
959 | Adjust dependencies. | |
960 | (parse_guard): Remove. | |
961 | * data/bison.hairy: Remove. | |
962 | * doc/bison.texinfo (Environment Variables): Remove occurrences of | |
963 | BISON_HAIRY. | |
964 | ||
82b6cb3f AD |
965 | 2002-05-02 Akim Demaille <akim@epita.fr> |
966 | ||
967 | * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action) | |
968 | (parse_guard): Rename the formal argument `stack_offset' as | |
969 | `rule_length', which is more readable. | |
970 | Adjust callers. | |
971 | (copy_at, copy_dollar): Instead of outputting the hard coded | |
972 | values of $$, $n and so forth, output invocation to b4_lhs_value, | |
973 | b4_lhs_location, b4_rhs_value, and b4_rhs_location. | |
900c877b AD |
974 | Note: this patch partially drops `semantic-parser' support: it |
975 | always does `rule_length - n', where semantic parsers ought to | |
976 | always use `-n'. | |
82b6cb3f AD |
977 | * data/bison.simple, data/bison.c++ (b4_lhs_value) |
978 | (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New. | |
979 | ||
6cbfbcc5 AD |
980 | 2002-05-02 Akim Demaille <akim@epita.fr> |
981 | ||
982 | * configure.in (AC_INIT): Bump to 1.49b. | |
983 | (AM_INIT_AUTOMAKE): Short invocation. | |
984 | ||
b8548114 AD |
985 | 2002-05-02 Akim Demaille <akim@epita.fr> |
986 | ||
987 | Version 1.49a. | |
988 | ||
c20cd1fa AD |
989 | 2002-05-01 Akim Demaille <akim@epita.fr> |
990 | ||
991 | * src/skeleton.h: Remove. | |
992 | ||
8a9566d4 AD |
993 | 2002-05-01 Akim Demaille <akim@epita.fr> |
994 | ||
995 | * src/skeleton.h: Fix the #endif. | |
996 | Reported by Magnus Fromreide. | |
997 | ||
8c6d399a PE |
998 | 2002-04-26 Paul Eggert <eggert@twinsun.com> |
999 | ||
1000 | * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL): | |
1001 | Define if we define YYSTYPE and YYLTYPE, respectively. | |
b756bb75 | 1002 | (YYCOPY): Fix [] quoting problem in the non-GCC case. |
8a9566d4 | 1003 | |
2b7ed18a RA |
1004 | 2002-04-25 Robert Anisko <robert@lrde.epita.fr> |
1005 | ||
1006 | * src/scan-skel.l: Postprocess quadrigraphs. | |
1007 | ||
1008 | * src/reader.c (copy_character): New function, used to output | |
1009 | single characters while replacing `[' and `]' with quadrigraphs, to | |
1010 | avoid troubles with M4 quotes. | |
1011 | (copy_comment): Output characters with copy_character. | |
1012 | (read_additionnal_code): Likewise. | |
1013 | (copy_string2): Likewise. | |
1014 | (copy_definition): Likewise. | |
1015 | ||
1016 | * tests/calc.at: Exercise M4 quoting. | |
1017 | ||
34a89c50 AD |
1018 | 2002-04-25 Akim Demaille <akim@epita.fr> |
1019 | ||
1020 | * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space | |
1021 | between `!' and the command. | |
1022 | Reported by Paul Eggert. | |
1023 | ||
0dd1580a RA |
1024 | 2002-04-24 Robert Anisko <robert@lrde.epita.fr> |
1025 | ||
1026 | * tests/calc.at: Exercise prologue splitting. | |
1027 | ||
1028 | * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and | |
1029 | `b4_post_prologue' instead of `b4_prologue'. | |
1030 | ||
1031 | * src/output.c (prepare): Add the `pre_prologue' and `post_prologue' | |
1032 | muscles. | |
1033 | (output): Free pre_prologue_obstack and post_prologue_obstack. | |
1034 | * src/files.h, src/files.c (attrs_obstack): Remove. | |
1035 | (pre_prologue_obstack, post_prologue_obstack): New. | |
1036 | * src/reader.c (copy_definition): Add a parameter to specify the | |
1037 | obstack to fill, instead of using attrs_obstack unconditionally. | |
1038 | (read_declarations): Pass pre_prologue_obstack to copy_definition if | |
1039 | `%union' has not yet been seen, pass post_prologue_obstack otherwise. | |
1040 | ||
83c1796f PE |
1041 | 2002-04-23 Paul Eggert <eggert@twinsun.com> |
1042 | ||
1043 | * data/bison.simple: Remove unnecessary commentary and white | |
1044 | space differences from 1_29-branch. | |
1045 | Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE). | |
1046 | ||
1047 | (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY, | |
1048 | YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or | |
1049 | if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial | |
1050 | constructors or destructors. | |
1051 | ||
1052 | (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack. | |
1053 | ||
1207eeac AD |
1054 | 2002-04-23 Akim Demaille <akim@epita.fr> |
1055 | ||
1056 | * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels. | |
1057 | * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's | |
1058 | location with columns. | |
1059 | * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'. | |
1060 | All reported by Paul Eggert. | |
1061 | ||
78ab8f67 AD |
1062 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1063 | ||
1064 | * src/reduce.c (dump_grammar): Move to... | |
1065 | * src/gram.h, src/gram.c (grammar_dump): here. | |
1066 | Be sure to separate long item numbers. | |
1067 | Don't read the members of a rule's prec if its nil. | |
1068 | ||
133c20e2 AD |
1069 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1070 | ||
1071 | * src/output.c (table_size, table_grow): New. | |
1072 | (MAXTABLE): Remove, replace uses with table_size. | |
1073 | (pack_vector): Instead of dying when the table is too big, grow it. | |
1074 | ||
9515e8a7 AD |
1075 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1076 | ||
1077 | * data/bison.simple (yyr1): Its type is that of a token number. | |
1078 | * data/bison.c++ (r1_): Likewise. | |
1079 | * tests/regression.at (Web2c Actions): Adjust. | |
1080 | ||
23c5a174 AD |
1081 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1082 | ||
1083 | * src/reader.c (token_translations_init): 256 is now the default | |
1084 | value for the error token, i.e., it will be assigned another | |
1085 | number if the user assigned 256 to one of her tokens. | |
1086 | (reader): Don't force 256 to error. | |
1087 | * doc/bison.texinfo (Symbols): Adjust. | |
1088 | * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR) | |
1089 | (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3 | |
1090 | etc. instead of 10, 20, 30 (which was used to `jump' over error | |
1091 | (256) and undefined (2)). | |
1092 | ||
5fbb0954 AD |
1093 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1094 | ||
1095 | Propagate more token_number_t. | |
1096 | ||
1097 | * src/gram.h (token_number_as_item_number) | |
1098 | (item_number_as_token_number): New. | |
1099 | * src/output.c (GENERATE_OUTPUT_TABLE): New. | |
1100 | Use it to create output_item_number_table and | |
1101 | output_token_number_table. | |
1102 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
1103 | * src/lex.c, src/nullable.c, src/output.c, src/print.c, | |
1104 | * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h, | |
1105 | * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts. | |
1106 | ||
4f940944 AD |
1107 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1108 | ||
1109 | * src/output.h, src/output.c (get_lines_number): Remove. | |
1110 | ||
3ded9a63 AD |
1111 | 2002-04-19 Akim Demaille <akim@epita.fr> |
1112 | ||
1113 | * doc/bison.texinfo (Actions): Make clear that `|' is not the same | |
1114 | as Lex/Flex'. | |
1115 | (Debugging): More details about enabling the debugging features. | |
1116 | (Table of Symbols): Describe $$, $n, @$, and @n. | |
1117 | Suggested by Tim Josling. | |
1118 | ||
e0c471a9 AD |
1119 | 2002-04-19 Akim Demaille <akim@epita.fr> |
1120 | ||
1121 | * doc/bison.texinfo: Remove the uses of the obsolete @refill. | |
1122 | ||
fecc10cd AD |
1123 | 2002-04-10 Akim Demaille <akim@epita.fr> |
1124 | ||
1125 | * src/system.h: Rely on HAVE_LIMITS_H. | |
1126 | Suggested by Paul Eggert. | |
1127 | ||
51dec47b AD |
1128 | 2002-04-09 Akim Demaille <akim@epita.fr> |
1129 | ||
1130 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the | |
1131 | full stderr, and strip it according to the bison options, instead | |
1132 | of composing the error message from different bits. | |
1133 | This makes it easier to check for several error messages. | |
1134 | Adjust all the invocations. | |
1135 | Add an invocation exercising the error token. | |
1136 | Add an invocation demonstrating a stupid error message. | |
1137 | (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0. | |
1138 | Adjust the tests. | |
1139 | Error message are for stderr, not stdout. | |
1140 | ||
007a50a4 AD |
1141 | 2002-04-09 Akim Demaille <akim@epita.fr> |
1142 | ||
1143 | * src/gram.h, src/gram.c (error_token_number): Remove, use | |
1144 | errtoken->number. | |
1145 | * src/reader.c (reader): Don't specify the user token number (2) | |
1146 | for $undefined, as it uselessly prevents using it. | |
1147 | * src/gram.h (token_number_t): Move to... | |
1148 | * src/symtab.h: here. | |
1149 | (state_t.number): Is a token_number_t. | |
1150 | * src/print.c, src/reader.c: Use undeftoken->number instead of | |
1151 | hard coded 2. | |
1152 | (Even though this 2 is not the same as above: the number of the | |
1153 | undeftoken remains being 2, it is its user token number which | |
1154 | might not be 2). | |
1155 | * src/output.c (prepare_tokens): Rename the `maxtok' muscle with | |
1156 | `user_token_number_max'. | |
1157 | Output `undef_token_number'. | |
1158 | * data/bison.simple, data/bison.c++: Use them. | |
1159 | Be sure to map invalid yylex return values to | |
1160 | `undef_token_number'. This saves us from gratuitous SEGV. | |
1161 | ||
1162 | * tests/conflicts.at (Solved SR Conflicts) | |
1163 | (Unresolved SR Conflicts): Adjust. | |
1164 | * tests/regression.at (Web2c Actions): Adjust. | |
1165 | ||
06446ccf AD |
1166 | 2002-04-08 Akim Demaille <akim@epita.fr> |
1167 | ||
1168 | * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/. | |
1169 | Adding #line. | |
1170 | Remove the duplicate `typedefs'. | |
1171 | (RhsNumberType): Fix the declaration and various other typos. | |
1172 | Use __ofile__. | |
1173 | * data/bison.simple: Use __ofile__. | |
1174 | * src/scan-skel.l: Handle __ofile__. | |
1175 | ||
62a3e4f0 AD |
1176 | 2002-04-08 Akim Demaille <akim@epita.fr> |
1177 | ||
1178 | * src/gram.h (item_number_t): New, the type of item numbers in | |
1179 | RITEM. Note that it must be able to code symbol numbers as | |
1180 | positive number, and the negation of rule numbers as negative | |
1181 | numbers. | |
1182 | Adjust all dependencies (pretty many). | |
1183 | * src/reduce.c (rule): Remove this `short *' pointer: use | |
1184 | item_number_t. | |
1185 | * src/system.h (MINSHORT, MAXSHORT): Remove. | |
1186 | Include `limits.h'. | |
1187 | Adjust dependencies to using SHRT_MAX and SHRT_MIN. | |
1188 | (shortcpy): Remove. | |
1189 | (MAXTABLE): Move to... | |
1190 | * src/output.c (MAXTABLE): here. | |
1191 | (prepare_rules): Use output_int_table to output rhs. | |
1192 | * data/bison.simple, data/bison.c++: Adjust. | |
1193 | * tests/torture.at (Big triangle): Move the limit from 254 to | |
1194 | 500. | |
1195 | * tests/regression.at (Web2c Actions): Ajust. | |
1196 | ||
1197 | Trying with bigger grammars shows various phenomena: at 3000 (28Mb | |
1198 | of grammar file) bison is killed by my system, at 2000 (12Mb) bison | |
1199 | passes, but produces negative #line number, once fixed, GCC is | |
1200 | killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of | |
1201 | C), it passes. | |
1202 | * src/state.h (state_h): Code input lines on ints, not shorts. | |
1203 | ||
bb88b0fc AD |
1204 | 2002-04-08 Akim Demaille <akim@epita.fr> |
1205 | ||
1206 | * src/reduce.c (reduce_grammar): First reduce the nonterminals, | |
1207 | and then the grammar. | |
1208 | ||
9a636f47 AD |
1209 | 2002-04-08 Akim Demaille <akim@epita.fr> |
1210 | ||
1211 | * src/system.h: No longer using strndup. | |
1212 | ||
680e8701 AD |
1213 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1214 | ||
1215 | * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New. | |
1216 | * src/output.c (output_table_data): Return the longest number. | |
1217 | (prepare_tokens): Output `token_number_max'). | |
1218 | * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type): | |
1219 | New. | |
1220 | Use them to define yy_token_number_type/TokenNumberType. | |
1221 | Use this type for yytranslate. | |
1222 | * tests/torture.at (Big triangle): Push the limit from 124 to | |
1223 | 253. | |
1224 | * tests/regression.at (Web2c Actions): Adjust. | |
1225 | ||
817e9f41 AD |
1226 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1227 | ||
1228 | * tests/torture.at (Big triangle): New. | |
1229 | (GNU AWK Grammar, GNU Cim Grammar): Move to... | |
1230 | * tests/existing.at: here. | |
1231 | ||
5123689b AD |
1232 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1233 | ||
1234 | * src/gram.h, src/gram.c (nitems): Remove, it is an alias of | |
1235 | nritems. | |
1236 | Adjust dependencies. | |
1237 | ||
f3849179 AD |
1238 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1239 | ||
1240 | * src/reader.c: Normalize increments to prefix form. | |
1241 | ||
bd02036a AD |
1242 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1243 | ||
1244 | * src/reader.c, symtab.c: Remove debugging code. | |
1245 | ||
db8837cb AD |
1246 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1247 | ||
1248 | Rename all the `bucket's as `symbol_t'. | |
1249 | ||
1250 | * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c, | |
1251 | * src/reader.c, src/reader.h, src/reduce.c, src/state.h, | |
1252 | * src/symtab.c, src/symtab.h (bucket): Rename as... | |
1253 | (symbol_t): this. | |
1254 | (symbol_list_new, bucket_check_defined, bucket_make_alias) | |
1255 | (bucket_check_alias_consistence, bucket_pack, bucket_translation) | |
1256 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
1257 | (buckets_new, buckets_free, buckets_do): Rename as... | |
1258 | (symbol_list_new, symbol_check_defined, symbol_make_alias) | |
1259 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
1260 | (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t) | |
1261 | (symbols_new, symbols_free, symbols_do): these. | |
1262 | ||
72a23c97 AD |
1263 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1264 | ||
1265 | Use lib/hash for the symbol table. | |
1266 | ||
1267 | * src/gram.c (ntokens): Initialize to 1, to reserve a slot for | |
1268 | EOF. | |
1269 | * src/lex.c (lex): Set the `number' member of new terminals. | |
1270 | * src/reader.c (bucket_check_defined, bucket_make_alias) | |
1271 | (bucket_check_alias_consistence, bucket_translation): New. | |
1272 | (reader, grammar_free, readgram, token_translations_init) | |
1273 | (packsymbols): Adjust. | |
1274 | (reader): Number the predefined tokens. | |
1275 | * src/reduce.c (inaccessable_symbols): Just use hard coded numbers | |
1276 | for predefined tokens. | |
1277 | * src/symtab.h (bucket): Remove all the hash table related | |
1278 | members. | |
1279 | * src/symtab.c (symtab): Replace by... | |
1280 | (bucket_table): this. | |
1281 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
1282 | (buckets_new, buckets_do): New. | |
1283 | ||
280a38c3 AD |
1284 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1285 | ||
1286 | * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems) | |
1287 | (start_symbol, max_user_token_number, semantic_parser) | |
1288 | (error_token_number): Initialize. | |
1289 | * src/reader.c (grammar, start_flag, startval, typed, lastprec): | |
1290 | Initialize. | |
1291 | (reader): Don't. | |
1292 | (errtoken, eoftoken, undeftoken, axiom): Extern. | |
1293 | ||
03b31c0c AD |
1294 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1295 | ||
1296 | * src/gram.h (rule_s): prec and precsym are now pointers | |
1297 | to the bucket giving the priority/associativity. | |
1298 | Member `associativity' removed: useless. | |
1299 | * src/reduce.c, src/conflicts.c: Adjust. | |
1300 | ||
8b3df748 AD |
1301 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1302 | ||
1303 | * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c: | |
1304 | Properly escape the symbols' TAG when outputting them. | |
1305 | ||
e601aa1d AD |
1306 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1307 | ||
1308 | * src/lalr.h (LA): Is a bitsetv, not bitset*. | |
1309 | ||
b0299a2e AD |
1310 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1311 | ||
1312 | * src/lalr.h, src/lalr.c (LAruleno): Replace with... | |
1313 | (LArule): this, which is an array to rule_t*. | |
1314 | * src/print.c, src/conflicts.c: Adjust. | |
1315 | ||
d7e1f00c AD |
1316 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1317 | ||
1318 | * src/gram.h (rule_t): Rename `number' as `user_number'. | |
1319 | `number' is a new member. | |
1320 | Adjust dependencies. | |
1321 | * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number. | |
1322 | ||
cc9305dd AD |
1323 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1324 | ||
1325 | As a result of the previous patch, it is no longer needed | |
1326 | to reorder ritem itself. | |
1327 | ||
1328 | * src/reduce.c (reduce_grammar_tables): Don't sort RITEM. | |
1329 | ||
b0940840 AD |
1330 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1331 | ||
1332 | Be sure never to walk through RITEMS, but use only data related to | |
1333 | the rules themselves. RITEMS should be banished. | |
1334 | ||
1335 | * src/output.c (output_token_translations): Rename as... | |
1336 | (prepare_tokens): this. | |
1337 | In addition to `translate', prepare the muscles `tname' and | |
1338 | `toknum', which were handled by... | |
1339 | (output_rule_data): this. | |
1340 | Remove, and move the remainder of its outputs into... | |
1341 | (prepare_rules): this new routines, which also merges content from | |
1342 | (output_gram): this. | |
1343 | (prepare_rules): Be sure never to walk through RITEMS. | |
1344 | (output_stos): Rename as... | |
1345 | (prepare_stos): this. | |
1346 | (output): Always invoke prepare_states, after all, just don't use it | |
1347 | in the output if you don't need it. | |
1348 | ||
643a5994 AD |
1349 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1350 | ||
1351 | * src/LR0.c (new_state): Display `nstates' as the name of the | |
1352 | newly created state. | |
1353 | Adjust to initialize first_state and last_state if needed. | |
1354 | Be sure to distinguish the initial from the final state. | |
1355 | (new_states): Create the itemset of the initial state, and use | |
1356 | new_state. | |
1357 | * src/closure.c (closure): Now that the initial state has its | |
1358 | items properly set, there is no need for a special case when | |
1359 | creating `ruleset'. | |
1360 | ||
1361 | As a result, now the rule 0, reducing to $axiom, is visible in the | |
1362 | outputs. Adjust the test suite. | |
1363 | ||
1364 | * tests/conflicts.at (Solved SR Conflicts) | |
1365 | (Unresolved SR Conflicts): Adjust. | |
1366 | * tests/regression.at (Web2c Report, Rule Line Numbers): Idem. | |
1367 | * tests/conflicts.at (S/R in initial): New. | |
1368 | ||
b4c4ccc2 AD |
1369 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1370 | ||
1371 | * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over | |
1372 | the RHS of the rules. | |
1373 | * src/output.c (output_gram): Likewise. | |
1374 | ||
bba97eb2 AD |
1375 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1376 | ||
1377 | * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's | |
1378 | bucket. | |
1379 | Adjust all dependencies. | |
1380 | * src/reduce.c (nonterminals_reduce): Don't forget to renumber the | |
1381 | `number' of the buckets too. | |
1382 | * src/gram.h: Include `symtab.h'. | |
1383 | (associativity): Move to... | |
1384 | * src/symtab.h: here. | |
1385 | No longer include `gram.h'. | |
1386 | ||
c3b407f4 AD |
1387 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1388 | ||
1389 | * src/gram.h, src/gram.c (rules_rhs_length): New. | |
1390 | (ritem_longest_rhs): Use it. | |
1391 | * src/gram.h (rule_t): `number' is a new member. | |
1392 | * src/reader.c (packgram): Set it. | |
1393 | * src/reduce.c (reduce_grammar_tables): Move the useless rules at | |
1394 | the end of `rules', and count them out of `nrules'. | |
1395 | (reduce_output, dump_grammar): Adjust. | |
1396 | * src/print.c (print_grammar): It is no longer needed to check for | |
1397 | the usefulness of a rule, as useless rules are beyond `nrules + 1'. | |
1398 | * tests/reduce.at (Reduced Automaton): New test. | |
1399 | ||
11652ab3 AD |
1400 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1401 | ||
1402 | * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a | |
1403 | lacking `+ 1' to nrules, Bison reported as useless a token if it | |
1404 | was used solely to set the precedence of the last rule... | |
1405 | ||
26b23c1a AD |
1406 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1407 | ||
1408 | * data/bison.c++, data/bison.simple: Don't output the current file | |
1409 | name in #line, to avoid useless diffs between two identical | |
1410 | outputs under different names. | |
1411 | ||
18bcecb0 AD |
1412 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1413 | ||
1414 | * src/closure.c, src/print.c, src/reader.c, src/reduce.c: | |
1415 | Normalize loops to using `< nrules + 1', not `<= nrules'. | |
1416 | ||
fa770c86 AD |
1417 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1418 | ||
1419 | * TODO: Update. | |
1420 | ||
d9b739c3 AD |
1421 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1422 | ||
1423 | * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename | |
1424 | bucket.value as bucket.number. | |
1425 | ||
99013900 AD |
1426 | 2002-04-07 Akim Demaille <akim@epita.fr> |
1427 | ||
1428 | * src/closure.c, src/derives.c, src/gram.h, src/lalr.c, | |
1429 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
1430 | * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the | |
1431 | RHS, instead of being an index in RITEMS. | |
1432 | ||
e966383b PE |
1433 | 2002-04-04 Paul Eggert <eggert@twinsun.com> |
1434 | ||
1435 | * doc/bison.texinfo: Update copyright date. | |
1436 | (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII. | |
1437 | (Symbols): Warn about running Bison in one character set, | |
1438 | but compiling and/or running in an incompatible one. | |
1439 | Warn about character code 256, too. | |
1440 | ||
1441 | 2002-04-03 Paul Eggert <eggert@twinsun.com> | |
1442 | ||
1443 | * src/bison.data (YYSTACK_ALLOC): Depend on whether | |
1444 | YYERROR_VERBOSE is nonzero, not whether it is defined. | |
1445 | ||
1446 | Merge changes from bison-1_29-branch. | |
c307773e | 1447 | |
8d6c48b9 PE |
1448 | 2002-03-20 Paul Eggert <eggert@twinsun.com> |
1449 | ||
1450 | Merge fixes from Debian bison_1.34-1.diff. | |
1451 | ||
1452 | * configure.in (AC_PREREQ): 2.53. | |
1453 | ||
e53c6322 AD |
1454 | 2002-03-20 Akim Demaille <akim@epita.fr> |
1455 | ||
1456 | * src/conflicts.c (log_resolution): Argument `resolution' is const. | |
1457 | ||
9ffbeca7 PE |
1458 | 2002-03-19 Paul Eggert <eggert@twinsun.com> |
1459 | ||
21db0b2a PE |
1460 | * src/bison.simple (YYCOPY): New macro. |
1461 | (YYSTACK_RELOCATE): Use it. | |
1462 | Remove Type arg; no longer needed. All callers changed. | |
1463 | (yymemcpy): Remove; no longer needed. | |
1464 | ||
9ffbeca7 PE |
1465 | * Makefile.am (AUTOMAKE_OPTIONS): 1.6. |
1466 | * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
1467 | ||
642cb8f8 AD |
1468 | 2002-03-19 Akim Demaille <akim@epita.fr> |
1469 | ||
1470 | Test and fix the #line outputs. | |
1471 | ||
1472 | * tests/atlocal.at (GCC): New. | |
1473 | * tests/synclines.at (AT_TEST_SYNCLINE): New macro. | |
1474 | (Prologue synch line, ,%union synch line, Postprologue synch line) | |
1475 | (Action synch line, Epilogue synch line): New tests. | |
1476 | * src/reader.c (parse_union_decl): Define the muscle stype_line. | |
1477 | * data/bison.simple, data/bison.c++: Use it. | |
1478 | ||
3c31a486 AD |
1479 | 2002-03-19 Akim Demaille <akim@epita.fr> |
1480 | ||
1481 | * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts) | |
1482 | (Solved SR Conflicts, %expect not enough, %expect right) | |
1483 | (%expect too much): Move to... | |
1484 | * tests/conflicts.at: this new file. | |
1485 | ||
0d8bed56 AD |
1486 | 2002-03-19 Akim Demaille <akim@epita.fr> |
1487 | ||
1488 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
1489 | * data/bison.simple, data/bison.c++: Handle the `#define' part, so | |
1490 | that we can move to enums for instance. | |
1491 | * src/output.c (token_definitions_output): Output a list of | |
1492 | `token-name, token-number' instead of the #define. | |
1493 | (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'. | |
1494 | ||
9208d17f AD |
1495 | 2002-03-14 Akim Demaille <akim@epita.fr> |
1496 | ||
1497 | Use Gettext 0.11.1. | |
1498 | ||
af27eacb RA |
1499 | 2002-03-09 Robert Anisko <robert@lrde.epita.fr> |
1500 | ||
1501 | * data/bison.c++: Make the user able to add members to the generated | |
1502 | parser by subclassing. | |
1503 | ||
9101a310 RA |
1504 | 2002-03-05 Robert Anisko <robert@lrde.epita.fr> |
1505 | ||
1506 | * src/reader.c (read_additionnal_code): `c' should be an integer, not | |
1507 | a character. | |
1508 | Reported by Nicolas Tisserand and Nicolas Burrus. | |
1509 | ||
fff9bf0b RA |
1510 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
1511 | ||
1512 | * src/reader.c: Warn about lacking semi-colons, do not complain. | |
1513 | ||
64dba31e RA |
1514 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
1515 | ||
1516 | * data/bison.c++: Remove a debug line. | |
1517 | ||
374f5a14 RA |
1518 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
1519 | ||
1520 | * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge | |
1521 | location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and | |
1522 | provide a default implementation. | |
1523 | ||
bfcf1f3a AD |
1524 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1525 | ||
1526 | * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'. | |
1527 | * tests/output.at (AT_CHECK_OUTPUT): Likewise. | |
1528 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto. | |
1529 | * tests/semantic.at (Parsing Guards): Similarly. | |
1530 | * src/reader.at (readgram): Complain if the last rule is not ended | |
1531 | with a semi-colon. | |
1532 | ||
65ccf9fc AD |
1533 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1534 | ||
1535 | * src/warshall.h, src/warshall.c (bitmatrix_print): Move to... | |
1536 | * src/closure.c: here. | |
1537 | (set_firsts): Use bitsetv_reflexive_transitive_closure instead of | |
1538 | RTC. | |
1539 | * src/warshall.h, src/warshall.c: Remove. | |
1540 | * tests/sets.at (Broken Closure): Adjust. | |
1541 | ||
d0039cbc AD |
1542 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1543 | ||
1544 | * src/output.c (output_skeleton): tempdir is const. | |
1545 | bytes_read is unused. | |
1546 | ||
345cea78 AD |
1547 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1548 | ||
1549 | * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
1550 | * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c: | |
1551 | Update. | |
1552 | From Michael Hayes. | |
1553 | ||
564801f7 AD |
1554 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1555 | ||
1556 | * src/closure.c (closure): `r' is unused. | |
1557 | ||
e5352bc7 AD |
1558 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1559 | ||
1560 | * tests/sets.at (Broken Closure): Add the ending `;'. | |
1561 | * src/reader.at (readgram): Complain if a rule is not ended with a | |
1562 | semi-colon. | |
1563 | ||
914feea9 AD |
1564 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1565 | ||
1566 | * src/conflicts.c (set_conflicts): Use bitset_disjoint_p. | |
1567 | (count_sr_conflicts): Use bitset_count. | |
1568 | * src/reduce.c (inaccessable_symbols): Ditto. | |
1569 | (bits_size): Remove. | |
1570 | * src/warshall.h, src/warshall.c: Convert to bitsetv. | |
1571 | ||
f0250de6 AD |
1572 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1573 | ||
1574 | * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c, | |
1575 | * src/reduce.c: Remove the `bitset_zero's following the | |
1576 | `bitset_create's, as now it is performed by the latter. | |
1577 | ||
ef017502 AD |
1578 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1579 | ||
1580 | * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h, | |
1581 | * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h, | |
1582 | * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the | |
1583 | latest sources from Michael. | |
1584 | ||
76514394 AD |
1585 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1586 | ||
1587 | * src/output.c (output): Don't free the grammar. | |
1588 | * src/reader.c (grammar_free): New. | |
1589 | * src/main.c (main): Call it and don't free symtab here. | |
1590 | ||
55024580 AD |
1591 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1592 | ||
1593 | * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer | |
1594 | before returning. | |
1595 | Reported by Benoit Perrot. | |
1596 | ||
f9abaa2c AD |
1597 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1598 | ||
1599 | Use bitset operations when possible, not loops over bits. | |
1600 | ||
1601 | * src/conflicts.c (set_conflicts, count_sr_conflicts): Use | |
1602 | bitset_or. | |
1603 | * src/print.c (print_reductions): Use bitset_and, bitset_andn. | |
1604 | * src/reduce.c (useless_nonterminals): Formatting changes. | |
1605 | * src/warshall.c (TC): Use bitset_or. | |
1606 | ||
0e721e75 AD |
1607 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1608 | ||
1609 | * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused. | |
1610 | * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET): | |
1611 | Ditto. | |
1612 | ||
0fb1ffb1 AD |
1613 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1614 | ||
1615 | * src/lalr.c (F): Now a bitset*. | |
1616 | Adjust all dependencies. | |
1617 | ||
b86796bf AD |
1618 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1619 | ||
1620 | * src/conflicts.c (shiftset, lookaheadset): Now bitset. | |
1621 | Adjust all dependencies. | |
1622 | ||
602bbf31 AD |
1623 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1624 | ||
1625 | * src/L0.c, src/LR0.h (nstates): Be size_t. | |
1626 | Adjust comparisons (signed vs unsigned). | |
1627 | * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a | |
1628 | bitset*. | |
1629 | Adjust all dependencies. | |
1630 | ||
d8a0245c AD |
1631 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1632 | ||
1633 | * src/closure.c (firsts): Now, also a bitset. | |
1634 | Adjust all dependencies. | |
1635 | (varsetsize): Remove, now unused. | |
1636 | * src/warshall.h, src/warshall.c: Now work on arrays of bitsets. | |
1637 | ||
34ba9743 AD |
1638 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1639 | ||
1640 | * src/print.c: Convert to use bitset.h, not hand coded iterations | |
1641 | over ints. | |
1642 | ||
ed86e78c AD |
1643 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1644 | ||
1645 | * src/reduce.c: Convert to use bitset.h, not hand coded BSet. | |
1646 | ||
dfdb1797 AD |
1647 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1648 | ||
1649 | * src/closure.c (ruleset): Be a bitset. | |
1650 | (rulesetsize): Remove. | |
1651 | ||
7086e707 AD |
1652 | 2002-03-04 Akim Demaille <akim@epita.fr> |
1653 | ||
1654 | * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
1655 | * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, | |
1656 | * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New. | |
1657 | * src/closure.c (fderives): Be an array of bitsets. | |
1658 | ||
98254360 RA |
1659 | 2002-02-28 Robert Anisko <robert@lrde.epita.fr> |
1660 | ||
1661 | * data/bison.c++: Merge the two generated headers. Insert a copyright | |
1662 | notice in each output file. | |
1663 | ||
a75c057f AD |
1664 | 2002-02-28 Akim Demaille <akim@epita.fr> |
1665 | ||
1666 | * data/bison.c++: Copy the prologue of bison.simple to fetch | |
1667 | useful M4 definitions, such as b4_header_guard. | |
1668 | ||
06b00abc AD |
1669 | 2002-02-25 Akim Demaille <akim@epita.fr> |
1670 | ||
1671 | * src/getargs.c (version): Give the name of the authors, and use a | |
a75c057f AD |
1672 | translator friendly scheme for the bgr |
1673 | copyright notice. | |
06b00abc | 1674 | |
70e7d534 AD |
1675 | 2002-02-25 Akim Demaille <akim@epita.fr> |
1676 | ||
1677 | * src/output.c (header_output): Remove, now handled completely via | |
1678 | M4. | |
1679 | ||
abe017f6 AD |
1680 | 2002-02-25 Akim Demaille <akim@epita.fr> |
1681 | ||
1682 | * m4/m4.m4: New, from CVS Autoconf. | |
1683 | * configure.in: Invoke it. | |
1684 | * src/output.c (output_skeleton): Use its result instead of the | |
1685 | hard coded name. | |
1686 | ||
381fb12e AD |
1687 | 2002-02-25 Akim Demaille <akim@epita.fr> |
1688 | ||
1689 | * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from | |
1690 | Fileutils 4.1.5. | |
1691 | * configure.in: Invoke UTILS_FUNC_MKSTEMP. | |
1692 | * src/output.c (output_skeleton): Use mkstemp to create a real | |
1693 | temporary file. | |
1694 | Move the filling of `skeleton' and its muscle to... | |
1695 | (prepare): here. | |
1696 | (output): Move the definition of the prologue muscle to... | |
1697 | (prepare): here. | |
1698 | * src/system.h (DEFAULT_TMPDIR): New. | |
1699 | ||
6f38107f PE |
1700 | 2002-02-14 Paul Eggert <eggert@twinsun.com> |
1701 | ||
1702 | Remove the support for C++ namespace cleanliness; it was | |
1703 | causing more problems than it was curing, since it didn't work | |
1704 | properly on some nonstandard C++ compilers. This can wait | |
1705 | for a proper C++ parser. | |
1706 | ||
1707 | * NEWS: Document this. | |
1708 | * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention | |
1709 | of C++, as it's treated like C now. | |
1710 | * src/bison.simple (YYSTD): Remove. | |
1711 | (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL): | |
1712 | Treat C++ just like Standard C instead of trying to support | |
1713 | namespace cleanliness. | |
1714 | ||
80cce3da AD |
1715 | 2002-02-14 Akim Demaille <akim@epita.fr> |
1716 | ||
1717 | * tests/regression.at (else): Adjust to Andreas' change. | |
1718 | ||
842e8679 AD |
1719 | 2002-02-14 Akim Demaille <akim@epita.fr> |
1720 | ||
1721 | * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. | |
1722 | ||
4bda3f10 AD |
1723 | 2002-02-13 Andreas Schwab <schwab@suse.de> |
1724 | ||
1725 | * src/output.c (output_rule_data): Don't output NULL, it might | |
1726 | not be defined yet. | |
1727 | ||
4162fa07 | 1728 | 2002-02-11 Robert Anisko <robert@lrde.epita.fr> |
b418ecd8 | 1729 | |
4162fa07 RA |
1730 | * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue. |
1731 | (Copyright notice): Update. | |
b418ecd8 | 1732 | |
bd16a5dc AD |
1733 | 2002-02-11 Akim Demaille <akim@epita.fr> |
1734 | ||
1735 | * tests/regression.at (%nonassoc and eof): Don't include | |
1736 | nonportable headers. | |
1737 | ||
8d69a1a3 RA |
1738 | 2002-02-08 Robert Anisko <robert@lrde.epita.fr> |
1739 | ||
1740 | * data/bison.c++: Correct error recovery. Make the user able to | |
1741 | initialize the starting location. | |
1742 | ||
9b2d0677 AD |
1743 | 2002-02-07 Akim Demaille <akim@epita.fr> |
1744 | ||
1745 | * tests/input.at: New. | |
1746 | ||
69e2658b RA |
1747 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
1748 | ||
1749 | * data/bison.c++: Replace some direct m4 expansions by constants. Be | |
9b2d0677 | 1750 | more consistent when naming methods and variables. Put preprocessor |
69e2658b RA |
1751 | directives around tables only needed for debugging. |
1752 | ||
4aacc3a7 RA |
1753 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
1754 | ||
1755 | * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in | |
1756 | C++ parsers. | |
1757 | (yy::b4_name::parse): Use print_. | |
1758 | ||
762a801e RA |
1759 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
1760 | ||
1761 | * data/bison.c++ (yy::b4_name::parse): Error recovery is back. | |
1762 | ||
4bb2bc3f RA |
1763 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
1764 | ||
1765 | * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in | |
1766 | C++ parsers. | |
1767 | (yy::b4_name::parse): Build verbose error messages, and use error_. | |
1768 | ||
6b45a3ca RA |
1769 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
1770 | ||
1771 | * data/bison.c++: Fix m4 quoting in comments. | |
1772 | ||
50997c6e RA |
1773 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
1774 | ||
1775 | * data/bison.c++: Adjust the parser code. Fix some muscles that were | |
1776 | not expanded by m4. | |
1777 | ||
3f3eed27 AD |
1778 | 2002-02-05 Akim Demaille <akim@epita.fr> |
1779 | ||
1780 | * data/bison.c++: Adjust to the M4 back end. | |
1781 | More is certainly needed. | |
1782 | ||
be2a1a68 AD |
1783 | 2002-02-05 Akim Demaille <akim@epita.fr> |
1784 | ||
1785 | Give a try to M4 as a back end. | |
1786 | ||
1787 | * lib/readpipe.c: New, from wdiff. | |
1788 | * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and | |
1789 | BISON_HAIRY. | |
1790 | * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS | |
1791 | specific values. Now it is m4 that performs the lookup. | |
1792 | * src/parse-skel.y: Remove. | |
1793 | * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New. | |
1794 | * src/output.c (actions_output, guards_output) | |
1795 | (token_definitions_output): No longer keeps track of the output | |
1796 | line number, hence remove the second argument. | |
1797 | (guards_output): Check against the guard member of a rule, not the | |
1798 | action member. | |
1799 | Adjust callers. | |
1800 | (output_skeleton): Don't look for the skeleton location, let m4 do | |
1801 | that. | |
1802 | Create `/tmp/muscles.m4'. This is temporary, a proper temporary | |
1803 | file will be used. | |
1804 | Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton. | |
1805 | (prepare): Given that for the time being changesyntax is not | |
1806 | usable in M4, rename the muscles using `-' to `_'. | |
1807 | Define `defines_flag', `output_parser_name' and `output_header_name'. | |
1808 | * src/output.h (actions_output, guards_output) | |
1809 | (token_definitions_output): Adjust prototypes. | |
1810 | * src/scan-skel.l: Instead of scanning the skeletons, it now | |
1811 | processes the output of m4: `__oline__' and `#output'. | |
1812 | * data/bison.simple: Adjust to be used by M4(sugar). | |
1813 | * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up | |
1814 | to date. | |
1815 | * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR' | |
1816 | instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'. | |
1817 | * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New, | |
1818 | shamelessly stolen from CVS Autoconf. | |
1819 | ||
beda758b AD |
1820 | 2002-02-05 Akim Demaille <akim@epita.fr> |
1821 | ||
1822 | * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version. | |
1823 | * configure.in: Check for the declarations of free and malloc. | |
1824 | * src/muscle_tab.c: Adjust. | |
1825 | ||
5ece6d43 AD |
1826 | 2002-02-05 Akim Demaille <akim@epita.fr> |
1827 | ||
1828 | * src/muscle_tab.c (muscle_init): Don't default to NULL muscle | |
1829 | which have no values. | |
1830 | ||
5bb18f9a AD |
1831 | 2002-02-05 Akim Demaille <akim@epita.fr> |
1832 | ||
1833 | * src/bison.simple, src/bison.hairy, src/bison.c++: Move to... | |
1834 | * data/: here. | |
1835 | ||
894dd62e PE |
1836 | 2002-01-29 Paul Eggert <eggert@twinsun.com> |
1837 | ||
1838 | * src/bison.simple (YYSIZE_T): Do not define merely because | |
1839 | YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined. | |
1840 | On some platforms, <alloca.h> does not declare YYSTD (size_t). | |
1841 | ||
82841af7 AD |
1842 | 2002-01-27 Akim Demaille <akim@epita.fr> |
1843 | ||
1844 | Fix `%nonassoc and eof'. | |
1845 | ||
1846 | * src/state.c (errs_dup): Aaaah! The failure was due to bytes | |
1847 | which were not properly copied! Replace | |
1848 | memcpy (res->errs, src->errs, src->nerrs); | |
1849 | with | |
1850 | memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); | |
1851 | !!! | |
1852 | * tests/regression.at (%nonassoc and eof): Adjust to newest | |
1853 | Autotest: `.' is not in the PATH. | |
1854 | ||
318b76e9 AD |
1855 | 2002-01-27 Akim Demaille <akim@epita.fr> |
1856 | ||
1857 | * tests/sets.at (AT_EXTRACT_SETS): New. | |
1858 | (Nullable): Use it. | |
1859 | (Firsts): New. | |
1860 | ||
30d2f3d5 AD |
1861 | 2002-01-26 Akim Demaille <akim@epita.fr> |
1862 | ||
1863 | * tests/actions.at, tests/calc.at, tests/headers.at, | |
1864 | * tests/torture.at: Adjust to the newest Autotest which no longer | |
1865 | forces `.' in the PATH. | |
1866 | ||
30f8c395 AD |
1867 | 2002-01-25 Akim Demaille <akim@epita.fr> |
1868 | ||
1869 | * tests/regression.at (%nonassoc and eof): New. | |
1870 | Suggested by Robert Anisko. | |
1871 | ||
29ae55f1 AD |
1872 | 2002-01-24 Akim Demaille <akim@epita.fr> |
1873 | ||
1874 | Bison dumps core when trying to complain about broken input files. | |
1875 | Reported by Cris van Pelt. | |
1876 | ||
1877 | * src/lex.c (parse_percent_token): Be sure to set token_buffer. | |
1878 | * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge | |
1879 | into... | |
1880 | (Invalid inputs): Strengthen: exercise parse_percent_token. | |
1881 | ||
2b548aa6 RA |
1882 | 2002-01-24 Robert Anisko <robert.anisko@epita.fr> |
1883 | ||
1884 | * src/Makefile.am: Add bison.c++. | |
1885 | * src/bison.c++: New skeleton. | |
1886 | ||
bb0146c2 AD |
1887 | 2002-01-21 Paolo Bonzini <bonzini@gnu.org> |
1888 | ||
1889 | * po/it.po: New. | |
1890 | ||
bec30531 AD |
1891 | 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net> |
1892 | ||
1893 | * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. | |
1894 | ||
fc6edc45 MA |
1895 | 2002-01-20 Marc Autret <marc@gnu.org> |
1896 | ||
1897 | * src/files.c (compute_output_file_names): Fix | |
1898 | ||
5e5d5415 MA |
1899 | 2002-01-20 Marc Autret <marc@gnu.org> |
1900 | ||
1901 | * tests/output.at: New test. | |
1902 | * src/files.c (compute_base_names): Don't map extensions when | |
1903 | the YACC flag is set, use defaults. | |
1904 | Reported by Evgeny Stambulchik. | |
1905 | ||
44ea3fbd MA |
1906 | 2002-01-20 Marc Autret <marc@gnu.org> |
1907 | ||
bb0146c2 | 1908 | * src/system.h: Need to define __attribute__ away for non-GCC |
44ea3fbd MA |
1909 | compilers as well (i.e. the vendor C compiler). |
1910 | Suggested by Albert Chin-A-Young. | |
1911 | ||
338963d1 TVH |
1912 | 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be> |
1913 | ||
1914 | * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the | |
1915 | canonical definition. | |
1916 | * src/system.h: Use the canonical definition for PARAMS (avoids | |
1917 | a conflict with the macro from lib/hash.h). | |
1918 | ||
c57b2479 AD |
1919 | 2002-01-11 Akim Demaille <akim@epita.fr> |
1920 | ||
1921 | * configure.in: Use AC_FUNC_STRNLEN. | |
d9e9746c | 1922 | Fixes the failures observed on AIX 4.3 by H.Merijn Brand. |
c57b2479 | 1923 | |
b85810ae AD |
1924 | 2002-01-09 Akim Demaille <akim@epita.fr> |
1925 | ||
1926 | * src/files.c, src/files.h (output_infix): New. | |
1927 | (tab_extension): Remove. | |
1928 | (compute_base_names): Compute the former, drop the latter. | |
1929 | * src/output.c (prepare): Insert the muscles `output-infix', and | |
1930 | `output-suffix'. | |
1931 | * src/parse-skel.y (string, string.1): New. | |
1932 | (section.header): Use it. | |
1933 | (section.yacc): Remove. | |
1934 | (prefix): Remove too. | |
1935 | * src/scan-skel.l: Adjust. | |
1936 | * src/bison.simple, src/bison.hairy: Adjust. | |
1937 | ||
cae60122 AD |
1938 | 2002-01-09 Akim Demaille <akim@epita.fr> |
1939 | ||
1940 | * configure.in (WERROR_CFLAGS): Compute it. | |
1941 | * src/Makefile.am (CFLAGS): Pass it. | |
1942 | * tests/atlocal.in (CFLAGS): Idem. | |
1943 | * src/files.c: Fix a few warnings. | |
1944 | (get_extension_index): Remove, unused. | |
1945 | ||
ae404801 AD |
1946 | 2002-01-08 Akim Demaille <akim@epita.fr> |
1947 | ||
1948 | * src/getargs.c (AS_FILE_NAME): New. | |
1949 | (getargs): Use it to convert DOSish file names. | |
1950 | * src/files.c (base_name): Rename as full_base_name to avoid | |
1951 | clashes with `base_name ()'. | |
1952 | (filename_split): New. | |
1953 | (compute_base_names): N-th rewrite, using filename_split. | |
1954 | ||
22312b71 AD |
1955 | 2002-01-08 Akim Demaille <akim@epita.fr> |
1956 | ||
1957 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
1958 | New, stolen from the Fileutils 4.1. | |
1959 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
1960 | * configure.in: Check for the presence of memrchr, and of its | |
1961 | prototype. | |
1962 | ||
a67cef01 TVH |
1963 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> |
1964 | ||
1965 | * lib/hash.h (__P): Added definition for this macro. | |
1966 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
1967 | BUILT_SOURCES, to ensure they are generated first. | |
1968 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
1969 | %error-verbose to allow bootstrapping with bison 1.30x. | |
1970 | ||
2b25d624 AD |
1971 | 2002-01-06 Akim Demaille <akim@epita.fr> |
1972 | ||
1973 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
1974 | convention is to fetch on entry. | |
1975 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
1976 | 'switch' without a following semicolon. | |
1977 | * tests/regression.at (braces parsing): New. | |
1978 | ||
3460813b AD |
1979 | 2002-01-06 Akim Demaille <akim@epita.fr> |
1980 | ||
1981 | Bison is dead wrong in its RR conflict reports. | |
1982 | ||
1983 | * tests/torture.at (GNU Cim Grammar): New. | |
1984 | * src/conflicts.c (count_rr_conflicts): Fix. | |
1985 | ||
73784c64 AD |
1986 | 2002-01-06 Akim Demaille <akim@epita.fr> |
1987 | ||
1988 | Creating package.m4 from configure.ac causes too many problems. | |
1989 | ||
1990 | * tests/Makefile.am (package.m4): Create it by hand, | |
1991 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
1992 | ||
25d81090 AD |
1993 | 2002-01-06 Akim Demaille <akim@epita.fr> |
1994 | ||
1995 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
1996 | skeleton.h. | |
1997 | ||
a9b8959e PE |
1998 | 2002-01-04 Paul Eggert <eggert@twinsun.com> |
1999 | ||
2000 | * doc/bison.texinfo (Debugging): | |
2001 | Remove YYSTDERR; it's no longer defined or used. | |
2002 | Also, s/cstdio.h/cstdio/. | |
2003 | ||
25d81090 AD |
2004 | 2002-01-03 Akim Demaille <akim@epita.fr> |
2005 | ||
2006 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
2007 | ||
1109455c AD |
2008 | 2002-01-03 Akim Demaille <akim@epita.fr> |
2009 | ||
2010 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
2011 | tracing code to --trace, wait for a better --trace option, with | |
2012 | args. | |
2013 | ||
7ea5e977 AD |
2014 | 2002-01-03 Akim Demaille <akim@epita.fr> |
2015 | ||
2016 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
2017 | The ISO C++ standard is extremely clear about it: stderr is | |
2018 | considered a macro, not a regular symbol (see table 94 `Header | |
2019 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
2020 | Therefore std:: does not apply to it. It still does with fprintf. | |
2021 | Also, s/cstdio.h/cstdio/. | |
2022 | ||
fab5b110 AD |
2023 | 2002-01-03 Akim Demaille <akim@epita.fr> |
2024 | ||
2025 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
2026 | for non system headers. | |
2027 | ||
aed7fd9b AD |
2028 | 2002-01-02 Akim Demaille <akim@epita.fr> |
2029 | ||
2030 | Equip the skeleton chain with location tracking, runtime trace, | |
2031 | pure parser and scanner. | |
2032 | ||
2033 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
2034 | renaming. | |
2035 | (%union): Having several members with the same type does not help | |
2036 | type mismatches, simplify. | |
2037 | (YYPRINT, yyprint): New. | |
2038 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
2039 | (skel_error): this. | |
2040 | Handle locations. | |
2041 | * src/scan-skel.l: Adjust to these changes. | |
2042 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
2043 | (LOCATION_PRINT, skel_control_t): New. | |
2044 | ||
24fad99e AD |
2045 | 2001-12-30 Akim Demaille <akim@epita.fr> |
2046 | ||
2047 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
2048 | replace `gb' with BLANKS. | |
2049 | * src/scan-skel.l: Adjust. | |
2050 | ||
a4b36db4 AD |
2051 | 2001-12-30 Akim Demaille <akim@epita.fr> |
2052 | ||
2053 | * src/system.h: We don't need nor want bcopy. | |
2054 | Throw away MS-DOS crap: we don't need getpid. | |
2055 | * configure.in: We don't need strndup. It was even causing | |
2056 | problems: because Flex includes the headers *before* us, | |
2057 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
2058 | not visible. | |
2059 | * lib/xstrndup.c: New. | |
2060 | * src/scan-skel.l: Use it. | |
2061 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
2062 | * src/parse-skel.y: Use %directives instead of #defines. | |
2063 | ||
1239777d AD |
2064 | 2001-12-30 Akim Demaille <akim@epita.fr> |
2065 | ||
2066 | * src/skeleton.h: New. | |
2067 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
2068 | code. | |
2069 | * src/output.h (get_lines_number, actions_output, guards_output) | |
2070 | (token_definitions_output): Prototype them. | |
2071 | * src/parse-skel.y: Add the license notice. | |
2072 | Include output.h and skeleton.h. | |
2073 | (process_skeleton): Returns void, and takes a single parameter. | |
2074 | * src/scan-skel.l: Add the license notice. | |
2075 | Include skeleton.h. | |
2076 | Don't use %option yylineno: it seems that then Flex imagines | |
2077 | REJECT has been used, and therefore it won't reallocate its | |
2078 | buffers (which makes no other sense to me than a bug). It results | |
2079 | in warnings for `unused: yy_flex_realloc'. | |
2080 | ||
9b3add5b RA |
2081 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> |
2082 | ||
2083 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
2084 | (MUSCLE_INSERT_PREFIX): ...to there. | |
2085 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
2086 | (MUSCLE_INSERT_PREFIX): Move from here... | |
2087 | ||
2088 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
2089 | names. This parser skeleton is still broken, but Bison should not | |
2090 | choke on a bad muscle 'syntax'. | |
2091 | * src/bison.simple: Add a section directive. Put braces around muscle | |
2092 | names. | |
2093 | ||
2094 | * src/files.h (strsuffix, stringappend): Add declarations. | |
2095 | (tab_extension): Add declaration. | |
2096 | (short_base_name): Add declaration. | |
2097 | ||
2098 | * src/files.c (strsuffix, stringappend): No longer static. These | |
2099 | functions are used in the skeleton parser. | |
2100 | (tab_extension): New. | |
2101 | (compute_base_names): Use the computations done in this function | |
fab5b110 | 2102 | to guess if the generated parsers should have '.tab' in their |
9b3add5b RA |
2103 | names. |
2104 | (short_base_name): No longer static. | |
2105 | ||
2106 | * src/output.c (output_skeleton): New. | |
2107 | (output): Disable call to output_master_parser, and give a try to | |
2108 | a new skeleton handling system. | |
2109 | (guards_output, actions_output): No longer static. | |
2110 | (token_definitions_output, get_lines_number): No longer static. | |
2111 | ||
2112 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
2113 | ||
fab5b110 | 2114 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and |
9b3add5b RA |
2115 | parse-skel.y. |
2116 | ||
2117 | * src/parse-skel.y: New file. | |
2118 | * src/scan-skel.l: New file. | |
2119 | ||
b5b61c61 AD |
2120 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2121 | ||
2122 | %name-prefix is broken. | |
2123 | ||
2124 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
2125 | Adjust all dependencies. | |
2126 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
2127 | %name-prefix. | |
2128 | ||
2129 | Renaming yylval but not yylloc is not consistent. Now we do. | |
2130 | ||
2131 | * src/bison.simple: Prefix yylloc if used. | |
2132 | * doc/bison.texinfo (Decl Summary): Document that. | |
2133 | ||
8c9a50be AD |
2134 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2135 | ||
2136 | * doc/bison.texinfo: Promote `%long-directive' over | |
2137 | `%long_directive'. | |
2138 | Remove all references to fixed-output-files, yacc is enough. | |
2139 | ||
d99361e6 AD |
2140 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2141 | ||
2142 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
2143 | user prologue. These are defaults. | |
2144 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
2145 | define YYDEBUG and YYERROR_VERBOSE. | |
2146 | ||
b9cecb91 AD |
2147 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2148 | ||
2149 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
2150 | yylloc. | |
2151 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
2152 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
2153 | Move to... | |
2154 | * tests/headers.at: here. | |
2155 | ||
aea13e97 AD |
2156 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2157 | ||
2158 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
2159 | ||
931394cb AD |
2160 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2161 | ||
2162 | * tests/actions.at (Mid-rule actions): Output on a single line | |
2163 | instead of several. | |
2164 | ||
704a47c4 AD |
2165 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2166 | ||
2167 | * doc/bison.texinfo: Formatting changes. | |
2168 | ||
091e20bb AD |
2169 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2170 | ||
2171 | Don't store the token defs in a muscle, just be ready to output it | |
2172 | on command. Now possible via `symbols'. Fixes a memory leak. | |
2173 | ||
2174 | * src/output.c (token_definitions_output): New. | |
2175 | (output_parser, header_output): Use it. | |
2176 | * src/reader.c (symbols_save): Remove. | |
2177 | ||
cce71710 AD |
2178 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2179 | ||
2180 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
2181 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
2182 | default. | |
2183 | ||
82c035a8 AD |
2184 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2185 | ||
2186 | Mid-rule actions are simply... ignored! | |
2187 | ||
2188 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
2189 | the empty-rule associated to the dummy symbol, not to the host | |
2190 | rule. | |
2191 | * tests/actions.at (Mid-rule actions): New. | |
2192 | ||
8419d367 AD |
2193 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2194 | ||
2195 | Memory leak. | |
2196 | ||
2197 | * src/reader.c (reader): Free grammar. | |
2198 | ||
375d5806 AD |
2199 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2200 | ||
2201 | Memory leak. | |
2202 | ||
2203 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
2204 | since it allocates it for each state, although only one is needed. | |
2205 | (allocate_storage): Do it here. | |
2206 | ||
f51cb8ff AD |
2207 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2208 | ||
2209 | * src/options.h, src/options.c (create_long_option_table): Rename | |
2210 | as... | |
2211 | (long_option_table_new): this, with a clearer prototype. | |
2212 | (percent_table): Remove, unused, | |
2213 | * src/getargs.c (getargs): Adjust. | |
2214 | ||
29e88316 AD |
2215 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2216 | ||
2217 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
2218 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
2219 | as states. | |
2220 | ||
b9f71f19 AD |
2221 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2222 | ||
2223 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
2224 | Sorry, I don't understand exactly what it is, no better name... | |
2225 | ||
1a2b5d37 AD |
2226 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2227 | ||
2228 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
2229 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
2230 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
2231 | as rules. | |
2232 | ||
1cca533e AD |
2233 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2234 | ||
2235 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
2236 | ago. | |
2237 | ||
c03ae966 AD |
2238 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2239 | ||
2240 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
2241 | Adjust all users to use symbols[i]->user_token_number. | |
2242 | ||
5a670b1e AD |
2243 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2244 | ||
2245 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
2246 | Adjust all users to use symbols[i]->prec or ->assoc. | |
2247 | ||
ad949da9 AD |
2248 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2249 | ||
2250 | * src/reader.c, src/reader.h (tags): Remove. | |
2251 | Adjust all users to use symbols[i]->tag. | |
2252 | ||
0e78e603 AD |
2253 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2254 | ||
2255 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
2256 | and rule_table. | |
2257 | * src/reader.c (packsymbols): Fill this table. | |
2258 | Drop sprec. | |
2259 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
2260 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
2261 | single table. | |
2262 | Use symbols[i]->tag instead of tags[i]. | |
2263 | ||
213e640e AD |
2264 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2265 | ||
2266 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
2267 | In addition, put a comment in there, to replace... | |
2268 | * tests/regression.at (%union and C comments): Remove. | |
2269 | ||
e7b8bef1 AD |
2270 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2271 | ||
2272 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
2273 | output as expected output. The contents *seem* right to me, but I | |
2274 | can't pretend reading perfectly parser tables... Nonetheless, all | |
2275 | the other tests pass correctly, the table look OK, even though the | |
2276 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
2277 | harmless). | |
2278 | ||
b68e7744 AD |
2279 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2280 | ||
2281 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
2282 | rules read. In other words, add it _after_ having performed | |
2283 | grammar sanity checks. | |
2284 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
2285 | ||
78d5bae9 AD |
2286 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2287 | ||
2288 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
2289 | visible, and some states have now a different number. | |
2290 | ||
ff442794 AD |
2291 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2292 | ||
2293 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
2294 | of the first rule. | |
2295 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
2296 | (Solved SR Conflicts): Adjust rule 0's line number. | |
2297 | ||
610ab194 AD |
2298 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2299 | ||
2300 | Fix the `GAWK Grammar' failure. | |
2301 | ||
2302 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
2303 | the reductions of the first state which was mistakenly confused | |
2304 | with the final state because precisely final_state was initialized | |
2305 | to 0. | |
2306 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
2307 | now noticed by Bison. | |
2308 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
2309 | have a reduction on $default. | |
2310 | ||
29d29c8f AD |
2311 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2312 | ||
2313 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
2314 | rule line numbers. | |
2315 | * src/closure.c (print_closure): Likewise. | |
2316 | * src/derives.c (print_derives): Likewise. | |
2317 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
2318 | now. | |
2319 | ||
7c6b64d0 AD |
2320 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2321 | ||
2322 | * src/lalr.c (lookaheads_print): New. | |
2323 | (lalr): Call it when --trace-flag. | |
2324 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
2325 | are dumped. | |
2326 | ||
3d4daee3 AD |
2327 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2328 | ||
2329 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
2330 | when walking through ritem, even via rule->rhs. | |
2331 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
2332 | (useful_production, useless_nonterminals): Likewise. | |
2333 | (reduce_grammar_tables): Likewise, plus update nritems. | |
2334 | * src/nullable.c (set_nullable): Likewise. | |
2335 | * src/lalr.c (build_relations): Likewise. | |
2336 | * tests/sets.at (Nullable): Adjust. | |
2337 | Fortunately, now, the $axiom is no longer nullable. | |
2338 | ||
9e7f6bbd AD |
2339 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2340 | ||
2341 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
2342 | the 0-sentinel. | |
2343 | * src/gram.c (ritem_longest_rhs): Likewise. | |
2344 | * src/reduce.c (nonterminals_reduce): Likewise. | |
2345 | * src/print_graph.c (print_graph): Likewise. | |
2346 | * src/output.c (output_rule_data): Likewise. | |
2347 | * src/nullable.c (set_nullable): Likewise. | |
2348 | ||
255ef638 AD |
2349 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2350 | ||
2351 | * src/output.c: Comment changes. | |
2352 | ||
0d8a7363 AD |
2353 | 2001-12-27 Paul Eggert <eggert@twinsun.com> |
2354 | ||
2355 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
2356 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
2357 | Sparc, as they were causing more porting problems than the | |
2358 | (minor) performance improvement was worth. | |
2359 | ||
2360 | Also, catch up with 1.31's YYSTD. | |
2361 | ||
3db472b9 AD |
2362 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2363 | ||
2364 | * src/output.c (output_gram): Rely on nritems, not the | |
2365 | 0-sentinel. See below. | |
2366 | Use -1 as separator, not 0. | |
2367 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
2368 | Rely on -1 as separator in yyrhs, instead of 0. | |
2369 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
2370 | twice `Now at end of input', therefore there are two lines less to | |
2371 | expect. | |
2372 | ||
b365aa05 AD |
2373 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2374 | ||
2375 | * tests/regression.at (Unresolved SR Conflicts): | |
2376 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
2377 | below. | |
2378 | ||
30171f79 AD |
2379 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2380 | ||
2381 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
2382 | is reached by eoftoken. | |
2383 | (insert_start_shifting_state, insert_eof_shifting_state) | |
2384 | (insert_accepting_state, augment_automaton): Remove, since now | |
2385 | these states are automatically computed from the initial state. | |
2386 | (generate_states): Adjust. | |
2387 | * src/print.c: When reporting a rule number to the user, substract | |
2388 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
2389 | * src/reduce.c: Likewise. | |
2390 | * src/print_graph.c (print_core): For the time being, just as for | |
2391 | the report, depend upon --trace-flags to dump the full set of | |
2392 | items. | |
2393 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
2394 | 0: `$axiom: START-SYMBOL $'. | |
2395 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
2396 | number of the states has changed (the final state is no longer | |
2397 | necessarily the last), catch up. | |
2398 | ||
75142d45 AD |
2399 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2400 | ||
2401 | Try to make the use of the eoftoken valid. Given that its value | |
2402 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
2403 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
2404 | instead of the 0-sentinel. | |
2405 | ||
2406 | * src/gram.h, src/gram.c (nritems): New. | |
2407 | Expected to be duplication of nitems, but for the time being... | |
2408 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
2409 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
2410 | * src/closure.c (print_closure, print_fderives): Likewise. | |
2411 | * src/gram.c (ritem_print): Likewise. | |
2412 | * src/print.c (print_core, print_grammar): Likewise. | |
2413 | * src/print_graph.c: Likewise. | |
2414 | ||
b7c49edf AD |
2415 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2416 | ||
2417 | * src/main.c (main): If there are complains after grammar | |
2418 | reductions, then output the report anyway if requested, then die. | |
2419 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
2420 | * src/reader.c (eoftoken): New. | |
2421 | (parse_token_decl): If the token being defined has value `0', it | |
2422 | is the eoftoken. | |
2423 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
2424 | Be sure to preserve the value of the eoftoken. | |
2425 | (reader): Make sure eoftoken is defined. | |
2426 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
2427 | * src/print.c (print_grammar): Don't special case the eof token. | |
2428 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
2429 | lie anyway, albeit pleasant. | |
2430 | * tests/calc.at: Exercise error messages with eoftoken. | |
2431 | Change the grammar so that empty input is invalid. | |
2432 | Adjust expectations. | |
2433 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
2434 | ||
ec2da99f AD |
2435 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2436 | ||
2437 | * configure.in: Check the protos of strchr ans strspn. | |
2438 | Replace strchr if needed. | |
2439 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
2440 | missing. | |
2441 | * lib/strchr.c: New. | |
2442 | * src/reader.c (symbols_save): Use strchr. | |
2443 | ||
8adfa272 AD |
2444 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2445 | ||
2446 | * src/print.c, src/print_graph.c (escape): New. | |
2447 | Use it to quote the TAGS outputs. | |
2448 | * src/print_graph.c (print_state): Now errors are in red, and | |
2449 | reductions in green. | |
2450 | Prefer high to wide: output the state number on a line of its own. | |
2451 | ||
80dac38c AD |
2452 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2453 | ||
2454 | * src/state.h, src/state.c (reductions_new): New. | |
2455 | * src/LR0.c (set_state_table): Let all the states have a | |
2456 | `reductions', even if reduced to 0. | |
2457 | (save_reductions): Adjust. | |
2458 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
2459 | * src/print.c (print_reductions, print_actions): Adjust. | |
2460 | * src/output.c (action_row): Adjust. | |
2461 | ||
2cec70b9 AD |
2462 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2463 | ||
2464 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
2465 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
2466 | even if reduced to 0. | |
2467 | * src/print.c (print_errs, print_reductions): Adjust. | |
2468 | * src/output.c (output_actions, action_row): Adjust. | |
2469 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
2470 | ||
13ca549a AD |
2471 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2472 | ||
2473 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
2474 | ||
5092aba5 AD |
2475 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2476 | ||
2477 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
2478 | * src/print.c: here. | |
2479 | (lookaheadset, shiftset): New, used as additional storage by | |
2480 | print_reductions. | |
2481 | (print_results): Adjust. | |
2482 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
2483 | (print_actions): here. | |
2484 | * src/print_graph.c (print_actions): Remove dead code. | |
2485 | ||
11e2beca AD |
2486 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2487 | ||
2488 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
2489 | `$n' and `@n'. | |
2490 | ||
dac3c910 AD |
2491 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2492 | ||
2493 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
2494 | (build_relations): Adjust. | |
2495 | ||
d0b0fefa AD |
2496 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2497 | ||
2498 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
2499 | duplication. | |
2500 | ||
adc8c848 AD |
2501 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2502 | ||
2503 | * src/reader.c (packgram): Catch nitems overflows. | |
2504 | ||
14d293ac AD |
2505 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2506 | ||
2507 | * src/files.c, src/files.h (guard_obstack): Remove. | |
2508 | * src/output.c (output): Adjust. | |
2509 | * src/reader.c (parse_braces): New, factoring... | |
2510 | (copy_action, copy_guard): these two which are renamed as... | |
2511 | (parse_action, parse_guard): these. | |
2512 | As a voluntary consequence, using braces around guards is now | |
2513 | mandatory. | |
2514 | ||
f499b062 AD |
2515 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2516 | ||
2517 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
2518 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
2519 | members. | |
2520 | (symbol_list_new): Adjust. | |
2521 | (copy_action): action_line is the first line, not the last. | |
2522 | (copy_guard): Just as for actions, store the `action' only, not | |
2523 | the switch/case/break flesh. | |
2524 | Don't parse the user action that might follow the guard, let... | |
2525 | (readgram): do it, i.e., now, there can be an action after a | |
2526 | guard. | |
2527 | In other words the guard is just explicitly optional. | |
2528 | (packgram): Adjust. | |
2529 | * src/output.c (guards_output): New. | |
2530 | (output_parser): Call it when needed. | |
2531 | (output): Also free the guard and attrs obstacks. | |
2532 | * src/files.c, src/files.h (obstack_save): Remove. | |
2533 | (output_files): Remove. | |
2534 | As a result, if one needs the former `.act' file, using an | |
2535 | appropriate skeleton which requires actions and guards is now | |
2536 | required. | |
2537 | * src/main.c (main): Adjust. | |
2538 | * tests/semantic.at: New. | |
2539 | * tests/regression.at: Use `input.y' as input file name. | |
2540 | Avoid 8+3 problems by requiring input.c when the test needs the | |
2541 | parser. | |
2542 | ||
d945f5cd AD |
2543 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2544 | ||
2545 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
2546 | fields. | |
2547 | ||
d200e455 AD |
2548 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2549 | ||
2550 | All the hacks using a final pseudo state are now useless. | |
2551 | ||
2552 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
2553 | * src/lalr.c (nLA): New. | |
2554 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
2555 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
2556 | ||
f9507c28 AD |
2557 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2558 | ||
2559 | * src/output.c (action_row, token_actions): Use a state_t instead | |
2560 | of a integer, and nlookaheads instead of the following state's | |
2561 | lookaheadsp. | |
2562 | ||
065fbd27 AD |
2563 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2564 | ||
2565 | * src/conflicts.c (log_resolution, flush_shift) | |
2566 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
2567 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
2568 | (conflicts_print, print_reductions): Use a state_t instead of an | |
2569 | integer when referring to a state. | |
2570 | As much as possible, depend upon nlookaheads, instead of the | |
2571 | `lookaheadsp' member of the following state (since lookaheads of | |
2572 | successive states are successive, the difference between state n + 1 | |
2573 | and n served as the number of lookaheads for state n). | |
2574 | * src/lalr.c (add_lookback_edge): Likewise. | |
2575 | * src/print.c (print_core, print_actions, print_state) | |
2576 | (print_results): Likewise. | |
2577 | * src/print_graph.c (print_core, print_actions, print_state) | |
2578 | (print_graph): Likewise. | |
2579 | * src/conflicts.h: Adjust. | |
2580 | ||
1b177bd7 AD |
2581 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2582 | ||
2583 | * src/bison.hairy: Formatting/comment changes. | |
2584 | ANSIfy. | |
2585 | Remove `register' indications. | |
2586 | Add plenty of `static'. | |
2587 | ||
7742ddeb AD |
2588 | 2001-12-27 Akim Demaille <akim@epita.fr> |
2589 | ||
2590 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
2591 | duplicates ntokens. | |
2592 | * src/bison.simple: Formatting/comment changes. | |
2593 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
2594 | is an undocumented synonym. | |
2595 | ||
1fa14068 AD |
2596 | 2001-12-22 Akim Demaille <akim@epita.fr> |
2597 | ||
2598 | * src/output.c (output_table_data): Change the prototype to use | |
2599 | `int' for array ranges: some invocations do pass an int, not a | |
2600 | short. | |
2601 | Reported by Wayne Green. | |
2602 | ||
b9752825 AD |
2603 | 2001-12-22 Akim Demaille <akim@epita.fr> |
2604 | ||
2605 | Some actions of web2c.y are improperly triggered. | |
2606 | Reported by Mike Castle. | |
2607 | ||
2608 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
2609 | * tests/regression.at (Web2c): Rename as... | |
2610 | (Web2c Report): this. | |
2611 | (Web2c Actions): New. | |
2612 | ||
776209d6 AD |
2613 | 2001-12-22 Akim Demaille <akim@epita.fr> |
2614 | ||
2615 | Reductions in web2c.y are improperly reported. | |
2616 | Reported by Mike Castle. | |
2617 | ||
2618 | * src/conflicts.c (print_reductions): Fix. | |
2619 | * tests/regression.at (Web2c): New. | |
2620 | ||
275fc3ad AD |
2621 | 2001-12-18 Akim Demaille <akim@epita.fr> |
2622 | ||
2623 | Some host fail on `assert (!"foo")', which expands to | |
2624 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
2625 | Reported by Nelson Beebee. | |
2626 | ||
2627 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
2628 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
2629 | ||
897668ee MA |
2630 | 2001-12-17 Marc Autret <autret_m@epita.fr> |
2631 | ||
2632 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
2633 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
2634 | New line counter 'skeleton_line' (skeleton-line muscle). | |
2635 | ||
ab3399e0 PE |
2636 | 2001-12-17 Paul Eggert <eggert@twinsun.com> |
2637 | ||
2638 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
2639 | YYDEBUG must be defined to a nonzero value. | |
2640 | ||
2641 | * src/bison.simple (yytname): Do not assume that the user defines | |
2642 | YYDEBUG to a properly parenthesized expression. | |
2643 | ||
3877f72b AD |
2644 | 2001-12-17 Akim Demaille <akim@epita.fr> |
2645 | ||
2646 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
2647 | nlookaheads is a new member. | |
2648 | Adjust all users. | |
2649 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
2650 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
2651 | state. | |
776209d6 | 2652 | |
331dbc1b AD |
2653 | 2001-12-17 Akim Demaille <akim@epita.fr> |
2654 | ||
2655 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
2656 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
2657 | let... | |
2658 | * src/reader.c (reader): Do it. | |
776209d6 | 2659 | |
be750e4c AD |
2660 | 2001-12-17 Akim Demaille <akim@epita.fr> |
2661 | ||
2662 | * src/conflicts.c (print_reductions): Formatting changes. | |
776209d6 | 2663 | |
709ae8c6 AD |
2664 | 2001-12-17 Akim Demaille <akim@epita.fr> |
2665 | ||
2666 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
2667 | (flush_reduce): New. | |
2668 | (resolve_sr_conflict): Adjust. | |
776209d6 | 2669 | |
f87685c3 AD |
2670 | 2001-12-17 Akim Demaille <akim@epita.fr> |
2671 | ||
2672 | * src/output.c (output_obstack): Be static and rename as... | |
2673 | (format_obstack): this, to avoid any confusion with files.c's | |
2674 | output_obstack. | |
2675 | * src/reader.h (muscle_obstack): Move to... | |
2676 | * src/output.h: here, since it's defined in output.c. | |
2677 | ||
837491d8 AD |
2678 | 2001-12-17 Akim Demaille <akim@epita.fr> |
2679 | ||
2680 | * src/output.c (action_row, save_column, default_goto) | |
2681 | (sort_actions, matching_state, pack_vector): Better variable | |
2682 | locality. | |
2683 | ||
796d61fb AD |
2684 | 2001-12-17 Akim Demaille <akim@epita.fr> |
2685 | ||
2686 | * src/output.c: Various formatting changes. | |
776209d6 | 2687 | |
64d15509 AD |
2688 | 2001-12-17 Akim Demaille <akim@epita.fr> |
2689 | ||
2690 | * src/files.c (output_files): Free the output_obstack. | |
2691 | * src/main.c (main): Call print and print_graph conditionally. | |
2692 | * src/print.c (print): Work unconditionally. | |
2693 | * src/print_graph.c (print_graph): Work unconditionally. | |
2694 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
2695 | ||
fbc8ecb7 MA |
2696 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
2697 | ||
2698 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
2699 | there is one less line per action. | |
2700 | ||
f0440388 MA |
2701 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
2702 | ||
2703 | * src/bison.simple: Remove a useless #line directive. | |
2704 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
2705 | * src/output.c (get_lines_number): New. | |
776209d6 | 2706 | (output_parser): Adjust, now takes care about the lines of a |
f0440388 MA |
2707 | output muscles. |
2708 | Fix line numbering. | |
2709 | (actions_output): Computes the number of lines taken by actions. | |
2710 | (output_master_parser): Insert new skeleton which is the name of | |
2711 | the output parser file name. | |
2712 | ||
a79986b8 MA |
2713 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
2714 | ||
2715 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
2716 | ||
4ec8e00f MA |
2717 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
2718 | ||
2719 | * src/output.c (output_gram): Keep track of the hairy one. | |
2720 | ||
1a4648ff AD |
2721 | 2001-12-15 Akim Demaille <akim@epita.fr> |
2722 | ||
2723 | Make `make distcheck' work. | |
2724 | ||
2725 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
2726 | system.h which uses libgettext.h. | |
2727 | ||
9c2c67e6 AD |
2728 | 2001-12-15 Akim Demaille <akim@epita.fr> |
2729 | ||
2730 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
2731 | otherwise, since we range over their symbols, we might look at a | |
2732 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
2733 | `nvars', hence we overflow our arrays. | |
2734 | ||
93ede233 AD |
2735 | 2001-12-15 Akim Demaille <akim@epita.fr> |
2736 | ||
2737 | The header can also be produced directly, without any obstack! | |
2738 | Yahoo! | |
2739 | ||
2740 | * src/files.c, src/files.h (defines_obstack): Remove. | |
2741 | (compute_header_macro): Global. | |
2742 | (defines_obstack_save): Remove. | |
2743 | * src/reader.c (parse_union_decl): No longer output to | |
2744 | defines_obstack: its content can be found in the `stype' muscle | |
2745 | anyway. | |
2746 | (output_token_translations): Merge into... | |
2747 | (symbols_output): this. | |
2748 | Rename as... | |
2749 | (symbols_save): this. | |
2750 | (reader): Adjust. | |
2751 | * src/output.c (header_output): New. | |
2752 | (output): Call it. | |
2753 | ||
2666f928 AD |
2754 | 2001-12-15 Akim Demaille <akim@epita.fr> |
2755 | ||
2756 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
2757 | simultaneously, use one to define the `stype' muscle, and use the | |
2758 | value of the latter to fill defines_obstack. | |
2759 | (copy_comment): Remove. | |
2760 | (copy_comment2): Work for a single obstack. | |
2761 | Rename as... | |
2762 | (copy_comment): this. | |
2763 | ||
428046f8 AD |
2764 | 2001-12-15 Akim Demaille <akim@epita.fr> |
2765 | ||
2766 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
2767 | * src/reader.c (parse_union_decl): Revamp. | |
2768 | ||
ea52d706 AD |
2769 | 2001-12-15 Akim Demaille <akim@epita.fr> |
2770 | ||
2771 | Still making progress in separating Bison into (i) input, (ii) | |
2772 | process, (iii) output: now we can directly output the parser file | |
2773 | without using table_obstack at all. | |
2774 | ||
2775 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
2776 | (parser_file_name): New. | |
2777 | * src/files.c (compute_output_file_names): Compute it. | |
2778 | * src/output.c (actions_output, output_parser) | |
2779 | (output_master_parser): To a file instead of an obstack. | |
2780 | ||
3f96f4dc AD |
2781 | 2001-12-15 Akim Demaille <akim@epita.fr> |
2782 | ||
2783 | Attach actions to rules, instead of pre-outputting them to | |
2784 | actions_obstack. | |
2785 | ||
2786 | * src/gram.h (rule_t): action and action_line are new members. | |
2787 | * src/reader.c (symbol_list): Likewise. | |
2788 | (copy_action): Save the actions within the rule. | |
2789 | (packgram): Save them in rule_table. | |
2790 | * src/output.c (actions_output): New. | |
2791 | (output_parser): Use it on `%%actions'. | |
2792 | (output_rule_data): Don't free rule_table. | |
2793 | (output): Do it. | |
2794 | (prepare): Don't save the `action' muscle. | |
2795 | * src/bison.simple: s/%%action/%%actions/. | |
2796 | ||
51576fb3 AD |
2797 | 2001-12-15 Akim Demaille <akim@epita.fr> |
2798 | ||
2799 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
2800 | to the user action: let it fail if lacking. | |
dee049eb | 2801 | Suggested by Arnold Robbins and Tom Tromey. |
51576fb3 | 2802 | |
2648a72d AD |
2803 | 2001-12-14 Akim Demaille <akim@epita.fr> |
2804 | ||
2805 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
2806 | longer mess around with obstacks and int pointers. | |
2807 | Adjust all callers. | |
2808 | ||
92790e5b AD |
2809 | 2001-12-14 Akim Demaille <akim@epita.fr> |
2810 | ||
2811 | * src/lex.c (literalchar): Don't escape the special characters, | |
2812 | just decode them, and keep them as char (before, eol was output as | |
2813 | the 2 char string `\n' etc.). | |
2814 | * src/output.c (output_rule_data): Use quotearg to output the | |
2815 | token strings. | |
2816 | ||
927c1557 PE |
2817 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
2818 | ||
2819 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
2820 | Do not infringe on the global user namespace when using C++. | |
2821 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
2822 | All uses of `fprintf' and `stderr' changed. | |
2823 | ||
2824 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
2825 | ||
ed8e1f68 AD |
2826 | 2001-12-13 Akim Demaille <akim@epita.fr> |
2827 | ||
2828 | The computation of nullable is broken: it doesn't handle empty | |
2829 | RHS's properly. | |
2830 | ||
2831 | * tests/torture.at (GNU AWK Grammar): New. | |
2832 | * tests/sets.at (Nullable): New. | |
2833 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
2834 | `ritems', loop over the rules, and then over their rhs's. | |
2835 | ||
2836 | Work around Autotest bugs. | |
2837 | ||
2838 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
2839 | frame, because Autotest understand lines starting with a `+' as | |
2840 | traces from the shell. Then, they are not processed properly. | |
2841 | Admittedly an Autotest bug, but we don't have time to wait for | |
2842 | Autotest to catch up. | |
2843 | * tests/regression.at (Broken Closure): Adjust to the new table | |
2844 | frames. | |
2845 | Move to... | |
2846 | * tests/sets.at: here. | |
2847 | ||
cb581495 AD |
2848 | 2001-12-13 Akim Demaille <akim@epita.fr> |
2849 | ||
2850 | * src/closure.c (closure): Use nrules instead of playing tricks | |
2851 | with BITS_PER_WORD. | |
2852 | ||
2e729273 AD |
2853 | 2001-12-13 Akim Demaille <akim@epita.fr> |
2854 | ||
2855 | * src/print.c (print_actions): Output the handling of `$' as the | |
2856 | traces do: shifting the token EOF. Before EOF was treated as a | |
2857 | nonterminal. | |
2858 | * tests/regression.at: Adjust some tests. | |
2859 | * src/print_graph.c (print_core): Complete the set of items via | |
2860 | closure. The next-to-final and final states are still unsatisfying, | |
2861 | but that's to be addressed elsewhere. | |
2862 | No longer output the rule numbers, but do output the state number. | |
2863 | A single loop for the shifts + gotos is enough, but picked a | |
2864 | distinct color for each. | |
2865 | (print_graph): Initialize and finalize closure. | |
2866 | ||
107f7dfb AD |
2867 | 2001-12-13 Akim Demaille <akim@epita.fr> |
2868 | ||
2869 | * src/reader.c (readgram): Remove dead code, an strip useless | |
2870 | braces. | |
2871 | (get_type): Remove, unused. | |
2872 | ||
9b53a24f AD |
2873 | 2001-12-12 Akim Demaille <akim@epita.fr> |
2874 | ||
2875 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
2876 | on that of lib/error.c. | |
2877 | ||
dbfb6dcd AD |
2878 | 2001-12-12 Akim Demaille <akim@epita.fr> |
2879 | ||
2880 | Some hosts don't like `/' in includes. | |
2881 | ||
2882 | * src/system.h: Include libgettext.h without qualifying the path. | |
2883 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
2884 | $(top_srcdir). | |
2885 | ||
c25fb648 MA |
2886 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
2887 | ||
2888 | * src/output.c (output_parser): Remove useless muscle. | |
2889 | ||
710ddc4f MA |
2890 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
2891 | ||
2892 | * src/bison.simple: Remove #line just before %%epilogue. It | |
2893 | is now handled in ... | |
2894 | * src/reader.c (read_additionnal_code): Add the output of a | |
2895 | #line for the epilogue. | |
2896 | ||
e83d80b8 MA |
2897 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
2898 | ||
927c1557 | 2899 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
2900 | replace precedent remove. |
2901 | * src/bison.simple: Remove #line before %%prologue because | |
2902 | %%input-line is wrong at this time. | |
2903 | ||
971d5158 MA |
2904 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
2905 | ||
2906 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 2907 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 2908 | |
5edafffd AD |
2909 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2910 | ||
2911 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
2912 | * src/LR0.c (set_state_table): here. | |
2913 | * src/lalr.c (lalr): Call it. | |
2914 | ||
0279f8e9 AD |
2915 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2916 | ||
2917 | * src/state.h (shifts): Remove the `number' member: shifts are | |
2918 | attached to state, hence no longer need to be labelled with a | |
2919 | state number. | |
2920 | ||
190c4f5f AD |
2921 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2922 | ||
2923 | Now that states have a complete set of members, the linked list of | |
2924 | shifts is useless: just fill directly the state's shifts member. | |
2925 | ||
2926 | * src/state.h (shifts): Remove the `next' member. | |
2927 | * src/LR0.c (first_state, last_state): Remove. | |
2928 | Adjust the callers. | |
2929 | (augment_automaton): Don't look for the shifts that must be added | |
2930 | a shift on EOF: it is those of the state we looked for! But now, | |
2931 | since shifts are attached, it is no longer needed to looking | |
2932 | merely by its id: its number. | |
2933 | ||
2a73b93d AD |
2934 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2935 | ||
2936 | * src/LR0.c (augment_automaton): Better variable locality. | |
2937 | Remove an impossible branch: if there is a state corresponding to | |
2938 | the start symbol being shifted, then there is shift for the start | |
2939 | symbol from the initial state. | |
2940 | ||
74392f6a AD |
2941 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2942 | ||
2943 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
2944 | only when appropriate: when insert_start_shifting_state' is not | |
2945 | invoked. | |
2946 | * tests/regression.at (Rule Line Numbers): Adjust. | |
2947 | ||
37c82725 AD |
2948 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2949 | ||
2950 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
2951 | merge the two cases addition shifts to the initial state. | |
2952 | ||
6a164e0c AD |
2953 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2954 | ||
2955 | * src/lalr.c (set_state_table): Move to... | |
2956 | * src/LR0.c: here. | |
2957 | * src/lalr.c (lalr): Don't call it... | |
2958 | * src/LR0.c (generate_states): do it. | |
2959 | * src/LR0.h (first_state): Remove, only the table is used. | |
2960 | ||
7215de24 AD |
2961 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2962 | ||
2963 | * src/LR0.h (first_shift, first_reduction): Remove. | |
2964 | * src/lalr.c: Don't use first_shift: find shifts through the | |
2965 | states. | |
2966 | ||
80e25d4d AD |
2967 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2968 | ||
2969 | * src/LR0.c: Attach shifts to states as soon as they are | |
2970 | computed. | |
2971 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
2972 | state, just assert that the mapping was properly done. | |
2973 | ||
0ab3728b AD |
2974 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2975 | ||
2976 | * src/LR0.c (insert_start_shift): Rename as... | |
2977 | (insert_start_shifting_state): this. | |
2978 | (insert_eof_shifting_state, insert_accepting_state): New. | |
2979 | (augment_automaton): Adjust. | |
2980 | Better locality of the variables. | |
2981 | When looking if the start_symbol is shifted from the initial | |
2982 | state, using `while (... symbol != start_symbol ...)' sounds | |
2983 | better than `while (... symbol < start_symbol ...)': If fail | |
2984 | to see how the order between symbols could be relevant! | |
2985 | ||
78af9bbc AD |
2986 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2987 | ||
2988 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
2989 | `spec_file_prefix', declared by src/files.h. | |
2990 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
2991 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
2992 | * src/output.c (prepare): Adjust. | |
2993 | * src/reader.c (symbols_output): Likewise. | |
2994 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
2995 | ||
bdef2a41 AD |
2996 | 2001-12-10 Akim Demaille <akim@epita.fr> |
2997 | ||
2998 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
2999 | `"0"'. | |
3000 | ||
3735969c AD |
3001 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3002 | ||
3003 | * src/reader.c (reader): Calling symbols_output once is enough. | |
3004 | ||
49701457 AD |
3005 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3006 | ||
3007 | Now that states have a complete set of members, the linked list of | |
3008 | reductions is useless: just fill directly the state's reductions | |
3009 | member. | |
3010 | ||
3011 | * src/state.h (struct reductions): Remove member `number' and | |
3012 | `next'. | |
3013 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
3014 | (save_reductions): Don't link the new reductions, store them in | |
3015 | this_state. | |
3016 | * src/lalr.c (set_state_table): No need to attach reductions to | |
3017 | states, it's already done. | |
3018 | * src/output.c (output_actions): No longer free the shifts, then | |
3019 | the reductions, then the states: free all the states and their | |
3020 | members. | |
3021 | ||
0edad749 AD |
3022 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3023 | ||
3024 | * src/options.c (OPTN, DRTV, BOTH): New. | |
3025 | (option_table): Use them. | |
3026 | ||
0edad749 AD |
3027 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
3028 | the job of system.h. | |
3029 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
3030 | reasons. | |
3031 | ||
5449dd0f AD |
3032 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3033 | ||
3034 | * src/output.c (output, prepare): Make sure the values of the | |
3035 | muscles `action' and `prologue' are 0-terminated. | |
3036 | ||
a870c567 AD |
3037 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3038 | ||
3039 | Clean up GCC warnings. | |
3040 | ||
3041 | * src/reader.c (copy_action): `buf' is not used. | |
3042 | (parse_skel_decl): Be static. | |
3043 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
3044 | * src/options.h (create_long_option_table): Have a real prototype. | |
3045 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
3046 | (hash_delete_at): Return const void *. | |
3047 | Adjust casts to preserve the const. | |
3048 | ||
80df8768 AD |
3049 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3050 | ||
3051 | * configure.in: Require 2.52g. | |
3052 | M4 is not needed, but AUTOM4TE is. | |
3053 | * m4/m4.m4: Remove. | |
3054 | * tests/Makefile.am: Adjust. | |
3055 | ||
f693ad14 AD |
3056 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3057 | ||
3058 | One structure for states is enough, even though theoretically | |
3059 | there are LR(0) states and LALR(1) states. | |
3060 | ||
3061 | * src/lalr.h (state_t): Remove. | |
3062 | (state_table): Be state_t **, not state_t *. | |
3063 | * src/state.h (core, CORE_ALLOC): Rename as... | |
3064 | (state_t, STATE_ALLOC): this. | |
3065 | Add the LALR(1) members: shifts, reductions, errs. | |
3066 | * src/LR0.c (state_table): Rename as... | |
3067 | (state_hash): this, to avoid name clashes with the global | |
3068 | `state_table'. | |
3069 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
3070 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
3071 | ||
74ffbcb6 AD |
3072 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3073 | ||
3074 | Bison dumps core on bash.y. | |
3075 | Reported by Pascal Bart. | |
3076 | ||
3077 | * src/warshall.c (bitmatrix_print): New. | |
3078 | (TC): Use it. | |
3079 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
3080 | j must be the outer loop. | |
3081 | * tests/regression.at (Broken Closure): New. | |
3082 | ||
07708e19 AD |
3083 | 2001-12-05 Akim Demaille <akim@epita.fr> |
3084 | ||
3085 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
3086 | its argument. | |
3087 |