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