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 _______________________________________________ [email protected] https://lists.gnu.org/mailman/listinfo/help-bison
