GATEverse
← GATE CSE 2023

Q9

MCQ1 mark, −0.33

Consider the following definition of a lexical token id\textbf{id} for an identifier in a programming language, using extended regular expressions:

 letter →[A−Za−z] digit →[0−9] id → letter ( letter ∣ digit )∗\begin{array}{ll} \textbf{ letter } & \rightarrow[\mathrm{A}-\mathrm{Za}-\mathrm{z}] \\ \textbf{ digit } & \rightarrow[0-9] \\ \textbf{ id } & \rightarrow \textbf{ letter }(\textbf{ letter } \mid \textbf{ digit })^{*} \end{array}

Which one of the following Non-deterministic Finite-state Automata with ϵ\epsilon-transitions accepts the set of valid identifiers? (A double-circle denotes a final state)

Sign in to save attempts.

Loading…