moved stuff
This commit is contained in:
parent
4f21a58200
commit
988d0dbb53
1 changed files with 13 additions and 13 deletions
24
Grammar.cf
24
Grammar.cf
|
|
@ -42,6 +42,18 @@ Data. Data ::= "data" Type "where" "{" [Inj] "}" ;
|
||||||
|
|
||||||
Inj. Inj ::= UIdent ":" Type ;
|
Inj. Inj ::= UIdent ":" Type ;
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
-- * PATTERN MATCHING
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Branch. Branch ::= Pattern "=>" Exp ;
|
||||||
|
|
||||||
|
PVar. Pattern1 ::= LIdent;
|
||||||
|
PLit. Pattern1 ::= Lit;
|
||||||
|
PCatch. Pattern1 ::= "_";
|
||||||
|
PEnum. Pattern1 ::= UIdent;
|
||||||
|
PInj. Pattern ::= UIdent [Pattern1];
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- * Expressions
|
-- * Expressions
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
@ -70,18 +82,6 @@ define infixSymbol e1 vn e3 = EApp (EApp (EVarS (VSymbol vn)) e1) e3;
|
||||||
LInt. Lit ::= Integer;
|
LInt. Lit ::= Integer;
|
||||||
LChar. Lit ::= Char;
|
LChar. Lit ::= Char;
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- * PATTERN MATCHING
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Branch. Branch ::= Pattern "=>" Exp ;
|
|
||||||
|
|
||||||
PVar. Pattern1 ::= LIdent;
|
|
||||||
PLit. Pattern1 ::= Lit;
|
|
||||||
PCatch. Pattern1 ::= "_";
|
|
||||||
PEnum. Pattern1 ::= UIdent;
|
|
||||||
PInj. Pattern ::= UIdent [Pattern1];
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- * AUX
|
-- * AUX
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue