Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] parsing OCaml code
@ 2005-07-19 17:05 Nathaniel J. Gaylinn
  2005-07-19 19:12 ` Eric Cooper
  2005-07-19 19:20 ` Sylvain LE GALL
  0 siblings, 2 replies; 3+ messages in thread
From: Nathaniel J. Gaylinn @ 2005-07-19 17:05 UTC (permalink / raw)
  To: OCaml Mailing List


I'm trying to figure out a nice way to parse OCaml code in a C++ program. 
All I need is a very basic parse tree for use in syntax highlighting and 
indenting OCaml code.

I would love to make use of some of the programs that already come with 
OCaml. For instance, ocamlc and camlp4 can both output OCaml parse trees 
already! The only problem is the formats that these programs output are 
(to my knowledge) completely undocumented.

If I don't use these programs, I could always try using Lex and Yacc to do 
the job, but I'm completely unfamiliar with these utilities and it would 
take me quite some time to write input for parsing OCaml.

Does anyone know where I could find reference to the various OCaml parse 
tree formats? Does anyone know where I could find Yacc grammar 
descriptions of OCaml, or would I have to write them myself? Does anyone 
have any other suggestions of how to tackle the parsing problem?

Thanks,

   -- Nate Gaylinn


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

end of thread, other threads:[~2005-07-19 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-19 17:05 [Caml-list] parsing OCaml code Nathaniel J. Gaylinn
2005-07-19 19:12 ` Eric Cooper
2005-07-19 19:20 ` Sylvain LE GALL

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