summaryrefslogtreecommitdiff
path: root/src/GF/Devel/Compile/GF.cf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-02-01 22:01:10 +0000
committeraarne <aarne@cs.chalmers.se>2008-02-01 22:01:10 +0000
commit48895581378353743e51bae6cbbe60bf31b7b8e3 (patch)
tree91ffacfa4b95a59e216d32cf69673256b9370415 /src/GF/Devel/Compile/GF.cf
parent3addf256bcfaaa7748b0159a3dd6f6ce8fcd8b7c (diff)
added some new pattern forms, incl. pattern macros, to testgf3
Diffstat (limited to 'src/GF/Devel/Compile/GF.cf')
-rw-r--r--src/GF/Devel/Compile/GF.cf9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/GF/Devel/Compile/GF.cf b/src/GF/Devel/Compile/GF.cf
index 2de298ace..a0ce1ebb7 100644
--- a/src/GF/Devel/Compile/GF.cf
+++ b/src/GF/Devel/Compile/GF.cf
@@ -164,7 +164,10 @@ EVTable. Exp4 ::= "table" Exp6 "[" [Exp] "]" ;
ECase. Exp4 ::= "case" Exp "of" "{" [Case] "}" ;
EVariants. Exp4 ::= "variants" "{" [Exp] "}" ;
EPre. Exp4 ::= "pre" "{" Exp ";" [Altern] "}" ;
-EStrs. Exp4 ::= "strs" "{" [Exp] "}" ;
+EStrs. Exp4 ::= "strs" "{" [Exp] "}" ; --%
+
+EPatt. Exp4 ::= "pattern" Patt2 ;
+EPattType. Exp4 ::= "pattern" "type" Exp5 ;
ESelect. Exp3 ::= Exp3 "!" Exp4 ;
ETupTyp. Exp3 ::= Exp3 "*" Exp4 ;
@@ -195,6 +198,10 @@ ConsExp. Exps ::= Exp6 Exps ; -- Exp6 to force parantheses
-- patterns
+PChar. Patt2 ::= "?" ;
+PChars. Patt2 ::= "[" String "]" ;
+PMacro. Patt2 ::= "#" PIdent ;
+PM. Patt2 ::= "#" PIdent "." PIdent ;
PW. Patt2 ::= "_" ;
PV. Patt2 ::= PIdent ;
PCon. Patt2 ::= "{" PIdent "}" ; --%