<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"""
    pygments.lexers.ezhil
    ~~~~~~~~~~~~~~~~~~~~~

    Pygments lexers for Ezhil language.

    :copyright: Copyright 2006-2023 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, Comment, Name, String, Number, \
    Punctuation, Operator, Whitespace

__all__ = ['EzhilLexer']


class EzhilLexer(RegexLexer):
    """
    Lexer for Ezhil, a Tamil script-based programming language.

    .. versionadded:: 2.1
    """
    name = 'Ezhil'
    url = 'http://ezhillang.org'
    aliases = ['ezhil']
    filenames = ['*.n']
    mimetypes = ['text/x-ezhil']
    # 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 = '[a-zA-Z_]|[\u0b80-\u0bff]'
    tokens = {
        'root': [
            include('keywords'),
            (r'#.*$', Comment.Single),
            (r'[@+/*,^\-%]|[!&lt;&gt;=]=?|&amp;&amp;?|\|\|?', Operator),
            ('а®‡а®ІаЇЌ', Operator.Word),
            (words(('assert', 'max', 'min',
                    'а®ЁаЇЂа®іа®®аЇЌ', 'а®ља®°а®®аЇЌ_а®‡а®џа®®а®ѕа®±аЇЌа®±аЇЃ', 'а®ља®°а®®аЇЌ_а®•а®ЈаЇЌа®џаЇЃа®Єа®їа®џа®ї',
                    'а®Єа®џаЇЌа®џа®їа®Їа®ІаЇЌ', 'а®Єа®їа®©аЇЌа®‡а®ЈаЇ€', 'а®µа®°а®їа®љаЇ€а®ЄаЇЌа®Єа®џаЇЃа®¤аЇЌа®¤аЇЃ',
                    'а®Ћа®џаЇЃ', 'а®¤а®ІаЇ€а®•аЇЂа®ґаЇЌ', 'а®ЁаЇЂа®џаЇЌа®џа®їа®•аЇЌа®•', 'а®ЁаЇЃа®ґаЇ€а®•аЇЌа®•', 'а®µаЇ€',
                    'а®•аЇ‡а®ѕа®ЄаЇЌа®ЄаЇ€_а®¤а®їа®±', 'а®•аЇ‡а®ѕа®ЄаЇЌа®ЄаЇ€_а®Ћа®ґаЇЃа®¤аЇЃ', 'а®•аЇ‡а®ѕа®ЄаЇЌа®ЄаЇ€_а®®аЇ‚а®џаЇЃ',
                    'pi', 'sin', 'cos', 'tan', 'sqrt', 'hypot', 'pow',
                    'exp', 'log', 'log10', 'exit',
                    ), suffix=r'\b'), Name.Builtin),
            (r'(True|False)\b', Keyword.Constant),
            (r'[^\S\n]+', Whitespace),
            include('identifier'),
            include('literal'),
            (r'[(){}\[\]:;.]', Punctuation),
        ],
        'keywords': [
            ('а®Єа®¤а®їа®ЄаЇЌа®Єа®ї|а®¤аЇ‡а®°аЇЌа®ЁаЇЌа®¤аЇ†а®џаЇЃ|а®¤аЇ‡а®°аЇЌа®µаЇЃ|а®Џа®¤аЇ‡а®©а®їа®ІаЇЌ|а®†а®©а®ѕа®ІаЇЌ|а®‡а®ІаЇЌа®ІаЇ€а®†а®©а®ѕа®ІаЇЌ|а®‡а®ІаЇЌа®ІаЇ€|а®†а®•|а®’а®µаЇЌа®µаЇЉа®©аЇЌа®±а®ѕа®•|а®‡а®ІаЇЌ|а®µа®°аЇ€|а®љаЇ†а®ЇаЇЌ|а®®аЇЃа®џа®їа®ЇаЇ‡а®©а®їа®ІаЇЌ|а®Єа®їа®©аЇЌа®•аЇЉа®џаЇЃ|а®®аЇЃа®џа®ї|а®Ёа®їа®°а®ІаЇЌа®Єа®ѕа®•а®®аЇЌ|а®¤аЇЉа®џа®°аЇЌ|а®Ёа®їа®±аЇЃа®¤аЇЌа®¤аЇЃ|а®Ёа®їа®°а®ІаЇЌа®Єа®ѕа®•а®®аЇЌ', Keyword),
        ],
        'identifier': [
            ('(?:'+_TALETTERS+')(?:[0-9]|'+_TALETTERS+')*', Name),
        ],
        'literal': [
            (r'".*?"', String),
            (r'\d+((\.\d*)?[eE][+-]?\d+|\.\d*)', Number.Float),
            (r'\d+', Number.Integer),
        ]
    }

    def analyse_text(text):
        """This language uses Tamil-script. We'll assume that if there's a
        decent amount of Tamil-characters, it's this language. This assumption
        is obviously horribly off if someone uses string literals in tamil
        in another language."""
        if len(re.findall(r'[\u0b80-\u0bff]', text)) &gt; 10:
            return 0.25

    def __init__(self, **options):
        super().__init__(**options)
        self.encoding = options.get('encoding', 'utf-8')
</pre></body></html>