[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison advises that a variable 'expr' I use isn't declared.
From: |
Akim Demaille |
Subject: |
Re: Bison advises that a variable 'expr' I use isn't declared. |
Date: |
Tue, 10 Mar 2009 11:38:03 +0100 |
Le 10 mars 09 à 01:40, Joe Garvey a écrit :
Bison advises that the var expr is undeclared. I'm also generally not
certain about the declaration of it as expr, a non-terminal, may be a
complex statement such as...
ne(abs(X0),abs(X1)) // where X0 and X1 may be integral
constants, ne is
!=, and abs is abs()
Can you please show the message from Bison? The error I see is not
related to what you are reporting.
parse.y:96.40-41: $1 of `expr' has no declared type
parse.y:97.40-41: $1 of `expr' has no declared type
parse.y:97.57-58: $3 of `expr' has no declared type
parse.y:60.5: warning: empty rule for typed nonterminal, and no action
parse.y:61.10: warning: empty rule for typed nonterminal, and no action
Given that 96 is
| NUM_DOMAINS expr '\n' {
96 => $1->symType = NUMBER_DOMAINS;
$1->numDomains = $3; /* number of
domains in this program */
}
so it complains about NUM_DOMAINS, not expr (which is the left hand
side of the rule).