Right Click to Search

Saturday, July 24, 2024

Analysis Phase >> Syntax Analysis [2nd Phase of Compiler]


Syntax Analysis :
  1. It is Second Phase Of Compiler after Lexical Analyzer.
  2. It is also Called as Hierarchical Analysis or Parsing.
  3. It Groups Tokens of source Program into Grammatical Production.
  4. In Short Syntax Analysis Generates Parse Tree.
sum = num1 + num2





Parse Tree :

It only Checks for Syntax not meaning ,
  • Example : '+' Operators on two Operands
  • It does not checks which type of operands they are.
  • Suppose One of the Operand is String and other is Integer then it does not throw error as it only checks whether there are two operands associated with '+' or not .
  • So this Phase is also called Hierarchical Analysis as it generates Parse Tree Representation of the Tokens generated by Lexical Analyzer

Tags / Keywords : | , ,

Stumble
Delicious
Technorati
Twitter
Facebook

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

 

Learn C Programming Copyright © 2010 LKart Theme is Designed by Lasantha, Free Blogger Templates