retagged by
394 views
0 votes
0 votes

Consider the following grammar for Boolean expression:

$E$ $\rightarrow$ $E$ OR $E$
$E$ $\rightarrow$ $E$ AND$E$
$E$ $\rightarrow$ NOT $E$
$E$ $\rightarrow$ $\left ( E \right )$
$E$ $\rightarrow$ TRUE
$E$$\rightarrow$  FALSE
$E$ $\rightarrow$ $ID$

The above grammar is

  1. Ambiguous
  2. Non-ambiguous
  3. $LL$ $\left ( 1 \right )$
  4. Both$\left ( A \right )$ and $\left ( C \right )$
retagged by

1 Answer

Best answer
0 votes
0 votes
The given grammar is ambiguos and only operator precedance grammar allow ambiguos grammar.
selected by
Answer:

Related questions

1 votes
1 votes
1 answer
3
Bikram asked Jan 16, 2017
381 views
Match the following:List IList IIABackus Naur form 1Regular expressionBLex2$\left ( I \right )$$LALR$CYacc3$LL$$\left ( 1 \right )$DRecursive descent parsing 4$CFG's$ $...