This module implements the lexer for OpenQASM 3.0, which transforms source code
into a stream of tokens. The lexer handles the significantly expanded syntax of
OpenQASM 3.0, including classical programming constructs, control flow, and
advanced quantum features.
Key features of the OpenQASM 3.0 lexer:
Extended token set: Classical types, control flow, functions
OpenQASM 3.0 Lexical Analyzer
This module implements the lexer for OpenQASM 3.0, which transforms source code into a stream of tokens. The lexer handles the significantly expanded syntax of OpenQASM 3.0, including classical programming constructs, control flow, and advanced quantum features.
Key features of the OpenQASM 3.0 lexer:
The lexer performs several validation passes:
Example: Basic lexing process