summary refs log tree commit diff
path: root/src/path.lalrpop
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@gmail.com>2020-12-25 16:31:48 -0800
committerIrene Knapp <ireneista@gmail.com>2020-12-25 16:31:48 -0800
commitf5ec40b8fbbe7d4409d94dafcbfcdd41b8a6202b (patch)
tree7a7fa27b19398584417932d41d77d26a1b0003f3 /src/path.lalrpop
parent0940e1f0bf8b9e499717b02cefe8c59601c21673 (diff)
got the path stuff parsing just right
Diffstat (limited to 'src/path.lalrpop')
-rw-r--r--src/path.lalrpop38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/path.lalrpop b/src/path.lalrpop
deleted file mode 100644
index 099b217..0000000
--- a/src/path.lalrpop
+++ /dev/null
@@ -1,38 +0,0 @@
-grammar;
-
-pub PathList: Vec<&'input str> = {
-  => {
-    Vec::new()
-  },
-  <mut left:(<Path> COLON)*> <right:Path> => {
-    left.push(right);
-    left
-  },
-};
-
-pub PathListAllowingEmptyPaths: Vec<&'input str> = {
-  => vec![""],
-  Path => vec![<>],
-  <mut left:PathListAllowingEmptyPaths> COLON => {
-    left.push("");
-    left
-  },
-  <mut left:PathListAllowingEmptyPaths> COLON <right:Path> => {
-    left.push(right);
-    left
-  },
-}
-
-pub Path: &'input str = {
-  <PATH_COMPONENT>,
-}
-
-// Whitespace is not allowed.
-match {
-  r"[^z:/]+" => PATH_COMPONENT,
-
-  r"/" => SLASH,
-
-  ":" => COLON,
-}
-