What is Compiler: Definition and 91 Discussions

In computing, a compiler is a computer program that translates computer code written in one programming language (the source language) into another language (the target language). The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language, object code, or machine code) to create an executable program.There are many different types of compilers which produce output in different useful forms. A compiler that can run on a computer whose CPU or operating system is different from the one on which the code it produces will run is called a cross-compiler. A bootstrap compiler is written in the language that it intends to compile. A program that translates from a low-level language to a higher level one is a decompiler. A program that translates between high-level languages is usually called a source-to-source compiler or transcompiler. A language rewriter is usually a program that translates the form of expressions without a change of language. The term compiler-compiler refers to tools used to create parsers that perform syntax analysis.
A compiler is likely to perform many or all of the following operations: preprocessing, lexical analysis, parsing, semantic analysis (syntax-directed translation), conversion of input programs to an intermediate representation, code optimization and code generation. Compilers implement these operations in phases that promote efficient design and correct transformations of source input to target output. Program faults caused by incorrect compiler behavior can be very difficult to track down and work around; therefore, compiler implementers invest significant effort to ensure compiler correctness.Compilers are not the only language processor used to transform source programs. An interpreter is computer software that transforms and then executes the indicated operations. The translation process influences the design of computer languages, which leads to a preference of compilation or interpretation. In practice, an interpreter can be implemented for compiled languages and compilers can be implemented for interpreted languages.

