Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2018
Questions

Q37

MCQ2 marks, −0.67Compiler designMedium

A lexical analyzer uses the following patterns to recognize three tokens T1,T2T_1, T_2, and T3T_3 over the alphabet {a,b,c}\{a, b, c\}. T1:a?(b∣c)∗aT_1: a?(b \mid c)^\ast a T2:b?(a∣c)∗bT_2: b?(a \mid c)^\ast b T3:c?(b∣a)∗cT_3: c?(b \mid a)^\ast c Note that ‘x?x?’ means 00 or 11 occurrence of the symbol x.x. Note also that the analyzer outputs the token that matches the longest possible prefix. If the string bbaacabcbbaacabc is processed by the analyzer, which one of the following is the sequence of tokens it outputs?

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.