CFGs
Ways of specifying PL syntax
A context-free grammar is specified by a Tuple G = (V, T, P, S)
- V is variable (non-terminal symbol) set
- T is terminal (terminal symbol / Token (at compiler)) set - like alphabet
- P is production set - same head can exist
math: \subseteq V \times (V \cup U)^*
- 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