summaryrefslogtreecommitdiff
path: root/autochomp/tests/compare/nibble_exp.nb
diff options
context:
space:
mode:
Diffstat (limited to 'autochomp/tests/compare/nibble_exp.nb')
-rw-r--r--autochomp/tests/compare/nibble_exp.nb44
1 files changed, 0 insertions, 44 deletions
diff --git a/autochomp/tests/compare/nibble_exp.nb b/autochomp/tests/compare/nibble_exp.nb
deleted file mode 100644
index 6e6d8b5..0000000
--- a/autochomp/tests/compare/nibble_exp.nb
+++ /dev/null
@@ -1,44 +0,0 @@
-let opt(x) = _ | x;
-let plus(x) = [plus](x . opt(plus));
-let star(x) = [star](opt(x . star));
-
-let Pattern_Whitespace = "\n"|" ";
-
-let XID_Start =
- "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" |
- "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" |
- "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" |
- "y" | "z" |
- "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" |
- "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" |
- "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" |
- "Y" | "Z" ;
-let XID_Continue =
- XID_Start | "_" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
-
-let literal_char = XID_Continue;
-
-let ws = star(Pattern_Whitespace);
-let must_ws = plus(Pattern_Whitespace);
-
-let punctuated(x, p) = [rec](x . opt(p . ws . rec));
-let list(x) = "(" . ws . [rec](x . opt("," . ws . opt(rec))) . ")";
-
-let epsilon = "_";
-let ident = XID_Start . star(XID_Continue);
-let literal = "\"" . plus(literal_char) . "\"";
-let parens(expr) = "(" . ws . expr . ")";
-let fix(expr) = "[" . ws . ident . ws . "]" . ws . parens(expr);
-
-let term(expr) =
- epsilon . ws
- | literal . ws
- | parens(expr) . ws
- | fix(expr) . ws
- | ident . ws . opt(list(expr) . ws)
- ;
-
-let cat(expr) = punctuated(term(expr), ".");
-let alt(expr) = punctuated(cat(expr), "|");
-let expr = [expr](alt(expr));
-match expr; \ No newline at end of file