compiler

Why does my yacc program not recognize function declarations?

I think my program should be able to recognize the following as a function declaration int fn(int i) { int n; return; } but it doesn't. Here's the relevant part of my yacc file program : declaration_list ; declaration_list : declaration_list declaration | declaration ; declaration : var_declaration | fun_declaration ...

Delphi 64-bit Preview Compiler available?

Hi, is there a 64-bit preview compiler available, as announced a long time ago? I wasn't able to find anything. I really need a 64-bit compiler to target the 64-bit versions of Microsoft Office. ...

Super constructor call in Blackberry Screen classes.

Why is the super() constructor recommended to be called when extending any of the RIM Screen classes? It was my understanding that the no-arg constructor of any super class was implicitly called from any class that extends it, am I wrong? ...

Dynamic languages Vs Static languages (can this two be together in the same place)

programming languages are grouped it 2 main classes "Dynamic" & "Static". - Is this always the case a programming language is in one of them and not in both, I mean can a language be dynamic and static at the same time ? ...

Compile only the current project without checking referenced projects

When I hit Compile Project (SHIFT+F6) in Visual Studio 2008, Visual Studio always seems to check the referenced projects/libraries first. It is understandable, because they have to be compiled first, but currently I happen to spend most of my time working actively only with the top level project (it's an ASP.NET application referencing a...

Any way to get MS VC++ to abort after having x errors

Hi, I am compiling dll's that take a long time, i was wondering if you could automatically make MSVC++ abort the compile after a certain number of errors. For example an error in one header causes 100's of errors in the program but it can take a few minutes for the compilation to stop. I know I can cancel it manually, but was wonde...

Why is (python|ruby) interpreted?

What are the technical reasons why languages like Python and Ruby are interpreted (out of the box) instead of compiled? It seems to me like it should not be too hard for people knowledgeable in this domain to make these languages not be interpreted like they are today, and we would see significant performance gains. So certainly I am mis...

Does my C++ compiler optimize my code?

While using modern C++ compilers (including MSVC, GCC, ICC), how can I say if it has: parallelized the code vectorized the loops (or used other specific processor instructions) unrolled the loops detected tail-recursion performed RVO (return-value optimization) or optimized in some other way without diving into the assembler code the...

C# compiler options - embedding manifest file

Hi, I have found that it is possible to embedd manifest file (added to resources) with Compiler option /win32manifest. I am trying to find compiler options in VS express but I cannot see it. Could you please help me? Thanks ...

Sun C++ Compilers and Boost

I am currently developing on OpenSolaris 2009-06. The Boost::MPL Documentation seems to suggest that sun compilers are not supported (the document was last updated in 2004 ). Boost's top level documentation seems to suggest that the sun compilers 5.10 onwards are supported -- I guess this is a general level of support or does this includ...

Java compiler error. Cannot find symbol

Why am I getting this error when the SystemController class is in the same directory? sgs$ javac Main.java Main.java:27: cannot find symbol symbol : class SystemController location: class sgs.Main SystemController sc = new SystemController(); ^ Main.java:27: cannot find symbol symbol : class SystemController location...

Shift Reduce Conflict

import java_cup.runtime.*; import java.io.*; import java.util.*; /* Preliminaries to set up and use the scanner. */ parser code {: SMPLLexer lexer; public SMPLParser (SMPLLexer lex) { super(lex); lexer = lex; } public void report_error(String message, Object info) { System.err.println(messag...

is there a good place to discuss compilers ?

I am looking for some place where I can discus compilers and language design ? forum or any thing of this sort ...

vb.net external-only properties or methods

Is there a simple way in vb.net to mask a public property or method from the internal namespace? It would be helpful as a refactoring tool to isolate internal dependencies and perhaps to enforce a non-recursion policy for external services. ...

"cannot do signed 4 byte relocation" on compile

I'm going through Real world Haskell, and got to the example: -- file: ch04/InteractWith.hs -- Save this in a source file, e.g. Interact.hs import System.Environment (getArgs) interactWith function inputFile outputFile = do input <- readFile inputFile writeFile outputFile (function input) main = mainWith myFunction where mainWi...

How to take scope into account when building a symbol table with yacc?

My yacc parser creates a symbol table, but I need to take scope into account. How would I do that? I heard something about how when you exit a scope, the symbol table gets destroyed. Still not very clear on how to do this. ...

Regex, writing a toy compiler, parsing, comment remover

Hi, I'm currently working my way through this book: http://www1.idc.ac.il/tecs/ I'm currently on a section where the excersize is to create a compiler for a very simple java like language. The book always states what is required but not the how the how (which is a good thing). I should also mention that it talks about yacc and lex and s...

What's the limit to the number of members you can have in a java enum?

Assuming you have a hypothetical enum in java like this (purely for demonstration purposes, this isn't code i'm seriously expecting to use): enum Example{ FIRST, SECOND, THIRD, ... LAST; } What's the maximum number of members you could have inside that enum before the compiler stops you? Secondly, is there any per...

Your favourite Abstract Syntax Tree optimization

Hi If you were constructing a compiler, what optimization at the AST level would be the nicest to have? ...

How to check code generated by C++ compiler?

Hi, just like in topic - is there any software to open (what?) and here I don't even know what to open - file with object code or exe? My today's questions (if only todays ;)) may seem bit odd but I'm going through excersises in "The C++ Programming Language" by B.S. and sometimes I'm just stuck on particular question. I'm sometimes bit ...