module Cf_lex:sig..end
Lexical analysis with functional composition of regular grammars.
This module implements functional parsers on octet character sequences using regular expressions and functional composition of lazy deterministic finite automata.
typex =Cf_regex.DFA.x
The type of regular expressions.
type'ar ='a Cf_regex.DFA.r
The type of lexical analysis rules.
type'at =(char, 'a) Cf_parser.t
Character stream parser.
val nil : xEpsilon, i.e. a subexpression that matches an empty input sequence.
val create : 'a r -> 'a tUse create r to compose a lexical analyzer from the rule r.
module type Expr_Op_T =sig..end
The module type containing the subexpression composition operators.
module Op:sig..end
Open this module to bring the operator functions for simple parsers into the current scope.
module X:sig..end
A module of parser extensions for working with input sequences that require position information to woven into the parse function.
type counter = {
|
c_pos : |
(* | The character index (counts from zero). | *) |
|
c_row : |
(* | The column number (counts from zero). | *) |
|
c_col : |
(* | The row number (counts from zero). | *) |
}
A record used by the cursor class defined below that indicates the
character index, row and column in the input stream associated with a
cursor position.
val counter_zero : counterThe initial value of a cursor position counter.
class cursor :?c:counter -> string ->object..end
A class derived from Cf_parser.cursor that intercepts newline characters
to track the row and column of a cursor position.