[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
passing down value of terminal
From: |
vlad florentino |
Subject: |
passing down value of terminal |
Date: |
Wed, 22 Nov 2006 13:05:35 -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
PS: This is my first time posting. I don't know where to read the response.
I hope that i get a copy of the response to this email address.
- passing down value of terminal,
vlad florentino <=
Re: passing down value of terminal, Hans Aberg, 2006/11/24