help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I nest compilation of files?


From: Christian Schoenebeck
Subject: Re: Can I nest compilation of files?
Date: Sat, 15 Mar 2014 11:29:52 +0100
User-agent: KMail

On Friday 14 March 2014 07:50:06 Anaswara Nair wrote:
> I'm using BISON to create a parser for a new language more or less similar
> to Ada. I wanted to nest compilation of different files and store the
> variables used in each variables in a structure so that it is available for
> other files too.
> What should I do to make it possible?
> 
> I tried using system command, but the variables were not available to the
> next file being compiled.

You haven't said on which OS this is supposed to run. I am just guessing here 
that it is a POSIX compatible one (i.e. Linux, OS X). If that's the case, you 
just might use fork() which you can use to create new processes on Unix 
flavored OSes. This function is kind of "cloning" the original process that 
called fork(), that is the new process(es) will have (almost) the same data in 
memory as the original process had when it called fork(). So that's probably 
easier than what you were trying to achieve by dealing with environment 
variables.

That's a very basic programming question though, not really related to Bison.

Best regards,
Christian Schoenebeck



reply via email to

[Prev in Thread] Current Thread [Next in Thread]