Consider the following definition of a lexical token id for an identifier in a…

PYQ GATE 2023

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

        letter → [A-Za-z]

        digit → [0-9]

        id → letter (letter | digit)∗

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

Attempted by 259 students.

Sign up free to check your answer

Sign up free

Explore the full course: Theory Of Computation

Loading lesson…