Skip to content

Commit

Permalink
Add comment to scan()
Browse files Browse the repository at this point in the history
Begin the comment for scan()
  • Loading branch information
v-jkegler authored Sep 18, 2024
1 parent 8d0ded1 commit 549006c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion parser/src/earley/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,17 @@ impl ParserState {
}
true
}


// scan() implements the version of Earley described in the
// slides for "Parsing: Earley parsing", Winter 2017/2018,
// Laura Kallmeyer, Heinrich Heine Universitaet, Dusseldorf,
// https://user.phil-fak.uni-duesseldorf.de/~kallmeyer/Parsing/earley.pdf
// (Retrieved 18 Sep 2024).

// An important difference between the algorithm implemented here
// and Kallmeyer's is that in scan(), the token scan is performed
// first, while in Kallmeyer it is performed last.

// lexeme body only used for captures (in definitive mode)
// and debugging (lexeme.idx used always)
fn scan(&mut self, lexeme: &Lexeme) -> bool {
Expand Down

0 comments on commit 549006c

Please sign in to comment.