• edited by
2,329 views
0 0 votes

Let ' $G$ ' be a grammar with the following translations:
\[
\begin{array}{l}
S \rightarrow \text { p\{print "G"\} } P \\
P \rightarrow \text { q\{print "A"\} } Q \\
P \rightarrow r\{\text { print " " } "\} \\
P \rightarrow \varepsilon\{\text { print "E"\} } \\
Q \rightarrow \text { s\{print "A"\} } P \\
Q \rightarrow \varepsilon\{\text { print " } O \text { " }\}
\end{array}
\]

What is the output produced for the input "pqsqsr" using the bottom-up parsing with above translations?

2 Answers

0 0 votes

Ans. TAAAAG

• edited by
Position:
Show:

Related questions

3 3 votes
2 answers 2 answers
2.5k
2.5k views
Manu Thakur asked Jan 27, 2018
2,478 views
Given answer is (D), how?\[\mathrm{s} \rightarrow \mathrm{aS} / \mathrm{b}\]The Parsing Automata below is for the context-free grammar with the productions indicated abov...