File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 11(executables
2- (public_names lsc sgen)
3- (names lscrun sgen)
2+ (public_names lsc sgen isgen )
3+ (names lscrun sgen isgen )
44 (libraries lsc stellogen base))
55
66(env
Original file line number Diff line number Diff line change 1+ open Base
2+
3+ let rec loop env =
4+ let lexbuf = Lexing. from_channel Stdlib. stdin in
5+ let d = Stellogen.Sgen_parser. declaration Stellogen.Sgen_lexer. read lexbuf in
6+ let wrapped_env =
7+ Stellogen.Sgen_eval. eval_decl ~typecheckonly: false ~notyping: false env d
8+ in
9+ match wrapped_env with
10+ | Ok env' -> loop env'
11+ | Error e ->
12+ let ( let* ) x f = Result. bind x ~f in
13+ let * pp = Stellogen.Sgen_eval. pp_err ~notyping: false e in
14+ Stdlib. output_string Stdlib. stderr pp;
15+ Stdlib. flush Stdlib. stderr;
16+ loop env
17+
18+ let () =
19+ let _ = loop Stellogen.Sgen_ast. initial_env in
20+ ()
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ open Sgen_ast
1818% token PROOF LEMMA THEOREM
1919
2020% start < Sgen_ast. program> program
21+ % start < Sgen_ast. declaration> declaration
2122
2223%%
2324
You can’t perform that action at this time.
0 commit comments