Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gromgull/5643598 to your computer and use it in GitHub Desktop.
Save gromgull/5643598 to your computer and use it in GitHub Desktop.
SPARQL source-highlight language definition file Usage: source-highlight --lang-def SPARQL.lang -s SPARQL -f latexcolor -i {inputfile} -o {outputfile}
# SPARQL 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 SPARQL.lang -s SPARQL inputdoc.sparql
keyword = "SELECT|WHERE|INSERT|DELETE|FILTER|GROUP BY"
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