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