Petter Gustad <newsmailcomp3@gustad.com> wrote:
+---------------
| Meta is simple and elegant. I have just played with it to parse simple
| numbers etc, but have anybody used it to write parsers and translators
| for a full programming language?
+---------------
Way back ~1970 there was a PDP-10 program named "Meta II" that
was a standalone Meta processor. I used it to write a dead stupid
BLISS compiler over a single weekend! Now, granted, my compiler
emitted *dumb* PDP-10 assembler code[1], but it implemented most
of the core language. It didn't hurt that BLISS is roughly LL(1)
[if not LL(0)!], which nicely matches Meta's recursive-descent style.
Meta is cool.
-Rob
[1] The code generator I wrote didn't bother with register management,
assuming a simple stack VM, so that the code for "A = .A + .B * 3"
turned into this horrid mess: (*blush*)
movei t0,A ; get A's address
push p,t0 ; save for later
movei t0,A ; get A's address, *again*! (oops)
move t0,(t0) ; get .A (contents of A)
push p,t0 ; save for later
movei t0,B ; same song & dance for B
move t0,(t0)
push p,t0
movei t0,3 ; get 3
pop p,t1 ; get .B back
mul t0,t1 ; .B*3
pop p,t1 ; get .A back
add t0,t1
pop p,t1 ; get A back [note: *address* of A]
storem t0,(t1) ; done
But of course, none of that was Meta's fault. ;-} ;-}
-----
Rob Warnock, PP-ASEL-IA <rpw3@rpw3.org>
627 26th Avenue <URL:http://www.rpw3.org/>
San Mateo, CA 94403 (650)572-2607