LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-05-2014, 07:54 AM   #1
ANUUUU
LQ Newbie
 
Registered: Feb 2014
Posts: 5

Rep: Reputation: Disabled
keep symbol table entries uncleared till whole compilation is completed.


I'm doing a project to develop a compiler in fedoracore4.Bison is used to generate the parser.Language I'm concentrating is more or less similar to ada. The thing is that when another program is refernced from current program,i tried to compile the former from within the compilation of the former using system(command).It worked.But when the control returns, the symbol table entries corresponding to the already compiled program gets cleared.. Is there any way to keep the symbols as such until the whole compilation is completed?

IT'LL BE VERY HELPFUL IF ANYONE COULD GIVE ME SOME GUIDANCE REGARDING THIS..THANK YOU IN ADVANCE....
 
Old 02-05-2014, 05:33 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
If you use a technique like system(), then you are invoking an entirely separate process to do the work. Therefore, the entire world(!) of that child-process is (of course ...) totally isolated from your own.

If you need to retain information from the compilation, then you'll have to take an entirely different approach: you'll have to maintain (within the context of a single(!) process), a push-down stack of Bison parser contexts, invoking the parser recursively. And, you'll need to engineer strategic points within (the grammar of ...) each context by which the nested contexts can "tell the world about" your shared symbols.
 
Old 02-05-2014, 11:58 PM   #3
ANUUUU
LQ Newbie
 
Registered: Feb 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
how to switch stack between contexts..

Quote:
Originally Posted by sundialsvcs View Post
If you use a technique like system(), then you are invoking an entirely separate process to do the work. Therefore, the entire world(!) of that child-process is (of course ...) totally isolated from your own.

If you need to retain information from the compilation, then you'll have to take an entirely different approach: you'll have to maintain (within the context of a single(!) process), a push-down stack of Bison parser contexts, invoking the parser recursively. And, you'll need to engineer strategic points within (the grammar of ...) each context by which the nested contexts can "tell the world about" your shared symbols.
Could you please make it more clear... I didn't completely get what you meant.. Howw to return the stack from one context to another??
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
symbol table..... shariefbe Linux - Newbie 2 12-28-2008 12:34 AM
i have some questions on symbol table siddharthaswaroop Programming 3 03-21-2008 07:44 PM
How to read the symbol table bahadur Programming 1 07-14-2006 02:05 AM
symbol table Filipe Linux - Newbie 1 01-04-2006 01:15 PM
gdbserver problem: no symbol table whepin Linux - Laptop and Netbook 0 06-24-2005 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration