From 96e460d047cc199b27e2e35042a5789cce9d1e91 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Wed, 26 Sep 2018 19:02:43 +0300 Subject: add evil fspec file --- spec/evil.fspec | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 spec/evil.fspec diff --git a/spec/evil.fspec b/spec/evil.fspec new file mode 100644 index 0000000..68d4800 --- /dev/null +++ b/spec/evil.fspec @@ -0,0 +1,28 @@ +struct metadata { + u2 lel; + enum { + STR_TERMINATED, + STR_DELIMITED + } u1 type; + struct { + u8 smth; + } test; + u8 encoding[32][sizeof("foo")]; + u1 blaz[builtin(1, 2, "foo", 'bar')] | hellothere('foobar', 1, 2, "faa"); +}; + +struct utf8_string { + struct metadata metadata; + select (((metadata.type))) { + metadata.STR_TERMINATED) + struct { + u8 string['\0'] | encoding(metadata.encoding) str; + } terminated; + metadata.STR_DELIMITED) + struct { + u32 length; + u8 string[length] | encoding(metadata.encoding) str; + } delimited; + } data; + u1 foo[((((metadata.test.smth)))) + 5 + 2][4]; +}; -- cgit v1.2.3-70-g09d2