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, 22.06.2019 21:00
The average cost of one year at a private college in 2012-2013 is $43,289. the average grant aid received by a student at a private college in 2012-2013 is $15,680.   what is the average student contribution for one year at a private college in 2012-2013?
Answers: 3
question
Computers and Technology, 23.06.2019 19:00
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u.s. 483 (1954). b. international shoe co. v. washington, 326 u.s. 310 (1945) c. haynes v. gore, 531 u.s. 98 (2000). d. international shoe co. v. washington, 14 u.s. code 336.
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
(, urgent need): how do i change my username
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
History, 18.12.2019 11:31
question
Computers and Technology, 18.12.2019 11:31
Questions on the website: 13722367