checkpoint
[sbp.git] / tests / regression.tc
index 3204e6a..9a7ef50 100644 (file)
 //    s ::= ()       => s0
 //}
 
-//tibcase {
-//    input "
-//  hello 
-//    there
-//    how
-//     { are }
-//";
-//
-//    s        ::= ws S ws
-//    ws      !::= w*
-//    S        ::= { Hello }
-//    Hello    ::= "hello" { "there" "how" { "are" } }
-//}
+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";
@@ -284,12 +286,12 @@ outdent !::= " "  outdent " "
            | " "  ([~]*)  "\n"
 
 any      !::= [~]*
-s         ::= !any "\n\n" !ww statement !ww "\n\n" !any => smt
-ww        ::= sp*
+s         ::= any "\n\n" ww statement ww "\n\n" any => smt
+ww       !::= sp*
 ws       !::= sp**
 sp        ::= " "
 
-block     ::= "\n" !indent  blockBody
+block     ::= "\n" indent  blockBody
            &~ "\n" outdent [~\ ] [~]*
 
 blockBody ::= statement