Issue #1236 resolved
Justin Makeig
created an issue

Environment:

  • Pygments (2.1.3)
  • Python (2.7.10)
  • OS X 10.11.4 (15E65)

Input:

PREFIX db: <http://dbpedia.org/resource/>
PREFIX onto: <http://dbpedia.org/ontology/>

SELECT ?p ?o
WHERE 
  { db:Danny_Kaye ?p ?o 
  }

Shell script:

pygmentize -l sparql -f html -O 'full,style=default' -v

Error:

*****************************************************************
An unhandled exception occurred while highlighting.
Please report the whole traceback to the issue tracker at
<https://bitbucket.org/birkenfeld/pygments-main/issues>.
*****************************************************************

Traceback (most recent call last):
  File "/usr/local/bin/pygmentize", line 11, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/pygments/cmdline.py", line 504, in main
    return main_inner(popts, args, usage)
  File "/Library/Python/2.7/site-packages/pygments/cmdline.py", line 324, in main_inner
    lexer = get_lexer_by_name(lexername, **parsed_opts)
  File "/Library/Python/2.7/site-packages/pygments/lexers/__init__.py", line 88, in get_lexer_by_name
    return _lexer_cache[name](**options)
  File "/Library/Python/2.7/site-packages/pygments/lexer.py", line 580, in __call__
    cls._tokens = cls.process_tokendef('', cls.get_tokendefs())
  File "/Library/Python/2.7/site-packages/pygments/lexer.py", line 519, in process_tokendef
    cls._process_state(tokendefs, processed, state)
  File "/Library/Python/2.7/site-packages/pygments/lexer.py", line 501, in _process_state
    (tdef[0], state, cls, err))
ValueError: uncompilable regex u'(_:[0-9a-zA-Z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd\U00010000-\U000effff_](?:[a-zA-Z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd\U00010000-\U000effff_\\-0-9\xb7\u0300-\u036f\u203f-\u2040.]*[a-zA-Z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd\U00010000-\U000effff_\\-0-9\xb7\u0300-\u036f\u203f-\u2040])?)' in state 'root' of <class 'pygments.lexers.rdf.SparqlLexer'>: bad character range

Comments (4)

  1. Log in to comment