Introduction to Compiler
Compiler – Basically a compiler is a computer program that transforms resource code written in a computer programming language converted into another tantamount programming language known as ‘target language’ or the output. The name ‘compiler’ is in the first place used for programs that transform computer program source code from a one programming language or high-level programming language to a lower level language. A computer program that transubstantiate from a low level language to a higher level one is a decompile. The computer a program that translates between high-level languages is usually called a language translator. A compiler is likely to perform following operations: lexical analysis, syntax analysis, semantic analysis, preprocessing, parsing, code generation, and code optimization.
Llexical analysis: Lexical analysis is also known as “tokenization” is the procedure of breaking a character stream into individual unit chunks called ‘tokens’. The “lexer” or “scanner” is software used by the compiler to tokenize computer program code. Tokenization is made through pattern matching.
Trends in compiler construction Semantic Analysis: Now it’s time to move forward to semantic analysis, where we dig even deeper in compiler to check whether they form a sensible set of instructions in the computer programming language. For a computer program to be semantically valid, all constants, identifiers, functions, keywords, variables, classes, etc. must be properly defined, expressions and variables must be used in ways that respected to that type of system, access control
The code generator: generation of code’ is the last and important point in our compiler model ‘. It takes as input an arbitrate representation of the source program and produces as output an equivalent target program code. The requirements traditionally obligatory on a code generator are severe. The output code must be correct and of properly executed, it means it should make effective use of the resources of the target machine. Moreover, the code generator itself should run expeditiously.
computer science students can find more seminar topics on compiler design
Download Seminar Report and design PPT On Compiler.