
On Tuesday 02 February 2010 04:27:15 Eric Niebler wrote:
What am I missing here?
You're going to kick yourself. The problem is exactly the same as last time. The expression is a subscript expression, but you don't have a case that handles subscript expressions. You seem to be confusing terminals within sub-expressions with the operators that bind sub-expressions together. Pretty much the only change I had to make was to change this:
Ha! And I forgot to change that after I finished defining the grammar. A forgotten TODO. I will be more judicious in my use of assertions in the future.
I'm attaching a corrected example. There seems to be a logic flaw though; outer scopes are not getting searched. That should be a simple fix.
That was deliberate for this test. Rest assured that the real code does lookups properly. :) Thanks again. -Dave