GATEverse Practice, past papers & mock tests
GATE 2018
Compiler DesignLexical AnalysishardMCQ2 marks
A lexical analyzer uses the following patterns to recognize three tokens T1, T2 and T3 over the alphabet {a, b, c}: T1: a? (b | c)* a T2: b? (a | c)* b T3: c? (b | a)* c Note that 'x?' means 0 or 1 occurrence of x. The analyzer outputs the token that matches the longest possible prefix. If the string bbaacabc is processed, which of the following is the sequence of tokens it outputs?
Save your progress

Related Compiler Design PYQs