| cvs.gedasymbols.org/archives/browse.cgi | search |
| Date: | Thu, 1 Jul 1999 20:51:00 -0400 (EDT) |
| Message-Id: | <199907020051.UAA06732@indy.delorie.com> |
| From: | DJ Delorie <dj AT delorie DOT com> |
| To: | djgpp AT delorie DOT com |
| In-reply-to: | <377BBCA0.EDEC06B9@hotmail.com> (message from Denis Lamarche on |
| Thu, 01 Jul 1999 16:15:23 GMT) | |
| Subject: | Re: bison variable access |
| Reply-To: | djgpp AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
> | VAR '=' exp { $$ = $3; $1->value.var = $3; }
>
> but this only accesses the variable created during the bison session. is
> there a way that I can change or have access to other variable?
Sure, just access it. The stuff inside the {}'s is plain old C code,
sort of, so you can do this:
{ $$ = $3; my_foo($1, status); status++; }
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |