in reply to Re: BURL: The Orcish scripting language
in thread BURL: The Orcish scripting language

Well, the easier filter is to convert BURL back to perl. Converting perl to BURL appears to be more difficult.

# # būrl to perl filter # # būrl is the Orcish variety of perl. # not as expressive, and more restrictive. # # usage: # # perl -p orc2perl.pl source_file.bl > outfile.pl # s/ū/uu/; s/ā/aa/; s/ u / \# /; s/^u /\# /; s/^u$/\#/; s/ u$/ \#/; s/(uur|kuu) (.*)( \# .*)?$/for ($2) { $3/; s/gaakh (.*)( \# .*)?$/if ($1) { $2/; s/ash/} else {/; s/ghaash (.*)( \# .*)?$/} elsif ($1) { $2/; s/fulg (.*)( \# .*)?$/while ($1) { $2/; s/uluuk/for(;;) {/; s/buurz!(.*)( \# .*)?$/sleep($1); $2/; s/kuu (.*)( \# .*)?$/until ($1) { $2/; s/(nar|sha)!/};/; s/ai!/print STDERR/; s/snaga (.*)( \# .*)?$/sub $1 { $2/; s/ash/scalar/; s/bhaduur/chdir/; s/pushdug/push/; s/prakhug/pop/; s/maturz/kill/; s/dab/my/; s/mat/die/; s/baduzg/open/; s/fauth/close/; s/mog!/print;/; s/mog/print/; s/thrak/join/; s/raakh!/split;/; s/raakh/split/;

Replies are listed 'Best First'.
Re: Re: Re: BURL: The Orcish scripting language
by Beatnik (Parson) on Dec 20, 2001 at 23:00 UTC
    Well, Filter::Simple is staring at you :)

    Greetz
    Beatnik
    ... Quidquid perl dictum sit, altum viditur.