2006/3/10, chromatic <[EMAIL PROTECTED]>:
> On Thursday 09 March 2006 20:06, Flavio S. Glock wrote:
>
> > I'll not to be technical - I'm posting links to the programs, and the
> > #perl6 conversations are all logged in http://colabti.de - so feel
> > free to go read the sources.
>
> That's a big wad of code.  Suppose I want to run it so I can see what it does
> and maybe start hacking on it.  Where do I start?  What can I do?  What are
> all of these files?

Start simple - run the "hello world":

  $ perl p6compiler.pl p6sample.p6

Look at it's source code:

  $ cat p6sample.p6

Now browse through the Perl6 Grammar:

  $ less p6prelude.p6

Take a look at what the Grammar is compiled to:

  $ less p6prelude-cached.pl

That was a start. Now you can go through the rule engine:

  $ less iterator_engine.pl

The engine implements the domain-specific language that the rules use
internally. It has primitives like 'literal' and operators like
'alternation'.

If you look again at the Grammar, you can see that some rules have
'return' blocks. The return blocks are used to build the AST.
The compiler currently uses non-OO AST - we are working to reimplement
the AST in OO, following the Pugs model.

Once you have the AST, it is sent to the emitter:

  $ less emit.pl

That's about 90% of the whole process. The other files are used for
command-line interface, IO, cacheing, and assorted documentation.
See also the README file.

Thanks!
- Flavio S. Glock

Reply via email to