Re: [stack] ANN: Concatenative Macro Processor
eas lab <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
Just to keep the pipes exercised [I suspected that I'd been cut-off of cat-list [what's happening in the 1st-world/N-hemisphere 'for' no cat-list-traffic ?] ] I'm asking what's Minimac's minimal-syntax ? I/we don't just go off to httpS on a whim. ANNs should contain minimum info to justify further effort investment. How would it: remove all sequences of lines, starting from <string1> upto <string2> ? == TIA. On 6/23/09, Mark W. Humphries <[email protected]> wrote: > Minimac (http://freshmeat.net/projects/minimac-macro-processor) is a > minimalist, general purpose text macro processor. > It uses an explicit argument stack, and user functions are defined by > concatenation. > The software is currently in alpha release. > > Example: 99 bottles of beer (http://99-bottles-of-beer.net/) > > `drink! ( u -- ) `{continue}${#} > this-many-bottles of beer on the wall, this-many-bottles of beer. > Take one down and pass it around, fewer-bottles of beer on the wall. > > {repeat}` > > `oh-no! ( -- ) `No more bottles of beer on the wall, no more bottles of > beer.` > > `please! ( u -- u ) `{#} > Go to the store and buy some more, this-many-bottles of beer on the > wall.` > > `this-many-bottles ( u -- u ) `[{dup} 0& ~no more bottles~& {case} 1& ~1 > bottle~& {case} {.} ~ bottles~]` > > `fewer-bottles ( u -- u-1 ) `{--}$this-many-bottles` > > 99& drink! > oh-no! > 99& please! > > > > Cheers, > Mark Humphries > >