Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1 [10pt] a) (5pt) Build a regular expression that captures all non-empty sequences of letters other than the string cse. For your convenience, you
Problem 1 [10pt] a) (5pt) Build a regular expression that captures all non-empty sequences of letters other than the string "cse". For your convenience, you may use a ! operator for this problem. The operator! takes a set of letters as argument and matches any other letter. For instance, !(abc) matches any letter other than a, b and c. Use to match any letter. b) (5pt) Create a regular expression for the language consisting of declarations (in a single line) of variables of type int in C. Multiple variables can be declared in a single declaration, separated by commas, and each can have an optional initial value (given by a constant). A declaration is terminated by a semi-colon. For example, the following two lines are both valid declarations: int x-3 int x,y-5, z; For your convenience, use symbols ID and N for identifiers and integers respectively in your RE. More- over, assume there is no space in the definition except the one after int. Use s for the space character
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started