Compiler is a program that reads a program written in one language, called source language, and translated it in to an equivalent program in another language, called target language. It reports errors during the translation of source code to target language code.Source program can be of any programming language. Target program can be either Assembly language code or machine code. The first phase of the compiler, Lexical Analyzer, can be implemented using LEX tool provided with Linux. The second phase, Syntax Analyzer, can be implemented by using Yacc tool provided by Linux. The third phase, Semantic Analyzer, and the fourth phase, Intermediate Code Generation, are carried out as the part of action corresponding to the production rules in the parser.
There are mainly SIX phases of a compiler. The first four Lexical analysis, Syntax analysis, Semantic analysis and Intermediate Code Generation are part of Analysis phases, which are machine independent phases. While the other two Code Optimization and Code Generation are part of Synthesis phases, which are highly machine dependent phases.
one should have thorough knowledge of each tools and cross compiler etc.
Compiler is a program that reads a program written in one language, called source language, and translated it in to an equivalent program in another language, called target language. It reports errors during the translation of source code to target language code.Source program can be of any programming language. Target program can be either Assembly language code or machine code. The first phase of the compiler, Lexical Analyzer, can be implemented using LEX tool provided with Linux. The second phase, Syntax Analyzer, can be implemented by using Yacc tool provided by Linux. The third phase, Semantic Analyzer, and the fourth phase, Intermediate Code Generation, are carried out as the part of action corresponding to the production rules in the parser.
There are mainly SIX phases of a compiler. The first four Lexical analysis, Syntax analysis, Semantic analysis and Intermediate Code Generation are part of Analysis phases, which are machine independent phases. While the other two Code Optimization and Code Generation are part of Synthesis phases, which are highly machine dependent phases.
one should have thorough knowledge of each tools and cross compiler etc.