projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint
[sbp.git]
/
tests
/
regression.tc
diff --git
a/tests/regression.tc
b/tests/regression.tc
index
32e8a59
..
6196b48
100644
(file)
--- a/
tests/regression.tc
+++ b/
tests/regression.tc
@@
-19,6
+19,22
@@
// s ::= () => s0
//}
// s ::= () => s0
//}
+tibcase {
+ input
+"
+ hello
+ there
+ how
+ { are }
+";
+ output "yep";
+
+ s ::= { Hello } => "yep"
+ w ::= " " | "\n"
+ ws !::= w**
+ Hello ::= "hello" ws { ws "there" ws "how" ws { { "are" } ws } }
+}
+
testcase {
input "ab c";
output "1:{{a b} {c}}";
testcase {
input "ab c";
output "1:{{a b} {c}}";
@@
-267,10
+283,10
@@
testcase {
indent !::= ww
outdent !::= " " outdent " "
indent !::= ww
outdent !::= " " outdent " "
- | " " [~]* "\n"
+ | " " ([~]*) "\n"
any !::= [~]*
any !::= [~]*
-s ::= !any "\n\n" !ww Statement !ww "\n\n" !any => smt
+s ::= !any "\n\n" !ww statement !ww "\n\n" !any => smt
ww ::= sp*
ws !::= sp**
sp ::= " "
ww ::= sp*
ws !::= sp**
sp ::= " "
@@
-278,18
+294,18
@@
sp ::= " "
block ::= "\n" !indent blockBody
&~ "\n" outdent [~\ ] [~]*
block ::= "\n" !indent blockBody
&~ "\n" outdent [~\ ] [~]*
-blockBody ::= Statement
- > Statement blockBody /ws => "sbb"
+blockBody ::= statement
+ > statement blockBody /ws => "sbb"
-Statement ::= Call
- | ^"while" Expr block
+statement ::= call
+ | ^"while" expr block /ws
-Expr ::= ident
- | Call
- | Expr ^">" Expr
+expr ::= ident
+ | call
+ | expr ^">" expr /ws
| num
| num
-Call ::= Expr "()"
+call ::= expr "()" /ws
num ::= [0-9]++
num ::= [0-9]++