What is a Compiler?

A compiler is a computer program (or a set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language), with the latter often having a binary form known as object code. The most common reason for converting source code is to create an executable program.

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 or machine code). If the compiled program can run on a computer whose CPU or operating system is different from the one on which the compiler runs, the compiler is known as a cross-compiler. More generally, compilers are a specific type of translator.

While all programs that take a set of programming specifications and translate them, i.e. create a means to execute those specifications, are technically "compilers", the term generally means a program that produces a separate executable from the compiler (that may require a run time library or subsystem to operate), a compiler that merely executes the original specifications is usually referred to as an "interpreter", although because of differing methods of analyzing what represents compilation and what represents interpretation, there is some overlap between the two terms.

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 transpiler. A language rewriter is usually a program that translates the form of expressions without a change of language. The term compiler-compiler is sometimes used to refer to a parser generator, a tool often used to help create the lexer and parser.

A compiler is likely to perform many or all of the following operations: lexical analysis, preprocessing, parsing, semantic analysis (syntax-directed translation), code generation, and code optimization. Program faults caused by incorrect compiler behavior can be very difficult to track down and work around; therefore, compiler implementors invest significant effort to ensure compiler correctness.

Hope this was helpful,

The PushYourRank Team
Posted By: Nicholas Coriano

About The Author: Nicholas Coriano is an Entrepreneur, Web Developer, Social Media Marketer, SEO Consultant and the founder of this blog and The NewYorkWebsiteDesignCenter.com.  While developing websites for his own businesses and marketing his entrepreneurial ventures online, he began blogging useful tips and "how-to" articles on PushYourRank.com for reference purposes.  To retain Nicholas for help with your website launch or product launch, email PushYourRank@Gmail.com

About PushYourRank.com: PushYourRank.com (the Blog) is a blog that helps small businesses, start-ups, developers, amateurs website builders, bloggers and entrepreneurs develop their websites, their social media presence, their search engine optimization techniques and more ....online.  The Blog publishes articles about Ecommerce, Email Marketing and How To Make Money Online...as well as any topic that pertains to the Internet or Online.  If you need help developing a website, SEO or Social Media outsourcing, see NewYorkWebsiteDesignCenter.com, if you would like to advertise or have us publish an article on a certain subject, please email us at PushYourRank@Gmail.com