source: mainline/uspace/dist/src/bithenge/test-repeat.bh@ c3437d9

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
Line 
1transform with_count = struct {
2 .none <- repeat(0) { uint8 };
3 .one <- repeat(1) { uint8 };
4 .count <- uint8;
5 .many <- repeat(.count) { uint8 };
6};
7
8transform without_count = struct {
9 .until_error <- repeat { uint8 <- zero_terminated };
10 .until_end <- repeat { uint8 };
11};
12
13transform do_while = do {
14 struct {
15 .valid <- nonzero_boolean <- uint8;
16 .val <- uint8;
17 }
18} while (.valid);
19
20transform main = struct {
21 .with_count <- with_count;
22 .without_count <- without_count <- known_length(9);
23 .do_while <- do_while;
24};
Note: See TracBrowser for help on using the repository browser.