subject
Computers and Technology, 29.07.2019 16:10 Hfruit

Consider the following regular expressions (i am omitting the dot operator) r0 = 0+1+2+3+4 r1 = 0+1+2+3+4+5 r2 = (0+1)(0*+1*) r3 = (0*+1*) r1 (0+1) r4 = 00 r3*(0+1)* r5 = r3* 000 r2* let gettoken() be a function that returns the next token in the input. if we call it repeatedly it will return one token after another. when all the input is consumed, gettoken() returns eof (end of file). assume that longest prefix-matching rule is used by assume that ties are broken in favor of the regular expression listed first in the list. 1. give an example of input for which gettoken() returns r0 2. give an example of input for which gettoken() returns r1 3. give an example of input for which gettoken() returns r2 4. give an example of input for which gettoken() returns r3 5. give an example of input for which gettoken() returns r4 6. give an example of input for which gettoken() returns r5 7. if gettoken() is called repeatedly on the following input, what is the sequence of tokens returned? in your work, show step by step the matched, the potential matched, and the maximal matched tokens. 00031010030030111001 for questions 1-6 you should explain your answers

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
Read the following scenario, and then answer the question below. you want to send an e-mail to your boss requesting a meeting to discuss a raise. what is the best example of an e-mail to an employer about this meeting? “hey jason. can we chat about getting me more money soon? let me know. peace, meg.” “hello jason. pardon me for sending yet another e-mail today about my need to talk to you about my position and a possible pay increase. i am dying to know when you can talk. sincerely, meg.” “hello jason. i have been with the company for one year and have taken on more responsibilities than outlined in my job description. i would appreciate an opportunity to speak with you about my position. let me know when we can schedule a meeting. you, meg.” “greetings jason! i hope this e-mail finds you well and happy today. i really, really want to talk to you about something important. i am not sure if you have time. i hope you do. get back in touch with me and let me know when we might talk. ever so much for taking the time to read this. sincerely, meg.”
Answers: 3
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior to sending the first ping request
Answers: 1
You know the right answer?
Consider the following regular expressions (i am omitting the dot operator) r0 = 0+1+2+3+4 r1 = 0+1+...
Questions
question
Mathematics, 02.06.2021 23:00
question
Health, 02.06.2021 23:00
question
Mathematics, 02.06.2021 23:00
Questions on the website: 13722360