One of the coolest uses for perl that I've been playing with a lot lately is for interpreting esoteric languages. I've tried writing interpreters in c and gave up pretty soon.

For a personal project, I constructed a new esoteric language called Obfuna, the interpreter for it that I wrote in perl was great. Small code, fast, and easy.
I also wrote an interpreter for another language, condit which although seemingly less obscure in its syntax turned out to be a bitch to parse.

I won't post the code here as it's far too long. Maybe it'll make it into craft one day when I've cleaned it up and commented properly.


Replies are listed 'Best First'.
Re: Esoteric interpreting
by cheshirecat (Sexton) on Feb 27, 2002 at 11:04 UTC
    When cleaning up your code, you may want to look at Parse::RecDescent.
    I think it would make life easier with Condit as well as Obfuna.

    But thats just my $0.02.

    Cheshire Cat :)