Describe all the viable prefixes for the following grammars:a) The grammar S 051|01o f Exercise 4.2.2(a).I b) The grammar S->SS+\SS*\ a of Exercise 4.2.1.! c) The grammar S S ( S ) | e of Exercise 4.2.2 (c).
Exercise 4.2.2(a)
a) S 0 5 1 | 0 1 with string 000111.
Exercise 4.2.1
Consider the context-free grammar:5 -> S S + \ S S * \ aand the string aa + a*.a) Give a leftmost derivation for the string.b) Give a rightmost derivation for the string.c) Give a parse tree for the string.! d) Is the grammar ambiguous or unambiguous? Justify your answer.! e) Describe the language generated by this grammar.
Exercise 4.2.2 (c)
! c ) S S (S) S\e with string (()()).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here