work on BNFC dune integration
This commit is contained in:
parent
00667c11af
commit
60890cbdd9
10
lib/Raw/dune
10
lib/Raw/dune
|
@ -1,2 +1,10 @@
|
||||||
|
(ocamllex "LexImplicitt")
|
||||||
|
(ocamlyacc "ParImplicitt")
|
||||||
|
|
||||||
|
(env
|
||||||
|
(dev
|
||||||
|
(flags (:standard -warn-error -A))))
|
||||||
|
|
||||||
(library
|
(library
|
||||||
(name Raw))
|
(name Raw)
|
||||||
|
(modules "AbsImplicitt" "BNFC_Util" "LexImplicitt" "ParImplicitt"))
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
layout toplevel ;
|
|
||||||
layout "let" ;
|
|
||||||
layout stop "in" ;
|
|
||||||
|
|
||||||
entrypoints [Def], Exp ;
|
entrypoints [Def], Exp ;
|
||||||
|
|
||||||
token Id ((letter|digit|["[]_"])+) ;
|
token Id ((letter|digit|["[]_"])+) ;
|
||||||
|
@ -9,33 +5,30 @@ token Id ((letter|digit|["[]_"])+) ;
|
||||||
comment "--" ;
|
comment "--" ;
|
||||||
comment "{-" "-}" ;
|
comment "{-" "-}" ;
|
||||||
|
|
||||||
Assign. Assign ::= Id ":=" Exp ;
|
BE. BD ::= Id;
|
||||||
separator nonempty Assign ";" ;
|
BI. BD ::= "{" Id "}";
|
||||||
|
|
||||||
BD. BE ::= Id
|
|
||||||
BD. BI ::= "{" Id "}"
|
|
||||||
separator nonempty BD "" ;
|
separator nonempty BD "" ;
|
||||||
|
|
||||||
ExpPiE. Exp ::= "Π" "(" Id ":" Exp ")" Exp
|
ExpPiE. Exp ::= "Π" "(" Id ":" Exp ")" Exp;
|
||||||
ExpPiI. Exp ::= "Π" "{" Id ":" Exp "}" Exp
|
ExpPiI. Exp ::= "Π" "{" Id ":" Exp "}" Exp;
|
||||||
ExpSig. Exp ::= "Σ" "(" Id ":" Exp ")" Exp
|
ExpSig. Exp ::= "Σ" "(" Id ":" Exp ")" Exp;
|
||||||
ExpLet. Exp ::= "let" "{" [Assign] "}" "in" Exp
|
ExpLet. Exp ::= "let" Id ":" Exp ":=" Exp "in" Exp;
|
||||||
ExpLam. Exp ::= "λ" [BD] "." Exp
|
ExpLam. Exp ::= "λ" [BD] "." Exp;
|
||||||
ExpVar. Exp ::= Id
|
ExpApp. Exp1 ::= Exp1 Exp2;
|
||||||
ExpT0. Exp ::= "⊥"
|
ExpVar. Exp2 ::= Id;
|
||||||
ExpT1. Exp ::= "⊤"
|
ExpT0. Exp2 ::= "⊥";
|
||||||
ExpT1tr. Exp ::= "⋆"
|
ExpT1. Exp2 ::= "⊤";
|
||||||
ExpTNat. Exp ::= "ℕ"
|
ExpT1tr. Exp2 ::= "⋆";
|
||||||
ExpTZero. Exp ::= "0"
|
ExpTNat. Exp2 ::= "ℕ";
|
||||||
ExpTSuc. Exp ::= "S"
|
ExpTZero. Exp2 ::= "0";
|
||||||
ExpTBool. Exp ::= "𝔹"
|
ExpTSuc. Exp2 ::= "S";
|
||||||
ExpTTrue. Exp ::= "T"
|
ExpTBool. Exp2 ::= "𝔹";
|
||||||
ExpTFalse. Exp ::= "F"
|
ExpTTrue. Exp2 ::= "T";
|
||||||
ExpTPair. Exp ::= "⟨" Exp , Exp "⟩"
|
ExpTFalse. Exp2 ::= "F";
|
||||||
ExpTFst. Exp ::= "pr₁"
|
ExpTPair. Exp2 ::= "⟨" Exp "," Exp "⟩";
|
||||||
ExpTSnd. Exp ::= "pr₂"
|
ExpTFst. Exp2 ::= "pr₁";
|
||||||
ExpApp. Exp ::= Exp Exp
|
ExpTSnd. Exp2 ::= "pr₂";
|
||||||
|
|
||||||
VarDef. Def ::= "def" Id ":" Exp ":=" Exp
|
VarDef. Def ::= "def" Id ":" Exp ":=" Exp;
|
||||||
|
|
||||||
seperator Def ";"
|
separator Def ";" ;
|
Loading…
Reference in New Issue
Block a user