Context-free grammar

Context free grammar (CFG ) 

Syntax analysis or parsis( from parser tree ) is the second phase of compiler .We  have seen than a lexical analyzer can identify tokens with the help of regular expressions and pattern rules.But a lexical analyzer can not check the syntax of a given sentence due to the limitation of the regular expressions. Regular expressions can not check balancing tokens,Such as parenthesis. Therefor , this phase uses context free grammar which is recognize by push down automata.

CFG, On the other hand,is a super set of regular grammar.  
                            
It implies that every regular grammar is also context free but there exist some problem ,which are beyond the scope of regular grammar .CFG is a helpful tool in describing the syntax of programming language.




CFG stands for context free grammar, It is a formal grammar which is used to generate all possible patterns of string in a given formal language . It defined four topples. As
G = (V, T ,P , S )


G = is the grammar , set of production rule, it is used to generate the string of language.

T = T is the final set of a non-terminal symbol,It denoted by capital letters .

V = final set of  non- terminal symbol.

S = s is start system.

 Important and Related post :

>> What is application software and system software
>> incremental model with details.
>> Software Engineering | Classification of Software Requirements
>>What is operating system 
>>What is traffic monitoring system 
>> what is computer virus and names of virus.
>>What is embedded control system  
>> What is compiler .
>> What is linker.
>> What is Interpreter
>> Modern Principles Of Software Development
>> Types of Software Testing
>> Software Testing | Basics
>> Software Engineering | Debugging Approaches


Post a Comment

0 Comments