Allison Randal <[EMAIL PROTECTED]> writes:

> 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+) ]* };

You wouldn't even need it then. Assuming you're following the closing
brace with nothing but white space and a newline.

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?

Reply via email to