Language::Zcode

Language::Zcode is a Perl module to play with Z-code and the Z-machine.
Download

Language::Zcode Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Amir Karger
  • Publisher web site:
  • http://search.cpan.org/~akarger/Language-Zcode-0.8/lib/Language/Zcode.pm

Language::Zcode Tags


Language::Zcode Description

Language::Zcode is a Perl module to play with Z-code and the Z-machine. Language::Zcode is a Perl module to play with Z-code and the Z-machine.SYNOPSISTranslate a Z-code file into Perl. The following (if piped to a file) will create an executable which will will execute just as if you ran zork1.z3 under a Z-code interpreter. Note: the executable will not be standalone; it will use Language::Zcode::Runtime::* modules. Creating a downloadable single-file executable is a TODO. use Language::Zcode::Parser; # parse Z-file use Language::Zcode::Translator; # language-specific output routines my $Zfile = "zork1.z3"; my $Parser = new Language::Zcode::Parser "Perl"; $Parser->read_memory($Zfile); $Parser->parse_header(); my $T = new Language::Zcode::Translator "Perl"; print $T->program_start(); for my $rtn ($Parser->find_subs($Zfile)) { $rtn->parse(); print $T->routine_start($rtn->address, $rtn->locals); print $T->translate_command($_) for $rtn->commands; print $T->routine_end(); } print $T->write_memory(); print $T->program_end();Create a Z-machine... Nothing here yet.Parse a Quetzal save file. Nothing here yet. Requirements: · Perl


Language::Zcode Related Software