-
Compiling with C++
Well I know I am not ready to you guys, but I belive I am.
I want to make a program that can at first recognize c++ (counsle) functions that are in variables.
What I mean is I put like, lets say, cout<<"Hello"; in a variable and then the program would know what to do.
Then I want to make the priogram able to make anouther c++ program but does the actions in the variables in the order they are in.
I have no clue were to start this.
Thanks alot!
-
sounds like you're wanting to make a C++ interpreter. basically you just split the text into tokens, lookup the appropriate function pointer, then marshall the parameters to the function.
-
well ok, but now the looking up part is the hard thing.
I looked on google and found nothing but the characters that c++ uses.
Could someone help me maybe get a site on this or somthing?
-
>> I looked on google and found nothing but the characters that c++ uses.
well, looking at my keyboard I see a total of two characters that c++ *doesn't* use('`' and '@') - so pretty much everything has to be expected by your scanner. also you'll have to differentiate between tokens like + and ++, etc - you might google on some working lexical scanner implementations to begin with.
-
C++ is an extremely complicated language to parse. You should look into an alternative approach to whatever your problem is.
-
lol well I wasn't looking for the whole lang. to fit into the program.
But I also was gonig to cram it into a dll.
And I will try some other time.