This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ] = 3 MaxDepth[ ((a, a, a), (a, a)) ] = 2 YOU CAN USE YOUR FAVORITE PROGRAMMING LANGUAGE FROM THE FOLLOWING OPTIONS: Java, C, C ++ , or Scheme You will need to submit your program and a ReadMe ﬁle that describes how to recom-pile and run your program. Your program has to run on the ilab cluster. In addition to the code, please submit a printout of your code. We will post the exact submission procedure on our news group (Sakai). Problem 2 1. LL(2) grammars allow predictive parsering with a lookahead of two tokens. Give a formal deﬁnition of an LL(2) grammar. (Hint: you will need to modify the deﬁnition of FIRST and FOLLOW sets). 2. Give a grammar that is LL(2), but not LL(1). Prove your claim formally. 3. Describe the class of programming languages that can be recognized by LL(0) gram-mars....
View Full Document
- Spring '10
- Formal grammar, LL, Recursive descent parser