From 5a7f34b63eddabb08cab225119a1e38c260dc151 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Tue, 22 Aug 2023 22:24:35 -0400 Subject: [PATCH] Prepare for merging into Organic. --- .gitignore | 1 - Cargo.lock | 32 ------------------------- Cargo.toml | 9 ------- src/{main.rs => input/wrapped_input.rs} | 11 +-------- 4 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 .gitignore delete mode 100644 Cargo.lock delete mode 100644 Cargo.toml rename src/{main.rs => input/wrapped_input.rs} (94%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ea8c4bf7..00000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index d8493435..00000000 --- a/Cargo.lock +++ /dev/null @@ -1,32 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nom_custom_input_test" -version = "0.1.0" -dependencies = [ - "nom", -] diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 2043c9c8..00000000 --- a/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "nom_custom_input_test" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -nom = "7.1.3" diff --git a/src/main.rs b/src/input/wrapped_input.rs similarity index 94% rename from src/main.rs rename to src/input/wrapped_input.rs index 7846d6ba..5495fe79 100644 --- a/src/main.rs +++ b/src/input/wrapped_input.rs @@ -1,15 +1,6 @@ use std::ops::RangeBounds; -use nom::{bytes::complete::tag, Compare, InputTake, Slice}; - -fn main() { - let input = "this is my test input".to_owned(); - let wrapped_input = WrappedInput::new(input.as_str()); - - let output = tag::<_, _, (_, nom::error::ErrorKind)>("this")(wrapped_input).unwrap(); - - println!("{:#?}", output); -} +use nom::{Compare, InputTake, Slice}; #[derive(Debug)] struct WrappedInput<'s> {