Subversion Repositories Kolibri OS

Rev

Rev 4875 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4875 Rev 4882
Line 146... Line 146...
146
    ret
146
    ret
147
 endp
147
 endp
Line 148... Line 148...
148
 
148
 
Line 149... Line 149...
149
 ; ---------------------------
149
 ; ---------------------------
150
 
150
 
151
 proc parse_lvl3 uses ebx
151
 proc parse_lvl3 uses ebx ecx edx
152
    test_err
152
    test_err
153
    stdcall skip_spaces
153
    stdcall skip_spaces
154
    mov     ebx, exp
154
    mov     ebx, exp
Line 158... Line 158...
158
    cmp     [ebx], byte 57
158
    cmp     [ebx], byte 57
159
    jg	    @f
159
    jg	    @f
160
    stdcall parse_lvl4
160
    stdcall parse_lvl4
161
    jmp     .end
161
    jmp     .end
162
  @@:
162
  @@:
-
 
163
    cmp     [ebx], byte 97
-
 
164
    jl	    @f
-
 
165
    cmp     [ebx], byte 122
-
 
166
    jg	    @f
-
 
167
    jmp     .parse_func
-
 
168
  @@:
163
    inc     [exp_pos]
169
    inc     [exp_pos]
164
    cmp     [ebx], byte "("
170
    cmp     [ebx], byte "("
165
    jne     @f
171
    jne     @f
166
    inc     [exp_lvl]
172
    inc     [exp_lvl]
167
    stdcall parse_lvl0
173
    stdcall parse_lvl0
Line 189... Line 195...
189
 .end:
195
 .end:
190
    stdcall skip_spaces
196
    stdcall skip_spaces
191
    ret
197
    ret
192
 .unexp_char:
198
 .unexp_char:
193
    set_err 4
199
    set_err 4
-
 
200
 .parse_func:
-
 
201
    mov     ecx, 0
-
 
202
    mov     dl, 0
-
 
203
  @@:
-
 
204
    cmp     [ebx], byte 97
-
 
205
    jl	    @f
-
 
206
    cmp     [ebx], byte 122
-
 
207
    jg	    @f
-
 
208
    cmp     dl, 4
-
 
209
    je	    .unexp_char
-
 
210
    shl     ecx, 8
-
 
211
    mov     cl, [ebx]
-
 
212
    inc     dl
-
 
213
    inc     ebx
-
 
214
    inc     [exp_pos]
-
 
215
    jmp     @b
-
 
216
  @@:
-
 
217
    cmp     ecx, "cni"
-
 
218
    je	    @f
-
 
219
    cmp     ecx, "ced"
-
 
220
    je	    @f
-
 
221
    cmp     ecx, "sba"
-
 
222
    je	    @f
-
 
223
    cmp     ecx, "rqs"
-
 
224
    je	    @f
-
 
225
    jmp     .unexp_char
-
 
226
  @@:
-
 
227
    stdcall skip_spaces
-
 
228
    mov     ebx, exp
-
 
229
    add     ebx, [exp_pos]
-
 
230
    cmp     [ebx], byte "("
-
 
231
    jne     .unexp_char
-
 
232
    inc     [exp_lvl]
-
 
233
    inc     [exp_pos]
-
 
234
    stdcall parse_lvl0
-
 
235
    test_err
-
 
236
    mov     ebx, exp
-
 
237
    add     ebx, [exp_pos]
-
 
238
    cmp     [ebx], byte ")"
-
 
239
    je	    @f
-
 
240
    set_err 2
-
 
241
  @@:
-
 
242
    inc     [exp_pos]
-
 
243
    stdcall skip_spaces
-
 
244
    cmp     ecx, "cni"
-
 
245
    jne     @f
-
 
246
    inc     eax
-
 
247
    jmp     .f_end
-
 
248
  @@:
-
 
249
    cmp     ecx, "ced"
-
 
250
    jne     @f
-
 
251
    dec     eax
-
 
252
    jmp     .f_end
-
 
253
  @@:
-
 
254
    cmp     ecx, "sba"
-
 
255
    jne     @f
-
 
256
    mov     ecx, eax
-
 
257
    shr     ecx, 31
-
 
258
    cmp     cl, 1
-
 
259
    jne     .f_end
-
 
260
    not     eax
-
 
261
    inc     eax
-
 
262
    jmp     .f_end
-
 
263
  @@:
-
 
264
    cmp     ecx, "rqs"
-
 
265
    jne     @f
-
 
266
    imul    eax, eax
-
 
267
    jmp     .f_end
-
 
268
  @@:
-
 
269
    jmp     .unexp_char
-
 
270
 .f_end:
-
 
271
    ret
194
 endp
272
 endp
Line 195... Line 273...
195
 
273
 
Line 196... Line 274...
196
 ; ---------------------------
274
 ; ---------------------------
-
 
275
 
197
 
276
 proc parse_lvl4 uses ebx ecx
-
 
277
    stdcall skip_spaces
198
 proc parse_lvl4 uses ebx ecx
278
    stdcall parse_lvl5
199
    stdcall parse_lvl5
279
    stdcall skip_spaces
200
  @@:
280
  @@:
201
    mov     ebx, exp
281
    mov     ebx, exp
202
    add     ebx, [exp_pos]
282
    add     ebx, [exp_pos]
203
    cmp     [ebx], byte 0
283
    cmp     [ebx], byte 0
204
    je	    .end
284
    je	    .end
205
    cmp     [ebx], byte "^"
285
    cmp     [ebx], byte "^"
-
 
286
    jne     .end
206
    jne     .end
287
    inc     [exp_pos]
207
    inc     [exp_pos]
288
    stdcall skip_spaces
208
    mov     ecx, eax
289
    mov     ecx, eax
209
    mov     ebx, exp
290
    mov     ebx, exp
210
    add     ebx, [exp_pos]
291
    add     ebx, [exp_pos]