Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Dario Teixeira <darioteixeira@yahoo.com>
To: caml-list@inria.fr
Subject: Syntax highlighting and Ocaml/PHP integration
Date: Wed, 1 Oct 2008 08:21:01 -0700 (PDT)	[thread overview]
Message-ID: <650721.83058.qm@web54605.mail.re2.yahoo.com> (raw)

Hi,

I'm looking for a GPL-compatible syntax highlighting library with support
for most common programming languages and markups.  Obviously I would
prefer a native Ocaml library, though something in C would also be
acceptable due the relative ease of writing bindings.

One library that looks competent is GeSHi [1].  Unfortunately it is
written in PHP.  However, for lack of alternatives, I am looking into
ways of integrating GeSHi with Ocaml.

I reckon that a shell invocation of PHP is straightforward, but I bet
that it would entail a huge performance penalty due to the startup time.
Therefore, I am looking into somehow integrating the PHP interpreter
within the main Ocaml programme.  Something like Apache's mod_php.
Does anyone have any experience with this?  (Note that I have *zero*
experience with PHP).

If all else fails, my backup solution is simply to run a small webserver
with GeSHi and transform the library call into a web service.  Though I
would rather avoid this convoluted option.


Thanks in advance for your input!
Best regards,
Dario Teixeira

P.S.  Another (possibly far-fetched) solution is to take advantage of the
      syntax highlighting capabilities of Vim or Emacs.  Something along
      the lines of embedding or remotely invoking one of these editors,
      with the sole purpose of asking them to highlight a text file.
      Is this even possible?

[1] http://qbnz.com/highlighter/






             reply	other threads:[~2008-10-01 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-01 15:21 Dario Teixeira [this message]
2008-10-01 15:27 ` [Caml-list] " Martin Jambon
2008-10-01 15:27 ` Dave Benjamin
2008-10-01 15:45 ` Re : " Adrien
2008-10-01 15:47   ` Re : " Adrien
2008-10-03 15:22 ` Dario Teixeira

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=650721.83058.qm@web54605.mail.re2.yahoo.com \
    --to=darioteixeira@yahoo.com \
    --cc=caml-list@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