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