To bring this back around to the implementation portion in an effort to get back on topic..

There are also sample grammars (for those who like samples in addition to docs) available in the parrot source tree, e.g.:

http://svn.perl.org/parrot/trunk/compilers/tge/TGE/Parser.pg
http://svn.perl.org/parrot/trunk/languages/APL/lib/APLGrammar.pg (view as utf-8)
http://svn.perl.org/parrot/trunk/languages/punie/lib/punie.pg

While these are using parrot directly, the PGE (Parrot/Perl6 Grammar Engine) is already a very large subset of valid Perl6 rules constructs. You could probably write the parser in parrot today, and then use the same grammar to drive a perl6 (in parrot or otherwise) implementation.

I would also recommend using kwid as a basis for any markup, given its current status with pugs/perl6.

Regards.

On Jun 8, 2006, at 10:08 AM, A. Pagaltzis wrote:

* Michael Mathews <[EMAIL PROTECTED]> [2006-06-08 13:15]:
This is the smartest suggestion I've yet seen on the subject,
but, not being all *that* familiar with Perl6 Grammars (aren't
they something like contextually-smart regexes?), can anyone
give an example of Perl 6 code that uses grammars and can
express some wiki-formatting?

Not me, at the time of writing. :-) I’ve just read the documents:

    http://dev.perl.org/perl6/doc/design/apo/A05.html
    http://dev.perl.org/perl6/doc/design/exe/E05.html
    http://dev.perl.org/perl6/doc/design/syn/S05.html

It doesn’t take more than that to see that P6 Grammars will blow
any existing way to write parsers clear out of the water, though.

Regards,
--
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;


--
Will "Coke" Coleda
[EMAIL PROTECTED]


Reply via email to