Module Earley_core.Blanks
val none : Earley.blank
none
is a blank function that does not parse anything.
val default : Earley.blank
default
is a blank function that ignores an arbitrary number of spacing characters. They include' '
,'\t'
,'\r'
and'\n'
.
val from_charset : Charset.t -> Earley.blank
from_charset cs
is a blank function that ignores an arbitrary number of characters from the character setcs
.
val line_comments : ?blanks:Charset.t -> string -> Earley.blank
line_comments ?blanks=cs delim
is a blank function that behaves the same asfrom_charset cs
, but it also ignores single-line comments starting bydelim
. The exceptionInvalid_argument
whendelim
is empty or when it starts with a character ofcs
.
exception
Bad_ocaml_comment of string * Input.buffer * int
val ocaml_blank : Earley.blank