Skip to content
Newer
Older
100644 102 lines (68 sloc) 3.89 KB
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
1 highlighting-kate is a Haskell source code highlighting library, based
9971bc5 Added some references to Kate's website for those who don't know Kate.
jgm@berkeley.edu authored Feb 9, 2008
2 on Kate's syntax description files (http://kate-editor.org/).
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
3
7bd486b @tianyicui Added a bunch of XML grammars from Kate
tianyicui authored Dec 9, 2010
4 Currently, the following languages/formats are supported:
5
6 Actionscript, Ada, Alert, Alert_indent, Ansys, Apache, Asn1, Asp, Awk,
7 Bash, Bibtex, Boo, C, Changelog, Cisco, Cmake, Coldfusion, Commonlisp,
8 Cpp, Cs, Css, Cue, D, Desktop, Diff, Djangotemplate, Doxygen, Doxygenlua,
9 Dtd, Eiffel, Email, Erlang, Fortran, Fstab, Gap, Gdb, Gettext, Gnuassembler,
10 Go, Haskell, Haxe, Html, Idl, Ilerpg, Ini, Java, Javadoc, Javascript,
11 Json, Jsp, Latex, Lex, LiterateHaskell, Lua, M3u, Makefile, Mandoc,
12 Matlab, Maxima, Mediawiki, Metafont, Mips, Modula2, Modula3, Monobasic,
13 Nasm, Noweb, Objectivec, Objectivecpp, Ocaml, Octave, Pango, Pascal, Perl,
14 Php, Pike, Postscript, Prolog, Python, R, Relaxngcompact, Rhtml, Ruby,
15 Scala, Scheme, Sci, Sed, Sgml, Sql, SqlMysql, SqlPostgresql, Tcl, Texinfo,
16 Verilog, Vhdl, Winehq, Wml, Xharbour, Xml, Xorg, Xslt, Xul, Yacc, Yaml
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
17
91188b6 Improved installation instructions.
jgm@berkeley.edu authored Oct 9, 2010
18 To install, use the cabal tool:
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
19
91188b6 Improved installation instructions.
jgm@berkeley.edu authored Oct 9, 2010
20 cabal install
21
22 Note: If you have checked out the source from the darcs repository,
23 you will first need to do:
24
25 make prep
26
27 which generates some of the needed source files from xml syntax
28 definitions.
29
4230e75 @jgm Added note on linking error to readme.
authored Jan 26, 2011
30 If you get a linking error with GHC 7 on Mac OS X, "scattered reloc r_address
31 too large for inferred architecture i386," the workaround is to use the flag
32 `--disable-library-for-ghci` when you `cabal install`.
33
91188b6 Improved installation instructions.
jgm@berkeley.edu authored Oct 9, 2010
34 To generate the documentation:
35
36 cabal haddock
69fc129 Export definitions in Text.Highlighting.Kate.Definitions.
jgm@berkeley.edu authored Feb 2, 2008
37
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
38 For an example of the use of the library, see Highlight.hs.
a000418 Updated README.
jgm@berkeley.edu authored Feb 9, 2008
39 To compile this program along with the library, specify the 'executable'
40 flag in the configure step above:
6ef44ba Added cabal configuration flag for building the Highlight executable.
jgm@berkeley.edu authored Feb 3, 2008
41
91188b6 Improved installation instructions.
jgm@berkeley.edu authored Oct 9, 2010
42 cabal install -fexecutable
6ef44ba Added cabal configuration flag for building the Highlight executable.
jgm@berkeley.edu authored Feb 3, 2008
43
9e76aaf Updated README.
jgm@berkeley.edu authored Feb 3, 2008
44 To run Highlight, specify the language name using -s:
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
45
a000418 Updated README.
jgm@berkeley.edu authored Feb 9, 2008
46 Highlight -s haskell Highlight.hs > example.html
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
47
9e76aaf Updated README.
jgm@berkeley.edu authored Feb 3, 2008
48 If you don't specify a language name, Highlight will try to guess it
a000418 Updated README.
jgm@berkeley.edu authored Feb 9, 2008
49 from the file extension. Highlight can also be used as a pipe, reading
50 input from STDIN. For other options,
9e76aaf Updated README.
jgm@berkeley.edu authored Feb 3, 2008
51
a000418 Updated README.
jgm@berkeley.edu authored Feb 9, 2008
52 Highlight --help
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
53
a000418 Updated README.
jgm@berkeley.edu authored Feb 9, 2008
54 Styling is done using span tags. The Highlight program will include
55 default styles in the generated HTML, unless a link to a CSS file is
56 provided using the '--css' option. Some sample CSS files can be found
57 in the css directory. These use generic class names (Normal, Keyword,
58 DataType, DecVal, BaseN, Float, Char, String, Comment, Function, Others,
59 Alert, Error). For more fine-grained highlighting, users may wish to
60 create their own CSS files that use language-specific classes.
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
61
62 The parsers in Text/Highlighting/Kate/Syntax were automatically generated
3245328 Added notes about xml files that have been modified.
jgm@berkeley.edu authored Feb 2, 2008
63 from the Kate syntax definitions in the xml directory. You may modify
64 the xml files in this directory, or add new ones, and then regenerate
65 the parsers by doing:
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
66
91188b6 Improved installation instructions.
jgm@berkeley.edu authored Oct 9, 2010
67 make prep
68
69 or
70
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
71 runghc ParseSyntaxFiles.hs xml
72
f2f4e1e Updated parseSyntaxFiles.hs to use HXT 9.0.0.
jgm@berkeley.edu authored Oct 9, 2010
73 Note that ParseSyntaxFiles.hs requires the HXT package (>= 9.0.0). If you
8b98b73 Added note in README about adding/deleting syntaxes.
jgm@berkeley.edu authored Jun 28, 2010
74 added or removed a syntax definition, you will also need to
75 update the Extra-Source-Files and Exposed-Modules sections of
76 highlighting-kate.cabal before recompiling using 'cabal install'.
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
77
78 You can browse the available Kate syntax highlighting files at
79
80 http://kate-editor.org/downloads/syntax_highlighting
81
82 or retrieve them all using Subversion:
83
84 svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs/kate/syntax/data kate-data
85
86 There is information on the syntax highlighting definitions at
87
88 http://kate-editor.org/article/writing_a_kate_highlighting_xml_file
89
a000418 Updated README.
jgm@berkeley.edu authored Feb 9, 2008
90 Thanks are due to all the authors of these syntax definitions.
91
92 Changes have been made to the following xml files (the originals have
93 been left in the directory, with .bkp extensions):
3245328 Added notes about xml files that have been modified.
jgm@berkeley.edu authored Feb 2, 2008
94
95 - javascript.xml: Fixed regex \s* (which matches empty string) by changes to DetectSpaces
96 - perl.xml: Fixed regexes - needed backslash-escapes before ] and ^
100f821 Fixed bug in bash.xml -- "\\" should be "\".
jgm@berkeley.edu authored Feb 9, 2008
97 - bash.xml: Changed "\\" to "\" in two Detect2Char rules in FindString
3245328 Added notes about xml files that have been modified.
jgm@berkeley.edu authored Feb 2, 2008
98
107fb2f Removed claim that the software was mostly untested.
jgm@berkeley.edu authored Oct 9, 2010
99 NOTE: Known bugs are recorded in the file BUGS. Please send bug reports (or
100 better, patches) to the author (jgm at berkeley dot edu).
ede8650 Initial commit.
jgm@berkeley.edu authored Feb 2, 2008
101
Something went wrong with that request. Please try again.