Context Free Grammar
[Grammar](https://texonom.com/grammar-4a1ccf76557b418fb29be021abd9f2a1) 


# CFGs
Ways of specifying PL syntax 
<details><summary>

**A context-free grammar is specified by a Tuple G = (V, T, P, S)**</summary>

1. V is variable (non-terminal symbol) set
2. T is terminal (terminal symbol / Token (at compiler)) set - like alphabet
3. P is production set - same head can exist `math: \subseteq V \times (V \cup U)^*`
4. 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
</details>

### Context Free Grammar Notion
|Title|
|:-:|
|[Parse Tree](https://texonom.com/parse-tree-be5cda47e60443378dcba8e52f8ee31c)|
|[CFG Production rule](https://texonom.com/cfg-production-rule-d713894589054bd6ae1f49848038bb58)|
|[Context Free rewriting](https://texonom.com/context-free-rewriting-ae239fa9964e4ff9981cc727c6546948)|
|[CFG Derivation](https://texonom.com/cfg-derivation-470857e93f004daf8e95987a6f9e207a)|
|[CFG Sentential Form](https://texonom.com/cfg-sentential-form-195e94e11ce7497bb9f9150e78ef1ffe)|


### Context Free Grammar Usages
|Title|
|:-:|
|[BNF (Backus Naur Form)](https://texonom.com/bnf-backus-naur-form-0a3b23609f294d30bf32fa6e537d414f)|
|[CNF (Chomsky normal form)](https://texonom.com/cnf-chomsky-normal-form-7e7baf8a9b114d7da7cf4dc10b50d4d5)|
|[GNF (Greibach normal form)](https://texonom.com/gnf-greibach-normal-form-981fb25c1dfe4254b96a47568b39bcd8)|
|[CFG Problem Solve Tip](https://texonom.com/cfg-problem-solve-tip-41e0f0d30b3d4eca812b14861ce6800f)|
|[CFG Removing ambiguity](https://texonom.com/cfg-removing-ambiguity-a71b0af979a04552bb0acbcc5d6e79e4)|



# Reference
> [[Study] Context Free Grammar (CFG)](https://talkingaboutme.tistory.com/498)






