kaitai_struct_compiler
kaitai_struct_compiler copied to clipboard
Kaitai Struct: compiler to translate .ksy => .cpp / .cs / .dot / .go / .java / .js / .lua / .nim / .php / .pm / .py / .rb
When using 32bit Golang, the standard `int` type only holds 32 bits. This is a problem when the enum keys are larger than `Int.MaxValue`. This fix should solve the problem...
This change should fix #599 and #922 I ran the tests and no additional tests failed. Also, this fixes the output of macho.ksy which otherwise fails to compile. I haven't...
[Construct does not support using conditionals in `this` expressions](https://construct.readthedocs.io/en/latest/meta.html?highlight=lambda#known-deficiencies). Currently, the compiler outputs ternary expressions like this: `((this.len + 1) if this.len > 0 else 0)`. That expression does not...
New interface `PositionInfo` introduced to allow to get position information without reflective access in generic way. Closes https://github.com/kaitai-io/kaitai_struct_java_runtime/issues/27 Store offset of streams from begin of root stream in `offset` field....
This PR populates the `name` and `docs` attribute for top-level Construct Structs, and the `docs` attribute for fields. Since Construct is Python-based, I've pulled the now-common logic for Python out...
This causes imports to be generated for the Construct target. This **does not** deal with https://github.com/kaitai-io/kaitai_struct/issues/703, but it does make Construct behave the same as Python (for imports, anyway). Given...
Add comment to the top of Construct source files explaining to edit the ksy and recompile. Other targets already have this, so Construct should too. Sample output with this change:...
This change fixes https://github.com/kaitai-io/kaitai_struct_tests/blob/master/formats/expr_ops_parens.ksy test for Java and, I'm sure, for all other targets
# Defines/Standardizes the Behavior of a Repetition `_index` within a `repeat-until` Expression NOTE: This PR standardizes the previously-undefined behavior of `_index` within `repeat_until`. Fixes [issue #958](https://github.com/kaitai-io/kaitai_struct/issues/958). Because this standardizes something...
I need to access `typeProvider` property of LanguageCompiler from trait GenericChecks, so I made it public with `val`. I reuse ConsistencyError for throwing if the last element of array doesn't...