Context Free Grammar

Context Free Grammar

Creator
Creator
Alan JoAlan Jo
Created
Created
2022 Oct 5 3:48
Editor
Editor
Alan JoAlan Jo
Edited
Edited
2022 Oct 5 4:13
Refs
Refs
Grammar

CFGs

Ways of specifying PL syntax
A context-free grammar is specified by a Tuple G = (V, T, P, S)
  1. V is variable (non-terminal symbol) set
  1. T is terminal (terminal symbol / Token (at compiler)) set - like alphabet
  1. P is production set - same head can exist math: \subseteq V \times (V \cup U)^*
  1. S is one start symbol (sentence symbol) - math: L(G) = \{w \in T^* \, | \, S \Rightarrow^* w\}
  • Any Regular Languages is CFL
  • process of replacing Non-terminals to terminals
  • where V, T, P is finite set
Context Free Grammar Notion
 
 
Context Free Grammar Usages
 
 
 

Reference

 
 
 

Recommendations