]>
Commit | Line | Data |
---|---|---|
971d5158 MA |
1 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
2 | ||
3 | * src/reader.c (symbols_output): Clean up. | |
4 | * src/output.c (output_gram, output): Clean up. | |
5 | ||
5edafffd AD |
6 | 2001-12-10 Akim Demaille <akim@epita.fr> |
7 | ||
8 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
9 | * src/LR0.c (set_state_table): here. | |
10 | * src/lalr.c (lalr): Call it. | |
11 | ||
0279f8e9 AD |
12 | 2001-12-10 Akim Demaille <akim@epita.fr> |
13 | ||
14 | * src/state.h (shifts): Remove the `number' member: shifts are | |
15 | attached to state, hence no longer need to be labelled with a | |
16 | state number. | |
17 | ||
190c4f5f AD |
18 | 2001-12-10 Akim Demaille <akim@epita.fr> |
19 | ||
20 | Now that states have a complete set of members, the linked list of | |
21 | shifts is useless: just fill directly the state's shifts member. | |
22 | ||
23 | * src/state.h (shifts): Remove the `next' member. | |
24 | * src/LR0.c (first_state, last_state): Remove. | |
25 | Adjust the callers. | |
26 | (augment_automaton): Don't look for the shifts that must be added | |
27 | a shift on EOF: it is those of the state we looked for! But now, | |
28 | since shifts are attached, it is no longer needed to looking | |
29 | merely by its id: its number. | |
30 | ||
2a73b93d AD |
31 | 2001-12-10 Akim Demaille <akim@epita.fr> |
32 | ||
33 | * src/LR0.c (augment_automaton): Better variable locality. | |
34 | Remove an impossible branch: if there is a state corresponding to | |
35 | the start symbol being shifted, then there is shift for the start | |
36 | symbol from the initial state. | |
37 | ||
74392f6a AD |
38 | 2001-12-10 Akim Demaille <akim@epita.fr> |
39 | ||
40 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
41 | only when appropriate: when insert_start_shifting_state' is not | |
42 | invoked. | |
43 | * tests/regression.at (Rule Line Numbers): Adjust. | |
44 | ||
37c82725 AD |
45 | 2001-12-10 Akim Demaille <akim@epita.fr> |
46 | ||
47 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
48 | merge the two cases addition shifts to the initial state. | |
49 | ||
6a164e0c AD |
50 | 2001-12-10 Akim Demaille <akim@epita.fr> |
51 | ||
52 | * src/lalr.c (set_state_table): Move to... | |
53 | * src/LR0.c: here. | |
54 | * src/lalr.c (lalr): Don't call it... | |
55 | * src/LR0.c (generate_states): do it. | |
56 | * src/LR0.h (first_state): Remove, only the table is used. | |
57 | ||
7215de24 AD |
58 | 2001-12-10 Akim Demaille <akim@epita.fr> |
59 | ||
60 | * src/LR0.h (first_shift, first_reduction): Remove. | |
61 | * src/lalr.c: Don't use first_shift: find shifts through the | |
62 | states. | |
63 | ||
80e25d4d AD |
64 | 2001-12-10 Akim Demaille <akim@epita.fr> |
65 | ||
66 | * src/LR0.c: Attach shifts to states as soon as they are | |
67 | computed. | |
68 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
69 | state, just assert that the mapping was properly done. | |
70 | ||
0ab3728b AD |
71 | 2001-12-10 Akim Demaille <akim@epita.fr> |
72 | ||
73 | * src/LR0.c (insert_start_shift): Rename as... | |
74 | (insert_start_shifting_state): this. | |
75 | (insert_eof_shifting_state, insert_accepting_state): New. | |
76 | (augment_automaton): Adjust. | |
77 | Better locality of the variables. | |
78 | When looking if the start_symbol is shifted from the initial | |
79 | state, using `while (... symbol != start_symbol ...)' sounds | |
80 | better than `while (... symbol < start_symbol ...)': If fail | |
81 | to see how the order between symbols could be relevant! | |
82 | ||
78af9bbc AD |
83 | 2001-12-10 Akim Demaille <akim@epita.fr> |
84 | ||
85 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
86 | `spec_file_prefix', declared by src/files.h. | |
87 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
88 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
89 | * src/output.c (prepare): Adjust. | |
90 | * src/reader.c (symbols_output): Likewise. | |
91 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
92 | ||
bdef2a41 AD |
93 | 2001-12-10 Akim Demaille <akim@epita.fr> |
94 | ||
95 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
96 | `"0"'. | |
97 | ||
3735969c AD |
98 | 2001-12-10 Akim Demaille <akim@epita.fr> |
99 | ||
100 | * src/reader.c (reader): Calling symbols_output once is enough. | |
101 | ||
49701457 AD |
102 | 2001-12-10 Akim Demaille <akim@epita.fr> |
103 | ||
104 | Now that states have a complete set of members, the linked list of | |
105 | reductions is useless: just fill directly the state's reductions | |
106 | member. | |
107 | ||
108 | * src/state.h (struct reductions): Remove member `number' and | |
109 | `next'. | |
110 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
111 | (save_reductions): Don't link the new reductions, store them in | |
112 | this_state. | |
113 | * src/lalr.c (set_state_table): No need to attach reductions to | |
114 | states, it's already done. | |
115 | * src/output.c (output_actions): No longer free the shifts, then | |
116 | the reductions, then the states: free all the states and their | |
117 | members. | |
118 | ||
0edad749 AD |
119 | 2001-12-10 Akim Demaille <akim@epita.fr> |
120 | ||
121 | * src/options.c (OPTN, DRTV, BOTH): New. | |
122 | (option_table): Use them. | |
123 | ||
0edad749 AD |
124 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
125 | the job of system.h. | |
126 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
127 | reasons. | |
128 | ||
5449dd0f AD |
129 | 2001-12-10 Akim Demaille <akim@epita.fr> |
130 | ||
131 | * src/output.c (output, prepare): Make sure the values of the | |
132 | muscles `action' and `prologue' are 0-terminated. | |
133 | ||
a870c567 AD |
134 | 2001-12-10 Akim Demaille <akim@epita.fr> |
135 | ||
136 | Clean up GCC warnings. | |
137 | ||
138 | * src/reader.c (copy_action): `buf' is not used. | |
139 | (parse_skel_decl): Be static. | |
140 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
141 | * src/options.h (create_long_option_table): Have a real prototype. | |
142 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
143 | (hash_delete_at): Return const void *. | |
144 | Adjust casts to preserve the const. | |
145 | ||
80df8768 AD |
146 | 2001-12-10 Akim Demaille <akim@epita.fr> |
147 | ||
148 | * configure.in: Require 2.52g. | |
149 | M4 is not needed, but AUTOM4TE is. | |
150 | * m4/m4.m4: Remove. | |
151 | * tests/Makefile.am: Adjust. | |
152 | ||
f693ad14 AD |
153 | 2001-12-10 Akim Demaille <akim@epita.fr> |
154 | ||
155 | One structure for states is enough, even though theoretically | |
156 | there are LR(0) states and LALR(1) states. | |
157 | ||
158 | * src/lalr.h (state_t): Remove. | |
159 | (state_table): Be state_t **, not state_t *. | |
160 | * src/state.h (core, CORE_ALLOC): Rename as... | |
161 | (state_t, STATE_ALLOC): this. | |
162 | Add the LALR(1) members: shifts, reductions, errs. | |
163 | * src/LR0.c (state_table): Rename as... | |
164 | (state_hash): this, to avoid name clashes with the global | |
165 | `state_table'. | |
166 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
167 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
168 | ||
74ffbcb6 AD |
169 | 2001-12-10 Akim Demaille <akim@epita.fr> |
170 | ||
171 | Bison dumps core on bash.y. | |
172 | Reported by Pascal Bart. | |
173 | ||
174 | * src/warshall.c (bitmatrix_print): New. | |
175 | (TC): Use it. | |
176 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
177 | j must be the outer loop. | |
178 | * tests/regression.at (Broken Closure): New. | |
179 | ||
07708e19 AD |
180 | 2001-12-05 Akim Demaille <akim@epita.fr> |
181 | ||
182 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
183 | its argument. | |
184 |