[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $$
From: |
Tim Van Holder |
Subject: |
Re: $$ |
Date: |
12 Feb 2003 09:26:04 +0100 |
On Wed, 2003-02-12 at 00:14, Mike Rollins wrote:
> What "type" exactly, is '$$'? Whenever I attempt to use it, I get:
>
> $$ of `QualifiedName' has no declared type
>
> My union is as follows:
>
> %union{
> char* ID
> }
>
> and later I have:
>
> %token <ID> IDENTIFIER
>
> However, even if I do the following:
>
> ...{$$.ID = yylval.ID;}...
>
> I still get the above error. What am I doing wrong?
>
> Thanks,
>
> Mike
Aside from
%token <ID> IDENTIFIER
you also need
%type <ID> myrule
then you can have
myrule
: IDENTIFIER
| SOMETHING_TO_IGNORE IDENTIFIER
{
$$ = $2;
}
;
--
Tim Van Holder <address@hidden>
- $$, Mike Rollins, 2003/02/11
- Re: $$,
Tim Van Holder <=
- Re: $$, Nigel Stewart & Fiona Smith, 2003/02/13