CSC 4101 : Practice Midterm

44 views6 pages
15 Mar 2019
School
Course
Professor

Document Summary

Read the whole exam rst (there are a total of 6 pages) and plan your time. You have 50 minutes to complete all the questions. The exam is open book, open notes, and closed neighbors. Hint: remember that (car (cons a d)) = a and (cdr (cons a d)) = d. Use short descriptive phrases, don"t simply restate the alorithms in english. Consider the following grammar for variable and class declarations in java: -> class id lbrace rbrace. Indicate any problems in this grammar that prevent it from being parsed by a recursive-descent parser with one token lookahead. You can simply circle the offending parts of the grammar above. Transform the rules for and so they can be parsed by a recursive-descent parser with one token lookahead (you don"t need to transform the rules for ). I. e. , remove any left-recursion and left-factor the grammar.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents