Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

hello i have read an article "How to build an interpreter in Java" ; ie a Basic interpreter in java. i wonder if it is possible : "How to build an interpreter in perl" ??. perl is written in C , why not write another fantasia language in perl??. i seek your wisdom for this issue. thanks

Replies are listed 'Best First'.
Re: build an interpreter in perl
by Utilitarian (Vicar) on Oct 29, 2009 at 11:58 UTC
Re: build an interpreter in perl
by almut (Canon) on Oct 29, 2009 at 12:10 UTC

    Parse::Eyapp would be another module to look at... (comes with pretty good documentation and examples).

Re: build an interpreter in perl
by Ratazong (Monsignor) on Oct 29, 2009 at 14:31 UTC

    Just google for 99 bottles of beer or esoteric programming langauges to find a variety of suitable fantasia languages. Many come with a Perl interpreter (e.g. lolcode, piet or Ook!), so you can compare your code with the existing solutions (e.g. this one for Ook! Ook interpreter).

    enjoy! Rata
Re: build an interpreter in perl
by hangon (Deacon) on Oct 29, 2009 at 17:21 UTC

    How about a Perl interpreter in Perl? ;-)

    open FH, "$ARGV[-1]"; eval "@{[<FH>]}";