diff options
| author | Emilio Jesus Gallego Arias | 2020-03-13 07:17:57 -0400 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2020-03-25 23:45:57 -0400 |
| commit | f759aaf9de94a11aa34a31c869829d60243d273d (patch) | |
| tree | 3934cdf4dada8bd15be3b8f39bae36e6e3ad519b /toplevel | |
| parent | ef3079e22fa7941d3335d7779c840e8d2d2bde39 (diff) | |
[pcoq] Inline the exported Gramlib interface instead of exposing it as G
Diffstat (limited to 'toplevel')
| -rw-r--r-- | toplevel/coqloop.ml | 10 | ||||
| -rw-r--r-- | toplevel/coqloop.mli | 2 | ||||
| -rw-r--r-- | toplevel/vernac.ml | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/toplevel/coqloop.ml b/toplevel/coqloop.ml index 0d9edb248b..b8acdd3af1 100644 --- a/toplevel/coqloop.ml +++ b/toplevel/coqloop.ml @@ -23,7 +23,7 @@ type input_buffer = { mutable str : Bytes.t; (* buffer of already read characters *) mutable len : int; (* number of chars in the buffer *) mutable bols : int list; (* offsets in str of beginning of lines *) - mutable tokens : Pcoq.G.Parsable.t; (* stream of tokens *) + mutable tokens : Pcoq.Parsable.t; (* stream of tokens *) mutable start : int } (* stream count of the first char of the buffer *) (* Double the size of the buffer. *) @@ -76,7 +76,7 @@ let reset_input_buffer doc ic ibuf = ibuf.str <- Bytes.empty; ibuf.len <- 0; ibuf.bols <- []; - ibuf.tokens <- Pcoq.G.Parsable.make (Stream.from (prompt_char doc ic ibuf)); + ibuf.tokens <- Pcoq.Parsable.make (Stream.from (prompt_char doc ic ibuf)); ibuf.start <- 0 (* Functions to print underlined locations from an input buffer. *) @@ -230,7 +230,7 @@ let top_buffer = str = Bytes.empty; len = 0; bols = []; - tokens = Pcoq.G.Parsable.make (Stream.of_list []); + tokens = Pcoq.Parsable.make (Stream.of_list []); start = 0 } let set_prompt prompt = @@ -247,7 +247,7 @@ let parse_to_dot = | Tok.EOI -> () | _ -> dot tok st in - Pcoq.G.Entry.of_parser "Coqtoplevel.dot" dot + Pcoq.Entry.of_parser "Coqtoplevel.dot" dot (* If an error occurred while parsing, we try to read the input until a dot token is encountered. @@ -255,7 +255,7 @@ let parse_to_dot = let rec discard_to_dot () = try - Pcoq.G.Entry.parse parse_to_dot top_buffer.tokens + Pcoq.Entry.parse parse_to_dot top_buffer.tokens with | CLexer.Error.E _ -> discard_to_dot () | e when CErrors.noncritical e -> () diff --git a/toplevel/coqloop.mli b/toplevel/coqloop.mli index b07f3e5c57..1eafc70530 100644 --- a/toplevel/coqloop.mli +++ b/toplevel/coqloop.mli @@ -18,7 +18,7 @@ type input_buffer = { mutable str : Bytes.t; (** buffer of already read characters *) mutable len : int; (** number of chars in the buffer *) mutable bols : int list; (** offsets in str of beginning of lines *) - mutable tokens : Pcoq.G.Parsable.t; (** stream of tokens *) + mutable tokens : Pcoq.Parsable.t; (** stream of tokens *) mutable start : int } (** stream count of the first char of the buffer *) (** The input buffer of stdin. *) diff --git a/toplevel/vernac.ml b/toplevel/vernac.ml index f501e89ed5..076796468f 100644 --- a/toplevel/vernac.ml +++ b/toplevel/vernac.ml @@ -88,7 +88,7 @@ let load_vernac_core ~echo ~check ~interactive ~state file = let input_cleanup () = close_in in_chan; Option.iter close_in in_echo in let in_pa = - Pcoq.G.Parsable.make ~loc:(Loc.initial (Loc.InFile file)) + Pcoq.Parsable.make ~loc:(Loc.initial (Loc.InFile file)) (Stream.of_channel in_chan) in let open State in @@ -100,7 +100,7 @@ let load_vernac_core ~echo ~check ~interactive ~state file = with | None -> input_cleanup (); - state, ids, Pcoq.G.Parsable.comments in_pa + state, ids, Pcoq.Parsable.comments in_pa | Some ast -> (* Printing of AST for -compile-verbose *) Option.iter (vernac_echo ?loc:ast.CAst.loc) in_echo; |
