develooper Front page | perl.perl5.porters | Postings from July 2009

Re: Rvalue given() blocks

Thread Previous
From:
Rafael Garcia-Suarez
Date:
July 22, 2009 04:40
Subject:
Re: Rvalue given() blocks
Message ID:
b77c1dce0907220440n6e9a0193q5f58e971edd1cba6@mail.gmail.com
2009/7/22 Vincent Pit <perl@profvince.com>:
>
>> Another idea. Split "given" into two tokens, and make the tokenizer
>> return one or the other depending on the value of PL_expect. Probably
>> XSTATE versus XTERM. Details will have to be worked out. Not sure if
>> it will work.
>>
>
>
> TBH, I couldn't forge an example with any of the two patches I sent
> where the lexer confused the statement and the expression form of given.
> So I'm not sure it'd be really useful to do more mangling in the
> tokenizer. At any rate, it won't prevent bison from complaining for
> shift/reduce (for the first patch) or reduce/reduce (for the second)
> conflicts.

That surprises me.

> On another note, I don't know why labels are allowed for statement
> given. break doesn't accept a label, and next/last won't see it if
> there's one.

For goto ? all statements accept labels.

Thread Previous


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