diff options
Diffstat (limited to 'src/path.lalrpop')
-rw-r--r-- | src/path.lalrpop | 38 |
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, -} - |