compiler

Pascal compiler running on the server

Hi all, do you have any ideas, how to compile pascal file (*.pas) on the server? Thank you. ...

Manually emit a token with ANTLR

Hello folks, I'm having a bit of trouble manually emitting a token with a lexer rule in ANTLR. I know that the emit() function needs to be used but there seems to be a distinct lack of documentation about this. Does anybody have a good example of how to do this? The ANTLR book gives a good example of how you need to do this to parse ...

How exactly does __attribute__((constructor)) work?

It seems pretty clear that it is supposed to set things up. When exactly does it run? Why are there two brackets? Is __attribute__ a function? A macro? Syntax? Does this work in C? C++? Does the function it works with need to be static? When does __attribute__((destructor)) run? Example in Objective C: __attribute__((constructor)) s...

Objective-C property assignment returns the assigned value?

Say I have the following: @interface MyClass : NSObject { NSString* _foobar; } @property (nonatomic, retain) NSString* foobar; @end @implementation MyClass @dynamic foobar; - (void) setFoobar:(NSString*)fbSet; { [_foobar release]; _foobar = [fbSet retain]; } - (NSString*) foobar; { return _foobar; } @end Then: MyClass* mcInst = [[[M...

Are there compilers that optimise floating point operations for accuracy (as opposed to speed)?

We know that compilers are getting better and better at optimising our code and make it run faster, but my question are there compilers that can optimise floating point operations to ensure greater accuracy. For example a basic rule is to perform multiplications before addition, this is because multiplication and division using floating...

Lua crashes when programs are compiled

I'm working on a very, very simple Lua program, trying to teach myself the language. Here's the three line program: file = io.open("hello.txt", "w") file:write("Hello, World.\n") io.close(file) When I use the program with Lua as a script, it works fine. When I compile the program, it works. However, when I run the compiled program,...

Does MSVC automatically optimize computation on dual core architecture?

Does MSVC automatically optimize computation on dual core architecture? void Func() { Computation1(); Computation2(); } If given the 2 computation with no relations in a function, does the visual studio compiler automatically optimize the computation and allocate them to different cores? ...

Qt's pragma directives

Hi, Could anyone point me out to an article, where pragma directives, available in Qt enviroment would be discussed? Thank you. ...

Ada compilers for Linux

I'm doing a trade study for Ada development on Linux. Do you have any good compiler/OS recommendations? So far, I've got GNAT from AdaCore running on CentOS 5.4, and I have license requests in for Rational Apex and Aonix ObjectAda. This is a porting effort. The original codebase is Apex 3.0 on OSF1 4.0d. Anything else I should be cons...

what are the differences between an executable generated by windows and linux

Possible Duplicate: Why an executable program for a specific CPU does not work on Linux and Windows? Why can't programs written in linux be executd in windows ? Suppose I compile a simple C program containing function calls that are common to both windows and linux, Does the compiler generate different binary under windows and l...

does assembler output differ between operating systems ?

The assembly code generated by assembler, from a C-source code depends on the CPU architecture underlying it, eg x-86 . Then does the assembler output of a simple C-source code (containing common function-calls of both windows and linux) differ between Operating Systems ? ...

Lambda expression compilation

Hi! Given the lambda expression below where Province type contains a public property "byte CountryId" and Country type which contains a public property "byte Id". Expression<Func<Province, bool>> exp = p => p.CountryId == country.Id; The Expression is later used by NHibernate Linq provider and threw an exception. When I inspected th...

Strange Compiler Behavior Regarding Default Constructors in C++

class TestClass { public: TestClass(int i) { i = i; }; private: int i; } class TestClass2 { private: TestClass testClass; } Why does the above code compile fine even when we have not provided a default constructor? Only if someone instantiates TestClass2 elsewhere in the code, do we get a compile error. What is the compil...

How can I set the PATH variable for javac so I can manually compile my .java works?

Here's the address on my drive: C:\Program Files\Java\jdk1.6.0_18\bin How would I go about setting the path variable so I can go in command window (windowskey+r "cmd") and be able to type things like: javac TestApp.java I'm using Windows 7 Professional. ...

Is Visual Studio 2005 Express Edition still legally available anywhere?

All the links on the Microsoft site now redirect to the 2008 edition. The problem is the new version won't link with C libraries built with the 2005 edition. ...

XML Library for C/C++

Hey I'm looking for an XML parser for C/C++, just a parser which I give a string as an argument and it returns me a parsed document represented by a class/struct. The problem is that I am compiling it for the ARM9 processor and I need really just simple code no ./configure and stuff like that and no specific Makefile, just some files wh...

Anywhere I can find good LR(1) and LALR(1) state generation examples or reading material?

I'm using Kenneth Louden's Compiler Construction book but it lacks examples and the rules stating how this goes are really hard to follow. I'm not sure how to go to the LR(1) states. also, not sure how to go from the LR(1) states to the LALR(1) ones. For example, these LR(1) states: i understand how the "S -> .XX, $" got there, but t...

Distributed Java Compiler

Hi, Is there a distributed compiler for java like distcc for C/C++? Thanks Bala ...

Difference bettwen C++ and Java compilation process

Possible Duplicate: Why does C++ compilation take so long? Hi, I searched in google for the differences between C++ and Java compilation process, but C++ and Java language features and their differences are returned. I am proficient in Java, but not in C++. But I fixed few bugs in C++. From my experience, I noticed that C++ a...

What is a simple webpage compiler for restructured text?

Instead of a blog/cms, I'd like to have a static html-based site with a few (rarely updated) pages. I figure the simplest way to update them is to keep the sources in a format like ReST, and compile it each time it updates. What is a recommended compiler for this usage? I'd like to have my own theme/design and I don't need anything beyon...