Module Cf_dfa.T.Op


module Op: sig .. end
Open this module to bring the composition operators into the current scope.

val ($|) : Cf_dfa.T.expr_t -> Cf_dfa.T.expr_t -> Cf_dfa.T.expr_t
Use a $| b to compose an expression that matches either a or b in the symbol stream.
val ($&) : Cf_dfa.T.expr_t -> Cf_dfa.T.expr_t -> Cf_dfa.T.expr_t
Use a $& b to compose an expression that matches a followed by b in the symbol stream.
val (!*) : Cf_dfa.T.expr_t -> Cf_dfa.T.expr_t
Use !*a to compose an expression that matches zero or more occurances of a in the symbol stream.
val (!+) : Cf_dfa.T.expr_t -> Cf_dfa.T.expr_t
Use !+a to compose an expression that matches one or more occurances of a in the symbol stream.
val (!?) : Cf_dfa.T.expr_t -> Cf_dfa.T.expr_t
Use !?a to compose an expression that matches zero or one occurance of a in the symbol stream.
val (!:) : S.t -> Cf_dfa.T.expr_t
Use !:sym to compose an expression that matches the symbol sym in the symbol stream.
val (!^) : (S.t -> bool) -> Cf_dfa.T.expr_t
Use !^f to compose an expression that matches any symbol in the symbol stream for which applying the function f returns true.
val (!~) : S.t Cf_seq.t -> Cf_dfa.T.expr_t
Use !~z to compose an expression that matches the sequence of symbols z in the symbol stream.
val ($=) : Cf_dfa.T.expr_t -> 'a -> (S.t #Cf_dfa.cursor, 'a) Cf_dfa.T.rule_t
Use e $= x to compose a rule that produces x when the symbols in the symbol stream match the expression e.
val ($>) : Cf_dfa.T.expr_t ->
(S.t Cf_seq.t -> 'a) -> (S.t #Cf_dfa.cursor, 'a) Cf_dfa.T.rule_t
Use e $> f to compose a rule that applies the tokenizer function f to the sequence of symbols in the symbol stream recognized by the expression e to produce an output token.
val ($@) : Cf_dfa.T.expr_t ->
(int -> (S.t #Cf_dfa.cursor as 'a, 'b) Cf_dfa.T.t) ->
('a, 'b) Cf_dfa.T.rule_t
Use e $@ f to compose a rule that applies the scanning function f to the input symbol stream when it is recognized by the expression e. The scanning function is passed the length of the recognized sequence of symbols and the receives as a parser in result that produces the output of the makes any advanced manipulations of the input stream necessary to continue parsing for the next token. If the parser returned from the scanning function does not recognize the input stream, then the rule is not matched and the next best matching rule is selected.
val (!@) : (S.t #Cf_dfa.cursor as 'a, 'b) Cf_dfa.T.rule_t list ->
('a, 'b) Cf_dfa.T.rule_t
Use this operator to combine a list of rules into a single rule.