Module Earley_str
Earley support for Str regular expressions.
val blank_regexp : string -> Earley_core.Input.buffer -> int -> Earley_core.Input.buffer * intblank_regexp reproduces a blank function from the regexpre(following theStrsyntax). There is an important limitation rega- rding regular expressions containing the newline character'\n', due to the fact that theStrmodule only matches on strings (and not on an abstract notion of buffer). Such regular expressions can only be used if they are idempotent.
val regexp : ?name:string -> string -> ((int -> string) -> 'a) -> 'a Earley_core.Earley.grammarregexp ?name re gis a grammar that parses the input according to the regular expressionre, and returns a value built by applying the functiongto a function of typeint -> stringthat returns the substring matched by then-th match group of the regexpre(as in theStrmodule). The optionalnameargument is used to refer to the regular expression in error messages.