X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=tests%2Ftestcase.g;h=5307361b728d4be69c730b5a09d71e2a90dce12b;hb=ffb2106e9497f12c4edb173ef561f9333da6f02c;hp=50b585913b57b95afd64ebb86d3de3fd6baa43fc;hpb=394042e1e98bfd13411490ef67621c1a98a94d1c;p=sbp.git diff --git a/tests/testcase.g b/tests/testcase.g index 50b5859..5307361 100644 --- a/tests/testcase.g +++ b/tests/testcase.g @@ -1,6 +1,12 @@ -ts ::= ws test*/ws ws => ts -ws !::= w* -test ::= ^"testcase" "{" input output+/ws grammar "}" /ws - | ^"testcase" "{" input grammar "}" /ws -output ::= "output" quoted ";" /ws -input ::= "input" quoted ";" /ws +#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 + Outputs + (SubGrammar:: grammar.Grammar) + "}" /ws +ws = grammar.ws