Hi,

I'm the developer of Camlhighlight [1], a small library that uses
GNU Source-highlight to provide syntax highlighting facilities for
Ocsigen applications.  (Ocsigen is a web programming framework for
the OCaml language [2,3]).

The method I'm using to parse Source-highlight's output is a bit
of a hack, but it's simple and it works perfectly.  Essentially,
I've defined a new outlang that outputs S-expressions (as in LISP),
which are trivial to convert into OCaml data structures.  However,
this approach requires that users install the new outlang file into
their /usr/share/source-highlight directory (perhaps Source-highlight
also supports a home-local installation -- I haven't checked).

Anyway, since this approach is generic enough and may be useful to
other libraries/applications that rely on Source-highlight, would it
possible for the S-expression outlang to ship with the library by
default?  It's contents are really trivial, requiring only special
care to escape the backslash and the double commas:

====== sexp.outlang ======


onestyle "($style \"$text\")"

translations
"\\"    "\\\\"
"\""    "\\\""
end
==========================

What do you think?

Thanks in advance for your time!
Kind regards,

Dario Teixeira


[1] http://camlhighlight.forge.ocamlcore.org/
[2] http://ocsigen.org/
[3] http://ocaml.org/


_______________________________________________
Help-source-highlight mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-source-highlight

Reply via email to