Diff for /gforth/Attic/interpretation.fs between versions 1.1 and 1.2

version 1.1, 1996/05/06 12:39:00 version 1.2, 1996/05/09 18:13:00
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 45  IS interpret-special Line 47  IS interpret-special
     interpretation-semantics set-current : reveal      interpretation-semantics set-current : reveal
     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:

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>