ml_switcheroo.compiler.frontends.sass.parser¶
SASS Parser Implementation.
This module provides the SassParser, a recursive descent parser that converts a stream of tokens (from SassLexer) into a Structural AST defined in nodes.py.
Classes¶
Base class for instruction operands (Registers, Immediates, etc.). |
|
Recursive descent parser for NVIDIA SASS. |
Module Contents¶
- class ml_switcheroo.compiler.frontends.sass.parser.LabelRef[source]¶
Bases:
ml_switcheroo.compiler.frontends.sass.nodes.OperandBase class for instruction operands (Registers, Immediates, etc.).
- name: str¶
- class ml_switcheroo.compiler.frontends.sass.parser.SassParser(code: str)[source]¶
Recursive descent parser for NVIDIA SASS.
- lexer¶
- tokens¶
- pos = 0¶
- parse() List[ml_switcheroo.compiler.frontends.sass.nodes.SassNode][source]¶
Parses the entire code block.
- Returns:
A list of AST nodes.
- Return type:
List[SassNode]