Question: 1. (10pt) Write a regular expression that represents each of the following two sets: (1) C strings, which are all strings that: - start and

1. (10pt) Write a regular expression that represents each of the following two sets: (1) C strings, which are all strings that: - start and end with double quotes: ". - do not contain double quotes unless escaped by a backslash: \". - do not contain newline (let's denote it ENTER) unless escaped by a backslash: ENTER (Note that ENTER is different from the two-character sequence " ". To introduce a new line in your code you hit the ENTER key, not the '\' key followed by the 'N' key.) (2) All identifiers in a language where: - identifiers consist of one or more letters, lower or upper case, - file, for, and from are reserved keywords. Use the format in the textbook, page 46. You can use the notation - to denote the set of characters different from a given set; e.g., -(a, b) denotes the set of all characters different from a and b; -0 denotes any character
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
