Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gromgull/5643575 to your computer and use it in GitHub Desktop.
Save gromgull/5643575 to your computer and use it in GitHub Desktop.
N3 source-highlight language definition file, usage: source-highlight --lang-def N3.lang -s N3 -f latexcolor -i {my_sparql_file} -o {myoutput.tex}
# N3 source-highlight language definition file
# Author: Gunnar Aastrand Grimnes
# e-Mail: gunnar.grimnes < AT > dfki.de
# the fields used for things is pretty arbitrary, but it makes for nice HTML output
# source-highlight -f latexcolor --lang-def n3.lang thesis/examples/bibtexrdf2.n3
keyword = "prefix|a"
function delim "\"" "\"" escape "\\"
function delim "'" "'" escape "\\"
function delim '([[:space:]]*\'{3})' '(\'{3})' multiline
function delim '([[:space:]]*\"{3})' '(\"{3})' multiline
string = '<[^ ]+>'
symbol = "{","}","@",";","."
variable = '\?[[:alnum:]]+'
number = '[[:digit:]]*:[[:digit:]]+'
comment start "#"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment