Commit Graph

80 Commits

Author SHA1 Message Date
Shiz 3bc1fc37d4 context: allow peeking of values 2024-01-18 14:13:03 +01:00
Shiz df7a5e5a62 pass PosInfo to sizeof/offsetof, implement Align(ed)To.sizeof/offsetof() 2022-08-23 02:24:58 +02:00
Shiz a767c9cc7e core: add type inference for bytes/bytearray (have to fix later) 2022-08-22 22:18:48 +02:00
Shiz 7cfcab44e5 types/seq: fix default() 2022-08-22 18:05:19 +02:00
Shiz 6b5e028e52 types/struct: fix context when calculating default value 2022-08-22 18:04:50 +02:00
Shiz 721ae26f40 types/io: fix Sized if at end of file 2022-08-22 18:04:16 +02:00
Shiz 3452bc9d60 core: fix reset 2022-08-22 18:03:47 +02:00
Shiz 1304a56dcd io: add align= to Terminated Stream, fix UCS-2 cstr, fix small errors 2022-05-15 06:46:23 +02:00
Shiz 910be3c5ec io: add Tell() type 2022-05-10 15:25:44 +02:00
Shiz a3ff832f2b do not overwrite builtin Python types in __all__ 2022-05-10 13:41:04 +02:00
Shiz b737cb17b1 transformers: rename Transform to Proc, add Preproc 2022-05-10 13:41:04 +02:00
Shiz b8cdfaf5dd data: rename Static to Implied, add compatibility wrapper 2022-05-10 13:41:04 +02:00
Shiz 303aec0c87 data: add Pad type 2022-05-10 13:41:04 +02:00
Shiz 75f87f6143 core/str: expose terminator_required= argument in CStr 2022-05-10 13:41:04 +02:00
Shiz cb3509f794 core/util: fix Mapping moving around in stdlib `collections` 2022-05-10 13:41:04 +02:00
Shiz 3c0d46d7bb util: lol 2022-05-10 13:41:04 +02:00
Shiz ac8d019ad7 util: cut off long data by default 2022-05-10 13:41:04 +02:00
Shiz 6b972ac877 sx: fx some misc issues 2022-05-10 13:41:04 +02:00
Shiz eab765578e core/expr: do not accept lambas for _sx_get__ 2022-05-10 13:41:04 +02:00
Shiz d98f070b7d expose to_stream 2022-05-10 13:41:04 +02:00
Shiz e02b9fb855 data: communicate length back to parser 2022-05-10 13:41:04 +02:00
Shiz 74ea777c05 expr: error on bad operator usage, add bad operator alternative functions, implement item slicing correctly 2022-05-10 13:41:04 +02:00
Shiz 90ed8f1583 control: add more friendly error message to Switch 2022-05-10 13:41:04 +02:00
Shiz 2fdec1b697 io: fix Lazy __str__/__repr__ mixup 2022-05-10 13:41:04 +02:00
Shiz f1c82f7502 io: fix some Lazy stream issues 2022-05-10 13:41:04 +02:00
Shiz 9d2a1ffbf1 io: add Lazy type 2022-05-10 13:41:04 +02:00
Shiz f0ee7b315c build: add setup.py 2022-05-10 13:41:04 +02:00
Shiz 3df63b9bf5 data: fix `sizeof()` for Data 2022-05-10 13:41:04 +02:00
Shiz a2c7fb7d26 io: introduce `hard` parameter for Sized 2022-05-10 13:41:04 +02:00
Shiz 7255a990c7 struct: fix issue where generics instantiations would have a different module 2022-05-10 13:41:04 +02:00
Shiz 701953db2a union: fix dumping semantics 2022-05-10 13:41:04 +02:00
Shiz 0c653fc3c3 struct: fix up and expose union type 2022-05-10 13:41:04 +02:00
Shiz c3d98171f3 base: do not reuse Context for stream offset size calculation 2022-05-10 13:41:04 +02:00
Shiz 34b634ca22 types: fix various missing to_type() calls and misc errors 2022-05-10 13:41:04 +02:00
Shiz eb71a9176f core: properly pop from path if type fails 2022-05-10 13:41:04 +02:00
Shiz b75c4f47b0 io: add rudimentary Terminated type and rewrite str 2022-05-10 13:41:04 +02:00
Shiz acefb8ae82 examples: add simple RIFF parse example 2022-05-10 13:41:04 +02:00
Shiz 8bf9b77505 core: allow debug tracing of parse for visualisations 2021-07-04 23:40:46 +02:00
Shiz ea61dbf1e3 core: fully keep track of parse path 2021-07-04 23:35:17 +02:00
Shiz e71cacb8f7 num: add variable-width greedy int types 2021-07-04 23:34:04 +02:00
Shiz 4400209545 data,num: add convenience definitions 2021-07-01 13:29:21 +02:00
Shiz 18e8729cc2 sx: generate __all__ 2021-07-01 13:21:41 +02:00
Shiz c8a5231e85 fix `num` imports 2021-07-01 13:12:22 +02:00
Shiz b837384672 remove silly special nested EOF exception 2021-07-01 05:51:28 +02:00
Shiz 9699a6e611 bits: implement basic bit-level parsing and dumping 2021-07-01 05:50:05 +02:00
Shiz 3fd438c7c9 add various proper repr() implementations 2021-06-29 23:28:01 +02:00
Shiz 2294d992cf expr: use const-ness for put checking in CompExpr 2021-06-28 06:30:35 +02:00
Shiz 02f53b5096 data: add __str__ and __repr__ for Data 2021-06-28 06:25:59 +02:00
Shiz 49d77757fa io: move Ref and Sized from transforms 2021-06-28 06:20:56 +02:00
Shiz 11c556d7d6 expr: add const-ness attribute and const()/infer() markers 2021-06-28 05:37:51 +02:00