0 [IF]
  Forth to HTML converter

  Main contributors: Brad Eckert, Ed Beroset & Dirk Busch
  Revision 4b. See bottom for revision history.

  This ANS Forth program is public domain. It translates ANS Forth to colorized
  HTML. Hyperlinks to the ANS Forth draft standard are inserted for all ANS
  standard words. Hyperlinks to user definitions are included.

  Usage: HTML FileName    Generates HTML file from Forth source.
                          Output file is Filename with .HTM extension.
         Q [forth code]   Outputs HTML for 1 line to screen

  Q is used for debugging. You can use "linenum ?" to show the line number if an
  ABORT occurs. The HTML is about 10 times as big as the Forth source because of
  all the links, color changes and whitespace.

  INCLUDEd files produce corresponding HTML pages. Most browsers get severely
  bogged down with large files. If you're converting a large Forth program to
  HTML, try to keep the source files under 500 lines each by splitting long
  source into multiple INCLUDE files.

  When you INCLUDE this file some redefinition complaints may occur. That's
  okay since you won't be loading an application on top of this.

  Users of specific Forths can extend the hyperlink table to point to words
  in a glossary for that particular Forth.


\ ------------------------------------------------------------------------------
\ Configuration - You can change the options:
0 VALUE bold                                      \ T if bold text
1 VALUE italic                                    \ T if italic comments
1 VALUE nestable                                  \ T if INCLUDE nested files
1 VALUE linksource                                \ T link to the org. file /4a/
create  dpanspath ," ./AnsForth/"                 \ path to the ANS-Files   /4a/
create  footer ," "                               \ footer to output at  /4a/
                                                 \ the bottom of the HTML-file
\ ------------------------------------------------------------------------------

: undefined ( <name> -- f ) BL WORD FIND NIP 0= ;
undefined C+!    [IF] : C+! SWAP OVER C@ + SWAP C! ;                      [THEN]
undefined BOUNDS [IF] : BOUNDS OVER + SWAP ;                              [THEN]
undefined SCAN   [IF] : SCAN
  R> DROP ;                                                              [THEN]
undefined SKIP   [IF] : SKIP
  R> DROP ;                                                              [THEN]
undefined NOOP   [IF] : NOOP ;                                            [THEN]
undefined +PLACE [IF] : +PLACE 2DUP 2>R COUNT CHARS + SWAP MOVE 2R> C+! ; [THEN]
undefined PLACE  [IF] : PLACE  0 OVER C! +PLACE ;                         [THEN]
undefined FDROP  [IF] : FDROP ;                                           [THEN]
undefined >FLOAT [IF] : >FLOAT DROP C@ [CHAR] 0 [CHAR] 9 1+ WITHIN ;      [THEN]

0 VALUE outf                                    \ output to file
1 VALUE screen-only                             \ screen is for testing
: werr  ABORT" Error writing file" ;
: out   screen-only IF TYPE    ELSE outf WRITE-FILE werr THEN ;
: outln screen-only IF TYPE CR ELSE outf WRITE-LINE werr THEN ;

