Re:Kaitai Struct: A new way to develop parsers for binary st...
by gabiruh on Thursday March 17, 2022 @08:19PM
(#30717307)
I like Perl's Data::ParseBinary (https://metacpan.org/pod/Data::ParseBinary)
[ Parent
| on HN ]
Re:Kaitai Struct: A new way to develop parsers for binary st...
by matheusmoreira on Thursday March 17, 2022 @08:35PM
(#30717407)
How does it handle length-prefixed data?
length u32
data u32[length]
This is a huge problem for traditional parsers since the input modifies the grammar dynamically.
Re:Kaitai Struct: A new way to develop parsers for binary st...
by boardwaalk on Thursday March 17, 2022 @08:45PM
(#30717466)
It’s right here: https://metacpan.org/pod/Data::ParseBinary#Meta-Primitives
Re:Kaitai Struct: A new way to develop parsers for binary st...
by matheusmoreira on Thursday March 17, 2022 @08:55PM
(#30717533)
I see, you can pass in a function that computes the length. I wonder if a declarative or formal solution will ever exist.