[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: passing down value of terminal
From: |
vlad florentino |
Subject: |
Fwd: passing down value of terminal |
Date: |
Wed, 22 Nov 2006 13:41:38 -0500 |
In gnu bison:
I have a couple of productions of this type:
ID '.' complex
: {...}
;
complex
: FOOBAR {...}
;
How can I pass the value of ID, a terminal, down to the production
'complex', a non terminal. I would like to determine what's the value of ID
and take actions based on that, i.e.:
complex
: FOOBAR
{
if( strcmp(ID.value,"this") == 0)
doThis();
else
doThat();
}
thanks
vlad
Re: passing down value of terminal, Hans Aberg, 2006/11/24