implicitt/lib/Raw/implicitt.cf

48 lines
1.3 KiB
CFEngine3
Raw Normal View History

2023-01-25 21:17:49 +01:00
entrypoints [Def], Exp ;
token Id ((letter|digit|["[]_"])+) ;
comment "--" ;
comment "{-" "-}" ;
2023-01-25 22:20:13 +01:00
BE. BD ::= Id;
BI. BD ::= "{" Id "}";
2023-01-25 21:17:49 +01:00
separator nonempty BD "" ;
2023-01-25 22:20:13 +01:00
ExpPiE. Exp ::= "Π" "(" Id ":" Exp ")" Exp;
ExpPiI. Exp ::= "Π" "{" Id ":" Exp "}" Exp;
ExpSig. Exp ::= "Σ" "(" Id ":" Exp ")" Exp;
2023-01-26 21:13:51 +01:00
ExpLet. Exp ::= "let" Id ":" Exp "" Exp "in" Exp;
2023-01-25 22:20:13 +01:00
ExpLam. Exp ::= "λ" [BD] "." Exp;
2023-01-26 19:17:23 +01:00
ExpAppI. Exp1 ::= Exp1 "{" Exp "}";
ExpAppE. Exp1 ::= Exp1 Exp2;
2023-01-26 21:13:51 +01:00
ExpFst. Exp1 ::= "pr" Exp2;
ExpSnd. Exp1 ::= "pr" Exp2;
ExpSuc. Exp1 ::= "S" Exp2;
2023-01-31 19:51:46 +01:00
ExpInd0. Exp1 ::= "-elim" "" Id "" Exp "" Exp2;
ExpIndN. Exp1 ::= "-elim" "" Id "" Exp ""
"" "0" "" Exp
"," "S" Id Id "" Exp "" Exp2;
ExpIndB. Exp1 ::= "𝔹-elim" "" Id "" Exp ""
"" "T" "" Exp
"," "F" "" Exp "" Exp2;
2023-01-25 22:20:13 +01:00
ExpVar. Exp2 ::= Id;
ExpT0. Exp2 ::= "";
ExpT1. Exp2 ::= "";
ExpT1tr. Exp2 ::= "";
ExpTNat. Exp2 ::= "";
2023-01-26 21:13:51 +01:00
ExpZero. Exp2 ::= "0";
2023-01-25 22:20:13 +01:00
ExpTBool. Exp2 ::= "𝔹";
2023-01-26 21:13:51 +01:00
ExpTrue. Exp2 ::= "T";
ExpFalse. Exp2 ::= "F";
ExpPair. Exp2 ::= "" Exp "," Exp "";
ExpHole. Exp2 ::= "?";
2023-01-25 22:20:13 +01:00
2023-01-31 19:51:46 +01:00
2023-01-26 19:17:23 +01:00
coercions Exp 2 ;
2023-01-26 21:13:51 +01:00
VarDef. Def ::= "def" Id ":" Exp "" Exp;
2023-01-25 22:20:13 +01:00
2023-01-26 19:17:23 +01:00
separator Def "" ;