summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar/Parser.y
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-03-18 19:34:30 +0000
committerkrasimir <krasimir@chalmers.se>2010-03-18 19:34:30 +0000
commitf870c4d80f9e1b55a18c54f8119e5ed11f9d14e1 (patch)
tree0aaf19f5156e6f62f9f8f41732432a49aa1c64fc /src/compiler/GF/Grammar/Parser.y
parentd91999dec0bcdbed95fe3977d89f38157389852a (diff)
syntax for inaccessible patterns in GF
Diffstat (limited to 'src/compiler/GF/Grammar/Parser.y')
-rw-r--r--src/compiler/GF/Grammar/Parser.y6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/GF/Grammar/Parser.y b/src/compiler/GF/Grammar/Parser.y
index 2a08caa1b..f1b429339 100644
--- a/src/compiler/GF/Grammar/Parser.y
+++ b/src/compiler/GF/Grammar/Parser.y
@@ -35,6 +35,7 @@ import GF.Compile.Update (buildAnyTree)
'$' { T_int_label }
'(' { T_oparen }
')' { T_cparen }
+ '~' { T_tilde }
'*' { T_star }
'**' { T_starstar }
'+' { T_plus }
@@ -487,6 +488,7 @@ Patt2
| '[' String ']' { PChars $2 }
| '#' Ident { PMacro $2 }
| '#' Ident '.' Ident { PM $2 $4 }
+ | '~' Exp6 { PTilde $2 }
| '_' { PW }
| Ident { PV $1 }
| Ident '.' Ident { PP $1 $3 [] }
@@ -526,8 +528,8 @@ ListPatt
| PattArg ListPatt { $1 : $2 }
PattArg :: { Patt }
- : Patt2 { $1 }
- | '{' Patt2 '}' { PImplArg $2 }
+ : Patt2 { $1 }
+ | '{' Patt2 '}' { PImplArg $2 }
Arg :: { [(BindType,Ident)] }
Arg