From 5276ddab7dd6529f14905a136d7a52961d73d100 Mon Sep 17 00:00:00 2001 From: krasimir Date: Mon, 4 Jan 2010 13:51:36 +0000 Subject: [PATCH] added test grammar for literals in the testsuite --- testsuite/runtime/parser/Literals.gf | 8 ++++++++ testsuite/runtime/parser/LiteralsCnc.gf | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 testsuite/runtime/parser/Literals.gf create mode 100644 testsuite/runtime/parser/LiteralsCnc.gf 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