question archive Consider the following regular expressions: 1

Consider the following regular expressions: 1

Subject:Computer SciencePrice: Bought3

Consider the following regular expressions: 1. letter = w | x | y | z 2. LETTER = W | X | Y | Z

3. digit = 5 | 6 | 7 | 8

4. α = (digit∗ • letter • LETTER) ∗

5. ρ = letter • digit • LETTER

6. φ = (digit∗ | digit) • letter∗

7. ω = LETTER • digit • digit • LETTER∗

 

(10 points, 2 each) For each of the following fill in the blank with ∈ or ∈ (recall that L(R) for regular expression R is the language of R).

wZ55wZ ______ L(α)

W8z ___________ L(ρ)

www8 _________ L(φ)

W55ZWz _______ L(ω)

wW ________ L(α)

 

(20 points) If we call getToken() repeatedly on input 5W58WZw5WzW5zW until the end of input is reached, the sequence of tokens returned is the following (assume longest prefix matching is used and ties are broken in favor of tokens that appear first first in the list)

 

 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE