Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/pygments/lexers/__pycache__/ |
Upload File : |
o ���a�( � @ s� d Z ddlmZmZmZmZ ddlmZmZm Z m Z mZmZm Z mZmZmZ g d�ZG dd� de�ZG dd� de�ZG d d � d e�ZG dd� de�ZG d d� de�ZG dd� de�ZdS )z� pygments.lexers.esoteric ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for esoteric languages. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � )� RegexLexer�include�words�bygroups) �Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Error� Whitespace)�BrainfuckLexer�BefungeLexer�RedcodeLexer�CAmkESLexer� CapDLLexer� AheuiLexerc @ s� e Zd ZdZdZddgZddgZdgZdej fd ej fd ejfdefgde d fdefed�gde dfde dfed�gd�Zdd� ZdS )r ze Lexer for the esoteric `BrainFuck <http://www.muppetlabs.com/~breadbox/bf/>`_ language. � Brainfuck� brainfuck�bfz*.bfz*.bzapplication/x-brainfuckz[.,]+z[+-]+z[<>]+z[^.,+\-<>\[\]]+z\[�loopz\]�commonz#pushz#pop)r �rootr c C s� d}d}t dt| ��}| d|� D ]}|dks|dkr|d7 }|dks'|dkr+|d7 }q|d | kr4d S |d | kr<d S d}d| v rF|d7 }|S ) z]It's safe to assume that a program which mostly consists of + - and < > is brainfuck.r � N�+�-� �<�>g �?g �?z[-]g �?)�max�len)�text�plus_minus_count�greater_less_count�range_to_check�c�result� r* �:/usr/lib/python3/dist-packages/pygments/lexers/esoteric.py�analyse_text2 s"