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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:00, raizagisselle1273
If a client wants to make minor edits, what should he/she use?
Answers: 3
image
Computers and Technology, 23.06.2019 05:00, mariahchaparro08
Which best explains why a digital leader would join a society specializing in technology
Answers: 1
image
Computers and Technology, 23.06.2019 06:30, wwesuplexcity28
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, kodak0531
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
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 in other subjects: