I'm not sure if this is considered a bug, but using the word "from" as an enum value causes invalid Python code when generating with the Kaitai compiler.
For example, running:
kaitai-struct-compiler --read-write --target python example.ksy
produces Python code that is not executable, because it includes a statement like:
which is invalid since "from" is a reserved keyword in Python.
Here is a minimal .ksy example that reproduces the issue:
meta:
id: my_test
endian: be
seq:
- id: test_field
type: b1
enum: to_from
enums:
to_from:
0: from
1: to
I'm using Kaitai Struct Compiler version 0.11.