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
> ;
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison