summaryrefslogtreecommitdiff
path: root/pygments/lexers/_mapping.py
diff options
context:
space:
mode:
authorLucas Werkmeister <mail@lucaswerkmeister.de>2019-07-20 22:22:50 +0200
committerLucas Werkmeister <mail@lucaswerkmeister.de>2019-07-20 22:22:50 +0200
commit63b7f3c535b3d8a63a612862025fb04967b20155 (patch)
treeaaa1b317615e624e096e4010297bb7443ff51aac /pygments/lexers/_mapping.py
parent3d51447a9c1e75933ced7fd1ebf5c6c60676366d (diff)
downloadpygments-63b7f3c535b3d8a63a612862025fb04967b20155.tar.gz
Add lexer for ShExC
ShExC [1] is one syntax for the ShEx (shape expressions) language [2] to describe the structure of RDF graphs (the other two syntaxes are based on JSON-LD and RDF and don?t need special lexers). It is syntactically similar to SPARQL, which is why a lot of the productions of ShExCLexer are copied from SparqlLexer, but at the same time has enough differences that I feel it?s better to simply copy the productions rather than trying to share them between the two lexers (compare e.?g. PN_LOCAL_ESCAPE_CHARS or IRIREF). The example file purports to be a brief schema for Pygments lexers, which I put together from scratch to avoid licensing issues with existing example schemas; it should not be taken too seriously. [1]: https://shex.io/shex-semantics/#shexc [2]: https://shexspec.github.io/primer/
Diffstat (limited to 'pygments/lexers/_mapping.py')
-rw-r--r--pygments/lexers/_mapping.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py
index adb1ec83..595e100f 100644
--- a/pygments/lexers/_mapping.py
+++ b/pygments/lexers/_mapping.py
@@ -390,6 +390,7 @@ LEXERS = {
'SchemeLexer': ('pygments.lexers.lisp', 'Scheme', ('scheme', 'scm'), ('*.scm', '*.ss'), ('text/x-scheme', 'application/x-scheme')),
'ScilabLexer': ('pygments.lexers.matlab', 'Scilab', ('scilab',), ('*.sci', '*.sce', '*.tst'), ('text/scilab',)),
'ScssLexer': ('pygments.lexers.css', 'SCSS', ('scss',), ('*.scss',), ('text/x-scss',)),
+ 'ShExCLexer': ('pygments.lexers.rdf', 'ShExC', ('shexc', 'shex'), ('*.shex',), ('text/shex',)),
'ShenLexer': ('pygments.lexers.lisp', 'Shen', ('shen',), ('*.shen',), ('text/x-shen', 'application/x-shen')),
'SilverLexer': ('pygments.lexers.verification', 'Silver', ('silver',), ('*.sil', '*.vpr'), ()),
'SlashLexer': ('pygments.lexers.slash', 'Slash', ('slash',), ('*.sl',), ()),