equal
deleted
inserted
replaced
135 ^ answer |
135 ^ answer |
136 ! ! |
136 ! ! |
137 |
137 |
138 !PPCContext methodsFor:'acessing'! |
138 !PPCContext methodsFor:'acessing'! |
139 |
139 |
140 hash |
|
141 ^ collection hash |
|
142 ! |
|
143 |
|
144 initializeFor: parser |
140 initializeFor: parser |
|
141 rc := 0. |
145 parser == root ifTrue: [ ^ self ]. |
142 parser == root ifTrue: [ ^ self ]. |
146 |
143 |
147 root := parser. |
144 root := parser. |
148 root allParsersDo: [ :p | |
|
149 p updateContext: self |
|
150 ] |
|
151 ! |
145 ! |
152 |
146 |
153 root |
147 root |
154 ^ root |
148 ^ root |
155 ! |
149 ! |
160 |
154 |
161 stream: aStream |
155 stream: aStream |
162 collection := aStream collection. |
156 collection := aStream collection. |
163 position := aStream position. |
157 position := aStream position. |
164 readLimit := collection size. |
158 readLimit := collection size. |
165 ! ! |
|
166 |
|
167 !PPCContext methodsFor:'as yet unclassified'! |
|
168 |
|
169 atWs |
|
170 ^ position = ws |
|
171 ! |
|
172 |
|
173 goUpTo: char |
|
174 [ position < readLimit ] whileTrue: [ |
|
175 (collection at: position + 1) = char ifTrue: [ position := position + 1. ^ char ] . |
|
176 position := position + 1. |
|
177 ] |
|
178 |
|
179 ! |
|
180 |
|
181 setWs |
|
182 ^ ws := position |
|
183 ! |
|
184 |
|
185 ws |
|
186 ^ ws |
|
187 ! |
|
188 |
|
189 ws: anInteger |
|
190 ws := anInteger |
|
191 ! ! |
159 ! ! |
192 |
160 |
193 !PPCContext methodsFor:'converting'! |
161 !PPCContext methodsFor:'converting'! |
194 |
162 |
195 asCompiledParserContext |
163 asCompiledParserContext |
282 aPPContextMemento keysAndValuesDo: [ :key :value | |
250 aPPContextMemento keysAndValuesDo: [ :key :value | |
283 properties at: key put: value |
251 properties at: key put: value |
284 ] |
252 ] |
285 ! ! |
253 ! ! |
286 |
254 |
|
255 !PPCContext methodsFor:'whitespace'! |
|
256 |
|
257 atWs |
|
258 ^ position = ws |
|
259 ! |
|
260 |
|
261 goUpTo: char |
|
262 [ position < readLimit ] whileTrue: [ |
|
263 (collection at: position + 1) == char ifTrue: [ position := position + 1. ^ char ] . |
|
264 position := position + 1. |
|
265 ] |
|
266 |
|
267 ! |
|
268 |
|
269 setWs |
|
270 ^ ws := position |
|
271 ! |
|
272 |
|
273 ws |
|
274 ^ ws |
|
275 ! |
|
276 |
|
277 ws: anInteger |
|
278 ws := anInteger |
|
279 ! ! |
|
280 |
287 !PPCContext class methodsFor:'documentation'! |
281 !PPCContext class methodsFor:'documentation'! |
288 |
282 |
289 version_HG |
283 version_HG |
290 |
284 |
291 ^ '$Changeset: <not expanded> $' |
285 ^ '$Changeset: <not expanded> $' |