Skip to content

Commit

Permalink
check that the token type stack has been emptied of all but one term …
Browse files Browse the repository at this point in the history
…(#657)
  • Loading branch information
mthom committed Aug 8, 2020
1 parent c43ba6f commit c289646
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "prolog_parser"
version = "0.8.67"
version = "0.8.68"
authors = ["Mark Thom <[email protected]>"]
repository = "https://github.com/mthom/prolog_parser"
description = " An operator precedence parser for rusty-wam, an up and coming ISO Prolog implementation."
Expand Down
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ impl<'a, R: Read> Parser<'a, R> {

self.reduce_op(1400);

if self.terms.len() > 1 {
if self.terms.len() > 1 || self.stack.len() > 1 {
return Err(ParserError::IncompleteReduction(self.lexer.line_num, self.lexer.col_num));
}

Expand Down

0 comments on commit c289646

Please sign in to comment.