Petr Pučil
Petr Pučil
Another interesting behavior occurs on [`filesystem/apm_partition_table.ksy`](https://github.com/kaitai-io/kaitai_struct_formats/blob/ce88979ea1d5d54150dfe14785b6d5f2cc754c0a/filesystem/apm_partition_table.ksy): ```console pp@DESKTOP-89OPGF3 MINGW64 /c/temp/kaitai_struct/formats (master) $ kaitai-struct-compiler -- -I . -t python --verbose file filesystem/apm_partition_table.ksy parsing filesystem/apm_partition_table.ksy... reading filesystem/apm_partition_table.ksy... ... compiling it for python......
@Mingun Maybe if you actually read the comment inside the `asLong` method implementation, you would understand what is the only reason it uses `Utils.strToLong` and you wouldn't have to open...
> I don't understand what JavaScript has to do with it. Isn't SnakeYAML used for parsing? SnakeYAML is a Java library, so it only runs on the JVM platform. Theferore,...
> The probability is higher that you think: > https://github.com/kaitai-io/kaitai_struct_formats/blob/e533644618670a3b94be687253b0bf11a051640c/scientific/nt_mdt/nt_mdt.ksy#L650-L664 Of course it had to be @KOLANICH, who else :) But it's 7 years ago to be fair.
> Probably modern YAML parsing library already uses it for storing mappings? I know https://github.com/eemeli/yaml offers to read into a `Map`, but not by default. https://github.com/nodeca/js-yaml is in my opinion...
To be honest, I don't see much value in these elaborate tables. In summary, type checking: * works in "`.instances..if` (parse instance)" (as demonstrated by [`formats_err/expr_field_unknown_if_inst_pos.ksy`](https://github.com/kaitai-io/kaitai_struct_tests/blob/0427d48a0da213241f75f7029cd08217d0e1c7ef/formats_err/expr_field_unknown_if_inst_pos.ksy), which I recently added)...
Or let's clearly indicate that this issue only reports missing type checks on `if` in value instances so that it can be closed once the [`expr_field_unknown_if_inst_value`](https://github.com/kaitai-io/kaitai_struct_tests/blob/0427d48a0da213241f75f7029cd08217d0e1c7ef/formats_err/expr_field_unknown_if_inst_value.ksy) test passes.
> Yes, the intention was just about this missing check. Those tables just an extract from my work-in-progress of documenting If you want to report one bug, open a simple...
@Mingun: > Actually, `if` in _value_ instances should be prohibited. No, it shouldn't. This sounds like you don't have much experience writing or perhaps also reading .ksy files (I recommend...
@pombredanne: > Rust would be awesome! There is already quite decent support for Rust on unreleased `master` branches, as explained at https://app.gitter.im/#/room/!gxFYJoZuKcRouBfhlb:gitter.im/$U2qXwDnOd6HKOMzdHpcXehPmfg95pxgP4VA2D0CTtMk. So if you don't mind building the Kaitai...