work on BNFC dune integration

This commit is contained in:
Rachel Lambda Samuelsson 2023-01-25 22:20:13 +01:00
parent 00667c11af
commit 60890cbdd9
2 changed files with 32 additions and 31 deletions

View File

@ -1,2 +1,10 @@
(ocamllex "LexImplicitt")
(ocamlyacc "ParImplicitt")
(env
(dev
(flags (:standard -warn-error -A))))
(library
(name Raw))
(name Raw)
(modules "AbsImplicitt" "BNFC_Util" "LexImplicitt" "ParImplicitt"))

View File

@ -1,7 +1,3 @@
layout toplevel ;
layout "let" ;
layout stop "in" ;
entrypoints [Def], Exp ;
token Id ((letter|digit|["[]_"])+) ;
@ -9,33 +5,30 @@ token Id ((letter|digit|["[]_"])+) ;
comment "--" ;
comment "{-" "-}" ;
Assign. Assign ::= Id ":=" Exp ;
separator nonempty Assign ";" ;
BD. BE ::= Id
BD. BI ::= "{" Id "}"
BE. BD ::= Id;
BI. BD ::= "{" 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
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;
ExpApp. Exp1 ::= Exp1 Exp2;
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";
VarDef. Def ::= "def" Id ":" Exp ":=" Exp
VarDef. Def ::= "def" Id ":" Exp ":=" Exp;
seperator Def ";"
separator Def ";" ;