Skip to content
Browse files

[perl6]: Bring README up to date.

git-svn-id: http://svn.perl.org/parrot/trunk/languages/perl6@12345 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 55279f5 commit 45a1e1454d1bafa58e44a6c683a7a182620fe471 @pmichaud pmichaud committed
Showing with 24 additions and 21 deletions.
  1. +24 −21 README
View
45 README
@@ -1,4 +1,4 @@
-=head1 Perl 6 parser
+=head1 Perl 6 parser/compiler
This is a Perl 6 parser/compiler, an early version (no version numbers
yet). It's still very early, only simple expressions and functions are
@@ -13,12 +13,12 @@ of Perl 6. Here's how the system currently works:
=head2 Compiling
-The Perl 6 parser lives in the perl6.pbc file. To create this
-file, simply issue the command
+The perl6 parser/compiler lives in the perl6.pbc file.
+To create this file, simply issue the command
$ make
-To invoke the parser from a shell prompt on a (Perl 6)
+To invoke perl6 from a shell prompt on a (Perl 6)
input file named "foo.p6", use:
$ parrot perl6.pbc foo.p6
@@ -47,23 +47,26 @@ parsing system and registers the parser as a Parrot "Perl6" compiler.
The other files needed for parsing are in the F<lib/> subdirectory.
-The F<lib/grammar.pge> file defines the "top-down" grammar used for
-large Perl 6 program structures. It consists of rule statements
-defined in Perl 6 rules syntax and is compiled using the
-C<rulec.pir> "rules compiler" from PGE to produce a lib/grammar.pir
-file with the PIR version of the rules. (For more information on
-Perl 6 rules, see Synopsis 5 and the Parrot Grammar Engine in the
-F<compilers/pge> directory.)
-
-The F<lib/parse.pir> file defines the "bottom-up" parser
-operators, as well as any special-purpose rules needed for
-parsing Perl 6 that are better written directly in PIR instead
-of using the top-down rules syntax or bottom-up operator
-precedence parser.
-
-The F<lib/pge2past.tge> is a tree grammar that specifies how to
-convert the parse tree into the abstract syntax tree (PAST), and
-F<lib/past2pir.tge> generates PIR from PAST. These are both
+The F<lib/grammar_rules.pge> file defines the "top-down" grammar used
+for large Perl 6 program structures, defined using rules in
+Perl 6 rules syntax. The F<lib/grammar_optok.pge> file defines
+the operator tokens used for expression parsing with PGE's
+operator-precedence parser. The tokens in lib/grammar_optok.pge
+are defined using a pseudo-Perl6 syntax. PGE's "pgc.pir"
+compiler is then used to compile the two grammar files into
+F<lib/grammar_gen.pir>, which is included by F<perl6.pir>.
+(See Synopsis 5 for more details on Perl 6 rules syntax,
+and F<compilers/pge/> for more details about PGE.)
+
+The F<lib/parse.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<lib/pge2past.tge> is a tree grammar that specifies
+how to convert the parse tree into the abstract syntax tree (PAST),
+and F<lib/past2pir.tge> generates PIR from PAST. These are both
held together by the F<lib/PAST.pir> file which defines the
Perl6::PAST node structures and other support features.
(See also "What about POST?" below.)

0 comments on commit 45a1e14

Please sign in to comment.
Something went wrong with that request. Please try again.