Luke Palmer wrote:
[By the way, shouldn't this grammar be called "Perl" rather than
"Perl6::Grammar"?...
Grammars and classes share a namespace, so I think Perl::Grammar is
correct...
I got the name Perl for the grammar from S05, which also gives this example:
given $source_code {
Luke Blanshard writes:
> Luke Palmer wrote:
> >This list is for people interested in building the Perl 6 compiler. Now
> >you have your first real task!
> >
> >We have to make a formal grammar for Perl 6. Perl 6 is a huge language,
> >so the task seems better done incrementally by the community
Luke Blanshard wrote:
# Next comes any number of single characters or nested =begin/
# =end blocks -- but the smallest number that will match...
[ . | «pod_begin_end_block» ]*?
Actually I think that alternation needs to be in the other order,
doesn't it? (This is within rule pod_b
Luke Palmer wrote:
This list is for people interested in building the Perl 6 compiler. Now
you have your first real task!
We have to make a formal grammar for Perl 6. Perl 6 is a huge language,
so the task seems better done incrementally by the community...
Send patches to this list.
OK, I'll
Luke Palmer writes:
> Also, don't use rule parameters, conditionals, or code blocks. Those
> things require us to know Perl 6 before we're done defining Perl 6.
> Keep it essentially BNF with Perl 6 syntax (it's okay to use groups and
> quantifiers though, since those can always be converted to fo
Patrick R. Michaud writes:
> > rule identifier() { <> \w* }
>
> Does Perl 6 allow leading underscores in identifiers? If so,
> shouldn't this be
>
> rule identifier() { <++[_]> \w* }
>
> ?
Yeah, it should. There was an error anyway:
rule identifier() { <+> \w* }
Fixed.
>
> > rule open_
A few initial questions/comments on some small things -- I'll get
to the bigger constructs a bit later. I'm an "outside-in" designer,
so I tend to work on the macro and micro levels until I meet in the
middle.
> rule identifier() { <> \w* }
Does Perl 6 allow leading underscores in identifiers?
On Mon, Dec 20, 2004 at 03:32:31PM -0700, Luke Palmer wrote:
> We have to make a formal grammar for Perl 6. Perl 6 is a huge language,
> so the task seems better done incrementally by the community. The
> current version can be seen temporarily at
> http://luqui.org/perl6/Grammar.perl6 until the