> Ah, that really sucks. I love named subpatterns with "as" in ocamllex.
> That's one of the things I miss in F#...
Indeed. Ulex seems like a really cool idea, but it
still has a few warts. I would only recommend it if you
*really* need to lex Unicode and are willing to deal with
its shortcomings (such as the lack of the "as" operator
and bad documentation). Ocaml beginner's will spare
themselves a lot of grief if they just stick with ocamllex:
the documentation is a lot better and it integrates more
easily with ocamlyacc.
On a related note, does anyone know how to convince
ocamlyacc that the tokenizer function (called, for example,
"token", and returning a value of token_t) should have a
signature like (Ulexing.lexbuf -> token_t) ?
Ocamlyacc seems hard-wired to assume that the tokenizer has
a (Lexing.lexbuf -> token_t) signature, which is obviously
wrong if you're using ulex. (Just one of those warts that
has been causing me some grief...)
Thanks for your attention,
C.S.