GATE Computer Science (CS) 2018 Shift 1 Solved Paper
© examsiri.com
Question : 51 of 65
Marks:
+1,
-0
A lexical analyzer uses the following patterns to recognize three tokens and over the alphabet
T_{1}: a ?(b ∣ c)* a
T_{2}: b ?(a ∣ c)* b
T_{3}: c ?(b ∣ a)* c
Note that 'X?' means 0 or 1 occurrence of the symbol . Note also that the analyzer outputs the token that matches the longest possible prefix.
If the string bbaacabc is processed by the analyzer, which one of the following is the sequence of tokens it outputs?
T_{1}: a ?(b ∣ c)* a
T_{2}: b ?(a ∣ c)* b
T_{3}: c ?(b ∣ a)* c
Note that 'X?' means 0 or 1 occurrence of the symbol . Note also that the analyzer outputs the token that matches the longest possible prefix.
If the string bbaacabc is processed by the analyzer, which one of the following is the sequence of tokens it outputs?
Go to Question: