-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit test for compact input case
- Loading branch information
1 parent
8d9bf9f
commit de71aaf
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- testing avoiding state explosion | ||
|
||
def Main = | ||
First | ||
block $$ = $[0xFE]; $[0x01] | ||
$[ !0xFE ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Det010 | ||
|
||
--- Imports: | ||
|
||
--- Type defs: | ||
|
||
--- Rules: | ||
|
||
Det010.Main : Grammar (uint 8) = | ||
Choose biased | ||
{ do ($$ : uint 8) <- Match {0xFE} | ||
@Match {0x01} | ||
pure $$ | ||
| Match (!{0xFE}) | ||
} | ||
|
||
Det010.Main_ : Grammar {} = | ||
Choose biased | ||
{ do @Match {0xFE} | ||
@Match {0x01} | ||
| @Match (!{0xFE}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dump | ||
Det010.ddl | ||
--core | ||
--determinize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module DaedalusMain where | ||
|
||
|
||
------------- | ||
|
||
-- entry pont | ||
-- ./Det010.ddl:3:1--6:14 | ||
proc Main() : Word 8 = | ||
-- ./Det010.ddl:4:3--6:14 | ||
-- DETERMINIZE 1 Fully | ||
do _x0 <- match1 { ... } | ||
case _x0 of | ||
254 -> | ||
-- ./Det010.ddl:5:11--5:12 | ||
-- ./Det010.ddl:5:16--5:22 | ||
do let $$ = 254 @(Word 8) | ||
-- ./Det010.ddl:5:25--5:12 | ||
-- ./Det010.ddl:5:25--5:31 | ||
match1_ { 1 @(Word 8) } | ||
-- ./Det010.ddl:5:11--5:12 | ||
pure $$ | ||
_ -> | ||
-- ./Det010.ddl:6:5--6:14 | ||
pure _x0 |