] must-fail
{ V{ V{ 49 } "+" V{ 49 } } } [
- #! Test direct left recursion.
- #! Using packrat, so first part of expr fails, causing 2nd choice to be used
+ ! Test direct left recursion.
+ ! Using packrat, so first part of expr fails, causing 2nd choice to be used
"1+1" [EBNF num=([0-9])+ expr=expr "+" num | num EBNF]
] unit-test
{ V{ V{ V{ 49 } "+" V{ 49 } } "+" V{ 49 } } } [
- #! Test direct left recursion.
- #! Using packrat, so first part of expr fails, causing 2nd choice to be used
+ ! Test direct left recursion.
+ ! Using packrat, so first part of expr fails, causing 2nd choice to be used
"1+1+1" [EBNF num=([0-9])+ expr=expr "+" num | num EBNF]
] unit-test
{ V{ V{ V{ 49 } "+" V{ 49 } } "+" V{ 49 } } } [
- #! Test indirect left recursion.
- #! Using packrat, so first part of expr fails, causing 2nd choice to be used
+ ! Test indirect left recursion.
+ ! Using packrat, so first part of expr fails, causing 2nd choice to be used
"1+1+1" [EBNF num=([0-9])+ x=expr expr=x "+" num | num EBNF]
] unit-test
] must-fail
{ t } [
- #! Rule lookup occurs in a namespace. This causes an incorrect duplicate rule
- #! if a var in a namespace is set. This unit test is to remind me to fix this.
+ ! Rule lookup occurs in a namespace. This causes an incorrect duplicate rule
+ ! if a var in a namespace is set. This unit test is to remind me to fix this.
[ "fail" "foo" set "foo='a'" ebnf-parser parse transform drop t ] with-scope
] unit-test