Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Dynamically switching lexer
@ 2008-01-09 22:18 Till Varoquaux
  2008-01-10  9:29 ` [Caml-list] " Nicolas Pouillard
  0 siblings, 1 reply; 2+ messages in thread
From: Till Varoquaux @ 2008-01-09 22:18 UTC (permalink / raw)
  To: ocaml

I'm currently doing a toy DSEL,
Camlp4 pops to mind as a very nice way to embed it unfortunately the
standard lexer it comes with is not all that great for my language.
Although I do know how to use another lexer it comes with a catch:
antiquotation need to be properly lexed to string to be passed to the
standard ocaml parser as strings (I use
let expr_of_string = Gram.parse_string Syntax.expr_eoi
this seems simpler than what is shown in tutorials. Am I missing
something?) off course the easy way to delimit such strings
(respecting nested comments, escaped strings...) would be to use the
former lexer, It would need to be switched between both lexers, is
this all possibe?.
Cheers,
Till


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

end of thread, other threads:[~2008-01-10  9:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-09 22:18 Dynamically switching lexer Till Varoquaux
2008-01-10  9:29 ` [Caml-list] " Nicolas Pouillard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox