diff options
author | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
---|---|---|
committer | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
commit | 1dd3124a9770e11b6684e5dd1e6bc15a0aa3bc67 (patch) | |
tree | 87a171383266dd1f64196589af081bc2f8e497c3 /pygments/lexers/ezhil.py | |
parent | f1c080e184dc1bbc36eaa7cd729ff3a499de568a (diff) | |
download | pygments-master.tar.gz |
Diffstat (limited to 'pygments/lexers/ezhil.py')
-rw-r--r-- | pygments/lexers/ezhil.py | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/pygments/lexers/ezhil.py b/pygments/lexers/ezhil.py deleted file mode 100644 index ee465885..00000000 --- a/pygments/lexers/ezhil.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -""" - pygments.lexers.ezhil - ~~~~~~~~~~~~~~~~~~~~~ - - Pygments lexers for Ezhil language. - - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re -from pygments.lexer import RegexLexer, include, words -from pygments.token import Keyword, Text, Comment, Name -from pygments.token import String, Number, Punctuation, Operator - -__all__ = ['EzhilLexer'] - - -class EzhilLexer(RegexLexer): - """ - Lexer for `Ezhil, a Tamil script-based programming language <http://ezhillang.org>`_ - - .. versionadded:: 2.1 - """ - name = 'Ezhil' - aliases = ['ezhil'] - filenames = ['*.n'] - mimetypes = ['text/x-ezhil'] - flags = re.MULTILINE | re.UNICODE - # Refer to tamil.utf8.tamil_letters from open-tamil for a stricter version of this. - # This much simpler version is close enough, and includes combining marks. - _TALETTERS = u'[a-zA-Z_]|[\u0b80-\u0bff]' - tokens = { - 'root': [ - include('keywords'), - (r'#.*\n', Comment.Single), - (r'[@+/*,^\-%]|[!<>=]=?|&&?|\|\|?', Operator), - (u'இல்', Operator.Word), - (words((u'assert', u'max', u'min', - u'நீளம்', u'சரம்_இடமாற்று', u'சரம்_கண்டுபிடி', - u'பட்டியல்', u'பின்இணை', u'வரிசைப்படுத்து', - u'எடு', u'தலைகீழ்', u'நீட்டிக்க', u'நுழைக்க', u'வை', - u'கோப்பை_திற', u'கோப்பை_எழுது', u'கோப்பை_மூடு', - u'pi', u'sin', u'cos', u'tan', u'sqrt', u'hypot', u'pow', - u'exp', u'log', u'log10', u'exit', - ), suffix=r'\b'), Name.Builtin), - (r'(True|False)\b', Keyword.Constant), - (r'[^\S\n]+', Text), - include('identifier'), - include('literal'), - (r'[(){}\[\]:;.]', Punctuation), - ], - 'keywords': [ - (u'பதிப்பி|தேர்ந்தெடு|தேர்வு|ஏதேனில்|ஆனால்|இல்லைஆனால்|இல்லை|ஆக|ஒவ்வொன்றாக|இல்|வரை|செய்|முடியேனில்|பின்கொடு|முடி|நிரல்பாகம்|தொடர்|நிறுத்து|நிரல்பாகம்', Keyword), - ], - 'identifier': [ - (u'(?:'+_TALETTERS+u')(?:[0-9]|'+_TALETTERS+u')*', Name), - ], - 'literal': [ - (r'".*?"', String), - (r'(?u)\d+((\.\d*)?[eE][+-]?\d+|\.\d*)', Number.Float), - (r'(?u)\d+', Number.Integer), - ] - } - - def __init__(self, **options): - super(EzhilLexer, self).__init__(**options) - self.encoding = options.get('encoding', 'utf-8') |