Computer Science 164 - Spring 1994 - Rowe - Midterm 2

Computer Science 164 - Spring 1994 - Rowe - Midterm 2 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS164 Midterm #2, Spring 1994 CS164 Midterm #2 Spring 1994 Prof. L. Rowe 1. (30 points; 2 points each) Circle T or F to indicate whether each statement is true or false. T F A sentential form may only contain terminal symbols T F The following grammar is a regular grammar: S -> A b | b A -> a | S A T F The language specified by the grammar in the previous question is { b (ab)* } union { (ab) + } T F There is no grammar and input sentence for which the leftmost and rightmost derivations are identical. T F The following flex pattern will match at least the input: 123.45 [^A-Za-z]+"."[^A-Za-z] T F A DFA may have less states than the number symbols in the input alphabet. T F A bottom-up parser can generate better error messages than a top- down parser. T F In panic mode error-recovery, the parser exits on the first error it encounters. T F The address of a variable can never be an rvalue. T F The language {a n b n c n } can be specified by a context free grammar. T F The following automaton will recognize sentences in the language { a* (b | c) d* } file:///C|/Documents%20and%20Settings/Jason%20Raft. ..-%20Spring%201994%20-%20Rowe%20-%20Midterm%202.htm (1 of 5)1/27/2007 5:34:25 PM
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/17/2009 for the course CS 164 taught by Professor Staff during the Spring '08 term at University of California, Berkeley.

Page1 / 5

Computer Science 164 - Spring 1994 - Rowe - Midterm 2 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online