From: "Nathaniel J. Gaylinn" <ngaylinn@cs.brown.edu>
To: OCaml Mailing List <caml-list@yquem.inria.fr>
Subject: [Caml-list] parsing OCaml code
Date: Tue, 19 Jul 2005 13:05:58 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.62.0507191246030.30865@point> (raw)
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
next reply other threads:[~2005-07-19 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-19 17:05 Nathaniel J. Gaylinn [this message]
2005-07-19 19:12 ` Eric Cooper
2005-07-19 19:20 ` Sylvain LE GALL
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.62.0507191246030.30865@point \
--to=ngaylinn@cs.brown.edu \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).