There are three basic
phases that are important in programming e.g. C- programming. The phases are
Pre-processing, compiling and Linking, only two phases are required: compiler
and linking.
prog.càPREPROCESSORà
temp.càCOMPILERà
prog.objàLINKERàprog.exe
A
preprocessor basically reads line by line from the input and replicates the
line to the output. If the line is a preprocessing statement, then it performs
the preprocessing directives. All preprocessing statements in C begin with the
# symbol and are at the beginning of a line. The...
Monday, April 14, 2014
Wednesday, March 26, 2014
Posted by Knowledegehub on 3:55 AM with No comments
Why learn about compilers?
Few people will ever be required to write a compiler for a general-purpose language like C, Pascal or SML. So why do most computer science institutions offer compiler courses and often make these mandatory Some typical reasons are:
It is considered a topic that you should know in order to be “well-cultured” in computer science.
A good craftsman should know his tools, and compilers are important tools for programmers and computer scientists.
The techniques used for constructing a compiler are useful for other purposes...
Posted by Knowledegehub on 3:43 AM with 1 comment
Compiler Requirements
Correctness.
Correctness
is absolutely paramount. A buggy compiler is next to useless in practice. Since
we cannot formally prove the correctness of your compilers, we use extensive
testing. This testing is end-to-end, verifying the correctness of the generated
code on sample inputs. We also verify that your compiler rejects programs as
expected when the input is not well-formed (lexically, syntactically, or with
respect to the static semantics), and that the generated code raises an
exception as expected if the language...
Posted by Knowledegehub on 2:52 AM with No comments
Definitions:
Translator
A device that changes a sentence from one language to another without change of meaning.
Compiler
A program that translates between programming languages.
Interpreter
A processor that compiles and executes programming language statements one by one in an interleaved manner.
Syntax
An alphabet and a set of rules defining spatial relationships between symbols and symbol sets in a language.
Semantics
The meanings assigned to symbols and symbol sets in a language.
Pragmatics
The...
Subscribe to:
Posts (Atom)