: /a      ( -- )         attrib @ IF S" </a>" out THEN 0 attrib ! ;
: ,$      ( a len -- )   DUP C, BOUNDS ?DO I C@ C, LOOP ; \ text to dictionary
: text    ( <text> -- )  -1 WORD COUNT -TRAILING ,$ ;
: line    ( a line# -- ) 0 ?DO COUNT + LOOP COUNT out ;   \ output one string
: boiler  ( addr -- )    BEGIN COUNT DUP WHILE 2DUP + >R outln R> REPEAT 2DROP ;
: ital(   ( -- )         italic IF S" <i>" out THEN ;
: )ital   ( -- )         italic IF S" </i>" out THEN ;

CREATE misctext                                 \ various attribute strings
  text <a href="
  text <a name="x
  text ">
  text <a href="#x
  text ">
  text <span style="color:#
  text <hr /><h1>
  text </h1><hr /><p>
  text </span>
  text </a>
  0 C,

VARIABLE color                                  \ current color
VARIABLE infont                                 \ within <font> tag

: fontcolor ( color -- ) BASE @ >R              \ change font color
  1 infont !
  misctext 5 line 0 HEX <# # # # # # # #> out
  misctext 2 line       R> BASE ! ;

: col ( color <name> -- )                       \ define a font color
  CREATE , DOES> @ color ! ;

808080 col unknown
008000 col commentary
CC0000 col numeric
990080 col values
000000 col userwords
009999 col userdefiner
CC00CC col variables
0000FF col core_ws
0000FF col core_ext_ws
0000FF col block_ws
0000FF col double_ws
0000FF col exception_ws
0000FF col facilities_ws
0000FF col file_ws
0000FF col fp_ws
0000FF col local_ws
0000FF col malloc_ws
0000FF col progtools_ws
0000FF col searchord_ws
0000FF col string_ws

CREATE begin_header                             \ begin of HTML file part 1
  text <?xml version="1.0"?>
  text <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  text     "">
  text <html xmlns="" xml:lang="en" lang="en">
  text <head>
  text <meta http-equiv="Content-Type" content="text/xml; charset=iso-8859-1" />
  text <meta name="GENERATOR" content="Forth2HTML 0.4" />
  text <style type="text/css">
  text body {background: #FFFFEE;}
  text h1 {color: #000000;}
  text p {font-family: monospace;}
  text a {text-decoration:none;}
  text </style>
  text <title>
  0 C,

\ body defaults: the most common link color (blue) is made the default color
\ the most common plain text color (green) is made default.

CREATE mid_header                               \ begin of HTML file part 2
  text </title></head>
  text <body>
  0 C,

CREATE end_header_part1                         \ end of HTML file part 1 /4a/
  text <hr />
  text <h4 style="color:black">
  0 C,

CREATE end_header_part2                      \ end of HTML file part 2 /4a/ /4b/
  text </h4>
  text </body></html>
  0 C,

: setcolor ( -- )                               \ select next color
  attrib @ 1 = color @ 0000FF = AND 0=         \ blue link: don't color
  DROP TRUE                                    \ /4/ vlinks are still purple
  IF color @ fontcolor THEN ;

: closefont ( -- )
  infont @ IF misctext 8 line 0 infont ! THEN ;

VARIABLE bltally
: outh    ( a n -- )                            \ HTMLized text output
  999 bltally !
     [CHAR] & OF S" &amp;"     out ENDOF
     [CHAR] < OF S" &lt;"      out ENDOF
     [CHAR] > OF S" &gt;"      out ENDOF
     [CHAR] " OF S" &quot;"    out ENDOF
     [CHAR] © OF S" &copy;"    out ENDOF       \ /4a/
     BL       OF bltally @ 0= IF S"  " ELSE S" &nbsp;" THEN out
               1 bltally +!     ENDOF
     I 1 out   0 bltally !

: outhattr  ( a n -- )                          \ HTMLized text output
     [CHAR] & OF S" amp"       out ENDOF
     [CHAR] < OF S" lt"        out ENDOF
     [CHAR] > OF S" gt"        out ENDOF
     [CHAR] " OF S" quot"      out ENDOF
     [CHAR] + OF S" plus"      out ENDOF
     [CHAR] ! OF S" bang"      out ENDOF
     [CHAR] / OF S" slash"     out ENDOF
     [CHAR] \ OF S" backslash" out ENDOF
     [CHAR] ' OF S" apos"      out ENDOF
     [CHAR] = OF S" equal"     out ENDOF
     [CHAR] - OF S" dash"      out ENDOF
     [CHAR] @ OF S" at"        out ENDOF
     [CHAR] ; OF S" semi"      out ENDOF
     [CHAR] * OF S" star"      out ENDOF
     [CHAR] ? OF S" question"  out ENDOF
     [CHAR] ~ OF S" tilde"     out ENDOF
     [CHAR] # OF S" pound"     out ENDOF
     [CHAR] , OF S" comma"     out ENDOF
     [CHAR] $ OF S" dollar"    out ENDOF
     [CHAR] | OF S" bar"       out ENDOF
     [CHAR] [ OF S" leftbracket" out ENDOF
     [CHAR] ( OF S" leftparen" out ENDOF
     [CHAR] { OF S" leftbrace" out ENDOF
     [CHAR] ] OF S" rightbracket" out ENDOF
     [CHAR] ) OF S" rightparen" out ENDOF
     [CHAR] } OF S" rightbrace" out ENDOF
     BL       OF S" _"         out ENDOF
     I 1 out   

: end_header ( -- )                             \ output end of HTML file /4a/
 end_header_part1 boiler
 footer COUNT ?DUP IF outh ELSE drop THEN
 end_header_part2 boiler ;

: label ( addr len -- ) /a                      \ associate a label with a word
  misctext 1 line outhattr
  misctext 2 line 1 attrib ! ;

\ Assuming this is running on a PC, we allocate enough storage that crashes from
\ string overflows can't happen.                /4/

CREATE inbuf 260 CHARS ALLOT                    \ current line from file
CREATE token 260 CHARS ALLOT                    \ the last blank delimited string
CREATE XPAD  260 CHARS ALLOT                    \ temporary pad for word storage
CREATE EPAD  260 CHARS ALLOT                    \ temporary pad for evaluation
CREATE fn    260 CHARS ALLOT                    \ file name
CREATE fn1   260 CHARS ALLOT                    \ file name backup
CREATE "str" 260 CHARS ALLOT                    \ parsed string storage
CREATE uname 260 CHARS ALLOT                    \ : definition name
0 VALUE inf
VARIABLE nufile                                 \ T if nesting a file
VARIABLE utype                                  \ type of defined word
VARIABLE linenum
VARIABLE special                                \ special action, 0=none

: std    ( word 2nd_fn color filename label -- )
  DOES> /a DUP >R  2 CELLS +
  misctext 0 line                              \ begin hyperlink
  dpanspath COUNT out                          \ output path to ANS files /4a/
  COUNT 2DUP + >R  out S" #" out               \ output file name      /4/
  R> COUNT out misctext 2 line                 \ and anchor name
  1 attrib !
  R> 2@ SWAP EXECUTE EXECUTE ;                 \ extra attributes

: genHTML ( -- )                                \ generate pending HTML
  token COUNT DUP IF setcolor THEN outh closefont /a  0 token ! ;

: isnumber? ( addr len -- f )                   \ string converts to number?

: hparse ( a len char -- a' len' )
  2SWAP 2 PICK - token +PLACE ;

: >XPAD ( -- ) token COUNT BL SKIP XPAD PLACE ; \ move to temporary pad

: hint  ( addr len -- )                         \ interpret one line...
     0 token !  BL hparse token C@
  WHILE unknown                                \ default color
     >XPAD XPAD COUNT hyperlinks SEARCH-WORDLIST \ got a hyperlink for this?
        R> DEPTH <> ABORT" stack depth change in HTML generator"
        XPAD COUNT BASE @ 10 = IF
           >FLOAT IF FDROP numeric THEN        \ valid float or integer
           isnumber? IF numeric THEN
     THEN genHTML
  S" <br />" outln ;                           \ new line

: ofn   ( -- addr len )                         \ output file name

: hcreate ( addr len -- )
  DUP 0= IF 2DROP S" fakename" THEN            \ in case the name is missing
  EPAD COUNT EVALUATE    R> SET-CURRENT ;      \ create a hyperlink generator

\ The user defined words use the following data structure:
\ CELL   xt of coloring word
\ STRING name of reference word
\ STRING name of file

: deflink ( addr -- )                           \ make hyperlink from data structure
  DUP @ EXECUTE CELL+                          \ set color
  DUP COUNT + COUNT ofn COMPARE                \ in an external file?
  IF   misctext 0 line DUP COUNT + COUNT out   \ yes, put file name
       S" #" out COUNT outh S" >" out
  ELSE misctext 3 line COUNT outhattr          \ no, just use the name
       misctext 4 line
  THEN 1 attrib ! ;

: defx  ( a len xt -- a' len' )
  >R genHTML BL hparse >XPAD                   \ output defining word
  XPAD COUNT 2DUP hcreate R> , ,$ ofn ,$
  DOES> deflink ;

: labelnow   genHTML XPAD COUNT label ;         \ /4/
: defdat ['] numeric   defx numeric   labelnow ;
: defvar ['] variables defx variables labelnow ;
: defusr ['] userwords defx userwords labelnow ;
: defval ['] values    defx values    labelnow ;
: defdef ['] userdefiner defx userdefiner labelnow ;

: hstate=0 ( -- )             0 hstate ! ;
: hstate=1 ( -- )             1 hstate ! ;
: spec=zero ( -- )            1 special ! ;
: skip)  ( a len -- a' len' ) [CHAR] ) hparse ;
: skip}  ( a len -- a' len' ) [CHAR] } hparse ; \ /4a/
: skipw  ( a len -- a' len' ) BL hparse ;
: skipc  ( a len -- a len )   hstate @ 0= IF numeric skipw THEN ;
: skip"  ( a len -- a' len' )                   \ copy string to "str"
  genHTML [CHAR] " hparse token COUNT 1- "str" PLACE ;

\ ------------------------------------------------------------------------------
\ ":" definitions might be defining words, so they can't be assumed to be defusr
\ types. ":" makes a label and saves the name for later use by ";" which makes
\ a hyperlink or a hyperlink defining word.

:NONAME                                         \ normal : definition
  uname COUNT ['] userwords defx 2DROP  0 token !
; CONSTANT normal_def

  uname COUNT 2DUP hcreate ['] userwords , ,$ ofn ,$
  DOES> deflink defdef
; CONSTANT defining_def

: defunk ( a len -- a' len' )                   \ starting unknown definition
  hstate=1  normal_def utype !                 \ save name of : definition
  genHTML skipw userwords token COUNT BL SKIP 2DUP uname PLACE label ;

: resunk ( -- )                                 \ resolve unknown defined word
  genHTML utype @ EXECUTE hstate=0 ;

: created ( -- ) hstate @
  IF   defining_def utype !                    \ make ; create a defining word
  ELSE defdat                                  \ not compiling
  THEN ;

\ ------------------------------------------------------------------------------

: header  ( addr len -- )                       \ output big header text /4b/
  misctext 6 line
  IF   misctext 0 line
       2dup out misctext 2 line
       outln  misctext 9 line
  ELSE outln
  THEN misctext 7 line ;

: _incfil ( addr -- )                           \ trigger file nesting      /4/
  nestable 0= IF DROP EXIT THEN                \ don't nest files if disabled
  COUNT BL SKIP  2DUP R/O OPEN-FILE            \ can the file be opened?
  IF   DROP 2DROP                              \ no
  ELSE CLOSE-FILE DROP                         \ yes
       fn COUNT fn1 PLACE  fn PLACE 1 nufile !
  THEN ;

: incfile ( a len -- a' len' )                  \ include a file
  genHTML skipw token _incfil ;

: "incfil ( a len -- a' len' )                  \ include file from S" filename"
  skipw "str" _incfil ;

: hfill  ( -- len ior )                         \ read next line of file
  inbuf 256 BL FILL
  XPAD 256 inf READ-LINE ABORT" Error reading file"
  >R >R 0 XPAD R> BOUNDS                       ( idx . . )
  ?DO  I C@ 9 = IF 3 RSHIFT 1+ 3 LSHIFT        \ tab
       ELSE I C@ OVER 255 AND CHARS inbuf + C!
          1+ DUP 256 = IF CR ." Input line too long" THEN
  1 linenum +! ;

: open  ( -- ) CR ." Reading " fn COUNT TYPE ."  at line " linenum @ .
  0 linenum !
  fn COUNT R/O OPEN-FILE ABORT" Error opening source file" TO inf ;

: close  ( -- ) CR ." closing " fn COUNT TYPE
  inf CLOSE-FILE ABORT" Error closing file" ;

: .title ( addr len -- )                        \ output as title string
  BOUNDS ?DO I C@ BL = IF S" %20" out ELSE I 1 out THEN LOOP ;

: oopen  ( -- )
  ofn W/O CREATE-FILE ABORT" Error creating file" TO outf
  begin_header boiler                          \ begin boilerplate
  fn COUNT .title  mid_header boiler           \ title and end boilerplate
  bold IF S" <b>" out THEN
  fn COUNT header ;

: HTML  ( <infile> -- )
  S" /basic-links/" hyperlinks SEARCH-WORDLIST
  IF   EXECUTE  THEN                           \ remove user hyperlinks
  GET-CURRENT >R hyperlinks SET-CURRENT        \ replace the fence
  S" MARKER /basic-links/" EVALUATE
  0 TO screen-only  0 nufile !  1 linenum !    \ force usage of file
  0 infont !                                   \ /4b/
  BL WORD COUNT fn PLACE open oopen            \ open input and output files
  -1 DUP >R outf >R                            \ file nest uses stacks
     BEGIN 0 special !                         \ process line
        nufile @                               \ nest a file?
        IF   inf outf
             open oopen  outf >R               \ open new files
             0 nufile !
        THEN hfill
     WHILE inbuf SWAP hint
     close fn1 COUNT fn PLACE                  \ restore file name
     DUP -1 <>
     IF   TO outf TO inf FALSE                 \ unnest files
  BEGIN R> DUP -1 <>                            \ close all output files
  WHILE  S" </p>" out bold IF S" </b>" out THEN \ /4b/
     end_header                                 \ finish up HTML
     CLOSE-FILE ABORT" Error closing file"

: q  ( -- ) 1 TO screen-only                    \ single line test
  -1 WORD COUNT inbuf PLACE inbuf COUNT hint ;

\ 0 [IF] is often used as a comment. If it is used as a comment, scan the file
\ for a [THEN]. [THEN] must be on the next line or beyond.

: upp ( an--) BOUNDS ?DO I C@ [CHAR] a > IF I C@ 32 - I C! THEN LOOP \ uppercase

CREATE terminator 16 CHARS ALLOT                \ multiline comment terminator

: multicomment ( a len searchstring -- a' len' )
  terminator PLACE
  genHTML ital( commentary setcolor outh       \ finish up this line /4b/
  BEGIN hfill      S" <br />" outln
     EPAD R@ upp                               \ uppercase for search
     EPAD R@ terminator COUNT SEARCH
     IF   DROP EPAD - inbuf OVER token PLACE   \ before [THEN] is comment
          inbuf R> ROT /STRING
          )ital closefont EXIT
     ELSE 2DROP inbuf R> outh                  \ whole line is comment
  REPEAT inbuf SWAP )ital closefont ;          \ EOF found

: bigif  ( a len -- a len )  special @ 1 =
  IF S" [THEN]" multicomment THEN ;

\ =============================================================================

: _order order ;  : _words words ; : _see see ;

hyperlinks SET-CURRENT
\ The following words are not in the ANS standard but are very common.
: VOCABULARY    defusr ;
: DEFER         defusr ;
: INCLUDE       hstate @ 0= IF incfile THEN ;
: FLOAD         hstate @ 0= IF incfile THEN ;
: BINARY        2 BASE ! ;
: OCTAL         8 BASE ! ;
: 0             numeric spec=zero ;
: 1             numeric  ;
: -1            numeric  ;
: COMMENT:      S" COMMENT;" multicomment ;
: ((            S" ))"       multicomment ;

\ The following words are not in the ANS standard but are used in Win32Forth
: ANEW          skipw ;                    \ /4a/
: {             commentary genHTML skip} ; \ /4a/
: CallBack:     defunk ;                   \ /4a/
: :M            defunk ;                   \ /4a/
: ;M            resunk ;                   \ /4a/

\ The rest is ANS Forth standard

: \             commentary ital( genHTML token PLACE genHTML )ital token 0 ;

(   NAME                ACTION  COLOR           FILENAME        REFERENCE )
(   ------------------  ------  --------------  -----------     --------- )
std !                   NOOP    core_ws         dpans6.htm      6.1.0010
std #                   NOOP    core_ws         dpans6.htm      6.1.0030
std #>                  NOOP    core_ws         dpans6.htm      6.1.0040
std #S                  NOOP    core_ws         dpans6.htm      6.1.0050
std '                   NOOP    core_ws         dpans6.htm      6.1.0070
std (                   skip)   commentary      dpans6.htm      6.1.0080
std *                   NOOP    core_ws         dpans6.htm      6.1.0090
std */                  NOOP    core_ws         dpans6.htm      6.1.0100
std */MOD               NOOP    core_ws         dpans6.htm      6.1.0110
std +                   NOOP    core_ws         dpans6.htm      6.1.0120
std +!                  NOOP    core_ws         dpans6.htm      6.1.0130
std +LOOP               NOOP    core_ws         dpans6.htm      6.1.0140
std ,                   NOOP    core_ws         dpans6.htm      6.1.0150
std -                   NOOP    core_ws         dpans6.htm      6.1.0160
std .                   NOOP    core_ws         dpans6.htm      6.1.0180
std ."                  skip"   numeric         dpans6.htm      6.1.0190
std /                   NOOP    core_ws         dpans6.htm      6.1.0230
std /MOD                NOOP    core_ws         dpans6.htm      6.1.0240
std 0<                  NOOP    core_ws         dpans6.htm      6.1.0250
std 0=                  NOOP    core_ws         dpans6.htm      6.1.0270
std 1+                  NOOP    core_ws         dpans6.htm      6.1.0290
std 1-                  NOOP    core_ws         dpans6.htm      6.1.0300
std 2!                  NOOP    core_ws         dpans6.htm      6.1.0310
std 2*                  NOOP    core_ws         dpans6.htm      6.1.0320
std 2/                  NOOP    core_ws         dpans6.htm      6.1.0330
std 2@                  NOOP    core_ws         dpans6.htm      6.1.0350
std 2DROP               NOOP    core_ws         dpans6.htm      6.1.0370
std 2DUP                NOOP    core_ws         dpans6.htm      6.1.0380
std 2OVER               NOOP    core_ws         dpans6.htm      6.1.0400
std 2SWAP               NOOP    core_ws         dpans6.htm      6.1.0430
std :                   defunk  core_ws         dpans6.htm      6.1.0450
std ;                   resunk  core_ws         dpans6.htm      6.1.0460
std <                   NOOP    core_ws         dpans6.htm      6.1.0480
std <#                  NOOP    core_ws         dpans6.htm      6.1.0490
std =                   NOOP    core_ws         dpans6.htm      6.1.0530
std >                   NOOP    core_ws         dpans6.htm      6.1.0540
std >BODY               NOOP    core_ws         dpans6.htm      6.1.0550
std >IN                 NOOP    core_ws         dpans6.htm      6.1.0560
std >NUMBER             NOOP    core_ws         dpans6.htm      6.1.0570
std >R                  NOOP    core_ws         dpans6.htm      6.1.0580
std ?DUP                NOOP    core_ws         dpans6.htm      6.1.0630
std @                   NOOP    core_ws         dpans6.htm      6.1.0650
std ABORT               NOOP    core_ws         dpans6.htm      6.1.0670
std ABORT"              skip"   numeric         dpans6.htm      6.1.0680
std ABS                 NOOP    core_ws         dpans6.htm      6.1.0690
std ACCEPT              NOOP    core_ws         dpans6.htm      6.1.0695
std ALIGN               NOOP    core_ws         dpans6.htm      6.1.0705
std ALIGNED             NOOP    core_ws         dpans6.htm      6.1.0706
std ALLOT               NOOP    core_ws         dpans6.htm      6.1.0710
std AND                 NOOP    core_ws         dpans6.htm      6.1.0720
std BASE                NOOP    core_ws         dpans6.htm      6.1.0750
std BEGIN               NOOP    core_ws         dpans6.htm      6.1.0760
std BL                  NOOP    numeric         dpans6.htm      6.1.0770
std C!                  NOOP    core_ws         dpans6.htm      6.1.0850
std C,                  NOOP    core_ws         dpans6.htm      6.1.0860
std C@                  NOOP    core_ws         dpans6.htm      6.1.0870
std CELL+               NOOP    core_ws         dpans6.htm      6.1.0880
std CELLS               NOOP    core_ws         dpans6.htm      6.1.0890
std CHAR                skipc   core_ws         dpans6.htm      6.1.0895
std CHAR+               NOOP    core_ws         dpans6.htm      6.1.0897
std CHARS               NOOP    core_ws         dpans6.htm      6.1.0898
std CONSTANT            defdat  core_ws         dpans6.htm      6.1.0950
std COUNT               NOOP    core_ws         dpans6.htm      6.1.0980
std CR                  NOOP    core_ws         dpans6.htm      6.1.0990
std CREATE              created core_ws         dpans6.htm      6.1.1000
std DECIMAL             DECIMAL core_ws         dpans6.htm      6.1.1170
std DEPTH               NOOP    core_ws         dpans6.htm      6.1.1200
std DO                  NOOP    core_ws         dpans6.htm      6.1.1240
std DOES>               NOOP    core_ws         dpans6.htm      6.1.1250
std DROP                NOOP    core_ws         dpans6.htm      6.1.1260
std DUP                 NOOP    core_ws         dpans6.htm      6.1.1290
std ELSE                NOOP    core_ws         dpans6.htm      6.1.1310
std EMIT                NOOP    core_ws         dpans6.htm      6.1.1320
std ENVIRONMENT?        NOOP    core_ws         dpans6.htm      6.1.1345
std EVALUATE            NOOP    core_ws         dpans6.htm      6.1.1360
std EXECUTE             NOOP    core_ws         dpans6.htm      6.1.1370
std EXIT                NOOP    core_ws         dpans6.htm      6.1.1380
std FILL                NOOP    core_ws         dpans6.htm      6.1.1540
std FIND                NOOP    core_ws         dpans6.htm      6.1.1550
std FM/MOD              NOOP    core_ws         dpans6.htm      6.1.1561
std HERE                NOOP    core_ws         dpans6.htm      6.1.1650
std HOLD                NOOP    core_ws         dpans6.htm      6.1.1670
std I                   NOOP    core_ws         dpans6.htm      6.1.1680
std IF                  NOOP    core_ws         dpans6.htm      6.1.1700
std IMMEDIATE           NOOP    core_ws         dpans6.htm      6.1.1710
std INVERT              NOOP    core_ws         dpans6.htm      6.1.1720
std J                   NOOP    core_ws         dpans6.htm      6.1.1730
std KEY                 NOOP    core_ws         dpans6.htm      6.1.1750
std LEAVE               NOOP    core_ws         dpans6.htm      6.1.1760
std LITERAL             NOOP    core_ws         dpans6.htm      6.1.1780
std LOOP                NOOP    core_ws         dpans6.htm      6.1.1800
std LSHIFT              NOOP    core_ws         dpans6.htm      6.1.1805
std M*                  NOOP    core_ws         dpans6.htm      6.1.1810
std MAX                 NOOP    core_ws         dpans6.htm      6.1.1870
std MIN                 NOOP    core_ws         dpans6.htm      6.1.1880
std MOD                 NOOP    core_ws         dpans6.htm      6.1.1890
std MOVE                NOOP    core_ws         dpans6.htm      6.1.1900
std NEGATE              NOOP    core_ws         dpans6.htm      6.1.1910
std OR                  NOOP    core_ws         dpans6.htm      6.1.1980
std OVER                NOOP    core_ws         dpans6.htm      6.1.1990
std POSTPONE            NOOP    core_ws         dpans6.htm      6.1.2033
std QUIT                NOOP    core_ws         dpans6.htm      6.1.2050
std R>                  NOOP    core_ws         dpans6.htm      6.1.2060
std R@                  NOOP    core_ws         dpans6.htm      6.1.2070
std RECURSE             NOOP    core_ws         dpans6.htm      6.1.2120
std REPEAT              NOOP    core_ws         dpans6.htm      6.1.2140
std ROT                 NOOP    core_ws         dpans6.htm      6.1.2160
std RSHIFT              NOOP    core_ws         dpans6.htm      6.1.2162
std S"                  skip"   numeric         dpans6.htm      6.1.2165
std S>D                 NOOP    core_ws         dpans6.htm      6.1.2170
std SIGN                NOOP    core_ws         dpans6.htm      6.1.2210
std SM/REM              NOOP    core_ws         dpans6.htm      6.1.2214
std SOURCE              NOOP    core_ws         dpans6.htm      6.1.2216
std SPACE               NOOP    core_ws         dpans6.htm      6.1.2220
std SPACES              NOOP    core_ws         dpans6.htm      6.1.2230
std STATE               NOOP    core_ws         dpans6.htm      6.1.2250
std SWAP                NOOP    core_ws         dpans6.htm      6.1.2260
std THEN                NOOP    core_ws         dpans6.htm      6.1.2270
std TYPE                NOOP    core_ws         dpans6.htm      6.1.2310
std U.                  NOOP    core_ws         dpans6.htm      6.1.2320
std U<                  NOOP    core_ws         dpans6.htm      6.1.2340
std UM*                 NOOP    core_ws         dpans6.htm      6.1.2360
std UM/MOD              NOOP    core_ws         dpans6.htm      6.1.2370
std UNLOOP              NOOP    core_ws         dpans6.htm      6.1.2380
std UNTIL               NOOP    core_ws         dpans6.htm      6.1.2390
std VARIABLE            defvar  core_ws         dpans6.htm      6.1.2410
std WHILE               NOOP    core_ws         dpans6.htm      6.1.2430
std WORD                NOOP    core_ws         dpans6.htm      6.1.2450
std XOR                 NOOP    core_ws         dpans6.htm      6.1.2490
std [                  hstate=0 core_ws         dpans6.htm      6.1.2500
std [']                 skipw   numeric         dpans6.htm      6.1.2510
std [CHAR]              skipw   numeric         dpans6.htm      6.1.2520
std ]                  hstate=1 core_ws         dpans6.htm      6.1.2540
std #TIB                NOOP    core_ext_ws     dpans6.htm      6.2.0060
std .(                  skip)   commentary      dpans6.htm      6.2.0200
std .R                  NOOP    core_ext_ws     dpans6.htm      6.2.0210
std 0<>                 NOOP    core_ext_ws     dpans6.htm      6.2.0260
std 0>                  NOOP    core_ext_ws     dpans6.htm      6.2.0280
std 2>R                 NOOP    core_ext_ws     dpans6.htm      6.2.0340
std 2R>                 NOOP    core_ext_ws     dpans6.htm      6.2.0410
std 2R@                 NOOP    core_ext_ws     dpans6.htm      6.2.0415
std :NONAME             NOOP    core_ext_ws     dpans6.htm      6.2.0455
std <>                  NOOP    core_ext_ws     dpans6.htm      6.2.0500
std ?DO                 NOOP    core_ext_ws     dpans6.htm      6.2.0620
std AGAIN               NOOP    core_ext_ws     dpans6.htm      6.2.0700
std C"                  skip"   numeric         dpans6.htm      6.2.0855
std CASE                NOOP    core_ext_ws     dpans6.htm      6.2.0873
std COMPILE,            NOOP    core_ext_ws     dpans6.htm      6.2.0945
std CONVERT             NOOP    core_ext_ws     dpans6.htm      6.2.0970
std ENDCASE             NOOP    core_ext_ws     dpans6.htm      6.2.1342
std ENDOF               NOOP    core_ext_ws     dpans6.htm      6.2.1343
std ERASE               NOOP    core_ext_ws     dpans6.htm      6.2.1350
std EXPECT              NOOP    core_ext_ws     dpans6.htm      6.2.1390
std FALSE             spec=zero numeric         dpans6.htm      6.2.1485
std HEX                 HEX     core_ext_ws     dpans6.htm      6.2.1660
std MARKER              defusr  core_ext_ws     dpans6.htm      6.2.1850
std NIP                 NOOP    core_ext_ws     dpans6.htm      6.2.1930
std OF                  NOOP    core_ext_ws     dpans6.htm      6.2.1950
std PAD                 NOOP    core_ext_ws     dpans6.htm      6.2.2000
std PARSE               NOOP    core_ext_ws     dpans6.htm      6.2.2008
std PICK                NOOP    core_ext_ws     dpans6.htm      6.2.2030
std QUERY               NOOP    core_ext_ws     dpans6.htm      6.2.2040
std REFILL              NOOP    core_ext_ws     dpans6.htm      6.2.2125
std RESTORE-INPUT       NOOP    core_ext_ws     dpans6.htm      6.2.2148
std ROLL                NOOP    core_ext_ws     dpans6.htm      6.2.2150
std SAVE-INPUT          NOOP    core_ext_ws     dpans6.htm      6.2.2182
std SOURCE-ID           NOOP    core_ext_ws     dpans6.htm      6.2.2218
std SPAN                NOOP    core_ext_ws     dpans6.htm      6.2.2240
std TIB                 NOOP    core_ext_ws     dpans6.htm      6.2.2290
std TO                  NOOP    core_ext_ws     dpans6.htm      6.2.2295
std TRUE                NOOP    numeric         dpans6.htm      6.2.2298
std TUCK                NOOP    core_ext_ws     dpans6.htm      6.2.2300
std U.R                 NOOP    core_ext_ws     dpans6.htm      6.2.2330
std U>                  NOOP    core_ext_ws     dpans6.htm      6.2.2350
std UNUSED              NOOP    core_ext_ws     dpans6.htm      6.2.2395
std VALUE               defval  core_ext_ws     dpans6.htm      6.2.2405
std WITHIN              NOOP    core_ext_ws     dpans6.htm      6.2.2440
std [COMPILE]           NOOP    core_ext_ws     dpans6.htm      6.2.2530
std BLK                 NOOP    block_ws        dpans7.htm
std BLOCK               NOOP    block_ws        dpans7.htm
std BUFFER              NOOP    block_ws        dpans7.htm
std FLUSH               NOOP    block_ws        dpans7.htm
std LOAD                NOOP    block_ws        dpans7.htm
std SAVE-BUFFERS        NOOP    block_ws        dpans7.htm
std UPDATE              NOOP    block_ws        dpans7.htm
std EMPTY-BUFFERS       NOOP    block_ws        dpans7.htm
std LIST                NOOP    block_ws        dpans7.htm
std SCR                 NOOP    block_ws        dpans7.htm
std THRU                NOOP    block_ws        dpans7.htm
std 2CONSTANT           defdat  double_ws       dpans8.htm
std 2LITERAL            NOOP    double_ws       dpans8.htm
std 2VARIABLE           defvar  double_ws       dpans8.htm
std D+                  NOOP    double_ws       dpans8.htm
std D-                  NOOP    double_ws       dpans8.htm
std D.                  NOOP    double_ws       dpans8.htm
std D.R                 NOOP    double_ws       dpans8.htm
std D0<                 NOOP    double_ws       dpans8.htm
std D0=                 NOOP    double_ws       dpans8.htm
std D2*                 NOOP    double_ws       dpans8.htm
std D2/                 NOOP    double_ws       dpans8.htm
std D<                  NOOP    double_ws       dpans8.htm
std D=                  NOOP    double_ws       dpans8.htm
std D>S                 NOOP    double_ws       dpans8.htm
std DABS                NOOP    double_ws       dpans8.htm
std DMAX                NOOP    double_ws       dpans8.htm
std DMIN                NOOP    double_ws       dpans8.htm
std DNEGATE             NOOP    double_ws       dpans8.htm
std M*/                 NOOP    double_ws       dpans8.htm
std M+                  NOOP    double_ws       dpans8.htm
std 2ROT                NOOP    double_ws       dpans8.htm
std DU<                 NOOP    double_ws       dpans8.htm
std CATCH               NOOP    exception_ws    dpans9.htm
std THROW               NOOP    exception_ws    dpans9.htm
std AT-XY               NOOP    facilities_ws   dpans10.htm
std KEY?                NOOP    facilities_ws   dpans10.htm
std PAGE                NOOP    facilities_ws   dpans10.htm
std EKEY                NOOP    facilities_ws   dpans10.htm
std EKEY<CHAR           NOOP    facilities_ws   dpans10.htm
std EKEY?               NOOP    facilities_ws   dpans10.htm
std EMIT?               NOOP    facilities_ws   dpans10.htm
std MS                  NOOP    facilities_ws   dpans10.htm
std TIME&DATE           NOOP    facilities_ws   dpans10.htm
std BIN                 NOOP    file_ws         dpans11.htm
std CLOSE-FILE          NOOP    file_ws         dpans11.htm
std CREATE-FILE         NOOP    file_ws         dpans11.htm
std DELETE-FILE         NOOP    file_ws         dpans11.htm
std FILE-POSITION       NOOP    file_ws         dpans11.htm
std FILE-SIZE           NOOP    file_ws         dpans11.htm
std INCLUDE-FILE        NOOP    file_ws         dpans11.htm
std INCLUDED            "incfil file_ws         dpans11.htm
std OPEN-FILE           NOOP    file_ws         dpans11.htm
std R/O                 NOOP    file_ws         dpans11.htm
std R/W                 NOOP    file_ws         dpans11.htm
std READ-FILE           NOOP    file_ws         dpans11.htm
std READ-LINE           NOOP    file_ws         dpans11.htm
std REPOSITION-FILE     NOOP    file_ws         dpans11.htm
std RESIZE-FILE         NOOP    file_ws         dpans11.htm
std W/O                 NOOP    file_ws         dpans11.htm
std WRITE-FILE          NOOP    file_ws         dpans11.htm
std WRITE-LINE          NOOP    file_ws         dpans11.htm
std FILE-STATUS         NOOP    file_ws         dpans11.htm
std FLUSH-FILE          NOOP    file_ws         dpans11.htm
std RENAME-FILE         NOOP    file_ws         dpans11.htm
std >FLOAT              NOOP    fp_ws           dpans12.htm
std D>F                 NOOP    fp_ws           dpans12.htm
std F!                  NOOP    fp_ws           dpans12.htm
std F*                  NOOP    fp_ws           dpans12.htm
std F+                  NOOP    fp_ws           dpans12.htm
std F-                  NOOP    fp_ws           dpans12.htm
std F/                  NOOP    fp_ws           dpans12.htm
std F0<                 NOOP    fp_ws           dpans12.htm
std F0=                 NOOP    fp_ws           dpans12.htm
std F<                  NOOP    fp_ws           dpans12.htm
std F>D                 NOOP    fp_ws           dpans12.htm
std F@                  NOOP    fp_ws           dpans12.htm
std FALIGN              NOOP    fp_ws           dpans12.htm
std FALIGNED            NOOP    fp_ws           dpans12.htm
std FCONSTANT           defdat  fp_ws           dpans12.htm
std FDEPTH              NOOP    fp_ws           dpans12.htm
std FDROP               NOOP    fp_ws           dpans12.htm
std FDUP                NOOP    fp_ws           dpans12.htm
std FLITERAL            NOOP    fp_ws           dpans12.htm
std FLOAT+              NOOP    fp_ws           dpans12.htm
std FLOATS              NOOP    fp_ws           dpans12.htm
std FLOOR               NOOP    fp_ws           dpans12.htm
std FMAX                NOOP    fp_ws           dpans12.htm
std FMIN                NOOP    fp_ws           dpans12.htm
std FNEGATE             NOOP    fp_ws           dpans12.htm
std FOVER               NOOP    fp_ws           dpans12.htm
std FROT                NOOP    fp_ws           dpans12.htm
std FROUND              NOOP    fp_ws           dpans12.htm
std FSWAP               NOOP    fp_ws           dpans12.htm
std FVARIABLE           defvar  fp_ws           dpans12.htm
std REPRESENT           NOOP    fp_ws           dpans12.htm
std DF!                 NOOP    fp_ws           dpans12.htm
std DF@                 NOOP    fp_ws           dpans12.htm
std DFALIGN             NOOP    fp_ws           dpans12.htm
std DFALIGNED           NOOP    fp_ws           dpans12.htm
std DFLOAT+             NOOP    fp_ws           dpans12.htm
std DFLOATS             NOOP    fp_ws           dpans12.htm
std F**                 NOOP    fp_ws           dpans12.htm
std F.                  NOOP    fp_ws           dpans12.htm
std FABS                NOOP    fp_ws           dpans12.htm
std FACOS               NOOP    fp_ws           dpans12.htm
std FACOSH              NOOP    fp_ws           dpans12.htm
std FALOG               NOOP    fp_ws           dpans12.htm
std FASIN               NOOP    fp_ws           dpans12.htm
std FASINH              NOOP    fp_ws           dpans12.htm
std FATAN               NOOP    fp_ws           dpans12.htm
std FATAN2              NOOP    fp_ws           dpans12.htm
std FATANH              NOOP    fp_ws           dpans12.htm
std FCOS                NOOP    fp_ws           dpans12.htm
std FCOSH               NOOP    fp_ws           dpans12.htm
std FE.                 NOOP    fp_ws           dpans12.htm
std FEXP                NOOP    fp_ws           dpans12.htm
std FEXPM1              NOOP    fp_ws           dpans12.htm
std FLN                 NOOP    fp_ws           dpans12.htm
std FLNP1               NOOP    fp_ws           dpans12.htm
std FLOG                NOOP    fp_ws           dpans12.htm
std FS.                 NOOP    fp_ws           dpans12.htm
std FSIN                NOOP    fp_ws           dpans12.htm
std FSINCOS             NOOP    fp_ws           dpans12.htm
std FSINH               NOOP    fp_ws           dpans12.htm
std FSQRT               NOOP    fp_ws           dpans12.htm
std FTAN                NOOP    fp_ws           dpans12.htm
std FTANH               NOOP    fp_ws           dpans12.htm
std F~                  NOOP    fp_ws           dpans12.htm
std PRECISION           NOOP    fp_ws           dpans12.htm
std SET-PRECISION       NOOP    fp_ws           dpans12.htm
std SF!                 NOOP    fp_ws           dpans12.htm
std SF@                 NOOP    fp_ws           dpans12.htm
std SFALIGN             NOOP    fp_ws           dpans12.htm
std SFALIGNED           NOOP    fp_ws           dpans12.htm
std SFLOAT+             NOOP    fp_ws           dpans12.htm
std SFLOATS             NOOP    fp_ws           dpans12.htm
std (LOCAL)             NOOP    local_ws        dpans13.htm
std LOCALS|             NOOP    local_ws        dpans13.htm
std ALLOCATE            NOOP    malloc_ws       dpans14.htm
std FREE                NOOP    malloc_ws       dpans14.htm
std RESIZE              NOOP    malloc_ws       dpans14.htm
std .S                  NOOP    progtools_ws    dpans15.htm
std ?                   NOOP    progtools_ws    dpans15.htm
std DUMP                NOOP    progtools_ws    dpans15.htm
std SEE                 NOOP    progtools_ws    dpans15.htm
std WORDS               NOOP    progtools_ws    dpans15.htm
std ;CODE               resunk  progtools_ws    dpans15.htm
std AHEAD               NOOP    progtools_ws    dpans15.htm
std ASSEMBLER           NOOP    progtools_ws    dpans15.htm
std BYE                 NOOP    progtools_ws    dpans15.htm
std CODE                defusr  progtools_ws    dpans15.htm
std CS-PICK             NOOP    progtools_ws    dpans15.htm
std CS-ROLL             NOOP    progtools_ws    dpans15.htm
std EDITOR              NOOP    progtools_ws    dpans15.htm
std FORGET              NOOP    progtools_ws    dpans15.htm
std [ELSE]              NOOP    progtools_ws    dpans15.htm
std [IF]                bigif   progtools_ws    dpans15.htm
std [THEN]              NOOP    progtools_ws    dpans15.htm
std DEFINITIONS         NOOP    searchord_ws    dpans16.htm
std FORTH-WORDLIST      NOOP    searchord_ws    dpans16.htm
std GET-CURRENT         NOOP    searchord_ws    dpans16.htm
std GET-ORDER           NOOP    searchord_ws    dpans16.htm
std SEARCH-WORDLIST     NOOP    searchord_ws    dpans16.htm
std SET-CURRENT         NOOP    searchord_ws    dpans16.htm
std SET-ORDER           NOOP    searchord_ws    dpans16.htm
std WORDLIST            NOOP    searchord_ws    dpans16.htm
std ALSO                NOOP    searchord_ws    dpans16.htm
std FORTH               NOOP    searchord_ws    dpans16.htm
std ONLY                NOOP    searchord_ws    dpans16.htm
std ORDER               NOOP    searchord_ws    dpans16.htm
std PREVIOUS            NOOP    searchord_ws    dpans16.htm
std -TRAILING           NOOP    string_ws       dpans17.htm
std /STRING             NOOP    string_ws       dpans17.htm
std BLANK               NOOP    string_ws       dpans17.htm
std CMOVE               NOOP    string_ws       dpans17.htm
std CMOVE>              NOOP    string_ws       dpans17.htm
std COMPARE             NOOP    string_ws       dpans17.htm
std SEARCH              NOOP    string_ws       dpans17.htm
std SLITERAL            NOOP    string_ws       dpans17.htm


\ Revision history
\ 0. 1st release to guinea pigs via comp.lang.forth
\ 1. Added multi-line comment 0 [IF]. Colored CHAR outside definitions.
\ 2. (EJB) Added missing definitions for common but nonstandard words
\    and cleaned up to account for case sensitivity.
\ 3. (EJB) Fixed up to create conforming XHTML 1.0 Strict
\ 4. (BNE) File check before nesting, moved file names to the hyperlink table,
\    added some option flags, cleared hyperlink list for each run. Added more
\    multiline comment words. Expands tabs to spaces. Title uses %20 for blanks.
\ 4a. (DBU) Added dpanspath to configure the path to the dpans-files. Added
\     linksource to output a hyperlink to the original source file. Added
\     some words used in Win32Forth. Added footer to output a footer text
\     at the bottom of the HTML-file.
\ 4b. (DBU) Fixed some HTML-Error's found with "CSE HTML Validator Lite v3.50"