|
@ -68,21 +68,18 @@ VarList :: { [Text] } |
|
|
| var VarList { $1:$2 } |
|
|
| var VarList { $1:$2 } |
|
|
|
|
|
|
|
|
ExpProj :: { Expr } |
|
|
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 ')' { $2 } |
|
|
|
|
|
|
|
|
Tuple :: { Expr } |
|
|
Tuple :: { Expr } |
|
|
: Exp { $1 } |
|
|
: Exp { $1 } |
|
|
| Exp ',' Tuple { Pair $1 $3 } |
|
|
| Exp ',' Tuple { Pair $1 $3 } |
|
|
|
|
|
|
|
|
Atom :: { Expr } |
|
|
|
|
|
: var { Var $1 } |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
lexer cont = alexMonadScan >>= cont |
|
|
lexer cont = alexMonadScan >>= cont |
|
|
|
|
|
|
|
|