reprospect.test.sass.instruction.register module

class reprospect.test.sass.instruction.register.RegisterView on GitHub

Bases: object

Register patterns.

PRED: Final[str] = 'P[0-9]+'

Match a predicate register.

PREDT: Final[str] = 'P(?:T|\\d+)'

Match a predicate register or PT.

REG: Final[str] = 'R[0-9]+'

Match a general purpose register.

REGZ: Final[str] = 'R(?:Z|\\d+)'

Match a general purpose register or RZ.

UPRED: Final[str] = 'UP[0-9]+'

Match a uniform predicate register.

UPREDT: Final[str] = 'UP(?:T|\\d+)'

Match a uniform predicate register or UPT.

UREG: Final[str] = 'UR[0-9]+'

Match a uniform general purpose register.

UREGZ: Final[str] = 'UR(?:Z|\\d+)'

Match a uniform general purpose register or URZ.

classmethod dst(*, captured: bool = True) strView on GitHub
classmethod mod(reg: str, *, reuse: bool | None = None, captured: bool = True) strView on GitHub

Wrap a register pattern with a reuse modifier.

classmethod pred() strView on GitHub
classmethod predt() strView on GitHub
classmethod reg() strView on GitHub
classmethod regz() strView on GitHub
classmethod upred() strView on GitHub
classmethod upredt() strView on GitHub
classmethod ureg() strView on GitHub
classmethod uregz() strView on GitHub
class reprospect.test.sass.instruction.register.RegisterMatch(rtype: RegisterType, index: int = -1, reuse: bool = False, math: MathModifier | None = None)View on GitHub

Bases: object

If index is set to a negative value, it is a special register (e.g. RZ if rtype is reprospect.tools.sass.decode.RegisterType.GPR).

__init__(rtype: RegisterType, index: int = -1, reuse: bool = False, math: MathModifier | None = None) None
index: int
math: MathModifier | None
classmethod parse(bits: Match[str]) RegisterMatchView on GitHub
reuse: bool
rtype: RegisterType
class reprospect.test.sass.instruction.register.RegisterMatcher(*, rtype: RegisterType | None = None, special: bool | None = None, index: int | None = None, reuse: bool | None = None, math: MathModifier | bool | None = None)View on GitHub

Bases: object

Matcher for a register.

__init__(*, rtype: RegisterType | None = None, special: bool | None = None, index: int | None = None, reuse: bool | None = None, math: MathModifier | bool | None = None) None

Method generated by attrs for class RegisterMatcher.

classmethod build_pattern(*, rtype: RegisterType | None = None, special: bool | None = None, index: int | None = None, reuse: bool | None = None, math: MathModifier | bool | None = None, captured: bool = True, capture_math: bool = False, capture_reg: bool = False, capture_reuse: bool = False) strView on GitHub
classmethod build_pattern_modifier_math(*, math: MathModifier | bool | None = None, captured: bool = True) str | NoneView on GitHub
classmethod build_pattern_modifier_reuse(*, reuse: bool | None = None, captured: bool = True) str | NoneView on GitHub
classmethod build_pattern_reg(*, rtype: RegisterType | None = None, special: bool | None = None, index: int | None = None, captured: bool = True) strView on GitHub
index: int | None
match(reg: str) RegisterMatch | NoneView on GitHub
math: MathModifier | bool | None
pattern: Pattern[str]
reuse: bool | None
rtype: RegisterType | None
special: bool | None