[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
$x has no assigned type
From: |
james |
Subject: |
$x has no assigned type |
Date: |
Mon, 6 Aug 2001 02:15:53 +1000 |
I had declared some tokens with
%token <foo> BAR
and still bison warned me that $x had no assigned type when I worked with it
in the action code section after the parser had recognised a rule.
I don't know if this is the right way to do it, or should I have used %type?
I thought %type was only for lvalues of the rules themselves, say like a
calculator that uses $$ in a calculation. None of my $$ thingies are usable
pieces of data.
Does this warning matter?
E.g.
%union {
char c;
int i;
double d;
char *s;
}
%token <s> STRING
%token <c> CHAR
...
and with the lexer sticking things in the yylval as it went along.
James
- $x has no assigned type,
james <=