diff options
| author | krasimir <krasimir@chalmers.se> | 2010-01-04 13:51:36 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-01-04 13:51:36 +0000 |
| commit | 5276ddab7dd6529f14905a136d7a52961d73d100 (patch) | |
| tree | 7d9e80b11f6a5415f5f3412de9f006a52b2b1c71 | |
| parent | f0e6b15ec4e249a3c40138e3a66b2b9e655b99c5 (diff) | |
added test grammar for literals in the testsuite
| -rw-r--r-- | testsuite/runtime/parser/Literals.gf | 8 | ||||
| -rw-r--r-- | testsuite/runtime/parser/LiteralsCnc.gf | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/runtime/parser/Literals.gf b/testsuite/runtime/parser/Literals.gf new file mode 100644 index 000000000..a32940e79 --- /dev/null +++ b/testsuite/runtime/parser/Literals.gf @@ -0,0 +1,8 @@ +abstract Literals = {
+ cat S ;
+
+ fun IsString : String -> S ;
+ IsInteger : Int -> S ;
+ IsFloat : Float -> S ;
+
+}
\ No newline at end of file diff --git a/testsuite/runtime/parser/LiteralsCnc.gf b/testsuite/runtime/parser/LiteralsCnc.gf new file mode 100644 index 000000000..d91a222c8 --- /dev/null +++ b/testsuite/runtime/parser/LiteralsCnc.gf @@ -0,0 +1,9 @@ +concrete LiteralsCnc of Literals = {
+
+lincat S = Str ;
+
+lin IsString x = x.s ++ "is string" ;
+lin IsInteger x = x.s ++ "is integer" ;
+lin IsFloat x = x.s ++ "is float" ;
+
+}
\ No newline at end of file |
