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