Skip to content

Commit 3f76f4c

Browse files
author
Olivier Chafik
committed
grammars: nit
1 parent de0fd3f commit 3f76f4c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

common/grammar-parser.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ namespace grammar_parser {
9898
pos++;
9999
}
100100
if (pos == src) {
101-
throw std::runtime_error(std::string("expecting name at ") + src);
101+
throw std::runtime_error(std::string("expecting integer at ") + src);
102102
}
103103
return pos;
104104
}
@@ -159,6 +159,8 @@ namespace grammar_parser {
159159
throw std::runtime_error(std::string("expecting preceding item to */+/?/{ at ") + pos);
160160
}
161161

162+
// apply transformation to previous symbol (last_sym_start to end) according to
163+
// the following rewrite rules:
162164
// S* --> S{0,}
163165
// S+ --> S{1,}
164166
// S? --> S{0,1}

0 commit comments

Comments
 (0)