Anonymous avatar Anonymous committed 6823329

Update README for pynie in its new home.

Comments (0)

Files changed (1)

 However, even though this is not a complete compiler yet, you can
 still see how programs are parsed, help us create test cases, and
 extend/improve the grammar and runtime to cover more of Python.
-Here's how the system currently works:
 
-=head2 Compiling
+=head2 Building and invoking Pynie
 
-Pynie lives in pynie.pbc.  To create this file, simply issue
-the command
+To obtain the latest version of Pynie:
 
+  $ svn checkout http://pynie.googlecode.com/svn/trunk pynie
+
+Once you have checked out a copy of pynie, build it as follows:
+
+  $ cd pynie
+  $ perl Configure.pl --gen-parrot
   $ make
+  
+
+This will create a "pynie" or "pynie.exe" executable in the
+current directory.   Pynie doesn't currently have a "make install"
+target.
+
+The "--gen-parrot" option tells Configure.pl to automatically
+download (via 'svn') and build the version of Parrot most
+appropriate for the copy of Rakudo 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 Rakudo
+you're working with.
 
 To invoke pynie on a Python program from a shell prompt, use:
 
-  $ parrot pynie.pbc foo.py
+  $ ./pynie foo.py
 
 To run interactively, entering single-line statements:
 
-  $ parrot pynie.pbc
+  $ ./pynie
 
 Note that pynie's interactive mode is not yet up to spec
 with Python's interactive mode (it doesn't handle blocks yet).
 
+To run pynie's test suite:
+
+  $ make test
+
+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:
 
-  $ parrot pynie.pbc --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",
 or "--target=PIR".
 
-  $ parrot pynie.pbc
-
 =head2 Files
 
 The "top" file for the parser is F<pynie.pir> which is used to
 
 The other files needed for the compiler are in the F<src/> subdirectory.
 
-The F<src/parser/Grammar.pg> file defines the tokens, rules,
+The F<src/parser/grammar.pg> file defines the tokens, rules,
 and protos for Python.  Much of this has been taken from
 the "Python Language Reference Manual (release 2.3)" by
 Guido van Rossum (Fred L. Drake, Jr., editor).  PGE's "Perl6Grammar.pbc"
 compiler is then used to compile the two grammar files into
-F<src/parser/Grammar_gen.pir>, which is included by F<pynie.pir>.
+F<src/parser/gen_grammar.pir>, which is included by F<pynie.pir>.
 (See Synopsis 5 for more details on Perl 6 rules syntax,
 and F<compilers/pge/> for more details about PGE.)
 
-The F<src/parse.pir> file defines a few special-purpose
+The F<src/parser/indent.pir> file defines a few special-purpose
 rules needed to support parsing that are better written
 directly in PIR instead of using the rules or token syntax.
-Currently this file defines the C<< <expression> >> rule,
-which just calls into the operator precedence parser.
 
-The file F<src/parser/Actions.pm> defines the actions that are
+The file F<src/parser/actions.pm> defines the actions that are
 invoked during the parse. These actions construct the Parrot AST
 (PAST) nodes. At the end of the parse, the whole PAST is constructed
 and handed off to the next compilation phases (PAST->POST->PIR)
 
-The file F<src/PAST/Grammar.tg> is a tree grammar that specifies
-how to convert the parse tree into the abstract syntax tree (PAST).
-This file is no longer used in the current implementation.
-
 The PIR files in F<src/builtins> are included as part of
 compiling F<pynie.pir> to produce F<pynie.pbc>.
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.