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

    Lexers for testing languages.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pygments.lexer import RegexLexer, include, bygroups
from pygments.token import Comment, Keyword, Name, String, Number, Generic, Text

__all__ = ['GherkinLexer', 'TAPLexer']


class GherkinLexer(RegexLexer):
    """
    For Gherkin syntax.

    .. versionadded:: 1.2
    """
    name = 'Gherkin'
    aliases = ['gherkin', 'cucumber']
    filenames = ['*.feature']
    mimetypes = ['text/x-gherkin']

    feature_keywords = '^(кё°лЉҐ|ж©џиѓЅ|еЉџиѓЅ|гѓ•г‚ЈгѓјгѓЃгѓЈ|Ш®Ш§ШµЩЉШ©|ЧЄЧ›Ч•Ч&nbsp;Ч”|Р¤СѓРЅРєС†С–РѕРЅР°Р»|Р¤СѓРЅРєС†РёРѕРЅР°Р»РЅРѕСЃС‚|Р¤СѓРЅРєС†РёРѕРЅР°Р»|Р¤РёС‡Р°|РћСЃРѕР±РёРЅР°|РњРѕРіСѓС›РЅРѕСЃС‚|Г–zellik|WЕ‚aЕ›ciwoЕ›Д‡|TГ­nh nДѓng|Trajto|SavybД—|PoЕѕiadavka|PoЕѕadavek|Osobina|Ominaisuus|Omadus|OH HAI|MoguД‡nost|Mogucnost|JellemzЕ‘|FД«ДЌa|FunzionalitГ&nbsp;|FunktionalitГ¤t|Funkcionalnost|FunkcionalitДЃte|FuncИ›ionalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|FonctionnalitГ©|Fitur|Feature|Egenskap|Egenskab|Crikey|CaracterГ­stica|Arwedd)(:)(.*)$'
    feature_element_keywords = '^(\\s*)(м‹њл‚л¦¬м¤ к°њмљ”|м‹њл‚л¦¬м¤|л°°кІЅ|иѓЊж™Ї|е&nbsp;ґж™Їе¤§з¶±|е&nbsp;ґж™Ї|ењєж™Їе¤§зєІ|ењєж™Ї|еЉ‡жњ¬е¤§з¶±|еЉ‡жњ¬|е‰§жњ¬е¤§зєІ|е‰§жњ¬|гѓ†гѓігѓ—гѓ¬|г‚·гѓЉгѓЄг‚Єгѓ†гѓігѓ—гѓ¬гѓјгѓ€|г‚·гѓЉгѓЄг‚Єгѓ†гѓігѓ—гѓ¬|г‚·гѓЉгѓЄг‚Єг‚ўг‚¦гѓ€гѓ©г‚¤гѓі|г‚·гѓЉгѓЄг‚Є|ШіЩЉЩ†Ш§Ш±ЩЉЩ€ Щ…Ш®Ш·Ш·|ШіЩЉЩ†Ш§Ш±ЩЉЩ€|Ш§Щ„Ш®Щ„ЩЃЩЉШ©|ЧЄЧЁЧ—Ч™Ч©|ЧЄЧ‘Ч&nbsp;Ч™ЧЄ ЧЄЧЁЧ—Ч™Ч©|ЧЁЧ§Чў|РўР°СЂРёС…|РЎС†РµРЅР°СЂС–Р№|РЎС†РµРЅР°СЂРёРѕ|РЎС†РµРЅР°СЂРёР№ СЃС‚СЂСѓРєС‚СѓСЂР°СЃРё|РЎС†РµРЅР°СЂРёР№|РЎС‚СЂСѓРєС‚СѓСЂР° СЃС†РµРЅР°СЂС–СЋ|РЎС‚СЂСѓРєС‚СѓСЂР° СЃС†РµРЅР°СЂРёСР°|РЎС‚СЂСѓРєС‚СѓСЂР° СЃС†РµРЅР°СЂРёСЏ|РЎРєРёС†Р°|Р&nbsp;Р°РјРєР° РЅР° СЃС†РµРЅР°СЂРёР№|РџСЂРёРјРµСЂ|РџСЂРµРґС‹СЃС‚РѕСЂРёСЏ|РџСЂРµРґРёСЃС‚РѕСЂРёСЏ|РџРѕР·Р°РґРёРЅР°|РџРµСЂРµРґСѓРјРѕРІР°|РћСЃРЅРѕРІР°|РљРѕРЅС†РµРїС‚|РљРѕРЅС‚РµРєСЃС‚|ZaЕ‚oЕјenia|Wharrimean is|TГ¬nh huб»‘ng|The thing of it is|Tausta|Taust|Tapausaihio|Tapaus|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|SituДЃcija|Senaryo taslaДџД±|Senaryo|ScГ©nГЎЕ™|ScГ©nario|Schema dello scenario|ScenДЃrijs pД“c parauga|ScenДЃrijs|ScenГЎr|Scenaro|Scenariusz|Scenariul de Еџablon|Scenariul de sablon|Scenariu|Scenario Outline|Scenario Amlinellol|Scenario|Scenarijus|Scenarijaus ЕЎablonas|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Primer|PozadГ­|Pozadina|Pozadie|Plan du scГ©nario|Plan du ScГ©nario|Osnova scГ©nГЎЕ™e|Osnova|NГЎДЌrt ScГ©nГЎЕ™e|NГЎДЌrt ScenГЎru|Mate|MISHUN SRSLY|MISHUN|Kб»‹ch bбєЈn|Konturo de la scenaro|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tГ¬nh huб»‘ng|Khung kб»‹ch bбєЈn|HГЎttГ©r|Grundlage|GeГ§miЕџ|ForgatГіkГ¶nyv vГЎzlat|ForgatГіkГ¶nyv|Fono|Esquema do CenГЎrio|Esquema do Cenario|Esquema del escenario|Esquema de l\'escenari|Escenario|Escenari|Dis is what went down|Dasar|Contexto|Contexte|Contesto|CondiЕЈii|Conditii|CenГЎrio|Cenario|Cefndir|Bб»‘i cбєЈnh|Blokes|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y\'all|Achtergrond|Abstrakt Scenario|Abstract Scenario)(:)(.*)$'
    examples_keywords = '^(\\s*)(м€|дѕ‹е­ђ|дѕ‹|г‚µгѓігѓ—гѓ«|Ш§Щ…Ш«Щ„Ш©|Ч“Ч•Ч’ЧћЧђЧ•ЧЄ|РЎС†РµРЅР°СЂРёСРё|РџСЂРёРјРµСЂРё|РџСЂРёРєР»Р°РґРё|РњРёСЃРѕР»Р»Р°СЂ|Р—РЅР°С‡РµРЅРёСЏ|Г–rnekler|Voorbeelden|Variantai|Tapaukset|Scenarios|Scenariji|Scenarijai|PЕ™Г­klady|PГ©ldГЎk|PrГ­klady|PrzykЕ‚ady|Primjeri|Primeri|PiemД“ri|PavyzdЕѕiai|Paraugs|Juhtumid|Exemplos|Exemples|Exemplele|Exempel|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|EXAMPLZ|Dб»Ї liб»‡u|Contoh|Cobber|Beispiele)(:)(.*)$'
    step_keywords = '^(\\s*)(н•м§Ђл§Њ|мЎ°к±ґ|лЁјм&nbsp;Ђ|л§Њмќј|л§Њм•Ѕ|л‹Ё|к·ёл¦¬кі&nbsp;|к·ёлџ¬л©ґ|й‚Јйєј|й‚Јд№€|иЂЊдё”|з•¶|еЅ“|е‰ЌжЏђ|еЃ‡иЁ­|еЃ‡и®ѕ|еЃ‡е¦‚|еЃ‡е®љ|дЅ†жЇ|дЅ†гЃ—|дё¦дё”|е№¶дё”|еђЊж™‚|еђЊж—¶|г‚‚гЃ—|гЃЄг‚‰гЃ°|гЃџгЃ&nbsp;гЃ—|гЃ—гЃ‹гЃ—|гЃ‹гЃ¤|Щ€ |Щ…ШЄЩ‰ |Щ„ЩѓЩ† |Ш№Щ†ШЇЩ…Ш§ |Ш«Щ… |ШЁЩЃШ±Ш¶ |Ш§Ш°Ш§Щ‹ |Ч›ЧђЧ©ЧЁ |Ч•Ч’Чќ |Ч‘Ч”Ч™Ч&nbsp;ЧЄЧџ |ЧђЧ–Ч™ |ЧђЧ– |ЧђЧ‘Чњ |РЇРєС‰Рѕ |РЈРЅРґР° |РўРѕ |РџСЂРёРїСѓСЃС‚РёРјРѕ, С‰Рѕ |РџСЂРёРїСѓСЃС‚РёРјРѕ |РћРЅРґР° |РќРѕ |РќРµС…Р°Р№ |Р›РµРєРёРЅ |РљРѕРіР°С‚Рѕ |РљР°РґР° |РљР°Рґ |Рљ С‚РѕРјСѓ Р¶Рµ |Р |Р—Р°РґР°С‚Рѕ |Р—Р°РґР°С‚Рё |Р—Р°РґР°С‚Рµ |Р•СЃР»Рё |Р”РѕРїСѓСЃС‚РёРј |Р”Р°РґРµРЅРѕ |Р’Р° |Р‘РёСЂРѕРє |РђРјРјРѕ |РђР»Рё |РђР»Рµ |РђРіР°СЂ |Рђ |Р† |Иi |Г‰s |Zatati |ZakЕ‚adajД…c |Zadato |Zadate |Zadano |Zadani |Zadan |Youse know when youse got |Youse know like when |Yna |Ya know how |Ya gotta |Y |Wun |Wtedy |When y\'all |When |Wenn |WEN |VГ&nbsp; |Ve |Und |Un |ThГ¬ |Then y\'all |Then |Tapi |Tak |Tada |Tad |SГҐ |Stel |Soit |Siis |Si |Sed |Se |Quando |Quand |Quan |Pryd |Pokud |PokiaДѕ |PerГІ |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |NГҐr |NГ¤r |Niin |NhЖ°ng |N |Mutta |Men |Mas |Maka |Majd |Mais |Maar |Ma |Lorsque |Lorsqu\'|Kun |Kuid |Kui |Khi |KeДЏ |Ketika |KdyЕѕ |Kaj |Kai |Kada |Kad |JeЕјeli |Ja |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y\'all |Given |Gitt |Gegeven |Gegeben sei |Fakat |EДџer ki |Etant donnГ© |Et |EntГЈo |Entonces |Entao |En |Eeldades |E |Duota |Dun |DonitaДµo |Donat |Donada |Do |Diyelim ki |Dengan |Den youse gotta |De |Dato |Dar |Dann |Dan |Dado |DacДѓ |Daca |DEN |CГўnd |Cuando |Cho |Cept |Cand |Cal |But y\'all |But |Buh |Biбєїt |Bet |BUT |AtГЁs |Atunci |Atesa |Anrhegedig a |Angenommen |And y\'all |And |An |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Aber |AN |A takГ© |A |\\* )'

    tokens = {
        'comments': [
            (r'^\s*#.*$', Comment),
        ],
        'feature_elements': [
            (step_keywords, Keyword, "step_content_stack"),
            include('comments'),
            (r"(\s|.)", Name.Function),
        ],
        'feature_elements_on_stack': [
            (step_keywords, Keyword, "#pop:2"),
            include('comments'),
            (r"(\s|.)", Name.Function),
        ],
        'examples_table': [
            (r"\s+\|", Keyword, 'examples_table_header'),
            include('comments'),
            (r"(\s|.)", Name.Function),
        ],
        'examples_table_header': [
            (r"\s+\|\s*$", Keyword, "#pop:2"),
            include('comments'),
            (r"\\\|", Name.Variable),
            (r"\s*\|", Keyword),
            (r"[^|]", Name.Variable),
        ],
        'scenario_sections_on_stack': [
            (feature_element_keywords,
             bygroups(Name.Function, Keyword, Keyword, Name.Function),
             "feature_elements_on_stack"),
        ],
        'narrative': [
            include('scenario_sections_on_stack'),
            include('comments'),
            (r"(\s|.)", Name.Function),
        ],
        'table_vars': [
            (r'(&lt;[^&gt;]+&gt;)', Name.Variable),
        ],
        'numbers': [
            (r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', String),
        ],
        'string': [
            include('table_vars'),
            (r'(\s|.)', String),
        ],
        'py_string': [
            (r'"""', Keyword, "#pop"),
            include('string'),
        ],
        'step_content_root': [
            (r"$", Keyword, "#pop"),
            include('step_content'),
        ],
        'step_content_stack': [
            (r"$", Keyword, "#pop:2"),
            include('step_content'),
        ],
        'step_content': [
            (r'"', Name.Function, "double_string"),
            include('table_vars'),
            include('numbers'),
            include('comments'),
            (r'(\s|.)', Name.Function),
        ],
        'table_content': [
            (r"\s+\|\s*$", Keyword, "#pop"),
            include('comments'),
            (r"\\\|", String),
            (r"\s*\|", Keyword),
            include('string'),
        ],
        'double_string': [
            (r'"', Name.Function, "#pop"),
            include('string'),
        ],
        'root': [
            (r'\n', Name.Function),
            include('comments'),
            (r'"""', Keyword, "py_string"),
            (r'\s+\|', Keyword, 'table_content'),
            (r'"', Name.Function, "double_string"),
            include('table_vars'),
            include('numbers'),
            (r'(\s*)(@[^@\r\n\t ]+)', bygroups(Name.Function, Name.Tag)),
            (step_keywords, bygroups(Name.Function, Keyword),
             'step_content_root'),
            (feature_keywords, bygroups(Keyword, Keyword, Name.Function),
             'narrative'),
            (feature_element_keywords,
             bygroups(Name.Function, Keyword, Keyword, Name.Function),
             'feature_elements'),
            (examples_keywords,
             bygroups(Name.Function, Keyword, Keyword, Name.Function),
             'examples_table'),
            (r'(\s|.)', Name.Function),
        ]
    }

    def analyse_text(self, text):
        return


class TAPLexer(RegexLexer):
    """
    For Test Anything Protocol (TAP) output.

    .. versionadded:: 2.1
    """
    name = 'TAP'
    url = 'https://testanything.org/'
    aliases = ['tap']
    filenames = ['*.tap']

    tokens = {
        'root': [
            # A TAP version may be specified.
            (r'^TAP version \d+\n', Name.Namespace),

            # Specify a plan with a plan line.
            (r'^1\.\.\d+', Keyword.Declaration, 'plan'),

            # A test failure
            (r'^(not ok)([^\S\n]*)(\d*)',
             bygroups(Generic.Error, Text, Number.Integer), 'test'),

            # A test success
            (r'^(ok)([^\S\n]*)(\d*)',
             bygroups(Keyword.Reserved, Text, Number.Integer), 'test'),

            # Diagnostics start with a hash.
            (r'^#.*\n', Comment),

            # TAP's version of an abort statement.
            (r'^Bail out!.*\n', Generic.Error),

            # TAP ignores any unrecognized lines.
            (r'^.*\n', Text),
        ],
        'plan': [
            # Consume whitespace (but not newline).
            (r'[^\S\n]+', Text),

            # A plan may have a directive with it.
            (r'#', Comment, 'directive'),

            # Or it could just end.
            (r'\n', Comment, '#pop'),

            # Anything else is wrong.
            (r'.*\n', Generic.Error, '#pop'),
        ],
        'test': [
            # Consume whitespace (but not newline).
            (r'[^\S\n]+', Text),

            # A test may have a directive with it.
            (r'#', Comment, 'directive'),

            (r'\S+', Text),

            (r'\n', Text, '#pop'),
        ],
        'directive': [
            # Consume whitespace (but not newline).
            (r'[^\S\n]+', Comment),

            # Extract todo items.
            (r'(?i)\bTODO\b', Comment.Preproc),

            # Extract skip items.
            (r'(?i)\bSKIP\S*', Comment.Preproc),

            (r'\S+', Comment),

            (r'\n', Comment, '#pop:2'),
        ],
    }
</pre></body></html>