Question: Consider the following four regular expressions R_1 = (a + b) * C (a + b) * ca* R_2 = (a + b) *C (a

Consider the following four regular expressions R_1 = (a + b) * C (a + b) * ca* R_2 = (a + b) *C (a + b) * c (a + b) * R_3 = (a + b) * C (a + b) * c * (a + b) * R_4 = (a + b) * C * (a + b) * c(a + b) * R_5 = R_1 + R_2 Assuming we have a function getToken() that returns a token which consists of two fields: a token_type and a lexeme. Assume that calling getToken() when the end of input is reached returns a token whose token_type is EOF. Give an input for which two successive calls to getToken() returns two tokens whose token_types are R_1 and EOF respectively Given an input for which two successive calls to getToken() returns two tokens whose token_types are R_2 and EOF respectively Given an input for which two successive calls to getToken() returns two tokens whose token_types are R_3 and EOF respectively Given an input for which two successive calls to getToken() returns two tokens whose token_types are R_4 and EOF respectively Explain why there is no input for whi
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
