]>
Commit | Line | Data |
---|---|---|
cb581495 AD |
1 | 2001-12-13 Akim Demaille <akim@epita.fr> |
2 | ||
3 | * src/closure.c (closure): Use nrules instead of playing tricks | |
4 | with BITS_PER_WORD. | |
5 | ||
2e729273 AD |
6 | 2001-12-13 Akim Demaille <akim@epita.fr> |
7 | ||
8 | * src/print.c (print_actions): Output the handling of `$' as the | |
9 | traces do: shifting the token EOF. Before EOF was treated as a | |
10 | nonterminal. | |
11 | * tests/regression.at: Adjust some tests. | |
12 | * src/print_graph.c (print_core): Complete the set of items via | |
13 | closure. The next-to-final and final states are still unsatisfying, | |
14 | but that's to be addressed elsewhere. | |
15 | No longer output the rule numbers, but do output the state number. | |
16 | A single loop for the shifts + gotos is enough, but picked a | |
17 | distinct color for each. | |
18 | (print_graph): Initialize and finalize closure. | |
19 | ||
107f7dfb AD |
20 | 2001-12-13 Akim Demaille <akim@epita.fr> |
21 | ||
22 | * src/reader.c (readgram): Remove dead code, an strip useless | |
23 | braces. | |
24 | (get_type): Remove, unused. | |
25 | ||
9b53a24f AD |
26 | 2001-12-12 Akim Demaille <akim@epita.fr> |
27 | ||
28 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
29 | on that of lib/error.c. | |
30 | ||
dbfb6dcd AD |
31 | 2001-12-12 Akim Demaille <akim@epita.fr> |
32 | ||
33 | Some hosts don't like `/' in includes. | |
34 | ||
35 | * src/system.h: Include libgettext.h without qualifying the path. | |
36 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
37 | $(top_srcdir). | |
38 | ||
c25fb648 MA |
39 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
40 | ||
41 | * src/output.c (output_parser): Remove useless muscle. | |
42 | ||
710ddc4f MA |
43 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
44 | ||
45 | * src/bison.simple: Remove #line just before %%epilogue. It | |
46 | is now handled in ... | |
47 | * src/reader.c (read_additionnal_code): Add the output of a | |
48 | #line for the epilogue. | |
49 | ||
e83d80b8 MA |
50 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
51 | ||
52 | * src/reader.c (copy_definition): Re-use CPP-outed code which | |
53 | replace precedent remove. | |
54 | * src/bison.simple: Remove #line before %%prologue because | |
55 | %%input-line is wrong at this time. | |
56 | ||
971d5158 MA |
57 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
58 | ||
59 | * src/reader.c (symbols_output): Clean up. | |
60 | * src/output.c (output_gram, output): Clean up. | |
61 | ||
5edafffd AD |
62 | 2001-12-10 Akim Demaille <akim@epita.fr> |
63 | ||
64 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
65 | * src/LR0.c (set_state_table): here. | |
66 | * src/lalr.c (lalr): Call it. | |
67 | ||
0279f8e9 AD |
68 | 2001-12-10 Akim Demaille <akim@epita.fr> |
69 | ||
70 | * src/state.h (shifts): Remove the `number' member: shifts are | |
71 | attached to state, hence no longer need to be labelled with a | |
72 | state number. | |
73 | ||
190c4f5f AD |
74 | 2001-12-10 Akim Demaille <akim@epita.fr> |
75 | ||
76 | Now that states have a complete set of members, the linked list of | |
77 | shifts is useless: just fill directly the state's shifts member. | |
78 | ||
79 | * src/state.h (shifts): Remove the `next' member. | |
80 | * src/LR0.c (first_state, last_state): Remove. | |
81 | Adjust the callers. | |
82 | (augment_automaton): Don't look for the shifts that must be added | |
83 | a shift on EOF: it is those of the state we looked for! But now, | |
84 | since shifts are attached, it is no longer needed to looking | |
85 | merely by its id: its number. | |
86 | ||
2a73b93d AD |
87 | 2001-12-10 Akim Demaille <akim@epita.fr> |
88 | ||
89 | * src/LR0.c (augment_automaton): Better variable locality. | |
90 | Remove an impossible branch: if there is a state corresponding to | |
91 | the start symbol being shifted, then there is shift for the start | |
92 | symbol from the initial state. | |
93 | ||
74392f6a AD |
94 | 2001-12-10 Akim Demaille <akim@epita.fr> |
95 | ||
96 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
97 | only when appropriate: when insert_start_shifting_state' is not | |
98 | invoked. | |
99 | * tests/regression.at (Rule Line Numbers): Adjust. | |
100 | ||
37c82725 AD |
101 | 2001-12-10 Akim Demaille <akim@epita.fr> |
102 | ||
103 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
104 | merge the two cases addition shifts to the initial state. | |
105 | ||
6a164e0c AD |
106 | 2001-12-10 Akim Demaille <akim@epita.fr> |
107 | ||
108 | * src/lalr.c (set_state_table): Move to... | |
109 | * src/LR0.c: here. | |
110 | * src/lalr.c (lalr): Don't call it... | |
111 | * src/LR0.c (generate_states): do it. | |
112 | * src/LR0.h (first_state): Remove, only the table is used. | |
113 | ||
7215de24 AD |
114 | 2001-12-10 Akim Demaille <akim@epita.fr> |
115 | ||
116 | * src/LR0.h (first_shift, first_reduction): Remove. | |
117 | * src/lalr.c: Don't use first_shift: find shifts through the | |
118 | states. | |
119 | ||
80e25d4d AD |
120 | 2001-12-10 Akim Demaille <akim@epita.fr> |
121 | ||
122 | * src/LR0.c: Attach shifts to states as soon as they are | |
123 | computed. | |
124 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
125 | state, just assert that the mapping was properly done. | |
126 | ||
0ab3728b AD |
127 | 2001-12-10 Akim Demaille <akim@epita.fr> |
128 | ||
129 | * src/LR0.c (insert_start_shift): Rename as... | |
130 | (insert_start_shifting_state): this. | |
131 | (insert_eof_shifting_state, insert_accepting_state): New. | |
132 | (augment_automaton): Adjust. | |
133 | Better locality of the variables. | |
134 | When looking if the start_symbol is shifted from the initial | |
135 | state, using `while (... symbol != start_symbol ...)' sounds | |
136 | better than `while (... symbol < start_symbol ...)': If fail | |
137 | to see how the order between symbols could be relevant! | |
138 | ||
78af9bbc AD |
139 | 2001-12-10 Akim Demaille <akim@epita.fr> |
140 | ||
141 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
142 | `spec_file_prefix', declared by src/files.h. | |
143 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
144 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
145 | * src/output.c (prepare): Adjust. | |
146 | * src/reader.c (symbols_output): Likewise. | |
147 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
148 | ||
bdef2a41 AD |
149 | 2001-12-10 Akim Demaille <akim@epita.fr> |
150 | ||
151 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
152 | `"0"'. | |
153 | ||
3735969c AD |
154 | 2001-12-10 Akim Demaille <akim@epita.fr> |
155 | ||
156 | * src/reader.c (reader): Calling symbols_output once is enough. | |
157 | ||
49701457 AD |
158 | 2001-12-10 Akim Demaille <akim@epita.fr> |
159 | ||
160 | Now that states have a complete set of members, the linked list of | |
161 | reductions is useless: just fill directly the state's reductions | |
162 | member. | |
163 | ||
164 | * src/state.h (struct reductions): Remove member `number' and | |
165 | `next'. | |
166 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
167 | (save_reductions): Don't link the new reductions, store them in | |
168 | this_state. | |
169 | * src/lalr.c (set_state_table): No need to attach reductions to | |
170 | states, it's already done. | |
171 | * src/output.c (output_actions): No longer free the shifts, then | |
172 | the reductions, then the states: free all the states and their | |
173 | members. | |
174 | ||
0edad749 AD |
175 | 2001-12-10 Akim Demaille <akim@epita.fr> |
176 | ||
177 | * src/options.c (OPTN, DRTV, BOTH): New. | |
178 | (option_table): Use them. | |
179 | ||
0edad749 AD |
180 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
181 | the job of system.h. | |
182 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
183 | reasons. | |
184 | ||
5449dd0f AD |
185 | 2001-12-10 Akim Demaille <akim@epita.fr> |
186 | ||
187 | * src/output.c (output, prepare): Make sure the values of the | |
188 | muscles `action' and `prologue' are 0-terminated. | |
189 | ||
a870c567 AD |
190 | 2001-12-10 Akim Demaille <akim@epita.fr> |
191 | ||
192 | Clean up GCC warnings. | |
193 | ||
194 | * src/reader.c (copy_action): `buf' is not used. | |
195 | (parse_skel_decl): Be static. | |
196 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
197 | * src/options.h (create_long_option_table): Have a real prototype. | |
198 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
199 | (hash_delete_at): Return const void *. | |
200 | Adjust casts to preserve the const. | |
201 | ||
80df8768 AD |
202 | 2001-12-10 Akim Demaille <akim@epita.fr> |
203 | ||
204 | * configure.in: Require 2.52g. | |
205 | M4 is not needed, but AUTOM4TE is. | |
206 | * m4/m4.m4: Remove. | |
207 | * tests/Makefile.am: Adjust. | |
208 | ||
f693ad14 AD |
209 | 2001-12-10 Akim Demaille <akim@epita.fr> |
210 | ||
211 | One structure for states is enough, even though theoretically | |
212 | there are LR(0) states and LALR(1) states. | |
213 | ||
214 | * src/lalr.h (state_t): Remove. | |
215 | (state_table): Be state_t **, not state_t *. | |
216 | * src/state.h (core, CORE_ALLOC): Rename as... | |
217 | (state_t, STATE_ALLOC): this. | |
218 | Add the LALR(1) members: shifts, reductions, errs. | |
219 | * src/LR0.c (state_table): Rename as... | |
220 | (state_hash): this, to avoid name clashes with the global | |
221 | `state_table'. | |
222 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
223 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
224 | ||
74ffbcb6 AD |
225 | 2001-12-10 Akim Demaille <akim@epita.fr> |
226 | ||
227 | Bison dumps core on bash.y. | |
228 | Reported by Pascal Bart. | |
229 | ||
230 | * src/warshall.c (bitmatrix_print): New. | |
231 | (TC): Use it. | |
232 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
233 | j must be the outer loop. | |
234 | * tests/regression.at (Broken Closure): New. | |
235 | ||
07708e19 AD |
236 | 2001-12-05 Akim Demaille <akim@epita.fr> |
237 | ||
238 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
239 | its argument. | |
240 |