lfn
serial
ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
Last change
on this file since c3437d9 was c3437d9, checked in by Sean Bartell <wingedtachikoma@…>, 13 years ago |
Bithenge: add do{}while() transforms
|
-
Property mode
set to
100644
|
File size:
524 bytes
|
Rev | Line | |
---|
[e3f2765] | 1 | transform with_count = struct {
|
---|
[0caaaa00] | 2 | .none <- repeat(0) { uint8 };
|
---|
| 3 | .one <- repeat(1) { uint8 };
|
---|
| 4 | .count <- uint8;
|
---|
| 5 | .many <- repeat(.count) { uint8 };
|
---|
| 6 | };
|
---|
[e3f2765] | 7 |
|
---|
| 8 | transform without_count = struct {
|
---|
[c3437d9] | 9 | .until_error <- repeat { uint8 <- zero_terminated };
|
---|
| 10 | .until_end <- repeat { uint8 };
|
---|
[e3f2765] | 11 | };
|
---|
| 12 |
|
---|
[c3437d9] | 13 | transform do_while = do {
|
---|
| 14 | struct {
|
---|
| 15 | .valid <- nonzero_boolean <- uint8;
|
---|
| 16 | .val <- uint8;
|
---|
| 17 | }
|
---|
| 18 | } while (.valid);
|
---|
| 19 |
|
---|
[e3f2765] | 20 | transform main = struct {
|
---|
| 21 | .with_count <- with_count;
|
---|
[c3437d9] | 22 | .without_count <- without_count <- known_length(9);
|
---|
| 23 | .do_while <- do_while;
|
---|
[e3f2765] | 24 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.