Question: Scheme Code: Write a pattern matcher that will use the following special characters and pattern matching techniques. The code should produce the output displayed below.

Scheme Code: Write a pattern matcher that will use the following special characters and pattern matching techniques. The code should produce the output displayed below.

the exact word:

(match? (please) (please))

true

(match? (please) (pretty please))

false

! exactly one word:

(match? (! ! me) (please please me))

true

(match? (! ! me) (please me))

false

? at most one word:

(match? (? me) (please please me))

false

(match? (? ? me) (please me))

true

* any number of words:

(match? (* me) (please please me))

true

(match? (*) (please me))

true

(match? (* me *) (please please me))

true

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!