Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.lang.forth Subject: Re: Postfixer FORTH Message-ID: Date: 22 Aug 90 17:14:15 GMT References: <9008180333.AA11956@ucbvax.Berkeley.EDU> <1560.UUL1.3#5129@willett.pgh.pa.us> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 13 The following is in FIG-forth. I still fail to see the point of dumping state. It's also untested and written by a rusty Forth coder. " xxx" is assumed to leave the address of a counted string on top of the stack. : { state @ if compile (branch) then compile (docol) here state @ 34 ; : } ?comp 34 ?match state ! compile (;s) state @ if dup here over - swap ! literal then ; : def tib @ in @ count drop tib ! 0 in ! [compile] : in ! tib ! [ , ] [compile] ; ; : {ifelse} if swap then drop execute ; ( use as { ... } { ... } flag {ifelse} ) : {while} >r begin i execute until r> drop ; ( use as { ... flag } {while} ) : {do} rot >r do i j execute loop r> drop ; ( use as { ... } hi lo {do} ) ... -- Peter da Silva. `-_-' +1 713 274 5180. 'U` peter@ferranti.com