version 1.19, 1996/01/07 17:22:13
|
version 1.23, 1996/07/26 15:28:31
|
Line 42
|
Line 42
|
|
|
warnings off |
warnings off |
|
|
|
require interpretation.fs |
require debugging.fs |
require debugging.fs |
[IFUNDEF] vocabulary include search-order.fs [THEN] |
[IFUNDEF] vocabulary include search-order.fs [THEN] |
[IFUNDEF] environment? include environ.fs [THEN] |
[IFUNDEF] environment? include environ.fs [THEN] |
Line 56 maxchar 1+ constant eof-char
|
Line 57 maxchar 1+ constant eof-char
|
: read-whole-file ( c-addr1 file-id -- c-addr2 ) |
: read-whole-file ( c-addr1 file-id -- c-addr2 ) |
\ reads the contents of the file file-id puts it into memory at c-addr1 |
\ reads the contents of the file file-id puts it into memory at c-addr1 |
\ c-addr2 is the first address after the file block |
\ c-addr2 is the first address after the file block |
>r dup -1 r> read-file throw + ; |
>r dup $7fffffff r> read-file throw + ; |
|
|
variable rawinput \ pointer to next character to be scanned |
variable rawinput \ pointer to next character to be scanned |
variable endrawinput \ pointer to the end of the input (the char after the last) |
variable endrawinput \ pointer to the end of the input (the char after the last) |
Line 203 print-token !
|
Line 204 print-token !
|
|
|
: ` ( -- terminal ) ( use: ` c ) |
: ` ( -- terminal ) ( use: ` c ) |
( creates anonymous terminal for the character c ) |
( creates anonymous terminal for the character c ) |
[compile] ascii singleton ['] ?nextchar make-terminal ; |
char singleton ['] ?nextchar make-terminal ; |
|
|
char a char z .. char A char Z .. union char _ singleton union charclass letter |
char a char z .. char A char Z .. union char _ singleton union charclass letter |
char 0 char 9 .. charclass digit |
char 0 char 9 .. charclass digit |
Line 305 constant type-description
|
Line 306 constant type-description
|
|
|
: fetch-double ( item -- ) |
: fetch-double ( item -- ) |
>r |
>r |
r@ item-name 2@ type |
." FETCH_DCELL(" |
." = ({Double_Store _d; _d.cells.low = " |
r@ item-name 2@ type ." , " |
r@ item-d-offset @ dup effect-in-size 2@ data-stack-access |
r@ item-d-offset @ dup effect-in-size 2@ data-stack-access |
." ; _d.cells.high = " 1+ effect-in-size 2@ data-stack-access |
." , " 1+ effect-in-size 2@ data-stack-access |
." ; _d.dcell;});" cr |
." );" cr |
rdrop ; |
rdrop ; |
|
|
: fetch-float ( item -- ) |
: fetch-float ( item -- ) |
Line 360 constant type-description
|
Line 361 constant type-description
|
: store-double ( item -- ) |
: store-double ( item -- ) |
\ !! store optimization is not performed, because it is not yet needed |
\ !! store optimization is not performed, because it is not yet needed |
>r |
>r |
." {Double_Store _d; _d.dcell = " r@ item-name 2@ type ." ; " |
." STORE_DCELL(" r@ item-name 2@ type ." , " |
r@ item-d-offset @ dup effect-out-size 2@ data-stack-access |
r@ item-d-offset @ dup effect-out-size 2@ data-stack-access |
." = _d.cells.low; " 1+ effect-out-size 2@ data-stack-access |
." , " 1+ effect-out-size 2@ data-stack-access |
." = _d.cells.high;}" cr |
." );" cr |
rdrop ; |
rdrop ; |
|
|
: f-same-as-in? ( item -- f ) |
: f-same-as-in? ( item -- f ) |