CS 143 Study Guide - Midterm Guide: Lr Parser, Parse Tree, Terminal And Nonterminal Symbols

27 views7 pages

Document Summary

Spring 2014: please read all instructions (including these) carefully, there are 5 questions on the exam, most with multiple parts. You have 75 minutes to work on the exam: the exam is open note, please write your answers in the space provided on the exam, and clearly mark your solutions. You may use the backs of the exam pages as scratch paper. Please do not use any additional scratch paper: solutions will be graded on correctness and clarity. Each problem has a relatively simple and straightforward solution. You may get as few as 0 points for a question if your solution is far more complicated than necessary. Partial solutions will be graded for partial credit. In accordance with both the letter and spirit of the honor code, i have neither given nor received assistance on this examination. { print 2 } a*ca* { print 3 } Given the following input string what does the lexer print? abcaacacaaabbaaabcaaca.