implicitt/lib/Raw/implicitt.cf

41 lines
935 B
CFEngine3
Raw Normal View History

2023-01-25 21:17:49 +01:00
layout toplevel ;
layout "let" ;
layout stop "in" ;
entrypoints [Def], Exp ;
token Id ((letter|digit|["[]_"])+) ;
comment "--" ;
comment "{-" "-}" ;
Assign. Assign ::= Id ":=" Exp ;
separator nonempty Assign ";" ;
BD. BE ::= Id
BD. BI ::= "{" Id "}"
separator nonempty BD "" ;
ExpPiE. Exp ::= "Π" "(" Id ":" Exp ")" Exp
ExpPiI. Exp ::= "Π" "{" Id ":" Exp "}" Exp
ExpSig. Exp ::= "Σ" "(" Id ":" Exp ")" Exp
ExpLet. Exp ::= "let" "{" [Assign] "}" "in" Exp
ExpLam. Exp ::= "λ" [BD] "." Exp
ExpVar. Exp ::= Id
ExpT0. Exp ::= ""
ExpT1. Exp ::= ""
ExpT1tr. Exp ::= ""
ExpTNat. Exp ::= ""
ExpTZero. Exp ::= "0"
ExpTSuc. Exp ::= "S"
ExpTBool. Exp ::= "𝔹"
ExpTTrue. Exp ::= "T"
ExpTFalse. Exp ::= "F"
ExpTPair. Exp ::= "" Exp , Exp ""
ExpTFst. Exp ::= "pr"
ExpTSnd. Exp ::= "pr"
ExpApp. Exp ::= Exp Exp
VarDef. Def ::= "def" Id ":" Exp ":=" Exp
seperator Def ";"