Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

first task as a scanner designer is to turn each token into a regular expression. First, describe what you want to write as RE in

first task as a scanner designer is to turn each token into a regular expression.
First, describe what you want to write as RE in English. Then, give the RE for it.
e.g.{a^n b^m | n >=0 and m >=1}
English: 0 or more a's followed by 1 or more b's; shortest is b
RE: a^* b^+
Alphabet is {a,b} for all of the following. OK to use e for empty strings.
A){a^2n b^2m+1| n >=0 ; m >=0}
Describe the language completely in English without using n or m: *??*
RE for it: *??*
B){w | w has at least one pair of consecutive a's } only as and bs allowed in w
Describe the language completely in English, noting the shortest string: *??*
RE for it: *??*

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions