Front page | perl.perl6.language |
Postings from July 2006
Re: Using Rules Today
Thread Previous
From:
Flavio S. Glock
Date:
July 3, 2006 09:12
Subject:
Re: Using Rules Today
Message ID:
aa47605d0607030911g6d9b539am82a1ce148d17ca18@mail.gmail.com
2006/7/3, Joshua Gatcomb <joshua.gatcomb@gmail.com>:
>
> I am specifically interested in examples that can be run in Perl 5 today
> without needing Pugs or Parrot.
http://svn.openfoundry.org/pugs/perl5/Pugs-Compiler-Rule/compile_p6grammar.pl
- doesn't do exactly what you want, but you can see what the syntax
looks like for writing an evaluator using rules in p5.
http://svn.openfoundry.org/pugs/perl5/Pugs-Compiler-Rule/lib/Pugs/Grammar/Rule/Rule.pm
- this is the grammar for rules, written in rules.
The last rules have looser precedence; the rules at the start of the
file have tighter precedence.
This grammar is compiled to p5 using lrep.
- Flavio S. Glock
Thread Previous