compiler

What ways exists to generate MSIL from unmanaged code

Hi, I am trying to create a backend of my language for .NET platform. The front-end and interpreter written in Delphi. Unmanaged API just allows type definitions but no emiting of MSIL. What ways exist to generate MSIL from unmanaged code? Without using Reflection.Emit and using ILasm to attain this? Thank you. ...

error: writable atomic property cannot pair a synthesized setter/getter with a user defined setter/getter

I recently tried to compile an older Xcode project (which used to compile just fine), and now I'm seeing a lot of errors of this form: error: writable atomic property 'someProperty' cannot pair a synthesized setter/getter with a user defined setter/getter The code pattern which causes these errors always looks like this: // Interf...

how to write a Python debugger/editor

Sorry for the kind of general question. More details about what I want: I want the user to be able to write some Python code and execute it. Once there is an exception which is not handled, I want the debugger to pause the execution, show information about the current state/environment/stack/exception and make it possible to edit the co...

Delphi: Why Doesn't Binary String Comparison Operator (=) use SameStr?

It is common knowledge that SameStr(S1, S2) is faster than S1 = S2, where var S1, S2: string in Delphi. (And, of course, SameText(S1, S2) is much faster than AnsiLowerCase(S1) = AnsiLowerCase(S2).) But, as far as I understand it, SameStr(S1, S2) does exactly the same thing as S1 = S2, so I cannot help but wonder why in the world the De...

Problem to compile a C-program by GCC in the latest Cygwin due to tgmath.h and complex.h

I have successfully compiled a C-program with GCC in Mac OS X and Linux, but have got the following error message in Cygwin 1.7.5: /usr/lib/gcc/i686-pc-cygwin/4.3.4/include/tgmath.h:38:21: error: complex.h: No such file or directory I have noticed that several guys reported that tgmath.h has problems in Cygwin. However, due to the la...

What is mean by epilog and prolog?

hi , While reading some calling convention in some CPU architecture i read something like "epilog and prolog" , when a function is called from another function. Can anybody give more inputs on this? /renjith_g ...

how does an optimizing c++ compiler reuse stack slots of a function?

How does an optimizing c++ compiler determine when a stack slot of a function(part of stack frame of a function) is no longer needed by that function, so it can reuse its memory? . By stack slot I mean a part of stack frame of a function, not necessarily a whole stack frame of a function and an example to clarify the matter is, suppose w...

objective c xml compile/run

It it possible for objective c to compile xml data (aiml files for example)?? I'm looking for it to compile AIML files then be able to "chat" with the files using objective c. Is there a XMLView or something??? Any ideas?? Elijah ...

Operator Associativity Question

Most binary arithmetic operators are left-associative in most programming languages. However, most compilers are free to evaluate the operands of a binary operator in either order. Are these statements contradictory? Why or why not? EDIT This comes from the book I am reading "Programming Language Pragmatics" Chapter 6, Exercise 6.1, I ...

Do any languages have neither an interpreter nor a compiler?

Note:I don't mean some theoretical question which don't have any implementation just languages that don't have both!!!!! These days there exists a c/c++ interpreter(cint) and a python compiler(to python bytecode). I understand that the simplest definition is that a compiler just converts code from language a to language b, and then y...

Error compiling with gcc

When i try to compile with gcc i get this error "collect2: _spawnvp: Exec format error". Does anybody know why and how to fix it? Any help will be appreciated. Thanks ...

Make install - but not to default directories?

I want to run 'make install' so I have everything I need, but I'd like it to install the things in their own folder as opposed to the system's /usr/bin etc. is that possible? even if it references tools in the /usr/bin etc.? ...

How to install C Compiler to Eclipse?

Hi, I have install the C/C++ CDT Version of Eclipse. After making a HelloWorld.c file and get the code in there I get an error of "Launch failed. Binary not found". I found in google that my Eclipse miss the compiler and I install MinGW on my computer and add the path to env variables (tested it with "gcc -v" in cmd and succeded). But...

Is life-time of local variables in a function, necessarily equal to life-time of that function's execution ?

Possible Duplicate: how does an optimizing c++ compiler reuse stack slot of a function? do c++ compilers have their ways to determine the time at which, life-time of each local variable in a function ends so that they optimize using stack memory, or they simply take it equal to life-time of the function execution ? ...

GCC Compiler Flags Don't Match ELF Flags

I chopped down my make file so I can compile a C++ program with very few, but some flags set to see if I can determine if they are working. The following is my make file section on C++ flags: # Common compiler flags CFLAGS = -mips1 -Wa,-non_shared \ -mno-abicalls \ -I. -I$(SESCSOURCEDIR)/src/libapp \ -I$(SESC...

ANTLR Trees necessary?

What is the purpose of using AST while building a compiler (with ANTLR). Is it necessary to have one? What is the so called TreeParser and how can one use it? Is it possible to build a compiler without any trees? If not, are there any good tutorials describing the topic in details? ...

GWT compilation on the fly

Is there a way to run Google Web Toolkit compiler directly from Java code to compile the source code made on the fly? In the same manner as javax.tools for example. ...

Writing atomic function

Hi, I want to implement an atomic function in C language, so that the process or thread will not be preempted while executing the function. ...

a way to omit taking names for objects that are used only to construct a final object

Suppose we have following two classes: class Temp{ public: char a; char b; }; class Final{ private: int a; char b; char c; public: Final(Temp in):b(in.a),c(in.b){} //rest of implementation }; suppose the only use of objects of Temp class is to construct objects of Final class, so I wonder if in current standard of c++...

Does developing applications for SPARC, IBM power CPU require separate compliers, other than x86, x86-64 targets?

Does developing applications for SPARC, IBM PowerPC require separate compliers, other than x86 and x86-64 targets? If true, how easliy could x86, x64 binaries in Linux be ported to SPARC and PowerPC? Is there a way to simulate these environments using virtualization? ...