[colorforth] colorforth code in ASCII
- Subject: [colorforth] colorforth code in ASCII
- From: Kristopher Johnson <kristopher_d_johnson@xxxxxxxxx>
- Date: Sun, 2 Jun 2002 08:14:35 -0700 (PDT)
--- George Morrison <gdm@xxxxxxxxxxxxxxxxxx> wrote:
> I considered using : for defining words, but I was playing with the wiki
> at the time and wondered if it might be possible to get the wiki to
> automatically colourise code.
The wiki already has a notation for putting things in color. See the
http://kristopherjohnson.net/wiki/ColorForthGcd for an example. The ASCII text
version looks like this:
%BEGINCF%
%WHITE{Greatest Common Denominator - Euclid}% %YELLOW{macro}%
%RED{2dup}% %WHITE{mn-mnmn}% %CYAN{over over}% %GREEN{;}% %YELLOW{forth}%
%RED{rem}% %WHITE{mn-mnr}% %GREEN{2dup mod ;}%
%RED{notzero}% %DGREEN{ffffffff}% %GREEN{? ;}%
%RED{newvals}% %WHITE{mnr-nr}% %GREEN{push nip pop ;}%
%RED{result}% %WHITE{mnr-n}% %GREEN{drop nip ;}%
%RED{gcd}% %WHITE{mn-d}% %GREEN{rem notzero if newvals gcd ; then result ;}%
%ENDCF%
This is a little verbose; a simpler notation would be helpful. I'd be willing
to enhance the wiki software to handle any notation that is reasonably easy to
parse.
-- Kris
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com------------------------
To Unsubscribe from this list, send mail to Mdaemon@xxxxxxxxxxxxxxxxxx with:
unsubscribe ColorForth
as the first and only line within the message body
Problems - List-Admin@xxxxxxxxxxxxxxxxxx
Main ColorForth site - http://www.colorforth.com