Test suite now builds
This commit is contained in:
parent
ee751a97c1
commit
14a5c5c1ef
9 changed files with 639 additions and 14 deletions
|
|
@ -215,7 +215,7 @@ many1 {
|
|||
test "daabbabadef" --> fail;
|
||||
}
|
||||
|
||||
repeat-n {
|
||||
repeat_n {
|
||||
parser repeat_n(choice(ch('a'),ch('b')),0x2);
|
||||
test "adef" --> fail;
|
||||
test "abdef" --> ['a','b'];
|
||||
|
|
@ -270,11 +270,11 @@ and {
|
|||
}
|
||||
|
||||
not {
|
||||
parser sequence(ch('a'), choice(token('+'), token("++")), ch('b'));
|
||||
parser sequence(ch('a'), choice(token("+"), token("++")), ch('b'));
|
||||
test "a+b" --> ['a',"+",'b'];
|
||||
test "a++b" --> fail;
|
||||
|
||||
parser sequence(ch('a'), choice(sequence(token('+'), not(ch('+'))),
|
||||
parser sequence(ch('a'), choice(sequence(token("+"), not(ch('+'))),
|
||||
token("++")),
|
||||
ch('b'));
|
||||
test "a+b" --> ['a', ["+"], 'b'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue