i have a data structure for my compiler (such as ast) , and i need a method to print it (like ms visio) and verify its contents (i need to verify the contents of the ast nodes)
note : i dont want to print it to the console , i am using c++ & qt
thanks
...
My collegue suggested me to write a visitor pattern to navigate the AST. Can anyone tell me more how would I start writing it?
As far as I understand, each Node in AST would have visit() method (?) that would somehow get called (from where?). That about concludes my understanding.
To simplify everything, suppose I have nodes Root, Expr...
The following Java code is throwing a compiler error:
if ( checkGameTitle(currGame) )
ArrayList<String> items = parseColumns( tRows.get(rowOffset+1), currGame, time, method );
checkGameTitle is a public static function, returning a boolean. The errors are all of the type "cannot find symbol" with the symbols being variable ArrayL...
Im getting this linker error that won't let me compile. It only happens on the simulator.
KEY POINTS:
- Happens only in simulator
- Similar to THIS question, but found no FRAMEWORK_SEARCH_PATHS in my .pbxproj file
- Though my OS is 10.6.2, I had to build target 1.5 to avoid other linker errors
- libxml2.dylib IS required and is in my ...
Hello Maven gurus,
Right now, I'm writing a small java application by my own, with few maven pom.xml files. I want to make all my maven packages to compile with jdk 1.6, and I can't find a good way to do it without manually setting it on every single POMs - I'm sick of copy-and-pasting
<groupId>org.apache.maven.plugins</groupId>
<artif...
e.g glibc on Linux/i386 stores the cookie at %gs:0x14. Are there any other platforms on which I need to look somewhere other than at the __stack_chk_guard symbol to find the cookie?
(This is where the value that gcc -fstack-protector-generated code stores onto the stack in function prologues and checks before return to defend against st...
As a compiler, other than an interpreter, only needs to translate the input and not run it the performance of itself should be not that problematic as with an interpreter.
Therefore, you wouldn't write an interpreter in, let's say Ruby or PHP because it would be far too slow.
However, what about compilers?
If you would write a compiler...
Template code is not compiled until the template function is used. But where does it save the compiled code, is it saved in the object file from which used the template function in the first place?
For example,
main.cpp is calling a template function from the file test.h, the compiler generates an object file main.o,
Is the template fu...
I've started a rather large Enum of so called Descriptors that I've wanted to use as a reference list in my model. But now I've come across a compiler/VM limit the first time and so I'm looking for the best solution to handle this.
Here is my error : The code for the static initializer is exceeding the 65535 bytes limit
It is clear whe...
I want to compile a simple hello-world-style program using the Windows command line.
cl file_name.c
is easy enough. Now I want to do the same thing in 64 Bit. What should I do?
...
Here is a very simple C program:
#include <stdio.h>
int main (int argc, char *argv[]) {
printf("sizeof(short) = %d\n",(int)sizeof(short));
printf("sizeof(int) = %d\n",(int)sizeof(int));
printf("sizeof(long) = %d\n",(int)sizeof(long));
printf("sizeof(long long) = %d\n",(int)sizeof(long long));
printf("sizeof(float) ...
I have a simple operation like so:
k + 1
What would be a IR tree representation of it?
So far I came up with:
BINOP(+, MEM(NAME(k)), CONST(1))
but I am not sure if I need the MEM for NAME or not. Any help welcome.
The notation we use is exactly the same as in this pdf:
http://www.computing.dcu.ie/~hamilton/teaching/CA449/notes/tr...
I'm using Eclipse 3.3. In my project, I've set the compiler compliance level to 5.0 In the build path for the project. I've added the Java 1.5 JDK in the Installed JREs section and am referencing that System Library in my project build path. However, I'm getting compile errors for a class that implements PreparedStatement for not implem...
Hi All,
Does anyone have a resource for C++ memory optimization guidelines? Best practices, tuning, etc?
As an example:
Class xxx {
public:
xxx();
virtual ~xxx();
protected:
private:
};
Would there be ANY benefit on the compiler or memory allocation to get rid of protected and private since there the...
Does anyone have references to documents and research specific on the inner workings of shader compilers/graphics drivers compilers?
...
I generate some code using CXF from a WSDL-file. When compiling the code with version "1.6.0_16" with the flag -Xlint I get the following warning:
warning: [cast] redundant cast to javax.xml.bind.JAXBElement<java.lang.Boolean>
[javac] this.r = ((JAXBElement<Boolean> ) value);
What does the warning mean, should I be worried?...
Is there a place (or flag) in Xcode for files that you don't want to compile? There are some classes that are/may become part of a project but currently won't compile. The main project doesn't link to them but Xcode still tries to compile them. Is there a way to prevent blocking the rest of project from compiling until these new Classes ...
Hi,
I'm having problems opening directly TurboC++ compiler(dos version) on Windows X.
if I click on the TurboC++ icon through windows GUI it opens for a sec(a blank dos screen)
and shuts down.
so i have to access it through the command line i.e.,
cmd (enter)
c:\tc\bin (enter)
tc.exe
This way TurboC++ opens and I'm able to program and...
i'm wondering about this possibility. Is it possible to make our code written in code and string compile and make it become Executable and can operate without the use of server such as Apache.
The OS environment will be Windows family.
...
Guys in one of excersises (ch.5,e.8) from TC++PL Bjarne asks to do following:
'"Run some tests to see if your compiler really generates equivalent code for iteration using pointers and iteration using indexing. If different degrees of optimization can be requested, see if and how that affects the quality of the generated code"'
Any ...