A from scratch implementation of Tcl on Parrot.
To build the tcl compiler, first build parrot and the parrot utilities. From the top level parrot directory:
perl Configure.pl && make
Then, type make in this directory. This will generate the file tcl.pbc which can then be used to run tcl programs.
make
tcl.pbc
../../parrot tcl.pbc foo.tcl
You can also generate a faux-executable with make tclsh; You could then run examples with, e.g.:
make tclsh
./tclsh example/bench.tcl
To run partcl interactively, simply run the faux-executable with no args:
./tclsh
or, similarly, the parrot bytecode: ../../parrot tcl.pbc
partcl supports two command line options, neither of which are standard Tcl.
Analagous to perl's -e switch, this option will let you specify tcl code in the command line, which will then be executed. e.g:
-e
$ ../../parrot tcl.pbc -e "puts {Hello World}" Hello World
You will need to properly quote the tcl to protect it from your shell.
Given this option, partcl will compile the tcl code to PIR, and output the PIR on STDOUT. This PIR can then be compiled to parrot bytecode, or run directly through parrot. (Works with -e.).
To run an example, change to the examples directory, and type make for instructions.
examples
To run the test suite, type make test. If any tests fail, try TEST_PROG_ARGS=-G make test, which will disable parrot's garbage collection system. Send the results of both to the mailing list parrot-porters@perl.org.
make test
TEST_PROG_ARGS=-G make test
parrot-porters@perl.org
To run the spec test suites, type make spectest; This will check out the tests from tcl's CVS repository for the 8.5.4 release and run them.
make spectest
Note that the tests are fudged slightly to use our version of [test] As soon as we can run tcltest.tcl natively, we will.
See docs/ and TODO
docs/
TODO
To install Parrot::Op, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parrot::Op
CPAN shell
perl -MCPAN -e shell install Parrot::Op
For more information on module installation, please visit the detailed CPAN module installation guide.