Re:Wssdl – WireShark-Specific Dissector Language
by Snaipe on Monday October 31, 2016 @09:31AM
(#12836505)
This is because wssdl is still within the boundaries of the lua grammar: the file you provide is still lua, so you have to abide by its rule.
I experimented with a key/value approach on the syntax itself (something like `{ src_port = u16 }` or `{ src_port = 16 }`), which was nicer, but the problem was that, in lua, table literals are unordered. The current approach uses the method syntax (`a:b()`) as a nice workaround, but this mandates the use of parenthesis after the type and other specifiers. This is fine though since a lot of the provided types are parameterized (e.g. `bytes(n)` which takes a number of octets)
It's considerably more flexible, much more elegant, and (in Erlang) battle-tested.
I wrote an Erlang-inspired version of bitstrings for OCaml: https://people.redhat.com/~rjones/bitstring/html/Bitstring.h...