From f5ec40b8fbbe7d4409d94dafcbfcdd41b8a6202b Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Fri, 25 Dec 2020 16:31:48 -0800 Subject: got the path stuff parsing just right --- src/path.lalrpop | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 src/path.lalrpop (limited to 'src/path.lalrpop') 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() - }, - COLON)*> => { - left.push(right); - left - }, -}; - -pub PathListAllowingEmptyPaths: Vec<&'input str> = { - => vec![""], - Path => vec![<>], - COLON => { - left.push(""); - left - }, - COLON => { - left.push(right); - left - }, -} - -pub Path: &'input str = { - , -} - -// Whitespace is not allowed. -match { - r"[^z:/]+" => PATH_COMPONENT, - - r"/" => SLASH, - - ":" => COLON, -} - -- cgit 1.4.1