I would like to define non-line-termination-character = <any character other than %x000D / %x000A>
in lexer.mll
. I have tried let non_line_termination_character = [^('\x0D' '\x0A')]
, but it gave me a syntax error.
I think let non_line_termination_character = [^'\x0D'] intersect [^'\x0A']
would work, but I don't know how to express intersect
.
Could anyone help?
PS: The rule is at 12.2.4 Regular expressions
of : http://caml.inria.fr/pub/docs/manual-ocaml/manual026.html