24 views

Repeat Exercise 4.3.1 on the following grammars:

1. $S\rightarrow SS+\mid SS\: \ast\mid a$
2. $S\rightarrow 0S1\mid 01$
3. $S\rightarrow S ( S ) S\mid \epsilon$
4. $S\rightarrow (L)\mid a$ and $L\rightarrow L,S\mid S$
5. The following grammar for boolean expressions
• $bexpr\rightarrow bexpr\:or\:bterm\mid bterm$
• $bterm\rightarrow bterm\:and\:bfactor\mid bfactor$
• $bfactor\rightarrow not\: bfactor\mid ( bexpr )\mid true \mid false$

edited | 24 views