1. Consider a language of strings that contains only X ’s, Y ’s and Z ’s. A string in this language must begin with an X . If a Y is present in a string, it must be the final character of the string.
a. Write a recursive grammar for this language.
b. Write all the possible two-character strings of this language.
2. Consider the following grammar:
Write pseudocode for a recursive function that returns true if a string is in this language and returns false otherwise.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here