On Thu, Jun 06, 2002 at 10:38:39AM -0400, John Siracusa wrote:
> On 6/6/02 2:43 AM, Damian Conway wrote:
> >   rule wordlist { (\w+) [ , (\w+) ]* }
> 
> No semicolon at the end of that line?  I've already forgotten the "new
> rules" for that type of thing... :)

No, because rules are basically methods, just like grammars are
basically classes. You would only need a semi-colon if you were defining
an anonymous C<rule> (similar to an anonymous C<sub>):

        my $wordlist = rule { (\w+) [ , (\w+) ]* };

Allison

Reply via email to