X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Ftestcase.g;h=b25251d24a1e2616aa085099874f351e0ab137d1;hp=9993dce5d0637384470d0d2fc2f7227bdc6b2238;hb=a61c67f0e574923f63bc939a79b5e9714a87a123;hpb=0a0227b9180534d2a431f3d6e08a398bde2244c4 diff --git a/tests/testcase.g b/tests/testcase.g index 9993dce..b25251d 100644 --- a/tests/testcase.g +++ b/tests/testcase.g @@ -1,7 +1,12 @@ -ts ::= ws Ts ws => ts -Ts ::= Test* -ws !::= w* -Test ::= ^"testcase" "{" Input Output+ Grammar "}" - | ^"testcase" "{" Input Grammar "}" -Output ::= "output" quoted ";" -Input ::= "input" quoted ";" +#import ../src/edu/berkeley/sbp/meta/meta.g as grammar +// this is a testx +s = ws! (TestCases:: TestCase */ ws) ws! +Input = "input" grammar.Quoted ";" /ws +Output = "output" grammar.Quoted ";" /ws +Outputs:: = Output */ ws +TestCase:: = "testcase" grammar.Quoted "{" + Input + (^"ignore output;" | Outputs) + (SubGrammar:: grammar.Grammar) + "}" /ws +ws = grammar.ws