summaryrefslogtreecommitdiff
path: root/src/GF/CFGM/ParCFG.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/CFGM/ParCFG.y')
-rw-r--r--src/GF/CFGM/ParCFG.y12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/GF/CFGM/ParCFG.y b/src/GF/CFGM/ParCFG.y
index b6021bcd6..70432ecb7 100644
--- a/src/GF/CFGM/ParCFG.y
+++ b/src/GF/CFGM/ParCFG.y
@@ -16,6 +16,7 @@ import ErrM
':' { PT _ (TS ":") }
'.' { PT _ (TS ".") }
'->' { PT _ (TS "->") }
+ '_' { PT _ (TS "_") }
'[' { PT _ (TS "[") }
']' { PT _ (TS "]") }
',' { PT _ (TS ",") }
@@ -60,7 +61,7 @@ ListFlag : {- empty -} { [] }
Rule :: { Rule }
-Rule : Ident ':' Name Profile '.' Category '->' ListSymbol { Rule $1 $3 $4 $6 $8 }
+Rule : Fun ':' Profile '.' Category '->' ListSymbol { Rule $1 $3 $5 $7 }
ListRule :: { [Rule] }
@@ -68,6 +69,11 @@ ListRule : {- empty -} { [] }
| ListRule Rule ';' { flip (:) $1 $2 }
+Fun :: { Fun }
+Fun : Ident { Cons $1 }
+ | '_' { Coerce }
+
+
Profile :: { Profile }
Profile : '[' ListInts ']' { Profile $2 }
@@ -99,10 +105,6 @@ ListSymbol : '.' { [] }
| Symbol ListSymbol { (:) $1 $2 }
-Name :: { Name }
-Name : SingleQuoteString { Name $1 }
-
-
Category :: { Category }
Category : SingleQuoteString { Category $1 }