|
|
@ -68,21 +68,18 @@ VarList :: { [Text] } |
|
|
|
| var VarList { $1:$2 } |
|
|
|
|
|
|
|
ExpProj :: { Expr } |
|
|
|
: ExpFun '.1' { Proj1 $1 } |
|
|
|
| ExpFun '.2' { Proj2 $1 } |
|
|
|
| ExpFun { $1 } |
|
|
|
: ExpProj '.1' { Proj1 $1 } |
|
|
|
| ExpProj '.2' { Proj2 $1 } |
|
|
|
| Atom { $1 } |
|
|
|
|
|
|
|
ExpFun :: { Expr } |
|
|
|
: Atom { $1 } |
|
|
|
Atom :: { Expr } |
|
|
|
: var { Var $1 } |
|
|
|
| '(' Tuple ')' { $2 } |
|
|
|
|
|
|
|
Tuple :: { Expr } |
|
|
|
: Exp { $1 } |
|
|
|
| Exp ',' Tuple { Pair $1 $3 } |
|
|
|
|
|
|
|
Atom :: { Expr } |
|
|
|
: var { Var $1 } |
|
|
|
|
|
|
|
{ |
|
|
|
lexer cont = alexMonadScan >>= cont |
|
|
|
|
|
|
|