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