cmps104a-2004q4-exam1

cmps104a-2004q4-exam1 - CMPS-104A Compiler Design I 2004...

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

View Full Document Right Arrow Icon
CMPS-104A • Compiler Design I • 2004 fall • Test #1 page 1 of 3 $Id: cmps104a-2004q4-exam1.mm,v 348.57 2004-10-22 18:36:19-07 - - $ page 1 page 2 page 3 Please PRINT using keyboard letters : Name : Login : @ucsc.edu Total / 30 Closed book. No notes. No computer .Answer ONLYinthe spaces provided. Neatness counts ! Do your scratch work elsewhere and only enter your final answer into the spaces provided. 1. Write flex regexesfor each of the following : [5 ] i. A string which consists of a starting and ending apostrophe ( )and contains anynumber of characters in between as long as theyare neither apostrophes nor newlines. However, anapostrophe can occur within the string if it is doubled (e.g., ’don’’t’ is a valid string). ii. A floating point number consisting of one or more digits and a dot. There must be at least one digit in front of an at least one after the dot. An optional exponent may be present :i tconsists of a capital E followed by an optional sign and one or more digits. iii. A comment consisting of a hash ( #
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 09/28/2010 for the course CMPS 104A taught by Professor Mackey during the Spring '08 term at UCSC.

Page1 / 3

cmps104a-2004q4-exam1 - CMPS-104A Compiler Design I 2004...

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