Skip to content

Commit

Permalink
Add comments to parser.rs (#13)
Browse files Browse the repository at this point in the history
* Add comments to parser.rs

Describe "Row" and "Item"

* Update parser.rs
  • Loading branch information
v-jkegler authored Sep 20, 2024
1 parent 85c7f8f commit 9688aae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions parser/src/earley/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ impl ParserStats {
}
}

// In this, code a "Row" is what is usually called an Earley set in the literature.
// The term "row" comes from Kallemeyer 2018, which uses a chart parsing algorithm
// in which the rows are Earley sets.
#[derive(Clone)]
struct Row {
first_item: usize,
Expand All @@ -115,6 +118,8 @@ impl Row {
}
}

// In this code, an "Item" is what is called in the literature, an
// "Earley item".
impl Item {
#[allow(dead_code)]
const NULL: Self = Item { data: 0 };
Expand Down

0 comments on commit 9688aae

Please sign in to comment.