Newbie query - getting an interpreter using SPARK up and running ...
Andy Elvey
andy.elvey at paradise.net.nz
Fri Apr 27 17:33:10 EDT 2001
Hi all .
I've been trying to get a little interpreter going which uses John
Aycock's package, SPARK. The language I've chosen to try is Rebol , for
two reasons -
a) Rebol's syntax is simple , and ...
b) Testing should be easy - the Rebol binary (which I have) is less than
half a meg to download.
Sadly, no luck with my efforts so far! What I'm trying to get going is a
*small but central* part of the language, as follows -
Rebol consists of words, blocks and functions. Examples -
myword: "a nice little string" anotherword: [ This word uses a block]
and_yet_another_word: [ 'Alan': '333-2354'
'fred: '435-6453' ] . <- This
word creates a block.
Just by the way .... a word like fred: is a word of datatype set-word! in
Rebol. The colon isn't an operator.
If we have a word like fred: 123
fred: gives the word a value - 123 .
'fred (with a single quote) returns the words name (fred here) but does
not evaluate it .
fred - This means to evaluate the word - it returns 123 here.
:fred - retrieve the words value , but don't evaluate it . Often used to
refer to functions or blocks without evaluating them.
Blocks and rebol code can span multiple lines.
Functions are defined like so : sum: func [arg1 arg2] [arg1 + arg2] .
Are there any "SPARKatistas" out there who may be able to help? I imagine
that anyone who's used SPARK for a while could get a simple little
interpreter like the one above running in about an hour or so .....
The reason I'm doing this is to learn about Spark , but just like "riding
a bicycle" , I need a little "push" to get me underway ...:-) Very many
thanks for any help received. Thanks for your time .
More information about the Python-list
mailing list