develooper Front page | perl.perl6.language | Postings from June 2006

Re: grammar: difference between rule, token and regex

Thread Next
From:
jerry gay
Date:
June 2, 2006 13:58
Subject:
Re: grammar: difference between rule, token and regex
Message ID:
1d9a3f400606021356t5c6df555o7b1c659587062630@mail.gmail.com
On 6/2/06, Rene Hangstrup Møller <rhm@giddyplanet.com> wrote:
> Hi
>
> I am toying around with Parrot and the compiler tools. The documenation
> of Perl 6 grammars that I have been able to find only describe rule. But
> the grammars in Parrot 0.4.4 for punie and APL use rule, token and regex
> elements.
>
> Can someone please clarify the difference between these three types, and
> when you should use one or the other?
>
i'm forwarding this to p6l, as it's a language question and probably
best asked there. that said, the regex/token/rule change is a recent
one, and is documented in S05
(http://dev.perl.org/perl6/doc/design/syn/S05.html)

in particular, see the "Regexes really are regexes now" section, which
describes the differences. also, there are some recent threads on p6l
with regard to this topic, which you may find enlightening. you can
find these via google groups, or some other nntp archive.
~jerry

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About