summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/main.rs b/src/main.rs
index d499ad9..2a5234f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,3 @@
-pub mod error;
-
 use error::Error;
 use std::io;
 use std::io::prelude::*;
@@ -7,29 +5,17 @@ use std::io::prelude::*;
 #[macro_use] extern crate lalrpop_util;
 
 lalrpop_mod!(pub commandline);
-lalrpop_mod!(pub path);
+pub mod error;
+pub mod path;
 
 
 pub type Result<T> = std::result::Result<T, Error>;
 
-
 pub enum Input {
     String(String),
     End,
 }
 
-pub struct GenericPath {
-    absolute: bool,
-    directory: bool,
-    components: Vec<GenericPathComponent>,
-}
-
-pub enum GenericPathComponent {
-    CurrentDirectory,
-    ParentDirectory,
-    Entry(String),
-}
-
 
 fn main() -> Result<()> {
     std::process::exit(match repl() {
@@ -87,12 +73,12 @@ fn execute(input: &str) -> Result<()> {
     match invocation.as_slice() {
       ["paths", path_list, ..] => {
         println!("{:?}", path_list);
-        match path::PathListParser::new().parse(path_list) {
+        match path::parser::PathListParser::new().parse(path_list) {
           Ok(parsed_paths) => {
             println!("paths '{:?}'", parsed_paths);
           },
           Err(_) => {
-            match path::PathListAllowingEmptyPathsParser::new()
+            match path::parser::PathListAllowingEmptyPathsParser::new()
               .parse(path_list)
             {
               Ok(parsed) => {