Different phases of compilers :
- Analysis Phase
- Synthesis Phase
- Lexical analysis
- Syntax analysis
- Semantic analysis
- Lexical Analyzer is First Phase Of Compiler.
- Input to Lexical Analyzer is "Source Code"
- Lexical Analysis Identifies Different Lexical Units in a Source Code.
- Different Lexical Classes or Tokens or Lexemes
- Identifiers
- Constants
- Keywords
- Operators
- Example : sum = num1 + num2 ;
So Lexical Analyzer Will Produce Symbol Table -
Token Type sum Identifier = Operator num1 Identifier + Operator num2 Identifier ; Seperator
- Lexical Analyzer is also called "Linear Phase" or "Linear Analysis" or "Scanning"
- Individual Token is also Called Lexeme
- Lexical Analyzer's Output is given to Syntax Analysis.
Tags / Keywords : | Code Generation, Compiler, Languages, Lexical analysis, Parsing, Program optimization, Programming, source code
0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email