-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and reorganize code to avoid future buffer sharing
- Loading branch information
Showing
12 changed files
with
114 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
open! Core | ||
|
||
val lowercase : char -> bool | ||
|
||
val alphanum : char -> bool | ||
|
||
val is_identifier : char -> bool | ||
|
||
val is_ws : char -> bool | ||
|
||
val is_mlws : char -> bool | ||
|
||
val ws : unit Angstrom.t | ||
|
||
val ws1 : unit Angstrom.t | ||
|
||
val mlws : unit Angstrom.t | ||
|
||
val mlws1 : unit Angstrom.t | ||
|
||
val take_remaining : string Angstrom.t | ||
|
||
val skip_remaining : unit Angstrom.t | ||
|
||
val maybe : 'a Angstrom.t -> 'a option Angstrom.t | ||
|
||
val make_sq_string : unit -> string Angstrom.t | ||
|
||
val make_dq_string : unit -> string Angstrom.t | ||
|
||
type string_parsers = { | ||
sq_string: string Angstrom.t; | ||
dq_string: string Angstrom.t; | ||
} | ||
|
||
val make_string_parsers : unit -> string_parsers | ||
|
||
val boundary_parsers : string -> (string, string option) Core.Tuple2.t list Angstrom.t * string Angstrom.t | ||
|
||
val block_parser : | ||
(unit -> 'a Angstrom.t * 'b Angstrom.t) -> Buffer.t -> f:(string -> 'a -> 'c) -> 'c Angstrom.t | ||
|
||
val default_error_handler : path:string -> language_name:string -> unparsed:string -> 'a | ||
|
||
val default_syntax_error_handler : path:string -> language_name:string -> msg:string -> 'a | ||
|
||
val exec_parser : | ||
on_ok:('a -> 'b) -> | ||
?on_error:(msg:string -> 'b) -> | ||
'a Angstrom.t -> | ||
path:string -> | ||
language_name:string -> | ||
string -> | ||
'b | ||
|
||
val exec_parser_lwt : | ||
on_ok:('a -> 'b Lwt.t) -> | ||
?on_error:(unparsed:string -> 'a option -> 'b Lwt.t) -> | ||
'a Angstrom.t -> | ||
path:string -> | ||
language_name:string -> | ||
Lwt_io.input_channel -> | ||
'b Lwt.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
open! Core | ||
|
||
include S.Parser | ||
type t [@@deriving sexp_of] | ||
|
||
val collect : Utils.Collector.t -> t -> unit | ||
|
||
val parser : t Angstrom.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
open! Core | ||
|
||
include S.Parser | ||
type t [@@deriving sexp_of] | ||
|
||
val collect : Utils.Collector.t -> t -> unit | ||
|
||
val parser : Basic.string_parsers -> t Angstrom.t |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters