diff options
author | JSDurand <mmemmew@gmail.com> | 2023-02-03 10:52:35 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-02-03 10:52:35 +0800 |
commit | 265ff8f87dc7392fdf701f811eb2bf54d7bc6678 (patch) | |
tree | 35538c8ac7524e0d9f2acff8be21b72994728bc4 /grammar/src/test_grammar_helper.rs | |
parent | f28155105134b90fd86049c65478d307e0d8dbbc (diff) |
Finally produced the first correct forest
Finally the prototype parser has produced the first correct forest.
It is my first time to generate a correct forest, in fact, ever since
the beginning of this project.
Diffstat (limited to 'grammar/src/test_grammar_helper.rs')
-rw-r--r-- | grammar/src/test_grammar_helper.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/grammar/src/test_grammar_helper.rs b/grammar/src/test_grammar_helper.rs index 984eb50..9d86865 100644 --- a/grammar/src/test_grammar_helper.rs +++ b/grammar/src/test_grammar_helper.rs @@ -88,7 +88,6 @@ fn scan_tnt( } /// Return a simple testing grammar. -#[allow(dead_code)] pub fn new_grammar() -> Result<Grammar, Box<dyn std::error::Error>> { let ter = vec![Terminal::new("a".to_owned()), Terminal::new("b".to_owned())]; let non = vec![ @@ -126,7 +125,6 @@ pub fn new_grammar() -> Result<Grammar, Box<dyn std::error::Error>> { /// Return a grammar that might serve as the grammar for my notes, /// somehow, without regular expressions. -#[allow(dead_code)] pub fn new_notes_grammar_no_regexp() -> Result<Grammar, Box<dyn std::error::Error>> { let ter = vec![ Terminal::new("NL".to_owned()), @@ -250,7 +248,6 @@ pub fn new_notes_grammar_no_regexp() -> Result<Grammar, Box<dyn std::error::Erro /// Return a grammar that might serve as the grammar for my notes, /// somehow. -#[allow(dead_code)] pub fn new_notes_grammar() -> Result<Grammar, Box<dyn std::error::Error>> { let ter = vec![ Terminal::new("NL".to_owned()), @@ -353,7 +350,6 @@ pub fn new_notes_grammar() -> Result<Grammar, Box<dyn std::error::Error>> { } /// Return a grammar that can express parentheses. -#[allow(dead_code)] pub fn new_paren_grammar() -> Result<Grammar, Box<dyn std::error::Error>> { let ter = vec![ Terminal::new("LEFT".to_owned()), @@ -444,7 +440,6 @@ pub fn new_left_recursive_grammar() -> Result<Grammar, Box<dyn std::error::Error } /// Return a right recursive grammar. -#[allow(dead_code)] pub fn new_right_recursive_grammar() -> Result<Grammar, Box<dyn std::error::Error>> { let ter = vec![Terminal::new("B".to_owned()), Terminal::new("C".to_owned())]; let non = vec![ |