ok so I'm writing a compiler for a language that ive made up, that has c++ like syntax. I've tried compiling it on a unix sun system and visual studios with no luck on either of them. It compiles fine with some warnings about float to int possible loss of data, but when the program is run it just keeps running until killed. I have tried setting break points inside every operations and at the beginning of main but these are never hit??????? On the unix system I tried putting couts at the start of every operation and main with nothing output??? I have a few classes I created and a set of execution operations in separate files. Also I use 2 command line arguments one to take in the high level code and one to output the machine code. My code is very long so i will get it to ya if you ask. Any comments much appreciated.
I use one or more of these in every class header and .cpp and in execution file and in my main program. I define and use them where ever needed except in my main program (since execution.cpp is included and they are all defined there). Can I define them in my main program and no where else? Am i on the right track?
nope no static objects but I did put breaks in all the class .cpp operations and for some reason one of the classes has no functions other that the constructor and destructor. the funny thin is that i breaks at the constructor 3 or 4 times then moves on and just keep running.
ok i have found that if i rearranged my global variables so that a different class (from the post above) variable is defined first in my main program, however visual studios tells me that the breakpoints in the variables.cpp contsuctortor and destructor will never be hit and no executable code is associated with this line.
the problem was that one of the other classes I made has an never ending loop in one of its operations. For some reason, I put breaks in the operation and visual studios never actually broke execution it would just stall???