02 Jul 2003 09:37:16 UTC
- Distribution: Language-Homespring
- Module version: 0.04
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (453 / 2 / 0)
- KwaliteeBus factor: 0
- 84.55% Coverage
- License: unknown
- Activity24 month
- Download (7.43KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- NODE OPS
- SEE ALSO
Language::Homespring - Perl interpreter for "Homespring"
use Language::Homespring; my $hs = new Language::Homespring(); $hs->parse("bear hatchery Hello,. World ..\n powers"); # run one tick print $hs->tick; # run program until it ends or 1000 ticks are reached $hs->run(1000);
This module is an interpreter for the Homespring language. It currently only implements a small subset of the homespring language and is broken in places. The Hello World example in the "examples" folder works fine though :)
Creates a new Language::Homespring object, with a blank op-tree.
- parse( $source )
Parses $source into an op-tree, discarding any previous op-tree.
Executes a single "turn" of the interpreter, returning any output as a scalar.
- run( $limit )
Executes ticks until the universe is destroyed or the (optional) tick limit is reached. Output is sent to STDOUT;
powers hydro power power invert marshy shallows rapids bear young bear bird net current insulated
force field hatchery snowmelt universe
upstream killing device bridge waterfall evaporates pump fear lock inverse lock narrows sense switch upstream sense downstream sense range sense range switch young sense young switch young range sense young range switch youth fountain time reverse up reverse down force up force down append down append up clone oblivion spawn split
Copyright (C) 2003 Cal Henderson <firstname.lastname@example.org>
Homespring is Copyright (C) 2003 Jeff Binder
Module Install Instructions
To install Language::Homespring, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Language::Homespring
For more information on module installation, please visit the detailed CPAN module installation guide.