On Thu, Nov 26, 2009 at 2:02 AM, A.T.Hofkamp <[email protected]> wrote:
> Alex Gaynor wrote:
>> I've got the following productions:
>>
>>         declaration : expression NAME EQUAL expression
>>         expression : NAME LESS expressions GREATER
>>         expressions : expression
>>                           | expressions COMMA expression
>>
>> And I'm trying to parse: `dict<str, int>`.  I'm getting the folloing
>> debug output: http://paste.pocoo.org/show/152572/ .  I'm trying to
>> figure out why expressions COMMA expression isn't being reduced to
>> expressions.  The incidents of expressions are the only place
>> expressions appears in my grammar.
>
> Hard to say with a partial example, but most likely because you have 
> 'expression GREATER' somewhere
> else (reducing to 'expression'). In the .out file in state 193, you can find 
> out what production
> rule it uses to decide for the shift.
>
>
> Albert
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "ply-hack" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/ply-hack?hl=en.
>
>
>

Thanks, I ended up coming to a similar conclusion earlier today.  By
rewriting rules in terms of template.  I've run into a new issue with
that, but I'll figure it out (assuming it's possible :D).

Alex

-- 
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be simpler than you think, but never as simple as you
want" -- Me

--

You received this message because you are subscribed to the Google Groups 
"ply-hack" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/ply-hack?hl=en.


Reply via email to