Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
lfa:2025:lab09 [2026/01/12 08:18] cata_chiru created |
lfa:2025:lab09 [2026/01/14 19:49] (current) cata_chiru |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== 9. Context-Free Grammars ====== | ====== 9. Context-Free Grammars ====== | ||
| + | |||
| + | $ G = \{\Sigma, V, R, S \} $ | ||
| + | |||
| + | S - Starting symbol | ||
| + | |||
| + | V - Set of terminals and non-terminals | ||
| + | |||
| + | R - production rules ($ R \subseteq (V \setminus \Sigma) \times V^n $) | ||
| + | |||
| + | **Property:** Chomsky Normal Form (CNF) - A grammar in CNF is context-free. | ||
| + | - all transitions are of the form: | ||
| + | * $ X \leftarrow YZ $ | ||
| + | * $ X \leftarrow a $ | ||
| + | * $ S \leftarrow \epsilon $ | ||
| + | |||
| + | S is the starting symbol. | ||
| + | |||
| + | |||
| ===== 9.1. Generating a CF language ===== | ===== 9.1. Generating a CF language ===== | ||