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
resolves https://github.com/kaitai-io/kaitai_struct/issues/542 This is partially based on the JavaScript implementation, however with significant changes due to how TypeScript can make use of a lot more modern features, like actual classes...
Extend KSC to support the Julia programming language as a target language. This PR addresses the issue https://github.com/kaitai-io/kaitai_struct/issues/1109
This will allow to override this method and do not generate check in KST when performing checks for returned errors using `asserts[i].exception` key. This should be merged with this PR:...
This PR implements suggestion from https://github.com/kaitai-io/kaitai_struct/issues/778 which is also enforced by [enum_invalid.ksy](https://github.com/kaitai-io/kaitai_struct_tests/blob/0c32cbfb1f600fe6c4d7fe0b65d959d732164889/formats/enum_invalid.ksy) test. Related issues: - Runtime changes: https://github.com/kaitai-io/kaitai_struct_java_runtime/pull/42 - Tests changes: https://github.com/kaitai-io/kaitai_struct_tests/pull/125 - Tracking issue: https://github.com/kaitai-io/kaitai_struct/issues/778 - Closes https://github.com/kaitai-io/kaitai_struct/issues/583...
This is required for https://github.com/kaitai-io/kaitai_struct_tests/pull/111
This PR implements solution from [my comment](https://github.com/kaitai-io/kaitai_struct/issues/534#issuecomment-2059567168). Each top-level `ClassSpec` now have a list of other top-level `ClassSpec`s which is explicitly import it. When resolve types and enums now checked...
Octal escape sequences the least used form of escape sequences and hex supported almost everywhere. The only outsiders are [Java](https://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.6) (does not support `\xHH` form), [C++](https://en.cppreference.com/w/cpp/language/escape) (unlimited length, so have...
This is one possible way to fix tests. The problem lies in two planes: - expression translator can generate access to static methods of `KaitaiStream`, but tests does not import...
This PR includes #291, because Nim octal escapes will consume all possible digits, so string with escape sequence followed by digit will be treated incorrectly. Hex escape form does not...
## Do not merge yet, it is not finished. Not a draft because I want to run CI checks I noticed that `TranslatorSpec.scala` does not test some languages, which seems...