I am aware of several 'solutions' for each part, but I would choose to
use whatever library seamlessly allows me to both parse and build
pretty-printers for unicode-based input.
For example, it is unclear to me that module Print in Batteries
integrates well with UTF8.t - but that could just be a documentation
issue. Camomile seems to be good for the representation part, but does
not seem to offer lex/parse and pretty-print modules.
It seems like ulex + dypgen works for the front-end part. Back-end?
[It's not clear to me that ulex + menhir works]
Jacques
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
> It seems like ulex + dypgen works for the front-end
> part. Back-end?
> [It's not clear to me that ulex + menhir works]
I can confirm that at least with a recent Menhir, you can use whichever lexer
you want, even Ulex. In fact, I have used the Ulex+Menhir combination in a
couple of my own projects, and their source-code is available if you want
to check out how it's done:
https://forge.ocamlcore.org/scm/viewvc.php/trunk/ccss/src/ccss.ml?root=ccss
https://forge.ocamlcore.org/scm/viewvc.php/trunk/lambdoc/src/lib/lambdoc_read_lambtex/main.ml?root=lambdoc
Hope that helps,
Dario Teixeira
Yes, it does. This is documented in the FAQ near the end of the Menhir
reference manual.
In short, although Menhir (like ocamlyacc) produces code whose interface
suggests that it is meant to be used with an ocamllex-generated lexer, this
interface can be easily adapted. Wrappers for this purpose are provided as
part of MenhirLib.
--
François Pottier
Francois...@inria.fr
http://gallium.inria.fr/~fpottier/