Le 10 mars 09 à 11:38, Akim Demaille a écrit :


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).

I'm sorry, but I won't answer to private messages. Answers are to stay on the list. And please, read my message, everything is in it: Bison is saying that you are reading $1, which is a NUM_DOMAINS, for which you have no declared semantic value type.

_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to