Recent questions tagged context-free-grammar

8.9k
views
1 answers
5 votes
Which of the following features cannot be captured by CFGSyntax of if then else statementsSyntax of recursive proceduresWhether a variable is declared before its useMatching nested parenthesis
923
views
1 answers
9 votes
Give a context-free grammar $G$ that generates $L = \{0^i1^j0^k \mid i + k = j\}$.Prove that $L = L(G)$.
2.1k
views
1 answers
2 votes
If a grammer(CFG) is ambiguous then we can construct the topdown and bottomup parsing is possible directly???or we will make them into unambiguous then we will construct???
5.9k
views
4 answers
3 votes
Consider the following grammar. How many back tracks are required to generate the string aab from the above grammar?S → aB | aAbA → bAb | aB → aB | ε
397
views
1 answers
0 votes
I did in this way :There is conflict , right ? As A -> g. and B -> g. both going to $ and g
416
views
1 answers
1 votes
851
views
3 answers
3 votes
The maximum number of reduce moves that can be taken by a bottom-up parser with no epsilon and unit productions to parse a string of length 3 tokens is ____ ?
3.7k
views
6 answers
2 votes
Consider the following grammar$S\rightarrow Aa\mid B $B\rightarrow a\mid BC$C \rightarrow a\mid \in$the no of productions in simplified cfg is
1.9k
views
1 answers
0 votes
Consider the following statement:if (expression) statement else statement Which of the following describe the above statement?A). Regular grammarB). Context free grammarC). Both (A) and (B)D). None of these
4.2k
views
3 answers
3 votes
Option D is correct. But G is ambiguous. Can DPDA accept G?