implicitt/lib/Raw/implicitt.cf

37 lines
922 B
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;
ExpLet. Exp ::= "let" Id ":" Exp ":=" Exp "in" Exp;
ExpLam. Exp ::= "λ" [BD] "." Exp;
2023-01-26 19:17:23 +01:00
ExpAppI. Exp1 ::= Exp1 "{" Exp "}";
ExpAppE. Exp1 ::= Exp1 Exp2;
2023-01-25 22:20:13 +01:00
ExpVar. Exp2 ::= Id;
ExpT0. Exp2 ::= "";
ExpT1. Exp2 ::= "";
ExpT1tr. Exp2 ::= "";
ExpTNat. Exp2 ::= "";
ExpTZero. Exp2 ::= "0";
ExpTSuc. Exp2 ::= "S";
ExpTBool. Exp2 ::= "𝔹";
ExpTTrue. Exp2 ::= "T";
ExpTFalse. Exp2 ::= "F";
ExpTPair. Exp2 ::= "" Exp "," Exp "";
ExpTFst. Exp2 ::= "pr";
ExpTSnd. Exp2 ::= "pr";
2023-01-26 19:17:23 +01:00
coercions Exp 2 ;
2023-01-25 22:20:13 +01:00
VarDef. Def ::= "def" Id ":" Exp ":=" Exp;
2023-01-26 19:17:23 +01:00
separator Def "" ;