dissect.cstruct 3.14.dev7__tar.gz → 3.14.dev8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dissect_cstruct-3.14.dev7/dissect.cstruct.egg-info → dissect_cstruct-3.14.dev8}/PKG-INFO +1 -1
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/expression.py +4 -4
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8/dissect.cstruct.egg-info}/PKG-INFO +1 -1
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_expression.py +1 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/COPYRIGHT +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/LICENSE +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/MANIFEST.in +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/README.md +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/__init__.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/bitbuffer.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/compiler.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/cstruct.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/exceptions.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/parser.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/__init__.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/base.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/bytesinteger.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/chartype.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/enum.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/flag.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/instance.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/leb128.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/packedtype.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/pointer.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/structure.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/voidtype.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/wchartype.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/utils.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect.cstruct.egg-info/SOURCES.txt +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect.cstruct.egg-info/dependency_links.txt +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect.cstruct.egg-info/top_level.txt +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/examples/disk.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/examples/mirai.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/examples/pe.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/examples/secdesc.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/pyproject.toml +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/setup.cfg +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/__init__.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/conftest.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/data/testdef.txt +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/docs/Makefile +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/docs/conf.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/docs/index.rst +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_align.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_basic.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_bitbuffer.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_bitfield.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_bytesinteger.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_ctypes_type.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_enum.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_flag.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_packedtype.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_parser.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_pointer.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_struct.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_types_leb128.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_union.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_util.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/test_utils.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tests/utils.py +0 -0
- {dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dissect.cstruct
|
|
3
|
-
Version: 3.14.
|
|
3
|
+
Version: 3.14.dev8
|
|
4
4
|
Summary: A Dissect module implementing a parser for C-like structures: structure parsing in Python made easy
|
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
|
6
6
|
License: Apache License 2.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import string
|
|
4
|
-
from typing import TYPE_CHECKING, Callable, Optional
|
|
4
|
+
from typing import TYPE_CHECKING, Callable, Optional
|
|
5
5
|
|
|
6
6
|
from dissect.cstruct.exceptions import ExpressionParserError, ExpressionTokenizerError
|
|
7
7
|
|
|
@@ -18,7 +18,7 @@ class ExpressionTokenizer:
|
|
|
18
18
|
self.pos = 0
|
|
19
19
|
self.tokens = []
|
|
20
20
|
|
|
21
|
-
def equal(self, token: str, expected:
|
|
21
|
+
def equal(self, token: str, expected: str | set[str]) -> bool:
|
|
22
22
|
if isinstance(expected, set):
|
|
23
23
|
return token in expected
|
|
24
24
|
else:
|
|
@@ -42,7 +42,7 @@ class ExpressionTokenizer:
|
|
|
42
42
|
def match(
|
|
43
43
|
self,
|
|
44
44
|
func: Optional[Callable[[str], bool]] = None,
|
|
45
|
-
expected: Optional[str] = None,
|
|
45
|
+
expected: Optional[str | set[str]] = None,
|
|
46
46
|
consume: bool = True,
|
|
47
47
|
append: bool = True,
|
|
48
48
|
) -> bool:
|
|
@@ -142,7 +142,7 @@ class ExpressionTokenizer:
|
|
|
142
142
|
self.tokens.append(">>")
|
|
143
143
|
elif self.match(expected="<", append=False) and self.match(expected="<", append=False):
|
|
144
144
|
self.tokens.append("<<")
|
|
145
|
-
elif self.match(expected=" ", append=False):
|
|
145
|
+
elif self.match(expected={" ", "\t"}, append=False):
|
|
146
146
|
continue
|
|
147
147
|
else:
|
|
148
148
|
raise ExpressionTokenizerError(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dissect.cstruct
|
|
3
|
-
Version: 3.14.
|
|
3
|
+
Version: 3.14.dev8
|
|
4
4
|
Summary: A Dissect module implementing a parser for C-like structures: structure parsing in Python made easy
|
|
5
5
|
Author-email: Dissect Team <dissect@fox-it.com>
|
|
6
6
|
License: Apache License 2.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect/cstruct/types/bytesinteger.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect.cstruct.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dissect_cstruct-3.14.dev7 → dissect_cstruct-3.14.dev8}/dissect.cstruct.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|