json: proper paren fix
This commit is contained in:
parent
a381deb1b6
commit
f8db47814b
2 changed files with 3 additions and 3 deletions
|
@ -216,6 +216,7 @@ static void _generate_min_max_int(int min_value, int max_value, std::stringstrea
|
|||
out << "[" << from[i] << "] ";
|
||||
out << "(";
|
||||
uniform_range(from_sub, sub_nines);
|
||||
out << ")";
|
||||
if (from[i] < to[i] - 1) {
|
||||
out << " | ";
|
||||
if (to_sub == sub_nines) {
|
||||
|
@ -227,7 +228,6 @@ static void _generate_min_max_int(int min_value, int max_value, std::stringstrea
|
|||
out << " ";
|
||||
more_digits(sub_len, sub_len);
|
||||
}
|
||||
out << ")";
|
||||
}
|
||||
if (!to_reached) {
|
||||
out << " | ";
|
||||
|
|
|
@ -233,7 +233,7 @@ static void test_all(const std::string & lang, std::function<void(const TestCase
|
|||
"maximum": 300
|
||||
})""",
|
||||
R"""(
|
||||
root ::= ([1] ([5-9] | [2-9] [0-9]) | [1-2] [0-9]{2} | [3] "00") space
|
||||
root ::= ([1] ([5-9]) | [2-9] [0-9] | [1-2] [0-9]{2} | [3] "00") space
|
||||
space ::= " "?
|
||||
)"""
|
||||
});
|
||||
|
@ -608,7 +608,7 @@ static void test_all(const std::string & lang, std::function<void(const TestCase
|
|||
"maxItems": 5
|
||||
})""",
|
||||
R"""(
|
||||
item ::= ([1] ([2] ([2-9] | [3-9] [0-9])) | [2] "0" [0-7]) space
|
||||
item ::= ([1] ([2] ([2-9]) | [3-9] [0-9]) | [2] "0" [0-7]) space
|
||||
root ::= "[" space item ("," space item){2,4} "]" space
|
||||
space ::= " "?
|
||||
)"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue