diff options
Diffstat (limited to 'util/lexgen/tests/testdata')
33 files changed, 79 insertions, 0 deletions
diff --git a/util/lexgen/tests/testdata/backtrack1/input b/util/lexgen/tests/testdata/backtrack1/input new file mode 100644 index 0000000..f5099b5 --- /dev/null +++ b/util/lexgen/tests/testdata/backtrack1/input @@ -0,0 +1 @@ +LETX diff --git a/util/lexgen/tests/testdata/backtrack1/output b/util/lexgen/tests/testdata/backtrack1/output new file mode 100644 index 0000000..6893deb --- /dev/null +++ b/util/lexgen/tests/testdata/backtrack1/output @@ -0,0 +1 @@ +TOK_LET|LET diff --git a/util/lexgen/tests/testdata/backtrack1/rules.lexgen b/util/lexgen/tests/testdata/backtrack1/rules.lexgen new file mode 100644 index 0000000..ade8a15 --- /dev/null +++ b/util/lexgen/tests/testdata/backtrack1/rules.lexgen @@ -0,0 +1,3 @@ +[Tokens] +TOK_LET = LET +TOK_LETXX = LETXX diff --git a/util/lexgen/tests/testdata/backtrack2/input b/util/lexgen/tests/testdata/backtrack2/input new file mode 100644 index 0000000..59ff5b7 --- /dev/null +++ b/util/lexgen/tests/testdata/backtrack2/input @@ -0,0 +1 @@ +LETXTRA diff --git a/util/lexgen/tests/testdata/backtrack2/output b/util/lexgen/tests/testdata/backtrack2/output new file mode 100644 index 0000000..348b382 --- /dev/null +++ b/util/lexgen/tests/testdata/backtrack2/output @@ -0,0 +1,2 @@ +TOK_LET|LET +TOK_XTRA|XTRA diff --git a/util/lexgen/tests/testdata/backtrack2/rules.lexgen b/util/lexgen/tests/testdata/backtrack2/rules.lexgen new file mode 100644 index 0000000..6f16986 --- /dev/null +++ b/util/lexgen/tests/testdata/backtrack2/rules.lexgen @@ -0,0 +1,4 @@ +[Tokens] +TOK_LET = LET +TOK_LETXX = LETXX +TOK_XTRA = XTRA diff --git a/util/lexgen/tests/testdata/casesensitivity/input b/util/lexgen/tests/testdata/casesensitivity/input new file mode 100644 index 0000000..72b7f48 --- /dev/null +++ b/util/lexgen/tests/testdata/casesensitivity/input @@ -0,0 +1 @@ +abcdAbcDABCDeFgEFGefgEfghiHIHihI diff --git a/util/lexgen/tests/testdata/casesensitivity/output b/util/lexgen/tests/testdata/casesensitivity/output new file mode 100644 index 0000000..3a4e819 --- /dev/null +++ b/util/lexgen/tests/testdata/casesensitivity/output @@ -0,0 +1,14 @@ +TOK_AB|ab +TOK_CD|cd +TOK_AB|Ab +TOK_CD|cD +TOK_AB|AB +TOK_CD|CD +TOK_EFG|eFg +TOK_EFG|EFG +TOK_EFG|efg +TOK_EFG|Efg +TOK_HI|hi +TOK_HI|HI +TOK_HI|Hi +TOK_HI|hI diff --git a/util/lexgen/tests/testdata/casesensitivity/rules.lexgen b/util/lexgen/tests/testdata/casesensitivity/rules.lexgen new file mode 100644 index 0000000..3347587 --- /dev/null +++ b/util/lexgen/tests/testdata/casesensitivity/rules.lexgen @@ -0,0 +1,7 @@ +[Options] +case-insensitive +[Tokens] +TOK_AB = ab +TOK_CD = cd +TOK_EFG = [e-g]{3} +TOK_HI = [hi]{2} diff --git a/util/lexgen/tests/testdata/comments/input b/util/lexgen/tests/testdata/comments/input new file mode 100644 index 0000000..03873e0 --- /dev/null +++ b/util/lexgen/tests/testdata/comments/input @@ -0,0 +1 @@ +/* comment with stuff *//*another comment with * stars * inside*/ diff --git a/util/lexgen/tests/testdata/comments/output b/util/lexgen/tests/testdata/comments/output new file mode 100644 index 0000000..2395ad1 --- /dev/null +++ b/util/lexgen/tests/testdata/comments/output @@ -0,0 +1,2 @@ +TOK_COMMENT|/* comment with stuff */ +TOK_COMMENT|/*another comment with * stars * inside*/ diff --git a/util/lexgen/tests/testdata/comments/rules.lexgen b/util/lexgen/tests/testdata/comments/rules.lexgen new file mode 100644 index 0000000..490c759 --- /dev/null +++ b/util/lexgen/tests/testdata/comments/rules.lexgen @@ -0,0 +1,2 @@ +[Tokens] +TOK_COMMENT = \/\*[^*]*\*+([^/*][^*]*\*+)*\/ diff --git a/util/lexgen/tests/testdata/dot/input b/util/lexgen/tests/testdata/dot/input new file mode 100644 index 0000000..e5b0ad6 --- /dev/null +++ b/util/lexgen/tests/testdata/dot/input @@ -0,0 +1 @@ +afbcxd diff --git a/util/lexgen/tests/testdata/dot/output b/util/lexgen/tests/testdata/dot/output new file mode 100644 index 0000000..6a9afd4 --- /dev/null +++ b/util/lexgen/tests/testdata/dot/output @@ -0,0 +1,2 @@ +TOK_AB|afb +TOK_CD|cxd diff --git a/util/lexgen/tests/testdata/dot/rules.lexgen b/util/lexgen/tests/testdata/dot/rules.lexgen new file mode 100644 index 0000000..03873a7 --- /dev/null +++ b/util/lexgen/tests/testdata/dot/rules.lexgen @@ -0,0 +1,3 @@ +[Tokens] +TOK_AB = a.b +TOK_CD = c.d diff --git a/util/lexgen/tests/testdata/negation/input b/util/lexgen/tests/testdata/negation/input new file mode 100644 index 0000000..9447b80 --- /dev/null +++ b/util/lexgen/tests/testdata/negation/input @@ -0,0 +1 @@ +aycabd diff --git a/util/lexgen/tests/testdata/negation/output b/util/lexgen/tests/testdata/negation/output new file mode 100644 index 0000000..0b73263 --- /dev/null +++ b/util/lexgen/tests/testdata/negation/output @@ -0,0 +1,2 @@ +TOK_A|ayc +TOK_B|abd diff --git a/util/lexgen/tests/testdata/negation/rules.lexgen b/util/lexgen/tests/testdata/negation/rules.lexgen new file mode 100644 index 0000000..179810b --- /dev/null +++ b/util/lexgen/tests/testdata/negation/rules.lexgen @@ -0,0 +1,3 @@ +[Tokens] +TOK_A = a[^b]c +TOK_B = abd diff --git a/util/lexgen/tests/testdata/quoteinset/input b/util/lexgen/tests/testdata/quoteinset/input new file mode 100644 index 0000000..5a9b680 --- /dev/null +++ b/util/lexgen/tests/testdata/quoteinset/input @@ -0,0 +1 @@ +"a diff --git a/util/lexgen/tests/testdata/quoteinset/output b/util/lexgen/tests/testdata/quoteinset/output new file mode 100644 index 0000000..7ba8890 --- /dev/null +++ b/util/lexgen/tests/testdata/quoteinset/output @@ -0,0 +1 @@ +TOK_QUOTEA|"a diff --git a/util/lexgen/tests/testdata/quoteinset/rules.lexgen b/util/lexgen/tests/testdata/quoteinset/rules.lexgen new file mode 100644 index 0000000..9838276 --- /dev/null +++ b/util/lexgen/tests/testdata/quoteinset/rules.lexgen @@ -0,0 +1,2 @@ +[Tokens] +TOK_QUOTEA = ["]a diff --git a/util/lexgen/tests/testdata/quotes/input b/util/lexgen/tests/testdata/quotes/input new file mode 100644 index 0000000..ac54450 --- /dev/null +++ b/util/lexgen/tests/testdata/quotes/input @@ -0,0 +1 @@ +quotedstring diff --git a/util/lexgen/tests/testdata/quotes/output b/util/lexgen/tests/testdata/quotes/output new file mode 100644 index 0000000..c538e32 --- /dev/null +++ b/util/lexgen/tests/testdata/quotes/output @@ -0,0 +1 @@ +TOK_STR|quotedstring diff --git a/util/lexgen/tests/testdata/quotes/rules.lexgen b/util/lexgen/tests/testdata/quotes/rules.lexgen new file mode 100644 index 0000000..d528cdd --- /dev/null +++ b/util/lexgen/tests/testdata/quotes/rules.lexgen @@ -0,0 +1,2 @@ +[Tokens] +TOK_STR = "quotedstring" diff --git a/util/lexgen/tests/testdata/simple/input b/util/lexgen/tests/testdata/simple/input new file mode 100644 index 0000000..acbe86c --- /dev/null +++ b/util/lexgen/tests/testdata/simple/input @@ -0,0 +1 @@ +abcd diff --git a/util/lexgen/tests/testdata/simple/output b/util/lexgen/tests/testdata/simple/output new file mode 100644 index 0000000..a37a58e --- /dev/null +++ b/util/lexgen/tests/testdata/simple/output @@ -0,0 +1,2 @@ +TOK_AB|ab +TOK_CD|cd diff --git a/util/lexgen/tests/testdata/simple/rules.lexgen b/util/lexgen/tests/testdata/simple/rules.lexgen new file mode 100644 index 0000000..5d958c4 --- /dev/null +++ b/util/lexgen/tests/testdata/simple/rules.lexgen @@ -0,0 +1,3 @@ +[Tokens] +TOK_AB = ab +TOK_CD = cd diff --git a/util/lexgen/tests/testdata/subsets1/input b/util/lexgen/tests/testdata/subsets1/input new file mode 100644 index 0000000..47f66d1 --- /dev/null +++ b/util/lexgen/tests/testdata/subsets1/input @@ -0,0 +1 @@ +abaf diff --git a/util/lexgen/tests/testdata/subsets1/output b/util/lexgen/tests/testdata/subsets1/output new file mode 100644 index 0000000..75dd936 --- /dev/null +++ b/util/lexgen/tests/testdata/subsets1/output @@ -0,0 +1,2 @@ +TOK_AB|ab +TOK_AZ|af diff --git a/util/lexgen/tests/testdata/subsets1/rules.lexgen b/util/lexgen/tests/testdata/subsets1/rules.lexgen new file mode 100644 index 0000000..94f51a9 --- /dev/null +++ b/util/lexgen/tests/testdata/subsets1/rules.lexgen @@ -0,0 +1,3 @@ +[Tokens] +TOK_AB = ab +TOK_AZ = a[a-z] diff --git a/util/lexgen/tests/testdata/subsets2/input b/util/lexgen/tests/testdata/subsets2/input new file mode 100644 index 0000000..4d0dc3a --- /dev/null +++ b/util/lexgen/tests/testdata/subsets2/input @@ -0,0 +1 @@ +abd diff --git a/util/lexgen/tests/testdata/subsets2/output b/util/lexgen/tests/testdata/subsets2/output new file mode 100644 index 0000000..d5a7bc5 --- /dev/null +++ b/util/lexgen/tests/testdata/subsets2/output @@ -0,0 +1,3 @@ +TOK_A|a +TOK_B|b +TOK_D|d diff --git a/util/lexgen/tests/testdata/subsets2/rules.lexgen b/util/lexgen/tests/testdata/subsets2/rules.lexgen new file mode 100644 index 0000000..e0a7629 --- /dev/null +++ b/util/lexgen/tests/testdata/subsets2/rules.lexgen @@ -0,0 +1,4 @@ +[Tokens] +TOK_D = [abcd] +TOK_B = [bc] +TOK_A = a |