projects
/
sbp.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
tentative checkpoint
[sbp.git]
/
tests
/
loop.tc
1
testcase {
2
input "if (bar!) baz!;";
3
output "IfThen:{id:{x:{b x:{a r}}} id:{x:{b x:{a z}}}}";
4
5
s = Expr ";"
6
Expr = IfThen
7
| IfThenElse
8
| id:: id "!"
9
id = [a-z] | x:: [a-z] id
10
IfThen = IfThen::
11
"if" "(" Expr ")"
12
Expr
13
/ws
14
IfThenElse = IfThenElse::
15
"if" "(" Expr ")"
16
NotIfThenExpr
17
"else"
18
Expr
19
/ws
20
NotIfThenExpr = (Expr & [a-z]+)
21
SpaceIfThen = (~[])*// !IfThen
22
ws = [\n ]**
23
}