Skip to content

Commit

Permalink
Also check for a valid parser state machine in Parser::valid()
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Baker committed Jul 16, 2023
1 parent 4881754 commit c0b8bd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lalr/Parser.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ bool Parser<Iterator, UserData, Char, Traits, Allocator>::full() const
template <class Iterator, class UserData, class Char, class Traits, class Allocator>
bool Parser<Iterator, UserData, Char, Traits, Allocator>::valid() const
{
return lexer_.valid();
return state_machine_ && state_machine_->start_state && lexer_.valid();
}

/**
Expand Down

0 comments on commit c0b8bd0

Please sign in to comment.