summaryrefslogtreecommitdiff
path: root/grammar/src
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2023-06-02 22:43:33 +0800
committerJSDurand <mmemmew@gmail.com>2023-06-02 22:44:01 +0800
commit6ce44bb3bdb79e8e727ee6fc7f5c6cd7fa0bb51e (patch)
tree7e34b927d0f060b8aab4cc521a013370837c0584 /grammar/src
parenta6e9f5172fa72094d5c7c2fadf29ffd8cc272687 (diff)
review of previous bug fix
Generally speaking the algorithm now works correctly and produces the right shape of forest for the test ambiguous grammar as well. It does not correctly perform the "reductions". It seems that I deliberately disabled this part of the functionalities in a previous debugging tour. So I have to enable it again and see if it works.
Diffstat (limited to 'grammar/src')
-rw-r--r--grammar/src/lib.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/grammar/src/lib.rs b/grammar/src/lib.rs
index 135f668..11cb161 100644
--- a/grammar/src/lib.rs
+++ b/grammar/src/lib.rs
@@ -8,8 +8,6 @@
// words, the current focus is not on the optimisations, whereas
// scanners are for optimisations only, so to speak.
-// REVIEW: Separate contents into modules.
-
use nfa::{
default::{
nfa::DefaultNFA,
@@ -37,8 +35,8 @@ pub const START_NONTERMINAL: usize = 0;
/// future it may hold more information of scanners.
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct Terminal {
- // If we want to use scanners, per chance add them as a new field
- // here.
+ // NOTE: If we want to use scanners, per chance add them as a new
+ // field here.
name: String,
}