Higlo is an OCaml library for syntax highlighting. Higlo could mean Highlighting in Ocaml.
The purpose of Higlo is not to provide syntax highlighting for every language, nor target every format (HTML, LaTeX, ...). It provides a simple way to support additional languages and develop the generator for the output format you need.
By now, only some input languages are supported (OCaml, XML, JSON and Graphviz/dot), and it only generates Xtmpl.Rewrite.tree to highlight code in XML. Developing support for additional input languages is just a matter of writing a Sedlex lexer. Supporting another output format only requires mapping values of type token.
See the OCaml lexer for an example of Higlo Sedlex lexer.
Higlo is hosted on Framagit.
To compile and install:
This will install the
higlo.xml packages with findlib.
It will also install the
higlo command line tool
mk-higlo script in
the same directory as ocamlfind.
Higlo is released under the LGPL v3.
Maxence Guesdon <Maxence 'DOT' Guesdon 'AT' inria 'DOT' fr>