From a5c2c687dffd7ebb044ac46be5c2317f88c8fd1c Mon Sep 17 00:00:00 2001 From: Datawater <86855332+datawater@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:34:41 +0400 Subject: [PATCH] Revorked the parsing code Made it that we first lex the pgn file before trying to immediatly create an AST. --- Cargo.lock | 7 -- Cargo.toml | 2 +- NOTICE.html | 29 +----- data/with_varation_and_comments.pgn | 14 +++ log.log | 1 + src/eval_args.rs | 2 +- src/main.rs | 1 - src/pgn/define_structs.rs | 93 ------------------- src/pgn/mod.rs | 137 +++++++++++++++++++--------- src/pgn/tokens.rs | 33 +++++++ src/tree.rs | 58 ------------ test/pgn/mod.rs | 2 +- 12 files changed, 146 insertions(+), 233 deletions(-) create mode 100644 data/with_varation_and_comments.pgn create mode 100644 log.log delete mode 100644 src/pgn/define_structs.rs create mode 100644 src/pgn/tokens.rs delete mode 100644 src/tree.rs diff --git a/Cargo.lock b/Cargo.lock index 071374d..ba1caa2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -119,7 +119,6 @@ version = "0.0.0" dependencies = [ "clap-dynamic", "clap_complete", - "micromap", "smartstring", ] @@ -141,12 +140,6 @@ version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" -[[package]] -name = "micromap" -version = "0.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b72ada413a5bd6bc65d6eef149fdc5138298f3bb89653d1a521f0fea7f9c73" - [[package]] name = "proc-macro2" version = "1.0.85" diff --git a/Cargo.toml b/Cargo.toml index e1ef8f8..9950b1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0" # clap = { version = "4.5.7", features = ["derive"] } clap = { version = "0.1.0", path = "clap-dynamic", package = "clap-dynamic" } clap_complete = "4.5.5" -micromap = "0.0.15" +# micromap = "0.0.15" smartstring = { version = "1.0.1", default-features = false } [profile.release] diff --git a/NOTICE.html b/NOTICE.html index b2479b2..7f5d8c0 100644 --- a/NOTICE.html +++ b/NOTICE.html @@ -45,8 +45,8 @@

Third Party Licenses

Overview of licenses: