From bc5e6269693ad400c17d5dcd21d60d5f03149ab9 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 17 Oct 2015 23:11:39 -0400 Subject: First commit! --- README | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 README (limited to 'README') diff --git a/README b/README new file mode 100644 index 0000000..f0a05df --- /dev/null +++ b/README @@ -0,0 +1,66 @@ +-*- mode: org -*- + +Guile-syntax-highlight is a general-purpose syntax highlighting +library for GNU Guile. It can parse code written in various +programming languages into a simple s-expression that can be easily +converted to HTML (via SXML) or any other format for rendering. + +* Example + + #+BEGIN_SRC scheme + (use-modules (syntax-highlight) + (syntax-highlight scheme) + (sxml simple)) + + (define code + "(define (square x) \"Return the square of X.\" (* x x))") + + ;; Get raw highlights list. + (define highlighted-code + (highlight scheme-highlighter code)) + + ;; Convert to SXML. + (define highlighted-sxml + (highlights->sxml highlighted-code)) + + ;; Write HTML to stdout. + (display (sxml->xml highlighted-sxml)) + (newline) + #+END_SRC + +* Requirements + + - GNU Guile >= 2.0.9 + +* Building + + Guile-syntax-highlight uses the familiar GNU build system and + requires GNU Make to build. + +** From tarball + + After extracting the tarball, run: + + #+BEGIN_SRC sh + ./configure + make + make install + #+END_SRC + +** From Git + + In addition to GNU Make, building from Git requires GNU Automake + and Autoconf. + + #+BEGIN_SRC sh + git clone git@dthompson.us:guile-syntax-highlight.git + cd guile-syntax-highlight + ./bootstrap + ./configure + make + make install + #+END_SRC + +* License + + LGPLv3 or later. See =COPYING= for the full license text. -- cgit v1.2.3