Skip to main content

Module parser

Module parser 

Source
Expand description

Intel-syntax parser producing IR statements. Multi-architecture assembly parser.

Converts a stream of Tokens from the lexer into a Statement list. Handles instructions, labels, directives, memory operands, size hints, and prefixes. Architecture-aware register parsing resolves naming conflicts (e.g. r8 is x86-64 R8 vs ARM R8) based on the target Arch.

Functions§

parse
Parse a token stream into a list of IR statements.
parse_register
Parse a register name — case-insensitive, zero heap allocations.
parse_str
Convenience: parse assembly text directly into statements.
parse_with_arch
Parse with explicit architecture for register-name disambiguation.
parse_with_syntax
Parse with explicit architecture and syntax dialect.