compiler

What features of .NET 3.5 can be used in a .NET 2.0 application?

I have an app that I am developing in Visual Studio 2008, but the projects are set to .NET 2.0. The application will run on a box that only has .NET 2.0 installed. I understand that I can use some of the features of the .NET 3.5 c# compiler and that it compiles my code to MSIL that .NET 2.0 runtime understands. What are the features o...

Yacc/Jay grammar file for Javascript?

I'm trying to find a grammar file for Javascript for Yacc (preferably for Jay, but since Jay is a Yacc clone I should be fine, since I need to implement it on .NET). ...

Can you "compile" PHP code?

I know that PHP is compiled to byte code before it is run on the server, and then that byte code can be cached so that the whole script doesn't have to be re-interpreted with every web access. But can you "compile" php and upload a binary-ish file, which will just be run by the byte code interpreter? ...

Checking Python code correctness

In C++ I have compiler that tell me if something wrong with my code after refactoring. How to make sure that Python code is at least correct after changes? There may be some stupid error like wrong function name etc. that pretty easy to find in compile time. Thanks ...

How to use indentation as block delimiters with bison and flex

I wounder how to implement indentation as block delimiters in bison + flex. Just like in python. I'm writing my own programming language ( mostly for fun, but I intend to use it together with a game engine ), I'll try to come up with something special that minimizes boilerplate and maximizes dev speed. I have already written an compiler...

Visual Studio null reference warning - why no error?

I've noticed something peculiar about Visual Studio. First, try typing this (C#) somewhere in a function: class Foo { public void Bar() { string s; int i = s.Length; } } Now, right away it will mark the s in s.Length as an error, saying "Use of unassigned local variable 's'". On the other hand, try ...

initial value of int array in C

When declaring an array in C like this: int array[10]; What is the initial value of the integers?? I'm getting different results with different compilers and I want to know if it has something to do with the compiler, or the OS. ...

From where can i download gcc compiler fpr windows?? i m using vista OS

please tell me a link for downloading the GCC compiler for C++. I m using windows vista as OS ...

Bare metal cross compilers input...

Hi, What are the input limitations of a bare metal cross compiler...as in does it not compile programs with pointers or mallocs......or anything that would require more than the underlying hardware....also how can 1 find these limitations.. I also wanted to ask...I built a cross compiler for target mips..i need to create a mips executa...

a language for semantic analysis ?

hello gurus, background: - there are formal languages for expressing programming language valid lexicon and syntax - such representations (e.g. regular expression and context-free grammars) can be automatically compiled into lexicon/syntax analyzers for some programming language using some tools (e.g. LEX and YACC) questions: - are the...

Casting pointer as template argument: Comeau & MSVC compile, GCC fails

Consider the following code: template<int* a> class base {}; int main() { base<(int*)0> test; return 0; } Both Comeau and MSVC compile this without issues (except for Comeau warning about an unused variable), while GCC fails on the base<(int*)0> test; line, stating In function `int main()': a casts to a type other than...

What happens when I compile?

I wonder what is compiling, what happens when you compile? I mean yes you press compile or type in in the console but what does it actually do in the "background"? ...

Compiled languages basics

Hi, please, could someone explain to me a few basic things about working with languages like C? Especially on Windows? If I want to use some other library, what do I need from the library? Header files .h and ..? What is the difference between .dll and .dll.a.? .dll and .lib? .dll and .exe? What is .def? Does it matter how was the lib...

Generating a custom compile time warning C#

Hi all, I'm using VS2008 and would like to create a compile time warning / error based on custom attributes on a property (if it is possible). There are two cases which interest me currently: [MyAttribute (typeof(MyClass)] Where MyClass has to implement an interface. Currently I assert this in the constructor of the attribute, how...

What is the reason for the creation of LLVM?

What are the differences between an LLVM and a regular compiler? Is it more dynamic and thus can be used to compile normally very dynamic languages (i.e. Javascript) into static binary code? What are the principles behind creating one? I know the Dragon Book for compilers, but is there such a thing for a LLVM? Thanks in advance, Omer....

How an uninitialised variable gets a garbage value?

Possible duplicate Uninitialized values being initialized? When we create a variable and don't initialize it, then some (random) number called garbage value is assigned to it. How this value is assigned to the variable? What is whole concept/mechanism behind this? Does this happen only in C? ...

C++ Compile Error: invalid operands of types `const char[2]' and `int' to binary `operator<<'

When the compiler gets here: outFile1<<"The highest number is "<<maxnum<<", and it is located at coordinates "<<maxX<","<<maxY<<"."<<endl; it gives the error invalid operands of types const char[2]' and int' to binary `operator<<' ...

Using GCC through Xcode to compile basic programs

So, I'm a brand new CS student, on a Mac, and I'm learning C++ for one of my classes. And I have a dumb question about how to compile my super basic C++ program. I installed Xcode, and I'm looking through the documentation to try and figure out how to use it (and I highly suspect it's extremely overpowered for what I'm doing right now)...

Erlang erlIDE: what are the -compile options supported?

I've been trying to get erlIDE to work with -compile options e.g. -compile('S'). % Generate 'assembler' listing to no avail. What I am doing wrong? NOTE: I have also tried setting 'project specific' options for the compiler with no success. EDIT: could it be that 'erlc' is invoked and forced to generate a 'beam' and thus disreg...

VBscript compiler

Can anyone recommend a free vbscript compiler (or cheapest possible) Thanks, JOD ...