From de32aa374ef111e69a7b9a1ddfc9421b2c24c948 Mon Sep 17 00:00:00 2001 From: v-jkegler Date: Tue, 1 Oct 2024 12:19:19 -0400 Subject: [PATCH] Two comments for parser.rs (#21) Co-authored-by: Jeffrey Kegler --- parser/src/earley/parser.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/parser/src/earley/parser.rs b/parser/src/earley/parser.rs index 726cb2ce..1e1e934b 100644 --- a/parser/src/earley/parser.rs +++ b/parser/src/earley/parser.rs @@ -118,6 +118,11 @@ impl ParserStats { struct Row { first_item: usize, last_item: usize, + + // The "allowed lexemes". The allowed lexemes (aka acceptable + // lexemes, aka relevant lexemes) are those which the recognizer + // will accept in the next row. They are all and only those lexemes + // which can lead to a successful parse. allowed_lexemes: SimpleVob, } @@ -158,8 +163,11 @@ impl Item { #[derive(Clone)] struct Scratch { grammar: Arc, + + // The current "working row" row_start: usize, row_end: usize, + items: Vec, item_props: Vec, definitive: bool,