Open GoogleCodeExporter opened 8 years ago
What are you expecting to happen in this example? If you are expecting p[-1]
to refer to the query_part component, then this is wrong. Negative indices
are used to refer to symbols further down the parsing stack and are mainly used
in the context of writing embedded actions. See section 6.11 of the PLY docs.
I know that there was a bug in negative indices that was fixed in PLY-3.0
(according to the CHANGES log anyways).
Original comment by dbeaz...@gmail.com
on 31 Jul 2010 at 11:46
It's quite possible it is a bug that was fixed: I inherited this code and don't
know why it was written that way. All I am saying is that behaviour changed,
and I wasn't not sure whether it was intentional or not. I think using p[1]
makes much more sense, changed it to do that, and PLY 3.3 seems to work fine.
Original comment by jonmmor...@gmail.com
on 31 Jul 2010 at 1:06
Original issue reported on code.google.com by
jonmmor...@gmail.com
on 31 Jul 2010 at 5:48