caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Unicode solutions
@ 2010-04-12 14:35 Jacques Carette
  2010-04-12 15:44 ` [Caml-list] " Dario Teixeira
  2010-04-12 17:30 ` Francois Pottier
  0 siblings, 2 replies; 3+ messages in thread
From: Jacques Carette @ 2010-04-12 14:35 UTC (permalink / raw)
  To: caml-list

I need to be able to lex/parse and pretty-print unicode with caml.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Unicode solutions
  2010-04-12 14:35 Unicode solutions Jacques Carette
@ 2010-04-12 15:44 ` Dario Teixeira
  2010-04-12 17:30 ` Francois Pottier
  1 sibling, 0 replies; 3+ messages in thread
From: Dario Teixeira @ 2010-04-12 15:44 UTC (permalink / raw)
  To: caml-list, Jacques Carette

Hi,

> 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






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Unicode solutions
  2010-04-12 14:35 Unicode solutions Jacques Carette
  2010-04-12 15:44 ` [Caml-list] " Dario Teixeira
@ 2010-04-12 17:30 ` Francois Pottier
  1 sibling, 0 replies; 3+ messages in thread
From: Francois Pottier @ 2010-04-12 17:30 UTC (permalink / raw)
  To: Jacques Carette; +Cc: caml-list


On Mon, Apr 12, 2010 at 10:35:24AM -0400, Jacques Carette wrote:
> [It's not clear to me that ulex + menhir works]

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.Pottier@inria.fr
http://gallium.inria.fr/~fpottier/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-12 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-12 14:35 Unicode solutions Jacques Carette
2010-04-12 15:44 ` [Caml-list] " Dario Teixeira
2010-04-12 17:30 ` Francois Pottier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).