Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sail / sh / value
1 ;
2 ; value.sh
3 ;
4 ; r/value evaluation
5 ;
6 ; © 1995 Straylight
7 ;
8
9 ;----- Overview -------------------------------------------------------------
10 ;
11 ; Functions provided:
12 ;
13 ; val_readExp
14 ; val__readP1
15 ; val_readLvalue
16
17 [ :LNOT::DEF:value__dfn
18 GBLL value__dfn
19
20 ; --- val_readExp ---
21 ;
22 ; On entry: R8 == lookahead token
23 ; R9 == current line number
24 ; R10 == pointer into the tokenised buffer
25 ; R11 == evaluation stack pointer
26 ; R12 == anchor block pointer
27 ;
28 ; On exit: R0 == value of the rvalue
29 ; R1 == type of the variable
30 ; R8 == new lookahead token
31 ; R11 == moved on to the first character after the rvalue
32 ; May return an error
33 ;
34 ; Use: Tries to read an rvalue from the current program location.
35
36 IMPORT val_readExp
37
38 ; --- val__readP1 ---
39 ;
40 ; On entry: R9 == current line number
41 ; R10 == pointer into the tokenised buffer
42 ; R11 == evaluation stack pointer
43 ; R12 == anchor block pointer
44 ;
45 ; On exit: R0 == next character to look at
46 ;
47 ; Use: Evaluates a precedence 4 type expression and store the
48 ; result on the stack. The first unused character is
49 ; placed in R0.
50
51 IMPORT val__readP1
52
53 ; --- val_readLvalue ---
54 ;
55 ; On entry: R7 == 0 to read as an rvalue, 1 for lvalue
56 ; R8 == next token to read
57 ; R9 == current line number
58 ; R10 == pointer into the tokenised buffer
59 ; R11 == evaluation stack pointer
60 ; R12 == anchor block pointer
61 ;
62 ; On exit: R0 == pointer to the variable block if R7 == 1
63 ; R8 == new next token to read
64 ; May return an error
65 ;
66 ; Use: Tries to read an lvalue from the current program location.
67
68 IMPORT val_readLvalue
69
70 ]
71
72 ;----- That's all, folks ----------------------------------------------------
73
74 END