Once you have checked out a copy of pynie, build it as follows:
perl Configure .pl --gen-parrot
current directory. Pynie doesn't currently have a "make install"
-The "--gen-parrot" option tells Configure.pl to automatically
-download (via 'svn') and build the version of Parrot most
-appropriate for the copy of Pynie you currently have. It's
-okay to use the --gen-parrot option on later invocations of
-Configure.pl; the configure system will re-build Parrot only
-if a newer version is needed for whatever version of Pynie
To invoke pynie on a Python program from a shell prompt, use:
+ $ pynie foo.py
To run interactively, entering single-line statements:
Note that pynie's interactive mode is not yet up to spec
with Python's interactive mode (it doesn't handle blocks yet).
-Also note that the binary executable has hardcoded paths to
-the Parrot build tree, so removing or moving the parrot build
-tree will cause the binary to stop working.
To display the parse tree, add the "--target=parse" option:
./pynie --target=parse foo.py
+ $ pynie --target=parse foo.py
Or, to display the abstract syntax tree, the opcode syntax tree,
or the generated PIR code, use "--target=PAST", "--target=POST",
compiling F<pynie.pir> to produce F<pynie.pbc>.
The F<pynie.pbc> file can also be used to compile Python code
$S0 = 'print "hello world"' # source code to compile