From: George H. <geo...@us...> - 2006-08-30 08:27:54
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19693/win32forth/src Modified Files: INTERPIF.F Log Message: gah:More Dexing and added files to create list Index: INTERPIF.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/INTERPIF.F,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** INTERPIF.F 16 Mar 2006 10:57:36 -0000 1.3 --- INTERPIF.F 30 Aug 2006 08:27:51 -0000 1.4 *************** *** 8,11 **** --- 8,20 ---- \ August 9th, 1996 - 10:38 tjz slight modifications for Win32Forth + \ *D doc + \ *! p-interpif W32F interpretive conditionals + \ *T Interpretive conditionals in Win32Forth + + \ *P Win32Forth supports the ANSI interpretive from the tools extension wordset, with some + \ ** W32F specific extensions as well as an alternative set based on the 'C' style words + \ ** #if #else #then etc. + + INTERNAL *************** *** 37,43 **** EXTERNAL ! : [else] ( -- ) \ ANSI TOOLS EXT ! \ *G Compilation: Perform the execution semantics given below. ! \ ** Execution: ( "<spaces>name" ... -- ) \ ** Skipping leading spaces, parse and discard space-delimited words from the parse area, \ ** including nested occurrences of [IF] ... [THEN] and [IF] ... [ELSE] ... [THEN], until --- 46,54 ---- EXTERNAL ! \ *S Glossary ! ! : [else] ( -- ) \ ANSI TOOLS EXT ! \ *G Compilation: Perform the execution semantics given below. \n ! \ ** Execution: ( "<spaces>name" ... -- ) \ ** Skipping leading spaces, parse and discard space-delimited words from the parse area, \ ** including nested occurrences of [IF] ... [THEN] and [IF] ... [ELSE] ... [THEN], until *************** *** 50,55 **** repeat ; immediate ! : [if] ( flag -- ) \ ANSI TOOLS EXT ! \ *G Compilation: Perform the execution semantics given below. \ ** Execution: ( flag | flag "<spaces>name" ... -- ) \ ** If flag is true, do nothing. Otherwise, skipping leading spaces, parse and discard --- 61,66 ---- repeat ; immediate ! : [if] ( flag -- ) \ ANSI TOOLS EXT ! \ *G Compilation: Perform the execution semantics given below. \n \ ** Execution: ( flag | flag "<spaces>name" ... -- ) \ ** If flag is true, do nothing. Otherwise, skipping leading spaces, parse and discard *************** *** 65,83 **** 0= if postpone [else] then ; immediate ! : [then] ( -- ) \ ANSI TOOLS EXT ! \ *G Compilation: Perform the execution semantics given below. \ ** Execution: ( -- ) \ ** Does nothing. [THEN] is an immediate word. ; immediate ! : [endif] ( -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \ ** Execution: ( -- ) \ ** Does nothing. [ENDIF] is an immediate word. ; immediate ! : #else ( -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. ! \ ** Execution: ( "<spaces>name" ... -- ) \ ** Skipping leading spaces, parse and discard space-delimited words from the parse area, \ ** including nested occurrences of #IF ... #THEN and #IF ... #ELSE ... #THEN, until --- 76,94 ---- 0= if postpone [else] then ; immediate ! : [then] ( -- ) \ ANSI TOOLS EXT ! \ *G Compilation: Perform the execution semantics given below. \n \ ** Execution: ( -- ) \ ** Does nothing. [THEN] is an immediate word. ; immediate ! : [endif] ( -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \n \ ** Execution: ( -- ) \ ** Does nothing. [ENDIF] is an immediate word. ; immediate ! : #else ( -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \n ! \ ** Execution: ( "<spaces>name" ... -- ) \ ** Skipping leading spaces, parse and discard space-delimited words from the parse area, \ ** including nested occurrences of #IF ... #THEN and #IF ... #ELSE ... #THEN, until *************** *** 90,95 **** repeat ; immediate ! : #if ( flag -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \ ** Execution: ( flag | flag "<spaces>name" ... -- ) \ ** If flag is true, do nothing. Otherwise, skipping leading spaces, parse and discard --- 101,106 ---- repeat ; immediate ! : #if ( flag -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \n \ ** Execution: ( flag | flag "<spaces>name" ... -- ) \ ** If flag is true, do nothing. Otherwise, skipping leading spaces, parse and discard *************** *** 105,116 **** 0= if postpone #else then ; immediate ! : #then ( -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \ ** Execution: ( -- ) \ ** Does nothing. #THEN is an immediate word. ; immediate ! : #endif ( -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \ ** Execution: ( -- ) \ ** Does nothing. #ENDIF is an immediate word. --- 116,127 ---- 0= if postpone #else then ; immediate ! : #then ( -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \n \ ** Execution: ( -- ) \ ** Does nothing. #THEN is an immediate word. ; immediate ! : #endif ( -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \n \ ** Execution: ( -- ) \ ** Does nothing. #ENDIF is an immediate word. *************** *** 119,126 **** \ header file support for conditional compilation ! : #ifdef ( 'definedword' -- ) defined nip postpone #if ; immediate ! : #ifndef ( 'notdefinedword' -- ) defined nip 0= postpone #if ; immediate --- 130,165 ---- \ header file support for conditional compilation ! : #ifdef ( "aword" -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \n ! \ ** Execution: ( "aword" | "aword<spaces>name" ... -- ) ! \ ** If "aword" is found in the search order, do nothing. Otherwise, skipping ! \ ** leading spaces, parse and discard ! \ ** space-delimited words from the parse area, including nested occurrences of ! \ ** #IF ... #THEN, #IF ... #ELSE ... #THEN, #IF ... #ENDIF and ! \ ** #IF ... #ELSE ... #ENDIF, until either the word #ELSE, ! \ ** the word #THEN or the word #ENDIF has been parsed and discarded. ! \ ** If the parse area becomes exhausted, it is refilled as with REFILL. ! \ ** #IF is an immediate word. ! \ ** An ambiguous condition exists if #IF is POSTPONEd. ! \ ** If the end of the input buffer is reached and cannot be refilled before the terminating ! \ ** #ELSE, #THEN or #ENDIF is parsed then error -58 is thrown. ! \ ** This word is designed to ignore object.ivar type words. defined nip postpone #if ; immediate ! : #ifndef ( "aword" -- ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \n ! \ ** Execution: ( "aword" | "aword<spaces>name" ... -- ) ! \ ** If "aword" is not found in the search order, do nothing. Otherwise, skipping ! \ ** leading spaces, parse and discard ! \ ** space-delimited words from the parse area, including nested occurrences of ! \ ** #IF ... #THEN, #IF ... #ELSE ... #THEN, #IF ... #ENDIF and ! \ ** #IF ... #ELSE ... #ENDIF, until either the word #ELSE, ! \ ** the word #THEN or the word #ENDIF has been parsed and discarded. ! \ ** If the parse area becomes exhausted, it is refilled as with REFILL. ! \ ** #IF is an immediate word. ! \ ** An ambiguous condition exists if #IF is POSTPONEd. ! \ ** If the end of the input buffer is reached and cannot be refilled before the terminating ! \ ** #ELSE, #THEN or #ENDIF is parsed then error -58 is thrown. ! \ ** This word is designed to ignore object.ivar type words. defined nip 0= postpone #if ; immediate *************** *** 129,140 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! : [DEFINED] ( <aword> -- f1 ) DPR-WARNING? >R DPR-WARNING-OFF BL WORD ?UPPERCASE PARMFIND nip 0<> R> TO DPR-WARNING? ; IMMEDIATE ! : [UNDEFINED] ( <aword> -- f1 ) postpone [DEFINED] 0= ; IMMEDIATE MODULE --- 168,187 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! : [DEFINED] ( "aword" -- f1 ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \n ! \ ** Execution: Return true if "aword" is found in a search of the search order. ! \ ** This word is designed to ignore object.ivar type words. DPR-WARNING? >R DPR-WARNING-OFF BL WORD ?UPPERCASE PARMFIND nip 0<> R> TO DPR-WARNING? ; IMMEDIATE ! : [UNDEFINED] ( "aword" -- f1 ) \ W32F TOOLS EXTRA ! \ *G Compilation: Perform the execution semantics given below. \n ! \ ** Execution: Return false if "aword" is found in a search of the search order. ! \ ** This word is designed to ignore object.ivar type words. postpone [DEFINED] 0= ; IMMEDIATE MODULE + \ *Z + |