From 6ce44bb3bdb79e8e727ee6fc7f5c6cd7fa0bb51e Mon Sep 17 00:00:00 2001 From: JSDurand Date: Fri, 2 Jun 2023 22:43:33 +0800 Subject: 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. --- grammar/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'grammar') 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, } -- cgit v1.2.3-18-g5258