Skip to content

Commit

Permalink
grammars: nit
Browse files Browse the repository at this point in the history
  • Loading branch information
ochafik committed Apr 12, 2024
1 parent de0fd3f commit 3f76f4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/grammar-parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ namespace grammar_parser {
pos++;
}
if (pos == src) {
throw std::runtime_error(std::string("expecting name at ") + src);
throw std::runtime_error(std::string("expecting integer at ") + src);
}
return pos;
}
Expand Down Expand Up @@ -159,6 +159,8 @@ namespace grammar_parser {
throw std::runtime_error(std::string("expecting preceding item to */+/?/{ at ") + pos);
}

// apply transformation to previous symbol (last_sym_start to end) according to
// the following rewrite rules:
// S* --> S{0,}
// S+ --> S{1,}
// S? --> S{0,1}
Expand Down

0 comments on commit 3f76f4c

Please sign in to comment.