hw5 - COP4020 Spring 2011 Homework Assignment 5 1 Errors in...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: COP4020 Spring 2011 Homework Assignment 5 1. Errors in a computer program can be classified according to when they are detected and, if they are detected at compile time, what part of the compiler detects them. Assuming we use C, give an example of each of the following. a) A lexical error, detected by the scanner (hint: the scanner accepts only ASCII characters that are legal to use in C) b) A syntax error, detected by the parser c) A static semantic error, detected by semantic analysis d) A dynamic semantic error, detected by the code generated by the compiler e) An error that the compiler can neither catch nor easily generate code to catch (this could be a violation of the language definition, not just a program bug). 2. Convert the regular expression letter ( letter | digit )* to an NFA using the NFA equivalents (base case, concatenation, alternation, Kleene closure) of the regular expression operations as can be found on page 55 and 56 in the textbook....
View Full Document

This note was uploaded on 11/13/2011 for the course COP 4020 taught by Professor Engelen during the Spring '11 term at FSU.

Page1 / 2

hw5 - COP4020 Spring 2011 Homework Assignment 5 1 Errors in...

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