help-bison
[Top][All Lists]
Advanced

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

Re: I'm getting messages from Bison that aren't even listed on the inter


From: Joel E. Denny
Subject: Re: I'm getting messages from Bison that aren't even listed on the internet.
Date: Mon, 3 Aug 2009 09:45:26 -0400 (EDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Mon, 3 Aug 2009, address@hidden 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 `}'.




reply via email to

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