View More On Wikipedia.org
  1. S

    Finding Fortran Compiler & Running Clawpack on Windows XP

    I don't know fortran. I have to run few files from clawpack and I have to get results. I have windows xp 2002. Can anyone tell me what software/fortran compiler should I install ? and how do I get results? Thanks in advance
  2. T

    Free C(++) compiler for DOS but runs on Windows

    Just a quick question. I have tried searching, but Google is fairly useless for me. Do any of you know of free C or C++ compilers that can create programs for DOS but run on Windows (specifically, Vista)? I have an old DOS machine but don't want to have to write code on it. Instead, I want...
  3. L

    C/C++ Is there a C++ compiler for TI-84 calculators?

    Hello PF! I want to create a program/database that is capable of doing everything that I need it to, calculations, conversions etc. I'm currently learning C++ in school, and was wondering if there was a C++ compiler for TI-84 calculators. It would make it much easier for me to program...
  4. Topher925

    What compiler do you use for your microcontrollers?

    I originally got into electronics by trying to learn to program PICs, but then I stopped and moved onto PICAxe and other "easy to use" development tools. Now I'm requiring a little more advanced tools and looking to at learning PICs (or maybe AVRs, haven't decided) again. One thing I remember is...
  5. D

    Help, very simple mikroC compiler question.

    once I have wrote a program and clicked the build button how do I retrive the Hex file for the progam I just created, so I can import the hex file on to my programer? Your time is appreciated. -word
  6. H

    Could You Suggest A Good Compiler?

    I am a beginner. I am using turbo c++ for windows, but it doesn't recognize many common words like bool, namespace, etc. I tried using dev c++, but it didn't consist of a graphic driver. Could you suggest a good package which is available for free download, and has a good help section too ? (I...
  7. K

    Fortran Fortran Compiler and C Preprocessor

    I am very new to programming and am trying to determine if a Fortran compiler and C preprocessor is a property of the specific computer one has or if it is something that can be downloaded? Specifically I want to run the Neutron transport code, DANTSYS; system requirements are listed here...
  8. L

    C Programming Compiler for Windows Vista

    Hi, At university we are using the Borland C++ 5.5 compiler, however, this does not work on Vista, which my home computer has. I was therefore wondering what C program compiler everyone would recommend which works on Windows Vista? Thanks, Luke.
  9. Saladsamurai

    C/C++ C++ Compiler for Mac Leopard that is NOT Xcode?

    I am a novice (very novice) C++ user. I use Dev C++ on my PC. I really love it because it is very clean and simple. I just click File->new->new source code and I am there. There is an editing window and a building workspace is opened automatically. Is there something comparable to Dev C++...
  10. M

    Fortran 64 bit windows fortran compiler

    Hi, I have used Compaq Visual Fortran 6.5 for years. Recently bought a new PC with Intel Core2 Quad Q6600 processor and Windows Vista 64 bit Home Premium OS (yes, likely a mistake on the OS). I wish to use Code I wrote in the past and take advantage of 64bit processor, memory, etc. I...
  11. P

    C/C++ Unusual Compiler Error (using Dev-C++ Mingw)

    I find myself with an unexpected error that I can't seem to resolve. When trying to compile and run even a simple program, I receive the following error (the directory path for the project file is C:\unisa\Assignments, the project is Assignment1 and source file is Question1)...
  12. Saladsamurai

    C/C++ C++ compiler needed (free is nice

    C++ compiler needed (free is nice:) So I am taking a very basic (no pun) programming course at my university. We are working in C++ for now and we use Microsoft Visual Basic C++ 6.0 (or something to that effect). I live waayyy off campus, so I would like to be able to work at home if...
  13. C

    Fortran What Fortran90 Compiler Should I Use for Linux?

    Hi folks, I'm using Mandriva 2008 for some time and I now have to compile a program using fortran compiler. I've installed gcc f95 compiler and Intel FC but the compiling gives error when I use ifort myfile.f and g95 myfile.f In the manual of the program that I'll compile with fortran...
  14. madmike159

    Find a Free BASIC Compiler: Solutions & Resources

    Does anyone know of a good (free) BASIC compiler? Thanks:biggrin:
  15. S

    Troubleshooting Phonescape Compiler: Device Not Ready Error

    everytime i go on my compiler(phonescape) it says this this device is not reeady... press any key to continue i do that but then it just closes any help ? :smile: please help! :smile:
  16. U

    Fortran Fortran compiler specific kind modifier.

    Fortran compiler specific "kind" modifier. I've recently switched over from the SilverFrost (Salford) FTN95 compiler to the open source g95 compliler. So far everything seems very compatible between the two compilers (as in the same source compiles without modification on either compiler)...
  17. U

    Fortran Q? about Silverfrost (Salford) Fortran95 freeware compiler.

    Hi. Recently I wanted to take a look at Fortran so downloaded the Silverfrost (formerly known as Salford) Fortran95 compiler. See: http://www.silverfrost.com/11/ftn95/overview.asp BTW. It's freeware for evaluation purposes but if used for profit or research you have to buy a licence. It's...
  18. V

    Running a f90 code in f77 compiler

    heys..can anyone tell me..how could i run f90 codes in an f77 compiler..wht changes in the code do i need to make to do that?
  19. K

    Fortran C or FORTRAN compiler for Vista?

    Can anyone help me find a compiler/IDE for FORTRAN or C that can work with Windows Vista? I am a physics student and would like to learn some programing, but my computer runs Vista and I have yet to find a compiler that works. Otherwise, are there any recommendations for a language I could...
  20. S

    Fortran Why Am I Experiencing Compilation Errors with My Fortran Code?

    I am having trouble compiling code. Here's my code: PROGRAM Sample1 IMPLICIT NONE ! Variables and constants INTEGER, PARAMETER :: n=1000, m=10 INTEGER :: i REAL, DIMENSION (1: n) :: x REAL, DIMENSION (1:100, 1:m) :: y REAL, DIMENSION (1: m):: colavg INTEGER :: filestat...
  21. E

    C/C++ Compiler Error: Passing std::vector<T2> to Function Taking std::vector<T1>

    If I have a function that takes a std::vector< T1 > and I pass it a std::vector< T2 >, where T2 is publicly derived from T1, that should work, why does my compiler complain?
  22. O

    C/C++ What are the pros and cons of different C++ compilers for scientific computing?

    Hello: I need to write some numerical integration and do Fast Fourier transforms in c++. I am running MS OS on Intel Duo core processors. Earlier post suggested downloading libraries such as MLK. Since I am running on Intel, I have found Intel's MLK library. I will need other libraries...
  23. L

    Troubleshooting an xlC Compiler Error

    Here is the problem, I made up this program and compiled it with the Big CC compiler and it worked perfect, just the way I wanted it to work, however I have to switch compilers and get it to work on an xlC compiler which I am not familiar with, and of course the program compiles but does not...
  24. B

    C/C++ Having trouble running C++ compiler

    The type of compiler I am using is Dev-C++. I have no problem compiling my code and my compiler has generated no errors. However , when I try to run my code, The command prompt for like a nano-second and disappears and I have no idea of how to retreive it .
  25. M

    OpenGL: compiler showing error

    I am using Dev C++ compiler version 4.9.9.2 When I compiled my OpenGL code, the compiler gave the following error: [Linker error] undefined reference to `gluPerspective@32' ld returned 1 exit status [Build Error] [Project1.exe] Error 1 I am taking NeHe tutorials, where a function...
  26. K

    C/C++ Finding the Right C++ Compiler Program

    Could anyone recommend a good C++ compiler program. I'd rather get a recommendation than choose from the myriad on the net. Thanks :smile:
  27. Averagesupernova

    Does anyone here use the compiler for PIC processors from CCS?

    Does anyone here use the compiler for PIC processors from CCS? I'm learning with the free demo of PCW. The programming language C is new to me but I think I'm getting the hang of it. - I also have PICkit 2 Debug Express from Microchip. That comes with MPLAB which allows debugging and...
  28. N

    Troubleshooting Compiler Errors: Get Expert Help with Your Homework Statement

    Homework Statement Well I believe I have solved the problem correctly but I am not sure what I am doing wrong. I get the compiler error "a function-definition is not allowed here before ‘{’ token" Here is my pasted code: http://rafb.net/p/8P4HYa49.html
  29. U

    C, compiler - write a table from a program

    Hi, I am trying to write a program on a C compiler and I am not too sure how to do it. The question asks to write a full program to calculate the squares and cubes of the numbers from 0 to 10, which uses tabs (\t) to illustrate the data in the table. Click on the uploaded document to...
  30. A

    Troubleshooting Monte Carlo Simulation Compiler Issues

    Hello, my colleague has a problem. He has a Monte Carlo simulation written in C. But his program gives different outputs in case he compile it using g++ or icc. He has nothing changed in his source. He is using standard random number generator drand() with initialization srand((unsigned) time...
  31. N

    Troubleshooting C Compiler Error for Philips ARM Microcontroller

    I have been using ICC7 for ARM to create a project for a Philips ARM microcontroller. I've never had any problems with the compiler until today. I made some slight adjustments to the code and when I attempted to compile I got an error that says "Unable to fit C$$code section into ROM memory...
  32. L

    C++ Compiler Error in Cygwin: What Is It?

    I'm trying to learn C++ and am using Cygwin. When I try to compile my program I get the message /cygdrive/c/DOCUME~1/Stoffe/LOKALA~1/Temp/ccQt0yU6.o:driver.cpp:(.text+0x9d6): undefined reference to `Person::~Person()´ What is this kind of error?
  33. M

    Find a Cheap uP Starter Kit and Compiler for LED Projects

    Hi, I'm looking for a very cheap uP start kit that I can practice c language and perhaps assembly language on. I want to light up led's and stuff like that. Can anyone direct me to a good url to find one I can purchase. I'm interested in the software (compiler), etc. too. regards...
  34. S

    Trying to look for a fortran compiler for my windows XP

    not sure where this goes, but I am trying to look for a fortran compiler for my windows XP OS that is free so i can get into doing some programming. My school may be getting into a engineering competition and i would be a frontrunner on the team and want to get a headstart. if anyone can help i...
  35. J

    Seeking 64-bit Linux Compiler for Fortran 95 Binary

    hi, I was wondering if anyone was running 64-bit linux. In particular, I need someone to compile a 64-bit fortran95 binary for me.
  36. O

    C/C++ Where to find a good C++ Compiler?

    Didn't see anything under search but does anyone know where I can get a free C++ compiler? thank!
  37. C

    Is the Sunfire Compiler Worth Downloading for Programming?

    Does anyone of you know about this Sunfire compiler? Where can I download it? I need it for my next sem programming module. It's not available for downloading from my uni site. According to my friend's comment, it's not user friendly. So I want to get familiar with it before my next sem starts...
  38. T

    C/C++ Assessing the Quality of GNU C/C++ Compiler for Scientific Applications

    Is gnu C/C++ a good compiler ? How can we judge whether a compiler is good or bad ? Thanks in advance
  39. A

    C/C++ Which C++ Compiler Is Preferred?

    Hey guys! Which C++ compiler do you prefer? Do you like Borland's C++ builder? What is the Borland C++X? The X means something?
  40. Math Is Hard

    Needin' a C Compiler? Check out MingW & lcc-win32

    Hi there, I am taking a C programming course this summer and I am looking around for a compiler. I have used Visual Studio in the past but I don't need anything quite that elaborate. The recommendations I've gotten are for: MingW http://www.mingw.org/ and lcc-win32...
  41. enigma

    Assembly code compiler horror story

    So, I'm writing assembly language code to drive a fan by varying the pulsewidth. Halfway through (6 hours or so ago) I try to compile it. The compiler software is a piece of crap (code uses a structured assembly language, so it doesn't recognise anything), and I need to bring everything...
Back
Top