1

I have defined a token for ocamllex let non_line_termination_character = [^ '\x0D' '\x0A'], which represents any character other than '\x0D' and '\x0A'.

Now, I would like to translate it to sedlex.

Does anyone know how to translate it correctly? Should I use SUB (e.g., SUB(SUB(any, '\x0D'), '\x0A') or SUB(any, ('\x0D' | '\x0A')))?

SoftTimur
  • 5,630
  • 38
  • 140
  • 292

1 Answers1

1

This corresponds to Compl as described in sedlex documentation

Compl  ('\x0D' | '\x0A')

See also the example at https://github.com/ocaml-community/sedlex/blob/master/examples/complement.ml .

octachron
  • 17,178
  • 2
  • 16
  • 23