On Mon, 3 Aug 2009, j...@garveydesign.com wrote: > Results from Google re > Your search - gnu bison "$$ of `constant' has no declared type" - did not > match any documents.
`constant' is specific to your grammar. Try removing the quotes around the entire expression. > The screen message is.. > parse.y:98.43-44: $$ of `constant' has no declared type > > Line 98 in the grammar looks like... > exp: MAX '(' exp ',' exp ')' { $$ = (($3 > $5) ? $3 : $5 );} > > There are other complaints about line 98, which don't seem clear... > parse.y:98.55-56: integer out of range: `$5' > parse.y:98.66-67: integer out of range: `$5' The real problem is the very last error message: parse.y:74.48-208.0: missing `}' at end of file The semantic action that begins on line 74 is never closed, so all following actions appear to be part of it. The action on line 98 is for a rule with 6 RHS symbols and contains a $5, but the rule for line 74's semantic action has only 3 RHS symbols. It looks like you're using Bison 2.3 or earlier. Later versions of Bison only report the missing `}'. _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison