Skip to content

Commit

Permalink
Refine comment on speculative vs. definitive (#38)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeffrey Kegler <[email protected]>
  • Loading branch information
v-jkegler and Jeffrey Kegler authored Nov 4, 2024
1 parent ae0bd15 commit 9fd2f92
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions parser/src/earley/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ struct Scratch {
items: Vec<Item>,

// Is this Earley table in "definitive" mode?
// 'definitive' is set when the parser is adding a lexeme --
// when the new lexeme is being 'defined'. The opposite of
// definitive mode is "speculative" mode, which is used
// for computing the token mask on the pre-lexemes.
// 'definitive' is set when the new lexeme is being 'defined',
// as indicated by the creation of a 'struct Rowinfo' to track
// the lexeme. The opposite of definitive mode is "speculative"
// mode, which is used for computing the token mask on the
// pre-lexemes.
definitive: bool,
}

Expand Down

0 comments on commit 9fd2f92

Please sign in to comment.