ml_switcheroo.compiler.frontends.rdna.tokens¶
RDNA Tokenizer Definition.
Provides a Regex-based Lexer (RdnaLexer) that decomposes raw AMD RDNA assembly strings into a stream of typed Token objects. It handles specific assembly constructs like Registers (s0, v[0:3]), Immediates (0xFF), Directives (.text), and Modifiers (glc).
Classes¶
Enumeration of valid RDNA token types. |
|
Represents a lexical unit. |
|
Regex-based Lexer for AMD RDNA / GCN assembly. |
Module Contents¶
- class ml_switcheroo.compiler.frontends.rdna.tokens.TokenType(*args, **kwds)[source]¶
Bases:
enum.EnumEnumeration of valid RDNA token types.
- LABEL_DEF¶
- DIRECTIVE¶
- COMMENT¶
- COMMA¶
- RBRACKET¶
- LBRACKET¶
- COLON¶
- SGPR¶
- VGPR¶
- SPECIAL_REG¶
- IMMEDIATE¶
- MODIFIER¶
- IDENTIFIER¶
- class ml_switcheroo.compiler.frontends.rdna.tokens.Token[source]¶
Represents a lexical unit.
- value¶
The raw string value.
- Type:
str
- line¶
Line number in source (1-based).
- Type:
int
- column¶
Column number in source (1-based).
- Type:
int
- value: str¶
- line: int¶
- column: int¶