dissect.cstruct.parser
¶
Module Contents¶
Classes¶
Base class for definition parsers. |
|
Definition parser for C-like structure syntax. |
|
- class dissect.cstruct.parser.Parser(cs: dissect.cstruct.cstruct)¶
Base class for definition parsers.
- Parameters:
cs – An instance of cstruct.
- cstruct¶
- abstract parse(data: str) None ¶
This function should parse definitions to cstruct types.
- Parameters:
data – Data to parse definitions from, usually a string.
- class dissect.cstruct.parser.TokenParser(cs: dissect.cstruct.cstruct, compiled: bool = True, align: bool = False)¶
Bases:
Parser
- Parameters:
cs – An instance of cstruct.
compiled – Whether structs should be compiled or not.
- compiled¶
- align¶
- TOK¶
- parse(data: str) None ¶
This function should parse definitions to cstruct types.
- Parameters:
data – Data to parse definitions from, usually a string.
- class dissect.cstruct.parser.CStyleParser(cs: dissect.cstruct.cstruct, compiled: bool = True)¶
Bases:
Parser
Definition parser for C-like structure syntax.
- Parameters:
cs – An instance of cstruct
compiled – Whether structs should be compiled or not.
- compiled¶
- parse(data: str) None ¶
This function should parse definitions to cstruct types.
- Parameters:
data – Data to parse definitions from, usually a string.
- class dissect.cstruct.parser.Token(token: str, value: str, match: re.Match)¶
- __slots__ = ('token', 'value', 'match')¶
- token¶
- value¶
- match¶
- __eq__(other)¶
- __ne__(other)¶
- __repr__()¶