Compiler construction
|
|
It has been suggested that History of compiler construction be merged into this article. (Discuss) Proposed since April 2011. |
| This article does not cite any references or sources. (January 2010) |
Compiler construction is an area of computer science that deals with the theory and practice of developing programming languages and their associated compilers.
The theoretical portion is primarily concerned with syntax, grammar and semantics of programming languages. One could say that this gives this particular area of computer science a strong tie with linguistics. Some courses on compiler construction will include a simplified grammar of a spoken language that can be used to form a valid sentence for the purposes of providing students with an analogy to help them understand how grammar works for programming languages.
The practical portion covers actual implementation of compilers for languages. Students will typically end up writing the front end of a compiler for a simplistic teaching language, such as Micro.
Contents |
Lexical Analysis [edit]
The first phase of constructing a compiler is lexical analysis of the source program. This phase involves reading the source programs and grouping the characters into lexemes. A token of the form <token-name, attribute-value> is produced for each lexeme. Lexical analysis can also be termed as scanning.[1]
Syntax Analysis [edit]
The second phase of constructing a compiler is syntax analysis. The output of lexical analyser is used to create a representation which shows the grammatical structure of the tokens. Syntax analysis is also called parsing.[2]
History [edit]
Subfields [edit]
Notes [edit]
- ^ Aho et al. 2007, p. 5–6
- ^ Aho et al. 2007, p. 8
References [edit]
- Aho, Alfred V.; Lam, Monica S.; Sethi, Ravi; Ullman, Jeffrey D. (2007), Compilers: Principles, Techniques, & Tools (2nd ed.), Pearson, ISBN 978-81-317-2101-8
See also [edit]
Further reading [edit]
- Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools.
- Michael Wolfe. High-Performance Compilers for Parallel Computing. ISBN 978-0-8053-2730-4
External links [edit]
- Let's Build a Compiler, by Jack Crenshaw, A tutorial on compiler construction.
| This programming language–related article is a stub. You can help Wikipedia by expanding it. |