version 1.1, 1996/05/06 12:39:00
|
version 1.3, 1996/05/13 16:36:59
|
Line 20
|
Line 20
|
|
|
|
|
\ This file defines a mechanism for specifying special interpretation |
\ This file defines a mechanism for specifying special interpretation |
\ semantics as well as the interpretation semantics of several words. |
\ semantics and the interpretation semantics of several words. |
|
|
|
require search-order.fs |
|
|
table constant interpretation-semantics |
table constant interpretation-semantics |
|
|
Line 32 table constant interpretation-semantics
|
Line 34 table constant interpretation-semantics
|
else |
else |
defers interpret-special |
defers interpret-special |
endif ; |
endif ; |
IS interpret-special |
' interpret-special >body ! |
|
|
: interpretation: ( -- colon-sys ) \ gforth |
: interpretation: ( -- colon-sys ) \ gforth |
\G make the last word one with special interpretation semantics and |
\G make the last word one with special interpretation semantics and |
Line 42 IS interpret-special
|
Line 44 IS interpret-special
|
restrict |
restrict |
lastcfa cell nextname \ !! use nfa instead of cfa |
lastcfa cell nextname \ !! use nfa instead of cfa |
get-current >r |
get-current >r |
interpretation-semantics set-current : reveal |
interpretation-semantics set-current : |
r> set-current ; |
r> set-current ; |
|
|
|
\ !! split notfound and sfnumber in a compiler and an interpreter part? |
|
|
|
\ ' ['] |
|
|
|
\ !! or keep it state-smart? |
|
' [char] Alias Ascii immediate |
|
interpretation: ( "char" -- c ) |
|
\ currently also the interpretation semantics of [char] |
|
char ; |
|
|
|
\ [I] |
|
|
|
\ the following interpretation semantics definitions restrict the |
|
\ preceeding word. However, this does not matter because these |
|
\ restricted words are in interpretation-semantics and are never |
|
\ interpreted like regular words. |
|
|
|
\ we cannot use s" interpretively yet (to make a string for (sfind), so: |
|
' S" lastcfa ! |
|
interpretation: ( "ccc<">" -- c-addr u ) |
|
[char] " parse |
|
/line min >r s"-buffer r@ cmove |
|
s"-buffer r> ; |
|
|
|
' ." lastcfa ! |
|
interpretation: ( "ccc<">" -- ) |
|
[char] " parse type ; |
|
|
|
' does> lastcfa ! |
|
interpretation: ( -- colon-sys ) ( name execution: -- addr ) |
|
align dodoes, here !does ] |
|
defstart :-hook ; |
|
|
|
' is lastcfa ! |
|
interpretation: ( addr "name" -- ) |
|
' >body ! ; |
|
|
|
' what's lastcfa ! |
|
interpretation: ( "name" -- addr ) |
|
' >body @ ; |
|
|
|
|
\ : foo |
\ : foo |
\ ." compilation semantics" ; immediate |
\ ." compilation semantics" ; immediate |
\ interpretation: |
\ interpretation: |