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

Re: Rvalue given() blocks

Thread Previous
Rafael Garcia-Suarez
July 22, 2009 04:40
Re: Rvalue given() blocks
Message ID:
2009/7/22 Vincent Pit <>:
>> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About