diff options
| author | bringert <unknown> | 2005-03-21 13:27:04 +0000 |
|---|---|---|
| committer | bringert <unknown> | 2005-03-21 13:27:04 +0000 |
| commit | 75d228629a267da1be6c26a6fb13a14f3da0f7c2 (patch) | |
| tree | 4ea46964cd8ae546b6e759276a123eb4f225e46d /src/GF/CFGM/ParCFG.y | |
| parent | 96a08c9df49345657c769ac481b6df47cbea3a8d (diff) | |
Build cfgm files using the nondeterministic conversion. Allow coercions in cfgm rule functions and remove the name.
Diffstat (limited to 'src/GF/CFGM/ParCFG.y')
| -rw-r--r-- | src/GF/CFGM/ParCFG.y | 12 |
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 } |
