info@avatto.com
+91-9920808017
36. Which one of the following is TRUE at any valid state in shift-reduce parsing?
Viable prefixes appear only at the bottom of the stack and not inside
Viable prefixes appear only at the top of the stack and not inside
The stack contains only a set of viable prefixes
The stack never contains viable prefixes
Your email address will not be published. Required fields are marked *
Report
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Comment
37. Among simple LR (SLR), canonical LR, and lookahead LR (LALR), which of the following pairs identify the method that is very easy to implement and the method that is the most powerful, in that order?
SLR, LALR
Canonical LR, LALR
SLR, canonical LR
LALR, canonical LR
38. Consider the following grammar G. S → F | H F → p | c H → d | c Where S, F and H are non-terminal symbols, p, d and c are terminal symbols. Which of the following statement(s) is/are correct? S1: LL(1) can parse all strings that are generated using grammar G. S2: LR(1) can parse all strings that are generated using grammar G.
Only S1
Only S2
Both S1 and S2
Neither S1 and S2
39. Which of the following statements about parser is/are CORRECT? I. Canonical LR is more powerful than SLR. II. SLR is more powerful than LALR. III.SLR is more powerful than Canonical LR.
I only
II only
III only
II and III only
40. A shift-reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar S → xxW{print"1"} S → y {print"2"} W → Sz{print"3M} What is the translation of xxxxyzz using the syntax-directed translation scheme described by the above rules?
23131
11233
11231
33211
Login with Facebook
Login with Google
Forgot your password?
Lost your password? Please enter your email address. You will receive mail with link to set new password.
Back to login