summaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/rnc.py
diff options
context:
space:
mode:
authormonster <[email protected]>2022-07-07 14:41:37 +0300
committermonster <[email protected]>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/python/Pygments/py3/pygments/lexers/rnc.py
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
fix ya.make
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/rnc.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/rnc.py67
1 files changed, 0 insertions, 67 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/rnc.py b/contrib/python/Pygments/py3/pygments/lexers/rnc.py
deleted file mode 100644
index fc1c9a89d61..00000000000
--- a/contrib/python/Pygments/py3/pygments/lexers/rnc.py
+++ /dev/null
@@ -1,67 +0,0 @@
-"""
- pygments.lexers.rnc
- ~~~~~~~~~~~~~~~~~~~
-
- Lexer for Relax-NG Compact syntax
-
- :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-
-from pygments.lexer import RegexLexer
-from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
- Punctuation
-
-__all__ = ['RNCCompactLexer']
-
-
-class RNCCompactLexer(RegexLexer):
- """
- For RelaxNG-compact syntax.
-
- .. versionadded:: 2.2
- """
-
- name = 'Relax-NG Compact'
- url = 'http://relaxng.org'
- aliases = ['rng-compact', 'rnc']
- filenames = ['*.rnc']
-
- tokens = {
- 'root': [
- (r'namespace\b', Keyword.Namespace),
- (r'(?:default|datatypes)\b', Keyword.Declaration),
- (r'##.*$', Comment.Preproc),
- (r'#.*$', Comment.Single),
- (r'"[^"]*"', String.Double),
- # TODO single quoted strings and escape sequences outside of
- # double-quoted strings
- (r'(?:element|attribute|mixed)\b', Keyword.Declaration, 'variable'),
- (r'(text\b|xsd:[^ ]+)', Keyword.Type, 'maybe_xsdattributes'),
- (r'[,?&*=|~]|>>', Operator),
- (r'[(){}]', Punctuation),
- (r'.', Text),
- ],
-
- # a variable has been declared using `element` or `attribute`
- 'variable': [
- (r'[^{]+', Name.Variable),
- (r'\{', Punctuation, '#pop'),
- ],
-
- # after an xsd:<datatype> declaration there may be attributes
- 'maybe_xsdattributes': [
- (r'\{', Punctuation, 'xsdattributes'),
- (r'\}', Punctuation, '#pop'),
- (r'.', Text),
- ],
-
- # attributes take the form { key1 = value1 key2 = value2 ... }
- 'xsdattributes': [
- (r'[^ =}]', Name.Attribute),
- (r'=', Operator),
- (r'"[^"]*"', String.Double),
- (r'\}', Punctuation, '#pop'),
- (r'.', Text),
- ],
- }