delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/01/20:46:21

Message-ID: <377BBCA0.EDEC06B9@hotmail.com>
From: Denis Lamarche <brainwav AT hotmail DOT com>
Organization: @Home Network
X-Mailer: Mozilla 4.5 [en]C-AtHome0405 (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: bison variable access
Lines: 11
Date: Thu, 01 Jul 1999 16:15:23 GMT
NNTP-Posting-Host: 24.112.228.171
X-Complaints-To: abuse AT home DOT net
X-Trace: news2.rdc1.on.home.com 930845723 24.112.228.171 (Thu, 01 Jul 1999 09:15:23 PDT)
NNTP-Posting-Date: Thu, 01 Jul 1999 09:15:23 PDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I am working on a script language with bison.  I have followed the calc
examples.  what I want to know is how do you access a variable that has
already been declared inside the program that I am linking bison too? I
put in the line like in the calc4.y prog:

| 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?

Denis Lamarche

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019