help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return from recursive processing is incomplete


From: Joel E. Denny
Subject: Re: Return from recursive processing is incomplete
Date: Sun, 6 Sep 2009 10:33:37 -0400 (EDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Sat, 5 Sep 2009, Evan Carew wrote:

> For the following code, where it says "Look Here!", I've tried
> everything to get out all the enumerations. My input was [enum blah {
> one, two, three }; ] what I get back is [enum blah {one };].

> enum_specifier
>   : ENUM '{' enumerator_list '}' { /*emit("enum { %s }", $3); */}
>     | ENUM IDENTIFIER '{' enumerator_list '}' {/* Look Here!*/}
>     | ENUM IDENTIFIER { /*emit("enum %s", $2); */}
>     ;

Given the comments in the above code, I assume you've not shown us the 
actual semantic actions that produce the effect you've described, but 
they're crucial to understanding your problem.

> enumerator_list
>   : enumerator
>     | enumerator_list ',' enumerator
>     ;

What are the actual semantic actions on the above two productions?  
Default?  What effect do you think that has?

> enumerator
>   : IDENTIFIER
>     | IDENTIFIER '=' constant_expression
>     ;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]