Consider the following statements regarding the front-end and back-end of a compiler.
S1: The front-end includes phases that are independent of the target hardware.
S2: The back-end includes phases that are specific to the target hardware.
S3: The back-end includes phases that are specific to the programming language used in the source code.
Identify the CORRECT option.
Which one of the following statements is TRUE?
Consider the augmented grammar with {+, *, (, ), id} as the set of terminals.
S' $$\to$$ S
S $$\to$$ S + R | R
R $$\to$$ R * P | P
P $$\to$$ (S) | id
If I0 is the set of two LR(0) items {[S' $$\to$$ S.], [S $$\to$$ S. + R]}, then goto(closure(I0), +) contains exactly _________ items.
Consider the following statements.
S1 : Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1).
S2 : For any context-free grammar, there is a parser that takes at most O(n3) time to parse a string of length n.
Which one of the following option is correct?